[Enhancement] Purchase return for rejected qty

This commit is contained in:
Rohit Waghchaure
2016-08-29 18:19:32 +05:30
parent b2b238323b
commit 560ba391f9
3 changed files with 76 additions and 46 deletions

View File

@@ -37,7 +37,7 @@ class BuyingController(StockController):
self.validate_purchase_receipt_if_update_stock()
if self.doctype=="Purchase Receipt" or (self.doctype=="Purchase Invoice" and self.update_stock):
self.validate_purchase_return()
# self.validate_purchase_return()
self.validate_rejected_warehouse()
self.validate_accepted_rejected_qty()
@@ -346,7 +346,7 @@ class BuyingController(StockController):
})
sl_entries.append(sle)
if flt(d.rejected_qty) > 0:
if flt(d.rejected_qty) != 0:
sl_entries.append(self.get_sl_entries(d, {
"warehouse": d.rejected_warehouse,
"actual_qty": flt(d.rejected_qty) * flt(d.conversion_factor),