CALL basketGetTax; SELECT o.id, o.date_send, o.note, o.company_id, ag.description agency, v.code method, ad.nickname, ad.postalCode, ad.city, ad.street, t.*, c.credit, myClientGetDebt(NULL) debt FROM basket o JOIN vn.agencyMode ag ON ag.id = o.agency_id LEFT JOIN myAddress ad ON ad.id = o.address_id JOIN vn.deliveryMethod v ON v.id = o.delivery_method_id JOIN myClient c JOIN ( SELECT IFNULL(SUM(taxBase), 0) taxBase, IFNULL(SUM(tax + equalizationTax), 0) tax FROM tmp.orderTax ) t; DROP TEMPORARY TABLE tmp.orderTax; CALL basketConfirm

_Order summary

_Delivery at

_Agency {{order.agency}}

{{order.nickname}}

{{order.street}}

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

_Previous balance
_Order total
_Order VAT
_Total debt
_Credit
_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 description, iban, entity_id, office, dc, number FROM vn2008.account_customer c