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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0046394
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Modules] OMSmajoralways2021-04-28 13:372021-05-27 12:02
ReportervmromanosView Statuspublic 
Assigned ToTriage Omni OMS 
PrioritynormalResolutionopenFixed in Version
StatusnewFix in branchFixed in SCM revision
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Regression date
Regression introduced by commit
Regression level
Review Assigned To
Regression introduced in release
Summary

0046394: Order Confirmation and discounts wrongly applied

DescriptionThe order confirmation process is applying discounts where it shouldn't.

Imagine an order has been registered and paid for a product, with a grand total amount of $100. It is registered with status "Not Confirmed", and the store decides to reject it.

The Order Confirmation process is run and another store is selected. In this store the product has a discount. Right now the system does:

1. It cancels & replace the order in the first store for $100 [OK]
2. It generates a new order in the store, but it includes a discount so the grand total amount < $100 [WRONG: the price should be the same as the original sales order]
Steps To ReproduceIn WhiteValley client:
0. Login with Openbravo user, change to role "The White Valley Group Admin" and Set it as Default.

1. Go to Role window, search for "The White Valley Group Admin" and set "Is Web Service Enabled" yes

2. Go to Physical Inventory window and create a new record for "Orhi Store - Warehouse". In Lines, enter 100 units of product "GPS handheld" and process the document.

Go to Organization window, select Posets Stores and set "White Valley Spain S.A" as Cross Store Organization

3. Call the external order loader with the following json. This will create an order in Posets Store in status "Not Confirmed", and without any discount:

{
  "messageId": "MessageId005",
  "posTerminal": "PS-1",
  "channel": "External",
  "data": [
    {
      "currency": "EUR",
      "payment": 135,
      "step": "create",
      "grossAmount": 135,
      "netAmount": 111.57,
      "documentStatus": "NC",
      "businessPartner": "WVG/C0002",
      "completeTicket": true,
      "lines": [
        {
          "product": "WVG/L0014",
          "qty": 1,
          "grossAmount": 135,
          "netAmount": 111.57,
          "taxAmount": 23.43,
          "taxLines": {
            "Entregas IVA 21%": {
              "rate": 21,
              "netAmount": 111.57,
              "taxAmount": 23.43
            }
          }
        },
      ],
      "taxes": {
        "Entregas IVA 21%": {
          "rate": 21,
          "grossAmount": 135,
          "netAmount": 111.57,
          "taxAmount": 23.43
        }
      }
    }
  ]
}

4. Go to Sales Order window and press Close button in this sales order. Select Reject so the status is changed to "Automatic Evaluation".

5. Now press "Run Order Confirmation" and select this order. The process is completed successfully

6. Check that the order has been closed and another order has been created for Posets Store for -135€ [OK]

7. Check a new order in "Not confirmed" status has been created for Orhi Store [OK], but the grand total is 121.5€ because a promotion has been applied. This is wrong and the new order(s) grand total amount should be equal to the original order.
TagsDemoImprovementProgram
Attached Files

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
There are no notes attached to this issue.

- Issue History
Date Modified Username Field Change
2021-04-28 13:37 vmromanos New Issue
2021-04-28 13:37 vmromanos Assigned To => Triage Finance
2021-04-28 14:08 vmromanos Steps to Reproduce Updated View Revisions
2021-05-27 12:02 xplacesc Tag Attached: DemoImprovementProgram


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker