From f0e87f7fdd8b398b23f2cb50d893b28a1bb3ed93 Mon Sep 17 00:00:00 2001 From: Marica Date: Wed, 27 Nov 2019 15:49:41 +0530 Subject: [PATCH] fix: get_batch_qty_and_serial_no() requires argument 'stock_qty' (#19693) --- erpnext/selling/sales_common.js | 2 +- erpnext/stock/doctype/packed_item/packed_item.json | 14 +++++++++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/erpnext/selling/sales_common.js b/erpnext/selling/sales_common.js index e508476576..1c9b30b828 100644 --- a/erpnext/selling/sales_common.js +++ b/erpnext/selling/sales_common.js @@ -309,7 +309,7 @@ erpnext.selling.SellingController = erpnext.TransactionController.extend({ child: item, args: { "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, "item_code": item.item_code, "has_serial_no": has_serial_no diff --git a/erpnext/stock/doctype/packed_item/packed_item.json b/erpnext/stock/doctype/packed_item/packed_item.json index b089e759a0..2ac5c426c0 100644 --- a/erpnext/stock/doctype/packed_item/packed_item.json +++ b/erpnext/stock/doctype/packed_item/packed_item.json @@ -18,6 +18,7 @@ "serial_no", "column_break_11", "batch_no", + "actual_batch_qty", "section_break_13", "actual_qty", "projected_qty", @@ -189,15 +190,26 @@ "oldfieldtype": "Data", "print_hide": 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, "istable": 1, - "modified": "2019-08-27 18:17:37.167512", + "modified": "2019-11-26 20:09:59.400960", "modified_by": "Administrator", "module": "Stock", "name": "Packed Item", "owner": "Administrator", "permissions": [], + "sort_field": "modified", + "sort_order": "DESC", "track_changes": 1 }