rejected serial no fixes
This commit is contained in:
parent
23aac61bbf
commit
1d15c704af
@ -353,10 +353,9 @@ class DocType(TransactionBase):
|
||||
raise Exception
|
||||
|
||||
# validate stock item
|
||||
if item[0][0]=='Yes':
|
||||
if not d.warehouse:
|
||||
msgprint("Warehouse is mandatory for %s, since it is a stock item" % d.item_code)
|
||||
raise Exception
|
||||
if item[0][0]=='Yes' and d.qty and not d.warehouse:
|
||||
msgprint("Warehouse is mandatory for %s, since it is a stock item" %
|
||||
d.item_code, raise_exception=1)
|
||||
|
||||
# validate purchase item
|
||||
if item[0][1] != 'Yes' and item[0][2] != 'Yes':
|
||||
|
@ -230,7 +230,8 @@ class DocType(TransactionBase):
|
||||
get_obj("Warehouse", d.warehouse).update_bin(args)
|
||||
|
||||
# UPDATE actual qty to warehouse by pr_qty
|
||||
self.make_sl_entry(d, d.warehouse, flt(pr_qty), d.valuation_rate, is_submit)
|
||||
if pr_qty:
|
||||
self.make_sl_entry(d, d.warehouse, flt(pr_qty), d.valuation_rate, is_submit)
|
||||
|
||||
# UPDATE actual to rejected warehouse by rejected qty
|
||||
if flt(d.rejected_qty) > 0:
|
||||
|
@ -80,14 +80,13 @@ class DocType:
|
||||
|
||||
# [bug fix] need to strip serial nos of all spaces and new lines for validation
|
||||
serial_no = cstr(d.serial_no).strip()
|
||||
|
||||
if serial_no:
|
||||
if is_stock_item != 'Yes':
|
||||
msgprint("Serial No is not required for non-stock item: %s" % d.item_code, raise_exception=1)
|
||||
elif ar_required != 'Yes':
|
||||
msgprint("If serial no required, please select 'Yes' in 'Has Serial No' in Item :" + d.item_code + \
|
||||
', otherwise please remove serial no', raise_exception=1)
|
||||
elif ar_required == 'Yes' and not serial_no:
|
||||
elif ar_required == 'Yes' and not serial_no and d.qty:
|
||||
msgprint("Serial no is mandatory for item: "+ d.item_code, raise_exception = 1)
|
||||
|
||||
# validate rejected serial nos
|
||||
|
Loading…
Reference in New Issue
Block a user