Revision e9e4fb82
Von Tamino Steinert vor 1 Tag hinzugefügt
js/kivi.POS.js | ||
---|---|---|
3 | 3 |
var row = $('#item_' + item_id).parents("tbody").first(); |
4 | 4 |
$(row).remove(); |
5 | 5 |
|
6 |
$('#edit_order_item_row_point_of_sales_dialog').dialog('close');
|
|
6 |
$('#edit_order_item_row_dialog').dialog('close'); |
|
7 | 7 |
kivi.Order.renumber_positions(); |
8 | 8 |
kivi.Order.recalc_amounts_and_taxes(); |
9 | 9 |
}; |
... | ... | |
15 | 15 |
data.push({ name: 'item_id', value: item_id }); |
16 | 16 |
|
17 | 17 |
kivi.popup_dialog({ |
18 |
url: 'controller.pl?action=POS/edit_order_item_row_point_of_sales_dialog',
|
|
18 |
url: 'controller.pl?action=POS/edit_order_item_row_dialog', |
|
19 | 19 |
data: data, |
20 |
id: 'edit_order_item_row_point_of_sales_dialog',
|
|
20 |
id: 'edit_order_item_row_dialog', |
|
21 | 21 |
load: function() {kivi.reinit_widgets(); kivi.Order.init_row_handlers() }, |
22 | 22 |
dialog: { |
23 | 23 |
title: kivi.t8('Edit row'), |
... | ... | |
39 | 39 |
// $(row).find('[name="order.orderitems[].salesman_id"]'); |
40 | 40 |
|
41 | 41 |
|
42 |
$('#edit_order_item_row_point_of_sales_dialog').dialog('close');
|
|
42 |
$('#edit_order_item_row_dialog').dialog('close'); |
|
43 | 43 |
kivi.Order.recalc_amounts_and_taxes(); |
44 | 44 |
} |
45 | 45 |
|
46 |
ns.open_discount_item_dialog = function(type) { |
|
47 |
if (!kivi.Order.check_cv()) return; |
|
48 |
|
|
49 |
$("[name='discount.type']").val(type); |
|
50 |
|
|
51 |
kivi.popup_dialog({ |
|
52 |
url: 'controller.pl?action=POS/add_discount_item_dialog', |
|
53 |
data: {'discount.type': type}, |
|
54 |
id: 'add_discount_item_dialog', |
|
55 |
load: function() { |
|
56 |
kivi.reinit_widgets(); |
|
57 |
kivi.Order.init_row_handlers() |
|
58 |
document.getElementById("discount_value_input").focus(); |
|
59 |
}, |
|
60 |
dialog: { |
|
61 |
title: kivi.t8('Apply discount'), |
|
62 |
width: 300, |
|
63 |
height: 150 |
|
64 |
} |
|
65 |
}); |
|
66 |
|
|
67 |
} |
|
68 |
|
|
69 |
ns.apply_dicount_item_value = function() { |
|
70 |
var value_number = $("[name='discount.value_input']").val(); |
|
71 |
|
|
72 |
var value = kivi.parse_amount(value_number); |
|
73 |
if (value != 0 && value != null) { |
|
74 |
$("[name='discount.value']").val(value_number); |
|
75 |
|
|
76 |
kivi.Order.add_discount_item(); |
|
77 |
} |
|
78 |
$("#add_discount_item_dialog").dialog("close"); |
|
79 |
} |
|
80 |
|
|
46 | 81 |
}); |
Auch abrufbar als: Unified diff
POS: Nachlass gewähren hinzugefügt