Company: Link Technologies
Case No: L09695. Project: 10.10: LinkSOFT Version 10.1
Logged By: Sanjeet (Link Business Solutions) on 08 Nov 2018 10:31AM
Priority: High
Product: Point of Sale
Group: Software Defect
Time Taken: 21.00 (Weight: 21.00)
Version: 10.155.0117
Assigned To: Sanjay (Link Technologies)
Circulation: Alvis, Development, Rashna, Sanjay, Sanjeet
Resolve By: Friday, 09 November 2018 12:00 AM [1989 days since logged date]
Status: Closed
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: 

image


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 201810:45AM Comment 1 by Sanjay (Link Technologies) Case 9695 added to project 10.1
08 Nov 201811: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 201811:37AM Comment 3 by Sanjay (Link Technologies) Case 9695 removed from project 10.1
08 Nov 201811:37AM Comment 4 by Sanjay (Link Technologies) Case 9695 added to project 09.X
08 Nov 201811: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):|

  1. Quantity rounded to 3DP
  2. Unit Price rounded to 2DP

2. The issue was caused by:

  1. Tax Core Requirement

    3. Next Step

    1. UAT

    4. Note:

    1. When quantity is less than 0.0004, the quantity will show as Zero.

    08 Nov 201801: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 201801: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 201802: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, 

    1. 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 201802: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:

    1. Move the "global SDC enabled" configuration to the LinkWEB integration.
    2. Add the following rules:
      1. Minimum quantity for a product. Datatype decimal, value 0.001.
      2. 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 201803:38PM Comment 10 by Sanjay (Link Technologies) Case 9695 removed from project 09.X
    08 Nov 201803:38PM Comment 11 by Sanjay (Link Technologies) Case 9695 added to project 10.1
    08 Nov 201803: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):|

    1. Moved Global SDC configuration to "Integrations" framework
    2. Added rule to validate "minimum Product Quantity" on Transaction Save (Before SDC is processed)
    3. Added rule to validate "Tax Labels" on Transaction Save (Before SDC is processed)

    2. The issue was caused by:

    1. Boundary conditions were not accounted for in the initial design
    2. Note that this will only impact NEW transactions. Reprint transactions can result in a "Bad request" error.

      3. Next Step

      1. UAT

      09 Nov 201810: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
      NoTest DescriptionPass/Fail
      1Validate that SDC configuration has been removed from Global ConfigurationPass
      2Validate SDC Integration exists and is enabled without errors.Pass
      3Validate that the min quantity is 0.001Pass
      4Validate that the default tax labels are A,B,E,F,NPlease include labels N and B. Review FRCS Updates
      5Process a sale with quantity as 0.001. This should be completed without errorsPass
      6Reprint the above sale it should be completed without errorsPass
      7Return the sale in 5 and it should be completed without errorsPass
      8Process sale with quantity as 0.0006, 0.0002, 0.0004. These sales should be disallowed for cash, credit and laybyPass
      9Process a sale with price as 555.555. The SDC price should be updated as 555.56Pass
      10Load items PNT01 with quantity as 1, item PNT02 with quantity as 2 and PNT03 with quantity as 0.0003. This sale should not be allowedPass
      11Create a prescription with quantity as 0.0002. The sale of the prescription should not be allowedPass
      12Create 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

      1. OS version: Windows Server 2012
      2. Application version: 10.1.1.5
      3. Setup: Demo
      4. Server : LINK008 (Rashna PC)
      5. Database: LINKSOFTDEMO

      Steps to reproduce failed scenarios: N/AV

      Next Step: for update


        09 Nov 201801: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
        NoTest DescriptionPass/Fail
        1Validate that tax labels B and N are added to the defaultsPass

        Environment Details

        1. OS version: Windows 7
        2. Application version: 10.1.1.6
        3. Setup: Demo
        4. Server : LINK008 (Rashna PC)
        5. Database: LINKSOFTDEMO

        Steps to reproduce failed scenarios:N/A

        Next Step: for documentation


          09 Nov 201801: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 201801:43PM Comment 16 by Sanjay (Link Technologies) Assigned To: Sanjay (Link Technologies) Followup Date: 09-11-2018 01:43 PM
          Thanks Rashna

          09 Oct 201908: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
          If you have any queries regarding this support incident, please email admin@linktechnologies.com.au and include the Case No: L09695 in the subject line of all emails regarding this issue.

          Document size: 65.5 KB
          For call complaints, please contact the Managing Director of the company using this form