fix: customer code come from wrong data
This commit is contained in:
parent
0c3084cdbf
commit
92aaee2584
1 changed files with 1 additions and 1 deletions
|
|
@ -349,7 +349,7 @@ export class CustomerBranchController extends Controller {
|
||||||
},
|
},
|
||||||
data: {
|
data: {
|
||||||
...rest,
|
...rest,
|
||||||
code: `${"citizenId" in body ? body.citizenId : body.legalPersonNo}-${last.value - 1}`,
|
code: `${runningKey.replace("CUSTOMER_BRANCH_", "")}-${last.value - 1}`,
|
||||||
customer: { connect: { id: customerId } },
|
customer: { connect: { id: customerId } },
|
||||||
province: { connect: provinceId ? { id: provinceId } : undefined },
|
province: { connect: provinceId ? { id: provinceId } : undefined },
|
||||||
district: { connect: districtId ? { id: districtId } : undefined },
|
district: { connect: districtId ? { id: districtId } : undefined },
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue