[OpenVPMS Developers] Deposit Slip Cash Rounding

Message from benjamin.charlton@kalingaparkvetsurgery.com.au benjamin.charlton@kalingaparkvetsurgery.com.au

 

I am not sure if this has been mentioned and/or fixed.

In the deposit report released with 1.5.1. In the summary section of the report the TOTAL_CASH variable Sums the node item.roundedAmount, with the expression 

($V{IS_CASH}.booleanValue())? $F{item.roundedAmount} : new BigDecimal("0.00")

The problem is that this ammount will actually differ from the cash total.

The difference is cause by the field item.roundedAmount seems to not recognize -ve values correctly.  If you change the expression to sum $F{amount} you will get the correct total.  

Eg...you have a 5 cash entries 

1. SALE 200.00

2. SALE 50.01

3. SALE 100.00

4. SALE 30.00

5. SALE REVERSAL 200.00

TOTAL on Amount = 180.00

TOTAL on item.roundedAmount = 580.00.

As you can see, the item.roundedAmount where it is a reversal appears to be a positive value. 

I have unhidden the cash page of the deposit report and checked the totals there and it replicates the above.  but I will drop the item.rounded. field onto the report and see what it displays..

I'm assuming this might be related to 

https://openvpms.atlassian.net/browse/OVPMS-744 [1]

but I'll do some more checking later

[1] https://openvpms.atlassian.net/browse/OVPMS-744

_______________________________________________ OpenVPMS Developers Mailing List developers@lists.openvpms.org To unsubscribe or change your subscription visit: http://lists.openvpms.org/listinfo/developers Posts from this mailing list can be viewed online and replied to in the OpenVPMS Developer's forum- http://tinyurl.com/openvdf

Syndicate content