Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0057998Openbravo ERP07. Sales managementpublic2025-02-14 19:542025-02-18 10:50
sofidossant 
Sathishkumar 
normalminoralways
newopen 
5
pi 
 
Core
No
0057998: Different discount in sales order (POS2 and BackOffice)
When i did a sales order in POS2 i dont have any discount but when i did the same sale order with the same price list and different organization i have a discount in the line
Go to POS2 and make a sale order with Arturo and add a product for example "Avalanche transceiver"
See the order, the discount in the line is 0
Go to Back office and make a sale order with the same B.p and the same product "Avalanche transceiver" . I use the organization The White Valley Spain S.A but the same price list that i use in sale order POS2
See the sale order and the discount in the line is different that 0
Java : SL_Order_Product

// Discount
    BigDecimal discount = BigDecimal.ZERO;
    BigDecimal price = isTaxIncludedPriceList ? grossPriceList : netPriceList;
    BigDecimal priceToSubtract = isTaxIncludedPriceList ? grossBaseUnitPrice : priceStd;
    if (price.compareTo(BigDecimal.ZERO) != 0) {
      discount = price.subtract(priceToSubtract)
          .multiply(new BigDecimal("100"))
          .divide(price, 2, RoundingMode.HALF_UP);
    }
    info.addResult("inpdiscount", discount);
No tags attached.
png ArturoVentaPOS2.png (150,787) 2025-02-14 19:54
https://issues.openbravo.com/file_download.php?file_id=20917&type=bug
png
Issue History
2025-02-14 19:54sofidossantNew Issue
2025-02-14 19:54sofidossantAssigned To => Triage Omni OMS
2025-02-14 19:54sofidossantModules => Core
2025-02-14 19:54sofidossantTriggers an Emergency Pack => No
2025-02-14 19:54sofidossantFile Added: ArturoVentaPOS2.png
2025-02-14 19:57sofidossantNote Added: 0175667
2025-02-17 11:15jonaeNote Added: 0175760
2025-02-17 12:08jonaeAssigned ToTriage Omni OMS => Sathishkumar
2025-02-18 10:50hgbotNote Added: 0175801

Notes
(0175667)
sofidossant   
2025-02-14 19:57   
Video Sales order BACK OFFICE : https://drive.google.com/file/d/1tbswiTN37psHwxGOaHBsihDHg9sWTsV_/view?usp=sharing [^]


Video Sales Order POS2 :
https://drive.google.com/file/d/1St8HKh1EQ8JQOFTVMiP1nd17IEBE8tzI/view?usp=sharing [^]
(0175760)
jonae   
2025-02-17 11:15   
Jira - https://openbravo.atlassian.net/browse/RM-21266 [^]
(0175801)
hgbot   
2025-02-18 10:50   
Merge Request created: https://gitlab.com/orisha-group/bu-commerce/openbravo/product/pmods/org.openbravo.retail.discounts.coupons/-/merge_requests/85 [^]