From 1efeaf9236e8499200afc82f2859661e19de4668 Mon Sep 17 00:00:00 2001 From: dadaloop82 Date: Fri, 22 May 2026 04:49:27 +0000 Subject: [PATCH] fix: skip use-all confirm when only one item row and no open packages --- assets/js/app.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/assets/js/app.js b/assets/js/app.js index d7b4494..ce7ad30 100644 --- a/assets/js/app.js +++ b/assets/js/app.js @@ -9272,7 +9272,13 @@ async function submitUseAll() { 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 unit = items0[0]?.unit || 'pz'; const qtyStr = stripHtml(formatQuantity(totalQty, unit, items0[0]?.default_quantity, items0[0]?.package_unit));