Testcase to check if sales orders are correctly created as counter documents for purchase orders with different packaging setting.
Set Up
See [Error when sales order is automatically created as counter doc from a purchase order with packagings] (Testcase_FRESH-351) for Set Up of Orgs, Counter Docs and Products with CU-TU Allocation etc.
Open Product, search for P0002, and create another CU-TU Allocation (M_HU_PI_Item_Product) in the 2nd tab:
In Product, search for TU C, check tab Allocated Product
In pricelist CP, make sure you have
Test
Log in with Org II, a role != Admin (e.g. Handel)
Open Bestellung, select G000I as vendor
In Product, select P0002
Set a qty for TU, enter, and complete the Bestellung
Log in with Org I, e.g. as Admin
Check window Auftrag, search for newly created ones
Change the Set Up, and create a product mapping for the TU B you used in the first Bestellung with TU D, not with TU A
Make sure that TU D is not used for the CU-TU Allocation for P0001, only TU A is used there
Create and complete another Bestellung for G000I, with P0002, using TU B (in Org II)
Check the Auftrag for G00II (in Org I)