250 |
250 |
my @transfer_qty = qw(kivi.SalesPurchase.delivery_order_check_transfer_qty);
|
251 |
251 |
my @req_trans_desc = qw(kivi.SalesPurchase.check_transaction_description) x!!$::instance_conf->get_require_transaction_description_ps;
|
252 |
252 |
my $is_customer = $::form->{vc} eq 'customer';
|
|
253 |
my $isdelivered = t8('This record has already been delivered.');
|
|
254 |
$isdelivered = t8('This record has already been transferred in.') if $::form->{returns};
|
253 |
255 |
|
254 |
256 |
for my $bar ($::request->layout->get('actionbar')) {
|
255 |
257 |
$bar->add(
|
... | ... | |
265 |
267 |
t8('Save'),
|
266 |
268 |
submit => [ '#form', { action => "save" } ],
|
267 |
269 |
checks => [ 'kivi.validate_form' ],
|
268 |
|
disabled => $::form->{delivered} ? t8('This record has already been delivered.') : undef,
|
|
270 |
disabled => $::form->{delivered} ? $isdelivered : undef,
|
269 |
271 |
],
|
270 |
272 |
action => [
|
271 |
273 |
t8('Save as new'),
|
... | ... | |
289 |
291 |
submit => [ '#form', { action => "delete" } ],
|
290 |
292 |
confirm => t8('Do you really want to delete this object?'),
|
291 |
293 |
disabled => !$::form->{id} ? t8('This record has not been saved yet.')
|
292 |
|
: $::form->{delivered} ? t8('This record has already been delivered.')
|
|
294 |
: $::form->{delivered} ? $isdelivered
|
293 |
295 |
: ($::form->{vc} eq 'customer' && !$::instance_conf->get_sales_delivery_order_show_delete) ? t8('Deleting this type of record has been disabled in the configuration.')
|
294 |
296 |
: ($::form->{vc} eq 'vendor' && !$::instance_conf->get_purchase_delivery_order_show_delete) ? t8('Deleting this type of record has been disabled in the configuration.')
|
295 |
297 |
: undef,
|
... | ... | |
301 |
303 |
submit => [ '#form', { action => "transfer_out" } ],
|
302 |
304 |
checks => [ 'kivi.validate_form', @transfer_qty ],
|
303 |
305 |
disabled => $::form->{delivered} ? t8('This record has already been delivered.') : undef,
|
304 |
|
only_if => $is_customer,
|
|
306 |
only_if => $is_customer && !$::form->{returns},
|
305 |
307 |
],
|
306 |
308 |
action => [
|
307 |
309 |
t8('Transfer out via default'),
|
308 |
310 |
submit => [ '#form', { action => "transfer_out_default" } ],
|
309 |
311 |
checks => [ 'kivi.validate_form' ],
|
310 |
312 |
disabled => $::form->{delivered} ? t8('This record has already been delivered.') : undef,
|
311 |
|
only_if => $::instance_conf->get_transfer_default,
|
|
313 |
only_if => $is_customer && !$::form->{returns} && $::instance_conf->get_transfer_default,
|
312 |
314 |
],
|
313 |
315 |
action => [
|
314 |
316 |
t8('Transfer in'),
|
315 |
317 |
submit => [ '#form', { action => "transfer_in" } ],
|
316 |
318 |
checks => [ 'kivi.validate_form', @transfer_qty ],
|
317 |
|
disabled => $::form->{delivered} ? t8('This record has already been delivered.') : undef,
|
318 |
|
only_if => !$is_customer,
|
|
319 |
disabled => !$::form->{id} ? t8('This record has not been saved yet.')
|
|
320 |
: $::form->{delivered} ? $isdelivered
|
|
321 |
: undef,
|
|
322 |
only_if => !$is_customer || $::form->{returns},
|
319 |
323 |
],
|
320 |
324 |
action => [
|
321 |
325 |
t8('Transfer in via default'),
|
322 |
326 |
submit => [ '#form', { action => "transfer_in_default" } ],
|
323 |
327 |
checks => [ 'kivi.validate_form' ],
|
324 |
|
disabled => $::form->{delivered} ? t8('This record has already been delivered.') : undef,
|
325 |
|
only_if => !$is_customer && $::instance_conf->get_transfer_default,
|
|
328 |
disabled => !$::form->{id} ? t8('This record has not been saved yet.')
|
|
329 |
: $::form->{delivered} ? $isdelivered : undef,
|
|
330 |
only_if => (!$is_customer || $::form->{returns}) && $::instance_conf->get_transfer_default,
|
326 |
331 |
],
|
327 |
332 |
], # end of combobox "Transfer out"
|
328 |
333 |
|
... | ... | |
1619 |
1624 |
|
1620 |
1625 |
SL::DB::DeliveryOrder->new(id => $form->{id})->load->update_attributes(delivered => 1);
|
1621 |
1626 |
|
1622 |
|
$form->{callback} = 'do.pl?action=edit&type=purchase_delivery_order&id=' . $form->escape($form->{id});
|
|
1627 |
#$form->{callback} = 'do.pl?action=edit&type=purchase_delivery_order&id=' . $form->escape($form->{id});
|
|
1628 |
set_callback($form->{returns} == 1 ?'sales_delivery_order':'purchase_delivery_order');
|
1623 |
1629 |
$form->redirect;
|
1624 |
1630 |
|
1625 |
1631 |
$main::lxdebug->leave_sub();
|
Retour-Lieferschein aus odyn-erp Ref.: Commit bf9e195c
(Anpassung actionbar)
---
Retourelieferschein: Auslagern statt Einlagern
Ein Retourelieferschein muss Eingelagert werden.
der Fehler entstand da es keinen transfertyp ['cancelled','out'] gibt.
Nun wird eingelagert.
fix #7268
---