Revision 8461199d
Von Moritz Bunkus vor mehr als 13 Jahren hinzugefügt
SL/IS.pm | ||
---|---|---|
201 | 201 |
push @{ $form->{TEMPLATE_ARRAYS}->{description} }, $form->{"description_$i"}; |
202 | 202 |
push @{ $form->{TEMPLATE_ARRAYS}->{longdescription} }, $form->{"longdescription_$i"}; |
203 | 203 |
push @{ $form->{TEMPLATE_ARRAYS}->{qty} }, $form->format_amount($myconfig, $form->{"qty_$i"}); |
204 |
push @{ $form->{TEMPLATE_ARRAYS}->{qty_nofmt} }, $form->{"qty_$i"};
|
|
204 |
push @{ $form->{TEMPLATE_ARRAYS}->{qty_nofmt} }, $form->{"qty_$i"}; |
|
205 | 205 |
push @{ $form->{TEMPLATE_ARRAYS}->{unit} }, $form->{"unit_$i"}; |
206 | 206 |
push @{ $form->{TEMPLATE_ARRAYS}->{deliverydate_oe} }, $form->{"reqdate_$i"}; |
207 | 207 |
push @{ $form->{TEMPLATE_ARRAYS}->{sellprice} }, $form->{"sellprice_$i"}; |
208 |
push @{ $form->{TEMPLATE_ARRAYS}->{sellprice_nofmt} }, $form->parse_amount($myconfig, $form->{"sellprice_$i"});
|
|
208 |
push @{ $form->{TEMPLATE_ARRAYS}->{sellprice_nofmt} }, $form->parse_amount($myconfig, $form->{"sellprice_$i"}); |
|
209 | 209 |
push @{ $form->{TEMPLATE_ARRAYS}->{ordnumber_oe} }, $form->{"ordnumber_$i"}; |
210 | 210 |
push @{ $form->{TEMPLATE_ARRAYS}->{transdate_oe} }, $form->{"transdate_$i"}; |
211 | 211 |
push @{ $form->{TEMPLATE_ARRAYS}->{invnumber} }, $form->{"invnumber"}; |
... | ... | |
243 | 243 |
my $nodiscount_linetotal = $form->round_amount($form->{"qty_$i"} * $sellprice / $price_factor->{factor}, 2); |
244 | 244 |
$form->{"netprice_$i"} = $form->round_amount($form->{"qty_$i"} ? ($linetotal / $form->{"qty_$i"}) : 0, 2); |
245 | 245 |
|
246 |
push @{ $form->{TEMPLATE_ARRAYS}->{netprice} }, ($form->{"netprice_$i"} != 0) ? $form->format_amount($myconfig, $form->{"netprice_$i"}, $decimalplaces) : ''; |
|
247 |
push @{ $form->{TEMPLATE_ARRAYS}->{netprice_nofmt} }, ($form->{"netprice_$i"} != 0) ? $form->{"netprice_$i"} : '';
|
|
246 |
push @{ $form->{TEMPLATE_ARRAYS}->{netprice} }, ($form->{"netprice_$i"} != 0) ? $form->format_amount($myconfig, $form->{"netprice_$i"}, $decimalplaces) : '';
|
|
247 |
push @{ $form->{TEMPLATE_ARRAYS}->{netprice_nofmt} }, ($form->{"netprice_$i"} != 0) ? $form->{"netprice_$i"} : ''; |
|
248 | 248 |
|
249 | 249 |
$linetotal = ($linetotal != 0) ? $linetotal : ''; |
250 | 250 |
|
251 |
push @{ $form->{TEMPLATE_ARRAYS}->{discount} }, ($discount != 0) ? $form->format_amount($myconfig, $discount * -1, 2) : '';
|
|
252 |
push @{ $form->{TEMPLATE_ARRAYS}->{discount_nofmt} }, ($discount != 0) ? $discount * -1 : '';
|
|
253 |
push @{ $form->{TEMPLATE_ARRAYS}->{p_discount} }, $form->{"discount_$i"}; |
|
251 |
push @{ $form->{TEMPLATE_ARRAYS}->{discount} }, ($discount != 0) ? $form->format_amount($myconfig, $discount * -1, 2) : '';
|
|
252 |
push @{ $form->{TEMPLATE_ARRAYS}->{discount_nofmt} }, ($discount != 0) ? $discount * -1 : '';
|
|
253 |
push @{ $form->{TEMPLATE_ARRAYS}->{p_discount} }, $form->{"discount_$i"};
|
|
254 | 254 |
|
255 | 255 |
$form->{total} += $linetotal; |
256 | 256 |
$form->{nodiscount_total} += $nodiscount_linetotal; |
... | ... | |
262 | 262 |
} |
263 | 263 |
|
264 | 264 |
if ($form->{"subtotal_$i"} && $subtotal_header && ($subtotal_header != $i)) { |
265 |
push @{ $form->{TEMPLATE_ARRAYS}->{discount_sub} }, $form->format_amount($myconfig, $discount_subtotal, 2); |
|
266 |
push @{ $form->{TEMPLATE_ARRAYS}->{discount_sub_nofmt} }, $discount_subtotal;
|
|
267 |
push @{ $form->{TEMPLATE_ARRAYS}->{nodiscount_sub} }, $form->format_amount($myconfig, $nodiscount_subtotal, 2); |
|
268 |
push @{ $form->{TEMPLATE_ARRAYS}->{nodiscount_sub_nofmt} }, $nodiscount_subtotal;
|
|
265 |
push @{ $form->{TEMPLATE_ARRAYS}->{discount_sub} }, $form->format_amount($myconfig, $discount_subtotal, 2);
|
|
266 |
push @{ $form->{TEMPLATE_ARRAYS}->{discount_sub_nofmt} }, $discount_subtotal; |
|
267 |
push @{ $form->{TEMPLATE_ARRAYS}->{nodiscount_sub} }, $form->format_amount($myconfig, $nodiscount_subtotal, 2);
|
|
268 |
push @{ $form->{TEMPLATE_ARRAYS}->{nodiscount_sub_nofmt} }, $nodiscount_subtotal; |
|
269 | 269 |
|
270 | 270 |
$discount_subtotal = 0; |
271 | 271 |
$nodiscount_subtotal = 0; |
... | ... | |
280 | 280 |
$nodiscount += $linetotal; |
281 | 281 |
} |
282 | 282 |
|
283 |
push @{ $form->{TEMPLATE_ARRAYS}->{linetotal} }, $form->format_amount($myconfig, $linetotal, 2); |
|
284 |
push @{ $form->{TEMPLATE_ARRAYS}->{linetotal_nofmt} }, $linetotal_exact; |
|
285 |
push @{ $form->{TEMPLATE_ARRAYS}->{nodiscount_linetotal} }, $form->format_amount($myconfig, $nodiscount_linetotal, 2); |
|
286 |
push @{ $form->{TEMPLATE_ARRAYS}->{nodiscount_linetotal_nofmt} }, $nodiscount_linetotal;
|
|
283 |
push @{ $form->{TEMPLATE_ARRAYS}->{linetotal} }, $form->format_amount($myconfig, $linetotal, 2);
|
|
284 |
push @{ $form->{TEMPLATE_ARRAYS}->{linetotal_nofmt} }, $linetotal_exact;
|
|
285 |
push @{ $form->{TEMPLATE_ARRAYS}->{nodiscount_linetotal} }, $form->format_amount($myconfig, $nodiscount_linetotal, 2);
|
|
286 |
push @{ $form->{TEMPLATE_ARRAYS}->{nodiscount_linetotal_nofmt} }, $nodiscount_linetotal; |
|
287 | 287 |
|
288 |
push(@{ $form->{TEMPLATE_ARRAYS}->{projectnumber} }, $projectnumbers{$form->{"project_id_$i"}}); |
|
289 |
push(@{ $form->{TEMPLATE_ARRAYS}->{projectdescription} }, $projectdescriptions{$form->{"project_id_$i"}}); |
|
288 |
push(@{ $form->{TEMPLATE_ARRAYS}->{projectnumber} }, $projectnumbers{$form->{"project_id_$i"}});
|
|
289 |
push(@{ $form->{TEMPLATE_ARRAYS}->{projectdescription} }, $projectdescriptions{$form->{"project_id_$i"}});
|
|
290 | 290 |
|
291 | 291 |
@taxaccounts = split(/ /, $form->{"taxaccounts_$i"}); |
292 | 292 |
$taxrate = 0; |
... | ... | |
376 | 376 |
$tax += $taxamount = $form->round_amount($taxaccounts{$item}, 2); |
377 | 377 |
|
378 | 378 |
push(@{ $form->{TEMPLATE_ARRAYS}->{taxbase} }, $form->format_amount($myconfig, $taxbase{$item}, 2)); |
379 |
push(@{ $form->{TEMPLATE_ARRAYS}->{taxbase_nofmt} }, $taxbase{$item});
|
|
379 |
push(@{ $form->{TEMPLATE_ARRAYS}->{taxbase_nofmt} }, $taxbase{$item}); |
|
380 | 380 |
push(@{ $form->{TEMPLATE_ARRAYS}->{tax} }, $form->format_amount($myconfig, $taxamount, 2)); |
381 |
push(@{ $form->{TEMPLATE_ARRAYS}->{tax_nofmt} }, $taxamount );
|
|
381 |
push(@{ $form->{TEMPLATE_ARRAYS}->{tax_nofmt} }, $taxamount ); |
|
382 | 382 |
push(@{ $form->{TEMPLATE_ARRAYS}->{taxrate} }, $form->format_amount($myconfig, $form->{"${item}_rate"} * 100)); |
383 |
push(@{ $form->{TEMPLATE_ARRAYS}->{taxrate_nofmt} }, $form->{"${item}_rate"} * 100);
|
|
383 |
push(@{ $form->{TEMPLATE_ARRAYS}->{taxrate_nofmt} }, $form->{"${item}_rate"} * 100); |
|
384 | 384 |
push(@{ $form->{TEMPLATE_ARRAYS}->{taxdescription} }, $form->{"${item}_description"} . q{ } . 100 * $form->{"${item}_rate"} . q{%}); |
385 | 385 |
push(@{ $form->{TEMPLATE_ARRAYS}->{taxnumber} }, $form->{"${item}_taxnumber"}); |
386 | 386 |
} |
... | ... | |
399 | 399 |
} |
400 | 400 |
} |
401 | 401 |
if($form->{taxincluded}) { |
402 |
$form->{subtotal} = $form->format_amount($myconfig, $form->{total} - $tax, 2); |
|
402 |
$form->{subtotal} = $form->format_amount($myconfig, $form->{total} - $tax, 2);
|
|
403 | 403 |
$form->{subtotal_nofmt} = $form->{total} - $tax; |
404 | 404 |
} |
405 | 405 |
else { |
406 |
$form->{subtotal} = $form->format_amount($myconfig, $form->{total}, 2); |
|
406 |
$form->{subtotal} = $form->format_amount($myconfig, $form->{total}, 2);
|
|
407 | 407 |
$form->{subtotal_nofmt} = $form->{total}; |
408 | 408 |
} |
409 | 409 |
|
Auch abrufbar als: Unified diff
Kosmetik