Revision a85900cb
Von Hans Peter Schlaepfer vor etwa 6 Jahren hinzugefügt
templates/webpages/do/form_header.html | ||
---|---|---|
5 | 5 |
|
6 | 6 |
[%# Determine which shipping address to show if the delivery order has been shipped already. %] |
7 | 7 |
[%- IF delivered; |
8 |
SET shipto_label = []; |
|
9 |
IF shipto_id; |
|
10 |
FOREACH row = ALL_SHIPTO ; |
|
11 |
IF row.shipto_id == shipto_id ; |
|
12 |
SET shipto_label = [ row.shiptoname, row.shiptodepartment_1, row.shiptostreet, row.shiptocity ] ; |
|
13 |
END ; |
|
14 |
END ; |
|
15 |
ELSE ; |
|
16 |
SET shipto_label = [ shiptoname, shiptodepartment_1, shiptostreet, shiptocity ] ; |
|
8 |
SET shipto_label = []; |
|
9 |
IF shipto_id; |
|
10 |
FOREACH row = ALL_SHIPTO ; |
|
11 |
IF row.shipto_id == shipto_id ; |
|
12 |
SET shipto_label = [ row.shiptoname, row.shiptodepartment_1, row.shiptostreet, row.shiptocity ] ; |
|
17 | 13 |
END ; |
14 |
END ; |
|
15 |
ELSE ; |
|
16 |
SET shipto_label = [ shiptoname, shiptodepartment_1, shiptostreet, shiptocity ] ; |
|
17 |
END ; |
|
18 | 18 |
|
19 |
SET shipto_label = shipto_label.grep('.') ;
|
|
20 |
IF !shipto_label.size ;
|
|
21 |
shipto_label = [ LxERP.t8('no shipping address') ] ;
|
|
22 |
END ;
|
|
23 |
END ; %]
|
|
19 |
SET shipto_label = shipto_label.grep('.') ; |
|
20 |
IF !shipto_label.size ; |
|
21 |
shipto_label = [ LxERP.t8('no shipping address') ] ; |
|
22 |
END ; |
|
23 |
END ; %] |
|
24 | 24 |
|
25 | 25 |
<h1>[% title %]</h1> |
26 | 26 |
|
27 |
<script type="text/javascript" src="js/show_form_details.js"></script> |
|
28 |
<script type="text/javascript" src="js/show_history.js"></script> |
|
29 |
<script type="text/javascript" src="js/show_vc_details.js"></script> |
|
30 |
<script type="text/javascript" src="js/delivery_customer_selection.js"></script> |
|
31 |
<script type="text/javascript" src="js/calculate_qty.js"></script> |
|
32 |
<script type="text/javascript" src="js/stock_in_out.js"></script> |
|
33 |
<script type="text/javascript" src="js/follow_up.js"></script> |
|
34 |
<script type="text/javascript" src="js/kivi.SalesPurchase.js"></script> |
|
35 |
|
|
36 |
<style type="text/css"> |
|
37 |
.fixed_width { |
|
38 |
width: 250px; |
|
39 |
} |
|
40 |
</style> |
|
41 |
|
|
42 |
[%- IF vc == 'customer' %] |
|
43 |
[%- SET is_customer = '1' %] |
|
44 |
[%- ELSE %] |
|
45 |
[%- SET vc = 'vendor' %] |
|
46 |
[%- SET is_customer = '0' %] |
|
47 |
[%- END %] |
|
48 |
[%- SET vc_id = vc _ "_id" %] |
|
49 |
[%- IF delivered %] |
|
50 |
[%- SET DISABLED = ' disabled' %] |
|
51 |
[%- END %] |
|
27 |
<script type="text/javascript" src="js/show_form_details.js"></script> |
|
28 |
<script type="text/javascript" src="js/show_history.js"></script> |
|
29 |
<script type="text/javascript" src="js/show_vc_details.js"></script> |
|
30 |
<script type="text/javascript" src="js/delivery_customer_selection.js"></script> |
|
31 |
<script type="text/javascript" src="js/calculate_qty.js"></script> |
|
32 |
<script type="text/javascript" src="js/stock_in_out.js"></script> |
|
33 |
<script type="text/javascript" src="js/follow_up.js"></script> |
|
34 |
<script type="text/javascript" src="js/kivi.SalesPurchase.js"></script> |
|
35 |
|
|
36 |
|
|
37 |
[%- IF vc == 'customer' %] |
|
38 |
[%- SET is_customer = '1' %] |
|
39 |
[%- ELSE %] |
|
40 |
[%- SET vc = 'vendor' %] |
|
41 |
[%- SET is_customer = '0' %] |
|
42 |
[%- END %] |
|
43 |
[%- SET vc_id = vc _ "_id" %] |
|
44 |
[%- IF delivered %] |
|
45 |
[%- SET DISABLED = ' disabled' %] |
|
46 |
[%- END %] |
|
52 | 47 |
|
53 | 48 |
[%- INCLUDE 'common/flash.html' %] |
54 | 49 |
[%- INCLUDE 'generic/set_longdescription.html' %] |
55 | 50 |
|
56 |
[%- IF ERRORS && ERRORS.size %] |
|
57 |
<p><font color="#ff0000">[% ERRORS.join('<br>') %]</font></p> |
|
58 |
[%- END %] |
|
59 |
|
|
60 |
<form id="form" method="post" name="do" action="do.pl"> |
|
61 |
|
|
62 |
<div id="do_tabs" class="tabwidget"> |
|
63 |
<ul> |
|
64 |
<li><a href="#ui-tabs-basic-data">[% 'Basic Data' | $T8 %]</a></li> |
|
65 |
[%- IF INSTANCE_CONF.get_webdav %] |
|
66 |
<li><a href="#ui-tabs-webdav">[% 'WebDAV' | $T8 %]</a></li> |
|
67 |
[%- END %] |
|
68 |
[%- IF id AND INSTANCE_CONF.get_doc_storage %] |
|
69 |
<li><a href="controller.pl?action=File/list&file_type=document&object_type=[% HTML.escape(type) %]&object_id=[% HTML.url(id) %]">[% 'Documents' | $T8 %]</a></li> |
|
70 |
<li><a href="controller.pl?action=File/list&file_type=attachment&object_type=[% HTML.escape(type) %]&object_id=[% HTML.url(id) %]">[% 'Attachments' | $T8 %]</a></li> |
|
51 |
[%- IF ERRORS && ERRORS.size %] |
|
52 |
<p><font color="#ff0000">[% ERRORS.join('<br>') %]</font></p><!-- PENDENT: Message-Style --> |
|
71 | 53 |
[%- END %] |
72 |
[%- IF id AND AUTH.assert('record_links', 1) %] |
|
73 |
<li><a href="controller.pl?action=RecordLinks/ajax_list&object_model=DeliveryOrder&object_id=[% HTML.url(id) %]">[% 'Linked Records' | $T8 %]</a></li> |
|
54 |
|
|
55 |
<form id="form" method="post" name="do" action="do.pl"> |
|
56 |
|
|
57 |
<div id="do_tabs" class="tabwidget"> |
|
58 |
<ul> |
|
59 |
<li><a href="#ui-tabs-basic-data">[% 'Basic Data' | $T8 %]</a></li> |
|
60 |
[%- IF INSTANCE_CONF.get_webdav %] |
|
61 |
<li><a href="#ui-tabs-webdav">[% 'WebDAV' | $T8 %]</a></li> |
|
62 |
[%- END %] |
|
63 |
[%- IF id AND INSTANCE_CONF.get_doc_storage %] |
|
64 |
<li><a href="controller.pl?action=File/list&file_type=document&object_type=[% HTML.escape(type) %]&object_id=[% HTML.url(id) %]">[% 'Documents' | $T8 %]</a></li> |
|
65 |
<li><a href="controller.pl?action=File/list&file_type=attachment&object_type=[% HTML.escape(type) %]&object_id=[% HTML.url(id) %]">[% 'Attachments' | $T8 %]</a></li> |
|
66 |
[%- END %] |
|
67 |
[%- IF id AND AUTH.assert('record_links', 1) %] |
|
68 |
<li><a href="controller.pl?action=RecordLinks/ajax_list&object_model=DeliveryOrder&object_id=[% HTML.url(id) %]">[% 'Linked Records' | $T8 %]</a></li> |
|
69 |
[%- END %] |
|
70 |
</ul> |
|
71 |
|
|
72 |
<div id="ui-tabs-basic-data"> |
|
73 |
|
|
74 |
<input type="hidden" name="follow_up_trans_id_1" id="follow_up_trans_id_1" value="[% HTML.escape(id) %]"> |
|
75 |
<input type="hidden" name="follow_up_trans_type_1" id="follow_up_trans_type_1" value="[% HTML.escape(type) %]"> |
|
76 |
<input type="hidden" name="follow_up_trans_info_1" id="follow_up_trans_info_1" value="[% HTML.escape(follow_up_trans_info) %]"> |
|
77 |
<input type="hidden" name="follow_up_rowcount" id="follow_up_rowcount" value="1"> |
|
78 |
|
|
79 |
<input type="hidden" name="business" id="business" value="[% HTML.escape(business) %]"> |
|
80 |
<input type="hidden" name="closed" id="closed" value="[% HTML.escape(closed) %]"> |
|
81 |
<input type="hidden" name="convert_from_oe_ids" id="convert_from_oe_ids" value="[% HTML.escape(convert_from_oe_ids) %]"> |
|
82 |
<input type="hidden" name="currency" id="currency" value="[% HTML.escape(currency) %]"> |
|
83 |
<input type="hidden" name="customer_pricegroup_id" id="customer_pricegroup_id" value="[% HTML.escape(customer_pricegroup_id) %]"> |
|
84 |
<input type="hidden" name="discount" id="discount" value="[% HTML.escape(discount) %]"> |
|
85 |
<input type="hidden" name="dunning_amount" id="dunning_amount" value="[% HTML.escape(dunning_amount) %]"> |
|
86 |
<input type="hidden" name="emailed" id="emailed" value="[% HTML.escape(emailed) %]"> |
|
87 |
<input type="hidden" name="id" id="id" value="[% HTML.escape(id) %]"> |
|
88 |
<input type="hidden" name="max_dunning_level" id="max_dunning_level" value="[% HTML.escape(max_dunning_level) %]"> |
|
89 |
<input type="hidden" name="printed" id="printed" value="[% HTML.escape(printed) %]"> |
|
90 |
<input type="hidden" name="proforma" id="proforma" value="[% HTML.escape(proforma) %]"> |
|
91 |
<input type="hidden" name="queued" id="queued" value="[% HTML.escape(queued) %]"> |
|
92 |
<input type="hidden" name="saved_donumber" id="saved_donumber" value="[% HTML.escape(saved_donumber) %]"> |
|
93 |
[%- IF delivered %] |
|
94 |
<input type="hidden" name="shipto_id" id="shipto_id" value="[% HTML.escape(shipto_id) %]"> |
|
95 |
<input type="hidden" name="shiptocity" id="shiptocity" value="[% HTML.escape(shiptocity) %]"> |
|
96 |
<input type="hidden" name="shiptocontact" id="shiptocontact" value="[% HTML.escape(shiptocontact) %]"> |
|
97 |
<input type="hidden" name="shiptocp_gender" id="shiptocp_gender" value="[% HTML.escape(shiptocp_gender) %]"> |
|
98 |
<input type="hidden" name="shiptocountry" id="shiptocountry" value="[% HTML.escape(shiptocountry) %]"> |
|
99 |
<input type="hidden" name="shiptogln" id="shiptogln" value="[% HTML.escape(shiptogln) %]"> |
|
100 |
<input type="hidden" name="shiptodepartment_1" id="shiptodepartment_1" value="[% HTML.escape(shiptodepartment_1) %]"> |
|
101 |
<input type="hidden" name="shiptodepartment_2" id="shiptodepartment_2" value="[% HTML.escape(shiptodepartment_2) %]"> |
|
102 |
<input type="hidden" name="shiptoemail" id="shiptoemail" value="[% HTML.escape(shiptoemail) %]"> |
|
103 |
<input type="hidden" name="shiptofax" id="shiptofax" value="[% HTML.escape(shiptofax) %]"> |
|
104 |
<input type="hidden" name="shiptoname" id="shiptoname" value="[% HTML.escape(shiptoname) %]"> |
|
105 |
<input type="hidden" name="shiptophone" id="shiptophone" value="[% HTML.escape(shiptophone) %]"> |
|
106 |
<input type="hidden" name="shiptostreet" id="shiptostreet" value="[% HTML.escape(shiptostreet) %]"> |
|
107 |
<input type="hidden" name="shiptozipcode" id="shiptozipcode" value="[% HTML.escape(shiptozipcode) %]"> |
|
108 |
<input type="hidden" name="shiptocp_gender" id="shiptocp_gender" value="[% HTML.escape(shiptocp_gender) %]"> |
|
74 | 109 |
[%- END %] |
75 |
</ul> |
|
76 |
|
|
77 |
<div id="ui-tabs-basic-data"> |
|
78 |
|
|
79 |
<input type="hidden" name="follow_up_trans_id_1" id="follow_up_trans_id_1" value="[% HTML.escape(id) %]"> |
|
80 |
<input type="hidden" name="follow_up_trans_type_1" id="follow_up_trans_type_1" value="[% HTML.escape(type) %]"> |
|
81 |
<input type="hidden" name="follow_up_trans_info_1" id="follow_up_trans_info_1" value="[% HTML.escape(follow_up_trans_info) %]"> |
|
82 |
<input type="hidden" name="follow_up_rowcount" id="follow_up_rowcount" value="1"> |
|
83 |
|
|
84 |
|
|
85 |
<input type="hidden" name="business" id="business" value="[% HTML.escape(business) %]"> |
|
86 |
<input type="hidden" name="closed" id="closed" value="[% HTML.escape(closed) %]"> |
|
87 |
<input type="hidden" name="convert_from_oe_ids" id="convert_from_oe_ids" value="[% HTML.escape(convert_from_oe_ids) %]"> |
|
88 |
<input type="hidden" name="currency" id="currency" value="[% HTML.escape(currency) %]"> |
|
89 |
<input type="hidden" name="customer_pricegroup_id" id="customer_pricegroup_id" value="[% HTML.escape(customer_pricegroup_id) %]"> |
|
90 |
<input type="hidden" name="discount" id="discount" value="[% HTML.escape(discount) %]"> |
|
91 |
<input type="hidden" name="dunning_amount" id="dunning_amount" value="[% HTML.escape(dunning_amount) %]"> |
|
92 |
<input type="hidden" name="emailed" id="emailed" value="[% HTML.escape(emailed) %]"> |
|
93 |
<input type="hidden" name="id" id="id" value="[% HTML.escape(id) %]"> |
|
94 |
<input type="hidden" name="max_dunning_level" id="max_dunning_level" value="[% HTML.escape(max_dunning_level) %]"> |
|
95 |
<input type="hidden" name="printed" id="printed" value="[% HTML.escape(printed) %]"> |
|
96 |
<input type="hidden" name="proforma" id="proforma" value="[% HTML.escape(proforma) %]"> |
|
97 |
<input type="hidden" name="queued" id="queued" value="[% HTML.escape(queued) %]"> |
|
98 |
<input type="hidden" name="saved_donumber" id="saved_donumber" value="[% HTML.escape(saved_donumber) %]"> |
|
99 |
[%- IF delivered %] |
|
100 |
<input type="hidden" name="shipto_id" id="shipto_id" value="[% HTML.escape(shipto_id) %]"> |
|
101 |
<input type="hidden" name="shiptocity" id="shiptocity" value="[% HTML.escape(shiptocity) %]"> |
|
102 |
<input type="hidden" name="shiptocontact" id="shiptocontact" value="[% HTML.escape(shiptocontact) %]"> |
|
103 |
<input type="hidden" name="shiptocp_gender" id="shiptocp_gender" value="[% HTML.escape(shiptocp_gender) %]"> |
|
104 |
<input type="hidden" name="shiptocountry" id="shiptocountry" value="[% HTML.escape(shiptocountry) %]"> |
|
105 |
<input type="hidden" name="shiptogln" id="shiptogln" value="[% HTML.escape(shiptogln) %]"> |
|
106 |
<input type="hidden" name="shiptodepartment_1" id="shiptodepartment_1" value="[% HTML.escape(shiptodepartment_1) %]"> |
|
107 |
<input type="hidden" name="shiptodepartment_2" id="shiptodepartment_2" value="[% HTML.escape(shiptodepartment_2) %]"> |
|
108 |
<input type="hidden" name="shiptoemail" id="shiptoemail" value="[% HTML.escape(shiptoemail) %]"> |
|
109 |
<input type="hidden" name="shiptofax" id="shiptofax" value="[% HTML.escape(shiptofax) %]"> |
|
110 |
<input type="hidden" name="shiptoname" id="shiptoname" value="[% HTML.escape(shiptoname) %]"> |
|
111 |
<input type="hidden" name="shiptophone" id="shiptophone" value="[% HTML.escape(shiptophone) %]"> |
|
112 |
<input type="hidden" name="shiptostreet" id="shiptostreet" value="[% HTML.escape(shiptostreet) %]"> |
|
113 |
<input type="hidden" name="shiptozipcode" id="shiptozipcode" value="[% HTML.escape(shiptozipcode) %]"> |
|
114 |
<input type="hidden" name="shiptocp_gender" id="shiptocp_gender" value="[% HTML.escape(shiptocp_gender) %]"> |
|
115 |
[%- END %] |
|
116 |
<input type="hidden" name="show_details" id="show_details" value="[% HTML.escape(show_details) %]"> |
|
117 |
<input type="hidden" name="taxincluded" id="taxincluded" value="[% HTML.escape(taxincluded) %]"> |
|
118 |
<input type="hidden" name="taxzone_id" id="taxzone_id" value="[% HTML.escape(taxzone_id) %]"> |
|
119 |
<input type="hidden" name="title" id="title" value="[% HTML.escape(title) %]"> |
|
120 |
<input type="hidden" name="type" id="type" value="[% HTML.escape(type) %]"> |
|
121 |
<input type="hidden" name="vc" id="vc" value="[% HTML.escape(vc) %]"> |
|
122 |
<input type="hidden" name="lastmtime" id="lastmtime" value="[% HTML.escape(lastmtime) %]"> |
|
110 |
<input type="hidden" name="show_details" id="show_details" value="[% HTML.escape(show_details) %]"> |
|
111 |
<input type="hidden" name="taxincluded" id="taxincluded" value="[% HTML.escape(taxincluded) %]"> |
|
112 |
<input type="hidden" name="taxzone_id" id="taxzone_id" value="[% HTML.escape(taxzone_id) %]"> |
|
113 |
<input type="hidden" name="title" id="title" value="[% HTML.escape(title) %]"> |
|
114 |
<input type="hidden" name="type" id="type" value="[% HTML.escape(type) %]"> |
|
115 |
<input type="hidden" name="vc" id="vc" value="[% HTML.escape(vc) %]"> |
|
116 |
<input type="hidden" name="lastmtime" id="lastmtime" value="[% HTML.escape(lastmtime) %]"> |
|
123 | 117 |
[%- FOREACH row = HIDDENS %] |
124 | 118 |
[% L.hidden_tag(row.name, row.value) %] |
125 | 119 |
[%- END %] |
126 | 120 |
|
127 |
<p> |
|
128 |
<table width="100%"> |
|
129 |
<tr valign="top"> |
|
130 |
<td> |
|
131 |
<table width="100%"> |
|
132 |
<tr> |
|
133 |
<th align="right">[% IF is_customer %][% 'Customer' | $T8 %][% ELSE %][% 'Vendor' | $T8 %][% END %]</th> |
|
134 |
<td> |
|
135 |
[% IF RO %] |
|
136 |
[% P.hidden_tag(vc_id, $vc_id) %] |
|
137 |
[% HTML.escape(VC_OBJ.name) %] |
|
138 |
[% ELSE %] |
|
139 |
[% P.customer_vendor_picker(vc_id, $vc_id, type=vc, class="fixed_width", onchange="\$('#update_button').click()") %] |
|
140 |
[% END %] |
|
141 |
[% P.hidden_tag("previous_" _ vc_id, $vc_id) %] |
|
142 |
[% P.button_tag("show_vc_details('" _ HTML.escape(vc) _ "')", LxERP.t8("Details (one letter abbreviation)")) %] |
|
143 |
</td> |
|
144 |
|
|
145 |
[%- IF ALL_CONTACTS.size %] |
|
146 |
<tr> |
|
147 |
<th align="right">[% 'Contact Person' | $T8 %]</th> |
|
148 |
<td> |
|
149 |
[%- IF delivered %] |
|
150 |
[% L.hidden_tag("cp_id", cp_id) %] |
|
151 |
[% HTML.escape(CONTACT_OBJ.full_name) %][% IF CONTACT_OBJ.cp_abteilung %] ([% HTML.escape(CONTACT_OBJ.cp_abteilung) %])[% END %] |
|
152 |
[%- ELSE %] |
|
153 |
[% L.select_tag('cp_id', ALL_CONTACTS, default = cp_id, value_key = 'cp_id', title_key = 'full_name_dep', with_empty = 1, style='width: 250px') %] |
|
154 |
[%- END %] |
|
155 |
</td> |
|
156 |
</tr> |
|
157 |
[%- END %] |
|
158 |
|
|
159 |
<tr> |
|
160 |
<th align="right">[% 'Shipping Address' | $T8 %]</th> |
|
161 |
<td> |
|
162 |
[%- IF delivered %] |
|
163 |
[% HTML.escape(shipto_label.join('; ')) %] |
|
164 |
[%- ELSE %] |
|
165 |
[%- IF ALL_SHIPTO.size %] |
|
166 |
[% shiptos = [ [ "", LxERP.t8("No/individual shipping address") ] ] ; |
|
167 |
L.select_tag('shipto_id', shiptos.import(ALL_SHIPTO), default=shipto_id, value_key='shipto_id', title_key='displayable_id', style='width: 250px') %] |
|
168 |
[%- END %] |
|
169 |
[% L.button_tag("kivi.SalesPurchase.edit_custom_shipto()", LxERP.t8("Custom shipto")) %] |
|
170 |
[%- END %] |
|
171 |
</td> |
|
172 |
</tr> |
|
173 |
|
|
174 |
[%- IF business %] |
|
175 |
<tr> |
|
176 |
<th align="right">[% IF is_customer %][% 'Customer type' | $T8 %][% ELSE %][% 'Vendor type' | $T8 %][% END %]</th> |
|
177 |
<td>[% HTML.escape(business) %]</td> |
|
178 |
</tr> |
|
179 |
[%- END %] |
|
180 |
|
|
181 |
[%- IF max_dunning_level %] |
|
182 |
<tr> |
|
183 |
<th align="right">[% 'Max. Dunning Level' | $T8 %]</th> |
|
184 |
<td> |
|
185 |
<b>[% HTML.escape(max_dunning_level) %]</b>; [% 'Dunning Amount' | $T8 %]: |
|
186 |
<b>[% HTML.escape(LxERP.format_amount(dunning_amount, 2)) %]</b> |
|
187 |
</td> |
|
188 |
</tr> |
|
189 |
[%- END %] |
|
190 |
</tr> |
|
191 |
|
|
192 |
[%- IF ALL_DEPARTMENTS.size %] |
|
193 |
<tr> |
|
194 |
<th align="right" nowrap>[% 'Department' | $T8 %]</th> |
|
195 |
<td colspan="3"> |
|
196 |
[% IF ( delivered ) %] |
|
197 |
[% L.hidden_tag('department_id', department_id) %] |
|
198 |
[% ELSE %] |
|
199 |
[% L.select_tag('department_id', ALL_DEPARTMENTS, default = department_id, title_key = 'description', with_empty = 1, style = 'width: 250px', disabled = delivered )%] |
|
200 |
[% END %] |
|
201 |
</td> |
|
202 |
</tr> |
|
203 |
[%- END %] |
|
204 |
|
|
205 |
<tr> |
|
206 |
<th align="right">[% 'Shipping Point' | $T8 %]</th> |
|
207 |
<td colspan="3"><input name="shippingpoint" size="35" value="[% HTML.escape(shippingpoint) %]"[% RO %]></td> |
|
208 |
</tr> |
|
209 |
|
|
210 |
<tr> |
|
211 |
<th align="right">[% 'Ship via' | $T8 %]</th> |
|
212 |
<td colspan="3"><input name="shipvia" size="35" value="[% HTML.escape(shipvia) %]"[% RO %]></td> |
|
213 |
</tr> |
|
214 |
|
|
215 |
<tr> |
|
216 |
<th align="right">[% 'Transaction description' | $T8 %]</th> |
|
217 |
<td colspan="3"><input name="transaction_description" id="transaction_description" size="35" value="[% HTML.escape(transaction_description) %]"[% RO %]></td> |
|
218 |
</tr> |
|
219 |
|
|
220 |
</table> |
|
221 |
</td> |
|
222 |
|
|
223 |
<td align="right"> |
|
224 |
<table> |
|
225 |
|
|
226 |
<tr> |
|
227 |
<td colspan="2" align="center"> |
|
228 |
[%- IF delivered %] |
|
229 |
[%- IF is_customer %] |
|
230 |
[% 'transferred out' | $T8 %] |
|
231 |
[%- ELSE %] |
|
232 |
[% 'transferred in' | $T8 %] |
|
233 |
[%- END %] |
|
234 |
[%- ELSE %] |
|
235 |
[%- IF is_customer %] |
|
236 |
[% 'not transferred out yet' | $T8 %] |
|
237 |
[%- ELSE %] |
|
238 |
[% 'not transferred in yet' | $T8 %] |
|
239 |
[%- END %] |
|
240 |
[%- END %] |
|
241 |
; |
|
242 |
[%- IF closed %] |
|
243 |
[% 'Closed' | $T8 %] |
|
244 |
[%- ELSE %] |
|
245 |
[% 'Open' | $T8 %] |
|
246 |
[%- END %] |
|
247 |
</td> |
|
248 |
</tr> |
|
249 |
|
|
250 |
<input type="hidden" name="delivered" value="[% HTML.escape(delivered) %]"> |
|
251 |
|
|
252 |
<tr> |
|
253 |
<th align="right">[% 'Employee' | $T8 %]</th> |
|
254 |
<td> |
|
255 |
[%- IF delivered %] |
|
256 |
<input type="hidden" name="employee_id" value="[% HTML.escape(employee_id) %]"> |
|
257 |
[%- FOREACH row = ALL_EMPLOYEES %] |
|
258 |
[% IF row.id == employee_id %][%- IF row.name %][%- HTML.escape(row.name) %][%- ELSE %][% HTML.escape(row.login) %][%- END %][% END %] |
|
259 |
[%- END %] |
|
260 |
[%- ELSE %] |
|
261 |
[% L.select_tag('employee_id', ALL_EMPLOYEES, default = employee_id, title_key = 'safe_name') %] |
|
262 |
[%- END %] |
|
263 |
</td> |
|
264 |
</tr> |
|
265 |
|
|
266 |
[%- IF is_customer %] |
|
267 |
[%- IF salesman_id %] |
|
268 |
[%- SET the_salesman_id = salesman_id %] |
|
269 |
[%- ELSE %] |
|
270 |
[%- SET the_salesman_id = employee_id %] |
|
271 |
[%- END %] |
|
272 |
<tr> |
|
273 |
<th align="right">[% 'Salesman' | $T8 %]</th> |
|
274 |
<td> |
|
275 |
[%- IF delivered %] |
|
276 |
<input type="hidden" name="salesman_id" value="[% HTML.escape(salesman_id) %]"> |
|
277 |
[%- FOREACH row = ALL_SALESMEN %] |
|
278 |
[% IF row.id == the_salesman_id %][%- IF row.name %][%- HTML.escape(row.name) %][%- ELSE %][% HTML.escape(row.login) %][%- END %][% END %] |
|
279 |
[%- END %] |
|
280 |
[%- ELSE %] |
|
281 |
[% L.select_tag('salesman_id', ALL_SALESMEN, default = (salesman_id ? salesman_id : employee_id), title_key = 'safe_name') %] |
|
282 |
[%- END %] |
|
283 |
</td> |
|
284 |
</tr> |
|
285 |
[%- END %] |
|
286 |
|
|
287 |
<tr> |
|
288 |
<th width="70%" align="right" nowrap>[% 'Delivery Order Number' | $T8 %]</th> |
|
289 |
<td><input name="donumber" id="donumber" size="11" value="[% HTML.escape(donumber) %]"[% RO %]></td> |
|
290 |
</tr> |
|
291 |
|
|
292 |
<tr> |
|
293 |
<th width="70%" align="right" nowrap>[% 'Order Number' | $T8 %]</th> |
|
294 |
<td><input name="ordnumber" id="ordnumber" size="11" value="[% HTML.escape(ordnumber) %]"[% RO %]></td> |
|
295 |
</tr> |
|
296 |
|
|
297 |
<tr> |
|
298 |
<th width="70%" align="right" nowrap>[% IF is_customer %][% 'Customer Order Number' | $T8 %][% ELSE %][% 'Vendor Order Number' | $T8 %][% END %]</th> |
|
299 |
<td><input name="cusordnumber" id="cusordnumber" size="11" value="[% HTML.escape(cusordnumber) %]"[% RO %]></td> |
|
300 |
</tr> |
|
301 |
|
|
302 |
<tr> |
|
303 |
<th align="right" nowrap>[% 'Delivery Order Date' | $T8 %]</th> |
|
304 |
<td nowrap> |
|
305 |
[% L.date_tag('transdate', transdate, readonly => delivered) %] |
|
306 |
</td> |
|
307 |
</tr> |
|
308 |
|
|
309 |
<tr> |
|
310 |
<th align="right" nowrap>[% 'Reqdate' | $T8 %]</th> |
|
311 |
<td nowrap> |
|
312 |
[% L.date_tag('reqdate', reqdate, readonly => delivered) %] |
|
313 |
</td> |
|
314 |
</tr> |
|
315 |
|
|
316 |
[%- IF is_customer %] |
|
317 |
<tr> |
|
318 |
<th align="right" nowrap>[% 'Insert Date' | $T8 %]</th> |
|
319 |
<td>[% insertdate %]</td> |
|
320 |
</tr> |
|
321 |
[%- END %] |
|
322 |
|
|
323 |
<tr> |
|
324 |
<th width="70%" align="right" nowrap>[% 'Project Number' | $T8 %]</th> |
|
325 |
<td> |
|
326 |
[%- IF delivered %] |
|
327 |
<input type="hidden" name="globalproject_id" value="[% HTML.escape(globalproject_id) %]"> |
|
328 |
[%- FOREACH row = ALL_PROJECTS %] |
|
329 |
[% IF globalproject_id == row.id %][% HTML.escape(row.projectnumber) %][% END %] |
|
330 |
[%- END %] |
|
331 |
[%- ELSE %] |
|
332 |
<select name="globalproject_id"> |
|
333 |
<option></option> |
|
334 |
[%- FOREACH row = ALL_PROJECTS %] |
|
335 |
<option value="[% HTML.escape(row.id) %]"[% IF globalproject_id == row.id %] selected[% END %]>[% HTML.escape(row.projectnumber) %]</option> |
|
336 |
[%- END %] |
|
337 |
</select> |
|
338 |
[%- END %] |
|
339 |
</td> |
|
340 |
</tr> |
|
341 |
</table> |
|
342 |
</td> |
|
343 |
</tr> |
|
344 |
</table> |
|
121 |
<div class="cols"> |
|
122 |
|
|
123 |
|
|
124 |
<table class="tbl-horizontal col test"> |
|
125 |
<tr> |
|
126 |
<th>[% IF is_customer %][% 'Customer' | $T8 %][% ELSE %][% 'Vendor' | $T8 %][% END %]</th> |
|
127 |
<td> |
|
128 |
[% IF RO %] |
|
129 |
[% P.hidden_tag(vc_id, $vc_id) %] |
|
130 |
[% HTML.escape(VC_OBJ.name) %] |
|
131 |
[% ELSE %] |
|
132 |
[% P.customer_vendor_picker(vc_id, $vc_id, type=vc, class="fixed_width", onchange="\$('#update_button').click()") %] |
|
133 |
[% END %] |
|
134 |
[% P.hidden_tag("previous_" _ vc_id, $vc_id) %] |
|
135 |
[% P.button_tag("show_vc_details('" _ HTML.escape(vc) _ "')", LxERP.t8("Details (one letter abbreviation)")) %] |
|
136 |
</td> |
|
137 |
|
|
138 |
[%- IF ALL_CONTACTS.size %] |
|
139 |
<tr> |
|
140 |
<th>[% 'Contact Person' | $T8 %]</th> |
|
141 |
<td> |
|
142 |
[%- IF delivered %] |
|
143 |
<input type="hidden" name="cp_id" value="[% HTML.escape(cp_id) %]"> |
|
144 |
[%- IF cp_id == row.cp_id %] |
|
145 |
[%- HTML.escape(row.cp_name) %][%- IF row.cp_abteilung %] ([% HTML.escape(row.cp_abteilung) %])[% END -%] |
|
146 |
[%- END %] |
|
147 |
[%- ELSE %] |
|
148 |
[% L.select_tag('cp_id', ALL_CONTACTS, default = cp_id, value_key = 'cp_id', title_key = 'full_name_dep', with_empty = 1, style='width: 250px') %] |
|
149 |
[%- END %] |
|
150 |
</td> |
|
151 |
</tr> |
|
152 |
[%- END %] |
|
153 |
|
|
154 |
<tr> |
|
155 |
<th>[% 'Shipping Address' | $T8 %]</th> |
|
156 |
<td> |
|
157 |
[%- IF delivered %] |
|
158 |
[% HTML.escape(shipto_label.join('; ')) %] |
|
159 |
[%- ELSE %] |
|
160 |
[%- IF ALL_SHIPTO.size %] |
|
161 |
[% shiptos = [ [ "", LxERP.t8("No/individual shipping address") ] ] ; |
|
162 |
L.select_tag('shipto_id', shiptos.import(ALL_SHIPTO), default=shipto_id, value_key='shipto_id', title_key='displayable_id', style='width: 250px') %] |
|
163 |
[%- END %] |
|
164 |
[% L.button_tag("kivi.SalesPurchase.edit_custom_shipto()", LxERP.t8("Custom shipto")) %] |
|
165 |
[%- END %] |
|
166 |
</td> |
|
167 |
</tr> |
|
168 |
|
|
169 |
[%- IF business %] |
|
170 |
<tr> |
|
171 |
<th>[% IF is_customer %][% 'Customer type' | $T8 %][% ELSE %][% 'Vendor type' | $T8 %][% END %]</th> |
|
172 |
<td>[% HTML.escape(business) %]</td> |
|
173 |
</tr> |
|
174 |
[%- END %] |
|
175 |
|
|
176 |
[%- IF max_dunning_level %] |
|
177 |
<tr> |
|
178 |
<th>[% 'Max. Dunning Level' | $T8 %]</th> |
|
179 |
<td> |
|
180 |
<b>[% HTML.escape(max_dunning_level) %]</b>; [% 'Dunning Amount' | $T8 %]: |
|
181 |
<b>[% HTML.escape(LxERP.format_amount(dunning_amount, 2)) %]</b> |
|
182 |
</td> |
|
183 |
</tr> |
|
184 |
[%- END %] |
|
185 |
</tr> |
|
186 |
|
|
187 |
[%- IF ALL_DEPARTMENTS.size %] |
|
188 |
<tr> |
|
189 |
<th>[% 'Department' | $T8 %]</th> |
|
190 |
<td colspan="3"> |
|
191 |
[% IF ( delivered ) %] |
|
192 |
[% L.hidden_tag('department_id', department_id) %] |
|
193 |
[% ELSE %] |
|
194 |
[% L.select_tag('department_id', ALL_DEPARTMENTS, default = department_id, title_key = 'description', with_empty = 1, style = 'width: 250px', disabled = delivered )%] |
|
195 |
[% END %] |
|
196 |
</td> |
|
197 |
</tr> |
|
198 |
[%- END %] |
|
199 |
|
|
200 |
<tr> |
|
201 |
<th>[% 'Shipping Point' | $T8 %]</th> |
|
202 |
<td colspan="3"><input name="shippingpoint" size="35" value="[% HTML.escape(shippingpoint) %]"[% RO %]></td> |
|
203 |
</tr> |
|
204 |
|
|
205 |
<tr> |
|
206 |
<th>[% 'Ship via' | $T8 %]</th> |
|
207 |
<td colspan="3"><input name="shipvia" size="35" value="[% HTML.escape(shipvia) %]"[% RO %]></td> |
|
208 |
</tr> |
|
209 |
|
|
210 |
<tr> |
|
211 |
<th>[% 'Transaction description' | $T8 %]</th> |
|
212 |
<td colspan="3"><input name="transaction_description" id="transaction_description" size="35" value="[% HTML.escape(transaction_description) %]"[% RO %]></td> |
|
213 |
</tr> |
|
214 |
|
|
215 |
</table> |
|
216 |
|
|
217 |
[%- IF delivered %] |
|
218 |
[%- SET RO = ' readonly' %] |
|
219 |
[%- END %] |
|
220 |
|
|
221 |
<table class="tbl-horizontal col test"> |
|
222 |
<tr> |
|
223 |
<th>[% 'Delivery Terms' | $T8 %]</th> |
|
224 |
<td>[% L.select_tag('delivery_term_id', ALL_DELIVERY_TERMS, default = delivery_term_id, with_empty = 1, title_key = 'description') %]</td> |
|
225 |
</tr> |
|
226 |
<tr><th class="caption" colspan="2"> [% 'Notes' | $T8 %] </th></tr> |
|
227 |
<tr> |
|
228 |
<td colspan="2"> |
|
229 |
[% IF delivered %] |
|
230 |
[% L.hidden_tag("notes", notes) %] |
|
231 |
<div style="width: 350px; height: 150px; border: 1px solid black">[% P.restricted_html(notes) %]</div> |
|
232 |
[% ELSE %] |
|
233 |
[% L.textarea_tag("notes", notes, wrap="soft", style="width: 350px; height: 150px", class="texteditor") %] |
|
234 |
[% END %] |
|
235 |
</td> |
|
236 |
</tr> |
|
237 |
<tr> |
|
238 |
<td colspan="2"> |
|
239 |
[% 'Internal Notes' | $T8 %]<br> |
|
240 |
<textarea name="intnotes" rows="[% LxERP.numtextrows(intnotes, 35, 8, 2) %]" cols="35" wrap="soft"[% RO %]>[% HTML.escape(intnotes) %]</textarea></td> |
|
241 |
</tr> |
|
242 |
</table> |
|
243 |
|
|
244 |
<table class="tbl-horizontal col test"> |
|
245 |
|
|
246 |
<tr> |
|
247 |
<td colspan="2"> |
|
248 |
[%- IF delivered %] |
|
249 |
[%- IF is_customer %] |
|
250 |
[% 'transferred out' | $T8 %] |
|
251 |
[%- ELSE %] |
|
252 |
[% 'transferred in' | $T8 %] |
|
253 |
[%- END %] |
|
254 |
[%- ELSE %] |
|
255 |
[%- IF is_customer %] |
|
256 |
[% 'not transferred out yet' | $T8 %] |
|
257 |
[%- ELSE %] |
|
258 |
[% 'not transferred in yet' | $T8 %] |
|
259 |
[%- END %] |
|
260 |
[%- END %] |
|
261 |
; |
|
262 |
[%- IF closed %] |
|
263 |
[% 'Closed' | $T8 %] |
|
264 |
[%- ELSE %] |
|
265 |
[% 'Open' | $T8 %] |
|
266 |
[%- END %] |
|
267 |
</td> |
|
268 |
</tr> |
|
269 |
|
|
270 |
<input type="hidden" name="delivered" value="[% HTML.escape(delivered) %]"> |
|
271 |
|
|
272 |
<tr> |
|
273 |
<th>[% 'Employee' | $T8 %]</th> |
|
274 |
<td> |
|
275 |
[%- IF delivered %] |
|
276 |
<input type="hidden" name="employee_id" value="[% HTML.escape(employee_id) %]"> |
|
277 |
[%- FOREACH row = ALL_EMPLOYEES %] |
|
278 |
[% IF row.id == employee_id %][%- IF row.name %][%- HTML.escape(row.name) %][%- ELSE %][% HTML.escape(row.login) %][%- END %][% END %] |
|
279 |
[%- END %] |
|
280 |
[%- ELSE %] |
|
281 |
[% L.select_tag('employee_id', ALL_EMPLOYEES, default = employee_id, title_key = 'safe_name') %] |
|
282 |
[%- END %] |
|
283 |
</td> |
|
284 |
</tr> |
|
285 |
|
|
286 |
[%- IF is_customer %] |
|
287 |
[%- IF salesman_id %] |
|
288 |
[%- SET the_salesman_id = salesman_id %] |
|
289 |
[%- ELSE %] |
|
290 |
[%- SET the_salesman_id = employee_id %] |
|
291 |
[%- END %] |
|
292 |
<tr> |
|
293 |
<th>[% 'Salesman' | $T8 %]</th> |
|
294 |
<td> |
|
295 |
[%- IF delivered %] |
|
296 |
<input type="hidden" name="salesman_id" value="[% HTML.escape(salesman_id) %]"> |
|
297 |
[%- FOREACH row = ALL_SALESMEN %] |
|
298 |
[% IF row.id == the_salesman_id %][%- IF row.name %][%- HTML.escape(row.name) %][%- ELSE %][% HTML.escape(row.login) %][%- END %][% END %] |
|
299 |
[%- END %] |
|
300 |
[%- ELSE %] |
|
301 |
[% L.select_tag('salesman_id', ALL_SALESMEN, default = (salesman_id ? salesman_id : employee_id), title_key = 'safe_name') %] |
|
302 |
[%- END %] |
|
303 |
</td> |
|
304 |
</tr> |
|
305 |
[%- END %] |
|
306 |
|
|
307 |
<tr> |
|
308 |
<th>[% 'Delivery Order Number' | $T8 %]</th> |
|
309 |
<td><input name="donumber" id="donumber" size="11" value="[% HTML.escape(donumber) %]"[% RO %]></td> |
|
310 |
</tr> |
|
311 |
|
|
312 |
<tr> |
|
313 |
<th>[% 'Order Number' | $T8 %]</th> |
|
314 |
<td><input name="ordnumber" id="ordnumber" size="11" value="[% HTML.escape(ordnumber) %]"[% RO %]></td> |
|
315 |
</tr> |
|
316 |
|
|
317 |
<tr> |
|
318 |
<th>[% IF is_customer %][% 'Customer Order Number' | $T8 %][% ELSE %][% 'Vendor Order Number' | $T8 %][% END %]</th> |
|
319 |
<td><input name="cusordnumber" id="cusordnumber" size="11" value="[% HTML.escape(cusordnumber) %]"[% RO %]></td> |
|
320 |
</tr> |
|
321 |
|
|
322 |
<tr> |
|
323 |
<th>[% 'Delivery Order Date' | $T8 %]</th> |
|
324 |
<td> [% L.date_tag('transdate', transdate, readonly => delivered) %] </td> |
|
325 |
</tr> |
|
326 |
|
|
327 |
<tr> |
|
328 |
<th>[% 'Reqdate' | $T8 %]</th> |
|
329 |
<td> [% L.date_tag('reqdate', reqdate, readonly => delivered) %] </td> |
|
330 |
</tr> |
|
331 |
|
|
332 |
[%- IF is_customer %] |
|
333 |
<tr> |
|
334 |
<th>[% 'Insert Date' | $T8 %]</th> |
|
335 |
<td>[% insertdate %]</td> |
|
336 |
</tr> |
|
337 |
[%- END %] |
|
338 |
|
|
339 |
<tr> |
|
340 |
<th>[% 'Project Number' | $T8 %]</th> |
|
341 |
<td> |
|
342 |
[%- IF delivered %] |
|
343 |
<input type="hidden" name="globalproject_id" value="[% HTML.escape(globalproject_id) %]"> |
|
344 |
[%- FOREACH row = ALL_PROJECTS %] |
|
345 |
[% IF globalproject_id == row.id %][% HTML.escape(row.projectnumber) %][% END %] |
|
346 |
[%- END %] |
|
347 |
[%- ELSE %] |
|
348 |
<select name="globalproject_id"> |
|
349 |
<option></option> |
|
350 |
[%- FOREACH row = ALL_PROJECTS %] |
|
351 |
<option value="[% HTML.escape(row.id) %]"[% IF globalproject_id == row.id %] selected[% END %]>[% HTML.escape(row.projectnumber) %]</option> |
|
352 |
[%- END %] |
|
353 |
</select> |
|
354 |
[%- END %] |
|
355 |
</td> |
|
356 |
</tr> |
|
357 |
</table> |
|
358 |
|
|
359 |
</div> |
Auch abrufbar als: Unified diff
Preview design 4.0