[% PROCESS 'elements.html' %]
[% IF check.unapproved_transactions %]
[% text('There are [_1] unapproved transactions before the end date of this report.',check.unapproved_transactions) %]
[% END; IF check.unapproved_reports %]
[% text('There are [_1] unapproved reconciliations before the end date of this report.',check.unapproved_reports) %]
[% END %] [% IF ! defined(b_cleared_table); b_cleared_table = 'checked'; END %] [% IF ! defined(b_cleared_table) or ! defined(b_cleared_table); b_mismatch_table = ""; b_outstanding_table = ""; IF !approved and !submitted; FOREACH row = report_lines; IF row.err == 'mismatch'; b_mismatch_table = 'checked'; END; IF row.cleared != 'checked' and row.err != 'mismatch'; b_outstanding_table = 'checked'; END; END; END; END %]
[% text('Reconciliation Report') %]
[% IF submitted %] [% ELSE %] [% END %] [% IF ! approved %] [% END %] [% IF ! approved %] [% END %]
[% text('Account:') %] [% account_info.accno %] [% account_info.description %]
[% text('Statement Date') %]:[% end_date %]
[% text('Beginning Statement Balance:') %] [% beginning_balance %]
[% text('Ending Statement Balance:') %][% their_total %][% INCLUDE input element_data = { name = "their_total", type = "text", class = "money", size = "15", value = their_total } %]
[% text('Variance:') %] [% variance %]
[% text('Less Outstanding Checks:') %] [% outstanding_total %]
[% text('Ending GL Balance:') %] [% statement_gl_calc %]
[% text('Report Generated By:') %] [% entered_username %]

