Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0014352Openbravo ERP03. Procurement managementpublic2010-08-27 13:002010-10-19 19:28
networkb 
adrianromero 
urgentmajoralways
closedfixed 
5
2.50MP12 
2.50MP22 
Core
No
0014352: It is not possible to create a Good Receipt with more quantity than Purchase Order
Actually, It is not possible to create a Good Receipt with more quantity than Purchase Order.

This behavior is correct in SALES flow as you ARE NOT able to create a Sales Invoice with more quantity than Sales Order. (as according with https://issues.openbravo.com/view.php?id=11977 [^])

But in PURCHASE flow you ARE able to create a Purchase Invoice with more quantity than Purchase Order (which is correct behavior), so you also have to be able to create Good Receipt with more quantity than Purchase Order.
Go to Sales Management > Transactions > Sales Order.
Create a new one. Enter a BP and select as Document type "Standard Order". Save it.
Go to Line tab.
Create a new one. Select one product and enter 10 units.
Go back to Header and complete it.
Go to Sales Management > Transactions > Good Shipment.
Create a new one, but select same BP as Sales order. Save it.
Press "Create lines From". Select the previous Sales order, and select an Storage bin (IE ML1).
Select the line and press OK.
Go to Line tab, and modify its amount. Enter 12.

You will get the error.

Verify that if you create a Purchase Invoice by "Create Lines From" the purchase order and you go to invoice line and set Quantity=12 you are able to process the invoice.
Add AND ISSOTRX='Y' clause in fix of https://issues.openbravo.com/view.php?id=11977 [^]
Regression
related to defect 00119772.50MP12 closed rafaroda It is possible to create a Good Shipment with more quantity thant Sales Order 
Issue History
2010-08-27 13:00networkbNew Issue
2010-08-27 13:00networkbAssigned To => adrianromero
2010-08-30 09:17adrianromeroNote Added: 0030434
2010-09-09 11:53adrianromeroStatusnew => scheduled
2010-09-09 11:53adrianromerofix_in_branch => pi
2010-09-09 19:19hgbotCheckin
2010-09-09 19:19hgbotNote Added: 0030911
2010-09-09 19:19hgbotStatusscheduled => resolved
2010-09-09 19:19hgbotResolutionopen => fixed
2010-09-09 19:19hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/4ed5b7e9b0dfbc4ee312949c40f8001ed1130c96 [^]
2010-09-09 19:26adrianromeroNote Added: 0030912
2010-09-10 12:19hudsonbotCheckin
2010-09-10 12:19hudsonbotNote Added: 0030929
2010-09-13 08:13sureshbabuNote Added: 0030963
2010-09-13 08:13sureshbabuStatusresolved => closed
2010-09-13 12:38anonymoussf_bug_id0 => 3065188
2010-09-28 17:24psarobeTag Attached: Regression
2010-09-28 17:25psarobeversion2.50MP20 => 2.50MP12
2010-09-28 17:25psarobefix_in_branchpi =>
2010-10-19 19:28psarobeRelationship addedrelated to 0011977

Notes
(0030434)
adrianromero   
2010-08-30 09:17   
The condition in the Proposed Solution "AND ISSOTRX='Y'" must be added to the condition that checks that it is not possible to create a Good Receipt with more quantity than purchase order. This condition is checked in the following line of code:

https://code.openbravo.com/erp/devel/pi/file/tip/src-db/database/model/triggers/M_INOUTLINE_TRG.xml#l72 [^]
(0030911)
hgbot   
2010-09-09 19:19   
Repository: erp/devel/pi
Changeset: 4ed5b7e9b0dfbc4ee312949c40f8001ed1130c96
Author: Adrián Romero <adrianromero <at> openbravo.com>
Date: Thu Sep 09 19:18:58 2010 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/4ed5b7e9b0dfbc4ee312949c40f8001ed1130c96 [^]

Fixes issue 0014352: It is not possible to create a Good Receipt with more quantity than Purchase Order
It has been added a check that verifies shipment quantities against ordered quantities only in sales orders.

---
M src-db/database/model/triggers/M_INOUTLINE_TRG.xml
---
(0030912)
adrianromero   
2010-09-09 19:26   
* Testing the issue

Verify that cannot save Goods shipment lines with more quantity that the ordered quantity but it can be saved Goods receipt lines with more quantity that the ordered quantity.

* Other areas affected

It has only been modified the trigger executed when saving shipment lines. No other areas affected.

It has been tested too that goods receipt and shipment lines can be properly inserted, updated and deleted.
(0030929)
hudsonbot   
2010-09-10 12:19   
A changeset related to this issue has been promoted to main after passing a series of tests and an OBX has been generated:

Changeset: http://code.openbravo.com/erp/devel/main/rev/4ed5b7e9b0df [^]
Merge Changeset: http://code.openbravo.com/erp/devel/main/rev/f12e04486b2c [^]
Tests: http://builds.openbravo.com/view/int/ [^]
OBX: http://builds.openbravo.com/erp/core/obx/OpenbravoERP-2.50CI.18363.obx [^]
(0030963)
sureshbabu   
2010-09-13 08:13   
verified now system not allowing the user to create Goods shipment lines with more quantity that the ordered quantity but allows to create Goods receipt lines with more quantity that the ordered quantity.