fix: Accepted and Rejected warehouse cannot be same (#43568)

This commit is contained in:
rohitwaghchaure
2024-10-08 17:40:35 +05:30
committed by GitHub
parent 3e5ecb44db
commit 5130f7d411
3 changed files with 29 additions and 12 deletions

View File

@@ -392,7 +392,7 @@ erpnext.buying = {
item[field] = r.message[field];
});
item.type_of_transaction = item.rejected_qty > 0 ? "Inward" : "Outward";
item.type_of_transaction = !doc.is_return > 0 ? "Inward" : "Outward";
item.is_rejected = true;
new erpnext.SerialBatchPackageSelector(
@@ -404,7 +404,7 @@ erpnext.buying = {
}
let update_values = {
"serial_and_batch_bundle": r.name,
"rejected_serial_and_batch_bundle": r.name,
"use_serial_batch_fields": 0,
"rejected_qty": qty / flt(item.conversion_factor || 1, precision("conversion_factor", item))
}