[% IF ! approved and !submitted%]
[% PROCESS input element_data = { type="file" name="csv_file" id="file_upload" } %]
[% END %] [% IF error %]
[% error %]
[% END %] [% i = 1 %] [% FOREACH row = report_lines %] [% IF row.cleared -%] [% row.cleared = 'checked' -%] [% ELSE %] [% row.cleared = undef -%] [% END -%] [% IF row.cleared == 'checked' %] [% INCLUDE input element_data = { type = "hidden", name = "id_$i", value = row.id } %] [% id=''; class=''; element_data = {}; IF row.days; id="cleared_time_$row.id"; IF row.days < 0; class='cleared-future'; element_data = { id = id msg = text('Clear date is [*,_1,day] in the future of after posting',0-row.days) }; ELSIF row.days > 150; class='cleared-past'; element_data = { id = id msg = text('Clear date over [*,_1,day]',row.days) }; END; END; %] [% i = i + 1 -%] [% END %] [% END -%]
[% INCLUDE input element_data = { type = "toggle" name = "b_cleared_table" label = text('Cleared Transactions') checked = b_cleared_table "data-dojo-type" = "lsmb/PublishToggleButton" "data-dojo-props" = "topic:'ui/reconciliation/report/b_cleared_table'" } %]
[% text('Transaction Type') %] [% text('Cleared') %] [% INCLUDE tooltip element_data = { id => 'cleared_header_column', position => ["above", "below", "after", "before"], msg => text("Date when the transaction was cleared at your bank") }; %] [% text('Source') %] [% text('Posted') %] [% INCLUDE tooltip element_data = { id => 'posted_header_column', position => ["above", "below", "after", "before"], msg => text("Date when the transaction was posted in the ledger") }; %] [% text('Description') %] [% text('Books') %] [% INCLUDE tooltip element_data = { id => 'books_header_column', position => ["above", "below", "after", "before"], msg => text("Data from your ledger") }; %] [% text('Bank') %] [% INCLUDE tooltip element_data = { id => 'bank_header_column', position => ["above", "below", "after", "before"], msg => text("Data from your bank statement") }; %]
[% text('Debits') %] [% text('Credits') %] [% text('Debits') %] [% text('Credits') %]
[% IF !approved and !submitted; INCLUDE input element_data = { type = "checkbox" name = "cleared_$row.id" value = row.id checked = row.cleared }; END %] [% row.trans_type %] [% INCLUDE tooltip element_data; %] [% row.clear_time %] [% row.scn %] [% row.post_date %] [% row.payee %] [% reverse ? row.our_credits : row.our_debits %] [% reverse ? row.our_debits : row.our_credits %] [% reverse ? row.their_credits : row.their_debits %] [% reverse ? row.their_debits : row.their_credits %]
[% text('Total') %] [% total_cleared_debits %] [% total_cleared_credits %]
[% FOREACH row = report_lines %] [% IF row.err == 'mismatch' %] [% INCLUDE input element_data = { type = "hidden", name = "id_$i", value = row.id } %] [% i = i + 1 -%] [% END -%] [% END -%]
[% INCLUDE input element_data = { type = "toggle" name = "b_mismatch_table" label = text('Mismatched Transactions (From Upload)') checked = b_mismatch_table "data-dojo-type" = "lsmb/PublishToggleButton" "data-dojo-props" = "topic:'ui/reconciliation/report/b_mismatch_table'" } %]
[% text('Transaction Type') %] [% text('Cleared') %] [% text('Source') %] [% text('Posted') %] [% text('Description') %] [% text('Our Debits') %] [% text('Our Credits') %] [% text('Their Debits') %] [% text('Their Credits') %]
[% IF !approved and !submitted; INCLUDE input element_data = { type = "checkbox" name = "cleared_$row.id" value = row.id checked = row.cleared }; END %] [% row.trans_type %] [% row.clear_time %] [% row.scn %] [% row.post_date %] [% row.payee %] [% reverse ? row.our_credits : row.our_debits %] [% reverse ? row.our_debits : row.our_credits %] [% reverse ? row.their_credits : row.their_debits %] [% reverse ? row.their_debits : row.their_credits %]
[% text('Total') %] [% mismatch_our_debits %] [% mismatch_our_credits %] [% mismatch_their_debits %] [% mismatch_their_credits %]
[% FOREACH row = report_lines; IF row.cleared != 'checked' and row.err != 'mismatch'; INCLUDE input element_data = { type = "hidden", name = "id_$i", value = row.id } %] [% i = i + 1; END; END -%]
[% INCLUDE input element_data = { type = "toggle" name = "b_outstanding_table" label = text('Outstanding Transactions') checked = b_outstanding_table "data-dojo-type" = "lsmb/PublishToggleButton" "data-dojo-props" = "topic:'ui/reconciliation/report/b_outstanding_table'" } %]
[% text('Cleared') %] [% text('Source') %] [% text('Posted') %] [% text('Description') %] [% text('Our Debits') %] [% text('Our Credits') %]
[% IF !approved and !submitted; INCLUDE input element_data = { type = "checkbox" name = "cleared_$row.id" value = row.id checked = row.cleared "data-dojo-type" = "lsmb/PublishCheckBox" "data-dojo-props" = "topic:'ui/reconciliation/report/cleared_" _ row.id _ "'" }; END %] [% row.scn %] [% row.post_date %] [% row.payee %] [% reverse ? row.our_credits : row.our_debits %] [% reverse ? row.our_debits : row.our_credits %]
[% text('Total') %] [% total_uncleared_debits %] [% total_uncleared_credits %]
[% INCLUDE input element_data = { name = "end_date", type = "hidden", value = end_date, } %] [% INCLUDE input element_data = { name = "form_id", type = "hidden", value = form_id, } %] [% INCLUDE input element_data = { name = "report_id", type = "hidden", value = report_id, } %] [% IF NOT submitted %] [% INCLUDE select element_data = { name = "line_order", label = text('Order By'), #' options = sort_options, text_attr = 'label', value_attr = 'id', default_values = [line_order] class = 'sort' } %] [% INCLUDE button element_data = { name = "action", text = text('Update'), value = 'update_recon_set', class = "submit" } %] [% INCLUDE button element_data = { name = "action" text = text('Select All') #' value = 'select_all_recons' class = 'submit' } %] [% INCLUDE button element_data = { name = "action", text = text('Save'), value = 'save_recon_set', class = "submit" } %] [% INCLUDE button element_data = { name = "action", text = text('Submit'), value = 'submit_recon_set', disabled = submit_enabled && !check.unapproved_reports ? 'false' : 'true', class = "submit" } %] [% END %] [% IF submitted AND NOT approved AND can_approve %] [% INCLUDE button element_data = { name = "action", text = text('Approve'), value = 'approve', disabled = submit_enabled ? 'false' : 'true', class = "submit" }; INCLUDE button element_data = { name = "action", text = text('Reject'), value = 'reject', class = "submit" } %] [% END %] [% IF NOT approved %] [% INCLUDE button element_data = { name = "action" text = text('Delete') value = 'delete_report' type = 'submit' class = 'submit' } %] [% END %]