Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0039172
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Retail Modules] Web POSmajorhave not tried2018-08-23 02:482018-10-18 20:37
ReporternaiaramartinezView Statuspublic 
Assigned Tonaiaramartinez 
PrioritynormalResolutionno change requiredFixed in Version
StatusclosedFix in branchFixed in SCM revision
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned To
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0039172: Definition of taxes in ExternalOrderLoader should be a JsonArray and not a JsonObject

DescriptionIn externalOrderLoader, in the json the taxes are defined as JSONObject and it should be defined as JsonArray.

It is working fine in case all the taxes have different names, but in case there are taxes with the same name (but different rates), the json is not correct.
Steps To Reproduce1-Go to the backend to the window TaxRates. Select the tax 'Entregas a Canarias,Ceuta y Melilla (%R=>0%)' and modify its name to match the following: 'Entregas IVA 21%'
2- Using SOAPUI (or any other application like this one), integrate the following json and check that there is an error:

{
   "messageId":"F4BBBD005EC34E58A9654",
   "posTerminal":"CMS-1",
   "channel":"External",
   "data":[
      {
         "isQuotation":true,
         "leplogIsweddingandevent":false,
         "currency":"EUR",
         "step":"all",
         "grossAmount":26.1,
         "netAmount":21.78,
         "businessPartner":"VBS/C0001",
         "lines":[
            {
               "product":"WVG/M00216",
               "qty":1,
               "grossAmount":1.20,
               "netAmount":1.2,
               "taxAmount":0,
               "taxLines":{
                  "Entregas IVA 21%":{
                     "rate":0,
                     "netAmount":1.20,
                     "taxAmount":0
                  }
               }
            },
            {
               "product":"WVG/S0011",
               "qty":1,
               "grossAmount":24.9,
               "netAmount":20.58,
               "taxAmount":4.32,
               "taxLines":{
                  "Entregas IVA 21%":{
                     "rate":21,
                     "netAmount":20.58,
                     "taxAmount":4.32
                  }
               }
            }
         ],
         "taxes":{
            "Entregas IVA 21%":{
               "rate":21,
               "netAmount":20.58,
               "taxAmount":4.32
            },
            "Entregas IVA 21%":{
               "rate":0,
               "netAmount":1.20,
               "taxAmount":0
            }
         }
      }
   ]
}



Proposed SolutionDefine the taxes as array in order to be able to solve the scenario described in this issue.
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
(0106476)
marvintm (manager)
2018-08-24 11:25

The data structure used is not a problem per se, as it is not possible in Openbravo to define more than one tax line for a given tax, for an order or order line. The main issue here is how the specific referenced taxRate is identified in the JSON.

Currently in the ExternalOrderLoader it is possible to identify them either by name, or c_tax_id. If identified by name, it is possible for the tax to be ambiguous, as the issue mentions, if the taxes are defined in Openbravo with the same name. This is possible to avoid however simply by configuring the taxes with different names.

If this is not possible for some reason, then it is also possible to identify them by the UUID (c_tax_id). There is no other way currently in Openbravo to identify taxes, so this is technically not a limitation in the ExternalOrderLoader.

- Issue History
Date Modified Username Field Change
2018-08-23 02:48 naiaramartinez New Issue
2018-08-23 02:48 naiaramartinez Assigned To => marvintm
2018-08-23 02:48 naiaramartinez Resolution time => 1535061600
2018-08-23 02:48 naiaramartinez Triggers an Emergency Pack => No
2018-08-24 11:25 marvintm Note Added: 0106476
2018-08-24 11:25 marvintm Assigned To marvintm => naiaramartinez
2018-08-24 11:25 marvintm Status new => feedback
2018-10-18 20:37 marvintm Status feedback => closed
2018-10-18 20:37 marvintm Resolution open => no change required


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker