@propeller-commerce/propeller-v2-react-ui 0.23.1 → 0.24.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -8,6 +8,29 @@ once it reaches 1.0. Until then (the `0.x` line) the public API may change
8
8
  between minor versions; breaking changes are called out below and in
9
9
  [MIGRATION.md](./MIGRATION.md).
10
10
 
11
+ ## [0.24.0] - 2026-09-25
12
+
13
+ ### Added
14
+
15
+ - `QuickOrderProps.includeTax` and the `colPriceInclVat` label key.
16
+
17
+ ### Fixed
18
+
19
+ - **QuickOrder showed tax-inclusive prices under an "excl. VAT" header, and
20
+ ignored the shop's price toggle.** The rows read `price.net`, which the API
21
+ defines as the price *including* tax, while the column said excl. VAT — so a
22
+ line read 21 % high against the same product on the PDP or in the cart. The
23
+ component now takes `includeTax` (resolved from `<PropellerProvider>` like
24
+ every other price-bearing component), picks `price.gross` or `price.net` to
25
+ match, and labels the column accordingly. (PWP-1027)
26
+
27
+ - **The authorization-request detail mixed tax bases in one row.** The unit
28
+ price came from `totalSum` (excl. VAT) and the line total from `totalSumNet`
29
+ (incl. VAT), so 1 × € 478,55 showed a € 579,05 total and the lines did not sum
30
+ to the "Total excl. VAT" figure printed directly below them. Both cells are
31
+ now excl. VAT, matching that totals block, and the column headers say so.
32
+ (PWP-1029)
33
+
11
34
  ## [0.23.1] - 2026-09-24
12
35
 
13
36
  ### Fixed
package/dist/index.cjs CHANGED
@@ -14397,6 +14397,7 @@ function blankRow() {
14397
14397
  productId: null,
14398
14398
  name: "",
14399
14399
  netPrice: 0,
14400
+ grossPrice: 0,
14400
14401
  quantity: 1,
14401
14402
  minQuantity: 1,
14402
14403
  matches: [],
@@ -14427,6 +14428,7 @@ function QuickOrderInner(props) {
14427
14428
  const graphqlClient = props.graphqlClient;
14428
14429
  const displayPrice = (n) => props.formatPrice ? props.formatPrice(n) : propellerV2CoreUi.formatPrice(n, { symbol: currency, locale: propellerV2CoreUi.localeForLanguage(props.language) });
14429
14430
  const L = (key, fallback) => propellerV2CoreUi.getLabel(labels, key, fallback);
14431
+ const rowPrice = (r) => props.includeTax ? r.netPrice : r.grossPrice;
14430
14432
  const { submitting, searchProducts, submit } = useQuickOrder({
14431
14433
  graphqlClient,
14432
14434
  user,
@@ -14453,7 +14455,7 @@ function QuickOrderInner(props) {
14453
14455
  }, []);
14454
14456
  const onCodeInput = React6.useCallback(
14455
14457
  (key, value) => {
14456
- patchRow(key, { code: value, productId: null, name: "", netPrice: 0, searched: false });
14458
+ patchRow(key, { code: value, productId: null, name: "", netPrice: 0, grossPrice: 0, searched: false });
14457
14459
  setNotice(null);
14458
14460
  const timers = searchTimers.current;
14459
14461
  if (timers[key]) clearTimeout(timers[key]);
@@ -14474,7 +14476,7 @@ function QuickOrderInner(props) {
14474
14476
  const dup = rows.some((r) => r.key !== key && r.productId && r.code === match.sku);
14475
14477
  if (dup) {
14476
14478
  setNotice(L("alreadyInList", "Product is already in the list"));
14477
- patchRow(key, { code: "", matches: [], productId: null, name: "", netPrice: 0, searched: false });
14479
+ patchRow(key, { code: "", matches: [], productId: null, name: "", netPrice: 0, grossPrice: 0, searched: false });
14478
14480
  return;
14479
14481
  }
14480
14482
  patchRow(key, {
@@ -14483,6 +14485,7 @@ function QuickOrderInner(props) {
14483
14485
  clusterId: match.clusterId,
14484
14486
  name: match.name,
14485
14487
  netPrice: match.netPrice,
14488
+ grossPrice: match.grossPrice,
14486
14489
  quantity: match.minQuantity,
14487
14490
  minQuantity: match.minQuantity,
14488
14491
  matches: [],
@@ -14544,6 +14547,7 @@ function QuickOrderInner(props) {
14544
14547
  clusterId: exact.clusterId,
14545
14548
  name: exact.name,
14546
14549
  netPrice: exact.netPrice,
14550
+ grossPrice: exact.grossPrice,
14547
14551
  quantity: Math.max(exact.minQuantity, line.quantity),
14548
14552
  minQuantity: exact.minQuantity
14549
14553
  });
@@ -14613,7 +14617,7 @@ function QuickOrderInner(props) {
14613
14617
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "hidden md:grid grid-cols-12 gap-2 px-2 pb-2 text-xs font-medium text-muted-foreground border-b border-border", children: [
14614
14618
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "col-span-3", children: L("colCode", "Article no. / SKU") }),
14615
14619
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "col-span-3", children: L("colName", "Product name") }),
14616
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "col-span-2", children: L("colPrice", "excl. VAT") }),
14620
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "col-span-2", children: props.includeTax ? L("colPriceInclVat", "incl. VAT") : L("colPrice", "excl. VAT") }),
14617
14621
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "col-span-1", children: L("colQuantity", "Qty") }),
14618
14622
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "col-span-2 text-right", children: L("colTotal", "Total") }),
14619
14623
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "col-span-1" })
@@ -14666,7 +14670,7 @@ function QuickOrderInner(props) {
14666
14670
  "input",
14667
14671
  {
14668
14672
  type: "text",
14669
- value: r.productId ? displayPrice(r.netPrice) : "",
14673
+ value: r.productId ? displayPrice(rowPrice(r)) : "",
14670
14674
  disabled: true,
14671
14675
  className: "w-full rounded border border-input bg-muted/40 px-2 py-1.5 text-sm text-muted-foreground"
14672
14676
  }
@@ -14686,7 +14690,7 @@ function QuickOrderInner(props) {
14686
14690
  className: "w-full rounded border border-input bg-background px-2 py-1.5 text-sm focus:outline-none focus:ring-2 focus:ring-ring disabled:bg-muted/40"
14687
14691
  }
14688
14692
  ) }),
