Uploaded image for project: 'OFBiz'
  1. OFBiz
  2. OFBIZ-5938

GlAccountOrganizations manually added using accounting forms do not appear on trial report because fromDate gets set to NULL

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: Release Branch 14.12, Trunk
    • Fix Version/s: 14.12.01, 15.12.01, 16.11.04
    • Component/s: accounting
    • Labels:
      None
    • Sprint:
      Bug Crush Event - 21/2/2015

      Description

      To reproduce:

      1. Manually assign a glAccount to an organization (Accounting->Global GL Settings->Chart Of Accounts->Assign Gl Account or Accounting->Organization GL Settings->Setup->Chart of Accounts)
      2. Perform operations that create transactions for the organizations glAccount
      3. Run the Accounting->Organization GL Settings->Accounting->Reports->Trial Balance

      Notice that the glAccountId assigned in step 1 is not listed in the results. This is due to TrialBalance.groovy applying a fromDate filter to GlAccountOrganizationAndClass which is not set in step 1. Updating glAccountOrganization fromDate to something within the trial balance range resolves the problem.

      1. OFBIZ-5938.patch
        0.9 kB
        akashjain2010

        Issue Links

          Activity

          Hide
          akash.jain Akash Jain added a comment - - edited

          I am able to recreate issue with provided steps. I have fixed this issue and attaching patch for the same.

          Show
          akash.jain Akash Jain added a comment - - edited I am able to recreate issue with provided steps. I have fixed this issue and attaching patch for the same.
          Hide
          akash.jain Akash Jain added a comment - - edited

          This bug will be fixed in trunk and 14.12.

          Show
          akash.jain Akash Jain added a comment - - edited This bug will be fixed in trunk and 14.12.
          Hide
          pandeypranay Pranay Pandey added a comment -

          Committed to trunk at revision 1739448 and to Release14.12 at revision 1739451.

          Thanks Christian Carlow for reporting the issue and Thanks [~akash_jain] for testing the patch and providing confirmation.

          Show
          pandeypranay Pranay Pandey added a comment - Committed to trunk at revision 1739448 and to Release14.12 at revision 1739451. Thanks Christian Carlow for reporting the issue and Thanks [~akash_jain] for testing the patch and providing confirmation.
          Hide
          jacques.le.roux Jacques Le Roux added a comment -

          Backported in R15.12 at r1739567

          Show
          jacques.le.roux Jacques Le Roux added a comment - Backported in R15.12 at r1739567
          Hide
          rmallah Rajesh Kumar Mallah added a comment - - edited

          I faced this issue with 16.11 also and had to manually update using SQL
          update gl_account_organization set from_date='2001-01-01 00:00:00+05:30' where organization_party_id='10000';

          steps summary:
          1) create a new organisation
          2) assign gl_accounts to it
          3) carry out some transations
          4) try checking trial balance.

          it shall display cr:0 dr:0

          after updating the 'from_date' it worked as expected.

          regds
          mallah.

          Show
          rmallah Rajesh Kumar Mallah added a comment - - edited I faced this issue with 16.11 also and had to manually update using SQL update gl_account_organization set from_date='2001-01-01 00:00:00+05:30' where organization_party_id='10000'; steps summary: 1) create a new organisation 2) assign gl_accounts to it 3) carry out some transations 4) try checking trial balance. it shall display cr:0 dr:0 after updating the 'from_date' it worked as expected. regds mallah.
          Hide
          jacques.le.roux Jacques Le Roux added a comment -

          Hi Rajesh,

          The createGlAccountOrganization as since been transformed to use entity-auto and that's certainly the reason why the fromDate misses again.

          Please try if these changes are enough

          Index: applications/accounting/widget/GlobalGlAccountsForms.xml
          ===================================================================
          --- applications/accounting/widget/GlobalGlAccountsForms.xml	(revision 1812128)
          +++ applications/accounting/widget/GlobalGlAccountsForms.xml	(working copy)
          @@ -62,6 +62,7 @@
                           </entity-options>
                       </drop-down>
                   </field>
          +        <field name="fromDate"><date-time default-value="${nowTimestamp}"/></field>
                   <field name="submitButton" title="${uiLabelMap.AccountingCreateAssignment}" widget-style="smallSubmit"><submit button-type="button"/></field>
               </form>
          
          Index: applications/accounting/widget/GlSetupForms.xml
          ===================================================================
          --- applications/accounting/widget/GlSetupForms.xml	(revision 1812128)
          +++ applications/accounting/widget/GlSetupForms.xml	(working copy)
          @@ -143,6 +143,7 @@
                           </entity-options>
                       </drop-down>
                   </field>
          +        <field name="fromDate"><date-time default-value="${nowTimestamp}"/></field>
                   <field name="submitButton" title="${uiLabelMap.AccountingCreateAssignment}"><submit button-type="button"/></field>
               </form>
          
          Show
          jacques.le.roux Jacques Le Roux added a comment - Hi Rajesh, The createGlAccountOrganization as since been transformed to use entity-auto and that's certainly the reason why the fromDate misses again. Please try if these changes are enough Index: applications/accounting/widget/GlobalGlAccountsForms.xml =================================================================== --- applications/accounting/widget/GlobalGlAccountsForms.xml (revision 1812128) +++ applications/accounting/widget/GlobalGlAccountsForms.xml (working copy) @@ -62,6 +62,7 @@ </entity-options> </drop-down> </field> + <field name= "fromDate" ><date-time default -value= "${nowTimestamp}" /></field> <field name= "submitButton" title= "${uiLabelMap.AccountingCreateAssignment}" widget-style= "smallSubmit" ><submit button-type= "button" /></field> </form> Index: applications/accounting/widget/GlSetupForms.xml =================================================================== --- applications/accounting/widget/GlSetupForms.xml (revision 1812128) +++ applications/accounting/widget/GlSetupForms.xml (working copy) @@ -143,6 +143,7 @@ </entity-options> </drop-down> </field> + <field name= "fromDate" ><date-time default -value= "${nowTimestamp}" /></field> <field name= "submitButton" title= "${uiLabelMap.AccountingCreateAssignment}" ><submit button-type= "button" /></field> </form>
          Hide
          rmallah Rajesh Kumar Mallah added a comment -

          just checking

          Show
          rmallah Rajesh Kumar Mallah added a comment - just checking
          Hide
          rmallah Rajesh Kumar Mallah added a comment -

          I use the URL endpoint
          /accounting/control/ListGlAccountOrganization?organizationPartyId=10000

          to assign new GL accounts to the organisation . After making the changes
          in the XML files , followed by ./gradlew , i do not see any change in the form
          UI . Neither did the new entry in database had from_date populated .

          am I looking at the wrong place?

          regds
          mallah.

          Show
          rmallah Rajesh Kumar Mallah added a comment - I use the URL endpoint /accounting/control/ListGlAccountOrganization?organizationPartyId=10000 to assign new GL accounts to the organisation . After making the changes in the XML files , followed by ./gradlew , i do not see any change in the form UI . Neither did the new entry in database had from_date populated . am I looking at the wrong place? regds mallah.
          Hide
          jacques.le.roux Jacques Le Roux added a comment - - edited

          PLease try accounting/control/AssignGlAccount?organizationPartyId=company and accounting/control/ListGlAccountOrganization

          These are the 2 places where the createGlAccountOrganization service is called. Just a bet so far...

          Show
          jacques.le.roux Jacques Le Roux added a comment - - edited PLease try accounting/control/AssignGlAccount?organizationPartyId=company and accounting/control/ListGlAccountOrganization These are the 2 places where the createGlAccountOrganization service is called. Just a bet so far...
          Hide
          rmallah Rajesh Kumar Mallah added a comment - - edited

          the change in accounting/control/AssignGlAccount?organizationPartyId=company
          does produce correct result. But accounting/control/ListGlAccountOrganization remains
          unchanged.

          Show
          rmallah Rajesh Kumar Mallah added a comment - - edited the change in accounting/control/AssignGlAccount?organizationPartyId=company does produce correct result. But accounting/control/ListGlAccountOrganization remains unchanged.
          Hide
          jacques.le.roux Jacques Le Roux added a comment -

          Don't you see a field to enter a from data in accounting/control/ListGlAccountOrganization ?

          If you see it, try adding

          901000 FEDERAL INCOME TAX INCOME TAX [900000]

          Show
          jacques.le.roux Jacques Le Roux added a comment - Don't you see a field to enter a from data in accounting/control/ListGlAccountOrganization ? If you see it, try adding 901000 FEDERAL INCOME TAX INCOME TAX [900000]
          Hide
          rmallah Rajesh Kumar Mallah added a comment - - edited

          I did below change:

           git diff applications/accounting/widget/GlobalGlAccountsForms.xml applications/accounting/widget/GlSetupForms.xml
          diff --git a/applications/accounting/widget/GlSetupForms.xml b/applications/accounting/widget/GlSetupForms.xml
          index aae00b3..b8a3a2e 100644
          --- a/applications/accounting/widget/GlSetupForms.xml
          +++ b/applications/accounting/widget/GlSetupForms.xml
          @@ -81,6 +81,7 @@ under the License.
                           </entity-options>
                       </drop-down>
                   </field>
          +       <field name="fromDate"><date-time default-value="${nowTimestamp}"/></field>
                   <field name="submitButton" title="${uiLabelMap.AccountingNewCompany}"><submit button-type="button"/></field>
               </form>
           
          diff --git a/applications/accounting/widget/GlobalGlAccountsForms.xml b/applications/accounting/widget/GlobalGlAccountsForms.xml
          index 0d568a5..1e69dd3 100644
          --- a/applications/accounting/widget/GlobalGlAccountsForms.xml
          +++ b/applications/accounting/widget/GlobalGlAccountsForms.xml
          @@ -62,6 +62,7 @@ under the License.
                           </entity-options>
                       </drop-down>
                   </field>
          +       <field name="fromDate"><date-time default-value="${nowTimestamp}"/></field>
                   <field name="submitButton" title="${uiLabelMap.AccountingCreateAssignment}" widget-style="smallSubmit"><submit button-type="button"/></field>
               </form>
          
          ======================
          
          

          https://drive.google.com/file/d/0B4yfAVMLmbQxTF9mcmxOdUFtbVk/view?usp=sharing

          Show
          rmallah Rajesh Kumar Mallah added a comment - - edited I did below change: git diff applications/accounting/widget/GlobalGlAccountsForms.xml applications/accounting/widget/GlSetupForms.xml diff --git a/applications/accounting/widget/GlSetupForms.xml b/applications/accounting/widget/GlSetupForms.xml index aae00b3..b8a3a2e 100644 --- a/applications/accounting/widget/GlSetupForms.xml +++ b/applications/accounting/widget/GlSetupForms.xml @@ -81,6 +81,7 @@ under the License. </entity-options> </drop-down> </field> + <field name="fromDate"><date-time default-value="${nowTimestamp}"/></field> <field name="submitButton" title="${uiLabelMap.AccountingNewCompany}"><submit button-type="button"/></field> </form> diff --git a/applications/accounting/widget/GlobalGlAccountsForms.xml b/applications/accounting/widget/GlobalGlAccountsForms.xml index 0d568a5..1e69dd3 100644 --- a/applications/accounting/widget/GlobalGlAccountsForms.xml +++ b/applications/accounting/widget/GlobalGlAccountsForms.xml @@ -62,6 +62,7 @@ under the License. </entity-options> </drop-down> </field> + <field name="fromDate"><date-time default-value="${nowTimestamp}"/></field> <field name="submitButton" title="${uiLabelMap.AccountingCreateAssignment}" widget-style="smallSubmit"><submit button-type="button"/></field> </form> ====================== https://drive.google.com/file/d/0B4yfAVMLmbQxTF9mcmxOdUFtbVk/view?usp=sharing
          Hide
          rmallah Rajesh Kumar Mallah added a comment -


          pls note i am not applying on trunk , i use released versions. eg this is: 16.11.03

          Show
          rmallah Rajesh Kumar Mallah added a comment - pls note i am not applying on trunk , i use released versions. eg this is: 16.11.03
          Hide
          jacques.le.roux Jacques Le Roux added a comment -

          It works here on R16 locally, please check again

          Show
          jacques.le.roux Jacques Le Roux added a comment - It works here on R16 locally, please check again
          Hide
          rmallah Rajesh Kumar Mallah added a comment -

          Hi Jacques ,
          I will check again , maybe i did some silly mistake.
          pls bear for a day or 2.
          kind regds
          mallah.

          Show
          rmallah Rajesh Kumar Mallah added a comment - Hi Jacques , I will check again , maybe i did some silly mistake. pls bear for a day or 2. kind regds mallah.
          Hide
          jacques.le.roux Jacques Le Roux added a comment -

          Fixed for both trunk and R16.11 at revision: 1812226

          Show
          jacques.le.roux Jacques Le Roux added a comment - Fixed for both trunk and R16.11 at revision: 1812226

            People

            • Assignee:
              jacques.le.roux Jacques Le Roux
              Reporter:
              ofbizzer Christian Carlow
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development

                  Agile