You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by "Rashko Rejmer (JIRA)" <ji...@apache.org> on 2007/07/12 17:23:04 UTC

[jira] Created: (OFBIZ-1144) Payment applications problems

Payment applications problems
-----------------------------

                 Key: OFBIZ-1144
                 URL: https://issues.apache.org/jira/browse/OFBIZ-1144
             Project: OFBiz
          Issue Type: Bug
          Components: accounting
            Reporter: Rashko Rejmer
            Priority: Minor


Due to http://www.nabble.com/Question-about-Billing-Accounts-tf4056081.html

Problems that occur:
 1. When we apply payment to another payment there is a worng checking if the sender of the one payment is
 	the same as the receiver of the other one.
 2. Wnen we try to assign a payment to an invoice that is assigned to the billing account, the payment application is not automatically assigned to the billing account.
 3. When the payment is assigned to billing account wrong available amount method is invocated.
 4. When the amount of the payment to the billing account is changed  - the new unassigned amount is calculated wrongly. 
 
This patch should fix the problem.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (OFBIZ-1144) Payment applications problems

Posted by "Jacopo Cappellato (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-1144?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12512677 ] 

Jacopo Cappellato commented on OFBIZ-1144:
------------------------------------------

Rashko,

thanks for your patch... I'd love to commit it as soon as possible.
The delay is caused by the fact that I cannot completely review it because I simply *don't* understand what the service updatePaymentApplicationDefBd is supposed to do.
Of course this is not your fault, it's probably mine... however I'm going to ask to the dev list is the authors of that service could help to shed some lights on it.
Rashko, just out of curiosity: is the service updatePaymentApplicationDefBd completely clear to you? If so, maybe it's just me getting dumb...

Jacopo




> Payment applications problems
> -----------------------------
>
>                 Key: OFBIZ-1144
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1144
>             Project: OFBiz
>          Issue Type: Bug
>          Components: accounting
>            Reporter: Rashko Rejmer
>            Assignee: Jacopo Cappellato
>            Priority: Minor
>         Attachments: payment_applications.patch, payment_applications.patch
>
>
> Due to http://www.nabble.com/Question-about-Billing-Accounts-tf4056081.html
> Problems that occur:
>  1. When we apply payment to another payment there is a worng checking if the sender of the one payment is
>  	the same as the receiver of the other one.
>  2. Wnen we try to assign a payment to an invoice that is assigned to the billing account, the payment application is not automatically assigned to the billing account.
>  3. When the payment is assigned to billing account wrong available amount method is invocated.
>  4. When the amount of the payment to the billing account is changed  - the new unassigned amount is calculated wrongly. 
>  
> This patch should fix the problem.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (OFBIZ-1144) Payment applications problems

Posted by "Jacopo Cappellato (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-1144?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12512678 ] 

Jacopo Cappellato commented on OFBIZ-1144:
------------------------------------------

Rashko,

in my opinion, we can safely remove all the following code from InvoiceServices.updatePaymentApplicationDefBd  line 2381

if (paymentApplicationId == null) { 
    // when creating a new PaymentApplication, check if there is sufficient balance in the billing account, but only if the invoiceId is not null
    // If you create a PaymentApplication with both billingAccountId and invoiceId, then you're applying a billing account towards an invoice
    // If you create a PaymentApplication just with billingAccountId and no invoiceId, then you're adding value to billing account, so it should not matter
    // what the previous available balance is
    if (invoiceId != null) {
        if (billingAccountAvailableBalance.signum() < 0)  {
            errorMessageList.add(UtilProperties.getMessage(resource, "AccountingBillingAccountBalanceProblem",UtilMisc.toMap("billingAccountId",billingAccountId, "billingAccountAvailableBalance", billingAccountAvailableBalance, "isoCode",billingAccount.getString("accountCurrencyUomId")), locale));
        } else {
            // check here for too much application if a new record is
            // added (paymentApplicationId == null)
            if (amountApplied.compareTo(billingAccountApplyAvailable) == 1) {
                errorMessageList.add(UtilProperties.getMessage(resource, "AccountingBillingAccountLessRequested",
                                        UtilMisc.toMap("billingAccountId",billingAccountId, 
                                            "billingAccountApplyAvailable",billingAccountApplyAvailable,
                                            "amountApplied",amountApplied,"isoCode",billingAccount.getString("accountCurrencyUomId")),locale));
            }
        }
    }
}


