Revision bc450f35
Von wulf@coulmann.de vor mehr als 13 Jahren hinzugefügt
SL/OE.pm | ||
---|---|---|
1161 | 1161 |
push @{ $form->{TEMPLATE_ARRAYS}->{description} }, $form->{"description_$i"}; |
1162 | 1162 |
push @{ $form->{TEMPLATE_ARRAYS}->{longdescription} }, $form->{"longdescription_$i"}; |
1163 | 1163 |
push @{ $form->{TEMPLATE_ARRAYS}->{qty} }, $form->format_amount($myconfig, $form->{"qty_$i"}); |
1164 |
push @{ $form->{TEMPLATE_ARRAYS}->{qty_num} }, $form->{"qty_$i"}; |
|
1164 | 1165 |
push @{ $form->{TEMPLATE_ARRAYS}->{ship} }, $form->format_amount($myconfig, $form->{"ship_$i"}); |
1166 |
push @{ $form->{TEMPLATE_ARRAYS}->{ship_num} }, $form->{"ship_$i"}; |
|
1165 | 1167 |
push @{ $form->{TEMPLATE_ARRAYS}->{unit} }, $form->{"unit_$i"}; |
1166 | 1168 |
push @{ $form->{TEMPLATE_ARRAYS}->{bin} }, $form->{"bin_$i"}; |
1167 | 1169 |
push @{ $form->{TEMPLATE_ARRAYS}->{partnotes} }, $form->{"partnotes_$i"}; |
1168 | 1170 |
push @{ $form->{TEMPLATE_ARRAYS}->{serialnumber} }, $form->{"serialnumber_$i"}; |
1169 | 1171 |
push @{ $form->{TEMPLATE_ARRAYS}->{reqdate} }, $form->{"reqdate_$i"}; |
1170 | 1172 |
push @{ $form->{TEMPLATE_ARRAYS}->{sellprice} }, $form->{"sellprice_$i"}; |
1173 |
push @{ $form->{TEMPLATE_ARRAYS}->{sellprice_num} }, $form->parse_amount($myconfig, $form->{"sellprice_$i"}); |
|
1171 | 1174 |
push @{ $form->{TEMPLATE_ARRAYS}->{listprice} }, $form->{"listprice_$i"}; |
1172 | 1175 |
push @{ $form->{TEMPLATE_ARRAYS}->{price_factor} }, $price_factor->{formatted_factor}; |
1173 | 1176 |
push @{ $form->{TEMPLATE_ARRAYS}->{price_factor_name} }, $price_factor->{description}; |
... | ... | |
1186 | 1189 |
$form->{"netprice_$i"} = $form->round_amount($form->{"qty_$i"} ? ($linetotal / $form->{"qty_$i"}) : 0, 2); |
1187 | 1190 |
|
1188 | 1191 |
push @{ $form->{TEMPLATE_ARRAYS}->{netprice} }, ($form->{"netprice_$i"} != 0) ? $form->format_amount($myconfig, $form->{"netprice_$i"}, $decimalplaces) : ''; |
1192 |
push @{ $form->{TEMPLATE_ARRAYS}->{netprice_num} }, ($form->{"netprice_$i"} != 0) ? $form->{"netprice_$i"} : ''; |
|
1189 | 1193 |
|
1190 | 1194 |
$linetotal = ($linetotal != 0) ? $linetotal : ''; |
1191 | 1195 |
|
1192 | 1196 |
push @{ $form->{TEMPLATE_ARRAYS}->{discount} }, ($discount != 0) ? $form->format_amount($myconfig, $discount * -1, 2) : ''; |
1197 |
push @{ $form->{TEMPLATE_ARRAYS}->{discount_num} }, ($discount != 0) ? $discount * -1 : ''; |
|
1193 | 1198 |
push @{ $form->{TEMPLATE_ARRAYS}->{p_discount} }, $form->{"discount_$i"}; |
1194 | 1199 |
|
1195 | 1200 |
$form->{ordtotal} += $linetotal; |
... | ... | |
1203 | 1208 |
|
1204 | 1209 |
if ($form->{"subtotal_$i"} && $subtotal_header && ($subtotal_header != $i)) { |
1205 | 1210 |
push @{ $form->{TEMPLATE_ARRAYS}->{discount_sub} }, $form->format_amount($myconfig, $discount_subtotal, 2); |
1211 |
push @{ $form->{TEMPLATE_ARRAYS}->{discount_sub_num} }, $discount_subtotal; |
|
1206 | 1212 |
push @{ $form->{TEMPLATE_ARRAYS}->{nodiscount_sub} }, $form->format_amount($myconfig, $nodiscount_subtotal, 2); |
1213 |
push @{ $form->{TEMPLATE_ARRAYS}->{nodiscount_sub_num} }, $nodiscount_subtotal; |
|
1207 | 1214 |
|
1208 | 1215 |
$discount_subtotal = 0; |
1209 | 1216 |
$nodiscount_subtotal = 0; |
... | ... | |
1219 | 1226 |
} |
1220 | 1227 |
|
1221 | 1228 |
push @{ $form->{TEMPLATE_ARRAYS}->{linetotal} }, $form->format_amount($myconfig, $linetotal, 2); |
1229 |
push @{ $form->{TEMPLATE_ARRAYS}->{linetotal_num} }, $linetotal; |
|
1230 |
push @{ $form->{TEMPLATE_ARRAYS}->{linetotal_raw} }, $form->format_amount($myconfig, $linetotal_exact, 8); |
|
1231 |
push @{ $form->{TEMPLATE_ARRAYS}->{linetotal_raw_num} }, $linetotal_exact; |
|
1222 | 1232 |
push @{ $form->{TEMPLATE_ARRAYS}->{nodiscount_linetotal} }, $form->format_amount($myconfig, $nodiscount_linetotal, 2); |
1223 |
|
|
1233 |
push @{ $form->{TEMPLATE_ARRAYS}->{nodiscount_linetotal_num} }, $nodiscount_linetotal; |
|
1224 | 1234 |
push(@{ $form->{TEMPLATE_ARRAYS}->{projectnumber} }, $projectnumbers{$form->{"project_id_$i"}}); |
1225 | 1235 |
push(@{ $form->{TEMPLATE_ARRAYS}->{projectdescription} }, $projectdescriptions{$form->{"project_id_$i"}}); |
1226 | 1236 |
|
... | ... | |
1293 | 1303 |
$tax += $taxamount = $form->round_amount($taxaccounts{$item}, 2); |
1294 | 1304 |
|
1295 | 1305 |
push(@{ $form->{TEMPLATE_ARRAYS}->{taxbase} }, $form->format_amount($myconfig, $taxbase{$item}, 2)); |
1306 |
push(@{ $form->{TEMPLATE_ARRAYS}->{taxbase_num} }, $taxbase{$item}); |
|
1296 | 1307 |
push(@{ $form->{TEMPLATE_ARRAYS}->{tax} }, $form->format_amount($myconfig, $taxamount, 2)); |
1308 |
push(@{ $form->{TEMPLATE_ARRAYS}->{tax_num} }, $taxamount); |
|
1297 | 1309 |
push(@{ $form->{TEMPLATE_ARRAYS}->{taxrate} }, $form->format_amount($myconfig, $form->{"${item}_rate"} * 100)); |
1310 |
push(@{ $form->{TEMPLATE_ARRAYS}->{taxrate_num} }, $form->{"${item}_rate"} * 100); |
|
1298 | 1311 |
push(@{ $form->{TEMPLATE_ARRAYS}->{taxdescription} }, $form->{"${item}_description"} . q{ } . 100 * $form->{"${item}_rate"} . q{%}); |
1299 | 1312 |
push(@{ $form->{TEMPLATE_ARRAYS}->{taxnumber} }, $form->{"${item}_taxnumber"}); |
1300 | 1313 |
} |
... | ... | |
1306 | 1319 |
|
1307 | 1320 |
if($form->{taxincluded}) { |
1308 | 1321 |
$form->{subtotal} = $form->format_amount($myconfig, $form->{ordtotal} - $tax, 2); |
1322 |
$form->{subtotal_num} = $form->{ordtotal} - $tax; |
|
1309 | 1323 |
} else { |
1310 | 1324 |
$form->{subtotal} = $form->format_amount($myconfig, $form->{ordtotal}, 2); |
1325 |
$form->{subtotal_num} = $form->{ordtotal}; |
|
1311 | 1326 |
} |
1312 | 1327 |
|
1313 | 1328 |
$form->{ordtotal} = ($form->{taxincluded}) ? $form->{ordtotal} : $form->{ordtotal} + $tax; |
Auch abrufbar als: Unified diff
initial raw_numbers
add subtotal_num, sellprice_num