Revision 665dd6ea
Von Martin Helmling martin.helmling@octosoft.eu vor fast 8 Jahren hinzugefügt
bin/mozilla/gl.pl | ||
---|---|---|
338 | 338 |
$::form->{ALL_EMPLOYEES} = SL::DB::Manager::Employee->get_all_sorted(query => [ deleted => 0 ]); |
339 | 339 |
$::form->{ALL_DEPARTMENTS} = SL::DB::Manager::Department->get_all; |
340 | 340 |
|
341 |
setup_gl_search_action_bar(); |
|
342 |
|
|
341 | 343 |
$::form->header; |
342 | 344 |
print $::form->parse_html_template('gl/search', { |
343 | 345 |
employee_label => sub { "$_[0]{id}--$_[0]{name}" }, |
... | ... | |
630 | 632 |
|
631 | 633 |
$report->set_options('raw_bottom_info_text' => $raw_bottom_info_text); |
632 | 634 |
|
633 |
$report->generate_with_headers(); |
|
635 |
setup_gl_transactions_action_bar(num_rows => scalar(@{$form->{GL}})); |
|
636 |
|
|
637 |
$report->generate_with_headers(action_bar => 1); |
|
634 | 638 |
|
635 | 639 |
$main::lxdebug->leave_sub(); |
636 | 640 |
} |
... | ... | |
949 | 953 |
return ($::instance_conf->get_gl_changeable == 2) ? ($::form->current_date(\%::myconfig) eq $::form->{gldate}) : ($::instance_conf->get_gl_changeable == 1); |
950 | 954 |
} |
951 | 955 |
|
956 |
sub setup_gl_action_bar { |
|
957 |
my %params = @_; |
|
958 |
my $form = $::form; |
|
959 |
my $change_never = $::instance_conf->get_gl_changeable == 0; |
|
960 |
my $change_on_same_day_only = $::instance_conf->get_gl_changeable == 2 && ($form->current_date(\%::myconfig) ne $form->{gldate}); |
|
961 |
|
|
962 |
for my $bar ($::request->layout->get('actionbar')) { |
|
963 |
$bar->add( |
|
964 |
action => [ |
|
965 |
t8('Update'), |
|
966 |
submit => [ '#form', { action => 'update' } ], |
|
967 |
id => 'update_button', |
|
968 |
accesskey => 'enter', |
|
969 |
], |
|
970 |
action => [ |
|
971 |
t8('Post'), |
|
972 |
submit => [ '#form', { action => 'post' } ], |
|
973 |
disabled => $form->{locked} ? t8('The billing period has already been locked.') |
|
974 |
: $form->{storno} ? t8('A canceled general ledger transaction cannot be posted.') |
|
975 |
: ($form->{id} && $change_never) ? t8('Changing general ledger transaction has been disabled in the configuration.') |
|
976 |
: ($form->{id} && $change_on_same_day_only) ? t8('General ledger transactions can only be changed on the day they are posted.') |
|
977 |
: undef, |
|
978 |
], |
|
979 |
combobox => [ |
|
980 |
action => [ t8('Storno'), |
|
981 |
submit => [ '#form', { action => 'storno' } ], |
|
982 |
confirm => t8('Do you really want to cancel this general ledger transaction?'), |
|
983 |
disabled => !$form->{id} ? t8('This general ledger transaction has not been posted yet.') : undef, |
|
984 |
], |
|
985 |
action => [ t8('Delete'), |
|
986 |
submit => [ '#form', { action => 'delete' } ], |
|
987 |
confirm => t8('Do you really want to delete this object?'), |
|
988 |
disabled => !$form->{id} ? t8('This invoice has not been posted yet.') |
|
989 |
: $form->{locked} ? t8('The billing period has already been locked.') |
|
990 |
: $change_never ? t8('Changing invoices has been disabled in the configuration.') |
|
991 |
: $change_on_same_day_only ? t8('Invoices can only be changed on the day they are posted.') |
|
992 |
: undef, |
|
993 |
], |
|
994 |
], # end of combobox "Storno" |
|
995 |
|
|
996 |
combobox => [ |
|
997 |
action => [ t8('more') ], |
|
998 |
action => [ |
|
999 |
t8('History'), |
|
1000 |
call => [ 'set_history_window', $form->{id} * 1, 'id' ], |
|
1001 |
disabled => !$form->{id} ? t8('This invoice has not been posted yet.') : undef, |
|
1002 |
], |
|
1003 |
action => [ |
|
1004 |
t8('Follow-Up'), |
|
1005 |
call => [ 'follow_up_window' ], |
|
1006 |
disabled => !$form->{id} ? t8('This invoice has not been posted yet.') : undef, |
|
1007 |
], |
|
1008 |
action => [ |
|
1009 |
t8('Record templates'), |
|
1010 |
call => [ 'kivi.RecordTemplate.popup', 'gl_transaction' ], |
|
1011 |
], |
|
1012 |
action => [ |
|
1013 |
t8('Drafts'), |
|
1014 |
call => [ 'kivi.Draft.popup', 'gl', 'unknown', $form->{draft_id}, $form->{draft_description} ], |
|
1015 |
disabled => $form->{id} ? t8('This invoice has already been posted.') |
|
1016 |
: $form->{locked} ? t8('The billing period has already been locked.') |
|
1017 |
: undef, |
|
1018 |
], |
|
1019 |
], # end of combobox "more" |
|
1020 |
); |
|
1021 |
} |
|
1022 |
} |
|
1023 |
|
|
1024 |
sub setup_gl_search_action_bar { |
|
1025 |
my %params = @_; |
|
1026 |
|
|
1027 |
for my $bar ($::request->layout->get('actionbar')) { |
|
1028 |
$bar->add( |
|
1029 |
action => [ |
|
1030 |
t8('Search'), |
|
1031 |
submit => [ '#form', { action => 'continue', nextsub => 'generate_report' } ], |
|
1032 |
accesskey => 'enter', |
|
1033 |
], |
|
1034 |
); |
|
1035 |
} |
|
1036 |
} |
|
1037 |
|
|
1038 |
sub setup_gl_transactions_action_bar { |
|
1039 |
my %params = @_; |
|
1040 |
|
|
1041 |
for my $bar ($::request->layout->get('actionbar')) { |
|
1042 |
$bar->add( |
|
1043 |
combobox => [ |
|
1044 |
action => [ $::locale->text('Create new') ], |
|
1045 |
action => [ |
|
1046 |
$::locale->text('GL Transaction'), |
|
1047 |
submit => [ '#create_new_form', { action => 'gl_transaction' } ], |
|
1048 |
], |
|
1049 |
action => [ |
|
1050 |
$::locale->text('AR Transaction'), |
|
1051 |
submit => [ '#create_new_form', { action => 'ar_transaction' } ], |
|
1052 |
], |
|
1053 |
action => [ |
|
1054 |
$::locale->text('AP Transaction'), |
|
1055 |
submit => [ '#create_new_form', { action => 'ap_transaction' } ], |
|
1056 |
], |
|
1057 |
action => [ |
|
1058 |
$::locale->text('Sales Invoice'), |
|
1059 |
submit => [ '#create_new_form', { action => 'sales_invoice' } ], |
|
1060 |
], |
|
1061 |
action => [ |
|
1062 |
$::locale->text('Vendor Invoice'), |
|
1063 |
submit => [ '#create_new_form', { action => 'vendor_invoice' } ], |
|
1064 |
], |
|
1065 |
], # end of combobox "Create new" |
|
1066 |
); |
|
1067 |
} |
|
1068 |
} |
|
1069 |
|
|
952 | 1070 |
sub form_header { |
953 | 1071 |
$::lxdebug->enter_sub; |
954 | 1072 |
$::auth->assert('gl_transactions'); |
... | ... | |
986 | 1104 |
$::form->{previous_id} ||= "--"; |
987 | 1105 |
$::form->{previous_gldate} ||= "--"; |
988 | 1106 |
|
1107 |
setup_gl_action_bar(); |
|
1108 |
|
|
989 | 1109 |
$::form->header; |
990 | 1110 |
print $::form->parse_html_template('gl/form_header', { |
991 | 1111 |
hide_title => $title, |
... | ... | |
1019 | 1139 |
sub delete { |
1020 | 1140 |
$main::lxdebug->enter_sub(); |
1021 | 1141 |
|
1022 |
my $form = $main::form; |
|
1023 |
my $locale = $main::locale; |
|
1024 |
|
|
1025 |
$form->header; |
|
1026 |
|
|
1027 |
print qq| |
|
1028 |
<form method=post action=gl.pl> |
|
1029 |
|; |
|
1030 |
|
|
1031 |
map { $form->{$_} =~ s/\"/"/g } qw(reference description); |
|
1032 |
|
|
1033 |
delete $form->{header}; |
|
1034 |
|
|
1035 |
foreach my $key (keys %$form) { |
|
1036 |
next if (($key eq 'login') || ($key eq 'password') || ('' ne ref $form->{$key})); |
|
1037 |
print qq|<input type="hidden" name="$key" value="$form->{$key}">\n|; |
|
1038 |
} |
|
1039 |
|
|
1040 |
print qq| |
|
1041 |
<h2 class=confirm>| . $locale->text('Confirm!') . qq|</h2> |
|
1042 |
|
|
1043 |
<h4>| |
|
1044 |
. $locale->text('Are you sure you want to delete Transaction') |
|
1045 |
. qq| $form->{reference}</h4> |
|
1046 |
|
|
1047 |
<input name=action class=submit type=submit value="| |
|
1048 |
. $locale->text('Yes') . qq|"> |
|
1049 |
</form> |
|
1050 |
|; |
|
1051 |
$main::lxdebug->leave_sub(); |
|
1052 |
|
|
1053 |
} |
|
1054 |
|
|
1055 |
sub yes { |
|
1056 |
$main::lxdebug->enter_sub(); |
|
1057 |
|
|
1058 | 1142 |
my $form = $main::form; |
1059 | 1143 |
my %myconfig = %main::myconfig; |
1060 | 1144 |
my $locale = $main::locale; |
locale/de/all | ||
---|---|---|
51 | 51 |
'<b>Automatically create new bins</b> in the following warehouse if not selected in the list above' => '<b>Automatisches Zuweisen der Lagerplätze</b> im folgenden Lager, falls keine andere Zuweisung oben ausgewählt ist. ', |
52 | 52 |
'<b>Default Bins Migration !READ CAREFULLY!</b>' => 'Standardlagerplatz Migration !AUFMERKSAM LESEN!', |
53 | 53 |
'<b>What</b> do you want to look for?' => '<b>Wonach</b> wollen Sie suchen?', |
54 |
'A canceled general ledger transaction cannot be posted.' => 'Eine stornierte Dialogbuchung kann nicht mehr gebucht werden.', |
|
54 | 55 |
'A canceled invoice cannot be posted.' => 'Eine stornierte Rechnung kann nicht mehr gebucht werden.', |
55 | 56 |
'A digit is required.' => 'Eine Ziffer ist vorgeschrieben.', |
56 | 57 |
'A directory with the name for the new print templates exists already.' => 'Ein Verzeichnis mit dem selben Namen wie die neuen Druckvorlagen existiert bereits.', |
... | ... | |
555 | 556 |
'Changed text blocks: #1' => 'Geänderte Textblöcke: #1', |
556 | 557 |
'Changes in this block are only sensible if the account is NOT a summary account AND there exists one valid taxkey. To select both Receivables and Payables only make sense for Payment / Receipt (i.e. account cash).' => 'Es ist nur sinnvoll Änderungen vorzunehmen, wenn das Konto KEIN Sammelkonto ist und wenn ein gültiger Steuerschlüssel für das Konto existiert. Gleichzeitig Haken bei Forderungen und Verbindlichkeiten zu setzen, macht auch NUR für den Zahlungsein- und Ausgang (bspw. Bank oder Kasse) Sinn.', |
557 | 558 |
'Changes to Receivables and Payables are only possible if no transactions to this account are posted yet.' => 'Änderungen bei Forderungen oder Verbindlichkeiten sind nur möglich, wenn dieses Konto noch nicht bebucht wurde.', |
559 |
'Changing general ledger transaction has been disabled in the configuration.' => 'Das Verändern von Dialogbuchungen ist in der Konfiguration deaktiviert.', |
|
558 | 560 |
'Changing invoices has been disabled in the configuration.' => 'Das Verändern von Rechnungen ist in der Konfiguration deaktiviert.', |
559 | 561 |
'Charge' => 'Berechnen', |
560 | 562 |
'Charge Number' => 'Chargennummer', |
... | ... | |
977 | 979 |
'Do not set this comment' => 'Diesen Kommentar nicht setzen', |
978 | 980 |
'Do not set this warehouse' => 'Dieses Lager nicht setzen', |
979 | 981 |
'Do you really want do continue?' => 'Wollen Sie wirklich fortfahren?', |
982 |
'Do you really want to cancel this general ledger transaction?' => 'Wollen Sie diese Dialogbuchung wirklich stornieren?', |
|
980 | 983 |
'Do you really want to cancel this invoice?' => 'Wollen Sie diese Rechnung wirklich stornieren?', |
981 | 984 |
'Do you really want to cancel?' => 'Wollen Sie wirklich abbrechen?', |
982 | 985 |
'Do you really want to close the following SEPA exports? No payment will be recorded for bank collections that haven\'t been marked as executed yet.' => 'Wollen Sie wirklich die folgenden SEPA-Exporte abschließen? Für Überweisungen, die noch nicht gebucht wurden, werden dann keine Zahlungen verbucht.', |
... | ... | |
1401 | 1404 |
'General ledger and cash' => 'Finanzbuchhaltung und Zahlungsverkehr', |
1402 | 1405 |
'General ledger corrections' => 'Korrekturen im Hauptbuch', |
1403 | 1406 |
'General ledger transaction \'#1\' posted' => 'Dialogbuchung \'#1\' verbucht.', |
1407 |
'General ledger transactions can only be changed on the day they are posted.' => 'Dialogbuchungen können nur am Buchungstag geändert werden.', |
|
1404 | 1408 |
'General settings' => 'Allgemeine Einstellungen', |
1405 | 1409 |
'Generate and print sales delivery orders' => 'Erzeuge und drucke Lieferscheine', |
1406 | 1410 |
'Generic Tax Report' => 'USTVA Bericht', |
... | ... | |
3207 | 3211 |
'This export will include all records in the given time range and all supplicant information from checked entities. You will receive a single zip file. Please extract this file onto the data medium requested by your auditor.' => 'Dieser Export umfasst alle Belege im gewählten Zeitrahmen und die dazugehörgen Informationen aus den gewählten Blöcken. Sie erhalten eine einzelne Zip-Datei. Bitte entpacken Sie diese auf das Medium das Ihr Steuerprüfer wünscht.', |
3208 | 3212 |
'This feature especially prevents mistakes by mixing up prior tax and sales tax.' => 'Dieses Feature vermeidet insbesondere Verwechslungen von Umsatz- und Vorsteuer.', |
3209 | 3213 |
'This function requires the presence of articles with a time-based unit such as "h" or "min".' => 'Für diese Funktion mussen Artikel mit einer Zeit-basierten Einheit wie "Std" oder "min" existieren.', |
3214 |
'This general ledger transaction has not been posted yet.' => 'Die Dialogbuchung wurde noch nicht gebucht.', |
|
3210 | 3215 |
'This group is valid for the following clients' => 'Diese Gruppe ist für die folgenden Mandanten gültig', |
3211 | 3216 |
'This has been changed in this version, therefore please change the "old" bins to some real warehouse bins.' => 'Das wurde in dieser Version umgestellt, bitte ändern Sie die Freitext-Lagerplätze auf vorhandene Lagerplätze.', |
3212 | 3217 |
'This has been changed in this version.' => 'Ab dieser Version ist dies nicht mehr so.', |
templates/webpages/gl/form_footer.html | ||
---|---|---|
24 | 24 |
[%- IF id && follow_ups.size %] |
25 | 25 |
<p>[% LxERP.t8('There are #1 unfinished follow-ups of which #2 are due.', follow_ups.size , follow_ups_due) %]</p> |
26 | 26 |
[%- END %] |
27 |
|
|
28 |
<br> |
|
29 |
|
|
30 |
[%- IF id %] |
|
31 |
[% L.submit_tag('action', LxERP.t8('Update'), id='update_button') %] |
|
32 |
|
|
33 |
[% IF !locked && radieren %] |
|
34 |
[% L.submit_tag('action', LxERP.t8('Post'), accesskey='b') %] |
|
35 |
[% L.submit_tag('action', LxERP.t8('Delete')) %] |
|
36 |
[%- END %] |
|
37 |
|
|
38 |
[%- IF !storno %] |
|
39 |
[% L.submit_tag('action', LxERP.t8('Storno')) %] |
|
40 |
[%- END %] |
|
41 |
|
|
42 |
[% L.submit_tag('action', LxERP.t8('Follow-Up'), onclick='follow_up_window()') %] |
|
43 |
[%- ELSE %] |
|
44 |
|
|
45 |
[% L.submit_tag('action', LxERP.t8('Update'), id='update_button') %] |
|
46 |
[% L.submit_tag('action', LxERP.t8('Post')) %] |
|
47 |
[% L.button_tag('kivi.Draft.popup("gl", "unknown", "' _ draft_id _ '", "' _ draft_description _ '")', LxERP.t8('Drafts')) %] |
|
48 |
[% L.hidden_tag('draft_id', draft_id) %] |
|
49 |
[% L.hidden_tag('draft_description', draft_description) %] |
|
50 |
[%- END %] |
|
51 |
|
|
52 |
[% L.button_tag("kivi.RecordTemplate.popup('gl_transaction')", LxERP.t8("Record templates")) %] |
|
53 |
</form> |
|
27 |
</form> |
|
54 | 28 |
|
55 | 29 |
<script type="text/javascript"> |
56 | 30 |
<!-- |
templates/webpages/gl/generate_report_bottom.html | ||
---|---|---|
1 |
[% USE T8 %][% USE HTML %]<form method="post" action="dispatcher.pl?M=gl">
|
|
2 |
|
|
1 |
[% USE HTML %]
|
|
2 |
<form method="post" id="create_new_form" action="gl.pl"> |
|
3 | 3 |
<input name="callback" type="hidden" value="[% HTML.escape(callback) %]"> |
4 |
|
|
5 |
<input class="submit" type="submit" name="A_gl_transaction" value="[%- 'GL Transaction' | $T8 %]"> |
|
6 |
<input class="submit" type="submit" name="A_ar_transaction" value="[%- 'AR Transaction' | $T8 %]"> |
|
7 |
<input class="submit" type="submit" name="A_ap_transaction" value="[%- 'AP Transaction' | $T8 %]"> |
|
8 |
<input class="submit" type="submit" name="A_sales_invoice" value="[%- 'Sales Invoice' | $T8 %]"> |
|
9 |
<input class="submit" type="submit" name="A_vendor_invoice" value="[%- 'Vendor Invoice' | $T8 %]"> |
|
10 |
|
|
11 | 4 |
</form> |
templates/webpages/gl/search.html | ||
---|---|---|
4 | 4 |
[%- USE L %] |
5 | 5 |
<h1>[% 'Journal' | $T8 %]</h1> |
6 | 6 |
|
7 |
<form method=post action=gl.pl> |
|
7 |
<form method=post id="form" action=gl.pl>
|
|
8 | 8 |
|
9 | 9 |
<input type=hidden name=sort value=datesort> |
10 | 10 |
|
... | ... | |
109 | 109 |
</table> |
110 | 110 |
</td> |
111 | 111 |
</tr> |
112 |
<tr> |
|
113 |
<td><hr size=3 noshade></td> |
|
114 |
</tr> |
|
115 | 112 |
</table> |
116 |
|
|
117 |
<input type=hidden name=nextsub value=generate_report> |
|
118 |
|
|
119 |
<br> |
|
120 |
<input class=submit type=submit name=action value="[% 'Continue' | $T8 %]"> |
|
121 | 113 |
</form> |
Auch abrufbar als: Unified diff
ActionBar: Umstellung von Dialogbuchung und Berichtsfunktion in gl.pl