@shisyamo4131/air-guard-v2-schemas 2.3.7-dev.13 → 2.3.7-dev.14
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 +23 -14
package/package.json
CHANGED
package/src/OperationBilling.js
CHANGED
|
@@ -181,7 +181,6 @@
|
|
|
181
181
|
* @method delete - Override delete method to allow deletion even when isLocked is true
|
|
182
182
|
*****************************************************************************/
|
|
183
183
|
import OperationResult from "./OperationResult.js";
|
|
184
|
-
import Operation from "./Operation.js";
|
|
185
184
|
|
|
186
185
|
export default class OperationBilling extends OperationResult {
|
|
187
186
|
static className = "稼働請求";
|
|
@@ -192,28 +191,38 @@ export default class OperationBilling extends OperationResult {
|
|
|
192
191
|
{ title: "売上金額", key: "salesAmount", value: "salesAmount" },
|
|
193
192
|
];
|
|
194
193
|
|
|
195
|
-
|
|
196
|
-
|
|
194
|
+
/**
|
|
195
|
+
* Override beforeUpdate to skip `isLocked` check and sync customerId and apply agreement if key changed
|
|
196
|
+
* @returns {Promise<void>}
|
|
197
|
+
*/
|
|
198
|
+
async beforeUpdate() {
|
|
199
|
+
// Sync customerId and apply agreement if key changed
|
|
200
|
+
if (this.key === this._beforeData.key) return;
|
|
201
|
+
await this._syncCustomerIdAndApplyAgreement();
|
|
197
202
|
}
|
|
198
203
|
|
|
199
204
|
/**
|
|
200
|
-
* Override
|
|
201
|
-
* @
|
|
202
|
-
* @returns {Promise<void>}
|
|
205
|
+
* Override create method to disallow creation of OperationBilling instances
|
|
206
|
+
* @returns
|
|
203
207
|
*/
|
|
204
|
-
async
|
|
205
|
-
|
|
206
|
-
|
|
208
|
+
async create() {
|
|
209
|
+
return Promise.reject(
|
|
210
|
+
new Error(
|
|
211
|
+
"[OperationBilling.js] Creation of OperationBilling is not implemented."
|
|
212
|
+
)
|
|
213
|
+
);
|
|
207
214
|
}
|
|
208
215
|
|
|
209
216
|
/**
|
|
210
|
-
* Override delete method to
|
|
211
|
-
* @param {*} options
|
|
217
|
+
* Override delete method to disallow deletion of OperationBilling instances
|
|
212
218
|
* @returns {Promise<void>}
|
|
213
219
|
*/
|
|
214
|
-
async delete(
|
|
215
|
-
|
|
216
|
-
|
|
220
|
+
async delete() {
|
|
221
|
+
return Promise.reject(
|
|
222
|
+
new Error(
|
|
223
|
+
"[OperationBilling.js] Deletion of OperationBilling is not implemented."
|
|
224
|
+
)
|
|
225
|
+
);
|
|
217
226
|
}
|
|
218
227
|
|
|
219
228
|
/**
|