I’m wondering if others have been blocked from posting to a closed period. I used to be able to post adjustments to past periods, and simply create a new period closing entry. But now I am blocked from posting journal entries with this error:
Books have been closed till the period ending on 2022-12-31
You cannot create/amend any accounting entries till this date.
I tried to create a new period close voucher for the previously closed period, but I’m getting the following error:
Another Period Closing Entry PCE/014 has been made after 2022-12-31.
I’ve tried cancelling the submitted periods, but I get the same error. Is there something I’m doing wrong? Cancelling a period will make changes to the GL for the period, which is blocked by the voucher. Thus you can never cancel a PCV.
Looking at the period closing voucher code, it appears that you cannot save a period close voucher if there are submitted prior closes that posted on the same date. Shouldn’t it allow close vouchers that post on the same date?
The code in question looks like this:
existing_entry = (
frappe.qb.from_(pcv)
.select(pcv.name)
.where(
(pcv.posting_date >= self.posting_date)
& (pcv.fiscal_year == self.fiscal_year)
& (pcv.docstatus == 1)
& (pcv.company == self.company)
)
.run()
)if existing_entry and existing_entry[0][0]: frappe.throw( _("Another Period Closing Entry {0} has been made after {1}").format( existing_entry[0][0], self.posting_date ) )