This commit is contained in:
thefalconx33 2019-09-24 18:49:16 +05:30
parent d9e9d562f8
commit c15cc8fc28
2 changed files with 5 additions and 0 deletions

View File

@ -598,6 +598,7 @@ class BuyingController(StockController):
'item_code': d.item_code,
'via_stock_ledger': False,
'company': self.company,
'supplier': self.supplier,
'actual_qty': d.qty,
'purchase_document_type': self.doctype,
'purchase_document_no': self.name,
@ -625,6 +626,7 @@ class BuyingController(StockController):
'asset_category': item_data.get('asset_category'),
'location': row.asset_location,
'company': self.company,
'supplier': self.supplier,
'purchase_date': self.posting_date,
'calculate_depreciation': 1,
'purchase_receipt_amount': purchase_amount,

View File

@ -362,6 +362,7 @@ def auto_make_serial_nos(args):
sr.batch_no = args.get('batch_no')
sr.location = args.get('location')
sr.company = args.get('company')
sr.supplier = args.get('supplier')
if sr.sales_order and args.get('voucher_type') == "Stock Entry" \
and not args.get('actual_qty', 0) > 0:
sr.sales_order = None
@ -396,10 +397,12 @@ def make_serial_no(serial_no, args):
sr.via_stock_ledger = args.get('via_stock_ledger') or True
sr.asset = args.get('asset')
sr.location = args.get('location')
if args.get('purchase_document_type'):
sr.purchase_document_type = args.get('purchase_document_type')
sr.purchase_document_no = args.get('purchase_document_no')
sr.supplier = args.get('supplier')
sr.insert()
if args.get('warehouse'):