[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

@@ -293,20 +293,14 @@ class DocType(BuyingController):
reconcile_against_document(lst)
def on_submit(self):
purchase_controller = webnotes.get_obj("Purchase Common")
purchase_controller.is_item_table_empty(self)
self.check_prev_docstatus()
# Check for Approving Authority
get_obj('Authorization Control').validate_approving_authority(self.doc.doctype,self.doc.company, self.doc.grand_total)
get_obj('Authorization Control').validate_approving_authority(self.doc.doctype,
self.doc.company, self.doc.grand_total)
# this sequence because outstanding may get -negative
self.make_gl_entries()
self.update_against_document_in_jv()
self.update_prevdoc_status()
def make_gl_entries(self):

View File

@@ -2,7 +2,7 @@
{
"creation": "2013-05-24 19:29:05",
"docstatus": 0,
"modified": "2013-10-11 13:12:38",
"modified": "2013-10-18 13:12:38",
"modified_by": "Administrator",
"owner": "Administrator"
},
@@ -323,7 +323,7 @@
"fieldname": "packing_details",
"fieldtype": "Table",
"label": "Packing Details",
"options": "Delivery Note Packing Item",
"options": "Packed Item",
"print_hide": 1,
"read_only": 0
},

View File

@@ -75,7 +75,7 @@ def get_item_sales_bom():
for d in webnotes.conn.sql("""select parenttype, parent, parent_item,
item_code, warehouse, -1*qty as total_qty, parent_detail_docname
from `tabDelivery Note Packing Item` where docstatus=1""", as_dict=True):
from `tabPacked Item` where docstatus=1""", as_dict=True):
item_sales_bom.setdefault(d.parenttype, webnotes._dict()).setdefault(d.parent,
webnotes._dict()).setdefault(d.parent_item, []).append(d)