Jump to content

Edit History

DoGGoD

DoGGoD

Hi,

The original code kind of works. I have this issue that it does not give me the orders, where the customer has not made the payment yet. 

How can I modify the code so it gives me those orders as well, where the payment (invoice) is not yet made?

Thanks!

Edit:

I removed the d.delivery_date, c.date_add and INNER JOIN ps_order_invoice AS c ON c.id_order = b.id_order so it gives me all the sold products, even when there is no payment involved.

SELECT a.id_order, a.date_add, c.delivery_date, c.date_add, b.product_reference, b.product_name, b.product_quantity, b.product_price, a.total_products_wt, a.total_paid
FROM ps_orders AS a
INNER JOIN ps_order_detail AS b ON b.id_order = a.id_order
INNER JOIN ps_order_invoice AS c ON c.id_order = b.id_order
WHERE a.date_add BETWEEN "2016-05-31 08:30:00" AND "2016-06-11 18:30:00"

DoGGoD

DoGGoD

Hi,

The original code kind of works. I have this issue that it does not give me the orders, where the customer has not made the payment yet. 

How can I modify the code so it gives me those orders as well, where the payment (invoice) is not yet made?

Thanks!

×
×
  • Create New...