R72-A2 修复报销撤回释放绑定发票并补测试
这个提交包含在:
@@ -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,
|
||||
};
|
||||
});
|
||||
|
||||
|
||||
在新工单中引用
屏蔽一个用户