fix purchase order input bug

This commit is contained in:
omair saleh
2021-12-19 19:47:37 +08:00
parent 6e194a0479
commit ba526fbf47
@@ -10,9 +10,9 @@
</div>
<div class="row m-b-10">
<div class="col">
<validation-wrapper-component :validator="$v.fix_amount">
<validation-wrapper-component :validator="$v.parameters.fix_amount">
<label class="muted">Booking Amount ({{parameters.fixed_currency.short_code}})</label>
<input type="text" class="form-control" v-model="(Math.round((fix_amount+ Number.EPSILON) * 100) / 100).toFixed(2)" v-money="money">
<input type="text" class="form-control" v-model="(Math.round((parameters.fix_amount + Number.EPSILON) * 100) / 100).toFixed(2)" v-money="money">
</validation-wrapper-component>
</div>
</div>
@@ -41,16 +41,16 @@
export default {
data(){
return {
error: '',
fix_amount: (Math.round((this.data.amount + Number.EPSILON) * 100) / 100).toFixed(2),
error: ''
}
},
validations: {
fix_amount: { required },
parameters: {
fix_amount: { required }
},
},
methods: {
submitForm(){
this.parameters = {fix_amount: this.fix_amount},
this.submit(this.route('api.booking.booking_amount.update', this.data.id), 'put', this.section, true, true)
},
successHandler(){