Forum Discussion

wJack's avatar
wJack
New Contributor II
2 years ago

Journals calculate and post Dt/Ct

Hi All

I am trying to build BR (Finance or Extender (General Server), activated by Dashboard button) to calculate Journal (based on two different Cubes) and post to Dt or Ct ('if' statement to define where exactly)?

I thought it would be possible with 'api.Data.Calculate' by just having simple equation TargetCube = 1stCube - 2ndCube; but cannot get to the place where I could define whether it should be posted as DebitAmount or  CreditAmount.

Thanks!

  • If you're using Calculate, there is no concept of debit or credit - you just target the accounts you want to write to. However, this will not create proper journals, it will literally enter values in the intersections.

    If you want proper transactions recorded as Journals, you will have to use the functions like BRApi.Journals.Data.ImportAndProcessJournals (which works with files) or the ones under BRApi.Journals.Metadata.

  • JackLacava's avatar
    JackLacava
    Honored Contributor

    If you're using Calculate, there is no concept of debit or credit - you just target the accounts you want to write to. However, this will not create proper journals, it will literally enter values in the intersections.

    If you want proper transactions recorded as Journals, you will have to use the functions like BRApi.Journals.Data.ImportAndProcessJournals (which works with files) or the ones under BRApi.Journals.Metadata.

  • wJack's avatar
    wJack
    New Contributor II

    Thank you. Finally I have used one from BRApi.Journals.Metadata. It works fine.