xTuple 4.11.3 MFG Edition
We have a voucher that was entered with incorrect Cost Element dollar amounts for the P/O line items. The dollar amounts are different between the P/O and the invoice. We need to pay the invoice dollar amounts but the P/O dollar amounts were distrubuted to each line item cost element. However, the voucher was posted and now only shows up in the Open Payables report or the Payables tab in the Payables Workbench. The status of the Voucher is "O".
When I right click the voucher in the Payables list and try to use the Void function clicking Ok results in this:
ERROR: Currency Gain/Loss Account not found for 21110-A/P - TRADE
CONTEXT: PL/pgSQL function getgainlossaccntid(integer) line 22 at RAISE
SQL statement "SELECT insertGLTransaction(fetchJournalNumber('AP-MISC'), 'A/P', 'CM',
src.apopendocnumber, 'CM Application',
PL/pgSQL function postapcreditmemoapplication(integer) line 123 at PERFORM
SQL statement "SELECT postAPCreditMemoApplication(_apopenid)"
PL/pgSQL function voidapopenvoucher(integer,integer,date) line 334 at SQL statement
PL/pgSQL function voidapopenvoucher(integer,date) line 5 at RETURN
(P0001) QPSQL: Unable to create query
SELECT voidApopenVoucher(:apopen_id, :voidDate) AS result;
The account "21110-A/P - TRADE" does exist in the GL.
The voucher was originally created in December 2019 if that matters.
One oddity in this is that although there is no Edit Voucher in the right click menu to edit the voucher there is a View Voucher option and if we view this voucher it lets us delete the cost element distribution for each line item. Clicking Save appears to do nothing but when we click Cancel the amount column in the Voucher view goes to zero. But there is no way I can find to create a new Cost Element distrubtion (New button is greyed out).