ledgersmb/LedgerSMB

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?

  1. Create a new Database: test01
  2. Select Chart-of-accounts country: Unites States
  3. Click Next
  4. Select Chart-of-accounts: GeneralHierarchical.xml
  5. Click Next
  6. Select Templates to Load: demo
  7. Click Load Templates
  8. Enter new user
    1. Username: jackeast
    2. Password: 1234
    3. User Creation: New
    4. Saluatation: Dr
    5. First Name: Jack
    6. Last Name: East
    7. Employee Number: 1
    8. Date of birth: 2024-03-01
    9. Tax ID: 1
    10. Country: United States
    11. Permissions: Full
  9. Click Create User
  10. Go to login.pl and login as jackeast, password: 1234
  11. Go to Contacts -> Search, click Search
  12. Select Jack East
  13. Select tab Credit Accounts
  14. In Pay To type: Jack East
  15. Click Save New
  16. Click AP Transaction
    1. Enter Due Date: 2024-03-07
    2. Enter Amount: 100
    3. Select Account: Telephone
    4. Enter Description: ATT
  17. Click Update
  18. 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.