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 {{order.agency}}

{{order.consignee}}

{{order.address}}

{{order.zipCode}}, {{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