Merge branch 'develop' of github.com:webnotes/erpnext into hotfix
This commit is contained in:
commit
eeb8ba18cd
@ -19,8 +19,10 @@ erpnext.POS = Class.extend({
|
|||||||
<table class="table table-condensed table-hover" id="cart" style="table-layout: fixed;">\
|
<table class="table table-condensed table-hover" id="cart" style="table-layout: fixed;">\
|
||||||
<thead>\
|
<thead>\
|
||||||
<tr>\
|
<tr>\
|
||||||
<th style="width: 50%">Item</th>\
|
<th style="width: 40%">Item</th>\
|
||||||
<th style="width: 25%; text-align: right;">Qty</th>\
|
<th style="width: 9%"></th>\
|
||||||
|
<th style="width: 17%; text-align: right;">Qty</th>\
|
||||||
|
<th style="width: 9%"></th>\
|
||||||
<th style="width: 25%; text-align: right;">Rate</th>\
|
<th style="width: 25%; text-align: right;">Rate</th>\
|
||||||
</tr>\
|
</tr>\
|
||||||
</thead>\
|
</thead>\
|
||||||
@ -357,8 +359,18 @@ erpnext.POS = Class.extend({
|
|||||||
|
|
||||||
$(repl('<tr id="%(item_code)s" data-selected="false">\
|
$(repl('<tr id="%(item_code)s" data-selected="false">\
|
||||||
<td>%(item_code)s%(item_name)s</td>\
|
<td>%(item_code)s%(item_name)s</td>\
|
||||||
<td><input type="text" value="%(qty)s" \
|
<td style="vertical-align:middle;" align="right">\
|
||||||
|
<div class="decrease-qty" style="cursor:pointer;">\
|
||||||
|
<i class="icon-minus-sign icon-large text-danger"></i>\
|
||||||
|
</div>\
|
||||||
|
</td>\
|
||||||
|
<td style="vertical-align:middle;"><input type="text" value="%(qty)s" \
|
||||||
class="form-control qty" style="text-align: right;"></td>\
|
class="form-control qty" style="text-align: right;"></td>\
|
||||||
|
<td style="vertical-align:middle;cursor:pointer;">\
|
||||||
|
<div class="increase-qty" style="cursor:pointer;">\
|
||||||
|
<i class="icon-plus-sign icon-large text-success"></i>\
|
||||||
|
</div>\
|
||||||
|
</td>\
|
||||||
<td style="text-align: right;"><b>%(amount)s</b><br>%(rate)s</td>\
|
<td style="text-align: right;"><b>%(amount)s</b><br>%(rate)s</td>\
|
||||||
</tr>',
|
</tr>',
|
||||||
{
|
{
|
||||||
@ -370,6 +382,11 @@ erpnext.POS = Class.extend({
|
|||||||
}
|
}
|
||||||
)).appendTo($items);
|
)).appendTo($items);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
this.wrapper.find(".increase-qty, .decrease-qty").on("click", function() {
|
||||||
|
var item_code = $(this).closest("tr").attr("id");
|
||||||
|
me.selected_item_qty_operation(item_code, $(this).attr("class"));
|
||||||
|
});
|
||||||
},
|
},
|
||||||
show_taxes: function() {
|
show_taxes: function() {
|
||||||
var me = this;
|
var me = this;
|
||||||
@ -501,6 +518,22 @@ erpnext.POS = Class.extend({
|
|||||||
this.frm.script_manager.trigger("calculate_taxes_and_totals");
|
this.frm.script_manager.trigger("calculate_taxes_and_totals");
|
||||||
this.refresh();
|
this.refresh();
|
||||||
},
|
},
|
||||||
|
selected_item_qty_operation: function(item_code, operation) {
|
||||||
|
var me = this;
|
||||||
|
var child = wn.model.get_children(this.frm.doctype + " Item", this.frm.doc.name,
|
||||||
|
this.frm.cscript.fname, this.frm.doctype);
|
||||||
|
|
||||||
|
$.each(child, function(i, d) {
|
||||||
|
if (d.item_code == item_code) {
|
||||||
|
if (operation == "increase-qty")
|
||||||
|
d.qty += 1;
|
||||||
|
else if (operation == "decrease-qty")
|
||||||
|
d.qty != 1 ? d.qty -= 1 : d.qty = 1;
|
||||||
|
|
||||||
|
me.refresh();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
make_payment: function() {
|
make_payment: function() {
|
||||||
var me = this;
|
var me = this;
|
||||||
var no_of_items = $(this.wrapper).find("#cart tbody tr").length;
|
var no_of_items = $(this.wrapper).find("#cart tbody tr").length;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"app_name": "ERPNext",
|
"app_name": "ERPNext",
|
||||||
"app_version": "3.5.1",
|
"app_version": "3.6.0",
|
||||||
"base_template": "app/portal/templates/base.html",
|
"base_template": "app/portal/templates/base.html",
|
||||||
"modules": {
|
"modules": {
|
||||||
"Accounts": {
|
"Accounts": {
|
||||||
@ -74,5 +74,5 @@
|
|||||||
"type": "module"
|
"type": "module"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"requires_framework_version": "==3.5.0"
|
"requires_framework_version": "==3.7.0"
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user