CALL basket_get_vat (); SELECT o.id, o.date_send sendDate, o.note, o.company_id company, ag.description agency, v.code method, ad.consignee, ad.zip_code zipCode, ad.city, ad.name address, t.*, c.credit, clientGetDebt() debt FROM basket o JOIN vn2008.Agencias ag ON ag.Id_Agencia = o.agency_id LEFT JOIN address_view ad ON ad.id = o.address_id JOIN vn2008.Vistas v ON v.vista_id = o.delivery_method_id JOIN customer_view c JOIN ( SELECT IFNULL(SUM(tax_base), 0) taxBase, IFNULL(SUM(vat + surcharge), 0) vat FROM t_order_vat ) t; DROP TEMPORARY TABLE t_order_vat; CALL basket_confirm ()

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