MySQL customers invoices


/ Published in: MySQL
Save to your folder(s)



Copy this code and paste it in your HTML
  1. invoice.invoice_id,
  2. invoice.invoice_total,
  3. invoice.invoice_paid,
  4. invoice.invoice_tax,
  5. invoice.ts_printed,
  6. invoice.ts_add,
  7. ROUND(invoice.invoice_total-invoice.invoice_paid, 2) AS to_pay,
  8. orders.customer_ref,
  9. delivery_note.delivery_note_id
  10. invoice
  11. Inner Join order_items ON order_items.invoice_ref = invoice.invoice_id
  12. Inner Join orders ON order_items.order_ref = orders.order_id
  13. Inner Join delivery_note ON order_items.delivery_note_ref = delivery_note.delivery_note_id
  14. orders.customer_ref = '$cid'
  15. invoice.invoice_paid < invoice.invoice_total
  16. invoice.invoice_id DESC

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.