Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

OEORDHDR tot_dollars not equal to invoice total

Status
Not open for further replies.

leishad

Technical User
Joined
Apr 3, 2003
Messages
88
Location
US
Progression 7.6.3, MSSQL, Crystal 8.5

We have been using a custom invoice which I created in Crystal. Suddenly I notice that orders of type 'c' are not displaying the right total. In my invoice I use the OEORDHDR tot_dollars field to display the total(displaying negative when type c).

Through Enterprise manager I queried to find all orders, historically, where the tot_dollars field was not equal to (tot_sls_amt + sls_tax_amt_1 + frt_amt - payment_amt)and found that tot_dollars was only not equal since our install of 7.6.3 (coincidence?). Note that the tot_dollars field in these situations IS equal to the tot_sls_amt only. I do note that the Macola invoice forms print the correct total.

Any input would be appreciated.
 
Sounds like you should report this as a bug to macola. They incorporated peak best oe code into 7.6.300. I have several clients on peak w/7.6.100a & 7.6.200+ & the fields are correct in those databases. Tot_dollars includes the fields you mentioned plus tot_sls_disc and misc_amt. It may be part of the same problem they had when booked orders were printing invoices when not selected. I don't have any good 7.6.300 data to use for testing just yet myself.
 
Hmmm - I have several clients using 7.6.300 with custom invoices in Crystal - they all work fine, credits or not. Here's the fields I use;

Order Total:
if {OEORDHDR_SQL.Ord_Type} = "C"
then
({OEORDHDR_SQL.Tot_Sls_Amt} * -1)
else
{OEORDHDR_SQL.Tot_Sls_Amt} + {OEORDHDR_SQL.Tot_Sls_Disc}

Misc. Amount (same syntax for Freight Amount):
if {OEORDHDR_SQL.Ord_Type} = "C"
then
{OEORDHDR_SQL.Misc_Amt} * -1
else
{OEORDHDR_SQL.Misc_Amt}

Sales Tax:
if {OEORDHDR_SQL.Ord_Type} = "C"
then
({OEORDHDR_SQL.Sls_Tax_Amt_1} + {OEORDHDR_SQL.Sls_Tax_Amt_2} + {OEORDHDR_SQL.Sls_Tax_Amt_3}) * -1
else
({OEORDHDR_SQL.Sls_Tax_Amt_1} + {OEORDHDR_SQL.Sls_Tax_Amt_2} + {OEORDHDR_SQL.Sls_Tax_Amt_3})

Subtotal (previous formulas added together):
{@Order Total} +
{@Misc. Amount} +
{@Freight Amount} +
{@Sales Tax}

Amount Received (prepayments):
if {OEORDHDR_SQL.Ord_Type} in ["O","I"]
then
({OEORDHDR_SQL.Payment_Amt} + {OEORDHDR_SQL.Payment_Disc_Amt}) * -1
else
0

Balance Due:
{@Subtotal} + {@Amount Received}

I can't see anywhere where I use tot_dollars. I can send you a copy of one of my invoices if you get stuck.

Peter Shirley
 
Thank-you both:

When I designed the report and saw that the tot_dollar field in OEORDHDR already did all of the calculating work it made sense to use it however under the current circumstances your solution will produce the results I need regardless of what is happening with the tot_dollar field --

Unless someone else offers up any other possible user causes I will report this as a bug to Macola.
 
Just an update - Macola/Exact has verified that this is a bug not previously addressed - OEORDHDR tot_dollar field is not properly calculated on credit type orders.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top