Unable to create a sales report using sql 2014 server script

Hi,
Thanks for great work.
I am generating a sales report by executing an sql script against SQL server 2014.
One issue i am facing is not able to get correct sales report,
how can i detect the correct sales data once

  • item is sold?
  • item is voided?
  • item is cancelled?
  • which database table stores what - where is sold item recorded or voided/cancelled item recorded
    I am using the Ticket Table and Orders table is there any other table i need to include?
    How can I tell with surety that an item is NOW sold and money is received?
    Could I can share the sql script i am currently using?
    You help is highly appreciated.
    David

Have a look at this, might get you started

1 Like

Hello Linda,

Thanks for the input.

I will implement your advice

One more issue - how could i generate a inventory report -

We wish to have an inventory report showing

Inventory balance (Opening stock) | Inventory purchased | Inventory Sold | Current Inventory balance

in details - get the balance of soda by taking the balance as per yesterday evening - Inventory balance

Add purchases then less what we sold today the balance is the Days CLOSING Stock

You help will be appreciated.

David

Hello several things that user said were false. I have flagged them and will watch but I’m not sure why they user is posting false info.