ar.transdate, ar.duedate, ar.customer_id,
ar.invnumber, ar.ordnumber,
ar.amount, ar.netamount, ar.paid,
- ar.amount - ar.paid AS open_amount
+ ar.amount - ar.paid AS open_amount,
+ ar.amount - ar.paid + da.fee + da.interest AS linetotal
FROM dunning da
LEFT JOIN dunning_config dcfg ON (dcfg.id = da.dunning_config_id)
map({ $form->{"dn_$_"} = []; } keys(%{$ref}));
$first = 0;
}
- map { $ref->{$_} = $form->format_amount($myconfig, $ref->{$_}, 2) } qw(amount netamount paid open_amount fee interest);
+ map { $ref->{$_} = $form->format_amount($myconfig, $ref->{$_}, 2) } qw(amount netamount paid open_amount fee interest linetotal);
map { $form->{$_} = $ref->{$_} } keys %$ref;
map { push @{ $form->{"dn_$_"} }, $ref->{$_}} keys %$ref;
}
</tr>
<tr>
<td><code>dn_fee</code></td>
- <td>Kummulative Mahngebühr (ist die gleiche wie für die ganze Mahnung, da die Gebühr nur einmal pro Mahnung erhoben wird)</td>
+ <td>Kummulative Mahngebühr</td>
</tr>
<tr>
<td><code>dn_interest</code></td>
<td><code>dn_invnumber</code></td>
<td>Rechnungsnummer</td>
</tr>
+ <tr>
+ <td><code>dn_linetotal</code></td>
+ <td>Noch zu zahlender Betrag (ergibt sich aus <code>dn_open_amount + dn_fee + dn_interest</code>)</td>
+ </tr>
<tr>
<td><code>dn_netamount</code></td>
<td>Rechnungssumme (netto)</td>