39df8a09_Specifications___OpenbravoWiki__Requirement
[Num] 3.3 [Importance] Must have [In scope?] Planned [Requirement] 
Whenever an order is completed, as part of the completion process, the system should validate whether the order is an inter-company order and, if so, create the corresponding order when appropriate. The logic of the process is as follows: If the document type has IS_INTERCOMPANY set to 'Y' AND ORIGINAL_ORDER_ID is null AND business partner on the order is mapped to an organization AND the organization of the order and the organization of the business partner are a valid source and target AND there is a specific matching document type, THEN create the corresponding order in the target organization. If the document type has IS_INTERCOMPANY set to 'Y' AND ORIGINAL_ORDER_ID is null AND business partner on the order is mapped to an organization AND the organization of the order and the organization of the business partner are NOT a valid source and target, THEN generate an error because inter-company is not allowed. In all other cases, proceed as usual. When creating the corresponding order, use the following characteristics: Organization: the organization mapped to the business partner. Document type: use the matching document type for the sales invoice in the organization mapped to the business partner. Document No: next value in the document sequence Business Partner: the organization of the sales invoice Partner Address, User/Contact, Price List, Form of Payment, Payment Terms: derived from the business partner. Header level warehouse: any warehouse associated to the organization Line level warehouse: the default warehouse for the product; if that is not specified, any warehouse associated to the organization. All other attributes of both header and lines created as mirror of the original document ORIGINAL_ORDER_ID is set to the ID of originating invoice
Intercompanyinvoicing/Functional Specifications - OpenbravoWiki
Requirement