R72-A2 修复报销撤回释放绑定发票并补测试

这个提交包含在:
2026-04-28 19:40:30 +08:00
父节点 dea83b892f
当前提交 fb60e65322
共修改 2 个文件,包含 319 行新增和 0 行删除
+14
查看文件
@@ -3075,6 +3075,19 @@ async function reimbursementRoutes(fastify) {
},
});
const unbound = await tx.invoicePool.updateMany({
where: {
linked_reimbursement_id: reimbursementId,
status: "bound",
},
data: {
status: "available",
linked_reimbursement_id: null,
linked_item_id: null,
updated_by: request.employee.id,
},
});
await tx.reimbursementForm.update({
where: { id: reimbursementId },
data: {
@@ -3100,6 +3113,7 @@ async function reimbursementRoutes(fastify) {
outcome: "withdrawn",
workflowInstanceId: activeInstance.id,
reimbursementStatus: "draft",
unboundInvoiceCount: unbound.count,
};
});