From 9dd6330418d93d9003cf17857ba0a1df8a65dcbc Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Wed, 16 Nov 2011 16:38:55 +0530 Subject: [PATCH] updated landed cost wizard --- erpnext/stock/doctype/landed_cost_wizard/landed_cost_wizard.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/erpnext/stock/doctype/landed_cost_wizard/landed_cost_wizard.py b/erpnext/stock/doctype/landed_cost_wizard/landed_cost_wizard.py index fccc3db4bb..2b828f9059 100644 --- a/erpnext/stock/doctype/landed_cost_wizard/landed_cost_wizard.py +++ b/erpnext/stock/doctype/landed_cost_wizard/landed_cost_wizard.py @@ -54,6 +54,8 @@ class DocType: def get_selected_pr(self): """ Get selected purchase receipt no """ self.selected_pr = [d.purchase_receipt for d in getlist(self.doclist, 'lc_pr_details') if d.select_pr] + if not self.selected_pr: + msgprint("Please select atleast one PR to proceed.", raise_exception=1) def validate_selected_pr(self): """Validate selected PR as submitted""" @@ -180,7 +182,6 @@ class DocType: if ocd[oc].category != "For Valuation": prev_total += add_ded * flt(ocd[oc].total_amount) total += add_ded * flt(ocd[oc].tax_amount) - msgprint(add_ded * flt(ocd[oc].tax_amount)) ocd[oc].total = total else: prev_total = prev_total