-Example in console of an invoice with 100 Euro at 7% and 100 Euro at 19% with
-tax not included:
-
- my $invoice = invoice(invnumber => '144');
- $invoice->amount
- 226.00000
- $invoice->payment_terms->percent_skonto
- 0.02
- $invoice->skonto_charts
- pp $invoice->skonto_charts
- # $VAR1 = {
- # 'chart_id' => 128,
- # 'skonto_amount' => '2.14',
- # 'skonto_percent' => '47.3451327433627'
- # };
- # $VAR2 = {
- # 'chart_id' => 130,
- # 'skonto_amount' => '2.38',
- # 'skonto_percent' => '52.654867256637'
- # };
-
-C<skonto_charts> always returns positive values (abs) for C<skonto_amount> and
-C<skonto_percent>.
-
-C<skonto_charts> generates one entry for each acc_trans entry. ar and ap
-bookings only have one acc_trans entry for each taxkey (e.g. 7% and 19%). This
-is because all the items are grouped according to the Buchungsgruppen mechanism
-and the totals are written to acc_trans. For is and ir it is possible to have
-several acc_trans entries with the same tax. In this case skonto_charts
-generates a skonto booking for each acc_trans income/expense entry.
-
-In the future this function may also be used to calculate the corrections for
-the income tax.