Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
ID | ||||||||
0051763 | ||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||
defect | [Retail Modules] Web POS | major | always | 2023-03-02 16:44 | 2023-03-29 09:49 | |||
Reporter | Benjamin Molin | View Status | public | |||||
Assigned To | ranjith_qualiantech_com | |||||||
Priority | normal | Resolution | fixed | Fixed in Version | RR23Q2 | |||
Status | closed | Fix in branch | Fixed in SCM revision | |||||
Projection | none | ETA | none | Target Version | ||||
OS | Linux 64 bit | Database | PostgreSQL | Java version | 7.x | |||
OS Version | Openbravo Appliance 14.04 | Database version | 9.3.x | Ant version | 1.9.x | |||
Product Version | pi | SCM revision | ||||||
Merge Request Status | approved | |||||||
Review Assigned To | ||||||||
OBNetwork customer | Gold | |||||||
Support ticket | 57514 | |||||||
Regression level | ||||||||
Regression date | ||||||||
Regression introduced in release | ||||||||
Regression introduced by commit | ||||||||
Triggers an Emergency Pack | No | |||||||
Summary | 0051763: Problem with SVAP adjust price when you put a modification price reason | |||||||
Description | When 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 Reproduce | The 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 Solution | We 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(); }); }; | |||||||
Tags | No tags attached. | |||||||
Attached Files | ||||||||
![]() |
|||||||||||||||
|
![]() |
|
(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 --- |
![]() |
|||
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 | OBNetwork customer | => Gold |
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-14 15:00 | ngarcia | Support ticket | => 57514 |
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 | Merge Request Status | => open |
2023-03-20 05:58 | hgbot | Note Added: 0147674 | |
2023-03-28 16:56 | hgbot | Merge Request Status | open => approved |
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 |