Revision db7a2e79
Von Sven Schöling vor mehr als 8 Jahren hinzugefügt
templates/webpages/letter/edit.html | ||
---|---|---|
10 | 10 |
<input type="hidden" name="letter.id" value="[% letter.id | html %]"> |
11 | 11 |
<input type="hidden" name="draft.id" value="[% draft.id | html %]"> |
12 | 12 |
<input type="hidden" name="type" value="[% type | html %]"> |
13 |
[% L.hidden_tag('is_sales', SELF.is_sales) %] |
|
13 | 14 |
|
14 | 15 |
[%- INCLUDE 'common/flash.html' %] |
15 | 16 |
|
... | ... | |
31 | 32 |
<td width=50%> |
32 | 33 |
<!-- upper left block --> |
33 | 34 |
<table width=90%> |
35 |
[%- IF SELF.is_sales %] |
|
34 | 36 |
<tr> |
35 | 37 |
<th align='right'>[% 'Customer' | $T8 %]:</th> |
36 | 38 |
<td>[% P.customer_vendor_picker('letter.customer_id', letter.customer_id, type='customer') %] |
... | ... | |
39 | 41 |
[%- END %] |
40 | 42 |
</td> |
41 | 43 |
</tr> |
44 |
[%- ELSE %] |
|
45 |
<tr> |
|
46 |
<th align='right'>[% 'Vendor' | $T8 %]:</th> |
|
47 |
<td>[% P.customer_vendor_picker('letter.vendor_id', letter.vendor_id, type='vendor') %] |
|
48 |
[%- IF letter.vendor_id %] |
|
49 |
<input type="button" value="[% 'Details (one letter abbreviation)' | $T8 %]" onclick="show_vc_details('vendor')"> |
|
50 |
[%- END %] |
|
51 |
</td> |
|
52 |
</tr> |
|
53 |
[%- END %] |
|
42 | 54 |
<tr> |
43 | 55 |
<th align='right'>[% 'Contact Person' | $T8 %]</th> |
44 |
<td>[% L.select_tag('letter.cp_id', letter.customer_id ? letter.customer.contacts : [], value_key='cp_id', title_key='full_name', default=letter.cp_id) %]</td>
|
|
56 |
<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) %]</td>
|
|
45 | 57 |
</tr> |
46 | 58 |
<tr> |
47 | 59 |
<th align='right'>[% 'Your Reference' | $T8 %]:</th> |
... | ... | |
167 | 179 |
var data = $('form').serializeArray(); |
168 | 180 |
data.push({ name: 'action_update_contacts', value: 1 }); |
169 | 181 |
$.post('controller.pl', data, kivi.eval_json_result); |
182 |
}); |
|
183 |
$('#letter_vendor_id').change(function(){ |
|
184 |
var data = $('form').serializeArray(); |
|
185 |
data.push({ name: 'action_update_contacts', value: 1 }); |
|
186 |
$.post('controller.pl', data, kivi.eval_json_result); |
|
170 | 187 |
}) |
171 | 188 |
}) |
172 | 189 |
</script> |
Auch abrufbar als: Unified diff
Briefe: Lieferantenbriefe