Topic: duplicate payment bank transaction found

I was trying to view a specific entry in Bank Account Inquiry, but I get this error. I checked the gl_trans table and the bank_trans table and they seem to be Ok. How to solve this? Thank you.

Re: duplicate payment bank transaction found

Try to execute following sql statement in phpmyadmin to check if you really have duplicate records (using right tables prefix,  type and trans_no):

SELECT *, bank_account_name, account_code, bank_curr_code FROM 0_bank_trans, 
0_bank_accounts WHERE 0_bank_accounts.id=0_bank_trans.bank_act AND type='2' AND 
0_bank_trans.trans_no = '5' ORDER BY trans_date, 0_bank_trans.id

If there is more than one record returned you have broken database content or the above original sql is invalid.

Janusz

Re: duplicate payment bank transaction found

Ok. I get two identical rows (except for ID) when using the transaction number that gives me problems. Is it safe to remove one of them using phpMyAdmin, or is there a utility in FrontAccounting to fix this? Thank you.

Re: duplicate payment bank transaction found

I think you can delete any of the two bank transaction providing they are not allocated nor reconcilled.
Anyway there should be no duplicate rows, so seems there is a bug somewhere in the code. Do you remember which operations sequence lead to this problem ?
Janusz

Re: duplicate payment bank transaction found

There are many more, and all are bank deposits. Since I don't do the posting (an accountant does) I could not say what happened. But it's strange that only deposit transactions are affected. ID for each row are consecutive numbers. Please advise. Thank you.

Re: duplicate payment bank transaction found

Ok. I think I found something. The accountant was doing this: debit the bank account and also credit the bank account in the same voucher, for the same amount. Although the effect to the account is zero, FA does not like this. Obviously it was a mistake on her part, but should not generate a problem with the dabase. Now we can not make corrections because we can not visualize the voucher. I will try and see if I can void the transactions.

Re: duplicate payment bank transaction found

Ok. I can void the transaction but I still can not see the voucher. I get the same error. Thank you.

Re: duplicate payment bank transaction found

I guess we must disallow bank transactions in the rows. This will always cause more than one bank account transactions and give double records.

I will have a look at this.

/Joe

Re: duplicate payment bank transaction found

Fixed by disallowing bank accounts in account list on transaction rows. CVS 2.2 unstable updated. Affected files /fl/includes/ui/gl_bank_ui.inc and /gl/manage/gl_quick_entries.php

Even if you cannot see the voided transactions, they are zeroed out. So you should be safe to continue with the corrected files (or avoid bank accounts on the transaction rows).

/Joe

Re: duplicate payment bank transaction found

Just to be sure: Please clarify the term "disallow bank transactions in the rows". Will this affect entries where you post deposits by a debit to banks and a credit to cash?

Thank you.

Re: duplicate payment bank transaction found

Yes, allowing more that the main bank transactions will create dublicate bank transactions if there are bank and /or cash accounts on the transaction lines here.
The main account is the one you choose up/left. I hope you understand what I mean.

If you want to transfer bank to cash, then use bank transfer for that.

/Joe

Re: duplicate payment bank transaction found

Well, we only have one bank account. That's why I was asking. I hope your solution still applies. Thank you.

Re: duplicate payment bank transaction found

The 'bank account' term used in FA is somewhat wider and include also petty cash. This is really any currency account regardless it is established in a bank or not, so moving money form petty cash to bank account is also 'bank transfer' .

Janusz

Re: duplicate payment bank transaction found

Please allow me to clarify the scenario:

This comapny is a restaurant, and has only one bank account. So everyday, at closing time, the cashier prints a Cashier's Report using the restaurant software Aldelo for Reestaurants, cuts-off the credit card POS, counts the cash and bundles everything in a package to give to the accountant.

The following morning, the accountant checks everything and prepares one entry:

Entry # 1

Debit - Cash on Hand $1,000.00
Credit - Sales $1,000.00

And after the money gets deposited to the bank by the manager, he handles the accountant the deposit slip. She now makes another entry:

Entry # 2 (Bank Deposit)

Debit - Bank $1,000.00
Credit - Cash on Hand $1,000.00

In this case, FA behaves as it should and everything is fine.

This is an over simplication of the process. Now, for whatever reason, she made a mistake in the second entry, and did it like this:

Entry # 2 (Bank Deposit)

Debit - Bank $1,000.00
Credit - Bank $1,000.00

Now FA does not seem to like this mistake and, when trying to visualize the entry, gives an error "duplicate payment bank transaction found" when listing Bank Account Inquiry. Granted, the accountant should not make mistakes, but they do.

Maybe someone can try this and see if they get the same problem. It might just be my installation ....

Thank you.

Re: duplicate payment bank transaction found

There was probably misunderstanding in discussion above. Now seems to me that your accountant use journal interface to post bank transactions, and not Bank Deposit (only journal page has both credit and debit side entry fields). Is it the case?
Anyway Joe has found and fixed a problem in Bank Deposit, so I don't know.

BTW. Posting bank transaction via journal interface should be avoided as it can lead to problems in some situations (e.g. when more than one 'bank account' share the same gl account).

Janusz

Re: duplicate payment bank transaction found

Hello,
If you used the Bank Deposit entry, Entry # 2 would no longer be possible after the latest CVS fix. The problem will not arise if you use the Journal Entry. It will do exactly as you enter, but when using Bank Account Inquiry there is no Bank Deposit line for the entry, but a Journal Entry number and clicking on this number will show you the Journal Entry, not a Bank Deposit.

The duplicate error was only thrown when you used the Bank Deposit (as it was before the CVS fix), and made a transaction line with the same GL account as the main account or another Bank Account/Cash Account. In these cases you got a duplicate error line. A bank deposit/payment could only contain ONE bank/cash transaction line, the main one.

But luckily this is no longer possible with the latest CVS fix.

/Joe