projects
/
kivitendo-erp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Warengruppen - Umstellung auf Controller, sortkey, obsolete
[kivitendo-erp.git]
/
templates
/
webpages
/
letter
/
edit.html
diff --git
a/templates/webpages/letter/edit.html
b/templates/webpages/letter/edit.html
index
390efcc
..
cbd331e
100644
(file)
--- a/
templates/webpages/letter/edit.html
+++ b/
templates/webpages/letter/edit.html
@@
-10,6
+10,7
@@
<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 %]">
<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' %]
[%- INCLUDE 'common/flash.html' %]
@@
-31,17
+32,20
@@
<td width=50%>
<!-- upper left block -->
<table width=90%>
<td width=50%>
<!-- upper left block -->
<table width=90%>
+[%- IF SELF.is_sales %]
<tr>
<th align='right'>[% 'Customer' | $T8 %]:</th>
<tr>
<th align='right'>[% 'Customer' | $T8 %]:</th>
- <td>[% P.customer_vendor_picker('letter.customer_id', letter.customer_id, type='customer') %]
-[%- IF letter.customer_id %]
- <input type="button" value="[% 'Details (one letter abbreviation)' | $T8 %]" onclick="show_vc_details('customer')">
-[%- END %]
- </td>
+ <td>[% P.customer_vendor_picker('letter.customer_id', letter.customer_id, type='customer') %]</td>
+ </tr>
+[%- ELSE %]
+ <tr>
+ <th align='right'>[% 'Vendor' | $T8 %]:</th>
+ <td>[% P.customer_vendor_picker('letter.vendor_id', letter.vendor_id, type='vendor') %]</td>
</tr>
</tr>
+[%- END %]
<tr>
<th align='right'>[% 'Contact Person' | $T8 %]</th>
<tr>
<th align='right'>[% 'Contact Person' | $T8 %]</th>
- <td>[% L.select_tag('letter.cp_id', letter.customer_
id ? letter.custome
r.contacts : [], value_key='cp_id', title_key='full_name', default=letter.cp_id) %]</td>
+ <td>[% L.select_tag('letter.cp_id', letter.customer_
vendor_id ? letter.customer_vendo
r.contacts : [], value_key='cp_id', title_key='full_name', default=letter.cp_id) %]</td>
</tr>
<tr>
<th align='right'>[% 'Your Reference' | $T8 %]:</th>
</tr>
<tr>
<th align='right'>[% 'Your Reference' | $T8 %]:</th>
@@
-167,6
+171,11
@@
var data = $('form').serializeArray();
data.push({ name: 'action_update_contacts', value: 1 });
$.post('controller.pl', data, kivi.eval_json_result);
var data = $('form').serializeArray();
data.push({ name: 'action_update_contacts', value: 1 });
$.post('controller.pl', data, kivi.eval_json_result);
+ });
+ $('#letter_vendor_id').change(function(){
+ var data = $('form').serializeArray();
+ data.push({ name: 'action_update_contacts', value: 1 });
+ $.post('controller.pl', data, kivi.eval_json_result);
})
})
</script>
})
})
</script>