foodbot-cart-calculations 1.0.68 → 1.0.69
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.
|
@@ -834,7 +834,7 @@ async function calculateHalfSplit(cart, options = {}) {
|
|
|
834
834
|
const splits = cart.split_payments || [];
|
|
835
835
|
|
|
836
836
|
// Totals
|
|
837
|
-
const totalAmount = parseFloat(cart.after_discount ?? 0) || 0;
|
|
837
|
+
const totalAmount = parseFloat(cart.after_discount ?? cart.total_after_tax ?? 0) || 0;
|
|
838
838
|
const totalTax = parseFloat(cart.tax_amount ?? 0) || 0;
|
|
839
839
|
|
|
840
840
|
// Paid amounts
|
package/package.json
CHANGED