Topic: Supplier payment fails
Version 2.3.19
I am not sure whether this is the same bugs as mentioned here: https://frontaccounting.com/punbb/viewtopic.php?id=4539. It looks different on details.
The problem is this:
Banking -> General Ledger -> Payments
Select Pay to: Supplier
Select a supplier
Enter an amount
Press "Add item"
Process Payment
This error message appears in a red banner:
"The settled amount has to be greater than 0"
(Translated from Dutch, apologies if not literally correct)
http://www.linkels.net/~jlinkels/links/eds3.jpg
Now when I pay to a supplier which is configured for a different currency, an additional entry appears, showing the amount in the foreign currency. Then the transaction does go through.
http://www.linkels.net/~jlinkels/links/eds4.jpg
However, when I then go to Purchases -> Supplier Transactions and I try to retrieve the payment just made, I get a pop-up with this error message:
Databasefout : query for bank transaction
error code : 1305
error message : FUNCTION frontacc.IFNULL does not exist
sql that failed was : SELECT bt.*, act.*, IFNULL(abs(dt.ov_amount),
IFNULL (abs(st.ov_amount), bt.amount)) settled_amount, IFNULL(abs(dt.ov_amount/bt.amount),
IFNULL (abs(st.ov_amount/bt.amount), 1)) settle_rate,
IFNULL(debtor.curr_code, IFNULL (supplier.curr_code, act.bank_curr_code)) settle_curr FROM
1_bank_trans bt LEFT JOIN 1_debtor_trans dt ON dt.type=bt.type AND
dt.trans_no=bt.trans_no LEFT JOIN
1_debtors_master debtor ON debtor.debtor_no = dt.debtor_no
LEFT JOIN 1_supp_trans st ON st.type=bt.type AND st.trans_no=bt.trans_no
LEFT JOIN 1_suppliers supplier ON
supplier.supplier_id = st.supplier_id, 1_bank_accounts act
WHERE act.id=bt.bank_act AND bt.type='1' AND bt.trans_no = '7'
ORDER BY trans_date, bt.id
However, in the second case (with the foreign currency) the bank account is credited, so I assume the transaction has been completed.
To be sure it did not have anything to do with the state of the supplier, I created two new suppliers. One in standard currency, one in foreign currency. Except for the currency I left everything default.
I tried it in the on-line training database (2.3.18), which was succesful.
I also downloaded the stable repository hg clone https://frontaccounting.hg.sourceforge.net:8000/hgroot/frontaccounting/default. Then I copied the directory /var/lib/vz/repos/mercurial/frontac/default/purchasing/includes/db to the production directory. No changes.
I was a bit reluctant to sync the complete cloned repository with the production directory, although that should be safe I assume. Right? Would it make a difference?
jlinkels