diff --git a/erpnext/__init__.py b/erpnext/__init__.py index 514e5b3df5a..1c78709e5a3 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -4,7 +4,7 @@ import inspect import frappe from erpnext.hooks import regional_overrides -__version__ = '9.0.0' +__version__ = '9.0.1' def get_default_company(user=None): '''Get default company for user''' diff --git a/erpnext/accounts/doctype/pricing_rule/pricing_rule.json b/erpnext/accounts/doctype/pricing_rule/pricing_rule.json index 8860b092e0b..6fae8f7d7a4 100644 --- a/erpnext/accounts/doctype/pricing_rule/pricing_rule.json +++ b/erpnext/accounts/doctype/pricing_rule/pricing_rule.json @@ -1023,7 +1023,7 @@ "length": 0, "no_copy": 0, "permlevel": 0, - "precision": "2", + "precision": "", "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, @@ -1284,7 +1284,7 @@ "issingle": 0, "istable": 0, "max_attachments": 0, - "modified": "2017-08-31 16:34:41.614743", + "modified": "2017-09-27 08:31:38.432574", "modified_by": "Administrator", "module": "Accounts", "name": "Pricing Rule", diff --git a/erpnext/accounts/doctype/sales_invoice_item/sales_invoice_item.json b/erpnext/accounts/doctype/sales_invoice_item/sales_invoice_item.json index 41b794c176e..613f3847b93 100644 --- a/erpnext/accounts/doctype/sales_invoice_item/sales_invoice_item.json +++ b/erpnext/accounts/doctype/sales_invoice_item/sales_invoice_item.json @@ -699,7 +699,7 @@ "length": 0, "no_copy": 0, "permlevel": 0, - "precision": "2", + "precision": "", "print_hide": 1, "print_hide_if_no_value": 0, "read_only": 0, @@ -2166,7 +2166,7 @@ "issingle": 0, "istable": 1, "max_attachments": 0, - "modified": "2017-07-17 17:54:48.246507", + "modified": "2017-09-27 08:31:37.827893", "modified_by": "Administrator", "module": "Accounts", "name": "Sales Invoice Item", diff --git a/erpnext/hooks.py b/erpnext/hooks.py index 668796531da..48ed7415d73 100644 --- a/erpnext/hooks.py +++ b/erpnext/hooks.py @@ -80,7 +80,7 @@ website_route_rules = [ {"from_route": "/supplier-quotations/", "to_route": "order", "defaults": { "doctype": "Supplier Quotation", - "parents": [{"label": _("Supplier Quotation"), "route": "quotations"}] + "parents": [{"label": _("Supplier Quotation"), "route": "supplier-quotations"}] } }, {"from_route": "/quotations", "to_route": "Quotation"}, diff --git a/erpnext/public/js/controllers/taxes_and_totals.js b/erpnext/public/js/controllers/taxes_and_totals.js index 12ab7326769..84624b89973 100644 --- a/erpnext/public/js/controllers/taxes_and_totals.js +++ b/erpnext/public/js/controllers/taxes_and_totals.js @@ -288,8 +288,11 @@ erpnext.taxes_and_totals = erpnext.payments.extend({ }, set_cumulative_total: function(row_idx, tax) { - var tax_amount = (in_list(["Valuation and Total", "Total"], tax.category) ? - tax.tax_amount_after_discount_amount : 0); + var tax_amount = tax.tax_amount_after_discount_amount; + if (tax.category == 'Valuation') { + tax_amount = 0; + } + if (tax.add_deduct_tax == "Deduct") { tax_amount = -1*tax_amount; } if(row_idx==0) { diff --git a/erpnext/selling/doctype/quotation_item/quotation_item.json b/erpnext/selling/doctype/quotation_item/quotation_item.json index 794494d8ee1..3fc56fa2cec 100644 --- a/erpnext/selling/doctype/quotation_item/quotation_item.json +++ b/erpnext/selling/doctype/quotation_item/quotation_item.json @@ -684,7 +684,7 @@ "length": 0, "no_copy": 0, "permlevel": 0, - "precision": "2", + "precision": "", "print_hide": 1, "print_hide_if_no_value": 0, "read_only": 0, @@ -1583,7 +1583,7 @@ "istable": 1, "max_attachments": 0, "menu_index": 0, - "modified": "2017-05-10 17:14:45.736424", + "modified": "2017-09-27 08:31:37.485134", "modified_by": "Administrator", "module": "Selling", "name": "Quotation Item", diff --git a/erpnext/selling/doctype/sales_order_item/sales_order_item.json b/erpnext/selling/doctype/sales_order_item/sales_order_item.json index 47bc1b60774..fd7b0f29b37 100644 --- a/erpnext/selling/doctype/sales_order_item/sales_order_item.json +++ b/erpnext/selling/doctype/sales_order_item/sales_order_item.json @@ -714,7 +714,7 @@ "length": 0, "no_copy": 0, "permlevel": 0, - "precision": "2", + "precision": "", "print_hide": 1, "print_hide_if_no_value": 0, "read_only": 0, @@ -745,7 +745,7 @@ "length": 0, "no_copy": 0, "permlevel": 0, - "precision": "2", + "precision": "", "print_hide": 1, "print_hide_if_no_value": 0, "read_only": 1, @@ -1963,7 +1963,7 @@ "istable": 1, "max_attachments": 0, "menu_index": 0, - "modified": "2017-07-28 14:04:04.289428", + "modified": "2017-09-27 08:31:37.129537", "modified_by": "Administrator", "module": "Selling", "name": "Sales Order Item", diff --git a/erpnext/selling/page/point_of_sale/point_of_sale.js b/erpnext/selling/page/point_of_sale/point_of_sale.js index ec1a2926218..1b67ff2b724 100644 --- a/erpnext/selling/page/point_of_sale/point_of_sale.js +++ b/erpnext/selling/page/point_of_sale/point_of_sale.js @@ -21,7 +21,9 @@ frappe.pages['point-of-sale'].on_page_load = function(wrapper) { }; frappe.pages['point-of-sale'].refresh = function(wrapper) { - cur_frm = wrapper.pos.frm; + if (wrapper.pos) { + cur_frm = wrapper.pos.frm; + } } erpnext.pos.PointOfSale = class PointOfSale { @@ -742,7 +744,7 @@ class POSCart { this.wrapper.find('.discount_amount').on('change', (e) => { 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') .then(() => { let discount_wrapper = this.wrapper.find('.additional_discount_percentage'); diff --git a/erpnext/selling/page/point_of_sale/point_of_sale.py b/erpnext/selling/page/point_of_sale/point_of_sale.py index 8ed288b6e9d..fd6b8c91816 100644 --- a/erpnext/selling/page/point_of_sale/point_of_sale.py +++ b/erpnext/selling/page/point_of_sale/point_of_sale.py @@ -31,7 +31,7 @@ def get_items(start, page_length, price_list, item_group, search_value=""): ON (item_det.item_code=i.name or item_det.item_code=i.variant_of) 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_code like %(item_code)s or i.item_name like %(item_code)s or i.barcode like %(item_code)s) diff --git a/erpnext/stock/doctype/batch/batch.py b/erpnext/stock/doctype/batch/batch.py index 809c7ead4f4..a2e4c571b55 100644 --- a/erpnext/stock/doctype/batch/batch.py +++ b/erpnext/stock/doctype/batch/batch.py @@ -105,12 +105,12 @@ def set_batch_nos(doc, warehouse_field, throw = False): for d in doc.items: has_batch_no = frappe.db.get_value('Item', d.item_code, 'has_batch_no') 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: - 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: 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)) def get_batch_no(item_code, warehouse, qty, throw=False): diff --git a/erpnext/stock/doctype/delivery_note_item/delivery_note_item.json b/erpnext/stock/doctype/delivery_note_item/delivery_note_item.json index a441a7f51d0..4e1ea4059c2 100644 --- a/erpnext/stock/doctype/delivery_note_item/delivery_note_item.json +++ b/erpnext/stock/doctype/delivery_note_item/delivery_note_item.json @@ -713,7 +713,7 @@ "length": 0, "no_copy": 0, "permlevel": 0, - "precision": "2", + "precision": "", "print_hide": 1, "print_hide_if_no_value": 0, "read_only": 0, @@ -1956,7 +1956,7 @@ "issingle": 0, "istable": 1, "max_attachments": 0, - "modified": "2017-05-10 17:14:50.456930", + "modified": "2017-09-27 08:31:38.768846", "modified_by": "Administrator", "module": "Stock", "name": "Delivery Note Item", diff --git a/erpnext/templates/includes/rfq.js b/erpnext/templates/includes/rfq.js index 3b45cbe506c..b56c416dbde 100644 --- a/erpnext/templates/includes/rfq.js +++ b/erpnext/templates/includes/rfq.js @@ -85,7 +85,7 @@ rfq = Class.extend({ frappe.unfreeze(); if(r.message){ $('.btn-sm').hide() - window.location.href = "/quotations/" + encodeURIComponent(r.message); + window.location.href = "/supplier-quotations/" + encodeURIComponent(r.message); } } })