-[% 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>
- <td>[%- 'Description' | $T8 %]</td>
- <td>
- <input name="payment_term.description" value="[%- HTML.escape(SELF.payment_term.description) %]">
- </td>
+ <tr class="listheading">
+ <th></th>
+ <th>[% LxERP.t8("General settings") %]</th>
</tr>
<tr>
- <td>[%- 'Long Description' | $T8 %]</td>
+ <td>[%- 'Description' | $T8 %]</td>
<td>
- <input name="payment_term.description_long" value="[%- HTML.escape(SELF.payment_term.description_long) %]" size="60">
+ [% P.input_tag("payment_term.description", SELF.payment_term.description, "data-validate"="required", "data-title"=LxERP.t8("Description")) %]
</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>[% 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>
<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>
<table>
<tr class="listheading"><th>[%- LxERP.t8('Field') %]</th><th>[%- LxERP.t8('Description') %]</th></tr>
- <tr><td><%payment_terms%></td><td>[% LxERP.t8("Payment description") %]</td></tr>
- <tr><td><%payment_description%></td><td>[% LxERP.t8("Payment description detail") %]</td></tr>
<tr><td><%netto_date%></td><td>[% LxERP.t8("Date the payment is due in full") %]</td></tr>
<tr><td><%skonto_date%></td><td>[% LxERP.t8("Date the payment is due with discount") %]</td></tr>
<tr><td><%skonto_amount%></td><td>[% LxERP.t8("The deductible amount") %]</td></tr>
<tr><td><%invtotal_wo_skonto%></td><td>[% LxERP.t8("Invoice total less discount") %]</td></tr>
<tr><td><%currency%></td><td>[% LxERP.t8("The selected currency") %]</td></tr>
<tr><td><%terms_netto%></td><td>[% LxERP.t8("The number of days for full payment") %]</td></tr>
- <tr><td><%account_number%></td><td>[% LxERP.t8("Your account number") %]</td></tr>
- <tr><td><%bank%></td><td>[% LxERP.t8("Your bank") %]</td></tr>
- <tr><td><%bank_code%></td><td>[% LxERP.t8("Your bank code") %]</td></tr>
+ <tr><td><%bank%></td><td>[% LxERP.t8("Customer's/vendor's bank") %]</td></tr>
+ <tr><td><%bic%></td><td>[% LxERP.t8("Customer's/vendor's BIC") %]</td></tr>
+ <tr><td><%iban%></td><td>[% LxERP.t8("Customer's/vendor's IBAN") %]</td></tr>
+ <tr><td><%mandator_id%></td><td>[% LxERP.t8("Customer's SEPA mandator ID") %]</td></tr>
+ <tr><td><%mandate_date_of_signature%></td><td>[% LxERP.t8("Customer's Mandate Date of Signature") %]</td></tr>
+ <tr><td><%account_number%></td><td>[% LxERP.t8("Customer's/vendor's account number") %]</td></tr>
+ <tr><td><%bank_code%></td><td>[% LxERP.t8("Customer's/vendor's bank code") %]</td></tr>
</table>
</form>