14689
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "col-span-9 md:col-span-2 text-right text-sm text-foreground whitespace-nowrap", children: r.productId ? displayPrice(r.netPrice * r.quantity) : "" }),
14693
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "col-span-9 md:col-span-2 text-right text-sm text-foreground whitespace-nowrap", children: r.productId ? displayPrice(rowPrice(r) * r.quantity) : "" }),
14690
14694
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "col-span-3 md:col-span-1 flex justify-end", children: /* @__PURE__ */ jsxRuntime.jsx(
14691
14695
  "button",
14692
14696
  {
@@ -17726,8 +17730,8 @@ function PurchaseAuthorizationRequests(rawProps) {
17726
17730
  /* @__PURE__ */ jsxRuntime.jsx("thead", { className: "bg-muted/50 border-b border-border", children: /* @__PURE__ */ jsxRuntime.jsxs("tr", { children: [
17727
17731
  /* @__PURE__ */ jsxRuntime.jsx("th", { className: "text-left px-3 py-2 font-medium text-muted-foreground", children: propellerV2CoreUi.getLabel(props.labels, "itemProduct", "Product") }),
17728
17732
  /* @__PURE__ */ jsxRuntime.jsx("th", { className: "text-right px-3 py-2 font-medium text-muted-foreground", children: propellerV2CoreUi.getLabel(props.labels, "itemQty", "Qty") }),
17729
- /* @__PURE__ */ jsxRuntime.jsx("th", { className: "text-right px-3 py-2 font-medium text-muted-foreground", children: propellerV2CoreUi.getLabel(props.labels, "itemUnitPrice", "Unit price") }),
17730
- /* @__PURE__ */ jsxRuntime.jsx("th", { className: "text-right px-3 py-2 font-medium text-muted-foreground", children: propellerV2CoreUi.getLabel(props.labels, "itemTotal", "Total") })
17733
+ /* @__PURE__ */ jsxRuntime.jsx("th", { className: "text-right px-3 py-2 font-medium text-muted-foreground", children: propellerV2CoreUi.getLabel(props.labels, "itemUnitPrice", "Unit price excl. VAT") }),
17734
+ /* @__PURE__ */ jsxRuntime.jsx("th", { className: "text-right px-3 py-2 font-medium text-muted-foreground", children: propellerV2CoreUi.getLabel(props.labels, "itemTotal", "Total excl. VAT") })
17731
17735
  ] }) }),
17732
17736
  /* @__PURE__ */ jsxRuntime.jsx("tbody", { className: "divide-y divide-border", children: getModalItems().map((item, idx) => /* @__PURE__ */ jsxRuntime.jsxs("tr", { children: [
17733
17737
  /* @__PURE__ */ jsxRuntime.jsx("td", { className: "px-3 py-2", children: getProductName5(item) }),
@@ -17735,7 +17739,7 @@ function PurchaseAuthorizationRequests(rawProps) {
17735
17739
  /* @__PURE__ */ jsxRuntime.jsx("td", { className: "px-3 py-2 text-right", children: formatPrice17(
17736
17740
  (item.quantity ?? 0) > 0 ? (item.totalSum ?? 0) / (item.quantity ?? 1) : 0
17737
17741
  ) }),
17738
- /* @__PURE__ */ jsxRuntime.jsx("td", { className: "px-3 py-2 text-right font-medium", children: formatPrice17(item.totalSumNet ?? 0) })
17742
+ /* @__PURE__ */ jsxRuntime.jsx("td", { className: "px-3 py-2 text-right font-medium", children: formatPrice17(item.totalSum ?? 0) })
17739
17743
  ] }, idx)) })
17740
17744
  ] }) })
17741
17745
  ] }),