Fixed merge conflict
This commit is contained in:
commit
1f6bd0ad37
@ -2,7 +2,7 @@
|
||||
from __future__ import unicode_literals
|
||||
import frappe
|
||||
|
||||
__version__ = '7.2.31'
|
||||
__version__ = '7.2.32'
|
||||
|
||||
def get_default_company(user=None):
|
||||
'''Get default company for user'''
|
||||
|
@ -117,7 +117,7 @@ def apply_pricing_rule(args):
|
||||
args_copy = copy.deepcopy(args)
|
||||
args_copy.update(item)
|
||||
out.append(get_pricing_rule_for_item(args_copy))
|
||||
if set_serial_nos_based_on_fifo:
|
||||
if set_serial_nos_based_on_fifo and not args.get('is_return'):
|
||||
out.append(get_serial_no_for_item(args_copy))
|
||||
return out
|
||||
|
||||
|
@ -1375,6 +1375,7 @@
|
||||
"collapsible": 1,
|
||||
"collapsible_depends_on": "eval:doc.serial_no || doc.batch_no",
|
||||
"columns": 0,
|
||||
"depends_on": "eval: parent.update_stock",
|
||||
"fieldname": "warehouse_and_reference",
|
||||
"fieldtype": "Section Break",
|
||||
"hidden": 0,
|
||||
@ -2093,7 +2094,7 @@
|
||||
"issingle": 0,
|
||||
"istable": 1,
|
||||
"max_attachments": 0,
|
||||
"modified": "2017-03-13 19:35:22.416029",
|
||||
"modified": "2017-03-29 16:26:36.507924",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Accounts",
|
||||
"name": "Sales Invoice Item",
|
||||
|
@ -6,6 +6,7 @@ import frappe
|
||||
from frappe import _, scrub
|
||||
from erpnext.stock.utils import get_incoming_rate
|
||||
from erpnext.controllers.queries import get_match_cond
|
||||
from erpnext.stock.stock_ledger import get_valuation_rate
|
||||
from frappe.utils import flt
|
||||
|
||||
|
||||
@ -221,7 +222,10 @@ class GrossProfitGenerator(object):
|
||||
from `tabPurchase Invoice Item`
|
||||
where item_code = %s and docstatus=1""", item_code)[0][0])
|
||||
else:
|
||||
self.average_buying_rate[item_code] = get_incoming_rate(row)
|
||||
average_buying_rate = get_incoming_rate(row)
|
||||
if not average_buying_rate:
|
||||
average_buying_rate = get_valuation_rate(item_code, row.warehouse, allow_zero_rate=True)
|
||||
self.average_buying_rate[item_code] = average_buying_rate
|
||||
|
||||
return self.average_buying_rate[item_code]
|
||||
|
||||
|
@ -37,6 +37,8 @@ class Attendance(Document):
|
||||
def validate_attendance_date(self):
|
||||
if getdate(self.attendance_date) > getdate(nowdate()):
|
||||
frappe.throw(_("Attendance can not be marked for future dates"))
|
||||
elif getdate(self.att_date) < frappe.db.get_value("Employee", self.employee, "date_of_joining"):
|
||||
frappe.throw(_("Attendance date can not be less than employee's joining date"))
|
||||
|
||||
def validate_employee(self):
|
||||
emp = frappe.db.sql("select name from `tabEmployee` where name = %s and status = 'Active'",
|
||||
|
@ -42,7 +42,7 @@ class ProductionPlanningTool(Document):
|
||||
select distinct so.name, so.transaction_date, so.customer, so.base_grand_total
|
||||
from `tabSales Order` so, `tabSales Order Item` so_item
|
||||
where so_item.parent = so.name
|
||||
and so.docstatus = 1 and so.status != "Stopped"
|
||||
and so.docstatus = 1 and so.status not in ("Stopped", "Closed")
|
||||
and so.company = %(company)s
|
||||
and so_item.qty > so_item.delivered_qty {0} {1}
|
||||
and (exists (select name from `tabBOM` bom where bom.item=so_item.item_code
|
||||
|
@ -761,7 +761,8 @@ erpnext.TransactionController = erpnext.taxes_and_totals.extend({
|
||||
"sales_partner": me.frm.doc.sales_partner,
|
||||
"ignore_pricing_rule": me.frm.doc.ignore_pricing_rule,
|
||||
"doctype": me.frm.doc.doctype,
|
||||
"name": me.frm.doc.name
|
||||
"name": me.frm.doc.name,
|
||||
"is_return": cint(me.frm.doc.is_return)
|
||||
};
|
||||
},
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user