Revision 4dbed766
Von Werner Hahn vor 3 Monaten hinzugefügt
- ID 4dbed7662ff0223e05fcff488c0a6c18f7e3e9ec
- Vorgänger bb658827
SL/Controller/DeliveryOrder.pm | ||
---|---|---|
230 | 230 |
my @redirect_params; |
231 | 231 |
if ($::form->{back_to_caller}) { |
232 | 232 |
@redirect_params = $::form->{callback} ? ($::form->{callback}) |
233 |
: (controller => 'LoginScreen', action => 'user_login'); |
|
233 |
: $::form->{close_form} ? (controller => 'LoginScreen', action => 'user_login') |
|
234 |
: ( |
|
235 |
action => 'edit', |
|
236 |
type => $self->type, |
|
237 |
id => $self->order->id, |
|
238 |
callback => $::form->{callback}, |
|
239 |
); |
|
240 |
|
|
234 | 241 |
|
235 | 242 |
} else { |
236 | 243 |
@redirect_params = ( |
... | ... | |
1795 | 1802 |
? SL::DB::Manager::DeliveryOrderItem->get_all(where => [id => $self->item_ids_to_delete]) |
1796 | 1803 |
: undef; |
1797 | 1804 |
|
1805 |
$self->order->closed('T') if $::form->{close_delivery_order}; |
|
1806 |
|
|
1798 | 1807 |
SL::Model::Record->save($self->order, |
1799 | 1808 |
with_validity_token => { |
1800 | 1809 |
scope => SL::DB::ValidityToken::SCOPE_DELIVERY_ORDER_SAVE(), |
... | ... | |
1948 | 1957 |
}], |
1949 | 1958 |
disabled => !$may_edit_create ? t8('You do not have the permissions to access this function.') |
1950 | 1959 |
: $self->order->delivered ? t8('This record has already been delivered.') |
1960 |
: $self->order->closed ? t8('This record has already been closed.') |
|
1951 | 1961 |
: undef, |
1952 | 1962 |
], |
1953 | 1963 |
action => [ |
... | ... | |
1959 | 1969 |
warn_on_reqdate => $::instance_conf->get_order_warn_no_deliverydate, |
1960 | 1970 |
form_params => [ |
1961 | 1971 |
{ name => 'back_to_caller', value => 1 }, |
1972 |
{ name => 'close_form', value => 1 }, |
|
1973 |
], |
|
1974 |
}], |
|
1975 |
disabled => !$may_edit_create ? t8('You do not have the permissions to access this function.') |
|
1976 |
: $self->order->delivered ? t8('This record has already been delivered.') |
|
1977 |
: $self->order->closed ? t8('This record has already been closed.') |
|
1978 |
: undef, |
|
1979 |
], |
|
1980 |
action => [ |
|
1981 |
t8('Mark as closed'), |
|
1982 |
id => 'save', |
|
1983 |
call => [ 'kivi.DeliveryOrder.save', { |
|
1984 |
action => 'save', |
|
1985 |
warn_on_duplicates => $::instance_conf->get_order_warn_duplicate_parts, |
|
1986 |
warn_on_reqdate => $::instance_conf->get_order_warn_no_deliverydate, |
|
1987 |
form_params => [ |
|
1988 |
{ name => 'back_to_caller', value => 1 }, |
|
1989 |
{ name => 'close_delivery_order', value => 1 }, |
|
1962 | 1990 |
], |
1963 | 1991 |
}], |
1964 | 1992 |
disabled => !$may_edit_create ? t8('You do not have the permissions to access this function.') |
1965 | 1993 |
: $self->order->delivered ? t8('This record has already been delivered.') |
1994 |
: $self->order->closed ? t8('This record has already been closed.') |
|
1966 | 1995 |
: undef, |
1967 | 1996 |
], |
1968 | 1997 |
action => [ |
Auch abrufbar als: Unified diff
Lieferschein Speichern u. schliessen "Als geschlossen markieren"
behebt #702
behebt #694
TODO: callback überprüfen Lieferscheinliste hat kein callback