chore: auto-merge develop → main
Triggered by: 1efeaf9 fix: skip use-all confirm when only one item row and no open packages
This commit is contained in:
+7
-1
@@ -9272,7 +9272,13 @@ async function submitUseAll() {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// No opened packages → standard destructive confirm
|
// No opened packages → if there is only one item row, it's unambiguous — skip confirm
|
||||||
|
if (items0.length === 1) {
|
||||||
|
_doSubmitUseAll();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Multiple rows, no opened packages → standard destructive confirm
|
||||||
const totalQty = items0.reduce((s, i) => s + parseFloat(i.quantity || 0), 0);
|
const totalQty = items0.reduce((s, i) => s + parseFloat(i.quantity || 0), 0);
|
||||||
const unit = items0[0]?.unit || 'pz';
|
const unit = items0[0]?.unit || 'pz';
|
||||||
const qtyStr = stripHtml(formatQuantity(totalQty, unit, items0[0]?.default_quantity, items0[0]?.package_unit));
|
const qtyStr = stripHtml(formatQuantity(totalQty, unit, items0[0]?.default_quantity, items0[0]?.package_unit));
|
||||||
|
|||||||
Reference in New Issue
Block a user