Mort-lemur Posted July 26, 2011 Posted July 26, 2011 Hi, I need to run an SQL query against the database to enable me to download a file with the following data for each order: Date Order Number Postage Cost (exc Tax) I need this for a tax return. Many Thanks in advance Now running on a fully modded, Mobile Friendly 2.3.4 Store with the Excellent MTS installed - See my profile for the mods installed ..... So much thanks for all the help given along the way by forum members.
Hotclutch Posted July 26, 2011 Posted July 26, 2011 Hi, I need to run an SQL query against the database to enable me to download a file with the following data for each order: Date Order Number Postage Cost (exc Tax) I need this for a tax return. Many Thanks in advance Why not export directly to csv / xcel from phpMyadmin ?
Guest Posted July 26, 2011 Posted July 26, 2011 Heather, Have you looked at Detailed Monthly Sales ? Chris
Mort-lemur Posted July 26, 2011 Author Posted July 26, 2011 Heather, Have you looked at Detailed Monthly Sales ? Chris Thanks Chris, but I need to export the data to an excel sheet to enable me to sort it. The problem I have is that I get billed by the courier for his items - so I have invoices I can use for tax calculation. However, for the royal mail system I dont have invoices, and need to collect their costs for the year, the only way I can think of doing this is to dump data to excel, sort by value, then delete the courier costs (they are easy to spot as they are the ones uver £7.00) then total the rest for the given time period. Looked at phpmyadmin but to be honest I am struggling. Thanks Now running on a fully modded, Mobile Friendly 2.3.4 Store with the Excellent MTS installed - See my profile for the mods installed ..... So much thanks for all the help given along the way by forum members.
Mort-lemur Posted July 26, 2011 Author Posted July 26, 2011 Sorted it by downloading the whole Orders Total table via phpmyadmin then carrying out loads of ordering and deleting. Thanks All Now running on a fully modded, Mobile Friendly 2.3.4 Store with the Excellent MTS installed - See my profile for the mods installed ..... So much thanks for all the help given along the way by forum members.
burt Posted August 2, 2011 Posted August 2, 2011 SELECT o.date_purchased AS 'Purchase Date', o.orders_id AS 'Order ID', ot.value AS 'Postage Cost' FROM `orders_total` AS ot JOIN `orders` AS o ON ot.orders_id = o.orders_id AND ot.class = 'ot_shipping' AND ot.value < '7' ORDER BY o.orders_id DESC
Recommended Posts
Archived
This topic is now archived and is closed to further replies.