Merge branch 'development'

This commit is contained in:
Chika 2022-06-09 09:47:38 +03:00
commit c5580ec1eb

View File

@ -64,6 +64,12 @@ export default function (this: ICalculationStore) {
const isNew = !this.getValue('leaseObjectUsed');
const vehicleYear = this.getValue('leaseObjectYear');
let vehicleDate;
if (this.getValue('leaseObjectUsed')) {
vehicleDate = new Date(`${vehicleYear}-01-01`);
}
let vehicleDateSpecified = getSpecified(vehicleDate);
const power = this.getValue('leaseObjectMotorPower');
const powerSpecified = getSpecified(power);
@ -226,6 +232,8 @@ export default function (this: ICalculationStore) {
isNew,
usageStart: currentDate,
vehicleYear,
vehicleDate,
vehicleDateSpecified,
modification: {
power,
powerSpecified,