Revision 0b6157e2
Von Jan Büren vor fast 10 Jahren hinzugefügt
SL/DO.pm | ||
---|---|---|
403 | 403 |
name_prefix => 'ic_', |
404 | 404 |
name_postfix => "_$i", |
405 | 405 |
dbh => $dbh); |
406 |
# link order items with doi |
|
407 |
if ($form->{"converted_from_order_orderitems_id_$i"}) { |
|
408 |
RecordLinks->create_links('dbh' => $dbh, |
|
409 |
'mode' => 'ids', |
|
410 |
'from_table' => 'orderitems', |
|
411 |
'from_ids' => $form->{"converted_from_order_orderitems_id_$i"}, |
|
412 |
'to_table' => 'delivery_order_items', |
|
413 |
'to_id' => $form->{"delivery_order_items_id_$i"}, |
|
414 |
); |
|
415 |
delete $form->{"converted_from_order_orderitems_id_$i"}; |
|
416 |
} |
|
406 | 417 |
} |
407 | 418 |
|
408 | 419 |
# 1. search for orphaned dois; processed_dois may be empty (no transfer) TODO: be supersafe and alter same statement for doi and oi |
bin/mozilla/oe.pl | ||
---|---|---|
1893 | 1893 |
|
1894 | 1894 |
# reset |
1895 | 1895 |
delete @{$form}{qw(id subject message cc bcc printed emailed queued creditlimit creditremaining discount tradediscount oldinvtotal closed delivered)}; |
1896 |
delete $form->{"orderitems_id_$_"} for 1 .. $form->{"rowcount"}; |
|
1897 | 1896 |
|
1898 | 1897 |
for my $i (1 .. $form->{rowcount}) { |
1899 | 1898 |
map { $form->{"${_}_${i}"} = $form->parse_amount(\%myconfig, $form->{"${_}_${i}"}) if ($form->{"${_}_${i}"}) } qw(ship qty sellprice listprice lastcost basefactor discount); |
1900 |
$form->{"converted_from_order_orderitems_id_$_"} = $form->{"orderitems_id_$_"} for 1 .. $form->{"rowcount"}; |
|
1899 |
$form->{"converted_from_order_orderitems_id_$i"} = $form->{"orderitems_id_$i"}; |
|
1900 |
delete $form->{"orderitems_id_$i"}; # even if they don't exist in form. cvars checks them before display_row |
|
1901 | 1901 |
} |
1902 | 1902 |
|
1903 | 1903 |
my %old_values = map { $_ => $form->{$_} } qw(customer_id oldcustomer customer vendor_id oldvendor vendor shipto_id); |
Auch abrufbar als: Unified diff
Positionen verknüpfen Auftrag -> Lieferschein