[cleanup] purchase common

This commit is contained in:
Nabin Hait
2013-10-18 17:00:53 +05:30
parent 0bc5ae55d8
commit 5566bcaa0e
11 changed files with 15 additions and 42 deletions

View File

@@ -69,7 +69,7 @@ class DocType:
where parent = %s and item_code = %s""",
(self.doc.sales_order, self.doc.production_item))[0][0]
# get qty from Packing Item table
dnpi_qty = webnotes.conn.sql("""select sum(qty) from `tabDelivery Note Packing Item`
dnpi_qty = webnotes.conn.sql("""select sum(qty) from `tabPacked Item`
where parent = %s and parenttype = 'Sales Order' and item_code = %s""",
(self.doc.sales_order, self.doc.production_item))[0][0]
# total qty in SO