<input type="hidden" name="forex" value="[% forex | html %]">
<input type="hidden" name="lastmtime" value="[% HTML.escape(lastmtime) %]">
-<input type="hidden" name="id" value="[% id | html %]">
+<input id="id" type="hidden" name="id" value="[% id | html %]">
<input type="hidden" name="sort" value="[% sort | html %]">
<input type="hidden" name="closedto" value="[% closedto | html %]">
<input type="hidden" name="locked" value="[% locked | html %]">
<li><a href="#ui-tabs-webdav">[% 'WebDAV' | $T8 %]</a></li>
[%- END %]
[%- IF id AND INSTANCE_CONF.get_doc_storage %]
- <li><a href="controller.pl?action=File/list&file_type=document&object_type=purchase_invoice&object_id=[% HTML.url(id) %]">[% 'Documents' | $T8 %]</a></li>
+ <li><a href="#ui-tabs-docs">[% 'Documents' | $T8 %]</a></li>
<li><a href="controller.pl?action=File/list&file_type=attachment&object_type=purchase_invoice&object_id=[% HTML.url(id) %]">[% 'Attachments' | $T8 %]</a></li>
[%- END %]
[%- IF id %]
[%- END %]
</ul>
+[%- IF id AND INSTANCE_CONF.get_doc_storage %]
+ <div id="ui-tabs-docs"></div>
+[%- END %]
+
<div id="ui-tabs-basic-data">
<table width="100%">
<tr valign="top">
</tr>
<tr>
<th align="right" nowrap>[% 'Invoice Date' | $T8 %]</th>
- <td>[% L.date_tag('transdate', transdate) %]</td>
+ <td>[% L.date_tag('transdate', transdate, onchange='kivi.SalesPurchase.set_duedate_on_reference_date_change("transdate")') %]</td>
</tr>
<tr>
<th align="right" nowrap>[% 'Due Date' | $T8 %]</th>
</tr>
<tr>
<td>
- <table width="100%">
- <tr>
- <th align="left" width="1%">[% 'Notes' | $T8 %]</th>
- <td align="left">
- <textarea name="notes" rows="[% textarea_rows %]" cols="50" wrap="soft" [% readonly %]>[% notes | html %]</textarea>
- </td>
-
- <th align="left" width=1%>[% 'Notes for vendor' | $T8 %]</th>
- <td align="left">
- <textarea name="intnotes" rows="[% textarea_rows %]" cols="50" wrap="soft" readonly>[% intnotes | html %]</textarea>
- </td>
- </tr>
- </table>
+ <table>
+ <tr>
+ <th align="left">[% 'Notes' | $T8 %]</th>
+ <th align="left">[% 'Internal Notes' | $T8 %]</th>
+ <th align="left">[% 'Payment Terms' | $T8 %]</th>
+ </tr>
+ <tr valign="top">
+ <td>
+ [% L.textarea_tag("notes", notes, wrap="soft", rows=textarea_rows, cols=50, readonly=readonly) %]
+ </td>
+ <td>
+ [% L.textarea_tag("intnotes", intnotes, wrap="soft", rows=textarea_rows, cols=50, readonly=readonly) %]
+ </td>
+ <td>
+ [% L.select_tag('payment_id', payment_terms, default=payment_id, title_key='description', with_empty=1, style="width: 250px", onchange="kivi.SalesPurchase.set_duedate_on_reference_date_change('transdate')") %]
+ </td>
+ <tr>
+ </table>
</td>
</tr>
<tr>