sql MySQL prestashop发票清单

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了sql MySQL prestashop发票清单相关的知识,希望对你有一定的参考价值。

SELECT 

DATE(o.invoice_date) as date,
UCASE(CONCAT(a.dni, ' ', a.vat_number)) as vat_number,
UCASE(CONCAT(a.firstname, " ", a.lastname)) as name, 
CONCAT(a.address1,' ', a.address2, '\n', a.city, ' (', s.name, ')\nC.P.: ', a.postcode) as address, 
o.total_paid_tax_excl as base,
(o.total_paid_tax_incl - o.total_paid_tax_excl) as vat,
o.total_paid_tax_incl as total,
CONCAT('PREFIX', o.invoice_number) as invoice_number

FROM ps_orders o 
LEFT JOIN ps_address a  
ON o.id_address_invoice = a.id_address

LEFT JOIN ps_state s
ON a.id_state = s.id_state

以上是关于sql MySQL prestashop发票清单的主要内容,如果未能解决你的问题,请参考以下文章

如何在 Prestashop 中生成 pdf?

sql Prestashop SQL

无法在 Ec2 上为 Prestashop 选择任何有效的 SQL 引擎

sql 导出Prestashop订单和客户

sql Provincias en prestashop

sql 如何在PrestaShop中自动禁用缺货产品