No, its not. I would try to fix it, possibly along with a test case to verify.

Regards
Vikas

On Apr 26, 2012, at 3:23 PM, Pierre Smits wrote:

> This bug has been registered as a JIRA issue?
> 
> Op 26 april 2012 11:42 schreef Vikas Mayur <[email protected]> het
> volgende:
> 
>> I noted a bug with this long time ago but couldn't contribute it back.
>> Check the method getBillingAccountBalance() on BillingAccountWorker class &
>> look specifically at the code.
>> 
>> [snip]
>>       List<GenericValue> paymentAppls =
>> delegator.findByAnd("PaymentApplication",
>> UtilMisc.toMap("billingAccountId", billingAccountId));
>>       // TODO: cancelled payments?
>>       for (Iterator<GenericValue> pAi = paymentAppls.iterator();
>> pAi.hasNext();) {
>>           GenericValue paymentAppl = pAi.next();
>>           if (paymentAppl.getString("invoiceId") == null) {
>>               BigDecimal amountApplied =
>> paymentAppl.getBigDecimal("amountApplied");
>>               balance = balance.add(amountApplied);
>>           }
>>       }
>> [snip]
>> 
>> The return invoice should be excluded from the check // if
>> (paymentAppl.getString("invoiceId") == null) and doing so the balance on
>> billing account should correctly populate.
>> 
>> Regards
>> Vikas
>> 
>> On Apr 26, 2012, at 10:10 AM, Anil Savani wrote:
>> 
>>> Now what action should be done for the return on the given billing
>> account
>>> Either it should credit the full amount to the billing account to be used
>>> by other orders
>> 
>> 

Reply via email to