improper totalAmount comparison, wrong case on object prop
This commit is contained in:
@@ -94,8 +94,8 @@ export default {
|
|||||||
}, '')
|
}, '')
|
||||||
}
|
}
|
||||||
const calculateTotal = (row) => {
|
const calculateTotal = (row) => {
|
||||||
return this.fileHeadingMap.totalAmount === "-1"
|
return this.fileHeadingMap.totalAmount === -1
|
||||||
? (row[this.fileHeadings.fuelQuantity] * row[this.fileHeadings.perUnitPrice]).toFixed(2)
|
? row[this.fileHeadingMap.fuelQuantity] * row[this.fileHeadingMap.perUnitPrice]
|
||||||
: row[this.fileHeadingMap.totalAmount]
|
: row[this.fileHeadingMap.totalAmount]
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -142,7 +142,7 @@ export default {
|
|||||||
try {
|
try {
|
||||||
const content = {
|
const content = {
|
||||||
data: this.csvToJson(),
|
data: this.csvToJson(),
|
||||||
vehicleId: this.selectedVehicle.Id,
|
vehicleId: this.selectedVehicle.id,
|
||||||
timezone: this.getTimezone(),
|
timezone: this.getTimezone(),
|
||||||
}
|
}
|
||||||
axios
|
axios
|
||||||
@@ -180,7 +180,7 @@ export default {
|
|||||||
if (typeof tankFull !== 'boolean' && typeof tankFull === 'string') {
|
if (typeof tankFull !== 'boolean' && typeof tankFull === 'string') {
|
||||||
this.isFullTankString = true
|
this.isFullTankString = true
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
@@ -202,7 +202,9 @@ export default {
|
|||||||
<li>{{ $t('importhintvehiclecreated') }}</li>
|
<li>{{ $t('importhintvehiclecreated') }}</li>
|
||||||
<li v-html="$t('importhintcurrdist')"></li>
|
<li v-html="$t('importhintcurrdist')"></li>
|
||||||
<li v-html="$t('importhintunits')"></li>
|
<li v-html="$t('importhintunits')"></li>
|
||||||
<li><b>{{ $t('dontimportagain') }}</b></li>
|
<li>
|
||||||
|
<b>{{ $t('dontimportagain') }}</b>
|
||||||
|
</li>
|
||||||
</ol>
|
</ol>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -270,8 +272,7 @@ export default {
|
|||||||
</option>
|
</option>
|
||||||
</b-select>
|
</b-select>
|
||||||
</b-field>
|
</b-field>
|
||||||
<b-field
|
<b-field :label="$t('per', { '0': $t('price'), '1': $t('unit.short.' + selectedVehicle.fuelUnitDetail.key) })">
|
||||||
:label="$t('per', { '0': $t('price'), '1': $t('unit.short.' + selectedVehicle.fuelUnitDetail.key) })">
|
|
||||||
<b-select v-model.number="fileHeadingMap.perUnitPrice" type="number" min="0" step=".001" expanded required>
|
<b-select v-model.number="fileHeadingMap.perUnitPrice" type="number" min="0" step=".001" expanded required>
|
||||||
<option v-for="(option, index) in fileHeadings" :key="index" :value="index">
|
<option v-for="(option, index) in fileHeadings" :key="index" :value="index">
|
||||||
{{ option }}
|
{{ option }}
|
||||||
@@ -335,8 +336,7 @@ export default {
|
|||||||
</b-field>
|
</b-field>
|
||||||
<br />
|
<br />
|
||||||
<b-field>
|
<b-field>
|
||||||
<b-button tag="button" native-type="submit" type="is-primary" :value="$t('save')" :label="$t('import')"
|
<b-button tag="button" native-type="submit" type="is-primary" :value="$t('save')" :label="$t('import')" expanded />
|
||||||
expanded />
|
|
||||||
<p v-if="authError"> There was an error logging in to your account. </p>
|
<p v-if="authError"> There was an error logging in to your account. </p>
|
||||||
</b-field>
|
</b-field>
|
||||||
</span>
|
</span>
|
||||||
|
|||||||
Reference in New Issue
Block a user