checks => [ @req_trans_desc ],
disabled => !$form->{id} && $form->{locked} ? t8('The billing period has already been locked.') : undef,
],
+ action => [ t8('Print and Post'),
+ call => [ 'kivi.SalesPurchase.show_print_dialog', $form->{id} ? 'print' : 'print_and_post' ],
+ checks => [ @req_trans_desc ],
+ disabled => $form->{id} ? t8('This invoice has already been posted.') : undef,,
+ ],
action => [ t8('E Mail'),
call => [ 'kivi.SalesPurchase.show_email_dialog' ],
checks => [ @req_trans_desc ],
if ($form->{resubmit} && ($form->{format} eq "html")) {
$dispatch_to_popup = "window.open('about:blank','Beleg'); document.oe.target = 'Beleg';";
$dispatch_to_popup .= "document.do.submit();";
- } elsif ($form->{resubmit}) {
+ } elsif ($form->{resubmit} && $form->{action_print}) {
# emulate click for resubmitting actions
- $dispatch_to_popup = "document.oe.${_}.click(); " for grep { /^action_/ } keys %$form;
+ $dispatch_to_popup = "kivi.SalesPurchase.show_print_dialog(); kivi.SalesPurchase.print_record();";
} elsif ($creditwarning) {
$::request->{layout}->add_javascripts_inline("alert('$credittext');");
}
'Pricegroups' => 'Preisgruppen',
'Prices' => 'Preise',
'Print' => 'Drucken',
+ 'Print and Post' => 'Drucken und Buchen',
'Print automatically' => 'Automatisch ausdrucken',
'Print both sided' => 'Beidseitig ausdrucken',
'Print delivery orders' => 'Drucke Lieferscheine',
[% IF resubmit && is_format_html %]
window.open('about:blank','Beleg');
document.invoice.target = 'Beleg';
- $('#action_print').click();
+ kivi.SalesPurchase.show_print_dialog();
+ kivi.SalesPurchase.print_record();
[% ELSIF resubmit %]
- $('#action_print').click();
+ kivi.SalesPurchase.show_print_dialog();
+ kivi.SalesPurchase.print_record();
[% ELSIF creditwarning != '' %]
alert('[% 'Credit Limit exceeded!!!' | $T8 %]');
[% ELSE %]