[% USE T8 %] [% USE HTML %] [% USE LxERP %]

[% title %]

[% 'The following transaction contains wrong taxes:' | $T8 %] [% IF problem.data.module == 'ar' %][% 'AR Transaction' | $T8 %] [% ELSIF problem.data.module == 'ap' %][% 'AP Transaction' | $T8 %] [% ELSE %][% 'General Ledger Transaction' | $T8 %][% END %] [% HTML.escape(problem.data.reference) %]

[% 'At the moment the transaction looks like this:' | $T8 %]

[% SET curr_row = 0 %] [% IF problem.acc_trans.credit.entries.size > problem.acc_trans.debit.entries.size %] [% SET order = [ 'credit', 'debit' ] %] [% SET other_side = 'debit' %] [% ELSE %] [% SET order = [ 'debit', 'credit' ] %] [% SET other_side = 'credit' %] [% END %] [% FOREACH idx = order %] [% FOREACH row = problem.acc_trans.$idx.entries %] [% SET curr_row = curr_row + 1 %] [% END %] [% END %]
[% 'Account' | $T8 %] [% 'Debit' | $T8 %] [% 'Credit' | $T8 %] [% 'Taxkey' | $T8 %] [% 'Recorded Tax' | $T8 %] [% 'Expected Tax' | $T8 %]
[% HTML.escape(row.accno) %]--[% HTML.escape(row.chartdescription) %] [% IF idx == 'debit' %][% LxERP.format_amount(row.display_amount, 2) %][% END %] [% IF idx == 'credit' %][% LxERP.format_amount(row.display_amount, 2) %][% END %] [% IF idx != other_side %][% HTML.escape(row.taxdescription) %][% END %] [% IF row.actual_tax %][% LxERP.format_amount(row.actual_tax, 2) %][% END %] [% IF row.expected_tax %][% LxERP.format_amount(row.expected_tax, 2) %][% END %]