@ -416,26 +416,26 @@ class SellingController(StockController):
return
for d in self . get ( ' items ' ) :
if self . doctype == " Sales Invoice " :
e = [ d . item_code , d . description , d . warehouse , d . sales_order or d . delivery_note , d . batch_no or ' ' ]
f = [ d . item_code , d . description , d . sales_order or d . delivery_note ]
if self . doctype in [ " POS Invoice " , " Sales Invoice " ] :
stock_it ems = [ d . item_code , d . description , d . warehouse , d . sales_order or d . delivery_note , d . batch_no or ' ' ]
non_stock_items = [ d . item_code , d . description , d . sales_order or d . delivery_note ]
elif self . doctype == " Delivery Note " :
e = [ d . item_code , d . description , d . warehouse , d . against_sales_order or d . against_sales_invoice , d . batch_no or ' ' ]
f = [ d . item_code , d . description , d . against_sales_order or d . against_sales_invoice ]
stock_it ems = [ d . item_code , d . description , d . warehouse , d . against_sales_order or d . against_sales_invoice , d . batch_no or ' ' ]
non_stock_items = [ d . item_code , d . description , d . against_sales_order or d . against_sales_invoice ]
elif self . doctype in [ " Sales Order " , " Quotation " ] :
e = [ d . item_code , d . description , d . warehouse , ' ' ]
f = [ d . item_code , d . description ]
stock_it ems = [ d . item_code , d . description , d . warehouse , ' ' ]
non_stock_items = [ d . item_code , d . description ]
if frappe . db . get_value ( " Item " , d . item_code , " is_stock_item " ) == 1 :
if e in check_list :
if stock_it ems in check_list :
frappe . throw ( _ ( " Note: Item {0} entered multiple times " ) . format ( d . item_code ) )
else :
check_list . append ( e )
check_list . append ( stock_it ems )
else :
if f in chk_dupl_itm :
if non_stock_items in chk_dupl_itm :
frappe . throw ( _ ( " Note: Item {0} entered multiple times " ) . format ( d . item_code ) )
else :
chk_dupl_itm . append ( f )
chk_dupl_itm . append ( non_stock_items )
def validate_target_warehouse ( self ) :
items = self . get ( " items " ) + ( self . get ( " packed_items " ) or [ ] )