Revision 1112515f
Von Werner Hahn vor 2 Monaten hinzugefügt
SL/Controller/DeliveryOrder.pm | ||
---|---|---|
271 | 271 |
$self->action_save(); |
272 | 272 |
} |
273 | 273 |
|
274 |
# close a already saved order (potentially already delivered) |
|
275 |
sub action_close_order { |
|
276 |
my ($self) = @_; |
|
277 |
|
|
278 |
$self->order->update_attributes( |
|
279 |
closed => 1 |
|
280 |
); |
|
281 |
|
|
282 |
$self->js |
|
283 |
->flash("info", t8("The record has been closed.")) |
|
284 |
->run('kivi.ActionBar.setDisabled', '#save_action', |
|
285 |
t8('This record has already been closed.')) |
|
286 |
->run('kivi.ActionBar.setDisabled', '#save_and_close', |
|
287 |
t8('This record has already been closed.')) |
|
288 |
->html('#data-status-line', delivery_order_status_line($self->order)) |
|
289 |
->render |
|
290 |
} |
|
291 |
|
|
274 | 292 |
# print the order |
275 | 293 |
# |
276 | 294 |
# This is called if "print" is pressed in the print dialog. |
... | ... | |
1946 | 1964 |
warn_on_duplicates => $::instance_conf->get_order_warn_duplicate_parts, |
1947 | 1965 |
warn_on_reqdate => $::instance_conf->get_order_warn_no_deliverydate, |
1948 | 1966 |
}], |
1949 |
disabled => !$may_edit_create ? t8('You do not have the permissions to access this function.') |
|
1967 |
disabled => !$may_edit_create ? t8('You do not have the permissions to access this function.')
|
|
1950 | 1968 |
: $self->order->delivered ? t8('This record has already been delivered.') |
1951 |
: undef, |
|
1969 |
: $self->order->closed ? t8('This record has already been closed.') |
|
1970 |
: undef, |
|
1952 | 1971 |
], |
1953 | 1972 |
action => [ |
1954 | 1973 |
t8('Save and Close'), |
... | ... | |
1961 | 1980 |
{ name => 'back_to_caller', value => 1 }, |
1962 | 1981 |
], |
1963 | 1982 |
}], |
1964 |
disabled => !$may_edit_create ? t8('You do not have the permissions to access this function.') |
|
1983 |
disabled => !$may_edit_create ? t8('You do not have the permissions to access this function.')
|
|
1965 | 1984 |
: $self->order->delivered ? t8('This record has already been delivered.') |
1985 |
: $self->order->closed ? t8('This record has already been closed.') |
|
1986 |
: undef, |
|
1987 |
], |
|
1988 |
action => [ |
|
1989 |
t8('Mark as closed'), |
|
1990 |
id => 'close_order', |
|
1991 |
call => [ 'kivi.DeliveryOrder.close_order' ], |
|
1992 |
confirm => t8('This will remove the delivery order from showing as open even if contents are not delivered. Proceed?'), |
|
1993 |
disabled => !$may_edit_create ? t8('You do not have the permissions to access this function.') |
|
1994 |
: !$self->order->id ? t8('This object has not been saved yet.') |
|
1995 |
: $self->order->closed ? t8('This record has already been closed.') |
|
1966 | 1996 |
: undef, |
1967 | 1997 |
], |
1968 | 1998 |
action => [ |
js/kivi.DeliveryOrder.js | ||
---|---|---|
79 | 79 |
$.post("controller.pl", data, kivi.eval_json_result); |
80 | 80 |
}; |
81 | 81 |
|
82 |
ns.close_order = function() { |
|
83 |
let data = []; |
|
84 |
let id = $("#id").val(); |
|
85 |
|
|
86 |
if (!id) { |
|
87 |
alert(kivi.t8('This object has not been saved yet.')); |
|
88 |
return; |
|
89 |
} |
|
90 |
|
|
91 |
data.push({ name: 'id', value: id }); |
|
92 |
data.push({ name: 'action', value: 'DeliveryOrder/close_order' }); |
|
93 |
$.post("controller.pl", data, kivi.eval_json_result); |
|
94 |
} |
|
95 |
|
|
82 | 96 |
ns.show_print_options = function(params) { |
83 | 97 |
if (!ns.check_cv()) return; |
84 | 98 |
|
js/locale/de.js | ||
---|---|---|
185 | 185 |
"There are still transfers not matching the qty of the delivery order. Stock operations can not be changed later. Do you really want to proceed?":"Einige der Lagerbewegungen sind nicht vollständig und Lagerbewegungen können nachträglich nicht mehr verändert werden. Möchten Sie wirklich fortfahren?", |
186 | 186 |
"There is one or more sections for which no part has been assigned yet; therefore creating the new record is not possible yet.":"Es gibt einen oder mehrere Abschnitte ohne Artikelzuweisung; daher kann der neue Beleg noch nicht erstellt werden.", |
187 | 187 |
"This field must not be empty.":"Dieses Feld darf nicht leer sein.", |
188 |
"This object has not been saved yet.":"Das Objekt wurde noch nicht gespeichert.", |
|
188 | 189 |
"This sales order has an active configuration for periodic invoices. If you save then all subsequently created invoices will contain those changes as well, but not those that have already been created. Do you want to continue?":"Dieser Auftrag besitzt eine aktive Konfiguration für wiederkehrende Rechnungen. Wenn Sie jetzt speichern, so werden alle zukünftig hieraus erzeugten Rechnungen die Änderungen enthalten, nicht aber die bereits erzeugten Rechnungen. Möchten Sie speichern?", |
189 | 190 |
"This vendor has already a booking with this invoice number, do you really want to add the same invoice number again?":"Es gibt für diesen Lieferant schon einen Beleg mit dieser Rechnungsnummer. Möchten Sie wirklich eine weitere Buchung mit derselben Rechnungsnummer hinzufügen?", |
190 | 191 |
"Thu":"Do", |
js/locale/en.js | ||
---|---|---|
185 | 185 |
"There are still transfers not matching the qty of the delivery order. Stock operations can not be changed later. Do you really want to proceed?":"", |
186 | 186 |
"There is one or more sections for which no part has been assigned yet; therefore creating the new record is not possible yet.":"", |
187 | 187 |
"This field must not be empty.":"", |
188 |
"This object has not been saved yet.":"", |
|
188 | 189 |
"This sales order has an active configuration for periodic invoices. If you save then all subsequently created invoices will contain those changes as well, but not those that have already been created. Do you want to continue?":"", |
189 | 190 |
"This vendor has already a booking with this invoice number, do you really want to add the same invoice number again?":"", |
190 | 191 |
"Thu":"", |
locale/de/all | ||
---|---|---|
4247 | 4247 |
'The reclamation reason has been deleted.' => 'Der Reklamationsgrund wurde gelöscht.', |
4248 | 4248 |
'The reclamation reason has been saved.' => 'Der Reklamationsgrund wurde gespeichert.', |
4249 | 4249 |
'The reclamation reason is in use and cannot be deleted.' => 'Der Reklamationsgrund ist in Benutzung und kann nicht gelöscht werden.', |
4250 |
'The record has been closed.' => 'Dieser Beleg wurde geschlossen.', |
|
4250 | 4251 |
'The record template \'#1\' has been loaded.' => 'Die Belegvorlage »#1« wurde geladen.', |
4251 | 4252 |
'The record template \'#1\' has been saved.' => 'Die Belegvorlage »#1« wurde gespeichert.', |
4252 | 4253 |
'The report doesn\'t contain entries.' => 'Der Bericht enthält keine Einträge.', |
locale/en/all | ||
---|---|---|
4245 | 4245 |
'The reclamation reason has been deleted.' => '', |
4246 | 4246 |
'The reclamation reason has been saved.' => '', |
4247 | 4247 |
'The reclamation reason is in use and cannot be deleted.' => '', |
4248 |
'The record has been closed.' => '', |
|
4248 | 4249 |
'The record template \'#1\' has been loaded.' => '', |
4249 | 4250 |
'The record template \'#1\' has been saved.' => '', |
4250 | 4251 |
'The report doesn\'t contain entries.' => '', |
Auch abrufbar als: Unified diff
S:C:DeliveryOrder: Methode zum Schließen "Als geschlossen markieren"