|
[% USE HTML %]
|
|
[% USE T8 %]
|
|
[% USE L %]
|
|
[% USE P %]
|
|
[% USE LxERP %]
|
|
|
|
[% SET WEBDAV = SELF.webdav_objects %]
|
|
|
|
<h1>[% title | html %]</h1>
|
|
|
|
<form action='controller.pl' method='POST' id='form'>
|
|
<input type="hidden" name="letter.id" value="[% letter.id | html %]">
|
|
<input type="hidden" name="draft.id" value="[% draft.id | html %]">
|
|
<input type="hidden" name="type" value="[% type | html %]">
|
|
[% L.hidden_tag('is_sales', SELF.is_sales) %]
|
|
|
|
[% INCLUDE 'common/flash.html' %]
|
|
|
|
<div id="oe_tabs" class="tabwidget">
|
|
<ul>
|
|
<li><a href="#ui-tabs-letter">[% LxERP.t8("Letter") %]</a></li>
|
|
[% IF letter.id %]
|
|
[% IF INSTANCE_CONF.get_webdav %]
|
|
<li><a href="#ui-tabs-webdav">[% LxERP.t8('WebDAV') %]</a></li>
|
|
[% END %]
|
|
<li><a href="controller.pl?action=RecordLinks/ajax_list&object_model=Letter&object_id=[% HTML.url(letter.id) %]">[% LxERP.t8("Linked Records") %]</a></li>
|
|
[% END %]
|
|
</ul>
|
|
|
|
<div id="ui-tabs-letter">
|
|
|
|
<div class="wrapper">
|
|
|
|
<table class="tbl-horizontal col">
|
|
<colgroup> <col class="wi-small"><col class="wi-lightwide"> </colgroup>
|
|
<tbody>
|
|
[% IF SELF.is_sales %]
|
|
<tr>
|
|
<th>[% 'Customer' | $T8 %]</th>
|
|
<td>[% P.customer_vendor.picker('letter.customer_id', letter.customer_id, type='customer', class='wi-wide') %]</td>
|
|
</tr>
|
|
[% ELSE %]
|
|
<tr>
|
|
<th>[% 'Vendor' | $T8 %]</th>
|
|
<td>[% P.customer_vendor.picker('letter.vendor_id', letter.vendor_id, type='vendor', class='wi-wide') %]</td>
|
|
</tr>
|
|
[% END %]
|
|
<tr>
|
|
<th>[% 'Contact Person' | $T8 %]</th>
|
|
<td>[% L.select_tag('letter.cp_id', letter.customer_vendor_id ? letter.customer_vendor.contacts : [], value_key='cp_id', title_key='full_name', default=letter.cp_id, class='wi-wide') %]</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
|
|
<table class="tbl-horizontal col">
|
|
<tbody>
|
|
<tr>
|
|
<th>[% 'Your Reference' | $T8 %]</th>
|
|
<td><input type="text" name='letter.reference' value='[% letter.reference | html %]' class="wi-small">
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th>[% 'Letternumber' | $T8 %]:</th>
|
|
<td><input type="text" name='letter.letternumber' value='[% letter.letternumber | html %]' class="wi-small">
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
|
|
<table class="tbl-horizontal col">
|
|
<tbody>
|
|
<tr>
|
|
<th>[% 'Employee' | $T8 %]</th>
|
|
<td>[% L.select_tag('letter.employee_id', employees, default=letter.employee_id, title_key='safe_name', class='wi-wide', allow_empty=1,) %]</td>
|
|
</tr>
|
|
<tr>
|
|
<th>[% 'Salesman' | $T8 %]</th>
|
|
<td>[% L.select_tag('letter.salesman_id', employees, default=letter.salesman_id, title_key='safe_name', class='wi-wide', allow_empty=1,) %]</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
|
|
</div><!-- /.wrapper -->
|
|
|
|
|
|
<div class="wrapper">
|
|
|
|
<table class="tbl-horizontal">
|
|
<colgroup> <col class="wi-small"><col class="wi-wider"> </colgroup>
|
|
<tbody>
|
|
<tr>
|
|
<th>[% 'Date' | $T8 %]</th>
|
|
<td>[% L.date_tag('letter.date_as_date', letter.date_as_date, readonly=readonly) %]</td>
|
|
</tr>
|
|
<tr>
|
|
<th>[% 'Subject' | $T8 %]</th>
|
|
<td><textarea name='letter.subject' rows=1 class="wi-wider">[% letter.subject | html %]</textarea>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th>[% 'Greeting' | $T8 %]</th>
|
|
<td> <input type="text" name='letter.greeting' value="[% letter.greeting | html %]" class="wi-wider">
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th>[% 'Body' | $T8 %]</th>
|
|
<td>[% L.textarea_tag('letter.body_as_restricted_html', letter.body_as_restricted_html, rows=20, class="texteditor wi-wider") %]</td>
|
|
</tr>
|
|
<tr>
|
|
<th>[% 'Internal Notes' | $T8 %]</th>
|
|
<td><textarea name='letter.intnotes' rows=4 class="wi-wider">[% letter.intnotes | html %]</textarea>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
|
|
<div id="email_inputs" class="hidden"></div>
|
|
<div id="print_options" class="hidden">[% print_options %]</div>
|
|
|
|
</div><!-- /.wrapper -->
|
|
|
|
</div><!-- /.ui-tabs-letter -->
|
|
|
|
[% PROCESS 'webdav/_list.html' %]
|
|
<div id="ui-tabs-1">
|
|
[% LxERP.t8("Loading...") %]
|
|
</div>
|
|
|
|
</div><!-- /.tabwidget -->
|
|
|
|
</form>
|
|
|
|
<div id="print_dialog" class="hidden">
|
|
[% PROCESS 'common/_print_dialog.html' %]
|
|
</div>
|