X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Foe.pl;h=3ee71e67f548c995b1a0f08e0f374de549c882a6;hb=1f6a2920746912f82410c5855c15b2f6e6c434f9;hp=883507aa9c5a563a65e642954f4e4d804268b59c;hpb=e0e3eee4eb59b7d6fbe17fe9ad12167b6b8a388b;p=kivitendo-erp.git diff --git a/bin/mozilla/oe.pl b/bin/mozilla/oe.pl index 883507aa9..3ee71e67f 100644 --- a/bin/mozilla/oe.pl +++ b/bin/mozilla/oe.pl @@ -434,14 +434,17 @@ sub form_header { $form->{javascript} .= qq||; $form->header; - + if ($form->{CFDD_shipto} && $form->{CFDD_shipto_id} ) { + $form->{shipto_id} = $form->{CFDD_shipto_id}; + } $TMPL_VAR{HIDDENS} = [ map { name => $_, value => $form->{$_} }, qw(id action type vc formname media format proforma queued printed emailed title creditlimit creditremaining tradediscount business max_dunning_level dunning_amount shiptoname shiptostreet shiptozipcode - shiptocity shiptocountry shiptocontact shiptophone shiptofax + CFDD_shipto shipto_id CFDD_shipto_id shiptocity shiptocountry shiptocontact shiptophone shiptofax shiptodepartment_1 shiptodepartment_2 shiptoemail shiptocp_gender - message email subject cc bcc taxpart taxservice taxaccounts cursor_fokus), + message email subject cc bcc taxpart taxservice taxaccounts cursor_fokus + show_details), @custom_hiddens, map { $_.'_rate', $_.'_description', $_.'_taxnumber' } split / /, $form->{taxaccounts} ]; # deleted: discount @@ -1669,6 +1672,7 @@ sub check_for_direct_delivery_yes { delete @{$form}{grep /^shipto/, keys %{ $form }}; map { s/^CFDD_//; $form->{$_} = $form->{"CFDD_${_}"} } grep /^CFDD_/, keys %{ $form }; $form->{shipto} = 1; + $form->{CFDD_shipto} = 1; purchase_order(); $main::lxdebug->leave_sub(); } @@ -1682,6 +1686,7 @@ sub check_for_direct_delivery_no { $form->{direct_delivery_checked} = 1; delete @{$form}{grep /^shipto/, keys %{ $form }}; + $form->{CFDD_shipto} = 0; purchase_order(); $main::lxdebug->leave_sub(); @@ -2068,7 +2073,9 @@ sub _oe_remove_delivered_or_billed_rows { next if $ord_quot->is_sales != $record->is_sales; foreach my $item (@{ $record->items }) { - $handled_base_qtys{ $item->parts_id } += $item->qty * $item->unit_obj->base_factor; + my $key = $item->parts_id; + $key .= ':' . $item->serialnumber if $item->serialnumber; + $handled_base_qtys{$key} += $item->qty * $item->unit_obj->base_factor; } }