Merge branch 'master' of github.com:webnotes/erpnext
This commit is contained in:
commit
976f3b5adb
@ -518,6 +518,7 @@ class DocType(BuyingController):
|
||||
|
||||
def on_update(self):
|
||||
pass
|
||||
|
||||
def update_raw_material_cost(self):
|
||||
if self.sub_contracted_items:
|
||||
for d in self.doclist.get({"parentfield": "entries"}):
|
||||
|
||||
@ -290,7 +290,7 @@ class DocType(BuyingController):
|
||||
self.make_gl_entries()
|
||||
|
||||
def validate_for_subcontracting(self):
|
||||
if self.sub_contracted_items and self.purchase_items and not self.doc.is_subcontracted:
|
||||
if not self.doc.is_subcontracted and self.sub_contracted_items:
|
||||
webnotes.msgprint(_("""Please enter whether Purchase Recipt is made for subcontracting
|
||||
or purchasing, in 'Is Subcontracted' field"""), raise_exception=1)
|
||||
|
||||
@ -300,7 +300,7 @@ class DocType(BuyingController):
|
||||
|
||||
def update_raw_materials_supplied(self):
|
||||
self.doclist = self.doc.clear_table(self.doclist, 'pr_raw_material_details')
|
||||
if self.sub_contracted_items:
|
||||
if self.doc.is_subcontracted=="Yes":
|
||||
for item in self.doclist.get({"parentfield": "purchase_receipt_details"}):
|
||||
if item.item_code in self.sub_contracted_items:
|
||||
self.add_bom_items(item)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user