Revision ec4a82db
Von Tamino Steinert vor mehr als 1 Jahr hinzugefügt
SL/Controller/DeliveryOrder.pm | ||
---|---|---|
|
||
flash_later('info', $self->type_data->text("saved"));
|
||
|
||
my @redirect_params = (
|
||
action => 'edit',
|
||
type => $self->type,
|
||
id => $self->order->id,
|
||
);
|
||
my @redirect_params;
|
||
if ($::form->{back_to_caller}) {
|
||
@redirect_params = $::form->{callback} ? ($::form->{callback})
|
||
: (controller => 'LoginScreen', action => 'user_login');
|
||
|
||
} else {
|
||
@redirect_params = (
|
||
action => 'edit',
|
||
type => $self->type,
|
||
id => $self->order->id,
|
||
callback => $::form->{callback},
|
||
);
|
||
}
|
||
|
||
$self->redirect_to(@redirect_params);
|
||
}
|
||
... | ... | |
->flash("info", t8("Stock transfered"))
|
||
->run('kivi.ActionBar.setDisabled', '#save_action',
|
||
t8('This record has already been delivered.'))
|
||
->run('kivi.ActionBar.setDisabled', '#save_and_close',
|
||
t8('This record has already been delivered.'))
|
||
->run('kivi.ActionBar.setDisabled', '#transfer_out_action',
|
||
t8('The parts for this order have already been transferred'))
|
||
->run('kivi.ActionBar.setDisabled', '#transfer_out_default_action',
|
||
... | ... | |
: $self->order->delivered ? t8('This record has already been delivered.')
|
||
: undef,
|
||
],
|
||
action => [
|
||
t8('Save and Close'),
|
||
id => 'save_and_close',
|
||
call => [ 'kivi.DeliveryOrder.save', {
|
||
action => 'save',
|
||
warn_on_duplicates => $::instance_conf->get_order_warn_duplicate_parts,
|
||
warn_on_reqdate => $::instance_conf->get_order_warn_no_deliverydate,
|
||
form_params => [
|
||
{ name => 'back_to_caller', value => 1 },
|
||
],
|
||
}],
|
||
disabled => !$may_edit_create ? t8('You do not have the permissions to access this function.')
|
||
: $self->order->delivered ? t8('This record has already been delivered.')
|
||
: undef,
|
||
],
|
||
action => [
|
||
t8('Save as new'),
|
||
call => [ 'kivi.DeliveryOrder.save', {
|
SL/Controller/Reclamation.pm | ||
---|---|---|
|
||
flash_later('info', t8('The reclamation has been saved'));
|
||
|
||
my @redirect_params = (
|
||
action => 'edit',
|
||
type => $self->type,
|
||
id => $self->reclamation->id,
|
||
);
|
||
my @redirect_params;
|
||
if ($::form->{back_to_caller}) {
|
||
@redirect_params = $::form->{callback} ? ($::form->{callback})
|
||
: (controller => 'LoginScreen', action => 'user_login');
|
||
} else {
|
||
@redirect_params = (
|
||
action => 'edit',
|
||
type => $self->type,
|
||
id => $self->reclamation->id,
|
||
callback => $::form->{callback},
|
||
);
|
||
}
|
||
|
||
$self->redirect_to(@redirect_params);
|
||
}
|
||
|
||
... | ... | |
['kivi.validate_form','#reclamation_form'],
|
||
],
|
||
],
|
||
action => [
|
||
t8('Save and Close'),
|
||
call => [ 'kivi.Reclamation.save', {
|
||
action => 'save',
|
||
warn_on_duplicates => $::instance_conf->get_reclamation_warn_duplicate_parts,
|
||
warn_on_reqdate => $::instance_conf->get_reclamation_warn_no_reqdate,
|
||
form_params => [
|
||
{ name => 'back_to_caller', value => 1 },
|
||
],
|
||
}],
|
||
checks => [
|
||
['kivi.validate_form','#reclamation_form'],
|
||
],
|
||
],
|
||
action => [
|
||
t8('Save as new'),
|
||
call => [ 'kivi.Reclamation.save', {
|
bin/mozilla/ap.pl | ||
---|---|---|
SL::Helper::Flash::flash_later('info', $msg);
|
||
print $form->redirect_header($add_doc_url);
|
||
$::dispatcher->end_request;
|
||
|
||
} elsif ('callback' eq $form->{after_action}) {
|
||
my $callback = $form->{callback}
|
||
|| "controller.pl?action=LoginScreen/user_login";
|
||
SL::Helper::Flash::flash_later('info', $msg);
|
||
print $form->redirect_header($callback);
|
||
$::dispatcher->end_request;
|
||
} else {
|
||
$form->redirect($msg);
|
||
}
|
||
... | ... | |
} else {
|
||
@post_entries = ( $create_post_action->(t8('Post')) );
|
||
}
|
||
push @post_entries, $create_post_action->(t8('Post and Close'), 'callback');
|
||
|
||
for my $bar ($::request->layout->get('actionbar')) {
|
||
$bar->add(
|
bin/mozilla/ar.pl | ||
---|---|---|
$main::lxdebug->leave_sub();
|
||
}
|
||
|
||
sub post_and_close {
|
||
$main::lxdebug->enter_sub();
|
||
$main::auth->assert('ar_transactions');
|
||
my $locale = $main::locale;
|
||
my $form = $::form;
|
||
|
||
# inline post
|
||
post(1);
|
||
|
||
my $callback = $form->{callback}
|
||
|| "controller.pl?action=LoginScreen/user_login";
|
||
my $msg = $locale->text("AR transaction '#1' posted (ID: #2)", $form->{invnumber}, $form->{id});
|
||
SL::Helper::Flash::flash_later('info', $msg);
|
||
print $form->redirect_header($callback);
|
||
$::dispatcher->end_request;
|
||
|
||
$main::lxdebug->leave_sub();
|
||
}
|
||
|
||
sub use_as_new {
|
||
$main::lxdebug->enter_sub();
|
||
|
||
... | ... | |
: $is_linked_bank_transaction ? t8('This transaction is linked with a bank transaction. Please undo and redo the bank transaction booking if needed.')
|
||
: undef,
|
||
],
|
||
action => [
|
||
t8('Post and Close'),
|
||
submit => [ '#form', { action => "post_and_close" } ],
|
||
checks => [ 'kivi.validate_form', 'kivi.AR.check_fields_before_posting' ],
|
||
disabled => !$may_edit_create ? t8('You must not change this AR transaction.')
|
||
: $is_closed ? t8('The billing period has already been locked.')
|
||
: $is_storno ? t8('A canceled invoice cannot be posted.')
|
||
: ($::form->{id} && $change_never) ? t8('Changing invoices has been disabled in the configuration.')
|
||
: ($::form->{id} && $change_on_same_day_only) ? t8('Invoices can only be changed on the day they are posted.')
|
||
: $is_linked_bank_transaction ? t8('This transaction is linked with a bank transaction. Please undo and redo the bank transaction booking if needed.')
|
||
: undef,
|
||
],
|
||
action => [
|
||
t8('Post Payment'),
|
||
submit => [ '#form', { action => "post_payment" } ],
|
bin/mozilla/gl.pl | ||
---|---|---|
} else {
|
||
%post_entry = $create_post_action->(t8('Post'));
|
||
}
|
||
push @{$post_entry{combobox}}, $create_post_action->(t8('Post and Close'), 'callback');
|
||
|
||
for my $bar ($::request->layout->get('actionbar')) {
|
||
$bar->add(
|
||
... | ... | |
SL::Helper::Flash::flash_later('info', $msg);
|
||
print $form->redirect_header($add_doc_url);
|
||
$::dispatcher->end_request;
|
||
|
||
} elsif ('callback' eq $form->{after_action}) {
|
||
my $callback = $form->{callback}
|
||
|| "controller.pl?action=LoginScreen/user_login";
|
||
SL::Helper::Flash::flash_later('info', $msg);
|
||
print $form->redirect_header($callback);
|
||
$::dispatcher->end_request;
|
||
} else {
|
||
$form->{callback} = build_std_url("action=add", "show_details");
|
||
$form->redirect($msg);
|
bin/mozilla/ir.pl | ||
---|---|---|
} else {
|
||
@post_entries = ( $create_post_action->(t8('Post')) );
|
||
}
|
||
push @post_entries, $create_post_action->(t8('Post and Close'), 'callback');
|
||
|
||
for my $bar ($::request->layout->get('actionbar')) {
|
||
$bar->add(
|
||
... | ... | |
my $redirect_url;
|
||
if ('doc-tab' eq $form->{after_action}) {
|
||
$redirect_url = build_std_url("script=ir.pl", 'action=edit', 'id=' . E($form->{id}), 'fragment=ui-tabs-docs');
|
||
} elsif ('callback' eq $form->{after_action}) {
|
||
$redirect_url = $form->{callback}
|
||
|| "controller.pl?action=LoginScreen/user_login";
|
||
} else {
|
||
$redirect_url = build_std_url("script=ir.pl", 'action=edit', 'id=' . E($form->{id}));
|
||
}
|
bin/mozilla/is.pl | ||
---|---|---|
: $is_linked_bank_transaction ? t8('This transaction is linked with a bank transaction. Please undo and redo the bank transaction booking if needed.')
|
||
: undef,
|
||
],
|
||
action => [
|
||
t8('Post and Close'),
|
||
submit => [ '#form', { action => "post_and_close" } ],
|
||
checks => [ 'kivi.validate_form' ],
|
||
confirm => t8('The invoice is not linked with a sales delivery order. Post anyway?') x !!$warn_unlinked_delivery_order,
|
||
disabled => !$may_edit_create ? t8('You must not change this invoice.')
|
||
: $form->{locked} ? t8('The billing period has already been locked.')
|
||
: $form->{storno} ? t8('A canceled invoice cannot be posted.')
|
||
: ($form->{id} && $change_never) ? t8('Changing invoices has been disabled in the configuration.')
|
||
: ($form->{id} && $change_on_same_day_only) ? t8('Invoices can only be changed on the day they are posted.')
|
||
: $is_linked_bank_transaction ? t8('This transaction is linked with a bank transaction. Please undo and redo the bank transaction booking if needed.')
|
||
: undef,
|
||
],
|
||
action => [
|
||
t8('Post Payment'),
|
||
submit => [ '#form', { action => "post_payment" } ],
|
||
... | ... | |
$main::lxdebug->leave_sub();
|
||
}
|
||
|
||
sub post_and_close {
|
||
$main::lxdebug->enter_sub();
|
||
my $locale = $main::locale;
|
||
my $form = $::form;
|
||
|
||
$form->{no_redirect_after_post} = 1;
|
||
&post();
|
||
|
||
my $callback = $form->{callback}
|
||
|| "controller.pl?action=LoginScreen/user_login";
|
||
my $msg = $form->{label} . " $form->{invnumber} " . $locale->text('posted!');
|
||
SL::Helper::Flash::flash_later('info', $msg);
|
||
print $form->redirect_header($callback);
|
||
$::dispatcher->end_request;
|
||
|
||
$main::lxdebug->leave_sub();
|
||
}
|
||
|
||
sub print_and_post {
|
||
$main::lxdebug->enter_sub();
|
||
|
locale/de/all | ||
---|---|---|
'Positions' => 'Positionen',
|
||
'Post' => 'Buchen',
|
||
'Post Payment' => 'Zahlung buchen',
|
||
'Post and Close' => 'Buchen und schließen',
|
||
'Post and new booking' => 'Buchen und neue Buchung',
|
||
'Post and upload document' => 'Buchen und Dokument hochladen',
|
||
'Post payments' => 'Zahlungen buchen',
|
locale/en/all | ||
---|---|---|
'Positions' => '',
|
||
'Post' => '',
|
||
'Post Payment' => '',
|
||
'Post and Close' => '',
|
||
'Post and new booking' => '',
|
||
'Post and upload document' => '',
|
||
'Post payments' => '',
|
Auch abrufbar als: Unified diff
Speichern/Buchen und schließen zu Belegen hinzufügt