There is no reason to look at the billing account balance when we apply a payment to an invoice: it should always be possible with any balance.


> Payment applications problems
> -----------------------------
>
>                 Key: OFBIZ-1144
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1144
>             Project: OFBiz
>          Issue Type: Bug
>          Components: accounting
>            Reporter: Rashko Rejmer
>            Assignee: Jacopo Cappellato
>            Priority: Minor
>         Attachments: payment_applications.patch, payment_applications.patch
>
>
> Due to http://www.nabble.com/Question-about-Billing-Accounts-tf4056081.html
> Problems that occur:
>  1. When we apply payment to another payment there is a worng checking if the sender of the one payment is
>  	the same as the receiver of the other one.
>  2. Wnen we try to assign a payment to an invoice that is assigned to the billing account, the payment application is not automatically assigned to the billing account.
>  3. When the payment is assigned to billing account wrong available amount method is invocated.
>  4. When the amount of the payment to the billing account is changed  - the new unassigned amount is calculated wrongly. 
>  
> This patch should fix the problem.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (OFBIZ-1144) Payment applications problems

Posted by "Jacopo Cappellato (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OFBIZ-1144?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jacopo Cappellato reassigned OFBIZ-1144:
----------------------------------------

    Assignee: Jacopo Cappellato

> Payment applications problems
> -----------------------------
>
>                 Key: OFBIZ-1144
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1144
>             Project: OFBiz
>          Issue Type: Bug
>          Components: accounting
>            Reporter: Rashko Rejmer
>            Assignee: Jacopo Cappellato
>            Priority: Minor
>         Attachments: payment_applications.patch
>
>
> Due to http://www.nabble.com/Question-about-Billing-Accounts-tf4056081.html
> Problems that occur:
>  1. When we apply payment to another payment there is a worng checking if the sender of the one payment is
>  	the same as the receiver of the other one.
>  2. Wnen we try to assign a payment to an invoice that is assigned to the billing account, the payment application is not automatically assigned to the billing account.
>  3. When the payment is assigned to billing account wrong available amount method is invocated.
>  4. When the amount of the payment to the billing account is changed  - the new unassigned amount is calculated wrongly. 
>  
> This patch should fix the problem.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (OFBIZ-1144) Payment applications problems

Posted by "Rashko Rejmer (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OFBIZ-1144?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rashko Rejmer updated OFBIZ-1144:
---------------------------------

    Attachment: payment_applications.patch

> Payment applications problems
> -----------------------------
>
>                 Key: OFBIZ-1144
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1144
>             Project: OFBiz
>          Issue Type: Bug
>          Components: accounting
>            Reporter: Rashko Rejmer
>            Priority: Minor
>         Attachments: payment_applications.patch
>
>
> Due to http://www.nabble.com/Question-about-Billing-Accounts-tf4056081.html
> Problems that occur:
>  1. When we apply payment to another payment there is a worng checking if the sender of the one payment is
>  	the same as the receiver of the other one.
>  2. Wnen we try to assign a payment to an invoice that is assigned to the billing account, the payment application is not automatically assigned to the billing account.
>  3. When the payment is assigned to billing account wrong available amount method is invocated.
>  4. When the amount of the payment to the billing account is changed  - the new unassigned amount is calculated wrongly. 
>  
> This patch should fix the problem.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (OFBIZ-1144) Payment applications problems

Posted by "Jacopo Cappellato (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OFBIZ-1144?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jacopo Cappellato updated OFBIZ-1144:
-------------------------------------

    Attachment: billing-account.patch

Rashko, all,

here is an *untested* patch, based on your patch, that should solve the issue: I've removed all the code related to billing account balances (that has no meaning in the payment application logic).

It would be great if you could test it and tell me if it fixes the problem.

Jacopo

