order_items ? $order->order_items->toArray() : []; $orderItems = array_filter($allOrderItems, function ($item) { return !in_array($item['payment_type'] ?? '', ['signup_fee', 'fee']); }); $feeItems = array_filter($allOrderItems, function ($item) { return ($item['payment_type'] ?? '') === 'fee'; }); $transaction = $order->getLatestTransaction(); $isRefund = $is_refund ?? false; $isReversed = $order->isReverseChargeTaxOrder(); $rcMode = $order->getOrderRcMode(); $fctEmailDisplayMode = ($order instanceof \FluentCart\App\Models\Order) ? TaxSummaryHelper::getTaxDisplayMode() : 'itemized'; ?> 0): ?>

1): ?> x

-

+
+

+
+
 
subtotal != $order->total_amount): ?> false, 'rcShippingAdjustment' => 0, 'rcTotalAdjustment' => 0]; $emailRcShippingAdj = (int) \FluentCart\Framework\Support\Arr::get($emailTaxSummaryEarly, 'rcShippingAdjustment', 0); ?> shipping_total > 0): $emailDisplayShipping = max(0, (int) $order->shipping_total - $emailRcShippingAdj); $emailShippingMethodTitle = (string) \FluentCart\Framework\Support\Arr::get($order->config, 'shipping_method_title', ''); ?> config, 'prorate_credit', 0); $upgradeDiscount = $order->manual_discount_total - $prorateCredit; // When the prorate credit IS the whole discount, label the row directly // instead of showing "Discount" with a single redundant breakdown row. $onlyProrateCredit = $prorateCredit > 0 && $upgradeDiscount <= 0 && $order->coupon_discount_total <= 0; ?> manual_discount_total + $order->coupon_discount_total > 0): ?> 0 && $upgradeDiscount > 0): ?> 0 && !$onlyProrateCredit): ?> false]); if ($emailTaxSummary['shouldRender']): $emailFoldedRateLines = Arr::get($emailTaxSummary, 'foldedRateLines', []); $emailIncludedInPrices = (int) Arr::get($emailTaxSummary, 'includedInPrices', 0); $emailPayableTax = (int) Arr::get($emailTaxSummary, 'payableTax', 0); $emailTotalOrderTax = (int) Arr::get($emailTaxSummary, 'totalOrderTax', 0); ?>

subtotal)); ?>

- manual_discount_total + $order->coupon_discount_total)); ?>

0 ? \FluentCart\App\Helpers\Helper::toDecimal($rcReversedTotal) : __('Charge reversed', 'fluent-cart'); ?> 0): ?> 0 && $emailIncludedInPrices > 0): ?> 0): ?> 0) + (int) ($emailTaxSummary['exclusiveTax'] > 0); $rowCount = $productTaxRowCount + count($emailFeeRowsList) + (int) ($emailTaxSummary['shippingTax'] > 0); $shouldShowBreakdown = !empty($emailTaxRateLines) || !empty($emailShippingLines) || $rowCount >= 2 || ($rowCount === 1 && !($emailTaxSummary['payableTax'] > 0 || $emailTaxSummary['inclusiveTax'] > 0 || (int) Arr::get($emailTaxSummary, 'inclusiveFeeTax', 0) > 0)); ?> 0 && $shouldShowBreakdown): ?> 0 && $shouldShowBreakdown): ?> 0 && $shouldShowBreakdown): $isShippingInclusive = (bool) Arr::get($emailTaxSummary, 'isShippingInclusive', false); $emailShippingColor = $isShippingInclusive ? '#94a3b8' : '#1e293b'; $emailShippingWeight = $isShippingInclusive ? 'normal' : '600'; if (!empty($emailShippingLines)): foreach ($emailShippingLines as $shLine): ?> 0): ?> 0 || $emailTaxSummary['inclusiveFeeTax'] > 0): ?>

total_refund > 0 && $isRefund): ?> total_amount - (int) $order->total_refund - (int) \FluentCart\Framework\Support\Arr::get($emailTaxSummaryEarly ?? [], 'rcTotalAdjustment', 0)); ?> total_refund > 0 && !$isRefund): ?>

- total_refund)); ?>

- total_refund)); ?>

getPaymentMethodText() : ''); ?>

isReverseChargeTaxOrder()): ?>