2012-11-27 15:29:04 +07:00
|
|
|
To check error reported here:
|
|
|
|
[ adempiere-Bugs-2713724 ] Incorrect Accounting for Internal Use Inventory
|
|
|
|
https://sourceforge.net/tracker/?func=detail&atid=879332&aid=2713724&group_id=176962
|
|
|
|
|
|
|
|
!include -c TestLoginGardenAdmin
|
|
|
|
|
2013-06-29 05:38:38 +07:00
|
|
|
!|Set Variable |
|
|
|
|
|@InventoryLevelBefore@ |@SQL=select sum(qtyonhand) from m_storage where m_product_id=141 and m_locator_id=101|
|
|
|
|
|@ExpectedInventoryLevelAfter@|@SQL=SELECT @InventoryLevelBefore@-2 FROM dual |
|
|
|
|
|
2012-11-27 15:29:04 +07:00
|
|
|
Create the internal use document
|
|
|
|
|
2013-06-29 05:38:38 +07:00
|
|
|
!|Create Record |
|
|
|
|
|*Table* |M_Inventory |
|
2012-11-27 15:29:04 +07:00
|
|
|
|ad_org_id |11 |
|
2013-06-29 05:38:38 +07:00
|
|
|
|c_doctype_id |200000 |
|
2012-11-27 15:29:04 +07:00
|
|
|
|m_warehouse_id|103 |
|
2013-06-29 05:38:38 +07:00
|
|
|
|movementdate |2013-06-26 00:00:00.0|
|
|
|
|
|*Save* | |
|
2012-11-27 15:29:04 +07:00
|
|
|
|
|
|
|
Create internal use line
|
|
|
|
|
2013-06-29 05:38:38 +07:00
|
|
|
!|Create Record |
|
|
|
|
|*Table* |M_InventoryLine |
|
|
|
|
|M_Inventory_ID|@M_Inventory.M_Inventory_ID@|
|
|
|
|
|ad_org_id |@M_Inventory.AD_Org_ID@ |
|
|
|
|
|m_locator_id |101 |
|
|
|
|
|m_product_id |141 |
|
|
|
|
|c_charge_id |101 |
|
|
|
|
|qtyinternaluse|2 |
|
|
|
|
|*Save* | |
|
2012-11-27 15:29:04 +07:00
|
|
|
|
|
|
|
Complete the internal use
|
|
|
|
|
2013-06-29 05:38:38 +07:00
|
|
|
!|Run Process |
|
|
|
|
|*ProcessValue*|M_Inventory Process |
|
2012-11-27 15:29:04 +07:00
|
|
|
|*RecordID* |@M_Inventory.M_Inventory_ID@|
|
2013-06-29 05:38:38 +07:00
|
|
|
|*DocAction* |CO |
|
|
|
|
|*Run* | |
|
|
|
|
|
|
|
|
!|Assert Variable |
|
|
|
|
|@ExpectedInventoryLevelAfter@|@SQL=select sum(qtyonhand) from m_storage where m_product_id=141 and m_locator_id=101|
|
2012-11-27 15:29:04 +07:00
|
|
|
|
|
|
|
Post
|
|
|
|
|
2013-06-29 05:38:38 +07:00
|
|
|
!|Set DocAction |
|
|
|
|
|*Table* |M_Inventory |
|
|
|
|
|M_Inventory_ID|@M_Inventory.M_Inventory_ID@|
|
|
|
|
|docAction |PO |
|
|
|
|
|*Save* | |
|
2012-11-27 15:29:04 +07:00
|
|
|
|
|
|
|
Check the postings
|