Merge branch 'master' into develop

This commit is contained in:
Nabin Hait 2017-09-27 13:05:21 +05:30
commit 76e1ca35ad
12 changed files with 27 additions and 22 deletions

View File

@ -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'''

View File

@ -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",

View File

@ -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",

View File

@ -80,7 +80,7 @@ website_route_rules = [
{"from_route": "/supplier-quotations/<path:name>", "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"},

View File

@ -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) {

View File

@ -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",

View File

@ -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",

View File

@ -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');

View File

@ -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)

View File

@ -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):

View File

@ -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",

View File

@ -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);
}
}
})