Neue Methode orphaned für Buchungsgruppe
[kivitendo-erp.git] / templates / webpages / buchungsgruppen / form.html
index 9fe2fd9..04b7496 100644 (file)
@@ -12,9 +12,9 @@
   </tr>
   <tr>
     <th align="right">[% 'Inventory account' | $T8 %]</th>
-    [%- IF SELF.config.id AND linked_parts != 0 %]
+    [%- IF SELF.config.id AND NOT SELF.config.orphaned %]
     <td>[%- CHARTLIST.inventory_accno %] -- [%- CHARTLIST.inventory_accno_description %]</td>
-    [%- ELSIF NOT SELF.config.id AND linked_parts != 0 %]
+    [%- ELSIF NOT SELF.config.id AND NOT SELF.config.orphaned %]
     <td>[%- L.select_tag("config.inventory_accno_id", ACCOUNTS.ic, title_sub=\account_label, default=SELF.defaults.inventory_accno_id) %]</td>
     [%- ELSE %]
     <td>[%- L.select_tag("config.inventory_accno_id", ACCOUNTS.ic, title_sub=\account_label, default=SELF.config.inventory_accno_id) %]</td>
@@ -23,9 +23,9 @@
 [%- FOREACH tz = TAXZONES %]
   <tr>
     <th align="right">[% 'Revenue' | $T8 %] [% HTML.escape(tz.description) %]</th>
-    [%- IF SELF.config.id AND linked_parts != 0 %]
+    [%- IF SELF.config.id AND NOT SELF.config.orphaned %]
     <td>[% CHARTLIST.${tz.id}.income_accno %] -- [% CHARTLIST.${tz.id}.income_accno_description %]</td>
-    [%- ELSIF NOT SELF.config.id AND linked_parts != 0 %]
+    [%- ELSIF NOT SELF.config.id AND NOT SELF.config.orphaned %]
     <td>[%- L.select_tag('income_accno_id_' _ tz.id, ACCOUNTS.ic_income, title_sub=\account_label, default=SELF.defaults.income_accno_id) %]</td>
     [%- ELSE %]
     <td>[%- L.select_tag('income_accno_id_' _ tz.id, ACCOUNTS.ic_income, title_sub=\account_label, default=CHARTLIST.${tz.id}.income_accno_id) %]</td>
@@ -33,9 +33,9 @@
   </tr>
   <tr>
     <th align="right">[% 'Expense' | $T8 %] [% HTML.escape(tz.description) %]</th>
-    [%- IF SELF.config.id AND linked_parts != 0 %]
+    [%- IF SELF.config.id AND NOT SELF.config.orphaned %]
     <td>[% CHARTLIST.${tz.id}.expense_accno %] -- [% CHARTLIST.${tz.id}.expense_accno_description %]</td>
-    [%- ELSIF NOT SELF.config.id AND linked_parts != 0 %]
+    [%- ELSIF NOT SELF.config.id AND NOT SELF.config.orphaned %]
     <td>[%- L.select_tag('expense_accno_id_' _ tz.id, ACCOUNTS.ic_expense, title_sub=\account_label, default=SELF.defaults.expense_accno_id) %]</td>
     [%- ELSE %]
     <td>[%- L.select_tag('expense_accno_id_' _ tz.id, ACCOUNTS.ic_expense, title_sub=\account_label, default=CHARTLIST.${tz.id}.expense_accno_id) %]</td>
@@ -47,7 +47,7 @@
  <p>
   [% L.hidden_tag("action", "Buchungsgruppen/dispatch") %]
   [% L.submit_tag("action_" _  (SELF.config.id ? "update" : "create"), LxERP.t8('Save'), onclick="return check_prerequisites();") %]
-  [%- IF SELF.config.id AND linked_parts == 0 %]
+  [%- IF SELF.config.id AND SELF.config.orphaned %]
     [% L.submit_tag("action_delete", LxERP.t8('Delete'), confirm=LxERP.t8('Are you sure?')) %]
   [%- END %]
  </p>