Revision 844a541e
Von Moritz Bunkus vor etwa 3 Jahren hinzugefügt
bin/mozilla/do.pl | ||
---|---|---|
98 | 98 |
$form->{show_details} = $::myconfig{show_form_details}; |
99 | 99 |
$form->{callback} = build_std_url('action=add', 'type', 'vc') unless ($form->{callback}); |
100 | 100 |
|
101 |
order_links(); |
|
101 |
order_links(is_new => 1);
|
|
102 | 102 |
prepare_order(); |
103 | 103 |
display_form(); |
104 | 104 |
|
... | ... | |
168 | 168 |
|
169 | 169 |
check_do_access(); |
170 | 170 |
|
171 |
my %params = @_; |
|
171 | 172 |
my $form = $main::form; |
172 | 173 |
my %myconfig = %main::myconfig; |
173 | 174 |
|
... | ... | |
186 | 187 |
} else { |
187 | 188 |
IS->get_customer(\%myconfig, \%$form); |
188 | 189 |
$form->{discount} = $form->{customer_discount}; |
190 |
$form->{billing_address_id} = $form->{default_billing_address_id} if $params{is_new}; |
|
189 | 191 |
} |
190 | 192 |
|
191 | 193 |
$form->restore_vars(qw(payment_id language_id taxzone_id intnotes cp_id delivery_term_id)); |
... | ... | |
548 | 550 |
if (($form->{"previous_${vc}_id"} || $form->{"${vc}_id"}) != $form->{"${vc}_id"}) { |
549 | 551 |
$::form->{salesman_id} = SL::DB::Manager::Employee->current->id if exists $::form->{salesman_id}; |
550 | 552 |
|
551 |
IS->get_customer(\%myconfig, $form) if $vc eq 'customer'; |
|
552 |
IR->get_vendor(\%myconfig, $form) if $vc eq 'vendor'; |
|
553 |
if ($vc eq 'customer') { |
|
554 |
IS->get_customer(\%myconfig, $form); |
|
555 |
$::form->{billing_address_id} = $::form->{default_billing_address_id}; |
|
556 |
} else { |
|
557 |
IR->get_vendor(\%myconfig, $form); |
|
558 |
} |
|
553 | 559 |
} |
554 | 560 |
|
555 | 561 |
$form->{discount} = $form->{"$form->{vc}_discount"} if defined $form->{"$form->{vc}_discount"}; |
... | ... | |
935 | 941 |
if (($form->{"previous_${vc}_id"} || $form->{"${vc}_id"}) != $form->{"${vc}_id"}) { |
936 | 942 |
$::form->{salesman_id} = SL::DB::Manager::Employee->current->id if exists $::form->{salesman_id}; |
937 | 943 |
|
938 |
IS->get_customer(\%myconfig, $form) if $vc eq 'customer'; |
|
939 |
IR->get_vendor(\%myconfig, $form) if $vc eq 'vendor'; |
|
944 |
if ($vc eq 'customer') { |
|
945 |
IS->get_customer(\%myconfig, $form); |
|
946 |
$::form->{billing_address_id} = $::form->{default_billing_address_id}; |
|
947 |
} else { |
|
948 |
IR->get_vendor(\%myconfig, $form); |
|
949 |
} |
|
940 | 950 |
|
941 | 951 |
update(); |
942 | 952 |
$::dispatcher->end_request; |
Auch abrufbar als: Unified diff
Zusätzliche Rechnungsadressen: in Verkaufsbelegmasken auswählbar