CALL myOrder_getTax(#id); SELECT o.id, o.sent, o.notes, o.companyFk, ag.description agency, v.code method, ad.nickname, ad.postalCode, ad.city, ad.street, t.*, c.credit, myClient_getDebt(NULL) debt FROM myOrder o JOIN vn.agencyMode ag ON ag.id = o.agencyModeFk LEFT JOIN myAddress ad ON ad.id = o.addressFk JOIN vn.deliveryMethod v ON v.id = o.deliveryMethodFk JOIN myClient c JOIN ( SELECT IFNULL(SUM(taxableBase), 0) taxableBase, IFNULL(SUM(tax), 0) tax FROM tmp.orderAmount ) t WHERE o.id = #id; DROP TEMPORARY TABLE tmp.orderAmount, tmp.orderTax;

Order summary

#{{order.id}}
ShippingInformation

{{order.nickname}}

Delivery at {{Vn.Value.format(order.sent, _('%D'))}}

Agency {{order.agency}}

DeliveryAddress

{{order.street}}

{{order.postalCode}}, {{order.city}}

Previous balance
Order total {{Vn.Value.format(order.taxableBase, _('%.2d€'))}}
Order VAT {{Vn.Value.format(order.tax, _('%.2d€'))}}
Total debt
Credit {{Vn.Value.format(order.credit, _('%.2d€'))}}
Exceeded credit

Amount to pay

Pay method
You have a favorable balance.
You have a favorable credit.
You will be redirected to the payment.
Make a transfer to one account. SELECT name, iban FROM mainAccountBank