mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-26 16:34:46 +00:00
[fix] [minor] merge conflict fixed
This commit is contained in:
@@ -68,7 +68,6 @@ class DocType(DocListController):
|
||||
matched=True
|
||||
ref_uom = webnotes.conn.get_value("Stock Ledger Entry",
|
||||
{"item_code": self.doc.name, "is_cancelled": "No"}, "stock_uom")
|
||||
|
||||
if ref_uom:
|
||||
if cstr(ref_uom) != cstr(self.doc.stock_uom):
|
||||
matched = False
|
||||
|
||||
@@ -72,7 +72,7 @@ class DocType(DocListController):
|
||||
|
||||
def validate_item(self):
|
||||
item_det = webnotes.conn.sql("""select name, has_batch_no, docstatus,
|
||||
is_stock_item, has_serial_no, serial_no_series
|
||||
is_stock_item, has_serial_no, serial_no_series, stock_uom
|
||||
from tabItem where name=%s""",
|
||||
self.doc.item_code, as_dict=True)[0]
|
||||
|
||||
@@ -88,7 +88,10 @@ class DocType(DocListController):
|
||||
if not webnotes.conn.sql("""select name from `tabBatch`
|
||||
where item='%s' and name ='%s' and docstatus != 2""" % (self.doc.item_code, self.doc.batch_no)):
|
||||
webnotes.throw("'%s' is not a valid Batch Number for Item '%s'" % (self.doc.batch_no, self.doc.item_code))
|
||||
|
||||
|
||||
if not self.doc.stock_uom:
|
||||
self.doc.stock_uom = item_det.stock_uom
|
||||
|
||||
self.validate_serial_no(item_det)
|
||||
|
||||
def validate_serial_no(self, item_det):
|
||||
|
||||
@@ -243,6 +243,7 @@ class DocType(StockController):
|
||||
"voucher_type": self.doc.doctype,
|
||||
"voucher_no": self.doc.name,
|
||||
"company": self.doc.company,
|
||||
"stock_uom": webnotes.conn.get_value("Item", row.item_code, "stock_uom"),
|
||||
"is_cancelled": "No",
|
||||
"voucher_detail_no": row.voucher_detail_no,
|
||||
"fiscal_year": self.doc.fiscal_year,
|
||||
|
||||
Reference in New Issue
Block a user