> Payment applications problems
> -----------------------------
>
>                 Key: OFBIZ-1144
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1144
>             Project: OFBiz
>          Issue Type: Bug
>          Components: accounting
>            Reporter: Rashko Rejmer
>            Assignee: Jacopo Cappellato
>            Priority: Minor
>         Attachments: billing-account.patch, payment_applications.patch, payment_applications.patch
>
>
> Due to http://www.nabble.com/Question-about-Billing-Accounts-tf4056081.html
> Problems that occur:
>  1. When we apply payment to another payment there is a worng checking if the sender of the one payment is
>  	the same as the receiver of the other one.
>  2. Wnen we try to assign a payment to an invoice that is assigned to the billing account, the payment application is not automatically assigned to the billing account.
>  3. When the payment is assigned to billing account wrong available amount method is invocated.
>  4. When the amount of the payment to the billing account is changed  - the new unassigned amount is calculated wrongly. 
>  
> This patch should fix the problem.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (OFBIZ-1144) Payment applications problems

Posted by "Hans Bakker (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OFBIZ-1144?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Hans Bakker reassigned OFBIZ-1144:
----------------------------------

    Assignee: Hans Bakker  (was: Jacopo Cappellato)

> Payment applications problems
> -----------------------------
>
>                 Key: OFBIZ-1144
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1144
>             Project: OFBiz
>          Issue Type: Bug
>          Components: accounting
>            Reporter: Rashko Rejmer
>            Assignee: Hans Bakker
>            Priority: Minor
>         Attachments: billing-account.patch, payment_applications.patch, payment_applications.patch
>
>
> Due to http://www.nabble.com/Question-about-Billing-Accounts-tf4056081.html
> Problems that occur:
>  1. When we apply payment to another payment there is a worng checking if the sender of the one payment is
>  	the same as the receiver of the other one.
>  2. Wnen we try to assign a payment to an invoice that is assigned to the billing account, the payment application is not automatically assigned to the billing account.
>  3. When the payment is assigned to billing account wrong available amount method is invocated.
>  4. When the amount of the payment to the billing account is changed  - the new unassigned amount is calculated wrongly. 
>  
> This patch should fix the problem.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (OFBIZ-1144) Payment applications problems

Posted by "Rashko Rejmer (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OFBIZ-1144?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rashko Rejmer updated OFBIZ-1144:
---------------------------------

    Attachment: payment_applications.patch

Sorry, I forgot to attach resolution for #2. The new patch resolves all the problems.

> Payment applications problems
> -----------------------------
>
>                 Key: OFBIZ-1144
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1144
>             Project: OFBiz
>          Issue Type: Bug
>          Components: accounting
>            Reporter: Rashko Rejmer
>            Assignee: Jacopo Cappellato
>            Priority: Minor
>         Attachments: payment_applications.patch, payment_applications.patch
>
>
> Due to http://www.nabble.com/Question-about-Billing-Accounts-tf4056081.html
> Problems that occur:
>  1. When we apply payment to another payment there is a worng checking if the sender of the one payment is
>  	the same as the receiver of the other one.
>  2. Wnen we try to assign a payment to an invoice that is assigned to the billing account, the payment application is not automatically assigned to the billing account.
>  3. When the payment is assigned to billing account wrong available amount method is invocated.
>  4. When the amount of the payment to the billing account is changed  - the new unassigned amount is calculated wrongly. 
>  
> This patch should fix the problem.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (OFBIZ-1144) Payment applications problems

Posted by "Hans Bakker (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OFBIZ-1144?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Hans Bakker closed OFBIZ-1144.
------------------------------

    Resolution: Fixed

Hi Rashko, thanks for the patch, it is in  rev 556498.

> Payment applications problems
> -----------------------------
>
>                 Key: OFBIZ-1144
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1144
>             Project: OFBiz
>          Issue Type: Bug
>          Components: accounting
>            Reporter: Rashko Rejmer
>            Assignee: Hans Bakker
>            Priority: Minor
>         Attachments: billing-account.patch, payment_applications.patch, payment_applications.patch
>
>
> Due to http://www.nabble.com/Question-about-Billing-Accounts-tf4056081.html
> Problems that occur:
>  1. When we apply payment to another payment there is a worng checking if the sender of the one payment is
>  	the same as the receiver of the other one.
>  2. Wnen we try to assign a payment to an invoice that is assigned to the billing account, the payment application is not automatically assigned to the billing account.
>  3. When the payment is assigned to billing account wrong available amount method is invocated.
>  4. When the amount of the payment to the billing account is changed  - the new unassigned amount is calculated wrongly. 
>  
> This patch should fix the problem.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.