Package org.openbravo.test.costing
Class TestIssue37279
- java.lang.Object
-
- org.openbravo.test.base.OBBaseTest
-
- org.openbravo.base.weld.test.WeldBaseTest
-
- org.openbravo.test.costing.TestCostingBase
-
- org.openbravo.test.costing.TestIssue37279
-
public class TestIssue37279 extends TestCostingBase
-
-
Field Summary
-
Fields inherited from class org.openbravo.test.base.OBBaseTest
DOLLAR, DOLLAR_ID, EURO, EURO_ID, QA_TEST_ADMIN_USER_ID, QA_TEST_CLIENT_ID, QA_TEST_ORG_ID, TEST_BP_CATEGORY_ID, TEST_CLIENT_ID, TEST_LOCATION_ID, TEST_ORDER_ID, TEST_ORG_ID, TEST_ORG_TREE, TEST_PRODUCT_ID, TEST_ROLE_ID, TEST_US_ORG_ID, TEST_USER_ID, TEST_WAREHOUSE_ID, TEST2_USER_ID, userIds, watchFailures
-
-
Constructor Summary
Constructors Constructor Description TestIssue37279()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
testIssue37279_PriceDifferenceAdjustment_GoodsReceiptWithNoRelatedPurchaseOrder()
Test Price Difference Adjustment with a Goods Receipt not related to a Purchase Order Create a new product with purchase price list of 3.00 Create and book a Purchase Order for 1 unit of product Create and complete a Goods Receipt based on previous Purchase Order Run Costing Background Process Create and complete a new Goods Receipt for 10 units of product Run Costing Background Process Assert the product has 2 transactions Assert one transaction has transaction cost of 3.00 and the other has transaction cost of 30.00 Create a Purchase Invoice based on the first Goods Receipt created Change the price to 20.00 Complete the Invoice Run Price Difference Adjustment process Assert for one transaction total cost is 20.00 Assert the other transaction has total cost 30.00void
testIssue37279_PriceDifferenceAdjustment_InternalConsumptionWithNoRelatedPurchaseOrder()
Test Price Difference Adjustment with an Internal Consumption Create a new product with purchase price list of 3.00 Create and book a Purchase Order for 1 unit of product Create and complete a Goods Receipt based on previous Purchase Order Run Costing Background Process Create and complete an Internal Consumption for 10 units of product Run Costing Background Process Assert the product has 2 transactions Assert one transaction has transaction cost of 3.00 and the other has transaction cost of 30.00 Create a Purchase Invoice based on the first Goods Receipt created Change the price to 20.00 Complete the Invoice Run Price Difference Adjustment process Assert for one transaction total cost is 20.00 Assert the other transaction has total cost 200.00void
testIssue37279_PriceDifferenceAdjustment_InventoryIncreaseWithNoRelatedPurchaseOrder()
Test Price Difference Adjustment with a NORMAL Physical Inventory Create a new product with purchase price list of 3.00 Create and book a Purchase Order for 1 unit of product Create and complete a Goods Receipt based on previous Purchase Order Run Costing Background Process Create and complete a NORMAL Physical Inventory to increase stock in 10 units of product Run Costing Background Process Assert the product has 2 transactions Assert one transaction has transaction cost of 3.00 and the other has transaction cost of 30.00 Create a Purchase Invoice based on the first Goods Receipt created Change the price to 20.00 Complete the Invoice Run Price Difference Adjustment process Assert for one transaction total cost is 20.00 Assert the other transaction has total cost 200.00void
testIssue37279_PriceDifferenceAdjustment_InventoryOpeningWithNoRelatedPurchaseOrder()
Test Price Difference Adjustment with an OPENING Physical Inventory Create a new product with purchase price list of 3.00 Create and book a Purchase Order for 1 unit of product Create and complete a Goods Receipt based on previous Purchase Order Run Costing Background Process Create and complete an OPENING Physical Inventory to increase stock in 10 units of product Run Costing Background Process Assert the product has 2 transactions Assert one transaction has transaction cost of 3.00 and the other has transaction cost of 30.00 Create a Purchase Invoice based on the first Goods Receipt created Change the price to 20.00 Complete the Invoice Run Price Difference Adjustment process Assert for one transaction total cost is 20.00 Assert the other transaction has total cost 200.00void
testIssue37279_PriceDifferenceAdjustment_ShipmentReturnWithNoRelatedPurchaseOrder()
Test Price Difference Adjustment with a Return to Vendor Shipment not related to a Purchase Order Create a new product with purchase price list of 3.00 Create and book a Purchase Order for 1 unit of product Create and complete a Goods Receipt based on previous Purchase Order Run Costing Background Process Create and complete a Return to Vendor Shipment for 10 units of product Run Costing Background Process Assert the product has 2 transactions Assert one transaction has transaction cost of 3.00 and the other has transaction cost of 30.00 Create a Purchase Invoice based on the first Goods Receipt created Change the price to 20.00 Complete the Invoice Run Price Difference Adjustment process Assert for one transaction total cost is 20.00 Assert the other transaction has total cost 200.00void
testIssue37279_PriceDifferenceAdjustment_ShippingNegativeWithNoRelatedPurchaseOrder()
Test Price Difference Adjustment with a Goods Shipment with negative values not related to a Purchase Order Create a new product with purchase price list of 3.00 Create and book a Purchase Order for 1 unit of product Create and complete a Goods Receipt based on previous Purchase Order Run Costing Background Process Create and complete a Goods Shipment for -10 units of product Run Costing Background Process Assert the product has 2 transactions Assert one transaction has transaction cost of 3.00 and the other has transaction cost of 30.00 Create a Purchase Invoice based on the first Goods Receipt created Change the price to 20.00 Complete the Invoice Run Price Difference Adjustment process Assert for one transaction total cost is 20.00 Assert the other transaction has total cost 200.00-
Methods inherited from class org.openbravo.test.costing.TestCostingBase
setFinalConfiguration, setInitialConfiguration
-
Methods inherited from class org.openbravo.base.weld.test.WeldBaseTest
createTestArchive, getWeldComponent, resetOBInterceptors, setUp
-
Methods inherited from class org.openbravo.test.base.OBBaseTest
addReadWriteAccess, classSetUp, commitTransaction, count, getConnectionProvider, getOneInstance, getRandomUser, getTestLogAppender, initializeDalLayer, initializeDisabledTestCases, initializeTestLogAppender, isErrorOccured, reportException, rollback, setLogStackTraces, setQAAdminContext, setSystemAdministratorContext, setTestAdminContext, setTestLogAppenderLevel, setTestUserContext, setUserContext, shouldMockServletContext, staticInitializeDalLayer, testDone
-
-
-
-
Method Detail
-
testIssue37279_PriceDifferenceAdjustment_GoodsReceiptWithNoRelatedPurchaseOrder
public void testIssue37279_PriceDifferenceAdjustment_GoodsReceiptWithNoRelatedPurchaseOrder() throws Exception
Test Price Difference Adjustment with a Goods Receipt not related to a Purchase Order- Create a new product with purchase price list of 3.00
- Create and book a Purchase Order for 1 unit of product
- Create and complete a Goods Receipt based on previous Purchase Order
- Run Costing Background Process
- Create and complete a new Goods Receipt for 10 units of product
- Run Costing Background Process
- Assert the product has 2 transactions
- Assert one transaction has transaction cost of 3.00 and the other has transaction cost of 30.00
- Create a Purchase Invoice based on the first Goods Receipt created
- Change the price to 20.00
- Complete the Invoice
- Run Price Difference Adjustment process
- Assert for one transaction total cost is 20.00
- Assert the other transaction has total cost 30.00
- Throws:
Exception
-
testIssue37279_PriceDifferenceAdjustment_ShippingNegativeWithNoRelatedPurchaseOrder
public void testIssue37279_PriceDifferenceAdjustment_ShippingNegativeWithNoRelatedPurchaseOrder() throws Exception
Test Price Difference Adjustment with a Goods Shipment with negative values not related to a Purchase Order- Create a new product with purchase price list of 3.00
- Create and book a Purchase Order for 1 unit of product
- Create and complete a Goods Receipt based on previous Purchase Order
- Run Costing Background Process
- Create and complete a Goods Shipment for -10 units of product
- Run Costing Background Process
- Assert the product has 2 transactions
- Assert one transaction has transaction cost of 3.00 and the other has transaction cost of 30.00
- Create a Purchase Invoice based on the first Goods Receipt created
- Change the price to 20.00
- Complete the Invoice
- Run Price Difference Adjustment process
- Assert for one transaction total cost is 20.00
- Assert the other transaction has total cost 200.00
- Throws:
Exception
-
testIssue37279_PriceDifferenceAdjustment_ShipmentReturnWithNoRelatedPurchaseOrder
public void testIssue37279_PriceDifferenceAdjustment_ShipmentReturnWithNoRelatedPurchaseOrder() throws Exception
Test Price Difference Adjustment with a Return to Vendor Shipment not related to a Purchase Order- Create a new product with purchase price list of 3.00
- Create and book a Purchase Order for 1 unit of product
- Create and complete a Goods Receipt based on previous Purchase Order
- Run Costing Background Process
- Create and complete a Return to Vendor Shipment for 10 units of product
- Run Costing Background Process
- Assert the product has 2 transactions
- Assert one transaction has transaction cost of 3.00 and the other has transaction cost of 30.00
- Create a Purchase Invoice based on the first Goods Receipt created
- Change the price to 20.00
- Complete the Invoice
- Run Price Difference Adjustment process
- Assert for one transaction total cost is 20.00
- Assert the other transaction has total cost 200.00
- Throws:
Exception
-
testIssue37279_PriceDifferenceAdjustment_InternalConsumptionWithNoRelatedPurchaseOrder
public void testIssue37279_PriceDifferenceAdjustment_InternalConsumptionWithNoRelatedPurchaseOrder() throws Exception
Test Price Difference Adjustment with an Internal Consumption- Create a new product with purchase price list of 3.00
- Create and book a Purchase Order for 1 unit of product
- Create and complete a Goods Receipt based on previous Purchase Order
- Run Costing Background Process
- Create and complete an Internal Consumption for 10 units of product
- Run Costing Background Process
- Assert the product has 2 transactions
- Assert one transaction has transaction cost of 3.00 and the other has transaction cost of 30.00
- Create a Purchase Invoice based on the first Goods Receipt created
- Change the price to 20.00
- Complete the Invoice
- Run Price Difference Adjustment process
- Assert for one transaction total cost is 20.00
- Assert the other transaction has total cost 200.00
- Throws:
Exception
-
testIssue37279_PriceDifferenceAdjustment_InventoryIncreaseWithNoRelatedPurchaseOrder
public void testIssue37279_PriceDifferenceAdjustment_InventoryIncreaseWithNoRelatedPurchaseOrder() throws Exception
Test Price Difference Adjustment with a NORMAL Physical Inventory- Create a new product with purchase price list of 3.00
- Create and book a Purchase Order for 1 unit of product
- Create and complete a Goods Receipt based on previous Purchase Order
- Run Costing Background Process
- Create and complete a NORMAL Physical Inventory to increase stock in 10 units of product
- Run Costing Background Process
- Assert the product has 2 transactions
- Assert one transaction has transaction cost of 3.00 and the other has transaction cost of 30.00
- Create a Purchase Invoice based on the first Goods Receipt created
- Change the price to 20.00
- Complete the Invoice
- Run Price Difference Adjustment process
- Assert for one transaction total cost is 20.00
- Assert the other transaction has total cost 200.00
- Throws:
Exception
-
testIssue37279_PriceDifferenceAdjustment_InventoryOpeningWithNoRelatedPurchaseOrder
public void testIssue37279_PriceDifferenceAdjustment_InventoryOpeningWithNoRelatedPurchaseOrder() throws Exception
Test Price Difference Adjustment with an OPENING Physical Inventory- Create a new product with purchase price list of 3.00
- Create and book a Purchase Order for 1 unit of product
- Create and complete a Goods Receipt based on previous Purchase Order
- Run Costing Background Process
- Create and complete an OPENING Physical Inventory to increase stock in 10 units of product
- Run Costing Background Process
- Assert the product has 2 transactions
- Assert one transaction has transaction cost of 3.00 and the other has transaction cost of 30.00
- Create a Purchase Invoice based on the first Goods Receipt created
- Change the price to 20.00
- Complete the Invoice
- Run Price Difference Adjustment process
- Assert for one transaction total cost is 20.00
- Assert the other transaction has total cost 200.00
- Throws:
Exception
-
-