<p>[% saved_message | html %]</p>
[% END %]
+<div class="tabwidget">
+ <ul>
+ <li><a href="#ui-tabs-basic-data">[% 'Basic Data' | $T8 %]</a></li>
+[%- IF id %]
+ <li><a href="controller.pl?action=RecordLinks/ajax_list&object_model=PurchaseInvoice&object_id=[% HTML.url(id) %]">[% 'Linked Records' | $T8 %]</a></li>
+[%- END %]
+ </ul>
+
+<div id="ui-tabs-basic-data">
<table width="100%">
<tr valign="top">
<td>
<td align="right"><input name="taxincluded" class="checkbox" type="checkbox" value="1" [% IF ( taxincluded ) %]checked[% END %]></td>
<th align=left nowrap>[% 'Tax Included' | $T8 %]</th>
</tr>
+ <tr>
+ <td align="right"><input name="direct_debit" class="checkbox" type="checkbox" value="1" [% IF direct_debit %]checked[% END %]></td>
+ <th align="left" nowrap>[% 'direct debit' | $T8 %]</th>
+ </tr>
</table>
</td>
</tr>
<tr>
<th align="right" nowrap>[% 'Project Number' | $T8 %]</th>
- <td>[% globalprojectnumber %]</td>
+ <td>
+ [% L.select_tag('globalproject_id', ALL_PROJECTS, with_empty = 1, default = globalproject_id, value_key = 'id', title_key = 'projectnumber') %]
+ </td>
</tr>
</table>
</td>
[% FOREACH i IN [1..rowcount] %]
<tr>
<td>
- [% temp = "selectAP_amount_"_ i %][% $temp %]
+ [% selected_accno_full = "selected_accno_full_"_ i %]
+ [% L.select_tag('AP_amount_'_ i, ALL_CHARTS_AP_amount, value_title_sub = \AP_amount_value_title_sub, onchange = 'setTaxkey(this, '_ i _')', default = $selected_accno_full) %]
+
+ <input type="hidden" name="previous_AP_amount_[% i %]" value="[% $selected_accno_full %]">
<input type="hidden" name="tax_[% i %]" value="[% temp = "tax"_ i %][% $temp | html %]">
</td>
<td>
[% temp = "tax_"_ i %][% $temp | html %]
</td>
<td>
- [% temp = "select_tax_"_ i %][% $temp %]
+ [% temp = 'selected_taxchart_'_ i %]
+ [% L.select_tag('taxchart_'_ i, ALL_TAXCHARTS, value_title_sub = \taxchart_value_title_sub, default = $temp) %]
</td>
<td>
- [% temp = "select_projectnumber_"_ i %][% $temp %]
+ [% temp = "project_id_"_ i %]
+ [% L.select_tag(temp, ALL_PROJECTS, with_empty = 1, default = loop.last ? globalproject_id : $temp, value_key = 'id', title_key = 'projectnumber') %]
</td>
</tr>
[% END %]
</td>
</tr>
<tr>
- <td>[% APselected %]</td>
+ <td>
+ [% L.select_tag('APselected', ALL_CHARTS_AP, value_title_sub = \APselected_value_title_sub, default = APselected) %]
+ </td>
<th align="left">[% invtotal | html %]</th>
<td colspan="4"></td>
</tr>
[% temp = "AP_paid_"_ i %]
<td align="center">
[% IF( changeable ) %]
- [% temp = "select"_ temp %]
- [% $temp %]
+ [% L.select_tag(temp, ALL_CHARTS_AP_paid, value_title_sub = \AP_paid_value_title_sub, default = $temp) %]
[% ELSE %]
[% $temp | html %]
<input type="hidden" name="[% temp %]" value="[% $temp | html %]">
[% END %]
</td>
- [% temp = "paid_project_id_"_ i %]
<td align="center">
+ [% temp = "paid_project_id_"_ i %]
[% IF( changeable ) %]
- [% temp = "select"_ temp %]
- [% $temp %]
+ [% L.select_tag(temp, ALL_PROJECTS, with_empty = 1, default = $temp, value_key = 'id', title_key = 'projectnumber') %]
[% ELSE %]
<input type="hidden" name="[% temp %]" value="[% $temp | html %]">
[% temp = "label"_ temp %]
</table>
</td>
</tr>
- <tr>
- <td><hr size="3" noshade></td>
- </tr>
</table>
+</div>
+</div>