ledgersmb / LedgerSMB

Double-entry accounting & ERP for the web
https://ledgersmb.org
Other
419 stars 152 forks source link

Error when trying to create new Credit Account for new Company Customer. #8005

Closed howardlowndes closed 8 months ago

howardlowndes commented 8 months ago

Version

1.11.8

What browsers are you seeing the problem on?

This problem isn't browser related

What happened?

Following instructions in https://book.ledgersmb.org/dev/split-book/sec-ramping-creating-a-customer.html Input data for Company as per Table 8.1 then input data as per Table 8.2 Select Save New Error message:

23514: ERROR: new row for relation "entity_credit_account" violates check constraint "entity_credit_account_req_curr" DETAIL: Failing row contains (3, 3, 2, General Sale, null, null, null, null, null, null, null, 100, null, null, null, null, null, null, null, null, null, 8, 2, null, null). CONTEXT: SQL statement "INSERT INTO entity_credit_account ( entity_id, entity_class, discount, description, taxincluded, creditlimit, terms, meta_number, business_id, language_code, pricegroup_id, curr, startdate, enddate, discount_terms, threshold, ar_ap_account_id, pay_to_name, taxform_id, cash_account_id, discount_account_id ) VALUES ( in_entity_id, in_entity_class, in_discount, in_description, in_taxincluded, in_creditlimit, in_terms, t_meta_number, in_business_id, in_language_code, in_pricegroup_id, in_curr, in_startdate, in_enddate, in_discount_terms, in_threshold, in_ar_ap_account_id, in_pay_to_name, in_taxform_id, in_cash_account_id, in_discount_account_id )" PL/pgSQL function eca__save(integer,integer,integer,text,numeric,boolean,numeric,integer,integer,character varying,integer,character varying,integer,character,date,date,numeric,integer,integer,text,integer,integer) line 45 at SQL statement

dbversion: 1.11.8, company: PAMS2

What should have happened?

Credit account should have been created.

ehuelsmann commented 8 months ago

I can't reproduce. But I have a feeling what's going wrong here. You haven't set up your currencies. A currency is required when adding a customer or vendor. The error with respect to the violated constraint indicates the required currency is missing (req_curr).

howardlowndes commented 8 months ago

I can't reproduce. But I have a feeling what's going wrong here. You haven't set up your currencies. A currency is required when adding a customer or vendor. The error with respect to the violated constraint indicates the required currency is missing (req_curr).

I'll need to get back on this to confirm as it's on a different system, but I do recall setting up a currency somewhere along the line.

howardlowndes commented 8 months ago

I checked and there is a currency set, so I tried the 8.2 process again and it was successful. I am therefore closing this issue.