Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0045650Openbravo ERP07. Sales managementpublic2020-12-24 14:142021-01-14 17:57
ngarcia 
dmiguelez 
urgentmajoralways
closedfixed 
5
 
PR21Q2 
Core
No
0045650: Wrong qtyreserved in m_storage_pending table when a sales order is processed and voided
Wrong qtyreserved in m_storage_pending table when a sales order is processed and voided
As group admin role:
   Create a new product
   Add a sales price list to it
   Create a new sales order
   Add the product on its lines
   Process it (not book it) and check the status changes to Under Way
   Check the qtyreserved column in the m_storage_pending table for that product changes to the quantity ordered
   Void it
   Check the qtyreserved column in the m_storage_pending table for that product changes to the quantity ordered but in negative. This is wrong
No tags attached.
Issue History
2020-12-24 14:14ngarciaNew Issue
2020-12-24 14:14ngarciaAssigned To => Triage Finance
2020-12-24 14:14ngarciaModules => Core
2020-12-24 14:14ngarciaResolution time => 1610578800
2020-12-24 14:14ngarciaTriggers an Emergency Pack => No
2020-12-24 14:15ngarciaIssue Monitored: networkb
2021-01-12 13:38dmiguelezNote Added: 0125389
2021-01-12 13:39dmiguelezNote Added: 0125390
2021-01-13 09:24hgbotNote Added: 0125405
2021-01-14 09:58vmromanosStatusnew => scheduled
2021-01-14 09:58vmromanosAssigned ToTriage Finance => dmiguelez
2021-01-14 17:57hgbotResolutionopen => fixed
2021-01-14 17:57hgbotStatusscheduled => closed
2021-01-14 17:57hgbotFixed in Version => PR21Q2
2021-01-14 17:57hgbotNote Added: 0125470
2021-01-14 17:57hgbotNote Added: 0125471

Notes
(0125389)
dmiguelez   
2021-01-12 13:38   
Test Plan:

Log in as F&B Admin
Go to Product Window and create a new record with:
  - Organization: F&B US
  - Name: Test
  - SearchKey: Test
Move to Price Tab and create a new record with:
  - Price List version: General Sales
  - Unit Price: 10
  - List Price: 10

Go to Sales Order window and create a new record with:
  - Organization: F&B US
  - Business Partner: Healthy Food Supermarkets
Move to lines and create a new record with:
  - Product: Test
  - Ordered Quantity: 1
Click on Book button, select the 'Process' option and then click Ok
Check the status of the Document is 'Under Way'

In the database check that qtyreserved column of the m_storage_pending is 1.
Use this query (to be adapted):
select qtyreserved
from m_storage_pending
where m_product_id = 'PRODUCT_ID';

In the application, with the same Sales Order, click on Book button and select 'Void' as the option and click ok.

In the database check that qtyreserved column of the m_storage_pending is 0.
Use the previous query
(0125390)
dmiguelez   
2021-01-12 13:39   
Test Plan II:

Check no regression has been introduced for the following issues:
https://issues.openbravo.com/view.php?id=13926 [^]
https://issues.openbravo.com/view.php?id=20730 [^]
(0125405)
hgbot   
2021-01-13 09:24   
Merge Request created: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/264 [^]
(0125470)
hgbot   
2021-01-14 17:57   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/openbravo [^]
Changeset: 721c1c605569d778a922861c6559e30f29b52e39
Author: David Miguélez <david.miguelez@openbravo.com>
Date: 2021-01-14T16:57:18+00:00
URL: https://gitlab.com/openbravo/product/openbravo/-/commit/721c1c605569d778a922861c6559e30f29b52e39 [^]

Fixes ISSUE-45650. Call M_UPDATE_STORAGE_PENDING in C_ORDER_POST only
when the DocStatus is not 'IP'
The DocStatus 'IP' case is managed in the C_ORDERLINE2_TRG Trigger and
the logic was duplicated

---
M src-db/database/model/functions/C_ORDER_POST1.xml
---
(0125471)
hgbot   
2021-01-14 17:57   
Merge request merged: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/264 [^]