Trying to Write a report to see how my sales are what tables do I need to look at?

I will be making a number of reports and though best to create some views in my database that have as much information as possible in order to supply the data to the myriad of reports I will write.

CURRENTLY I HAVE:

- OEINVH joined with OEINVD so I can pull all the items sold qty and price

- Then I subtract credits and add debits from OECRDH Joined with OECRDD

My thought was to check against the O/E Sales Statistics but the Net Invoice amount s off by around 1% for every period. 

Does anyone know from where O/E sales statistics Net Invoice Amount is gathered and how? I assume these are in statistics tables but the values should have come from entering invoices, credits and debits.

Parents Reply Children
  • 0 in reply to Jay Converse Acumen

    My issues with the AOM is that it does not explain or show how the data actually flows.

    When I look at (OEAUDH with TRANSTYPE=1) it does match "O/E Sales Statistics" -> "Net Invoice Amount"

    Am I to assume that when a credit is posted pertaining to an Invoice it also effects the rows in OEAUDH and OEAUDD for TRANSTYPE=1 that had (before the credit was posted) applied to the given invoice?  Does it remove them? or change them....or something else.

  • 0 in reply to imScott

    OESHDT = OE sales history detail

  • 0 in reply to imScott

    OEAUDD and H are Audit tables - therefore once posted, they will never be changed or deleted as part of a transaction.  

    I think I speak on behalf of most of us 'old' consultants in that the object models are 100% accurate, but the relationships between associated tables (audit and history) are not documented anywhere and I don't think anyone on the forum could tell you exactly how all the relationships work.  You should learn them the same way we did:  create a new customer, post some transactions and monitor the tables.  With that approach, you will own the relationships when you are done.

    Note: The thing you have to be careful about is that in many cases in Sage, Credits are not stored as negatives, the are just flipped to a negative based upon the TRANSTYPE.

  • 0 in reply to 5107763

    OESHDT stores credits as negatives :)