Attached Files | oldReceiptsbpId.diff [^] (2,232 bytes) 2012-10-31 16:23 [Show Content] [Hide Content]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
@@ -34,7 +34,7 @@
String hqlPaidReceipts = "select ord.id as id, ord.documentNo as documentNo, ord.orderDate as orderDate, "
+ "ord.businessPartner.name as businessPartner, ord.grandTotalAmount as totalamount, ord.salesRepresentative.name as salesRepresentative, ord.documentType.name as documenttype, "
- + "ord.id as orderid, ord.warehouse.id as warehouse, ord.currency.iSOCode as currency, ord.obposApplications.name as posterminalidentifier from Order as ord where ord.client=? and ord.organization=? and ord.obposApplications is not null";
+ + "ord.id as orderid, ord.warehouse.id as warehouse, ord.currency.iSOCode as currency, ord.obposApplications.name as posterminalidentifier, ord.businessPartner.id as businessPartnerId from Order as ord where ord.client=? and ord.organization=? and ord.obposApplications is not null";
if (!json.getString("documentNo").isEmpty()) {
hqlPaidReceipts += " and ord.documentNo like '%" + json.getString("documentNo") + "%' ";
}
@@ -61,6 +61,7 @@
paidReceipt.put("warehouse", objpaidReceipts[8]);
paidReceipt.put("currency", objpaidReceipts[9]);
paidReceipt.put("posterminalidentifier", objpaidReceipts[10]);
+ paidReceipt.put("businessPartnerId", objpaidReceipts[11]);
paidReceipt.put("organization", json.getString("organization"));
paidReceipt.put("posterminal", json.getString("pos"));
paidReceipt.put("client", json.getString("client"));
diff --git a/web/org.openbravo.retail.posterminal/js/model/order.js b/web/org.openbravo.retail.posterminal/js/model/order.js
--- a/web/org.openbravo.retail.posterminal/js/model/order.js
+++ b/web/org.openbravo.retail.posterminal/js/model/order.js
@@ -739,6 +739,7 @@
bp = {};
bp._identifier = model.businessPartner;
+ bp.id = model.businessPartnerId;
order.set('bp', new Backbone.Model(bp));
order.set('gross', model.totalamount);
order.trigger('calculategross');
|