Attached Files | orderwithoutpayments.diff [^] (7,740 bytes) 2016-09-02 14:20 [Show Content] [Hide Content]{
"messageId": "387A33EB34D95B1F8554A6A759B30D08",
"data": [{
"hasbeenpaid": "N",
"isbeingprocessed": "N",
"id": "A1448CB9184CE16A9570125A94075B8F",
"client": "9D11C7AED56349F186249FDAD0B69515",
"organization": "65C7845EF4E440A69415C8235EA85557",
"createdBy": "93B1944F0D7148B6B0CD6C7E8112045F",
"updatedBy": "93B1944F0D7148B6B0CD6C7E8112045F",
"documentType": "0D0E83E252534B3BA28DEF225FA1A54F",
"orderType": 0,
"generateInvoice": false,
"isQuotation": false,
"oldId": null,
"priceList": "499B7FA05D75454A99A69802A571B860",
"priceIncludesTax": true,
"currency": "130",
"currency$_identifier": "MXN",
"session": "AFA024D2C75EE12E86E8C58F13EB0CB4",
"warehouse": "EF5281F6D35F42CA837328935F4D069B",
"salesRepresentative": null,
"salesRepresentative$_identifier": null,
"posTerminal": "0FAE064384784AE1A55AD1037BFA48BF",
"posTerminal$_identifier": "1211 CAJA-1",
"orderDate": "2016-09-01T14:52:36.392Z",
"creationDate": "2016-09-01T14:52:36.392Z",
"documentnoPrefix": "1211-1",
"quotationnoPrefix": -1,
"documentnoSuffix": 135149,
"quotationnoSuffix": -1,
"documentNo": "1211-1\/0135149",
"bp": {
"id": "6CA8DFB2E1F247D68A56231403E0BD02",
"organization": "0",
"searchKey": "CLIENTE MOSTRADOR",
"_identifier": "VENTAS AL PUBLICO EN GENERAL",
"name": "VENTAS AL PUBLICO EN GENERAL",
"firstName": "HECTOR MANUEL",
"lastName": "PACHECO ",
"description": null,
"taxID": "XAXX010101000",
"taxCategory": null,
"paymentMethod": "E4F71F9C8F254A8BBE0B942334A97C0B",
"paymentTerms": "65C0D479FF8E4E969D1B1007E7278776",
"priceList": "499B7FA05D75454A99A69802A571B860",
"invoiceTerms": "I",
"locId": "1E5B2DBD04AA4797A43631D8BE4DE3DB",
"locName": "Av. Rodolfo Gaona",
"postalCode": "11200",
"cityName": "Ciudad de Mexico",
"countryName": "Mexico",
"contactId": "77F38972DE21439BA422A6826DE9F173",
"phone": null,
"email": null,
"businessPartnerCategory": "D8F8AD842829426A889940A927FD1E23",
"businessPartnerCategory_name": "CLIENTE",
"creditLimit": 0,
"creditUsed": -4995716.35,
"taxExempt": false,
"customerBlocking": false,
"salesOrderBlocking": true,
"priceIncludesTax": true,
"priceListName": "BASE VENTA",
"region": "61CAD183810A46BBBD99A00E09A002AD",
"addressLine2": "Lomas de Sotelo",
"tdirmNumex": "86",
"tdirmNumin": "E",
"tdirmLocalidad": "Miguel Hidalgo",
"region_name": "Ciudad de México",
"fetEmail": "factura.electronica@laeuropea.com.mx",
"fetRazonsocial": "VENTAS AL PUBLICO EN GENERAL",
"phone2": "015555805057",
"fetDesglosarieps": true,
"_filter": "CLIENTE MOSTRADOR###VENTAS AL PUBLICO EN GENERAL###XAXX010101000###Av. Rodolfo Gaona###",
"_idx": 146,
"locationModel": {
"id": "1E5B2DBD04AA4797A43631D8BE4DE3DB",
"bpartner": "6CA8DFB2E1F247D68A56231403E0BD02",
"name": "Av. Rodolfo Gaona",
"postalCode": "11200",
"cityName": "Ciudad de Mexico",
"countryName": "Mexico",
"countryId": "247",
"regionName": "Ciudad de México",
"regionId": "61CAD183810A46BBBD99A00E09A002AD",
"_identifier": "Av. Rodolfo Gaona",
"region": "61CAD183810A46BBBD99A00E09A002AD",
"addressLine2": "Lomas de Sotelo",
"tdirmNumex": "86",
"tdirmNumin": "E",
"region_name": "Ciudad de México",
"tdirmLocalidad": "Miguel Hidalgo",
"_filter": "Av. Rodolfo Gaona###",
"_idx": 51
}
},
"lines": [{
"product": {
"id": "4A9092FE6FF6455BB452E1808D6A0E19",
"searchkey": "0509",
"uPCEAN": "7501055300075",
"uOM": "E39980BA7D9B460DA6559CD9FE452AB6",
"uOMsymbol": null,
"productCategory": "6497C600366149E391C73E803BB6D70B",
"taxCategory": "8E85B371792340A2A93A63CA2E0C4740",
"description": null,
"obposScale": false,
"groupProduct": true,
"stocked": true,
"showstock": false,
"isGeneric": false,
"generic_product_id": null,
"brand": "841A01DA9B004DC8A79B32E1430F2701",
"characteristicDescription": null,
"showchdesc": true,
"bestseller": false,
"ispack": false,
"listPrice": 9,
"standardPrice": 9,
"priceLimit": 8,
"cost": 0,
"algorithm": "S",
"_identifier": "REF COCA COLA LATA 355 ML",
"currentStandardPrice": "undefined",
"productType": "I",
"includeProductCategories": null,
"includeProducts": null,
"printDescription": false,
"oBPOSAllowAnonymousSale": true,
"returnable": true,
"overdueReturnDays": null,
"isPriceRuleBased": false,
"proposalType": null,
"availableForMultiline": false,
"isLinkedToProduct": false,
"allowDeferredSell": false,
"deferredSellMaxDays": null,
"quantityRule": null,
"isPrintServices": true,
"lamitGiftcardmitec": false,
"eursvsGiftcard": false,
"_idx": 7762,
"originalStandardPrice": 9
},
"productidentifier": null,
"uOM": "E39980BA7D9B460DA6559CD9FE452AB6",
"qty": 1,
"price": 9,
"priceList": 9,
"gross": 9,
"net": 7.58,
"description": "",
"id": "895AE6958CBCB55006FEF9616F7D1EAB",
"priceIncludesTax": true,
"warehouse": {
"id": "EF5281F6D35F42CA837328935F4D069B",
"warehousename": "PLAZA SATELITE"
},
"promotions": [],
"grossListPrice": 9,
"promotionCandidates": null,
"promotionMessages": [],
"noDiscountCandidates": true,
"taxLines": {
"77858EAFEB6441D1951B3C4D9F75EF8D": {
"name": "IVA",
"rate": 16,
"net": 7.58,
"amount": 1.21
}
},
"tax": "77858EAFEB6441D1951B3C4D9F75EF8D",
"taxAmount": 1.24,
"pricenet": 7.58,
"discountedNet": 7.58,
"linerate": 1.16,
"hasRelatedServices": false,
"discountPercentage": 0,
"listPrice": 7.76,
"standardPrice": 7.76,
"grossUnitPrice": 8.79,
"lineGrossAmount": 8.79
}],
"payments": [],
"payment": 0,
"change": 0,
"qty": 1,
"gross": 8.79,
"net": 7.58,
"taxes": {
"77858EAFEB6441D1951B3C4D9F75EF8D": {
"name": "IVA",
"docTaxAmount": "L",
"rate": 16,
"net": 7.58,
"amount": 1.21
}
},
"description": "",
"print": true,
"sendEmail": false,
"isPaid": false,
"paidOnCredit": false,
"isLayaway": false,
"isEditable": true,
"openDrawer": false,
"totalamount": null,
"approvals": [],
"isNewReceipt": false,
"cloningReceipt": false,
"cashVAT": true,
"selectedPayment": "OBPOS_payment.cash",
"exactpayment": {},
"calculateReceiptCallbacks": [],
"isBeingDiscounted": false,
"reApplyDiscounts": false,
"couponsToRedeem": [],
"isAccumulating": false,
"obloyCustomername": null,
"obloyMembershipid": null,
"timezoneOffset": 300,
"created": 1472741556392,
"obposCreatedabsolute": "2016-09-01 09:52:36.392",
"movementDate": "2016-09-01T14:52:36.402Z",
"accountingDate": "2016-09-01T14:52:36.402Z",
"obposAppCashup": "EC914C93D28A68C7D526B9A51149C843"
}],
"client": "9D11C7AED56349F186249FDAD0B69515",
"organization": "65C7845EF4E440A69415C8235EA85557",
"pos": "0FAE064384784AE1A55AD1037BFA48BF",
"terminalName": "1211-1",
"appName": "WebPOS"
}
GAL_screenshoot_Selection_449.jpg [^] (307,004 bytes) 2016-09-02 14:22
GAL_screenshoot_Selection_450.jpg [^] (304,872 bytes) 2016-09-02 14:22
33890_OrderWithoutPayment.patch [^] (1,572 bytes) 2016-09-12 09:47 [Show Content] [Hide Content]# HG changeset patch
# User Silambarasan Sekar <silambarasan@qualiantech.com>
# Date 1473066040 -19800
# Mon Sep 05 14:30:40 2016 +0530
# Node ID 5e829b87b5f0e848d127de42515a45a6738d1b93
# Parent 027dc930d1761e778089716c0cae4b9f5c9d3cee
Fixes issue 33890: Thorw Error when processing Orders without payments
diff -r 027dc930d176 -r 5e829b87b5f0 src/org/openbravo/retail/posterminal/OrderLoader.java
--- a/src/org/openbravo/retail/posterminal/OrderLoader.java Wed Sep 07 10:43:15 2016 -0600
+++ b/src/org/openbravo/retail/posterminal/OrderLoader.java Mon Sep 05 14:30:40 2016 +0530
@@ -1782,8 +1782,15 @@
} else {
JSONArray payments = jsonorder.getJSONArray("payments");
+ // Check if order has valid payments
+ BigDecimal amt = BigDecimal.valueOf(jsonorder.getDouble("payment"));
+ if ((jsonorder.getLong("orderType") == 0 || jsonorder.getLong("orderType") == 1)
+ && payments.length() == 0 && !wasPaidOnCredit && !jsonorder.getBoolean("isLayaway")
+ && amt.compareTo(BigDecimal.ZERO) > 0) {
+ throw new OBException("Error in OrderLoader, Payments not found");
+ }
+
// Create a unique payment schedule for all payments
- BigDecimal amt = BigDecimal.valueOf(jsonorder.getDouble("payment"));
FIN_PaymentSchedule paymentSchedule = OBProvider.getInstance().get(FIN_PaymentSchedule.class);
int pricePrecision = order.getCurrency().getObposPosprecision() == null ? order.getCurrency()
.getPricePrecision().intValue() : order.getCurrency().getObposPosprecision().intValue();
|