mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-05 22:48:27 +00:00
Merge pull request #27126 from rohitwaghchaure/fixed-donot-overrride-batch-no-v13
fix: selected batch no changed on updation of qty
This commit is contained in:
@@ -390,6 +390,10 @@ erpnext.selling.SellingController = erpnext.TransactionController.extend({
|
|||||||
},
|
},
|
||||||
|
|
||||||
_set_batch_number: function(doc) {
|
_set_batch_number: function(doc) {
|
||||||
|
if (doc.batch_no) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
let args = {'item_code': doc.item_code, 'warehouse': doc.warehouse, 'qty': flt(doc.qty) * flt(doc.conversion_factor)};
|
let args = {'item_code': doc.item_code, 'warehouse': doc.warehouse, 'qty': flt(doc.qty) * flt(doc.conversion_factor)};
|
||||||
if (doc.has_serial_no && doc.serial_no) {
|
if (doc.has_serial_no && doc.serial_no) {
|
||||||
args['serial_no'] = doc.serial_no
|
args['serial_no'] = doc.serial_no
|
||||||
|
|||||||
@@ -278,6 +278,10 @@ def get_basic_details(args, item, overwrite_warehouse=True):
|
|||||||
else:
|
else:
|
||||||
args.uom = item.stock_uom
|
args.uom = item.stock_uom
|
||||||
|
|
||||||
|
if (args.get("batch_no") and
|
||||||
|
item.name != frappe.get_cached_value('Batch', args.get("batch_no"), 'item')):
|
||||||
|
args['batch_no'] = ''
|
||||||
|
|
||||||
out = frappe._dict({
|
out = frappe._dict({
|
||||||
"item_code": item.name,
|
"item_code": item.name,
|
||||||
"item_name": item.item_name,
|
"item_name": item.item_name,
|
||||||
|
|||||||
Reference in New Issue
Block a user