1 (edited by corporatei 01/22/2022 03:13:03 am)

Topic: Void a transaction gives error message

When I tried to void a transaction (payments, invoice, etc) - by going to Setup > Maintenance > Void a transaction
I get an error message:

"The selected transaction was closed for edition and cannot be voided."

The transaction I am trying to void is from this year.

The current fiscal year is 1/1/2022-12/31/2022 and previous years have been closed.

How can I overcome this problem?

Re: Void a transaction gives error message

From Banking and General Ledger -> Closing GL Transaction

Here you can change the GL  close date before  first date of fiscal year. It will  allow you to  work on it.

Subscription service based on FA
HRM CRM POS batch Themes

Re: Void a transaction gives error message

kvvaradha wrote:

From Banking and General Ledger -> Closing GL Transaction

Here you can change the GL  close date before  first date of fiscal year. It will  allow you to  work on it.

How do I do that?   Where do I change the General Ledger close date before the first date of fiscal year?

4 (edited by corporatei 01/26/2022 12:27:45 am)

Re: Void a transaction gives error message

Please see the screenshot at: https://1drv.ms/u/s!AjriK54wzSTbuznAYpPDlGPLKzKl

Re: Void a transaction gives error message

By default  that page permission  was not given.  So goto Setup-> Access setup here edit your role and apply the close GL Transaction permission and set it.

Subscription service based on FA
HRM CRM POS batch Themes

Re: Void a transaction gives error message

kvvaradha wrote:

By default  that page permission  was not given.  So goto Setup-> Access setup here edit your role and apply the close GL Transaction permission and set it.

I went to the setup  then access setup page, went to the system administrator role, applied the close GL transaction permission and clicked checkmark then applied.  I went back to try to void a transaction and still has the error message.  Even the most recent transactions like from this year cannot be voided and said closed.

7 (edited by rafat 01/26/2022 12:52:59 pm)

Re: Void a transaction gives error message

See Warning:
Try this and use with your own discretion.
Close the year and reopen it again. You should be able to void the TXN.
Warning: Two GL Accounts are affected when one closes a fiscal year 3590-Retained Earnings and 9990-Profit/Loss
You might need to void these two automatically updated GL transactions when you close the fiscal year.
Try it with a staging system before the live system.

Re: Void a transaction gives error message

rafat wrote:

See Warning:
Try this and use with your own discretion.
Close the year and reopen it again. You should be able to void the TXN.
Warning: Two GL Accounts are affected when one closes a fiscal year 3590-Retained Earnings and 9990-Profit/Loss
You might need to void these two automatically updated GL transactions when you close the fiscal year.
Try it with a staging system before the live system.

Should I back up the database first, then try this, and if something goes wrong I restore database?

Re: Void a transaction gives error message

Yes of course..

10 (edited by corporatei 01/27/2022 06:09:20 am)

Re: Void a transaction gives error message

I tried the above by closing the year and re-opening the year.  It still does not work.  I also tried to apply the close GL transaction permission inside the System's Administrator's profile.  It still does not work.

Even if I tried to void a transaction this year 2022, it won't let me do it.  2022 is my current fiscal year.   It still gives error message "The selected transaction was closed for edition and cannot be voided.".  Is this a problem after upgrading to FrontAccounting 2.4.11 ?  I don't see that as an issue in the past versions?

11 (edited by rafat 01/27/2022 06:19:58 am)

Re: Void a transaction gives error message

Anything in the error log? Also what I meant you should close and reopen the current fiscal year (2022).

Re: Void a transaction gives error message

You have not checked the closing  GL Transaction.  Thats the only solution  for this situation. If you want  to do it manually. Open sys_prefs  table and find gl_close_date and change the date to last year close date and try it. It will  work for you.

Subscription service based on FA
HRM CRM POS batch Themes

Re: Void a transaction gives error message

I have tried to closed the 2021 and 2022 fiscal year, and reopen back up, and still have the same problem.
This time, when I tried to void a transaction, anything in 2021 becomes N/A.

Re: Void a transaction gives error message

I wentn into the phpmyadmin, under sys_prefs table, on the row:
   
gl_closing_date
setup.closing_date
date
8
2020-12-31

I changed it to 2020-12-31.  Yet when I tried to void even a 2021 or 2022 transaction, still gives the error message.

Re: Void a transaction gives error message

On the debug I see:
SET sql_mode = 'STRICT_ALL_TABLES'
SELECT name, value FROM fly2_sys_prefs
SELECT value FROM fly2_sys_prefs WHERE name='version_id'
SELECT name, value FROM fly2_sys_prefs
SELECT * FROM fly2_fiscal_year WHERE '2022-01-27' >= begin AND '2022-01-27' <= end AND closed=0
SELECT COUNT(*) FROM (SELECT t.trans_no as trans_no ,t.reference as ref ,t.tran_date as trans_date, t.type as type FROM fly2_journal t LEFT JOIN fly2_voided v ON t.trans_no=v.id AND v.type='0' WHERE ISNULL(v.`memo_`) AND t.trans_no >= '1'
            AND  t.trans_no <= '999999' AND t.`type` = '0' GROUP BY t.type, t.trans_no ORDER BY t.trans_no DESC) tmp_count
SELECT t.trans_no as trans_no ,t.reference as ref ,t.tran_date as trans_date, t.type as type FROM fly2_journal t LEFT JOIN fly2_voided v ON t.trans_no=v.id AND v.type='0'  WHERE (ISNULL(v.`memo_`) AND t.trans_no >= '1'
            AND  t.trans_no <= '999999' AND t.`type` = '0') GROUP BY t.type, t.trans_no ORDER BY t.trans_no DESC LIMIT 0, 10
SELECT * FROM fly2_fiscal_year WHERE '2022-12-31' >= begin AND '2022-12-31' <= end AND closed=0
SELECT * FROM fly2_fiscal_year WHERE '2021-12-31' >= begin AND '2021-12-31' <= end AND closed=0

Re: Void a transaction gives error message

I checked tmp/errors.log and I did not see anything out of the ordinary.

17 (edited by corporatei 01/28/2022 02:28:43 am)

Re: Void a transaction gives error message

It appears the problem is the current version is not compatible with PHP 8.0.    When I switched the PHP back to 7.0 from 8.0, the problem went away, and I was able to void transactions without the error message.  So there is a problem with compatibility with PHP 8.0

18 (edited by albertolima 01/30/2022 01:26:41 am)

Re: Void a transaction gives error message

Confirmed, yes. Switching back to php7.4 enables journals edition
I am using Ubuntu Server v20.04, Apache2 and php8.1

Re: Void a transaction gives error message

Submitted to mantis bug tracker.

http://mantis.frontaccounting.com./view.php?id=5571

Re: Void a transaction gives error message

Did you find any workaround other than downgrading php to 7.4 ?

Re: Void a transaction gives error message

This has been fixed and committed to stable repo. A fixed file can be downloaded here.

joe.