From eabd66947cdb825339e188ba52b9b18f9b88ae51 Mon Sep 17 00:00:00 2001 From: "G. Richardson" Date: Mon, 4 Aug 2014 12:51:35 +0200 Subject: [PATCH] Buchungsgruppe anlegen/bearbeiten/anzeigen - Logik umgestellt MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 3 Fälle in Maske berücksichtigen: * neue BG: Konten-Dropdown mit Standardkonten vorausgewählt * existierende BG nicht in Benutzung: Konten-Dropdown mit gespeicherten Konten vorausgewählt * existierende BG in Benutzung: gespeicherte Konten als Text anzeigen --- templates/webpages/buchungsgruppen/form.html | 30 ++++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/templates/webpages/buchungsgruppen/form.html b/templates/webpages/buchungsgruppen/form.html index 04b7496ac..b520197d8 100644 --- a/templates/webpages/buchungsgruppen/form.html +++ b/templates/webpages/buchungsgruppen/form.html @@ -12,33 +12,33 @@ [% 'Inventory account' | $T8 %] - [%- IF SELF.config.id AND NOT SELF.config.orphaned %] - [%- CHARTLIST.inventory_accno %] -- [%- CHARTLIST.inventory_accno_description %] - [%- ELSIF NOT SELF.config.id AND NOT SELF.config.orphaned %] - [%- L.select_tag("config.inventory_accno_id", ACCOUNTS.ic, title_sub=\account_label, default=SELF.defaults.inventory_accno_id) %] + [%- IF NOT SELF.config.id %] + [%- L.select_tag("config.inventory_accno_id", ACCOUNTS.ic, title_sub=\account_label, default=SELF.defaults.inventory_accno_id) %] + [%- ELSIF SELF.config.id AND SELF.config.orphaned %] + [%- L.select_tag("config.inventory_accno_id", ACCOUNTS.ic, title_sub=\account_label, default=SELF.config.inventory_accno_id) %] [%- ELSE %] - [%- L.select_tag("config.inventory_accno_id", ACCOUNTS.ic, title_sub=\account_label, default=SELF.config.inventory_accno_id) %] + [%- CHARTLIST.inventory_accno %] -- [%- CHARTLIST.inventory_accno_description %] [%- END %] [%- FOREACH tz = TAXZONES %] [% 'Revenue' | $T8 %] [% HTML.escape(tz.description) %] - [%- IF SELF.config.id AND NOT SELF.config.orphaned %] - [% CHARTLIST.${tz.id}.income_accno %] -- [% CHARTLIST.${tz.id}.income_accno_description %] - [%- ELSIF NOT SELF.config.id AND NOT SELF.config.orphaned %] - [%- L.select_tag('income_accno_id_' _ tz.id, ACCOUNTS.ic_income, title_sub=\account_label, default=SELF.defaults.income_accno_id) %] + [%- IF NOT SELF.config.id %] + [%- L.select_tag('income_accno_id_' _ tz.id, ACCOUNTS.ic_income, title_sub=\account_label, default=SELF.defaults.income_accno_id) %] + [%- ELSIF SELF.config.id AND SELF.config.orphaned %] + [%- L.select_tag('income_accno_id_' _ tz.id, ACCOUNTS.ic_income, title_sub=\account_label, default=CHARTLIST.${tz.id}.income_accno_id) %] [%- ELSE %] - [%- L.select_tag('income_accno_id_' _ tz.id, ACCOUNTS.ic_income, title_sub=\account_label, default=CHARTLIST.${tz.id}.income_accno_id) %] + [% CHARTLIST.${tz.id}.income_accno %] -- [% CHARTLIST.${tz.id}.income_accno_description %] [%- END %] [% 'Expense' | $T8 %] [% HTML.escape(tz.description) %] - [%- IF SELF.config.id AND NOT SELF.config.orphaned %] - [% CHARTLIST.${tz.id}.expense_accno %] -- [% CHARTLIST.${tz.id}.expense_accno_description %] - [%- ELSIF NOT SELF.config.id AND NOT SELF.config.orphaned %] - [%- L.select_tag('expense_accno_id_' _ tz.id, ACCOUNTS.ic_expense, title_sub=\account_label, default=SELF.defaults.expense_accno_id) %] + [%- IF NOT SELF.config.id %] + [%- L.select_tag('expense_accno_id_' _ tz.id, ACCOUNTS.ic_expense, title_sub=\account_label, default=SELF.defaults.expense_accno_id) %] + [%- ELSIF SELF.config.id AND SELF.config.orphaned %] + [%- L.select_tag('expense_accno_id_' _ tz.id, ACCOUNTS.ic_expense, title_sub=\account_label, default=CHARTLIST.${tz.id}.expense_accno_id) %] [%- ELSE %] - [%- L.select_tag('expense_accno_id_' _ tz.id, ACCOUNTS.ic_expense, title_sub=\account_label, default=CHARTLIST.${tz.id}.expense_accno_id) %] + [% CHARTLIST.${tz.id}.expense_accno %] -- [% CHARTLIST.${tz.id}.expense_accno_description %] [%- END %] [%- END %] -- 2.20.1