Merge branch 'version-12-hotfix' into stock-ledger-fix

This commit is contained in:
Suraj Shetty 2019-08-02 08:43:54 +05:30 committed by GitHub
commit b559bf6de6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 6 deletions

View File

@ -6,6 +6,9 @@ from frappe import _
def get_data():
return {
'fieldname': 'bank',
'non_standard_fieldnames': {
'Paymnet Order': 'company_bank'
},
'transactions': [
{
'label': _('Bank Deatils'),

View File

@ -802,13 +802,13 @@ class StockEntry(StockController):
self.add_to_stock_entry_detail(item_dict)
if self.purpose != "Send to Subcontractor":
scrap_item_dict = self.get_bom_scrap_material(self.fg_completed_qty)
for item in itervalues(scrap_item_dict):
if self.pro_doc and self.pro_doc.scrap_warehouse:
item["to_warehouse"] = self.pro_doc.scrap_warehouse
if self.purpose != "Send to Subcontractor" and self.purpose == "Manufacture":
scrap_item_dict = self.get_bom_scrap_material(self.fg_completed_qty)
for item in itervalues(scrap_item_dict):
if self.pro_doc and self.pro_doc.scrap_warehouse:
item["to_warehouse"] = self.pro_doc.scrap_warehouse
self.add_to_stock_entry_detail(scrap_item_dict, bom_no=self.bom_no)
self.add_to_stock_entry_detail(scrap_item_dict, bom_no=self.bom_no)
# fetch the serial_no of the first stock entry for the second stock entry
if self.work_order and self.purpose == "Manufacture":