feat: widget icons, dark theme tables, breadcrumb removal, bookkeeping rework, personal equipment pages, PDF/order improvements
This commit is contained in:
@@ -1019,12 +1019,12 @@ async function stornoTransaktion(id: number, userId: string) {
|
||||
try {
|
||||
const result = await pool.query(
|
||||
`UPDATE buchhaltung_transaktionen
|
||||
SET status = 'storniert'
|
||||
SET status = 'entwurf'
|
||||
WHERE id = $1 AND status IN ('gebucht', 'freigegeben')
|
||||
RETURNING *`,
|
||||
[id, userId]
|
||||
);
|
||||
if (result.rows[0]) await logAudit(id, 'storniert', {}, userId);
|
||||
if (result.rows[0]) await logAudit(id, 'storniert_zu_entwurf', {}, userId);
|
||||
return result.rows[0] || null;
|
||||
} catch (error) {
|
||||
logger.error('BuchhaltungService.stornoTransaktion failed', { error, id });
|
||||
|
||||
Reference in New Issue
Block a user