Fix problem calculating BP balance for payments allocated via payment allocate records.

Reported by Habib here -> http://red1.org/adempiere/viewtopic.php?f=31&t=1189
This commit is contained in:
Carlos Ruiz 2011-03-26 01:52:44 -05:00
parent 067fc36957
commit 7cb32f8039
1 changed files with 1 additions and 1 deletions

View File

@ -1791,7 +1791,7 @@ public final class MPayment extends X_C_Payment
// MProject project = new MProject(getCtx(), getC_Project_ID());
}
// Update BP for Prepayments
if (getC_BPartner_ID() != 0 && getC_Invoice_ID() == 0 && getC_Charge_ID() == 0)
if (getC_BPartner_ID() != 0 && getC_Invoice_ID() == 0 && getC_Charge_ID() == 0 && MPaymentAllocate.get(this).length == 0)
{
MBPartner bp = new MBPartner (getCtx(), getC_BPartner_ID(), get_TrxName());
// Update total balance to include this payment