xTuple.com xTupleU Blog & News Customer Support

Accounts Payable Misc Memos errors

Hi, I have setup receivables and beginning balances for customers using debit and credit memos and putting both sides of the entry to receivables. I am getting the error below when I try to do the same for vendors in payables. I tried using the payables acount, I tried using an expense account, I tried with the VAT selected and with it unselected but always the same error.
ERROR: postGLSeries commit failed with -5
CONTEXT: PL/pgSQL function createapcreditmemo(integer,integer,integer,text,text,date,numeric,text,integer,date,integer,integer,integer) line 120 at RAISE
(P0001) QPSQL: Unable to create query

The Query:
SELECT createAPCreditMemo( :apopen_id, :vend_id, fetchJournalNumber(‘AP-MISC’), :apopen_docnumber, :apopen_ponumber, :apopen_docdate, :apopen_amount, :apopen_notes, :apopen_accnt_id, :apopen_duedate, :apopen_terms_id, :curr_id, :apopen_taxzone_id ) AS result;

Bound Values:
:apopen_accnt_id: 89
:apopen_amount: 235.47
:apopen_docdate: 2019-03-31
:apopen_docnumber: 1
:apopen_duedate: 2019-03-31
:apopen_id: 5
:apopen_taxzone_id: 1
:apopen_terms_id: 1
:curr_id: 3
:vend_id: 2

Any help?

-5 from postGlSeries means that it can’t find the GL Series Discrepancy G/L account. This is either defined under Accounting > Setup > General Ledger if there is only a single company in the database, or Accounting > Ledger Accounts > Companies for multi-company. I do wonder why it is being raised, as on first glance that part of the code should only be reached if the transaction you are trying to post doesn’t balance.

My workaround was to tick the box that says use prepaid account, then examine the trial balance after to see if any accounts had changed… which they haven’t. I can’t think why it would be unbalanced because an entry where both credit and debit go to same account is still balanced unless the software cannot handle posting both sides to the same head. Is there a better way to get these subledger opening balances in?
I have checked the G/L Series Discrepancy account field is blank and I am tempted to put a number there and then try posting the entries debiting and crediting the payables account again.
Thanks for the advice,

It is always best to take a fresh backup before hand, if you haven’t already done so (and in between each successful import, as well…). One thing that is often overlooked, we added some configuration options under Accounting > Setup > Global, to disconnect AP/AR from the general ledger, for use during initial imports.This prevents any GL transactions while you import everything, but remember to turn it back on when you are done.

I have been successful on this front. The disconnection function you speak of would have been really helpful in setting up the sub-ledger balances but they seem to have been recorded just fine. However I do not know if I am on the wrong version but I do not see that Setup > Accounting > Global.
Thank you for your help again, I think for me this one is resolved.

Good to hear, thank you for the update. Global is a tab under the accounting setup menu and the disconnection options were added somewhere around version 3.8.0 IIRC, I added a screenshot of it here:

Got it. Never looked at the tabs hard enough to be honest.
Thank you again