Openbravo Issue Tracking System - POS2
View Issue Details
0046272POS2POSpublic2021-04-15 13:052021-05-11 11:00
ebecerra 
pablobessone 
normalmajorhave not tried
closedfixed 
5
 
 
guilleaer
No
0046272: JIRA 1687: When load a ticket from ERP the promotions not show the "identifier"
When load a ticket from ERP with promotions the label for promotions displayed ignore the value of the "identifier" (OrderLineOffer.obdiscIdentifier).

This happens for discounts by line and also for discount by total when being showed in the separated place.
In agapes test: https://agapes-test.cloud.openbravo.com/ [^]

Login in a terminal

search for the ticket 00370011/0000335

See that the total discount is named "Comarch Discounts by Total" instead of the value in te identifier.

New steps

In Standard environment
Create and order
Add a product (avalanche transceiver)
Click on order line
In the popover select discount
Apply a discount to line (disc_5_var_euro) and press apply
Press pay
Order is created

If you load the order using orders everything is fine

Go to pgadmin
Open table c_orderline_offer (last line created)
Add something in column "em_obdisc_identifier"


Close the order and reload it again
Now the name of discount shown sould be the text added in em_obdisc_identifier

Takeaway
depends on backport 0046351TAP closed pablobessone JIRA 1687: When load a ticket from ERP the promotions not show the "identifier" 
diff issue46272.diff (923) 2021-04-20 09:56
https://issues.openbravo.com/file_download.php?file_id=15543&type=bug
Issue History
2021-04-15 13:05ebecerraNew Issue
2021-04-15 13:05ebecerraAssigned To => Retail
2021-04-15 13:05ebecerraTriggers an Emergency Pack => No
2021-04-15 13:11javietxeDescription Updatedbug_revision_view_page.php?rev_id=22315#r22315
2021-04-15 13:11javietxeSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=22317#r22317
2021-04-15 14:42javietxeIssue Monitored: javietxe
2021-04-15 14:51javietxeSummaryWhen load a ticket from ERP the promotions not show the "identifier" => JIRA 1687: When load a ticket from ERP the promotions not show the "identifier"
2021-04-15 19:36pablobessoneAssigned ToRetail => pablobessone
2021-04-16 07:45marvintmNote Added: 0127302
2021-04-20 09:56guilleaerFile Added: issue46272.diff
2021-04-20 10:05guilleaerSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=22343#r22343
2021-04-20 10:26guilleaerStatusnew => scheduled
2021-04-20 16:29hgbotNote Added: 0127390
2021-04-21 12:13hgbotNote Added: 0127413
2021-04-21 12:14guilleaerNote Added: 0127414
2021-04-21 12:14guilleaerStatusscheduled => resolved
2021-04-21 12:14guilleaerResolutionopen => fixed
2021-04-21 12:14guilleaerReview Assigned To => guilleaer
2021-04-21 12:14guilleaerStatusresolved => closed
2021-04-26 12:22javietxeTag Attached: Takeaway
2021-04-26 12:34guilleaerStatusclosed => new
2021-04-26 12:34guilleaerResolutionfixed => open
2021-04-26 12:34guilleaerStatusnew => scheduled
2021-04-26 12:34guilleaerStatusscheduled => resolved
2021-04-26 12:34guilleaerResolutionopen => fixed
2021-04-26 12:34guilleaerStatusresolved => closed
2021-05-10 15:03guilleaerStatusclosed => new
2021-05-10 15:03guilleaerResolutionfixed => open
2021-05-10 15:03guilleaerStatusnew => scheduled
2021-05-10 15:08guilleaerNote Added: 0127947
2021-05-10 15:11guilleaerResolution time => 1620770400
2021-05-10 19:50hgbotNote Added: 0127968
2021-05-11 11:00hgbotResolutionopen => fixed
2021-05-11 11:00hgbotStatusscheduled => closed
2021-05-11 11:00hgbotNote Added: 0127987
2021-05-11 11:00hgbotNote Added: 0127988

Notes
(0127302)
marvintm   
2021-04-16 07:45   
The main idea here is to show the "identifier" JSON property (which corresponds to the "ObdiscIdentifier" property in the backend model) if it exists. Otherwise, the discounts should be shown as they are now.

This will help mainly when showing discounts from orders coming from backend.

It should apply both for inline discounts and receipt discounts shown in the lower side of the order component.
(0127390)
hgbot   
2021-04-20 16:29   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/merge_requests/403 [^]
(0127413)
hgbot   
2021-04-21 12:13   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/merge_requests/403 [^]
(0127414)
guilleaer   
2021-04-21 12:14   
https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/merge_requests/403/diffs?commit_id=fa84875d2fad943f91fdfa74b717fd9368455980 [^]
(0127947)
guilleaer   
2021-05-10 15:08   
Reopened. When flag (organization window) "show order discounts in a separate section" is enabled identifer is not being used
(0127968)
hgbot   
2021-05-10 19:50   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/merge_requests/447 [^]
(0127987)
hgbot   
2021-05-11 11:00   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2 [^]
Changeset: cb8e6e1a84075a975cc67e40cf9358486baf0bab
Author: Pablo Bessone <pablo.bessone@smfconsulting.es>
Date: 2021-05-11T09:00:01+00:00
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/commit/cb8e6e1a84075a975cc67e40cf9358486baf0bab [^]

fixed ISSUE-0046272: modified condition to use discount identifier when show order discounts in a separate section flag is enabled

---
M web-jspack/org.openbravo.pos2/src/components/Ticket/TicketSummaryDiscountLine/TicketSummaryDiscountLine.jsx
M web-jspack/org.openbravo.pos2/src/components/Ticket/TicketSummaryDiscounts/TicketSummaryDiscounts.jsx
---
(0127988)
hgbot   
2021-05-11 11:00   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/merge_requests/447 [^]