Sage MAS 90 and 200 Sage MAS 500 blogs Product Feedback Support Training
Reply
Regular Contributor
wakeet
Posts: 51
Registered: 11-03-2008
0

Cash Discounts Total UDF in Customer Sales History - v 4.4 - Totals Incorrectly

I want to add a column in the History Tab of Customer Maintenance for Cash Discounts Taken.  This requires two UDF's:

 

AR Cash Receipts Header (To total the DiscountAmt from the detail records)

AR_CashReceipts_bus  - <Total From AR_CashReceiptsDetail> - DiscountAmt

 

AR Customer Sales History (To pull the Header Discount Total UDF into the Customer Sales History File)

AR_CashReceiptsJournal_upd - AR_CashReceiptsHeader - UDF_Discount_Total - Add - DM enabled

 

The discount is pulling into Customer Sales History properly.  The only problem is that the Cash Receipts Header UDF is not totalling properly from the discounts.

 

This is what the data looks like for one of the entries:

 

 

"CheckNo"	"InvoiceNo"	"DiscountAmt"	"AmountPosted"	"UDF_DISCOUNT_TOTAL"
"1"		"0405930"	100.00			1,641.08	504.76
"1"		"0409345"	200.00			1,054.16	504.76
"1"		"0406135"	0.00			304.76		504.76
"2"		"0408936"	300.00			1,154.48	300.00
"2"		"0408875"	0.00			845.52		300.00

 

 

As you can see it is incorrctly adding $304.76 to the UDF_Discount_Total from invoice 406135.

 

I tried deleting the records and re-entering but the total is always calculated incorrectly when there are multiple entries.  Usually the problem is with the last Invoice on the Check.  In the example above there was no Discount but it added the AmountPosted to the Header UDF.  In other test the value of the Discount on the last invoice was doubled.

 

Has anyone else experienced problems with this type of calculation for Discounts?

 

Any help is appreciated as always.

Evan Wake
IS Director
The GLT Companies