@ticketboothapp/booking 1.2.137 → 1.2.139
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/package.json
CHANGED
|
@@ -163,6 +163,26 @@ export function AdminChangeReceiptComparison({
|
|
|
163
163
|
);
|
|
164
164
|
const changeSubtotal = roundMoney(amountDue - changeTax);
|
|
165
165
|
const originalCurrency = originalReceipt.currency ?? currency;
|
|
166
|
+
const originalReceiptLinesWithComparableBreakdowns = useMemo(
|
|
167
|
+
() =>
|
|
168
|
+
originalReceiptLines.map((line) =>
|
|
169
|
+
line.kind === 'ticket' && line.qty > 0
|
|
170
|
+
? {
|
|
171
|
+
...line,
|
|
172
|
+
breakdown: line.breakdown ?? {
|
|
173
|
+
lineItems: [],
|
|
174
|
+
subtotalAfterAdjustments: roundMoney(line.itemTotal / line.qty),
|
|
175
|
+
feeLines: [],
|
|
176
|
+
taxRate: 0,
|
|
177
|
+
taxAmount: 0,
|
|
178
|
+
isTaxIncluded: false,
|
|
179
|
+
finalPrice: roundMoney(line.itemTotal / line.qty),
|
|
180
|
+
},
|
|
181
|
+
}
|
|
182
|
+
: line,
|
|
183
|
+
),
|
|
184
|
+
[originalReceiptLines],
|
|
185
|
+
);
|
|
166
186
|
const amountDueClass =
|
|
167
187
|
amountDue < -0.005
|
|
168
188
|
? 'text-emerald-700'
|
|
@@ -181,7 +201,7 @@ export function AdminChangeReceiptComparison({
|
|
|
181
201
|
</span>
|
|
182
202
|
</div>
|
|
183
203
|
<PriceSummary
|
|
184
|
-
lines={
|
|
204
|
+
lines={originalReceiptLinesWithComparableBreakdowns}
|
|
185
205
|
total={originalReceipt.total}
|
|
186
206
|
currency={originalCurrency}
|
|
187
207
|
locale={displayLocale}
|