From 8058448b8c3969bc043a54275fa89e4a9405908d Mon Sep 17 00:00:00 2001 From: Niclas Zimmermann Date: Fri, 24 May 2013 14:39:44 +0200 Subject: [PATCH] =?utf8?q?Radiobuttons=20f=C3=BCr=20Sammelkonten?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Beim Erstellen oder Bearbeiten von Konten, konnte man bisher ein Konto gleichzeitig als Sammelkonto für sowohl Verkauf, Einkauf und Inventar verwenden. Durch die Verwendung von Radiobuttons wird dies nun eingeschränkt. --- SL/AM.pm | 2 +- locale/de/all | 1 + templates/webpages/am/edit_accounts.html | 22 +++++++++++++++++++--- 3 files changed, 21 insertions(+), 4 deletions(-) diff --git a/SL/AM.pm b/SL/AM.pm index b10e72fb2..acc5bdccc 100644 --- a/SL/AM.pm +++ b/SL/AM.pm @@ -207,7 +207,7 @@ sub save_account { # connect to database, turn off AutoCommit my $dbh = $form->dbconnect_noauto($myconfig); - for (qw(AR_include_in_dropdown AP_include_in_dropdown)) { + for (qw(AR_include_in_dropdown AP_include_in_dropdown summary_account)) { $form->{$form->{$_}} = $form->{$_} if $form->{$_}; } diff --git a/locale/de/all b/locale/de/all index 58e40951f..ca3457568 100755 --- a/locale/de/all +++ b/locale/de/all @@ -1307,6 +1307,7 @@ $self->{texts} = { 'No problems were recognized.' => 'Es wurden keine Probleme gefunden.', 'No report with id #1' => 'Es gibt keinen Report mit der Id #1', 'No shipto selected to delete' => 'Keine Lieferadresse zum Löschen ausgewählt', + 'No summary account' => 'Kein Sammelkonto', 'No transaction selected!' => 'Keine Transaktion ausgewählt', 'No transfers were executed in this export.' => 'In diesem SEPA-Export wurden keine Überweisungen ausgeführt.', 'No unknown units where found.' => 'Es wurden keine unbekannten Einheiten gefunden.', diff --git a/templates/webpages/am/edit_accounts.html b/templates/webpages/am/edit_accounts.html index 38652b73d..d3e4fe7eb 100644 --- a/templates/webpages/am/edit_accounts.html +++ b/templates/webpages/am/edit_accounts.html @@ -88,9 +88,25 @@ $(function() { [% IF ChartTypeIsAccount %]
[% 'Is this a summary account to record' | $T8 %] - [% L.checkbox_tag('AR', value => 'AR', checked => AR, class => 'checkbox', disabled => AccountIsPosted) %]  [% 'AR' | $T8 %] - [% L.checkbox_tag('AP', value => 'AP', checked => AP, class => 'checkbox', disabled => AccountIsPosted) %]  [% 'AP' | $T8 %] - [% L.checkbox_tag('IC', value => 'IC', checked => IC, class => 'checkbox', disabled => AccountIsPosted) %]  [% 'Inventory' | $T8 %] + [% L.radio_button_tag('summary_account', + value => 'AR', + disabled => AccountIsPosted, + checked => AR) %] +  [% 'AR' | $T8 %] + [% L.radio_button_tag('summary_account', + value => 'AP', + disabled => AccountIsPosted, + checked => AP) %] +  [% 'AP' | $T8 %] + [% L.radio_button_tag('summary_account', + value => 'IC', + disabled => AccountIsPosted, + checked => IC) %] +  [% 'Inventory' | $T8 %] + [% L.radio_button_tag('summary_account', + value => '', + disabled => AccountIsPosted) %] +  [% 'No summary account' | $T8 %] [% IF AccountIsPosted %] [% IF AR %] [% L.hidden_tag('AR', 'AR') %] [% END %] -- 2.20.1