Merge branch 'master' into develop
This commit is contained in:
commit
76e1ca35ad
@ -4,7 +4,7 @@ import inspect
|
|||||||
import frappe
|
import frappe
|
||||||
from erpnext.hooks import regional_overrides
|
from erpnext.hooks import regional_overrides
|
||||||
|
|
||||||
__version__ = '9.0.0'
|
__version__ = '9.0.1'
|
||||||
|
|
||||||
def get_default_company(user=None):
|
def get_default_company(user=None):
|
||||||
'''Get default company for user'''
|
'''Get default company for user'''
|
||||||
|
|||||||
@ -1023,7 +1023,7 @@
|
|||||||
"length": 0,
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"precision": "2",
|
"precision": "",
|
||||||
"print_hide": 0,
|
"print_hide": 0,
|
||||||
"print_hide_if_no_value": 0,
|
"print_hide_if_no_value": 0,
|
||||||
"read_only": 0,
|
"read_only": 0,
|
||||||
@ -1284,7 +1284,7 @@
|
|||||||
"issingle": 0,
|
"issingle": 0,
|
||||||
"istable": 0,
|
"istable": 0,
|
||||||
"max_attachments": 0,
|
"max_attachments": 0,
|
||||||
"modified": "2017-08-31 16:34:41.614743",
|
"modified": "2017-09-27 08:31:38.432574",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Accounts",
|
"module": "Accounts",
|
||||||
"name": "Pricing Rule",
|
"name": "Pricing Rule",
|
||||||
|
|||||||
@ -699,7 +699,7 @@
|
|||||||
"length": 0,
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"precision": "2",
|
"precision": "",
|
||||||
"print_hide": 1,
|
"print_hide": 1,
|
||||||
"print_hide_if_no_value": 0,
|
"print_hide_if_no_value": 0,
|
||||||
"read_only": 0,
|
"read_only": 0,
|
||||||
@ -2166,7 +2166,7 @@
|
|||||||
"issingle": 0,
|
"issingle": 0,
|
||||||
"istable": 1,
|
"istable": 1,
|
||||||
"max_attachments": 0,
|
"max_attachments": 0,
|
||||||
"modified": "2017-07-17 17:54:48.246507",
|
"modified": "2017-09-27 08:31:37.827893",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Accounts",
|
"module": "Accounts",
|
||||||
"name": "Sales Invoice Item",
|
"name": "Sales Invoice Item",
|
||||||
|
|||||||
@ -80,7 +80,7 @@ website_route_rules = [
|
|||||||
{"from_route": "/supplier-quotations/<path:name>", "to_route": "order",
|
{"from_route": "/supplier-quotations/<path:name>", "to_route": "order",
|
||||||
"defaults": {
|
"defaults": {
|
||||||
"doctype": "Supplier Quotation",
|
"doctype": "Supplier Quotation",
|
||||||
"parents": [{"label": _("Supplier Quotation"), "route": "quotations"}]
|
"parents": [{"label": _("Supplier Quotation"), "route": "supplier-quotations"}]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{"from_route": "/quotations", "to_route": "Quotation"},
|
{"from_route": "/quotations", "to_route": "Quotation"},
|
||||||
|
|||||||
@ -288,8 +288,11 @@ erpnext.taxes_and_totals = erpnext.payments.extend({
|
|||||||
},
|
},
|
||||||
|
|
||||||
set_cumulative_total: function(row_idx, tax) {
|
set_cumulative_total: function(row_idx, tax) {
|
||||||
var tax_amount = (in_list(["Valuation and Total", "Total"], tax.category) ?
|
var tax_amount = tax.tax_amount_after_discount_amount;
|
||||||
tax.tax_amount_after_discount_amount : 0);
|
if (tax.category == 'Valuation') {
|
||||||
|
tax_amount = 0;
|
||||||
|
}
|
||||||
|
|
||||||
if (tax.add_deduct_tax == "Deduct") { tax_amount = -1*tax_amount; }
|
if (tax.add_deduct_tax == "Deduct") { tax_amount = -1*tax_amount; }
|
||||||
|
|
||||||
if(row_idx==0) {
|
if(row_idx==0) {
|
||||||
|
|||||||
@ -684,7 +684,7 @@
|
|||||||
"length": 0,
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"precision": "2",
|
"precision": "",
|
||||||
"print_hide": 1,
|
"print_hide": 1,
|
||||||
"print_hide_if_no_value": 0,
|
"print_hide_if_no_value": 0,
|
||||||
"read_only": 0,
|
"read_only": 0,
|
||||||
@ -1583,7 +1583,7 @@
|
|||||||
"istable": 1,
|
"istable": 1,
|
||||||
"max_attachments": 0,
|
"max_attachments": 0,
|
||||||
"menu_index": 0,
|
"menu_index": 0,
|
||||||
"modified": "2017-05-10 17:14:45.736424",
|
"modified": "2017-09-27 08:31:37.485134",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Selling",
|
"module": "Selling",
|
||||||
"name": "Quotation Item",
|
"name": "Quotation Item",
|
||||||
|
|||||||
@ -714,7 +714,7 @@
|
|||||||
"length": 0,
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"precision": "2",
|
"precision": "",
|
||||||
"print_hide": 1,
|
"print_hide": 1,
|
||||||
"print_hide_if_no_value": 0,
|
"print_hide_if_no_value": 0,
|
||||||
"read_only": 0,
|
"read_only": 0,
|
||||||
@ -745,7 +745,7 @@
|
|||||||
"length": 0,
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"precision": "2",
|
"precision": "",
|
||||||
"print_hide": 1,
|
"print_hide": 1,
|
||||||
"print_hide_if_no_value": 0,
|
"print_hide_if_no_value": 0,
|
||||||
"read_only": 1,
|
"read_only": 1,
|
||||||
@ -1963,7 +1963,7 @@
|
|||||||
"istable": 1,
|
"istable": 1,
|
||||||
"max_attachments": 0,
|
"max_attachments": 0,
|
||||||
"menu_index": 0,
|
"menu_index": 0,
|
||||||
"modified": "2017-07-28 14:04:04.289428",
|
"modified": "2017-09-27 08:31:37.129537",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Selling",
|
"module": "Selling",
|
||||||
"name": "Sales Order Item",
|
"name": "Sales Order Item",
|
||||||
|
|||||||
@ -21,7 +21,9 @@ frappe.pages['point-of-sale'].on_page_load = function(wrapper) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
frappe.pages['point-of-sale'].refresh = function(wrapper) {
|
frappe.pages['point-of-sale'].refresh = function(wrapper) {
|
||||||
|
if (wrapper.pos) {
|
||||||
cur_frm = wrapper.pos.frm;
|
cur_frm = wrapper.pos.frm;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
erpnext.pos.PointOfSale = class PointOfSale {
|
erpnext.pos.PointOfSale = class PointOfSale {
|
||||||
@ -742,7 +744,7 @@ class POSCart {
|
|||||||
|
|
||||||
this.wrapper.find('.discount_amount').on('change', (e) => {
|
this.wrapper.find('.discount_amount').on('change', (e) => {
|
||||||
frappe.model.set_value(this.frm.doctype, this.frm.docname,
|
frappe.model.set_value(this.frm.doctype, this.frm.docname,
|
||||||
'discount_amount', e.target.value);
|
'discount_amount', flt(e.target.value));
|
||||||
this.frm.trigger('discount_amount')
|
this.frm.trigger('discount_amount')
|
||||||
.then(() => {
|
.then(() => {
|
||||||
let discount_wrapper = this.wrapper.find('.additional_discount_percentage');
|
let discount_wrapper = this.wrapper.find('.additional_discount_percentage');
|
||||||
|
|||||||
@ -31,7 +31,7 @@ def get_items(start, page_length, price_list, item_group, search_value=""):
|
|||||||
ON
|
ON
|
||||||
(item_det.item_code=i.name or item_det.item_code=i.variant_of)
|
(item_det.item_code=i.name or item_det.item_code=i.variant_of)
|
||||||
where
|
where
|
||||||
i.disabled = 0 and i.has_variants = 0
|
i.disabled = 0 and i.has_variants = 0 and i.is_sales_item = 1
|
||||||
and i.item_group in (select name from `tabItem Group` where lft >= {lft} and rgt <= {rgt})
|
and i.item_group in (select name from `tabItem Group` where lft >= {lft} and rgt <= {rgt})
|
||||||
and (i.item_code like %(item_code)s
|
and (i.item_code like %(item_code)s
|
||||||
or i.item_name like %(item_code)s or i.barcode like %(item_code)s)
|
or i.item_name like %(item_code)s or i.barcode like %(item_code)s)
|
||||||
|
|||||||
@ -105,12 +105,12 @@ def set_batch_nos(doc, warehouse_field, throw = False):
|
|||||||
for d in doc.items:
|
for d in doc.items:
|
||||||
has_batch_no = frappe.db.get_value('Item', d.item_code, 'has_batch_no')
|
has_batch_no = frappe.db.get_value('Item', d.item_code, 'has_batch_no')
|
||||||
warehouse = d.get(warehouse_field, None)
|
warehouse = d.get(warehouse_field, None)
|
||||||
if has_batch_no and warehouse and d.qty > 0:
|
if has_batch_no and warehouse and d.stock_qty > 0:
|
||||||
if not d.batch_no:
|
if not d.batch_no:
|
||||||
d.batch_no = get_batch_no(d.item_code, warehouse, d.qty, throw)
|
d.batch_no = get_batch_no(d.item_code, warehouse, d.stock_qty, throw)
|
||||||
else:
|
else:
|
||||||
batch_qty = get_batch_qty(batch_no=d.batch_no, warehouse=warehouse)
|
batch_qty = get_batch_qty(batch_no=d.batch_no, warehouse=warehouse)
|
||||||
if flt(batch_qty) < flt(d.qty):
|
if flt(batch_qty) < flt(d.stock_qty):
|
||||||
frappe.throw(_("Row #{0}: The batch {1} has only {2} qty. Please select another batch which has {3} qty available or split the row into multiple rows, to deliver/issue from multiple batches").format(d.idx, d.batch_no, batch_qty, d.qty))
|
frappe.throw(_("Row #{0}: The batch {1} has only {2} qty. Please select another batch which has {3} qty available or split the row into multiple rows, to deliver/issue from multiple batches").format(d.idx, d.batch_no, batch_qty, d.qty))
|
||||||
|
|
||||||
def get_batch_no(item_code, warehouse, qty, throw=False):
|
def get_batch_no(item_code, warehouse, qty, throw=False):
|
||||||
|
|||||||
@ -713,7 +713,7 @@
|
|||||||
"length": 0,
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"precision": "2",
|
"precision": "",
|
||||||
"print_hide": 1,
|
"print_hide": 1,
|
||||||
"print_hide_if_no_value": 0,
|
"print_hide_if_no_value": 0,
|
||||||
"read_only": 0,
|
"read_only": 0,
|
||||||
@ -1956,7 +1956,7 @@
|
|||||||
"issingle": 0,
|
"issingle": 0,
|
||||||
"istable": 1,
|
"istable": 1,
|
||||||
"max_attachments": 0,
|
"max_attachments": 0,
|
||||||
"modified": "2017-05-10 17:14:50.456930",
|
"modified": "2017-09-27 08:31:38.768846",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Stock",
|
"module": "Stock",
|
||||||
"name": "Delivery Note Item",
|
"name": "Delivery Note Item",
|
||||||
|
|||||||
@ -85,7 +85,7 @@ rfq = Class.extend({
|
|||||||
frappe.unfreeze();
|
frappe.unfreeze();
|
||||||
if(r.message){
|
if(r.message){
|
||||||
$('.btn-sm').hide()
|
$('.btn-sm').hide()
|
||||||
window.location.href = "/quotations/" + encodeURIComponent(r.message);
|
window.location.href = "/supplier-quotations/" + encodeURIComponent(r.message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user