Strange development issue on the Invoice

patcc

Well Known Member
Hi all,

I am encountering a very strange issue on the Print Invoice object (R42565).
I have added some logic to recalculate the unit price in the RV Unit Price variable. Actually the formula used is original unit price + a certain percentage of another amount.
All this logic is added to the DO Section.

The problem is as soon as the program moves out of the DO section, the RV unit price gets rounded to 2 decimal places
I debugged it and saw that the calculation is done correctly and it keeps its 4 decimal places.

However, when it goes to the "After Last Object Printed Section", I see it being rounded to 2 decimal place.

I tried to assigned the variable a 4 decimal place value (hardcoding) and in this case, it works fine.
It seems to be related to my formula but don't see anything wrong with it.

********************************************************
VA evt_mnTESTUnitPrice = [RV Unit Price]
VA evt_mnTESTTRANSPORT = round((([VA evt_mnTESTUnitPrice]/[VA rpt_mnTotaOrderPrice_AEXP])*[VA rpt_mnTotalTransport_AEXP]),4)
! RV Unit Price = [VA evt_mnTESTUnitPrice]+(([VA evt_mnTESTUnitPrice]/[VA rpt_mnTotaOrderPrice_AEXP])*[VA rpt_mnTotalTransport_AEXP])
RV Unit Price = [VA evt_mnTESTUnitPrice]+[VA evt_mnTESTTRANSPORT]
********************************************************

Please help.

Thanks !
********************************************************
 
Last edited:
Top