I create a custom invoice template, BUT

How To Show Amount Paid At The Invoice?

----------------------------
Subtotal: [order-subtotal]
[----------line item---------------------]
Total: [order-total]
Amount Paid: ?
Balance Due: [order-payment-balance]

Thanks to someone show me.

Comments

AlexisWilke’s picture

order-total - order-payment-balance ?

Anonymous’s picture

May show me the code?

b'cos i try this with no result..


$itotal = uc_price($order->order_total, $context);

$ibalance = uc_price(uc_payment_balance($order), $context);

$ipaid = $itotal - $ibalance;

print uc_price($ipaid, $context);

Anonymous’s picture

Hey, so happy this is the code to print Amount Paid at the invoice:


$itotal = $order->order_total;
$ibalance = uc_payment_balance($order);
$ipaid = $itotal - $ibalance;

print uc_price($ipaid, $context);

thanks AlexisWilke's solution.

tr’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.