[
https://issues.apache.org/jira/browse/OFBIZ-682?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12469557
]
Jacopo Cappellato commented on OFBIZ-682:
-----------------------------------------
Si,
I see what you mean, I still think that the code should stay there as is;
however, since I think that the existing code related to billing accounts still
needs some fixes to work properly (I manage to fix it for the customer I'm
working on, and as soon as I'll have some free time I'll try to prepare a patch
for them), if you want to comment it now, go for it.
The reason I still think that the code should stay as is, is this:
* if a billing account is selected during order entry, the entire order is
associated to the billing account (that is why the billing account id is store
in the order header), even if multiple payment methods are selected
* when an invoice for an order associated to the billing account is created,
the entire invoice is associated to the billing account (that is why the
billing account id is store in the invoice header)
I'm pretty sure that the existing data model and processes were created
according to this design.
This means that all the payments for the order/invoice must be associated to
the billing account (even the ones from the credit card).
In my local copy I have a modified version of the methods that computes the
billing account balances accordingly to these design, and everything seems to
work fine.
Does it make sense?
> Possibly dangerous code in createPaymentApplication for billingAccount
> ----------------------------------------------------------------------
>
> Key: OFBIZ-682
> URL: https://issues.apache.org/jira/browse/OFBIZ-682
> Project: OFBiz (The Open for Business Project)
> Issue Type: Bug
> Components: accounting
> Reporter: Si Chen
>
> This code is back in createPaymentApplication and could be potentially
> dangerous:
> <if-not-empty field-name="invoice.billingAccountId">
> <set field="paymentAppl.billingAccountId"
> from-field="invoice.billingAccountId"/>
> </if-not-empty>
> there could be problems with balance calculations when billing accounts and
> other methods are used to pay for orders.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.