Subject: | SDC Processing Failed - 400 Bad Request caused by Decimal values in Quantity and Unit Price |
Summary: | 1. Problem Details SDC Processing fails for items which have quantity decimal places in excess if 3 digits.
2. Error Message (Include screenshot of error) SDC Processing Failed. SQL Log Message Log Message:Error processing ESDC Tax Integration.
Log Data:{"OrderLines":[{"Line":1,"ProductCode":"1121","Description":"Imported Leek KG","UnitPrice":16.00000000,"Quantity":0.00060000,"TaxCode":"TAXIN","TaxAmount":0.00,"Discount":0.00,"LineTotal":0.01,"Deleted":false,"ReceiptDescription":"0.00060000 x $16.00 Imported Leek KG"}],"TransactionID":"LTTX0000988022","TransactionDate":"2018-11-08T11:13:35.4","TransactionType":null,"TransactionTypeInt":1,"ReferenceNo":"LTK10000985060","DocumentNo":"","CustomerCode":"POSCASH-201811","ShiftID":"LTSH0000003936","UserName":"0240"}
3. Relevant History Information
We provided the above log data to SOFTSDC. Below is the response from them. +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Dear Mr. Prasad,
thank you for reaching out.
The issue you are experiencing is due to inadequate UnitPrice and Quantity values.
We have developed our app following the instructions for developers from FRCS website:
Meaning, the minimum value for Quantity is 0.001 and should have 3 decimal spaces and your POS displays Quantity:0.0006 (4 decimal spaces)Next, the value for UnitPrice is limited to 2 decimal spaces and your POS displays 27 decimal spaces in several cases. However, this amount will be accepted, but please follow the instructions for developers in order to prevent further possible error messages.+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ FRCS file-spec can be found here. Please refer to page 28 for specifications. We also need to fix unit price decimal place.
-----------------------------------------------------------------------
|
Audit Notes: | Edited by sanjay on 05/03/19 10:02. |
08 Nov 2018 | 10:45AM Comment 1 by Sanjay (Link Technologies) Case 9695 added to project 10.1 |
08 Nov 2018 | 11:03AM Comment 2 by Sanjay (Link Technologies) Assigned To: Sanjeet (Link Business Solutions) Followup Date: 08-11-2018 11:03 AM Time Taken: 2.00 |
| Hi Sanjeet, in the case where the Quantity is for example 0.0001, what do you want shown in the SDC?. See example below. Figure 1 - Quantity < 0.0005
|
|
08 Nov 2018 | 11:37AM Comment 3 by Sanjay (Link Technologies) Case 9695 removed from project 10.1 |
08 Nov 2018 | 11:37AM Comment 4 by Sanjay (Link Technologies) Case 9695 added to project 09.X |
08 Nov 2018 | 11:40AM Comment 5 by Sanjay (Link Technologies) Assigned To: Rashna (Edge Business Solutions) Followup Date: 08-11-2018 11:40 AM Time Taken: 4.00 |
| Development work for this case has been completed. The change will be available in version: 949.006 and 10.1.1.4 1. The following changes were made(Include Database object names, Program classes and any other relevant information):| - Quantity rounded to 3DP
- Unit Price rounded to 2DP
2. The issue was caused by: - Tax Core Requirement
3. Next Step - UAT
4. Note: - When quantity is less than 0.0004, the quantity will show as Zero.
|
|
08 Nov 2018 | 01:13PM Comment 6 by Sanjay (Link Technologies) Assigned To: Sanjay (Link Technologies) Followup Date: 08-11-2018 01:13 PM |
| Note that this change if for SDC integration only. All other areas remain unchanged. |
|
08 Nov 2018 | 01:41PM Comment 7 by Sanjay (Link Technologies) Assigned To: Sanjay (Link Technologies) Followup Date: 08-11-2018 01:41 PM Notes: Edited by sanjay on 08/11/18 14:11. |
| Regarding Note 4 in comment 5, the SDC value is rounded to 3 DP as this is a limitation on the SDC system. The POS system will continue to store values in the actual decimal value. The Minimum SDC value of 0.001 needs to be accounted for when implementing prices, especially in scale systems. For SDC Processing, the UNIT PRICE is calculated from the "Line Total" and "Quantity' sold. This is done to handle discounts and to ensure that the SDC line total correctly reflects the unit price and quantity sold. |
|
08 Nov 2018 | 02:22PM Comment 8 by Rashna (Edge Business Solutions) Assigned To: Sanjay (Link Technologies) Followup Date: 08-11-2018 02:22 PM Time Taken: 2.00 |
| Hi Sanjay, - SDC fails when quantity is 0.0004 or less.
Notes: When the quantity is less than 0.001 and more than 0.0006. Quantity will be rounded to 0.001, here the unit price will be recalculated as per the line total. Thanks Rashna |
|
08 Nov 2018 | 02:32PM Comment 9 by Sanjay (Link Technologies) Assigned To: Development Followup Date: 08-11-2018 02:32 PM Time Taken: 1.00 |
| Changes to SDC integration to facilitate limitations and rules: - Move the "global SDC enabled" configuration to the LinkWEB integration.
- Add the following rules:
- Minimum quantity for a product. Datatype decimal, value 0.001.
- Allowed Tax labels (comma separated) value: E,A,F,P
When a transaction is saved and SDC integration is enabled, we perform the validations in 2. above. |
|
08 Nov 2018 | 03:38PM Comment 10 by Sanjay (Link Technologies) Case 9695 removed from project 09.X |
08 Nov 2018 | 03:38PM Comment 11 by Sanjay (Link Technologies) Case 9695 added to project 10.1 |
08 Nov 2018 | 03:43PM Comment 12 by Sanjay (Link Technologies) Assigned To: Rashna (Edge Business Solutions) Followup Date: 08-11-2018 03:43 PM Time Taken: 8.00 |
| Development work for this case has been completed. The change will be available in version: 10.1.1.5 1. The following changes were made(Include Database object names, Program classes and any other relevant information):| - Moved Global SDC configuration to "Integrations" framework
- Added rule to validate "minimum Product Quantity" on Transaction Save (Before SDC is processed)
- Added rule to validate "Tax Labels" on Transaction Save (Before SDC is processed)
2. The issue was caused by: - Boundary conditions were not accounted for in the initial design
- Note that this will only impact NEW transactions. Reprint transactions can result in a "Bad request" error.
3. Next Step - UAT
|
|
09 Nov 2018 | 10:04AM Comment 13 by Rashna (Edge Business Solutions) Assigned To: Alvis (Link Technologies) Followup Date: 09-11-2018 10:04 AM Time Taken: 2.00 Notes: Edited by rashna on 09/11/18 10:18. |
| Hi Sanjay QA Results Tests carried out according to requirements specified on the case header Test Results Summary Table 1 - Summarised list of issues No | Test Description | Pass/Fail | 1 | Validate that SDC configuration has been removed from Global Configuration | Pass | 2 | Validate SDC Integration exists and is enabled without errors. | Pass | 3 | Validate that the min quantity is 0.001 | Pass | 4 | Validate that the default tax labels are A,B,E,F,N | Please include labels N and B. Review FRCS Updates | 5 | Process a sale with quantity as 0.001. This should be completed without errors | Pass | 6 | Reprint the above sale it should be completed without errors | Pass | 7 | Return the sale in 5 and it should be completed without errors | Pass | 8 | Process sale with quantity as 0.0006, 0.0002, 0.0004. These sales should be disallowed for cash, credit and layby | Pass | 9 | Process a sale with price as 555.555. The SDC price should be updated as 555.56 | Pass | 10 | Load items PNT01 with quantity as 1, item PNT02 with quantity as 2 and PNT03 with quantity as 0.0003. This sale should not be allowed | Pass | 11 | Create a prescription with quantity as 0.0002. The sale of the prescription should not be allowed | Pass | 12 | Create a prescription with PNT01 quantity as 1, item PNT02 with quantity as 2 and PNT03 with quantity as 0.0003. The sale of the prescription should not be allowed
| Pass |
Environment Details - OS version: Windows Server 2012
- Application version: 10.1.1.5
- Setup: Demo
- Server : LINK008 (Rashna PC)
- Database: LINKSOFTDEMO
Steps to reproduce failed scenarios: N/AV Next Step: for update
|
|
09 Nov 2018 | 01:20PM Comment 14 by Rashna (Edge Business Solutions) Assigned To: Sanjay (Link Technologies) Followup Date: 09-11-2018 01:20 PM Time Taken: 1.00 |
| Hi Sanjay QA Results Tests carried out according to requirements specified on the case header Test Results Summary Table 1 - Summarised list of issues No | Test Description | Pass/Fail | 1 | Validate that tax labels B and N are added to the defaults | Pass |
Environment Details - OS version: Windows 7
- Application version: 10.1.1.6
- Setup: Demo
- Server : LINK008 (Rashna PC)
- Database: LINKSOFTDEMO
Steps to reproduce failed scenarios:N/A Next Step: for documentation
|
|
09 Nov 2018 | 01:37PM Comment 15 by Rashna (Edge Business Solutions) Assigned To: Sanjay (Link Technologies) Followup Date: 09-11-2018 01:37 PM Time Taken: 1.00 |
| Hi Sanjay, Documentation has been updated on the case. Documentation updated under Link Web Application Portal - Integration - Integration Setup. Thanks Rashna |
|
09 Nov 2018 | 01:43PM Comment 16 by Sanjay (Link Technologies) Assigned To: Sanjay (Link Technologies) Followup Date: 09-11-2018 01:43 PM |
| Thanks Rashna |
|
09 Oct 2019 | 08:14AM Comment 17 by Sanjay (Link Technologies) Quality control status: Pass. QC Not required - This case was created before quality check was implemented in version 11 on 30/06/2019 |