[Fix] Incorrect assignment of Serial No in POS Invoice (#14772)

* Fix incorrect assignment of serial no in Sales Invoice through POS

* Add conversion factor to quantity check
This commit is contained in:
Alchez 2018-07-06 14:36:52 +05:30 committed by Nabin Hait
parent 6429ba9ed9
commit 8f2a0f3d79

View File

@ -239,8 +239,9 @@ class AccountsController(TransactionBase):
item.set(fieldname, value)
elif fieldname == "serial_no":
stock_qty = item.get("stock_qty") * -1 if item.get("stock_qty") < 0 else item.get("stock_qty")
if stock_qty != len(get_serial_nos(item.get('serial_no'))):
item_qty = abs(item.get("qty")) * item.get("conversion_factor")
if item_qty != len(get_serial_nos(item.get('serial_no'))):
item.set(fieldname, value)
if ret.get("pricing_rule"):