hg merge release-2.1 (merge release2.1 into development)
This commit is contained in:
commit
ed3b9466ba
|
@ -109,8 +109,12 @@ public class CommissionCalc extends SvrProcess
|
||||||
{
|
{
|
||||||
if (m_com.isListDetails())
|
if (m_com.isListDetails())
|
||||||
{
|
{
|
||||||
sql.append("SELECT h.C_Currency_ID, (l.LineNetAmt*al.Amount/h.GrandTotal) AS Amt,")
|
sql.append("SELECT h.C_Currency_ID, CASE WHEN h.GrandTotal <> 0 ")
|
||||||
.append(" (l.QtyInvoiced*al.Amount/h.GrandTotal) AS Qty,")
|
.append(" THEN (l.LineNetAmt*al.Amount/h.GrandTotal) ")
|
||||||
|
.append(" ELSE 0 END AS Amt,")
|
||||||
|
.append(" CASE WHEN h.GrandTotal <> 0 ")
|
||||||
|
.append(" THEN (l.QtyInvoiced*al.Amount/h.GrandTotal) ")
|
||||||
|
.append(" ELSE 0 END AS Qty,")
|
||||||
.append(" NULL, l.C_InvoiceLine_ID, p.DocumentNo||'_'||h.DocumentNo,")
|
.append(" NULL, l.C_InvoiceLine_ID, p.DocumentNo||'_'||h.DocumentNo,")
|
||||||
.append(" COALESCE(prd.Value,l.Description), h.DateInvoiced ")
|
.append(" COALESCE(prd.Value,l.Description), h.DateInvoiced ")
|
||||||
.append("FROM C_Payment p")
|
.append("FROM C_Payment p")
|
||||||
|
@ -125,8 +129,11 @@ public class CommissionCalc extends SvrProcess
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
sql.append("SELECT h.C_Currency_ID, SUM(l.LineNetAmt*al.Amount/h.GrandTotal) AS Amt,")
|
sql.append("SELECT h.C_Currency_ID, ")
|
||||||
.append(" SUM(l.QtyInvoiced*al.Amount/h.GrandTotal) AS Qty,")
|
.append(" SUM(CASE WHEN h.GrandTotal <> 0 ")
|
||||||
|
.append(" THEN l.LineNetAmt*al.Amount/h.GrandTotal ELSE 0 END) AS Amt,")
|
||||||
|
.append(" SUM(CASE WHEN h.GrandTotal <> 0 ")
|
||||||
|
.append(" THEN l.QtyInvoiced*al.Amount/h.GrandTotal ELSE 0 END) AS Qty,")
|
||||||
.append(" NULL, NULL, NULL, NULL, MAX(h.DateInvoiced) ")
|
.append(" NULL, NULL, NULL, NULL, MAX(h.DateInvoiced) ")
|
||||||
.append("FROM C_Payment p")
|
.append("FROM C_Payment p")
|
||||||
.append(" INNER JOIN C_AllocationLine al ON (p.C_Payment_ID=al.C_Payment_ID)")
|
.append(" INNER JOIN C_AllocationLine al ON (p.C_Payment_ID=al.C_Payment_ID)")
|
||||||
|
|
|
@ -2953,7 +2953,7 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable
|
||||||
|
|
||||||
if (!Util.isEmpty(retValue)) // interrupt on first error
|
if (!Util.isEmpty(retValue)) // interrupt on first error
|
||||||
{
|
{
|
||||||
log.severe (retValue);
|
log.config(retValue); // no need to save an AD_Issue error on each callout
|
||||||
return retValue;
|
return retValue;
|
||||||
}
|
}
|
||||||
} // for each callout
|
} // for each callout
|
||||||
|
|
|
@ -2312,8 +2312,8 @@ public abstract class PO
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
m_newValues = new Object[size];
|
m_newValues = new Object[size];
|
||||||
|
m_createNew = false;
|
||||||
}
|
}
|
||||||
m_createNew = false;
|
|
||||||
if (!newRecord)
|
if (!newRecord)
|
||||||
CacheMgt.get().reset(p_info.getTableName());
|
CacheMgt.get().reset(p_info.getTableName());
|
||||||
else if (get_ID() > 0 && success)
|
else if (get_ID() > 0 && success)
|
||||||
|
@ -2678,10 +2678,10 @@ public abstract class PO
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (m_trxName == null)
|
if (m_trxName == null)
|
||||||
log.log(Level.WARNING, "Update return " + no + " instead of 1"
|
log.saveError("SaveError", "Update return " + no + " instead of 1"
|
||||||
+ " - " + p_info.getTableName() + "." + where);
|
+ " - " + p_info.getTableName() + "." + where);
|
||||||
else
|
else
|
||||||
log.log(Level.WARNING, "Update return " + no + " instead of 1"
|
log.saveError("SaveError", "Update return " + no + " instead of 1"
|
||||||
+ " - [" + m_trxName + "] - " + p_info.getTableName() + "." + where);
|
+ " - [" + m_trxName + "] - " + p_info.getTableName() + "." + where);
|
||||||
}
|
}
|
||||||
return ok;
|
return ok;
|
||||||
|
|
Loading…
Reference in New Issue