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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0051763
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Retail Modules] Web POSmajoralways2023-03-02 16:442023-03-29 09:49
ReporterBenjamin MolinView Statuspublic 
Assigned Toranjith_qualiantech_com 
PrioritynormalResolutionfixedFixed in VersionRR23Q2
StatusclosedFix in branchFixed in SCM revision
ProjectionnoneETAnoneTarget Version
OSLinux 64 bitDatabasePostgreSQLJava version7.x
OS VersionOpenbravo Appliance 14.04Database version9.3.xAnt version1.9.x
Product VersionpiSCM revision 
Review Assigned To
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0051763: Problem with SVAP adjust price when you put a modification price reason

DescriptionWhen discounting (price modification reason) 1 product with at least 2 products on the ticket, SVAP does not adjust the price for the modified product.
Steps To ReproduceThe addition is of these 2 back office preferences to enable SVAP:

Web POS Sales Loss Approval.
Configure it as follows:
Customer: White Valley Group
Organization: Vall Blanca Store
Property: Approval of lost sales on the Web POS
Value: Y

In the Visibility section
Visible in the client: The White Valley Group
Visible in the role: VallBlancaUser

Register


Web POS Enable sales at a loss
Configure it as follows:
Client: White Valley Group
Organization: Vall Blanca store
Property: Losses due to Web POS activation
Value: Y

In the Visibility section
Visible to the client: The White Valley Group
Visible to the Organization: Vall Blanca Store

Save

Window Price modification reason, activate or add 1 modification reason and check the box verifi price limit

Web POS:

add a product with a price limit set its price to 10 euros
add another product
press payment
press Adjust
the product with the modified price does not have its price to change.
Proposed SolutionWe found this error on Weldom and we found this solution.

Please let me know if I can offer this solution to Weldom.

The error is reproducible on the livebuild.

Code:
 OB.UTIL.LossSaleUtils.adjustPriceOnLossSaleLines = function(lossSaleLines) {
    var order = OB.MobileApp.model.receipt;
    lossSaleLines.forEach(function(lossSaleLine) {
      var line = order
          .get('lines')
          .models.find(l => l.get('id') === lossSaleLine.lineId),
        discountedPrice = line.get('discountedPrice'),
        productPriceLimit = line.get('product').get('priceLimit');
      if (line.get('promotions') && line.get('promotions').length) {
        line.get('promotions').forEach(function(p) {
          if (discountedPrice < productPriceLimit) {
            var promoAmtDiffToLimit = OB.Discounts.discountRules[p.discountType]
              .isPriceAdjustmentByProduct
              ? OB.DEC.sub(productPriceLimit, discountedPrice) * line.get('qty')
              : Math.min(
                  p.actualAmt,
                  OB.DEC.sub(productPriceLimit, discountedPrice) *
                    line.get('qty')
                );

            p.amt = p.fullAmt = p.actualAmt = p.displayedTotalAmount = OB.DEC.sub(
              p.actualAmt,
              promoAmtDiffToLimit
            );
            p.identifier =
              p.name +
              ' - ' +
              (p.manual
                ? OB.I18N.getLabel('OBPOS_LblSVAP')
                : OB.I18N.getLabel('OBPOS_LblLimitPrice'));
            discountedPrice += promoAmtDiffToLimit;
          }
        });
      } else {
        order.setPrices([line], productPriceLimit);
      }
      order.calculateGross();
    });
  };
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
related to defect 0051761pi closedranjith_qualiantech_com Problem with SVAP adjust price 
related to defect 0052111 closedranjith_qualiantech_com Problem with SVAP adjust price with price Modification & Discount 

-  Notes
(0147674)
hgbot (developer)
2023-03-20 05:58

Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/merge_requests/1106 [^]
(0148033)
hgbot (developer)
2023-03-28 16:56

Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/merge_requests/1106 [^]
(0148034)
hgbot (developer)
2023-03-28 16:56

Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal [^]
Changeset: f054115f7e68bf38cff9b6c53ac97431f3172a64
Author: Ranjith S R <ranjith@qualiantech.com>
Date: 28-03-2023 16:34:52
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/commit/f054115f7e68bf38cff9b6c53ac97431f3172a64 [^]

Fixed ISSUE-51763: Price should be updated when adjusting during sales loss
* Sales Loss should be validated for the discount with price limit is enabled
* When receipt line has price modification, then line price should be updated
  when adjusting during sales loss validation

---
M web/org.openbravo.retail.posterminal/js/components/modalPriceModification.js
M web/org.openbravo.retail.posterminal/js/model/order.js
M web/org.openbravo.retail.posterminal/js/pointofsale/view/toolbar-left.js
M web/org.openbravo.retail.posterminal/js/utils/lossSalesUtils.js
---

- Issue History
Date Modified Username Field Change
2023-03-02 16:44 Benjamin Molin New Issue
2023-03-02 16:44 Benjamin Molin Assigned To => Retail
2023-03-02 16:44 Benjamin Molin Triggers an Emergency Pack => No
2023-03-03 09:57 Benjamin Molin Steps to Reproduce Updated View Revisions
2023-03-08 10:00 egoitz Severity minor => major
2023-03-15 13:00 ngarcia Project POS2 => Retail Modules
2023-03-15 13:00 ngarcia Category POS => Web POS
2023-03-16 13:34 ranjith_qualiantech_com Assigned To Retail => ranjith_qualiantech_com
2023-03-16 13:34 ranjith_qualiantech_com Status new => scheduled
2023-03-20 05:58 hgbot Note Added: 0147674
2023-03-28 16:56 hgbot Note Added: 0148033
2023-03-28 16:56 hgbot Resolution open => fixed
2023-03-28 16:56 hgbot Status scheduled => closed
2023-03-28 16:56 hgbot Fixed in Version => RR23Q2
2023-03-28 16:56 hgbot Note Added: 0148034
2023-03-29 09:49 ranjith_qualiantech_com Relationship added related to 0051761
2023-04-12 17:47 ranjith_qualiantech_com Relationship added related to 0052111


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker