Revision bc450f35
Von wulf@coulmann.de 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_num} }, $form->{"qty_$i"}; |
|
204 | 205 |
push @{ $form->{TEMPLATE_ARRAYS}->{unit} }, $form->{"unit_$i"}; |
205 | 206 |
push @{ $form->{TEMPLATE_ARRAYS}->{deliverydate_oe} }, $form->{"reqdate_$i"}; |
206 | 207 |
push @{ $form->{TEMPLATE_ARRAYS}->{sellprice} }, $form->{"sellprice_$i"}; |
208 |
push @{ $form->{TEMPLATE_ARRAYS}->{sellprice_num} }, $form->parse_amount($myconfig, $form->{"sellprice_$i"}); |
|
207 | 209 |
push @{ $form->{TEMPLATE_ARRAYS}->{ordnumber_oe} }, $form->{"ordnumber_$i"}; |
208 | 210 |
push @{ $form->{TEMPLATE_ARRAYS}->{transdate_oe} }, $form->{"transdate_$i"}; |
209 | 211 |
push @{ $form->{TEMPLATE_ARRAYS}->{invnumber} }, $form->{"invnumber"}; |
... | ... | |
242 | 244 |
$form->{"netprice_$i"} = $form->round_amount($form->{"qty_$i"} ? ($linetotal / $form->{"qty_$i"}) : 0, 2); |
243 | 245 |
|
244 | 246 |
push @{ $form->{TEMPLATE_ARRAYS}->{netprice} }, ($form->{"netprice_$i"} != 0) ? $form->format_amount($myconfig, $form->{"netprice_$i"}, $decimalplaces) : ''; |
247 |
push @{ $form->{TEMPLATE_ARRAYS}->{netprice_num} }, ($form->{"netprice_$i"} != 0) ? $form->{"netprice_$i"} : ''; |
|
245 | 248 |
|
246 | 249 |
$linetotal = ($linetotal != 0) ? $linetotal : ''; |
247 | 250 |
|
248 | 251 |
push @{ $form->{TEMPLATE_ARRAYS}->{discount} }, ($discount != 0) ? $form->format_amount($myconfig, $discount * -1, 2) : ''; |
252 |
push @{ $form->{TEMPLATE_ARRAYS}->{discount_num} }, ($discount != 0) ? $discount * -1 : ''; |
|
249 | 253 |
push @{ $form->{TEMPLATE_ARRAYS}->{p_discount} }, $form->{"discount_$i"}; |
250 | 254 |
|
251 | 255 |
$form->{total} += $linetotal; |
... | ... | |
259 | 263 |
|
260 | 264 |
if ($form->{"subtotal_$i"} && $subtotal_header && ($subtotal_header != $i)) { |
261 | 265 |
push @{ $form->{TEMPLATE_ARRAYS}->{discount_sub} }, $form->format_amount($myconfig, $discount_subtotal, 2); |
266 |
push @{ $form->{TEMPLATE_ARRAYS}->{discount_sub_num} }, $discount_subtotal; |
|
262 | 267 |
push @{ $form->{TEMPLATE_ARRAYS}->{nodiscount_sub} }, $form->format_amount($myconfig, $nodiscount_subtotal, 2); |
268 |
push @{ $form->{TEMPLATE_ARRAYS}->{nodiscount_sub_num} }, $nodiscount_subtotal; |
|
263 | 269 |
|
264 | 270 |
$discount_subtotal = 0; |
265 | 271 |
$nodiscount_subtotal = 0; |
... | ... | |
275 | 281 |
} |
276 | 282 |
|
277 | 283 |
push @{ $form->{TEMPLATE_ARRAYS}->{linetotal} }, $form->format_amount($myconfig, $linetotal, 2); |
284 |
push @{ $form->{TEMPLATE_ARRAYS}->{linetotal_num} }, $linetotal; |
|
285 |
push @{ $form->{TEMPLATE_ARRAYS}->{linetotal_raw} }, $form->format_amount($myconfig, $linetotal_exact, 8); |
|
286 |
push @{ $form->{TEMPLATE_ARRAYS}->{linetotal_raw_num} }, $linetotal_exact; |
|
278 | 287 |
push @{ $form->{TEMPLATE_ARRAYS}->{nodiscount_linetotal} }, $form->format_amount($myconfig, $nodiscount_linetotal, 2); |
288 |
push @{ $form->{TEMPLATE_ARRAYS}->{nodiscount_linetotal_num} }, $nodiscount_linetotal; |
|
279 | 289 |
|
280 | 290 |
push(@{ $form->{TEMPLATE_ARRAYS}->{projectnumber} }, $projectnumbers{$form->{"project_id_$i"}}); |
281 | 291 |
push(@{ $form->{TEMPLATE_ARRAYS}->{projectdescription} }, $projectdescriptions{$form->{"project_id_$i"}}); |
... | ... | |
368 | 378 |
$tax += $taxamount = $form->round_amount($taxaccounts{$item}, 2); |
369 | 379 |
|
370 | 380 |
push(@{ $form->{TEMPLATE_ARRAYS}->{taxbase} }, $form->format_amount($myconfig, $taxbase{$item}, 2)); |
381 |
push(@{ $form->{TEMPLATE_ARRAYS}->{taxbase_num} }, $taxbase{$item}); |
|
371 | 382 |
push(@{ $form->{TEMPLATE_ARRAYS}->{tax} }, $form->format_amount($myconfig, $taxamount, 2)); |
383 |
push(@{ $form->{TEMPLATE_ARRAYS}->{tax_num} }, $taxamount ); |
|
372 | 384 |
push(@{ $form->{TEMPLATE_ARRAYS}->{taxrate} }, $form->format_amount($myconfig, $form->{"${item}_rate"} * 100)); |
385 |
push(@{ $form->{TEMPLATE_ARRAYS}->{taxrate_num} }, $form->{"${item}_rate"} * 100); |
|
373 | 386 |
push(@{ $form->{TEMPLATE_ARRAYS}->{taxdescription} }, $form->{"${item}_description"} . q{ } . 100 * $form->{"${item}_rate"} . q{%}); |
374 | 387 |
push(@{ $form->{TEMPLATE_ARRAYS}->{taxnumber} }, $form->{"${item}_taxnumber"}); |
375 | 388 |
} |
... | ... | |
389 | 402 |
} |
390 | 403 |
if($form->{taxincluded}) { |
391 | 404 |
$form->{subtotal} = $form->format_amount($myconfig, $form->{total} - $tax, 2); |
405 |
$form->{subtotal_num} = $form->{total} - $tax; |
|
392 | 406 |
} |
393 | 407 |
else { |
394 | 408 |
$form->{subtotal} = $form->format_amount($myconfig, $form->{total}, 2); |
409 |
$form->{subtotal_num} = $form->{total}; |
|
395 | 410 |
} |
396 | 411 |
|
397 | 412 |
$form->{nodiscount_subtotal} = $form->format_amount($myconfig, $form->{nodiscount_total}, 2); |
Auch abrufbar als: Unified diff
initial raw_numbers
add subtotal_num, sellprice_num