Volltext-Suche: Tabelle für Texte aus Dateien im DMS. DB und Rose
[kivitendo-erp.git] / templates / webpages / payment_term / form.html
index f119728..c371c46 100755 (executable)
@@ -1,38 +1,32 @@
-[% USE HTML %][% USE T8 %][% USE L %][% USE LxERP %]
+[% USE HTML %][% USE T8 %][% USE L %][% USE LxERP %][%- USE P -%]
 <h1>[% FORM.title %]</h1>
 
- <form method="post" action="controller.pl">
+ <form method="post" action="controller.pl" id="form">
 
 [%- INCLUDE 'common/flash.html' %]
 
   <table>
+   <tr class="listheading">
+    <th></th>
+    <th>[% LxERP.t8("General settings") %]</th>
+   </tr>
+
    <tr>
     <td>[%- 'Description' | $T8 %]</td>
     <td>
-     <input name="payment_term.description" value="[%- HTML.escape(SELF.payment_term.description) %]">
+     [% P.input_tag("payment_term.description", SELF.payment_term.description, "data-validate"="required", "data-title"=LxERP.t8("Description")) %]
     </td>
    </tr>
 
    <tr>
-    <td>[%- 'Long Description' | $T8 %]</td>
-    <td>
-     <input name="payment_term.description_long" value="[%- HTML.escape(SELF.payment_term.description_long) %]" size="60">
-    </td>
+    <td>[% LxERP.t8("Calculate due date automatically") %]</td>
+    <td>[% L.yes_no_tag("payment_term.auto_calculation", SELF.payment_term.auto_calculation, "data-auto-calculation-toggle"="1") %]</td>
    </tr>
 
-   [%- FOREACH language = SELF.languages %]
-    <tr>
-     <td>[%- HTML.escape(language.description) %] ([%- LxERP.t8('Translation') %])</td>
-     <td>
-      <input name="translation_[% language.id %]" value="[%- HTML.escape(SELF.payment_term.translated_attribute('description_long', language, 1)) %]" size="60">
-     </td>
-    </tr>
-   [%- END %]
-
    <tr>
     <td>[%- 'Netto Terms' | $T8 %]</td>
     <td>
-     <input name="payment_term.terms_netto_as_number" value="[%- HTML.escape(SELF.payment_term.terms_netto_as_number) %]" size="6">
+     [% L.input_tag("payment_term.terms_netto_as_number", SELF.payment_term.terms_netto_as_number, size="6", disabled=(SELF.payment_term.auto_calculation ? '' : 1)) %]
     </td>
    </tr>
 
      <input name="payment_term.percent_skonto_as_percent" value="[%- HTML.escape(SELF.payment_term.percent_skonto_as_percent) %]" size="6">%
     </td>
    </tr>
-  </table>
 
-  <p>
-   <input type="hidden" name="id" value="[% SELF.payment_term.id %]">
-   <input type="hidden" name="action" value="PaymentTerm/dispatch">
-   <input type="submit" class="submit" name="action_[% IF SELF.payment_term.id %]update[% ELSE %]create[% END %]" value="[% 'Save' | $T8 %]">
-   [%- IF SELF.payment_term.id %]
-    <input type="submit" class="submit" name="action_destroy" value="[% 'Delete' | $T8 %]"
-           onclick="if (confirm('[% 'Are you sure you want to delete this payment term?' | $T8 %]')) return true; else return false;">
+   [% IF SELF.payment_term.id %]
+   <tr>
+     <td>[% 'Obsolete' | $T8 %]</td>
+     <td>[% L.checkbox_tag('payment_term.obsolete', checked = SELF.payment_term.obsolete, for_submit=1) %]</td>
+   </tr>
+   </tr>
+   [% END %]
+
+   <tr class="listheading">
+    <th></th>
+    <th>[% LxERP.t8("Texts for quotations & orders") %]</th>
+    <th>[% LxERP.t8("Texts for invoices") %]</th>
+   </tr>
+
+   <tr>
+    <td>[%- 'Long Description' | $T8 %]</td>
+    <td>
+     [% P.input_tag("payment_term.description_long", SELF.payment_term.description_long, size="60", "data-validate"="required", "data-title"=LxERP.t8("Long Description for quotations & orders")) %]
+    </td>
+
+    <td>
+     [% P.input_tag("payment_term.description_long_invoice", SELF.payment_term.description_long_invoice, size="60", "data-validate"="required", "data-title"=LxERP.t8("Long Description for invoices")) %]
+    </td>
+   </tr>
+
+   [%- FOREACH language = SELF.languages %]
+    <tr>
+     <td>[%- HTML.escape(language.description) %] ([%- LxERP.t8('Translation') %])</td>
+     <td>
+      <input name="translation_[% language.id %]" value="[%- HTML.escape(SELF.payment_term.translated_attribute('description_long', language, 1)) %]" size="60">
+     </td>
+
+     <td>
+      <input name="translation_invoice_[% language.id %]" value="[%- HTML.escape(SELF.payment_term.translated_attribute('description_long_invoice', language, 1)) %]" size="60">
+     </td>
+    </tr>
    [%- END %]
