diff --git a/src/org/openbravo/retail/posterminal/PaidReceipts.java b/src/org/openbravo/retail/posterminal/PaidReceipts.java
--- a/src/org/openbravo/retail/posterminal/PaidReceipts.java
+++ b/src/org/openbravo/retail/posterminal/PaidReceipts.java
@@ -236,14 +236,16 @@
 
         HQLPropertyList hqlPropertiesPayments = ModelExtensionUtils
             .getPropertyExtensions(extensionsPayments);
-        String hqlPaymentsIn = "select " + hqlPropertiesPayments.getHqlSelect()
+        String hqlPaymentsIn = "select "
+            + hqlPropertiesPayments.getHqlSelect()
             + "from FIN_Payment_ScheduleDetail as scheduleDetail "
             + "join scheduleDetail.paymentDetails as paymentDetail "
             + "join paymentDetail.finPayment as finPayment "
             + "join scheduleDetail.orderPaymentSchedule.order as order "
             + "left join finPayment.reversedPayment as reversedPayment "//
             + "where order.id=? " //
-            + "order by finPayment.documentNo";
+            + "group by " + hqlPropertiesPayments.getHqlGroupBy()
+            + " order by finPayment.documentNo";
         Query paidReceiptsPaymentsQuery = OBDal.getInstance().getSession()
             .createQuery(hqlPaymentsIn);
         paidReceiptsPaymentsQuery.setString(0, orderid);
@@ -281,28 +283,23 @@
         for (int i = 0; i < listPaymentsIn.length(); i++) {
           JSONObject objectIn = (JSONObject) listPaymentsIn.get(i);
 
-          String hqlPaymentTrxAmount = "select p.financialTransactionAmount as amount "
-              + " from FIN_Payment as p where p.id=?)";
-          Query paymentTrxQuery = OBDal.getInstance().getSession().createQuery(hqlPaymentTrxAmount);
-          paymentTrxQuery.setString(0, objectIn.getString("paymentId"));
-          BigDecimal objPaymentTrx = BigDecimal.ZERO;
-          if (paymentTrxQuery.list().size() > 0) {
-            objPaymentTrx = (BigDecimal) paymentTrxQuery.list().get(0);
-          }
-
           boolean added = false;
           for (int j = 0; j < listPaymentsType.length(); j++) {
             JSONObject objectType = (JSONObject) listPaymentsType.get(j);
             if (objectIn.get("account").equals(objectType.get("account"))) {
               JSONObject paidReceiptPayment = new JSONObject();
               // FIXME: Multicurrency problem, amount always in terminal currency
-              if ((objectIn.getDouble("paymentAmount")) == ((double) 0)) {
-                paidReceiptPayment.put("amount", new BigDecimal((String) objectIn.get("amount")
-                    .toString()).multiply(new BigDecimal((String) objectType.get("mulrate")
-                    .toString())));
+              BigDecimal objPaymentTrx = BigDecimal.ZERO;
+              if (objectIn.getDouble("amount") == objectIn.getDouble("paymentAmount")) {
+                objPaymentTrx = BigDecimal
+                    .valueOf(objectIn.getDouble("financialTransactionAmount"));
               } else {
-                paidReceiptPayment.put("amount", objPaymentTrx);
+                objPaymentTrx = BigDecimal.valueOf(objectIn.getDouble("amount")).multiply(
+                    BigDecimal.valueOf(objectType.getDouble("mulrate")));
               }
+              paidReceiptPayment.put("amount", objPaymentTrx);
+              paidReceiptPayment.put("paymentAmount",
+                  BigDecimal.valueOf(objectIn.getDouble("financialTransactionAmount")));
               try {
                 Date date = parseDateFormat.parse((String) objectIn.get("paymentDate"));
                 date.setTime(date.getTime() + Calendar.getInstance().get(Calendar.ZONE_OFFSET));
@@ -323,13 +320,6 @@
               paidReceiptPayment.put("openDrawer", objectType.get("openDrawer"));
               paidReceiptPayment.put("isPrePayment", true);
               paidReceiptPayment.put("paymentId", objectIn.get("paymentId"));
-              if ((objectIn.getDouble("paymentAmount")) == ((double) 0)) {
-                paidReceiptPayment.put("paymentAmount", new BigDecimal(objectIn
-                    .get("paymentAmount").toString()).multiply(new BigDecimal(objectType.get(
-                    "mulrate").toString())));
-              } else {
-                paidReceiptPayment.put("paymentAmount", objPaymentTrx);
-              }
               if (objectIn.has("reversedPaymentId")) {
                 paidReceiptPayment.put("isReversed", true);
               }
@@ -367,9 +357,17 @@
 
               JSONObject paidReceiptPayment = new JSONObject();
               // FIXME: Multicurrency problem, amount always in terminal currency
-              paidReceiptPayment.put("amount", new BigDecimal((String) objectIn.get("amount")
-                  .toString()).multiply(new BigDecimal((String) paymentsType.get("mulrate")
-                  .toString())));
+              BigDecimal objPaymentTrx = BigDecimal.ZERO;
+              if (objectIn.getDouble("amount") == objectIn.getDouble("paymentAmount")) {
+                objPaymentTrx = BigDecimal
+                    .valueOf(objectIn.getDouble("financialTransactionAmount"));
+              } else {
+                objPaymentTrx = BigDecimal.valueOf(objectIn.getDouble("amount")).multiply(
+                    BigDecimal.valueOf(paymentsType.getDouble("mulrate")));
+              }
+              paymentsType.put("amount", objPaymentTrx);
+              paymentsType.put("paymentAmount",
+                  BigDecimal.valueOf(objectIn.getDouble("financialTransactionAmount")));
               try {
                 Date date = parseDateFormat.parse((String) objectIn.get("paymentDate"));
                 date.setTime(date.getTime() + Calendar.getInstance().get(Calendar.ZONE_OFFSET));
diff --git a/src/org/openbravo/retail/posterminal/PaidReceiptsPaymentsProperties.java b/src/org/openbravo/retail/posterminal/PaidReceiptsPaymentsProperties.java
--- a/src/org/openbravo/retail/posterminal/PaidReceiptsPaymentsProperties.java
+++ b/src/org/openbravo/retail/posterminal/PaidReceiptsPaymentsProperties.java
@@ -24,11 +24,12 @@
     ArrayList<HQLProperty> list = new ArrayList<HQLProperty>() {
       private static final long serialVersionUID = 1L;
       {
-        add(new HQLProperty("scheduleDetail.amount", "amount"));
+        add(new HQLProperty("sum(scheduleDetail.amount)", "amount", false));
         add(new HQLProperty("finPayment.account.id", "account"));
         add(new HQLProperty("finPayment.paymentDate", "paymentDate"));
         add(new HQLProperty("finPayment.id", "paymentId"));
         add(new HQLProperty("finPayment.amount", "paymentAmount"));
+        add(new HQLProperty("finPayment.financialTransactionAmount", "financialTransactionAmount"));
         add(new HQLProperty("finPayment.obposPaymentdata", "paymentData"));
         add(new HQLProperty("reversedPayment.id", "reversedPaymentId"));
       }
