I have closed a financial year with Period Closing Voucher , and prior to that i have also set as defaults next fiscal year in global defaults, so that Profit/Loss can be transferred into new FY as retained earnings .However when i go to ‘Balance Sheet’ it says " Previous Financial Year is not closed" at the bottom. In new FY, Profit & Loss statement data is 0 which is expected. Below piece of code is doing the checking, can anyone tell me specifically what these code are validating? Or what could possibly have gone wrong? Thank you.
# Check if previous year balance sheet closed opening_balance = 0 if asset: opening_balance = flt(asset.get("opening_balance", 0)) if liability: opening_balance -= flt(liability.get("opening_balance", 0)) if equity: opening_balance -= flt(asset.get("opening_balance", 0)) if opening_balance: return _("Previous Financial Year is not closed")