feat: add currency for articles (#834)

Co-authored-by: Jakob Wennberg <jakob.wennberg@gmail.com>
This commit is contained in:
Alexander Reinthal
2026-07-16 16:00:05 +02:00
committed by GitHub
co-authored by Jakob Wennberg
parent 2a1ec5ec2f
commit edef48471c
11 changed files with 193 additions and 6 deletions
+2 -2
View File
@@ -70,8 +70,8 @@ export const PATCH = withRouteContext(
const updateData: Record<string, unknown> = {}
for (const key of [
'name', 'name_en', 'type', 'unit', 'price_excl_vat', 'vat_rate',
'revenue_account', 'cost_price', 'ean', 'housework_type', 'notes',
'article_number', 'active',
'currency', 'revenue_account', 'cost_price', 'ean', 'housework_type',
'notes', 'article_number', 'active',
] as const) {
if (body[key] !== undefined) updateData[key] = body[key]
}
+1
View File
@@ -78,6 +78,7 @@ export const POST = withRouteContext(
unit: body.unit ?? 'st',
price_excl_vat: body.price_excl_vat,
vat_rate: body.vat_rate ?? 25,
currency: body.currency ?? 'SEK',
revenue_account: body.revenue_account ?? null,
cost_price: body.cost_price ?? null,
ean: body.ean ?? null,