Include in trunk revision 2333 lost with changes in revision 2335.
Thanks Teo for noticing this.
This commit is contained in:
parent
d75a3a5f7d
commit
a51eb60084
|
@ -654,8 +654,26 @@ public final class Fact
|
||||||
MDistribution[] distributions = MDistribution.get (dLine.getAccount(),
|
MDistribution[] distributions = MDistribution.get (dLine.getAccount(),
|
||||||
m_postingType, m_doc.getC_DocType_ID());
|
m_postingType, m_doc.getC_DocType_ID());
|
||||||
// No Distribution for this line
|
// No Distribution for this line
|
||||||
|
//AZ Goodwill
|
||||||
|
//The above "get" only work in GL Journal because it's using ValidCombination Account
|
||||||
|
//Old:
|
||||||
|
//if (distributions == null || distributions.length == 0)
|
||||||
|
// continue;
|
||||||
|
//For other document, we try the followings (from FactLine):
|
||||||
|
//New:
|
||||||
|
if (distributions == null || distributions.length == 0)
|
||||||
|
{
|
||||||
|
distributions = MDistribution.get (dLine.getCtx(), dLine.getC_AcctSchema_ID(),
|
||||||
|
m_postingType, m_doc.getC_DocType_ID(),
|
||||||
|
dLine.getAD_Org_ID(), dLine.getAccount_ID(),
|
||||||
|
dLine.getM_Product_ID(), dLine.getC_BPartner_ID(), dLine.getC_Project_ID(),
|
||||||
|
dLine.getC_Campaign_ID(), dLine.getC_Activity_ID(), dLine.getAD_OrgTrx_ID(),
|
||||||
|
dLine.getC_SalesRegion_ID(), dLine.getC_LocTo_ID(), dLine.getC_LocFrom_ID(),
|
||||||
|
dLine.getUser1_ID(), dLine.getUser2_ID());
|
||||||
if (distributions == null || distributions.length == 0)
|
if (distributions == null || distributions.length == 0)
|
||||||
continue;
|
continue;
|
||||||
|
}
|
||||||
|
//end AZ
|
||||||
// Just the first
|
// Just the first
|
||||||
if (distributions.length > 1)
|
if (distributions.length > 1)
|
||||||
log.warning("More then one Distributiion for " + dLine.getAccount());
|
log.warning("More then one Distributiion for " + dLine.getAccount());
|
||||||
|
@ -705,7 +723,6 @@ public final class Fact
|
||||||
return true;
|
return true;
|
||||||
} // distribute
|
} // distribute
|
||||||
|
|
||||||
|
|
||||||
/**************************************************************************
|
/**************************************************************************
|
||||||
* String representation
|
* String representation
|
||||||
* @return String
|
* @return String
|
||||||
|
|
Loading…
Reference in New Issue