Revision ec4a82db
Von Tamino Steinert vor 12 Monaten hinzugefügt
SL/Controller/DeliveryOrder.pm | ||
---|---|---|
220 | 220 |
|
221 | 221 |
flash_later('info', $self->type_data->text("saved")); |
222 | 222 |
|
223 |
my @redirect_params = ( |
|
224 |
action => 'edit', |
|
225 |
type => $self->type, |
|
226 |
id => $self->order->id, |
|
227 |
); |
|
223 |
my @redirect_params; |
|
224 |
if ($::form->{back_to_caller}) { |
|
225 |
@redirect_params = $::form->{callback} ? ($::form->{callback}) |
|
226 |
: (controller => 'LoginScreen', action => 'user_login'); |
|
227 |
|
|
228 |
} else { |
|
229 |
@redirect_params = ( |
|
230 |
action => 'edit', |
|
231 |
type => $self->type, |
|
232 |
id => $self->order->id, |
|
233 |
callback => $::form->{callback}, |
|
234 |
); |
|
235 |
} |
|
228 | 236 |
|
229 | 237 |
$self->redirect_to(@redirect_params); |
230 | 238 |
} |
... | ... | |
1143 | 1151 |
->flash("info", t8("Stock transfered")) |
1144 | 1152 |
->run('kivi.ActionBar.setDisabled', '#save_action', |
1145 | 1153 |
t8('This record has already been delivered.')) |
1154 |
->run('kivi.ActionBar.setDisabled', '#save_and_close', |
|
1155 |
t8('This record has already been delivered.')) |
|
1146 | 1156 |
->run('kivi.ActionBar.setDisabled', '#transfer_out_action', |
1147 | 1157 |
t8('The parts for this order have already been transferred')) |
1148 | 1158 |
->run('kivi.ActionBar.setDisabled', '#transfer_out_default_action', |
... | ... | |
1955 | 1965 |
: $self->order->delivered ? t8('This record has already been delivered.') |
1956 | 1966 |
: undef, |
1957 | 1967 |
], |
1968 |
action => [ |
|
1969 |
t8('Save and Close'), |
|
1970 |
id => 'save_and_close', |
|
1971 |
call => [ 'kivi.DeliveryOrder.save', { |
|
1972 |
action => 'save', |
|
1973 |
warn_on_duplicates => $::instance_conf->get_order_warn_duplicate_parts, |
|
1974 |
warn_on_reqdate => $::instance_conf->get_order_warn_no_deliverydate, |
|
1975 |
form_params => [ |
|
1976 |
{ name => 'back_to_caller', value => 1 }, |
|
1977 |
], |
|
1978 |
}], |
|
1979 |
disabled => !$may_edit_create ? t8('You do not have the permissions to access this function.') |
|
1980 |
: $self->order->delivered ? t8('This record has already been delivered.') |
|
1981 |
: undef, |
|
1982 |
], |
|
1958 | 1983 |
action => [ |
1959 | 1984 |
t8('Save as new'), |
1960 | 1985 |
call => [ 'kivi.DeliveryOrder.save', { |
SL/Controller/Reclamation.pm | ||
---|---|---|
211 | 211 |
|
212 | 212 |
flash_later('info', t8('The reclamation has been saved')); |
213 | 213 |
|
214 |
my @redirect_params = ( |
|
215 |
action => 'edit', |
|
216 |
type => $self->type, |
|
217 |
id => $self->reclamation->id, |
|
218 |
); |
|
214 |
my @redirect_params; |
|
215 |
if ($::form->{back_to_caller}) { |
|
216 |
@redirect_params = $::form->{callback} ? ($::form->{callback}) |
|
217 |
: (controller => 'LoginScreen', action => 'user_login'); |
|
218 |
} else { |
|
219 |
@redirect_params = ( |
|
220 |
action => 'edit', |
|
221 |
type => $self->type, |
|
222 |
id => $self->reclamation->id, |
|
223 |
callback => $::form->{callback}, |
|
224 |
); |
|
225 |
} |
|
226 |
|
|
219 | 227 |
$self->redirect_to(@redirect_params); |
220 | 228 |
} |
221 | 229 |
|
... | ... | |
1964 | 1972 |
['kivi.validate_form','#reclamation_form'], |
1965 | 1973 |
], |
1966 | 1974 |
], |
1975 |
action => [ |
|
1976 |
t8('Save and Close'), |
|
1977 |
call => [ 'kivi.Reclamation.save', { |
|
1978 |
action => 'save', |
|
1979 |
warn_on_duplicates => $::instance_conf->get_reclamation_warn_duplicate_parts, |
|
1980 |
warn_on_reqdate => $::instance_conf->get_reclamation_warn_no_reqdate, |
|
1981 |
form_params => [ |
|
1982 |
{ name => 'back_to_caller', value => 1 }, |
|
1983 |
], |
|
1984 |
}], |
|
1985 |
checks => [ |
|
1986 |
['kivi.validate_form','#reclamation_form'], |
|
1987 |
], |
|
1988 |
], |
|
1967 | 1989 |
action => [ |
1968 | 1990 |
t8('Save as new'), |
1969 | 1991 |
call => [ 'kivi.Reclamation.save', { |
bin/mozilla/ap.pl | ||
---|---|---|
1038 | 1038 |
SL::Helper::Flash::flash_later('info', $msg); |
1039 | 1039 |
print $form->redirect_header($add_doc_url); |
1040 | 1040 |
$::dispatcher->end_request; |
1041 |
|
|
1041 |
} elsif ('callback' eq $form->{after_action}) { |
|
1042 |
my $callback = $form->{callback} |
|
1043 |
|| "controller.pl?action=LoginScreen/user_login"; |
|
1044 |
SL::Helper::Flash::flash_later('info', $msg); |
|
1045 |
print $form->redirect_header($callback); |
|
1046 |
$::dispatcher->end_request; |
|
1042 | 1047 |
} else { |
1043 | 1048 |
$form->redirect($msg); |
1044 | 1049 |
} |
... | ... | |
1581 | 1586 |
} else { |
1582 | 1587 |
@post_entries = ( $create_post_action->(t8('Post')) ); |
1583 | 1588 |
} |
1589 |
push @post_entries, $create_post_action->(t8('Post and Close'), 'callback'); |
|
1584 | 1590 |
|
1585 | 1591 |
for my $bar ($::request->layout->get('actionbar')) { |
1586 | 1592 |
$bar->add( |
bin/mozilla/ar.pl | ||
---|---|---|
908 | 908 |
$main::lxdebug->leave_sub(); |
909 | 909 |
} |
910 | 910 |
|
911 |
sub post_and_close { |
|
912 |
$main::lxdebug->enter_sub(); |
|
913 |
$main::auth->assert('ar_transactions'); |
|
914 |
my $locale = $main::locale; |
|
915 |
my $form = $::form; |
|
916 |
|
|
917 |
# inline post |
|
918 |
post(1); |
|
919 |
|
|
920 |
my $callback = $form->{callback} |
|
921 |
|| "controller.pl?action=LoginScreen/user_login"; |
|
922 |
my $msg = $locale->text("AR transaction '#1' posted (ID: #2)", $form->{invnumber}, $form->{id}); |
|
923 |
SL::Helper::Flash::flash_later('info', $msg); |
|
924 |
print $form->redirect_header($callback); |
|
925 |
$::dispatcher->end_request; |
|
926 |
|
|
927 |
$main::lxdebug->leave_sub(); |
|
928 |
} |
|
929 |
|
|
911 | 930 |
sub use_as_new { |
912 | 931 |
$main::lxdebug->enter_sub(); |
913 | 932 |
|
... | ... | |
1522 | 1541 |
: $is_linked_bank_transaction ? t8('This transaction is linked with a bank transaction. Please undo and redo the bank transaction booking if needed.') |
1523 | 1542 |
: undef, |
1524 | 1543 |
], |
1544 |
action => [ |
|
1545 |
t8('Post and Close'), |
|
1546 |
submit => [ '#form', { action => "post_and_close" } ], |
|
1547 |
checks => [ 'kivi.validate_form', 'kivi.AR.check_fields_before_posting' ], |
|
1548 |
disabled => !$may_edit_create ? t8('You must not change this AR transaction.') |
|
1549 |
: $is_closed ? t8('The billing period has already been locked.') |
|
1550 |
: $is_storno ? t8('A canceled invoice cannot be posted.') |
|
1551 |
: ($::form->{id} && $change_never) ? t8('Changing invoices has been disabled in the configuration.') |
|
1552 |
: ($::form->{id} && $change_on_same_day_only) ? t8('Invoices can only be changed on the day they are posted.') |
|
1553 |
: $is_linked_bank_transaction ? t8('This transaction is linked with a bank transaction. Please undo and redo the bank transaction booking if needed.') |
|
1554 |
: undef, |
|
1555 |
], |
|
1525 | 1556 |
action => [ |
1526 | 1557 |
t8('Post Payment'), |
1527 | 1558 |
submit => [ '#form', { action => "post_payment" } ], |
bin/mozilla/gl.pl | ||
---|---|---|
1046 | 1046 |
} else { |
1047 | 1047 |
%post_entry = $create_post_action->(t8('Post')); |
1048 | 1048 |
} |
1049 |
push @{$post_entry{combobox}}, $create_post_action->(t8('Post and Close'), 'callback'); |
|
1049 | 1050 |
|
1050 | 1051 |
for my $bar ($::request->layout->get('actionbar')) { |
1051 | 1052 |
$bar->add( |
... | ... | |
1513 | 1514 |
SL::Helper::Flash::flash_later('info', $msg); |
1514 | 1515 |
print $form->redirect_header($add_doc_url); |
1515 | 1516 |
$::dispatcher->end_request; |
1516 |
|
|
1517 |
} elsif ('callback' eq $form->{after_action}) { |
|
1518 |
my $callback = $form->{callback} |
|
1519 |
|| "controller.pl?action=LoginScreen/user_login"; |
|
1520 |
SL::Helper::Flash::flash_later('info', $msg); |
|
1521 |
print $form->redirect_header($callback); |
|
1522 |
$::dispatcher->end_request; |
|
1517 | 1523 |
} else { |
1518 | 1524 |
$form->{callback} = build_std_url("action=add", "show_details"); |
1519 | 1525 |
$form->redirect($msg); |
bin/mozilla/ir.pl | ||
---|---|---|
346 | 346 |
} else { |
347 | 347 |
@post_entries = ( $create_post_action->(t8('Post')) ); |
348 | 348 |
} |
349 |
push @post_entries, $create_post_action->(t8('Post and Close'), 'callback'); |
|
349 | 350 |
|
350 | 351 |
for my $bar ($::request->layout->get('actionbar')) { |
351 | 352 |
$bar->add( |
... | ... | |
1078 | 1079 |
my $redirect_url; |
1079 | 1080 |
if ('doc-tab' eq $form->{after_action}) { |
1080 | 1081 |
$redirect_url = build_std_url("script=ir.pl", 'action=edit', 'id=' . E($form->{id}), 'fragment=ui-tabs-docs'); |
1082 |
} elsif ('callback' eq $form->{after_action}) { |
|
1083 |
$redirect_url = $form->{callback} |
|
1084 |
|| "controller.pl?action=LoginScreen/user_login"; |
|
1081 | 1085 |
} else { |
1082 | 1086 |
$redirect_url = build_std_url("script=ir.pl", 'action=edit', 'id=' . E($form->{id})); |
1083 | 1087 |
} |
bin/mozilla/is.pl | ||
---|---|---|
427 | 427 |
: $is_linked_bank_transaction ? t8('This transaction is linked with a bank transaction. Please undo and redo the bank transaction booking if needed.') |
428 | 428 |
: undef, |
429 | 429 |
], |
430 |
action => [ |
|
431 |
t8('Post and Close'), |
|
432 |
submit => [ '#form', { action => "post_and_close" } ], |
|
433 |
checks => [ 'kivi.validate_form' ], |
|
434 |
confirm => t8('The invoice is not linked with a sales delivery order. Post anyway?') x !!$warn_unlinked_delivery_order, |
|
435 |
disabled => !$may_edit_create ? t8('You must not change this invoice.') |
|
436 |
: $form->{locked} ? t8('The billing period has already been locked.') |
|
437 |
: $form->{storno} ? t8('A canceled invoice cannot be posted.') |
|
438 |
: ($form->{id} && $change_never) ? t8('Changing invoices has been disabled in the configuration.') |
|
439 |
: ($form->{id} && $change_on_same_day_only) ? t8('Invoices can only be changed on the day they are posted.') |
|
440 |
: $is_linked_bank_transaction ? t8('This transaction is linked with a bank transaction. Please undo and redo the bank transaction booking if needed.') |
|
441 |
: undef, |
|
442 |
], |
|
430 | 443 |
action => [ |
431 | 444 |
t8('Post Payment'), |
432 | 445 |
submit => [ '#form', { action => "post_payment" } ], |
... | ... | |
1245 | 1258 |
$main::lxdebug->leave_sub(); |
1246 | 1259 |
} |
1247 | 1260 |
|
1261 |
sub post_and_close { |
|
1262 |
$main::lxdebug->enter_sub(); |
|
1263 |
my $locale = $main::locale; |
|
1264 |
my $form = $::form; |
|
1265 |
|
|
1266 |
$form->{no_redirect_after_post} = 1; |
|
1267 |
&post(); |
|
1268 |
|
|
1269 |
my $callback = $form->{callback} |
|
1270 |
|| "controller.pl?action=LoginScreen/user_login"; |
|
1271 |
my $msg = $form->{label} . " $form->{invnumber} " . $locale->text('posted!'); |
|
1272 |
SL::Helper::Flash::flash_later('info', $msg); |
|
1273 |
print $form->redirect_header($callback); |
|
1274 |
$::dispatcher->end_request; |
|
1275 |
|
|
1276 |
$main::lxdebug->leave_sub(); |
|
1277 |
} |
|
1278 |
|
|
1248 | 1279 |
sub print_and_post { |
1249 | 1280 |
$main::lxdebug->enter_sub(); |
1250 | 1281 |
|
locale/de/all | ||
---|---|---|
2918 | 2918 |
'Positions' => 'Positionen', |
2919 | 2919 |
'Post' => 'Buchen', |
2920 | 2920 |
'Post Payment' => 'Zahlung buchen', |
2921 |
'Post and Close' => 'Buchen und schließen', |
|
2921 | 2922 |
'Post and new booking' => 'Buchen und neue Buchung', |
2922 | 2923 |
'Post and upload document' => 'Buchen und Dokument hochladen', |
2923 | 2924 |
'Post payments' => 'Zahlungen buchen', |
locale/en/all | ||
---|---|---|
2917 | 2917 |
'Positions' => '', |
2918 | 2918 |
'Post' => '', |
2919 | 2919 |
'Post Payment' => '', |
2920 |
'Post and Close' => '', |
|
2920 | 2921 |
'Post and new booking' => '', |
2921 | 2922 |
'Post and upload document' => '', |
2922 | 2923 |
'Post payments' => '', |
Auch abrufbar als: Unified diff
Speichern/Buchen und schließen zu Belegen hinzufügt