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

,

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