Skip to main content
June 2, 2023
Solved

Journals calculate and post Dt/Ct

  • June 2, 2023
  • 2 replies
  • 0 views

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!

Best answer by JackLacava

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.

2 replies

June 5, 2023

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.

wJackAuthor
July 7, 2023

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