parent
a887f3b54d
commit
89092ef2ed
|
@ -16,10 +16,20 @@
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
package org.compiere.acct;
|
package org.compiere.acct;
|
||||||
|
|
||||||
import java.math.*;
|
import java.math.BigDecimal;
|
||||||
import java.util.*;
|
import java.util.ArrayList;
|
||||||
import org.compiere.model.*;
|
import java.util.HashMap;
|
||||||
import org.compiere.util.*;
|
import java.util.Iterator;
|
||||||
|
|
||||||
|
import org.compiere.model.MAccount;
|
||||||
|
import org.compiere.model.MAcctSchema;
|
||||||
|
import org.compiere.model.MAcctSchemaElement;
|
||||||
|
import org.compiere.model.MDistribution;
|
||||||
|
import org.compiere.model.MDistributionLine;
|
||||||
|
import org.compiere.model.MElementValue;
|
||||||
|
import org.compiere.model.MFactAcct;
|
||||||
|
import org.compiere.util.CLogger;
|
||||||
|
import org.compiere.util.Env;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Accounting Fact
|
* Accounting Fact
|
||||||
|
@ -346,10 +356,10 @@ public final class Fact
|
||||||
// System.out.println("Add Key=" + key + ", Bal=" + bal + " <- " + line);
|
// System.out.println("Add Key=" + key + ", Bal=" + bal + " <- " + line);
|
||||||
}
|
}
|
||||||
// check if all keys are zero
|
// check if all keys are zero
|
||||||
Iterator values = map.values().iterator();
|
Iterator<BigDecimal> values = map.values().iterator();
|
||||||
while (values.hasNext())
|
while (values.hasNext())
|
||||||
{
|
{
|
||||||
BigDecimal bal = (BigDecimal)values.next();
|
BigDecimal bal = values.next();
|
||||||
if (bal.signum() != 0)
|
if (bal.signum() != 0)
|
||||||
{
|
{
|
||||||
map.clear();
|
map.clear();
|
||||||
|
@ -418,11 +428,11 @@ public final class Fact
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create entry for non-zero element
|
// Create entry for non-zero element
|
||||||
Iterator keys = map.keySet().iterator();
|
Iterator<Integer> keys = map.keySet().iterator();
|
||||||
while (keys.hasNext())
|
while (keys.hasNext())
|
||||||
{
|
{
|
||||||
Integer key = (Integer)keys.next();
|
Integer key = keys.next();
|
||||||
Balance difference = (Balance)map.get(key);
|
Balance difference = map.get(key);
|
||||||
log.info (elementType + "=" + key + ", " + difference);
|
log.info (elementType + "=" + key + ", " + difference);
|
||||||
//
|
//
|
||||||
if (!difference.isZeroBalance())
|
if (!difference.isZeroBalance())
|
||||||
|
|
Loading…
Reference in New Issue