[%- USE T8 %]
[%- USE LxERP %][%- USE P -%]
-<h1>[% title | html %]</h1>
+<h1>
+ [% IF workflow_email_journal_id; LxERP.t8("Email Journal Workflow") _ " - "; END; %]
+ [% title | html %]
+</h1>
[%- INCLUDE 'common/flash.html' %]
[% L.hidden_tag('follow_up_rowcount', 1) %]
<input type="hidden" name="lastmtime" value="[% HTML.escape(lastmtime) %]">
+[% IF !id %]
+[% L.hidden_tag('form_validity_token', form_validity_token) %]
+[% END %]
+[% L.hidden_tag('email_journal_id', email_journal_id) %]
+[% L.hidden_tag('email_attachment_id', email_attachment_id) %]
+[% L.hidden_tag('workflow_email_journal_id', workflow_email_journal_id) %]
+[% L.hidden_tag('workflow_email_attachment_id', workflow_email_attachment_id) %]
+[% L.hidden_tag('workflow_email_callback', workflow_email_callback) %]
+
[%- IF saved_message %]<p>[% saved_message | html %]</p>[% END %]
<div class="tabwidget">
<ul>
<li><a href="#ui-tabs-basic-data">[% 'Basic Data' | $T8 %]</a></li>
+ [% IF email_attachment_id || workflow_email_attachment_id %]
+ <li><a href="controller.pl?action=EmailJournal/attachment_preview&attachment_id=[% HTML.url(email_attachment_id || workflow_email_attachment_id) %]">[% 'Email Attachment Preview' | $T8 %]</a></li>
+ [% END %]
[%- IF id %]
[%- IF INSTANCE_CONF.get_doc_storage %]
<li><a href="controller.pl?action=File/list&file_type=attachment&object_type=invoice&object_id=[% HTML.url(id) %]">[% 'Attachments' | $T8 %]</a></li>
<tr>
<th align="right" nowrap>[% 'Customer' | $T8 %]</th>
<td colspan=3>
- [% P.customer_vendor.picker("customer_id", customer_id, type="customer", style="width: 330px", class=(initial_focus == 'customer_id' ? "initial_focus" : ""), onchange="\$('#update_button').click()") %]
- [% L.button_tag("show_vc_details('customer')", LxERP.t8('Details (one letter abbreviation)')) %]
+ [% P.customer_vendor.picker("customer_id", customer_id, type="customer",
+ show_details="1", style="width: 330px", class=(initial_focus == 'customer_id' ? "initial_focus" : "")) %]
[% L.hidden_tag("previous_customer_id", customer_id) %]
[% L.hidden_tag('terms', terms) %]
</td>
[%- END %]
<tr>
<th align=right>[% 'Currency' | $T8 %]</th>
- <td>[% L.select_tag("currency", currencies, default=currency, value_key="name", title_key="name") %]</td>
+ <td>
+ [%- IF readonly %]
+ [% HTML.escape(currency) %]
+ [% L.hidden_tag("currency", currency) %]
+ [%- ELSE %]
+ [% L.select_tag("currency", currencies, default=currency, value_key="name", title_key="name") %]
+ [%- END %]
+ </td>
[% L.hidden_tag('defaultcurrency', defaultcurrency) %]
[% L.hidden_tag('fxgain_accno', fxgain_accno) %]
[% L.hidden_tag('fxloss_accno', fxloss_accno) %]
[% L.hidden_tag('forex', forex) %]
[% IF show_exch %]
<th align=right>[% 'Exchangerate' | $T8 %]</th>
- <td>[%- IF forex %][% L.hidden_tag('exchangerate', LxERP.format_amount(exchangerate, 5, 1)) %][% LxERP.format_amount(exchangerate, 5, 1) %][%- ELSE %][% L.input_tag('exchangerate', LxERP.format_amount(exchangerate, 5, 1), size=10) %][%- END %]</td>
+ <td>
+ [%- IF readonly %]
+ [% LxERP.format_amount(exchangerate, 5) %]
+ [% L.hidden_tag("exchangerate", LxERP.format_amount(exchangerate, 5)) %]
+ [%- ELSE %]
+ <input name="exchangerate" size="10" value="[% HTML.escape(LxERP.format_amount(exchangerate)) %]">
+ [%- END %]
+ [% IF record_forex %][% 'record exchange rate' | $T8 %][%- ELSE %][% 'default exchange rate' | $T8 %][%- END %]
+ </td>
[% END %]
</tr>
[% IF ALL_DEPARTMENTS %]
[%- IF row.changeable %]
<input name="paid_[% loop.count %]" size=11 data-validate="number" class="numeric" value="[% row.paid ? LxERP.format_amount(row.paid, 2) : '' | html %]">
[%- ELSE %]
- [% row.paid | html %]<input type=hidden name="paid_[% loop.count %]" value="[% row.paid ? LxERP.format_amount(row.paid, 2) : '' | html %]">
+ [% row.paid | html %]<input type=hidden name="paid_[% loop.count %]" value="[% row.paid ? LxERP.format_amount(row.paid, 2) : '' | html %]"> [% defaultcurrency %]
[%- END %]
</td>
<td>
</td>
[%- IF show_exch %]
<td align=center>
+ <input type="hidden" name="fx_transaction_[% loop.count %]" value="1">
[%- IF row.forex || !row.changeable%]
- <input type=hidden name="exchangerate_[% loop.count %]" value="[%- LxERP.format_amount(row.exchangerate, 5, 1) -%]">[%- LxERP.format_amount(row.exchangerate, 5, 1) -%]
+ <input type=hidden name="exchangerate_[% loop.count %]" value="[%- LxERP.format_amount(row.exchangerate, 5, 1) -%]">
+ [%- LxERP.format_amount(row.exchangerate, 5, 0) -%] = [% LxERP.format_amount(row.defaultcurrency_paid, 2) %] [% defaultcurrency %]</br>
+ [% IF $record_forex %][% 'bank transaction exchange rate' | $T8 %][%- ELSE %][% 'default exchange rate' | $T8 %][%- END %]
[%- ELSE %]
<input name="exchangerate_[% loop.count %]" size=10 value="[%- LxERP.format_amount(row.exchangerate, 5, 1) -%]">
[%- END %]
<td></td>
<td></td>
<td align="center">[% 'Total' | $T8 %]</td>
- <td align="center">[% LxERP.format_amount(totalpaid, 2) | html %]</td>
+ <td align="center">[% LxERP.format_amount(totalpaid, 2) | html %] [% currency %] </td>
+ [% IF show_exch %]
+ <td></td>
+ <td align="center">[% LxERP.format_amount(defaultcurrency_totalpaid, 2) | html %] [% defaultcurrency %]</td>
+ <input type="hidden" name="defaultcurrency_totalpaid" value="[% defaultcurrency_totalpaid %]">
+ <input type="hidden" name="is_linked_bank_transaction" value="[% is_linked_bank_transaction %]">
+ [% END %]
</tr>
<tr>
<td></td>
<td></td>
<td align="center">[% 'Missing amount' | $T8 %]</td>
- <td align="center">[% LxERP.format_amount(paid_missing, 2) | html %]</td>
+ <td align="center">[% LxERP.format_amount(paid_missing, 2) | html %] [% currency %]</td>
</tr>
<input type=hidden name=paidaccounts value='[% paidaccounts %]'>