Add AP transaction fails with NULL entity_credit_account
Closed this issue · 2 comments
Version
Master as of 90c2fc1
What browsers are you seeing the problem on?
This problem isn't browser related
What happened?
- Create a new Database: test01
- Select Chart-of-accounts country: Unites States
- Click Next
- Select Chart-of-accounts: GeneralHierarchical.xml
- Click Next
- Select Templates to Load: demo
- Click Load Templates
- Enter new user
- Username: jackeast
- Password: 1234
- User Creation: New
- Saluatation: Dr
- First Name: Jack
- Last Name: East
- Employee Number: 1
- Date of birth: 2024-03-01
- Tax ID: 1
- Country: United States
- Permissions: Full
- Click Create User
- Go to login.pl and login as jackeast, password: 1234
- Go to Contacts -> Search, click Search
- Select Jack East
- Select tab Credit Accounts
- In Pay To type: Jack East
- Click Save New
- Click AP Transaction
- Enter Due Date: 2024-03-07
- Enter Amount: 100
- Select Account: Telephone
- Enter Description: ATT
- Click Update
- Click Save
Get Error
' INSERT INTO ar (invnumber, person_id, entity_credit_account) VALUES ('Thu Mar 7 15:43:07 202470', ?, ?) ERROR: null value in column "entity_credit_account" of relation "ar" violates not-null constraint DETAIL: Failing row contains (1, Thu Mar 7 15:43:07 202470, 2024-03-07, null, null, f, null, 0, null, null, null, 1, null, null, null, null, null, f, f, t, null, null, null, f, null, null, null, null, null, null). at /srv/ledgersmb/old/lib/LedgerSMB/AA.pm line 304. '
dbversion: 1.12.0-dev, company: test01
What should have happened?
The AP transaction should have been added to the system.
There does not appear to be a way to add "entity_credit_account" in the AP transaction screen.
If you go to AP -> Add Transaction, select this user, and try to add a transaction it fails in the same way.
Also note that consistency checks pass.