projects
/
kivitendo-erp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
c5c169f
)
Auftrags-Controller: PriceSources: auch Rabatt-Quelle im Auswahl-Knopf anzeigen.
author
Bernd Bleßmann
<bernd@kivitendo-premium.de>
Mon, 26 Oct 2015 15:52:34 +0000
(16:52 +0100)
committer
G. Richardson
<information@kivitendo-premium.de>
Mon, 16 Nov 2015 15:15:58 +0000
(16:15 +0100)
templates/webpages/order/tabs/_price_sources_dialog.html
patch
|
blob
|
history
templates/webpages/order/tabs/_row.html
patch
|
blob
|
history
templates/webpages/order/tabs/basic_data.html
patch
|
blob
|
history
diff --git
a/templates/webpages/order/tabs/_price_sources_dialog.html
b/templates/webpages/order/tabs/_price_sources_dialog.html
index
a9f92a0
..
a73073e
100644
(file)
--- a/
templates/webpages/order/tabs/_price_sources_dialog.html
+++ b/
templates/webpages/order/tabs/_price_sources_dialog.html
@@
-58,7
+58,7
@@
</tr>
<tr class='listrow'>
[%- IF price_source.record_item.active_discount_source %]
</tr>
<tr class='listrow'>
[%- IF price_source.record_item.active_discount_source %]
- <td>[% L.button_tag('update_discount_source(\'' _ FORM.item_id _ '\', \'\')', LxERP.t8('Select')) %]</td>
+ <td>[% L.button_tag('update_discount_source(\'' _ FORM.item_id _ '\', \'\'
, \'' _ LxERP.t8('None (PriceSource Discount)') _ '\'
)', LxERP.t8('Select')) %]</td>
[%- ELSE %]
<td><b>[% 'Selected' | $T8 %]</b></td>
[%- END %]
[%- ELSE %]
<td><b>[% 'Selected' | $T8 %]</b></td>
[%- END %]
@@
-70,9
+70,9
@@
[%- FOREACH price IN price_source.available_discounts %]
<tr class='listrow'>
[%- IF price_source.record_item.active_discount_source != price.source %]
[%- FOREACH price IN price_source.available_discounts %]
<tr class='listrow'>
[%- IF price_source.record_item.active_discount_source != price.source %]
- <td>[% L.button_tag('update_discount_source(\'' _ FORM.item_id _ '\', \'' _ price.source _ '\', \'' _ price.discount_as_percent _ '\')', LxERP.t8('Select')) %]</td>
+ <td>[% L.button_tag('update_discount_source(\'' _ FORM.item_id _ '\', \'' _ price.source _ '\', \'' _ price.
source_description _ '\', \'' _ price.
discount_as_percent _ '\')', LxERP.t8('Select')) %]</td>
[%- ELSIF price_source.record_item.discount * 1 != price.discount * 1 %]
[%- ELSIF price_source.record_item.discount * 1 != price.discount * 1 %]
- <td>[% L.button_tag('update_discount_source(\'' _ FORM.item_id _ '\', \'' _ price.source _ '\', \'' _ price.discount_as_percent _ '\')', LxERP.t8('Update Discount')) %]</td>
+ <td>[% L.button_tag('update_discount_source(\'' _ FORM.item_id _ '\', \'' _ price.source _ '\', \'' _ price.
source_description _ '\', \'' _ price.
discount_as_percent _ '\')', LxERP.t8('Update Discount')) %]</td>
[%- ELSE %]
<td><b>[% 'Selected' | $T8 %]</b></td>
[% END %]
[%- ELSE %]
<td><b>[% 'Selected' | $T8 %]</b></td>
[% END %]
diff --git
a/templates/webpages/order/tabs/_row.html
b/templates/webpages/order/tabs/_row.html
index
08fd81d
..
efcb59e
100644
(file)
--- a/
templates/webpages/order/tabs/_row.html
+++ b/
templates/webpages/order/tabs/_row.html
@@
-48,7
+48,9
@@
class="recalc") %]
</td>
<td>
class="recalc") %]
</td>
<td>
- [%- L.button_tag("price_chooser_item_row(this)", ITEM.active_price_source.source_description, name = "price_chooser_button") %]
+ [%- L.button_tag("price_chooser_item_row(this)",
+ ITEM.active_price_source.source_description _ ' | ' _ ITEM.active_discount_source.source_description,
+ name = "price_chooser_button") %]
</td>
<td>
[%- L.hidden_tag("order.orderitems[].active_price_source", ITEM.active_price_source.source) %]
</td>
<td>
[%- L.hidden_tag("order.orderitems[].active_price_source", ITEM.active_price_source.source) %]
diff --git
a/templates/webpages/order/tabs/basic_data.html
b/templates/webpages/order/tabs/basic_data.html
index
ea37faf
..
e02c498
100644
(file)
--- a/
templates/webpages/order/tabs/basic_data.html
+++ b/
templates/webpages/order/tabs/basic_data.html
@@
-285,7
+285,7
@@
function update_price_source(item_id, source, descr, price_str) {
var source_elt = $(row).find('[name="order.orderitems[].active_price_source"]');
var button_elt = $(row).find('[name="price_chooser_button"]');
var source_elt = $(row).find('[name="order.orderitems[].active_price_source"]');
var button_elt = $(row).find('[name="price_chooser_button"]');
- button_elt.val(
descr
);
+ button_elt.val(
button_elt.val().replace(/.*\|/, descr + " |")
);
source_elt.val(source);
var editable_div_elt = $(row).find('[name="editable_price"]');
source_elt.val(source);
var editable_div_elt = $(row).find('[name="editable_price"]');
@@
-315,10
+315,12
@@
function update_price_source(item_id, source, descr, price_str) {
kivi.io.close_dialog();
}
kivi.io.close_dialog();
}
-function update_discount_source(item_id, source, discount_str) {
+function update_discount_source(item_id, source, d
escr, d
iscount_str) {
var row = $('#item_' + item_id).parents("tbody").first();
var source_elt = $(row).find('[name="order.orderitems[].active_discount_source"]');
var row = $('#item_' + item_id).parents("tbody").first();
var source_elt = $(row).find('[name="order.orderitems[].active_discount_source"]');
+ var button_elt = $(row).find('[name="price_chooser_button"]');
+ button_elt.val(button_elt.val().replace(/\|.*/, "| " + descr));
source_elt.val(source);
var editable_div_elt = $(row).find('[name="editable_discount"]');
source_elt.val(source);
var editable_div_elt = $(row).find('[name="editable_discount"]');