fix: serial and batch bundle return not working (#38754)

* fix: serial and batch bundle return not working

* test: added test case for delivery note return against denormalized serial no
This commit is contained in:
rohitwaghchaure
2023-12-17 12:42:07 +05:30
committed by GitHub
parent 863116f1cd
commit 0743289925
12 changed files with 460 additions and 133 deletions

View File

@@ -361,9 +361,14 @@ erpnext.buying = {
new erpnext.SerialBatchPackageSelector(
me.frm, item, (r) => {
if (r) {
let qty = Math.abs(r.total_qty);
if (doc.is_return) {
qty = qty * -1;
}
let update_values = {
"serial_and_batch_bundle": r.name,
"qty": Math.abs(r.total_qty)
"qty": qty
}
if (r.warehouse) {
@@ -396,9 +401,14 @@ erpnext.buying = {
new erpnext.SerialBatchPackageSelector(
me.frm, item, (r) => {
if (r) {
let qty = Math.abs(r.total_qty);
if (doc.is_return) {
qty = qty * -1;
}
let update_values = {
"serial_and_batch_bundle": r.name,
"rejected_qty": Math.abs(r.total_qty)
"rejected_qty": qty
}
if (r.warehouse) {