Related to bug
28286 LandedCostLineAmt should always be created in the same order
The field in the order by clause must appear in the group by clause to prevent fail in Postgresql 8.4
--- a/src/org/openbravo/costing/LandedCostDistributionByAmount.java Mon Dec 01 16:49:43 2014 +0100
+++ b/src/org/openbravo/costing/LandedCostDistributionByAmount.java Fri Dec 05 14:11:17 2014 +0100
@@ -143,7 +143,8 @@
qry.append(" and lcr." + LCReceipt.PROPERTY_GOODSSHIPMENT + " = iol."
+ ShipmentInOutLine.PROPERTY_SHIPMENTRECEIPT + "))");
qry.append(" and lcr." + LCReceipt.PROPERTY_LANDEDCOST + ".id = :landedCost");
- qry.append(" group by lcr.id, iol.id, trx." + MaterialTransaction.PROPERTY_CURRENCY + ".id");
+ qry.append(" group by lcr.id, iol.id, trx." + MaterialTransaction.PROPERTY_CURRENCY
+ + ".id, iol." + ShipmentInOutLine.PROPERTY_LINENO);
if (doOrderBy) {
qry.append(" order by iol." + ShipmentInOutLine.PROPERTY_LINENO);
qry.append(" , sum(tc." + TransactionCost.PROPERTY_COST + ")");