Revision 8a8629cf
Von Moritz Bunkus vor fast 8 Jahren hinzugefügt
bin/mozilla/dn.pl | ||
---|---|---|
105 | 105 |
$form->{SHOW_DEPARTMENT_SELECTION} = $form->{all_departments} && scalar @{ $form->{all_departments} || [] }; |
106 | 106 |
|
107 | 107 |
$form->{title} = $locale->text('Start Dunning Process'); |
108 |
|
|
109 |
setup_dn_add_action_bar(); |
|
108 | 110 |
$form->header(); |
109 | 111 |
|
110 | 112 |
print $form->parse_html_template("dunning/add"); |
... | ... | |
150 | 152 |
'no_html' => 1, |
151 | 153 |
'no_opendocument' => 1,); |
152 | 154 |
|
153 |
$::request->layout->add_javascripts("kivi.Dunning.js");
|
|
155 |
setup_dn_show_invoices_action_bar();
|
|
154 | 156 |
$form->header(); |
155 | 157 |
print $form->parse_html_template("dunning/show_invoices"); |
156 | 158 |
|
... | ... | |
307 | 309 |
|
308 | 310 |
$form->{title} = $locale->text('Dunnings'); |
309 | 311 |
|
312 |
setup_dn_search_action_bar(); |
|
310 | 313 |
$form->header(); |
311 | 314 |
|
312 | 315 |
print $form->parse_html_template("dunning/search"); |
... | ... | |
449 | 452 |
|
450 | 453 |
$report->set_options_from_form(); |
451 | 454 |
|
452 |
$::request->layout->add_javascripts("kivi.Dunning.js");
|
|
453 |
$report->generate_with_headers(); |
|
455 |
setup_dn_show_dunning_action_bar();
|
|
456 |
$report->generate_with_headers(action_bar => 1);
|
|
454 | 457 |
|
455 | 458 |
$main::lxdebug->leave_sub(); |
456 | 459 |
|
... | ... | |
559 | 562 |
|
560 | 563 |
$::form->error($::locale->text('No action defined.')); |
561 | 564 |
} |
565 |
|
|
566 |
sub setup_dn_add_action_bar { |
|
567 |
my %params = @_; |
|
568 |
|
|
569 |
for my $bar ($::request->layout->get('actionbar')) { |
|
570 |
$bar->add( |
|
571 |
action => [ |
|
572 |
t8('Continue'), |
|
573 |
submit => [ '#form', { action => "show_invoices" } ], |
|
574 |
accesskey => 'enter', |
|
575 |
], |
|
576 |
); |
|
577 |
} |
|
578 |
} |
|
579 |
|
|
580 |
sub setup_dn_show_invoices_action_bar { |
|
581 |
my %params = @_; |
|
582 |
|
|
583 |
for my $bar ($::request->layout->get('actionbar')) { |
|
584 |
$bar->add( |
|
585 |
action => [ |
|
586 |
t8('Continue'), |
|
587 |
submit => [ '#form', { action => "save_dunning" } ], |
|
588 |
checks => [ [ 'kivi.check_if_entries_selected', '[name^=active_]' ] ], |
|
589 |
accesskey => 'enter', |
|
590 |
only_once => 1, |
|
591 |
], |
|
592 |
); |
|
593 |
} |
|
594 |
} |
|
595 |
|
|
596 |
sub setup_dn_search_action_bar { |
|
597 |
my %params = @_; |
|
598 |
|
|
599 |
for my $bar ($::request->layout->get('actionbar')) { |
|
600 |
$bar->add( |
|
601 |
action => [ |
|
602 |
t8('Continue'), |
|
603 |
submit => [ '#form', { action => "show_dunning" } ], |
|
604 |
accesskey => 'enter', |
|
605 |
], |
|
606 |
); |
|
607 |
} |
|
608 |
} |
|
609 |
|
|
610 |
sub setup_dn_show_dunning_action_bar { |
|
611 |
my %params = @_; |
|
612 |
|
|
613 |
for my $bar ($::request->layout->get('actionbar')) { |
|
614 |
$bar->add( |
|
615 |
action => [ |
|
616 |
t8('Print'), |
|
617 |
submit => [ '#form', { action => "print_multiple" } ], |
|
618 |
checks => [ [ 'kivi.check_if_entries_selected', '[name^=selected_]' ] ], |
|
619 |
accesskey => 'enter', |
|
620 |
], |
|
621 |
|
|
622 |
action => [ |
|
623 |
t8('Delete'), |
|
624 |
submit => [ '#form', { action => "delete" } ], |
|
625 |
checks => [ [ 'kivi.check_if_entries_selected', '[name^=selected_]' ] ], |
|
626 |
confirm => $::locale->text('This resets the dunning process for the selected invoices. Posted dunning invoices will not be changed!'), |
|
627 |
], |
|
628 |
); |
|
629 |
} |
|
630 |
} |
|
631 |
|
|
562 | 632 |
# end of main |
js/kivi.Dunning.js | ||
---|---|---|
1 | 1 |
namespace('kivi.Dunning', function(ns) { |
2 |
ns.check_invoice_selection = function() { |
|
3 |
if ($('[name^=active_]:checked').length > 0) |
|
4 |
return true; |
|
5 |
|
|
6 |
alert(kivi.t8('No invoices have been selected.')); |
|
7 |
return false; |
|
8 |
}; |
|
2 |
"use strict"; |
|
9 | 3 |
|
10 | 4 |
ns.enable_disable_language_id = function() { |
11 | 5 |
$('select[name="language_id"]').prop('disabled', !$('#force_lang').prop('checked')); |
locale/de/all | ||
---|---|---|
2969 | 2969 |
'The document has been changed by another user. No mail was sent. Please reopen it in another window and copy the changes to the new window' => 'Die Daten wurden bereits von einem anderen Benutzer verändert. Deshalb ist das Dokument ungültig und es wurde keine E-Mail verschickt. Bitte öffnen Sie das Dokument erneut in einem extra Fenster und übertragen Sie die Daten', |
2970 | 2970 |
'The document has been changed by another user. Please reopen it in another window and copy the changes to the new window' => 'Die Daten wurden bereits von einem anderen Benutzer verändert. Deshalb ist das Dokument ungültig. Bitte öffnen Sie das Dokument erneut in einem extra Fenster und übertragen Sie die Daten', |
2971 | 2971 |
'The documents have been sent to the printer \'#1\'.' => 'Die Dokumente sind zum Drucker \'#1\' geschickt', |
2972 |
'The dunning process started' => 'Der Mahnprozess ist gestartet.', |
|
2973 | 2972 |
'The dunnings have been printed.' => 'Die Mahnung(en) wurden gedruckt.', |
2974 | 2973 |
'The email has been sent.' => 'Die E-Mail wurde verschickt.', |
2975 | 2974 |
'The employee is missing.' => 'Der Bearbeiter fehlt.', |
templates/webpages/dunning/add.html | ||
---|---|---|
2 | 2 |
[% USE HTML %]<script type="text/javascript" src="js/common.js"></script> |
3 | 3 |
<h1>[% title %]</h1> |
4 | 4 |
|
5 |
<form method="post" name="search" action="dn.pl"> |
|
5 |
<form method="post" name="search" action="dn.pl" id="form">
|
|
6 | 6 |
|
7 | 7 |
<table> |
8 | 8 |
<tr> |
... | ... | |
60 | 60 |
<td><input type="checkbox" value="1" id="l_include_direct_debit" name="l_include_direct_debit"></td> |
61 | 61 |
</tr> |
62 | 62 |
</table> |
63 |
|
|
64 |
<input type="hidden" name="nextsub" value="show_invoices"> |
|
65 |
|
|
66 |
<br> |
|
67 |
<input class="submit" type="submit" name="action" value="[% 'Continue' | $T8 %]"> |
|
68 |
|
|
69 | 63 |
</form> |
templates/webpages/dunning/search.html | ||
---|---|---|
5 | 5 |
|
6 | 6 |
[% PROCESS 'common/flash.html' %] |
7 | 7 |
|
8 |
<form method="post" name="search" action="dn.pl"> |
|
8 |
<form method="post" name="search" action="dn.pl" id="form">
|
|
9 | 9 |
|
10 | 10 |
<table width="100%"> |
11 | 11 |
<tr> |
... | ... | |
101 | 101 |
</td> |
102 | 102 |
</tr> |
103 | 103 |
</table> |
104 |
|
|
105 |
<input type="hidden" name="nextsub" value="show_dunning"> |
|
106 |
|
|
107 |
<br> |
|
108 |
|
|
109 |
<input class="submit" type="submit" name="action" value="[% 'Continue' | $T8 %]"> |
|
110 |
|
|
111 | 104 |
</form> |
templates/webpages/dunning/show_dunning_bottom.html | ||
---|---|---|
1 |
[%- USE T8 %] |
|
2 |
[%- USE HTML %] |
|
3 |
[%- USE LxERP %] |
|
4 |
[%- USE L %] |
|
5 | 1 |
<input type="hidden" name="rowcount" value="[% rowcount %]"> |
6 |
|
|
7 |
<p> |
|
8 |
[% 'Dunnings' | $T8 %]<br> |
|
9 |
[% L.hidden_tag('action', 'dispatcher') %] |
|
10 |
<input type="submit" class="submit" name='action_print_multiple' value="[%- 'Print' | $T8 %]"> |
|
11 |
[% L.submit_tag('action_delete', LxERP.t8('Delete'), confirm=LxERP.t8('This resets the dunning process for the selected invoices. Posted dunning invoices will not be changed!')) %] |
|
12 |
</p> |
|
13 |
|
|
14 | 2 |
</form> |
templates/webpages/dunning/show_dunning_top.html | ||
---|---|---|
1 | 1 |
[% USE HTML %][%- USE LxERP -%][%- USE L -%] |
2 |
<form method="post" action="dn.pl"> |
|
2 |
<form method="post" action="dn.pl" id="form">
|
|
3 | 3 |
|
4 | 4 |
<h2>[% LxERP.t8("Print options") %]</h2> |
5 | 5 |
|
templates/webpages/dunning/show_invoices.html | ||
---|---|---|
88 | 88 |
<input name="groupinvoices" type="hidden" value="[% HTML.escape(groupinvoices) %]"> |
89 | 89 |
|
90 | 90 |
<input name="callback" type="hidden" value="[% HTML.escape(callback) %]"> |
91 |
<input name="nextsub" type="hidden" value="save_dunning"> |
|
92 |
|
|
93 |
<input type="hidden" name="action" value="[% 'Continue' | $T8 %]"> |
|
94 |
|
|
95 |
<input type="submit" name="dummy" value="[% 'Continue' | $T8 %]" |
|
96 |
[% UNLESS DEBUG_DUNNING %]onclick="this.disabled=true; this.value='[% 'The dunning process started' | $T8 %]'; document.Form.submit()"[% END %]> |
|
97 |
|
|
98 | 91 |
</form> |
Auch abrufbar als: Unified diff
ActionBar: Verwendung im Mahnprozess