Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision c0cc8bb2

Von Rolf Fluehmann vor fast 9 Jahren hinzugefügt

  • ID c0cc8bb220b76219934bee9ac5dd5e8e971ddc65
  • Vorgänger fbbfd3ce
  • Nachfolger 030d9691

added roundings on prints

Unterschiede anzeigen:

SL/IS.pm
$form->{nodiscount} = $form->format_amount($myconfig, $nodiscount, 2);
$form->{yesdiscount} = $form->format_amount($myconfig, $form->{nodiscount_total} - $nodiscount, 2);
$form->{invtotal} = ($form->{taxincluded}) ? $form->{total} : $form->{total} + $tax;
$form->{total} = $form->format_amount($myconfig, $form->{invtotal} - $form->{paid}, 2);
my $grossamount = ($form->{taxincluded}) ? $form->{total} : $form->{total} + $tax;
$form->{invtotal} = $form->round_amount($grossamount, 2, 1);
$form->{rounding} = $form->round_amount(
$form->{invtotal} - $form->round_amount($grossamount, 2),
2
);
$form->{rounding} = $form->format_amount($myconfig, $form->{rounding}, 2);
$form->{total} = $form->format_amount($myconfig, $form->{invtotal} - $form->{paid}, 2);
$form->{invtotal} = $form->format_amount($myconfig, $form->{invtotal}, 2);
$form->{paid} = $form->format_amount($myconfig, $form->{paid}, 2);
SL/OE.pm
$form->{subtotal_nofmt} = $form->{ordtotal};
}
$form->{ordtotal} = ($form->{taxincluded}) ? $form->{ordtotal} : $form->{ordtotal} + $tax;
my $grossamount = ($form->{taxincluded}) ? $form->{ordtotal} : $form->{ordtotal} + $tax;
$form->{ordtotal} = $form->round_amount( $grossamount, 2, 1);
$form->{rounding} = $form->round_amount(
$form->{ordtotal} - $form->round_amount($grossamount, 2),
2
);
# format amounts
$form->{rounding} = $form->format_amount($myconfig, $form->{rounding}, 2);
$form->{quototal} = $form->{ordtotal} = $form->format_amount($myconfig, $form->{ordtotal}, 2);
$form->set_payment_options($myconfig, $form->{$form->{type} =~ /_quotation/ ? 'quodate' : 'orddate'}, $form->{type});
templates/print/RB/invoice.html
<tr valign=bottom>
<td width=10>&nbsp;</td>
<td>
<table width=100%>
<tr>
<td>
......
<table width=100% callspacing=0 cellpadding=0>
<tr>
<td align=right>
<table>
<tr>
<th align=right>Ausgestellt am</th><td width=10>&nbsp;</td><td><%invdate%></td>
</tr>
<tr>
<th align=right>Bezahlbar bis</th><td width=10>&nbsp;</td><td><%duedate%></td>
</tr>
......
<tr>
<th align=right>Nummer</th><td>&nbsp;</td><td><%invnumber%></td></tr>
</tr>
<tr>
<th align=right>Lieferdatum</th><td>&nbsp;</td><td><%deliverydate%></td></tr>
</tr>
......
<br><%city%>
<br><%country%>
</td>
<td><%shiptoname%>
<br><%shiptostreet%>
<br><%shiptozipcode%>
......
<tr>
<td>&nbsp;</td>
</tr>
<tr>
<td>
<table width=100%>
......
<tr>
<td colspan=7><hr noshade></td>
</tr>
<%if taxincluded%>
<tr>
<th colspan=5 align=right>Total</th>
......
</tr>
<%end tax%>
<%if rounding%>
<tr>
<th colspan=5 align=right>Rundung</th>
<td colspan=2 align=right><%rounding%></td>
</tr>
<%end rounding%>
<%if paid%>
<tr>
<th colspan=5 align=right>Bezahlt</th>
......
</tr>
<tr><td>&nbsp;</td></tr>
<tr>
<td>
<table width=100%>
templates/print/RB/sales_order.html
<tr valign=bottom>
<td width=10>&nbsp;</td>
<td>
<table width=100%>
<tr>
<td>
......
<table width=100% callspacing=0 cellpadding=0>
<tr>
<td align=right>
<table>
<tr>
<th align=right>Bestelldatum</th><td width=10>&nbsp;</td><td><%orddate%></td>
</tr>
<tr>
<th align=right>Lieferbar bei</th><td width=10>&nbsp;</td><td><%reqdate%></td>
</tr>
......
<tr>
<th align=right>Bestellnummer</th><td>&nbsp;</td><td><%ordnumber%></td></tr>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
......
<tr>
<td>&nbsp;</td>
</tr>
<tr>
<td>
<table width=100%>
......
<tr>
<td colspan=7><hr noshade></td>
</tr>
<%if taxincluded%>
<tr>
<th colspan=5 align=right>Total</th>
......
</tr>
<%end tax%>
<%if rounding%>
<th colspan=5 align=right>Rundung</th>
<td colspan=2 align=right><%rounding%></td>
<%end rounding%>
<tr>
<td colspan=2>&nbsp;</td>
<td colspan=5><hr noshade></td>
......
</tr>
<tr><td>&nbsp;</td></tr>
<tr>
<td>
<table width=100%>
templates/print/RB/sales_quotation.html
<tr valign=bottom>
<td width=10>&nbsp;</td>
<td>
<table width=100%>
<tr valign=top>
<td>
......
<td colspan=2>
<table width=100% border=1>
<tr>
<th width=17% align=left nowrap>Nummer</th>
<th width=17% align=left>Datum</th>
<th width=17% align=left>G?ltig bis</th>
<th width=17% align=left nowrap>Kontakt</th>
<th width=17% align=left nowrap>Lagerplatz</th>
<th width=15% align=left nowrap>Lieferung mit</th>
</tr>
<tr>
<td><%quonumber%></td>
<td><%quodate%></td>
<td><%reqdate%></td>
<td><%employee%></td>
<td><%shippingpoint%></td>
<td><%shipvia%></td>
</tr>
<th width=17% align=left nowrap>Nummer</th>
<th width=17% align=left>Datum</th>
<th width=17% align=left>G?ltig bis</th>
<th width=17% align=left nowrap>Kontakt</th>
<th width=17% align=left nowrap>Lagerplatz</th>
<th width=15% align=left nowrap>Lieferung mit</th>
</tr>
<tr>
<td><%quonumber%></td>
<td><%quodate%></td>
<td><%reqdate%></td>
<td><%employee%></td>
<td><%shippingpoint%></td>
<td><%shipvia%></td>
</tr>
</table>
</td>
</tr>
......
</tr>
<%end tax%>
<%if rounding%>
<th colspan=6 align=right>Rundung</th>
<td colspan=2 align=right><%rounding%></td>
<%end rounding%>
<tr>
<td colspan=4>&nbsp;</td>
<td colspan=4><hr noshade></td>
templates/webpages/is/form_footer.html
</tr>
[%- END %]
[%- IF rounding %]
<tr>
<th align='right'>[% 'Rounding' | $T8 %]</th>
<td align='right'>[% LxERP.format_amount(rounding, 2) %]</td>
</tr>
[%- END %]
[%# tax %]
[% FOREACH item = taxaccounts_array %]
[% SET description_ref = item _ '_description' %]
......
</tr>
[%- END %]
[%- END %]
[%- IF rounding %]
<tr>
<th align='right'>[% 'Rounding' | $T8 %]</th>
<td align='right'>[% LxERP.format_amount(rounding, 2) %]</td>
</tr>
[%- END %]
<tr>
<th align="right">[% 'Total' | $T8 %]</th>
<td align="right">[% LxERP.format_amount(invtotal, 2) %]</td>
templates/webpages/oe/form_footer.html
<td align='right'>[% LxERP.format_amount(invsubtotal, 2) %]</td>
</tr>
[%- END %]
[% tax %]
[%- IF rounding %]
<tr>
<th align='right'>[% 'Rounding' | $T8 %]</th>
<td align='right'>[% LxERP.format_amount(rounding, 2) %]</td>
</tr>
[%- END %]
[% tax %]
<tr>
<th align="right">[% 'Total' | $T8 %]</th>
<td align="right">[% LxERP.format_amount(invtotal, 2) %]

Auch abrufbar als: Unified diff