Openbravo Issue Tracking System - Modules
View Issue Details
0036846ModulesIntercompany Documentspublic2017-09-13 12:522017-09-14 12:58
ngarcia 
AtulOpenbravo 
urgentmajoralways
closedfixed 
5
 
 
aferraz
0036846: Cannot complete an inter-company invoice if the target organization or one of their parents are not Legal With Accounting
Cannot complete an inter-company invoice if the target organization or one of their parents are not Legal With Accounting.

In INTERCO_CREATE_INVOICE the source organization is being used for checking the period is open instead of the target organization:

          SELECT AD_GET_DOC_LE_BU('C_INVOICE', p_record_ID, 'C_INVOICE_ID', 'LE')
          INTO v_org_bule_id
          FROM DUAL;
As group admin role:
   Use the Initial Org Setup process to create a Legal Without Accounting organization with F&B International Group as parent organization, set created organization as ready.
  
   Create the required master data in F&B International Group organization:
      Price Lists (one for sales and one for purchase)
      Business partners and locations (one customer and one vendor). Assign previously created price list. Set default Payment Terms
      Tax Category and Tax Rate
      Product. Add price to it in both price lists
      Document Type: Inter-company Sales Invoice and Inter-company Purchase Invoice

   Configure Inter-company:
      Add the following Inter-company relation to the Inter-company Sales Invoice document type:
         Source Organization: F&B España, S.A
         Target Organization: the previously created one
         Target Document Type: Inter-company Purchase Invoice

      Assign previously created customer to previously created organization
      Assign previously created vendor to F&B España, S.A

   Create a Sales Invoice for F&B España S.A. and previously created customer
   Select Inter-company Sales Invoice document type
   Add previously created product
   Try to complete it and check the following error is shown:
      Error:
      The Period does not exist or it is not opened
Check if changing the query with the following one works:

          SELECT ad_get_org_le_bu(v_matchingOrg, 'LE')
          INTO v_org_bule_id
          FROM DUAL;
No tags attached.
related to defect 0036856 closed AtulOpenbravo Openbravo ERP No data found error when completing a invoice in organization without legal accounting in oracle instance 
Issue History
2017-09-13 12:52ngarciaNew Issue
2017-09-13 12:52ngarciaAssigned To => Triage Finance
2017-09-13 12:52ngarciaResolution time => 1507068000
2017-09-13 12:52ngarciaIssue Monitored: networkb
2017-09-13 12:56ngarciaSummaryCannot complete an inter-company invoice if the target organization is not Legal With Accounting => Cannot complete an inter-company invoice if the target organization or one of their parents are not Legal With Accounting
2017-09-13 12:56ngarciaDescription Updatedbug_revision_view_page.php?rev_id=15888#r15888
2017-09-13 14:20aferrazAssigned ToTriage Finance => AtulOpenbravo
2017-09-13 20:56AtulOpenbravoStatusnew => scheduled
2017-09-13 21:16AtulOpenbravoSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=15896#r15896
2017-09-14 11:02AtulOpenbravoNote Added: 0099031
2017-09-14 11:05AtulOpenbravoNote Edited: 0099031bug_revision_view_page.php?bugnote_id=0099031#r15898
2017-09-14 12:39aferrazRelationship addedrelated to 0036856
2017-09-14 12:57hgbotCheckin
2017-09-14 12:57hgbotNote Added: 0099036
2017-09-14 12:57hgbotStatusscheduled => resolved
2017-09-14 12:57hgbotResolutionopen => fixed
2017-09-14 12:57hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.interco/rev/afb9363d53b32d0b24aa9adabc2d6cdce84803e5 [^]
2017-09-14 12:57hgbotCheckin
2017-09-14 12:57hgbotNote Added: 0099037
2017-09-14 12:58aferrazReview Assigned To => aferraz
2017-09-14 12:58aferrazNote Added: 0099038
2017-09-14 12:58aferrazStatusresolved => closed

Notes
(0099031)
AtulOpenbravo   
2017-09-14 11:02   
(edited on: 2017-09-14 11:05)
Test Plan

- Login as F&B International Group Admin role.
- Use the Initial Org Setup process to create a Legal Without Accounting organization with F&B International Group as parent organization.
- Navigate to created organization and set it as ready.
- Create the required master data in F&B International Group organization:
  - Price Lists (one for sales and one for purchase)
  - Business partners and locations (one customer and one vendor). Assign
    previously created price list. Set default Payment Terms
  - Tax Category and Tax Rate
  - Product. Add price to it in both price lists
  - Document Type: Inter-company Sales Invoice and Inter-company Purchase
    Invoice
- Configure Inter-company:
    Add the following Inter-company relation to the Inter-company Sales Invoice
    document type:
    - Source Organization: F&B España, S.A
    - Target Organization: the previously created one
    - Target Document Type: Inter-company Purchase Invoice
- Assign previously created customer to previously created organization
- Assign previously created vendor to F&B España, S.A
- Create a Sales Invoice for F&B España S.A. and previously created customer.
- Select Inter-company Sales Invoice document type
- Add previously created product
- Try to complete it.
- Realize that document is processed successfully and inter company document is created.

(0099036)
hgbot   
2017-09-14 12:57   
Repository: erp/pmods/org.openbravo.interco
Changeset: afb9363d53b32d0b24aa9adabc2d6cdce84803e5
Author: Atul Gaware <atul.gaware <at> openbravo.com>
Date: Thu Sep 14 14:14:06 2017 +0530
URL: http://code.openbravo.com/erp/pmods/org.openbravo.interco/rev/afb9363d53b32d0b24aa9adabc2d6cdce84803e5 [^]

Fixes issue 36846: Cannot complete an inter-company invoice

Cannot complete an inter-company invoice if the target organization
or one of their parents are not Legal With Accounting

Use AD_GET_ORG_LE_BU to check target organization as input p_record_id for
AD_GET_DOC_LE_BU is the record being used to create intercompany
document hence it checks for source organization

---
M src-db/database/model/functions/INTERCO_CREATE_INVOICE.xml
---
(0099037)
hgbot   
2017-09-14 12:57   
Repository: erp/pmods/org.openbravo.interco
Changeset: 9568b5b0eb19a477acd41498f59b3b2ed21856bc
Author: Alvaro Ferraz <alvaro.ferraz <at> openbravo.com>
Date: Thu Sep 14 12:42:16 2017 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.interco/rev/9568b5b0eb19a477acd41498f59b3b2ed21856bc [^]

Related to issue 36846: Update module version

---
M src-db/database/sourcedata/AD_MODULE.xml
---
(0099038)
aferraz   
2017-09-14 12:58   
Code review + Testing OK