Bug: All select dropdowns send wrong values (IDs from wrong tables / list indices instead of actual IDs)
Description
Multiple dropdown/select components across the app send incorrect values in API requests. This affects currency selects, account selects, and likely all select components. The result is 400 Bad Request errors, making it impossible to create vendors, items, and likely other entities through the UI.
Affected Forms (confirmed)
1. Vendor form (/vendors/new) — Currency dropdown sends the CURRENCIES.ID (e.g. 1007) instead of the currency code string ("THB"). Backend expects @IsString() currencyCode.
2. Item form (/items/new) — Account dropdowns send wrong IDs:
- cost_account_id: 1019 — does not exist in ACCOUNTS table
- inventory_account_id: 1007 — does not exist in ACCOUNTS table (this is actually a CURRENCIES.ID)
- sell_account_id: 1241 — this one happens to be correct
Account IDs in the database start at ~1200+, so 1007 and 1019 are clearly not from the ACCOUNTS table.
Steps to Reproduce
Vendor:
1. Go to /vendors/new
3. Fill in display name, select a currency
5. Click Save → 400 Bad Request
Item:
1. Go to /items/new
3. Fill in name, type = service, set a sell price
5. Select cost account and sell account from dropdowns
7. Click Save → 400 Bad Request
Expected Behavior
- Currency dropdowns should send the ISO currency code string ("THB", "USD")-
- Account dropdowns should send the actual ACCOUNTS.ID value
Actual Behavior
Dropdowns send incorrect values — either IDs from the wrong database table or list index values.
Vendor payload:
```
json
{
"currency_code": 1007, // Should be "THB"
...
}
```
Item payload:
```
json
{
"cost_account_id": 1019, // Does not exist in ACCOUNTS
"sell_account_id": 1241, // Correct (Sales - B2C)
"inventory_account_id": 1007, // Does not exist in ACCOUNTS (this is CURRENCIES.ID for THB)
...
}
```
Root Cause (likely)
The <Select> / dropdown components appear to be using the option list index or an ID from the wrong data source as the value prop, rather than the actual entity ID or code from the correct table.
Environment
- Bigcapital version: v0.25.16 (Docker latest as of March 1, 2026)
- Deployment: Self-hosted via Coolify (Docker Compose)
- Browser: Brave 145 / Chromium 145 (also reproducible in other browsers)
- Database: MySQL 8.0.45
Impact
This is a critical bug — it is impossible to create vendors or items through the UI. All forms with currency or account dropdowns are likely affected.
关闭于 2026-03-07 1 条评论