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