Openbravo Issue Tracking System - POS2
View Issue Details
0049657POS2POSpublic2022-06-27 10:582022-06-30 11:41
timothee_catteeuw 
javietxe 
normalcriticalalways
closedfixed 
5
 
 
guilleaer
No
0049657: JIRA 3118 - API closure in error when comarch discount without label
When the external promotion engine sent to Openbravo a promotion without discount, that causes an error on API sales closure process.

Cf. sample for example.

{
"technical_id": "116408",
"code": "30%_FAM2_S",
"label": "",
"amount": 2.69
}
Steps to reproduce :

Go to webpos

start a new ticket and select “poulet roti 1/2”

swithc to payment

the 30%_FAM2_S discount is applied

pay

Close your till

go to BO

Open EDSL request window

get the corresponding API Sales closure

The related closure of the previous sale is in error

→ ValidationError:"unit_sales[0].discounts[0].label" is not allowed to be empty

This field can be empty and this case has to be handled because this label can be empty
If no external promotion system label, it is necessary to put the code in unit_sales[0].discounts[0].label (ex : 30%_FAM2_S in the previous example)

If external promotion system send a label , it is necessary to put this label
No tags attached.
? Sample.json (5,830) 2022-06-27 10:58
https://issues.openbravo.com/file_download.php?file_id=17239&type=bug
Issue History
2022-06-27 10:58timothee_catteeuwNew Issue
2022-06-27 10:58timothee_catteeuwAssigned To => Retail
2022-06-27 10:58timothee_catteeuwFile Added: Sample.json
2022-06-27 10:58timothee_catteeuwTriggers an Emergency Pack => No
2022-06-27 11:02timothee_catteeuwProposed Solution updated
2022-06-30 11:40guilleaerStatusnew => scheduled
2022-06-30 11:40guilleaerAssigned ToRetail => javietxe
2022-06-30 11:40guilleaerNote Added: 0138883
2022-06-30 11:40guilleaerStatusscheduled => resolved
2022-06-30 11:40guilleaerResolutionopen => fixed
2022-06-30 11:41guilleaerReview Assigned To => guilleaer
2022-06-30 11:41guilleaerStatusresolved => closed

Notes
(0138883)
guilleaer   
2022-06-30 11:40   
https://gitlab.com/obcustomers/AGAP/com.openbravo.flunch.integration.comarch.cashup/-/merge_requests/10 [^]