-   <a href="[% SELF.url_for(action => 'list') %]">[%- 'Abort' | $T8 %]</a>
-  </p>
+  </table>
+
+  [% P.hidden_tag("id", SELF.payment_term.id) %]
 
   <hr size="3" noshade>
 
@@ -68,8 +91,6 @@
 
   <table>
    <tr class="listheading"><th>[%- LxERP.t8('Field') %]</th><th>[%- LxERP.t8('Description') %]</th></tr>
-   <tr><td>&lt;%payment_terms%&gt;</td><td>[% LxERP.t8("Payment description") %]</td></tr>
-   <tr><td>&lt;%payment_description%&gt;</td><td>[% LxERP.t8("Payment description detail") %]</td></tr>
    <tr><td>&lt;%netto_date%&gt;</td><td>[% LxERP.t8("Date the payment is due in full") %]</td></tr>
    <tr><td>&lt;%skonto_date%&gt;</td><td>[% LxERP.t8("Date the payment is due with discount") %]</td></tr>
    <tr><td>&lt;%skonto_amount%&gt;</td><td>[% LxERP.t8("The deductible amount") %]</td></tr>
    <tr><td>&lt;%invtotal_wo_skonto%&gt;</td><td>[% LxERP.t8("Invoice total less discount") %]</td></tr>
    <tr><td>&lt;%currency%&gt;</td><td>[% LxERP.t8("The selected currency") %]</td></tr>
    <tr><td>&lt;%terms_netto%&gt;</td><td>[% LxERP.t8("The number of days for full payment") %]</td></tr>
-   <tr><td>&lt;%account_number%&gt;</td><td>[% LxERP.t8("Your account number") %]</td></tr>
-   <tr><td>&lt;%bank%&gt;</td><td>[% LxERP.t8("Your bank") %]</td></tr>
-   <tr><td>&lt;%bank_code%&gt;</td><td>[% LxERP.t8("Your bank code") %]</td></tr>
+   <tr><td>&lt;%bank%&gt;</td><td>[% LxERP.t8("Customer's/vendor's bank") %]</td></tr>
+   <tr><td>&lt;%bic%&gt;</td><td>[% LxERP.t8("Customer's/vendor's BIC") %]</td></tr>
+   <tr><td>&lt;%iban%&gt;</td><td>[% LxERP.t8("Customer's/vendor's IBAN") %]</td></tr>
+   <tr><td>&lt;%mandator_id%&gt;</td><td>[% LxERP.t8("Customer's SEPA mandator ID") %]</td></tr>
+   <tr><td>&lt;%mandate_date_of_signature%&gt;</td><td>[% LxERP.t8("Customer's Mandate Date of Signature") %]</td></tr>
+   <tr><td>&lt;%account_number%&gt;</td><td>[% LxERP.t8("Customer's/vendor's account number") %]</td></tr>
+   <tr><td>&lt;%bank_code%&gt;</td><td>[% LxERP.t8("Customer's/vendor's bank code") %]</td></tr>
   </table>
  </form>
-