ekmungai / eloquent-ifrs

Eloquent Double Entry Accounting with a focus on IFRS Compliant Reporting
MIT License
332 stars 67 forks source link

The Account Statement's balance and trial balance are different #158

Closed AAUU-Ansari closed 2 months ago

AAUU-Ansari commented 6 months ago

Hi, Dear First thank you for the great package. A litter problem now I am facing the trial Balance and the Balance sheet report shows a balance without including the opening balances

it calculates only debit or credit The Account Statement's balance and trial balance are different
For example 'ABC Bank' opening balance = $31052 In Trail Balance Report Shows ABC Bank = $11000

But In Account Statement ABC Bank = $42052.77

ekmungai commented 5 months ago

Hi @AAUU-Ansari ,

That is indeed a very peculiar issue. Are you sure that the statement and trial balance dates match exactly?

AAUU-Ansari commented 5 months ago

Hi @ekmungai When I add the closing balances of 2023 to the opening balance of 2024 then the problem gets solved

AAUU-Ansari commented 5 months ago

hi @ekmungai I am working on this package. All things are working fine but when I close the year 2023 and open the new year 2024 the trail balance & account statement balance do not match. The trial balance report does not show a Capital balance and the account statement report shows a Capital balance from 2023 to 1-Feb-2024 $134.50283

when I started the year 2023 then I entered the opening balance in (ifrs_balances table) is it correct way or not $8.86301

ekmungai commented 5 months ago

Hi @AAUU-Ansari ,

You need to create an opening balance equal to the previous years closing balance every time you close an year.

Cheers, Ed

AAUU-Ansari commented 5 months ago

But now trail balance shows account balance correct and accounts statement show incorrect balance like it add opening balance Like balance is $100 and the account statements report shows it $200

On Mon, 5 Feb 2024, 9:10 pm Edward Mungai, @.***> wrote:

Hi @AAUU-Ansari https://github.com/AAUU-Ansari ,

You need to create an opening balance equal to the previous years closing balance every time you close an year.

Cheers, Ed

— Reply to this email directly, view it on GitHub https://github.com/ekmungai/eloquent-ifrs/issues/158#issuecomment-1927346882, or unsubscribe https://github.com/notifications/unsubscribe-auth/AZJ3QZHBSMY2CTY7CNBYWKTYSEAA7AVCNFSM6AAAAABCGWZ4DKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMRXGM2DMOBYGI . You are receiving this because you were mentioned.Message ID: @.***>

AAUU-Ansari commented 5 months ago

Hi @ekmungai how to generate an ifrs_closing_transactions entry & please share a code of a complete example of ifrs_closing_transactions entry. may be above #158 issue will be resolved by it

ekmungai commented 5 months ago

Hi @AAUU-Ansari,

Statement balances always include the opening balance amount. If the statement has no other transactions the statement and opening balances would be the same. Closing transactions are only meant for recognizing forex differences and would not help at all in this case.

Cheers, Edward

AAUU-Ansari commented 5 months ago

Thanks for your reply, Dear @Edward Mungai Can you share me Laravel Blade code for the Account Statement or Trail Balance maybe I am doing something wrong with it

On Tue, Feb 6, 2024 at 6:11 PM Edward Mungai @.***> wrote:

Hi @AAUU-Ansari https://github.com/AAUU-Ansari,

Statement balances always include the opening balance amount. If the statement has no other transactions the statement and opening balances would be the same. Closing transactions are only meant for recognizing forex differences and would not help at all in this case.

Cheers, Edward

— Reply to this email directly, view it on GitHub https://github.com/ekmungai/eloquent-ifrs/issues/158#issuecomment-1929531689, or unsubscribe https://github.com/notifications/unsubscribe-auth/AZJ3QZCKEPR2COZPHEF7LMDYSITYDAVCNFSM6AAAAABCGWZ4DKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMRZGUZTCNRYHE . You are receiving this because you were mentioned.Message ID: @.***>

ekmungai commented 5 months ago

Hey @AAUU-Ansari ,

I'm afraid I've not done any front end work on the package and so I cant help.

AAUU-Ansari commented 5 months ago

Hi @ekmungai Thanks for your reply, The Trail Balance report does not show the actual balance it shows only the balance without opening the balance
just for testing purposes, I created a new company which has an opening bank balance of $1500

I create a journal entry with $660 Expense

Account Statement report shows ($1500 - $660 = $840) But the Trail Balance Report Shows only $660

if I eliminate the opening balance then the trial balance and statement balances are equal

Screenshot 2024-02-15 130532 Screenshot 2024-02-15 130615

Database Values

ifrs_entities year_start | 7

ifrs_reporting_periods OPEN | 2023 OPEN | 2024

ifrs_balances transaction_date : 2023-07-01 balance_type : D balance : 1500

b2bexecutives commented 3 months ago

Hey @ekmungai same issue with us the Account Statement show inaccurate balance when we use opening balances of two years

AAUU-Ansari commented 2 months ago

Hey @ekmungai,

I hope this message finds you well. Firstly, thank you for this valuable package.

when "currency_id" is passed, the statement returns the sum of (Closed & Open year) opening balances of the account. However, when otherwise correct results are obtained.

$statement = new AccountStatement($request->account_id,null, $request->start_date, $request->end_date);

AAUU-Ansari commented 2 months ago

and update the Account Model Line No.350 // $period = ReportingPeriod::getPeriod($year . "-01-01", $entity); $period = ReportingPeriod::getPeriod($year ."-". $entity->year_start."-01", $entity);