Class InvoiceFromShipmentTest
- java.lang.Object
-
- org.openbravo.test.base.OBBaseTest
-
- org.openbravo.base.weld.test.WeldBaseTest
-
- org.openbravo.test.materialMgmt.invoiceFromShipment.InvoiceFromShipmentTest
-
public class InvoiceFromShipmentTest extends WeldBaseTest
Test class for Automatic Invoice From Goods Shipment test cases
-
-
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 InvoiceFromShipmentTest()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
initialize()
void
invoiceFromShipment_001()
Generating invoice from a Goods Shipment linked to a Sales Order with invoice term "After Delivery" Create a Sales Order with invoice term "After Delivery". Adds one line of product.void
invoiceFromShipment_002()
Generating invoice from a Goods Shipment linked to a Sales Order with invoice term "After Order Delivery" Create a Sales Order with invoice term "After Order Delivery". Adds two lines of product.void
invoiceFromShipment_003()
Generating invoice from Goods Shipment not linked to a Sales Order Create a Goods Shipment. Adds two lines of product. Complete the document invoicing if possible. Verify an invoice was created and processed containing the lines from Goods Shipment.void
invoiceFromShipment_004()
Generating invoice from Goods Shipment with lines linked to Sales Order with invoice term “After Delivery” and “After Order Delivery”.void
invoiceFromShipment_005()
Generating invoice from Goods Shipment with incomplete delivery Create a Sales Order win invoice term “After Delivery”. Adds one line of product.void
invoiceFromShipment_006()
Generating invoice from Goods Shipment with lines linked to Sales Order with invoice terms “Immediate” and “Do not invoice” Create a Sales Order with invoice term “Immediate” Add one line of product.void
invoiceFromShipment_007()
Generating invoice from Goods Shipment with lines partially invoiced from an order with invoice term “After Order Delivery” Create a Sales Order with invoice term “After Order Delivery”. Add two lines of product.void
invoiceFromShipment_008()
Verify no invoice is generated when processing a Goods Shipment after being previously processed Create a Sales Order with invoice term "After Delivery". Adds two lines of product.void
invoiceFromShipment_009()
Generating invoice from a Goods Shipment linked to a Sales Order with invoice term "After Delivery" and specific invoice date and price list Create a Sales Order with invoice term "After Delivery". Adds two lines of product.void
invoiceFromShipment_010()
Generating invoice from a Goods Shipment linked to a Sales Order with invoice term "After Delivery" and specific invoice date, price list and status draft Create a Sales Order with invoice term "After Delivery". Adds two lines of product.void
testOrderFullyInvoicedSoNoInvoiceIsCreatedFromShipment()
Generating invoice from a Goods Shipment linked to a Sales Order with invoice term "Immediate".void
testOrderPartiallyInvoicedSoInvoiceIsCreatedFromShipmentWhenNecessary()
Generating invoice from a Goods Shipment linked to a Sales Order with invoice term "Immediate".void
testShipMoreQtyThanOrdered_AfterDelivery()
void
testShipMoreQtyThanOrdered_AfterOrderDelivery()
void
testShipMoreQtyThanOrdered_Immediate()
-
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
-
initialize
public void initialize()
-
invoiceFromShipment_001
public void invoiceFromShipment_001()
Generating invoice from a Goods Shipment linked to a Sales Order with invoice term "After Delivery"- Create a Sales Order with invoice term "After Delivery".
- Adds one line of product. Book the order.
- Create a Goods Shipment.
- Adds the line from the previous order.
- Complete the document invoicing if possible.
- Verify an invoice was created and processed containing the line from Goods Shipment.
-
invoiceFromShipment_002
public void invoiceFromShipment_002()
Generating invoice from a Goods Shipment linked to a Sales Order with invoice term "After Order Delivery"- Create a Sales Order with invoice term "After Order Delivery".
- Adds two lines of product. Book the order.
- Create a Goods Shipment.
- Adds the first line from the previous order.
- Complete the document invoicing if possible.
- Verify no invoice was created.
- Create a Goods Shipment.
- Adds the second line from the previous order.
- Complete the document invoicing if possible.
- Verify an invoice was created and processed containing the two lines from Sales Order.
-
invoiceFromShipment_003
public void invoiceFromShipment_003()
Generating invoice from Goods Shipment not linked to a Sales Order- Create a Goods Shipment.
- Adds two lines of product.
- Complete the document invoicing if possible.
- Verify an invoice was created and processed containing the lines from Goods Shipment.
-
invoiceFromShipment_004
public void invoiceFromShipment_004()
Generating invoice from Goods Shipment with lines linked to Sales Order with invoice term “After Delivery” and “After Order Delivery”.- Create a Sales Order with invoice term “After Delivery”.
- Add one line of product. Book the order.
- Create a second Sales Order with invoice term “After Order Delivery”.
- Add two lines of product. Book the order.
- Create a Goods Shipment
- Add the line from the first order
- Add the first line from the second order
- Add a line manually
- Complete the document invoicing if possible
- Verify an invoice was created with the line from the first order and the one added manually.
- Create a second Goods Shipment
- Add the second line from the second order
- Complete the document invoicing if possible
- Verify an invoice was created containing both lines from the second order.
-
invoiceFromShipment_005
public void invoiceFromShipment_005()
Generating invoice from Goods Shipment with incomplete delivery- Create a Sales Order win invoice term “After Delivery”.
- Adds one line of product. Book the order.
- Create a second Sales Order with invoice term “After Order Delivery”.
- Adds one line of product. Book the order.
- Create a Goods Shipment.
- Adds the line from the first order. Set movement quantity less than the proposed value.
- Adds the line from the second order. Set movement quantity less than the proposed value.
- Complete the document invoicing if possible.
- Verify an invoice was generated containing just the line from the first order
-
invoiceFromShipment_006
public void invoiceFromShipment_006()
Generating invoice from Goods Shipment with lines linked to Sales Order with invoice terms “Immediate” and “Do not invoice”- Create a Sales Order with invoice term “Immediate”
- Add one line of product. Book the order.
- Create a Sales Order with invoice term “Do not invoice”.
- Add one line to the order. Book the order.
- Create a Goods Shipment with the lines from the two orders.
- Complete the document invoicing if possible.
- Verify an invoice was created containing a line linked to the shipment line from "Immediate" Sales Order
-
invoiceFromShipment_007
public void invoiceFromShipment_007()
Generating invoice from Goods Shipment with lines partially invoiced from an order with invoice term “After Order Delivery”- Create a Sales Order with invoice term “After Order Delivery”.
- Add two lines of product. Book the order.
- Create a Goods Shipment.
- Add the first order line.
- Complete the document without invoicing.
- Create a second Goods Shipment.
- Add the second order line.
- Complete the document without invoicing.
- Create a Sales Invoice.
- Add the line for the first Goods Shipment.
- Invoice a quantity less than the movement quantity.
- Complete the document.
- Select the second Goods Shipment in Goods Shipment window.
- Generate invoice from shipment using the button.
- Verify a new invoice was created containing:
- A line with the product of the first Goods Shipment, and invoiced quantity as the difference between the movement quantity and the invoiced quantity of the Sales Invoice.
- A line with the product of the second Goods Shipment with invoiced quantity as the movement quantity
-
invoiceFromShipment_008
public void invoiceFromShipment_008()
Verify no invoice is generated when processing a Goods Shipment after being previously processed- Create a Sales Order with invoice term "After Delivery".
- Adds two lines of product. Book the order.
- Create a Goods Shipment.
- Adds just one line from the previous order.
- Complete the document invoicing if possible.
- Verify an invoice was created and processed containing the line from Goods Shipment.
- Process the shipment a second time
- Verify no invoice was generated
-
invoiceFromShipment_009
public void invoiceFromShipment_009()
Generating invoice from a Goods Shipment linked to a Sales Order with invoice term "After Delivery" and specific invoice date and price list- Create a Sales Order with invoice term "After Delivery".
- Adds two lines of product. Book the order.
- Create a Goods Shipment.
- Adds just one line from the previous order.
- Complete the document invoicing if possible with invoice date tomorrow and price list "Sales"
- Verify an invoice was created and processed containing the line from Goods Shipment with invoice date tomorrow and price list "Sales".
-
invoiceFromShipment_010
public void invoiceFromShipment_010()
Generating invoice from a Goods Shipment linked to a Sales Order with invoice term "After Delivery" and specific invoice date, price list and status draft- Create a Sales Order with invoice term "After Delivery".
- Adds two lines of product. Book the order.
- Create a Goods Shipment.
- Adds just one line from the previous order.
- Complete the document invoicing if possible with invoice date tomorrow, price list "Sales", and not processing the invoice
- Verify an invoice was created and processed containing the line from Goods Shipment with invoice date tomorrow, price list "Sales" and document status draft
-
testOrderFullyInvoicedSoNoInvoiceIsCreatedFromShipment
public void testOrderFullyInvoicedSoNoInvoiceIsCreatedFromShipment()
Generating invoice from a Goods Shipment linked to a Sales Order with invoice term "Immediate". The order was fully invoiced before generating the shipment, so no invoice should be created.- Create a Sales Order with invoice term "Immediate".
- Adds one line of product. Book the order.
- Full invoice the sales order
- Create a Goods Shipment.
- Adds the line from the previous order.
- Complete the document invoicing if possible.
- Verify an invoice was NOT created.
-
testOrderPartiallyInvoicedSoInvoiceIsCreatedFromShipmentWhenNecessary
public void testOrderPartiallyInvoicedSoInvoiceIsCreatedFromShipmentWhenNecessary()
Generating invoice from a Goods Shipment linked to a Sales Order with invoice term "Immediate". The order was partially invoiced before generating the shipment, so the invoice will be created when shipping more quantity than the previously invoiced- Create a Sales Order with invoice term "Immediate".
- Adds one line of product. Book the order.
- Invoice the sales order minus 1 unit
- Create a Goods Shipment.
- Adds the line from the previous order. Ship sales order minus 2 units
- Complete the document invoicing if possible.
- Verify an invoice was NOT created.
- Create a Goods Shipment.
- Adds the line from the previous order. Ship the pending 2 units
- Complete the document invoicing if possible.
- Verify an invoice was created for 1 unit.
-
testShipMoreQtyThanOrdered_AfterDelivery
public void testShipMoreQtyThanOrdered_AfterDelivery()
-
testShipMoreQtyThanOrdered_Immediate
public void testShipMoreQtyThanOrdered_Immediate()
-
testShipMoreQtyThanOrdered_AfterOrderDelivery
public void testShipMoreQtyThanOrdered_AfterOrderDelivery()
-
-