fix(billing): compute plan expiry with Jalali months

Server/plugin/support charges used Gregorian Date#setMonth, so 3 months from 1405/06/01 became 1405/09/02. Now add N Jalali months minus one day (1405/08/30).
This commit is contained in:
2026-08-24 18:03:54 +03:30
parent 83f5834aff
commit 67281710ac
6 changed files with 103 additions and 36 deletions
+18
View File
@@ -21,6 +21,7 @@
"bcrypt": "5.1.1",
"class-transformer": "^0.5.1",
"class-validator": "^0.14.2",
"jalaali-js": "^2.0.1",
"mysql2": "^3.23.1",
"passport": "^0.7.0",
"passport-jwt": "^4.0.1",
@@ -35,6 +36,7 @@
"@nestjs/testing": "^11.0.1",
"@types/bcrypt": "5.0.2",
"@types/express": "^5.0.0",
"@types/jalaali-js": "^1.2.0",
"@types/jest": "^30.0.0",
"@types/multer": "^2.2.0",
"@types/node": "^22.0.0",
@@ -3007,6 +3009,13 @@
"@types/istanbul-lib-report": "*"
}
},
"node_modules/@types/jalaali-js": {
"version": "1.2.0",
"resolved": "https://registry.npmmirror.com/@types/jalaali-js/-/jalaali-js-1.2.0.tgz",
"integrity": "sha512-DRQKjbfFe0/v3siCou9eFzYjDxJItkJpxbU+/CSptvoRqq2/VmTA6y8QvqK/VELKW6xX3qb174nLZlrFV9OT3Q==",
"dev": true,
"license": "MIT"
},
"node_modules/@types/jest": {
"version": "30.0.0",
"resolved": "https://registry.npmmirror.com/@types/jest/-/jest-30.0.0.tgz",
@@ -7058,6 +7067,15 @@
"@pkgjs/parseargs": "^0.11.0"
}
},
"node_modules/jalaali-js": {
"version": "2.0.1",
"resolved": "https://registry.npmmirror.com/jalaali-js/-/jalaali-js-2.0.1.tgz",
"integrity": "sha512-qzTmjw6lZ3V4znyNA8ceYoGgFR+CcF+xEfIYZNcK2ZR0mzdMpMZ6iAcdRPvMgxUVdPMh6QLWCANpTcCJow2U+Q==",
"license": "MIT",
"engines": {
"node": ">=20"
}
},
"node_modules/jest": {
"version": "30.4.2",
"resolved": "https://registry.npmmirror.com/jest/-/jest-30.4.2.tgz",