fix: get_batch_qty_and_serial_no() requires argument 'stock_qty' (#19693)

This commit is contained in:
Marica 2019-11-27 15:49:41 +05:30 committed by Nabin Hait
parent a791170f29
commit f0e87f7fdd
2 changed files with 14 additions and 2 deletions

View File

@ -309,7 +309,7 @@ erpnext.selling.SellingController = erpnext.TransactionController.extend({
child: item, child: item,
args: { args: {
"batch_no": item.batch_no, "batch_no": item.batch_no,
"stock_qty": item.stock_qty, "stock_qty": item.stock_qty || item.qty, //if stock_qty field is not available fetch qty (in case of Packed Items table)
"warehouse": item.warehouse, "warehouse": item.warehouse,
"item_code": item.item_code, "item_code": item.item_code,
"has_serial_no": has_serial_no "has_serial_no": has_serial_no

View File

@ -18,6 +18,7 @@
"serial_no", "serial_no",
"column_break_11", "column_break_11",
"batch_no", "batch_no",
"actual_batch_qty",
"section_break_13", "section_break_13",
"actual_qty", "actual_qty",
"projected_qty", "projected_qty",
@ -189,15 +190,26 @@
"oldfieldtype": "Data", "oldfieldtype": "Data",
"print_hide": 1, "print_hide": 1,
"read_only": 1 "read_only": 1
},
{
"depends_on": "batch_no",
"fieldname": "actual_batch_qty",
"fieldtype": "Float",
"label": "Actual Batch Quantity",
"no_copy": 1,
"print_hide": 1,
"read_only": 1
} }
], ],
"idx": 1, "idx": 1,
"istable": 1, "istable": 1,
"modified": "2019-08-27 18:17:37.167512", "modified": "2019-11-26 20:09:59.400960",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "Stock", "module": "Stock",
"name": "Packed Item", "name": "Packed Item",
"owner": "Administrator", "owner": "Administrator",
"permissions": [], "permissions": [],
"sort_field": "modified",
"sort_order": "DESC",
"track_changes": 1 "track_changes": 1
} }