Revision f4875d37
Von Bernd Bleßmann vor etwa 1 Jahr hinzugefügt
js/kivi.Order.js | ||
---|---|---|
251 | 251 |
} else { |
252 | 252 |
rate_input.val(''); |
253 | 253 |
} |
254 |
$('#order_exchangerate_as_null_number').data('validate', 'required'); |
|
254 | 255 |
$('#exchangerate_settings').show(); |
255 | 256 |
} else { |
256 | 257 |
rate_input.val(''); |
258 |
$('#order_exchangerate_as_null_number').data('validate', ''); |
|
257 | 259 |
$('#exchangerate_settings').hide(); |
258 | 260 |
} |
259 | 261 |
if ($('#order_currency_id').val() != $('#old_currency_id').val() || |
js/kivi.Reclamation.js | ||
---|---|---|
245 | 245 |
} else { |
246 | 246 |
rate_input.val(''); |
247 | 247 |
} |
248 |
$('#reclamation_exchangerate_as_null_number').data('validate', 'required'); |
|
248 | 249 |
$('#exchangerate_settings').show(); |
249 | 250 |
} else { |
250 | 251 |
rate_input.val(''); |
252 |
$('#reclamation_exchangerate_as_null_number').data('validate', ''); |
|
251 | 253 |
$('#exchangerate_settings').hide(); |
252 | 254 |
} |
253 | 255 |
if ($('#reclamation_currency_id').val() != $('#old_currency_id').val() || |
templates/design40_webpages/order/tabs/basic_data.html | ||
---|---|---|
77 | 77 |
<td>[% L.select_tag('order.taxzone_id', SELF.all_taxzones, default=SELF.order.taxzone_id, title_key='description', class='recalc wi-lightwide') %]</td> |
78 | 78 |
</tr> |
79 | 79 |
[% SET currency_id = SELF.order.currency_id || INSTANCE_CONF.get_currency_id # use default currency for new order %] |
80 |
[% SET show_exchangerate = (SELF.order.currency_id != INSTANCE_CONF.get_currency_id) %] |
|
80 | 81 |
<tr id="currency_settings"> |
81 | 82 |
<th>[% 'Currency' | $T8 %]</th> |
82 | 83 |
<td>[% L.select_tag('order.currency_id', SELF.all_currencies, default=currency_id, value_key='id', title_key='name', class='wi-lightwide') %]</td> |
83 | 84 |
</tr> |
84 |
<tr id="exchangerate_settings" [%- IF SELF.order.currency_id==INSTANCE_CONF.get_currency_id %]style='display:none'[%- END %]>
|
|
85 |
<tr id="exchangerate_settings" [%- IF !show_exchangerate %]style='display:none'[%- END %]>
|
|
85 | 86 |
<th>[% 'Exchangerate' | $T8 %]</th> |
86 | 87 |
<td> 1 <span id="currency_name">[% SELF.order.currency.name %]</span> = |
87 |
[% L.input_tag('order.exchangerate_as_null_number', SELF.order.exchangerate_as_null_number, 'data-validate'='required', class="reformat_number_as_null_number numeric wi-small") %]
|
|
88 |
[% L.input_tag('order.exchangerate_as_null_number', SELF.order.exchangerate_as_null_number, 'data-validate'=show_exchangerate ? 'required' : '', class="reformat_number_as_null_number numeric wi-small") %]
|
|
88 | 89 |
[% INSTANCE_CONF.default_currency %] |
89 | 90 |
[% L.hidden_tag('old_currency_id', currency_id) %] |
90 | 91 |
[% L.hidden_tag('old_exchangerate', SELF.order.exchangerate_as_null_number) %] |
templates/design40_webpages/reclamation/tabs/basic_data.html | ||
---|---|---|
81 | 81 |
</tr> |
82 | 82 |
|
83 | 83 |
[% SET currency_id = SELF.reclamation.currency_id || INSTANCE_CONF.get_currency_id # use default currency for new reclamation %] |
84 |
[% SET show_exchangerate = (SELF.reclamation.currency_id != INSTANCE_CONF.get_currency_id) %] |
|
84 | 85 |
<tr id="currency_settings"> |
85 | 86 |
<th>[% 'Currency' | $T8 %]</th> |
86 | 87 |
<td>[% L.select_tag('reclamation.currency_id', SELF.all_currencies, default=currency_id, value_key='id', title_key='name') %]</td> |
87 | 88 |
</tr> |
88 |
<tr id="exchangerate_settings" [%- IF SELF.reclamation.currency_id==INSTANCE_CONF.get_currency_id %]style='display:none'[%- END %]>
|
|
89 |
<tr id="exchangerate_settings" [%- IF !show_exchangerate %]style='display:none'[%- END %]>
|
|
89 | 90 |
<th>[% 'Exchangerate' | $T8 %]</th> |
90 | 91 |
<td> 1 <span id="currency_name">[% SELF.reclamation.currency.name %]</span> = |
91 |
[% L.input_tag('reclamation.exchangerate_as_null_number', SELF.reclamation.exchangerate_as_null_number, 'data-validate'='required', size="15", class="reformat_number_as_null_number numeric") %]
|
|
92 |
[% L.input_tag('reclamation.exchangerate_as_null_number', SELF.reclamation.exchangerate_as_null_number, 'data-validate'=show_exchangerate ? 'required' : '', size="15", class="reformat_number_as_null_number numeric") %]
|
|
92 | 93 |
[% INSTANCE_CONF.default_currency %] |
93 | 94 |
[% L.hidden_tag('old_currency_id', currency_id) %] |
94 | 95 |
[% L.hidden_tag('old_exchangerate', SELF.reclamation.exchangerate_as_null_number) %] |
templates/webpages/order/tabs/basic_data.html | ||
---|---|---|
74 | 74 |
</tr> |
75 | 75 |
|
76 | 76 |
[% SET currency_id = SELF.order.currency_id || INSTANCE_CONF.get_currency_id # use default currency for new order %] |
77 |
[% SET show_exchangerate = (SELF.order.currency_id !=INSTANCE_CONF.get_currency_id) %] |
|
77 | 78 |
<tr id="currency_settings"> |
78 | 79 |
<th align="right">[% 'Currency' | $T8 %]</th> |
79 | 80 |
<td>[% L.select_tag('order.currency_id', SELF.all_currencies, default=currency_id, value_key='id', title_key='name') %]</td> |
80 | 81 |
</tr> |
81 |
<tr id="exchangerate_settings" [%- IF SELF.order.currency_id==INSTANCE_CONF.get_currency_id %]style='display:none'[%- END %]>
|
|
82 |
<tr id="exchangerate_settings" [%- IF !show_exchangerate %]style='display:none'[%- END %]>
|
|
82 | 83 |
<th align="right">[% 'Exchangerate' | $T8 %]</th> |
83 | 84 |
<td> 1 <span id="currency_name">[% SELF.order.currency.name %]</span> = |
84 |
[% L.input_tag('order.exchangerate_as_null_number', SELF.order.exchangerate_as_null_number, 'data-validate'='required', size="15", class="reformat_number_as_null_number numeric") %]
|
|
85 |
[% L.input_tag('order.exchangerate_as_null_number', SELF.order.exchangerate_as_null_number, 'data-validate'=show_exchangerate ? 'required' : '', size="15", class="reformat_number_as_null_number numeric") %]
|
|
85 | 86 |
[% INSTANCE_CONF.default_currency %] |
86 | 87 |
[% L.hidden_tag('old_currency_id', currency_id) %] |
87 | 88 |
[% L.hidden_tag('old_exchangerate', SELF.order.exchangerate_as_null_number) %] |
templates/webpages/reclamation/tabs/basic_data.html | ||
---|---|---|
74 | 74 |
</tr> |
75 | 75 |
|
76 | 76 |
[% SET currency_id = SELF.reclamation.currency_id || INSTANCE_CONF.get_currency_id # use default currency for new reclamation %] |
77 |
[% SET show_exchangerate = (SELF.reclamation.currency_id != INSTANCE_CONF.get_currency_id) %] |
|
77 | 78 |
<tr id="currency_settings"> |
78 | 79 |
<th align="right">[% 'Currency' | $T8 %]</th> |
79 | 80 |
<td>[% L.select_tag('reclamation.currency_id', SELF.all_currencies, default=currency_id, value_key='id', title_key='name') %]</td> |
80 | 81 |
</tr> |
81 |
<tr id="exchangerate_settings" [%- IF SELF.reclamation.currency_id==INSTANCE_CONF.get_currency_id %]style='display:none'[%- END %]>
|
|
82 |
<tr id="exchangerate_settings" [%- IF !show_exchangerate %]style='display:none'[%- END %]>
|
|
82 | 83 |
<th align="right">[% 'Exchangerate' | $T8 %]</th> |
83 | 84 |
<td> 1 <span id="currency_name">[% SELF.reclamation.currency.name %]</span> = |
84 |
[% L.input_tag('reclamation.exchangerate_as_null_number', SELF.reclamation.exchangerate_as_null_number, 'data-validate'='required', size="15", class="reformat_number_as_null_number numeric") %]
|
|
85 |
[% L.input_tag('reclamation.exchangerate_as_null_number', SELF.reclamation.exchangerate_as_null_number, 'data-validate'=show_exchangerate ? 'required' : '', size="15", class="reformat_number_as_null_number numeric") %]
|
|
85 | 86 |
[% INSTANCE_CONF.default_currency %] |
86 | 87 |
[% L.hidden_tag('old_currency_id', currency_id) %] |
87 | 88 |
[% L.hidden_tag('old_exchangerate', SELF.reclamation.exchangerate_as_null_number) %] |
Auch abrufbar als: Unified diff
Fix: Auftrags-/Reklamations-Controller: Wechselkurs soll nicht leer sein.
Das Wechselkursfeld war immer auf 'required' gesetzt, also auch wenn es nicht
angezeigt wurde. Das hat das Speichern des Belegs verhindert, wenn die
Hauptwährung ausgewählt war.