Fair enough!
In a v-for that loops over the lines of the report once it is loaded:
<q-input v-model="reportLine.sales_total" float-label='Sales' type="number" :decimals="2" align="right" @input="calcTotalMobile"/>
The report is loaded via a call to a Web service in created().
Code:
export default {
data () {
return report: {},
},
methods: {
calcTotalMobile: function () {
let daysale = 0
for (let i = 0; i < this.report.reportLines.length; i++) {
daysale += this.report.reportLines[i].sales_total
}
this.report.weekly_sales_total = daysale
}
}
}
If I comment out the line
this.report.weekly_sales_total = daysale
q-input accepts decimals, but not if it is active.