Jump to content

Calculating total income from a specific order


pkwarner

Recommended Posts

Hello all,

 

Been banging my head against the wall pondering this question for 2 weeks now. Basically, I'm trying to calculate the total income generated from a specific order. Sounds simple enough...

 

Please note I am trying to accomplish this through the API.

 

From what I can tell there is no way to do this. I've attempted to grab the data from the invoices but as far as I can tell invoices are not associated with the order ID anywhere. Same goes for orders, transactions, products, etc. I cannot find anywhere where a payment has any association with an order ID.

 

Am I missing something? I very much appreciate any help anyone is able to give.

 

Regards,

Patrick

Link to comment
Share on other sites

From what I can tell there is no way to do this. I've attempted to grab the data from the invoices but as far as I can tell invoices are not associated with the order ID anywhere. Same goes for orders, transactions, products, etc. I cannot find anywhere where a payment has any association with an order ID.

always remember than an invoice doesn't need to have an order id; an order doesn't need to have an invoice (in which case, it's invoice value will be 0 in the database).

 

have you had a look at the reports ? invoices and transactions I guess would be the ones - if you take a look at the source for each (it's not encrypted), they may give you a clue as to the sql query to use in your API code.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated