Topic: Anomaly in Database Entry

Today one of my client did one Bank Payment Entry.
The Entry was half passed.
It created the GL Transaction but didn't create the Bank Transaction.
Hence the Transaction is reflecting in Ledgers and Journal Inquiry but Not in Others
And If We want to void it then it is also not available to void.
Attached is the Screen Shot.

1. Why this happens? It happened one time earlier also with Stock Adjustments.
2. How to handle this situation?

Post's attachments

Anomaly in Database Entry.png 42.2 kb, file has never been downloaded. 

You don't have the permssions to download the attachments of this post.
www.boxygen.pk

Re: Anomaly in Database Entry

Seems like commit or cancel transaction not  called. And it looks like mysql level failure.  Would you mind checking your MySQL log for failure. Normally it does'nt happen. It happens when the server reached deadend or deadlock.

Subscription service based on FA
HRM CRM POS batch Themes

3 (edited by boxygen 01/14/2022 02:02:29 pm)

Re: Anomaly in Database Entry

Anyway I did some modification to ensure force void if such situation occurs.

In admin/db/voiding_db.inc I modified code as below

case ST_BANKDEPOSIT : // it's a deposit
        case ST_BANKTRANSFER : // it's a transfer
            if (!check_void_bank_trans($type, $type_no))
                return _('This transaction cannot be voided because the operation would decrease account balance below allowed limit in some point of account history.');
                case ST_BANKPAYMENT : // it's a payment
            if (!exists_bank_trans($type, $type_no) && !exists_gl_trans($type, $type_no)) //modified by faisal
                return _('Selected transaction does not exists.');
            void_bank_trans($type, $type_no);
            break;

Also in admin/void_transaction.php

    case ST_BANKPAYMENT : // it's a payment
        case ST_BANKDEPOSIT : // it's a deposit
        case ST_BANKTRANSFER : // it's a transfer
            if (!exists_bank_trans($type, $type_no) && !exists_gl_trans($type, $type_no)) //modified by faisal
                return false;
            break;
www.boxygen.pk

Re: Anomaly in Database Entry

It is likely that many such voids will confuse the admin. A better way is needed. @joe?

Re: Anomaly in Database Entry

Any void attempt shall smartly check if the transaction exists partially in database then it shall execute Void instead of showing the message that this transaction doesn't exists.

www.boxygen.pk