Revision ba57ae4b
Von Sven Schöling vor etwa 3 Jahren hinzugefügt
bin/mozilla/oe.pl | ||
---|---|---|
37 | 37 |
use POSIX qw(strftime); |
38 | 38 |
|
39 | 39 |
use SL::DB::Order; |
40 |
use SL::DB::DeliveryOrder::TypeData; |
|
40 | 41 |
use SL::DO; |
41 | 42 |
use SL::FU; |
42 | 43 |
use SL::OE; |
... | ... | |
387 | 388 |
checks => [ 'kivi.validate_form' ], |
388 | 389 |
only_if => $params{is_sales_ord} || $params{is_pur_ord}, |
389 | 390 |
], |
391 |
action => [ |
|
392 |
t8('Supplier Delivery Order'), |
|
393 |
submit => [ '#form', { action => "delivery_order", type => "supplier_delivery_order" } ], |
|
394 |
disabled => !$form->{id} ? t8('This record has not been saved yet.') : undef, |
|
395 |
checks => [ 'kivi.validate_form' ], |
|
396 |
only_if => $params{is_sales_ord} || $params{is_pur_ord}, |
|
397 |
], |
|
398 |
action => [ |
|
399 |
t8('RMA Delivery Order'), |
|
400 |
submit => [ '#form', { action => "delivery_order", type => "rma_delivery_order" } ], |
|
401 |
disabled => !$form->{id} ? t8('This record has not been saved yet.') : undef, |
|
402 |
checks => [ 'kivi.validate_form' ], |
|
403 |
only_if => $params{is_sales_ord} || $params{is_pur_ord}, |
|
404 |
], |
|
390 | 405 |
action => [ |
391 | 406 |
t8('Invoice'), |
392 | 407 |
submit => [ '#form', { action => "invoice" } ], |
... | ... | |
2008 | 2023 |
|
2009 | 2024 |
$form->mtime_ischanged('oe'); |
2010 | 2025 |
|
2011 |
if ($form->{type} =~ /^sales/) { |
|
2012 |
$main::auth->assert('sales_delivery_order_edit'); |
|
2026 |
if (SL::DB::DeliveryOrder::TypeData::is_valid_type($form->{type})) { |
|
2027 |
$::auth->assert(SL::DB::DeliveryOrder::TypeData::get($form->{type}, "right")); |
|
2028 |
|
|
2029 |
$form->{vc} = SL::DB::DeliveryOrder::TypeData::get3($form->{type}, "properties", "customervendor"); |
|
2030 |
|
|
2031 |
} elsif ($form->{type} =~ /^sales/) { |
|
2032 |
$main::auth->assert('sales_delivery_order'); |
|
2013 | 2033 |
|
2014 | 2034 |
$form->{vc} = 'customer'; |
2015 | 2035 |
$form->{type} = 'sales_delivery_order'; |
... | ... | |
2077 | 2097 |
# fake last empty row |
2078 | 2098 |
$::form->{rowcount}++; |
2079 | 2099 |
|
2100 |
# hack: if a type transition is wanted, handle it here |
|
2101 |
if ($::form->{new_type}) { |
|
2102 |
$::form->{type} = $::form->{new_type}; |
|
2103 |
} |
|
2104 |
|
|
2080 | 2105 |
_update_ship(); |
2081 | 2106 |
} |
2082 | 2107 |
|
Auch abrufbar als: Unified diff
oe: Lieferscheinumwandlungen für Retouren und Beistelllieferscheine