Revision 844a541e
Von Moritz Bunkus vor etwa 3 Jahren hinzugefügt
bin/mozilla/oe.pl | ||
---|---|---|
160 | 160 |
|
161 | 161 |
$form->{show_details} = $::myconfig{show_form_details}; |
162 | 162 |
|
163 |
&order_links;
|
|
163 |
order_links(is_new => 1);
|
|
164 | 164 |
&prepare_order; |
165 | 165 |
&display_form; |
166 | 166 |
|
... | ... | |
245 | 245 |
sub order_links { |
246 | 246 |
$main::lxdebug->enter_sub(); |
247 | 247 |
|
248 |
my (%params) = @_; |
|
249 |
|
|
248 | 250 |
my $form = $main::form; |
249 | 251 |
my %myconfig = %main::myconfig; |
250 | 252 |
my $locale = $main::locale; |
... | ... | |
266 | 268 |
$form->backup_vars(qw(payment_id language_id taxzone_id salesman_id taxincluded cp_id intnotes shipto_id delivery_term_id currency)); |
267 | 269 |
|
268 | 270 |
# get customer / vendor |
269 |
IR->get_vendor(\%myconfig, \%$form) if $form->{type} =~ /(purchase_order|request_quotation)/; |
|
270 |
IS->get_customer(\%myconfig, \%$form) if $form->{type} =~ /sales_(order|quotation)/; |
|
271 |
if ($form->{type} =~ /(purchase_order|request_quotation)/) { |
|
272 |
IR->get_vendor(\%myconfig, \%$form); |
|
273 |
} else { |
|
274 |
IS->get_customer(\%myconfig, \%$form); |
|
275 |
$form->{billing_address_id} = $form->{default_billing_address_id} if $params{is_new}; |
|
276 |
} |
|
271 | 277 |
|
272 | 278 |
$form->restore_vars(qw(payment_id language_id taxzone_id intnotes cp_id shipto_id delivery_term_id)); |
273 | 279 |
$form->restore_vars(qw(currency)) if $form->{id}; |
... | ... | |
775 | 781 |
if (($form->{"previous_${vc}_id"} || $form->{"${vc}_id"}) != $form->{"${vc}_id"}) { |
776 | 782 |
$::form->{salesman_id} = SL::DB::Manager::Employee->current->id if exists $::form->{salesman_id}; |
777 | 783 |
|
778 |
IS->get_customer(\%myconfig, $form) if $vc eq 'customer'; |
|
779 |
IR->get_vendor(\%myconfig, $form) if $vc eq 'vendor'; |
|
784 |
if ($vc eq 'customer') { |
|
785 |
IS->get_customer(\%myconfig, $form); |
|
786 |
$::form->{billing_address_id} = $::form->{default_billing_address_id}; |
|
787 |
} else { |
|
788 |
IR->get_vendor(\%myconfig, $form); |
|
789 |
} |
|
780 | 790 |
} |
781 | 791 |
|
782 | 792 |
if (!$form->{forex}) { # read exchangerate from input field (not hidden) |
... | ... | |
1378 | 1388 |
IS->get_customer(\%myconfig, $form) if $vc eq 'customer'; |
1379 | 1389 |
IR->get_vendor(\%myconfig, $form) if $vc eq 'vendor'; |
1380 | 1390 |
|
1391 |
$::form->{billing_address_id} = $::form->{default_billing_address_id}; |
|
1392 |
|
|
1381 | 1393 |
update(); |
1382 | 1394 |
$::dispatcher->end_request; |
1383 | 1395 |
} |
... | ... | |
1480 | 1492 |
if (($form->{"previous_${vc}_id"} || $form->{"${vc}_id"}) != $form->{"${vc}_id"}) { |
1481 | 1493 |
$::form->{salesman_id} = SL::DB::Manager::Employee->current->id if exists $::form->{salesman_id}; |
1482 | 1494 |
|
1483 |
IS->get_customer(\%myconfig, $form) if $vc eq 'customer'; |
|
1484 |
IR->get_vendor(\%myconfig, $form) if $vc eq 'vendor'; |
|
1495 |
if ($vc eq 'customer') { |
|
1496 |
IS->get_customer(\%myconfig, $form); |
|
1497 |
$::form->{billing_address_id} = $::form->{default_billing_address_id}; |
|
1498 |
|
|
1499 |
} else { |
|
1500 |
IR->get_vendor(\%myconfig, $form); |
|
1501 |
} |
|
1485 | 1502 |
|
1486 | 1503 |
update(); |
1487 | 1504 |
$::dispatcher->end_request; |
Auch abrufbar als: Unified diff
Zusätzliche Rechnungsadressen: in Verkaufsbelegmasken auswählbar