Carodlg / velo-cases

0 stars 0 forks source link

Generación Informe excel facturas Items #17

Open AlexandraChen opened 1 year ago

AlexandraChen commented 1 year ago

Observaciones técnicas

"SELECT number, CASE company WHEN ' ' THEN (SELECT CONCAT(firstname, ' ', lastname) FROM tblcontacts WHERE userid = tblclients.userid and is_primary = 1) ELSE company END as company, date, subtotal, total, total_tax, discount_total, adjustment, status ,userid,project_id,clientid,tblinvoices.id,discount_percent,deleted_customer_name, tblitemable.* FROM tblinvoices LEFT JOIN tblclients ON tblclients.userid = tblinvoices.clientid LEFT JOIN tblitemable ON tblinvoices.id = tblitemable.rel_id

WHERE  date BETWEEN ""2022-09-01"" AND ""2022-11-30"" AND tblitemable.rel_type = 'invoice' 

ORDER BY date DESC, number DESC;"
AlexandraChen commented 1 year ago

Último estatus: Entregado