@shisyamo4131/air-guard-v2-schemas 1.3.1-dev.15 → 1.3.1-dev.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/OperationBilling.js +2 -0
- package/src/OperationResult.js +19 -0
package/package.json
CHANGED
package/src/OperationBilling.js
CHANGED
|
@@ -102,6 +102,8 @@
|
|
|
102
102
|
* - Calculated using the `Tax` utility based on `salesAmount` and `date`.
|
|
103
103
|
* @prop {number} billingAmount - Total billing amount including tax (read-only)
|
|
104
104
|
* - Sum of `salesAmount` and `tax`.
|
|
105
|
+
* @prop {string|null} billingDate - Billing date in YYYY-MM-DD format (read-only)
|
|
106
|
+
* - Returns a string in the format YYYY-MM-DD based on `billingDateAt`.
|
|
105
107
|
* @prop {string} billingMonth - Billing month in YYYY-MM format (read-only)
|
|
106
108
|
* @prop {Array<string>} employeeIds - Array of employee IDs from `employees` (read-only)
|
|
107
109
|
* @prop {Array<string>} outsourcerIds - Array of outsourcer IDs from `outsourcers` (read-only)
|
package/src/OperationResult.js
CHANGED
|
@@ -101,6 +101,8 @@
|
|
|
101
101
|
* - Calculated using the `Tax` utility based on `salesAmount` and `date`.
|
|
102
102
|
* @prop {number} billingAmount - Total billing amount including tax (read-only)
|
|
103
103
|
* - Sum of `salesAmount` and `tax`.
|
|
104
|
+
* @prop {string|null} billingDate - Billing date in YYYY-MM-DD format (read-only)
|
|
105
|
+
* - Returns a string in the format YYYY-MM-DD based on `billingDateAt`.
|
|
104
106
|
* @prop {string} billingMonth - Billing month in YYYY-MM format (read-only)
|
|
105
107
|
* @prop {Array<string>} employeeIds - Array of employee IDs from `employees` (read-only)
|
|
106
108
|
* @prop {Array<string>} outsourcerIds - Array of outsourcer IDs from `outsourcers` (read-only)
|
|
@@ -415,6 +417,23 @@ export default class OperationResult extends Operation {
|
|
|
415
417
|
},
|
|
416
418
|
set(v) {},
|
|
417
419
|
},
|
|
420
|
+
billingDate: {
|
|
421
|
+
configurable: true,
|
|
422
|
+
enumerable: true,
|
|
423
|
+
get() {
|
|
424
|
+
if (!this.billingDateAt) return null;
|
|
425
|
+
const jstDate = new Date(
|
|
426
|
+
this.billingDateAt.getTime() + 9 * 60 * 60 * 1000
|
|
427
|
+
); /* JST補正 */
|
|
428
|
+
const year = jstDate.getUTCFullYear();
|
|
429
|
+
const month = jstDate.getUTCMonth() + 1;
|
|
430
|
+
const day = jstDate.getUTCDate();
|
|
431
|
+
return `${year}-${String(month).padStart(2, "0")}-${String(
|
|
432
|
+
day
|
|
433
|
+
).padStart(2, "0")}`;
|
|
434
|
+
},
|
|
435
|
+
set(v) {},
|
|
436
|
+
},
|
|
418
437
|
billingMonth: {
|
|
419
438
|
configurable: true,
|
|
420
439
|
enumerable: true,
|