mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-19 04:23:55 +00:00
clean up wallet
This commit is contained in:
+11
-5
@@ -455,15 +455,15 @@
|
||||
</div>
|
||||
<div class="row" v-if="paymentMethod.id === 'wallet'">
|
||||
<div class="col">
|
||||
<div class="row m-b-10 m-l-0 m-r-0" v-if="data.company.wallet ? data.company.wallet.amount : 0 < (Math.round((calculation.total + Number.EPSILON) * 100) / 100).toFixed(2)">
|
||||
<div class="row m-b-10 m-l-0 m-r-0" v-if="paymentMethod.id === 'wallet' && walletOutstanding < 0">
|
||||
<div class="col bg-danger-lighter">
|
||||
<h6 class="text-danger fs-14 m-b-0">You don't have sufficient credit in your wallet to complete this transaction. Please Reload your wallet.</h6>
|
||||
<h6 class="text-danger fs-14 bold">You don't have sufficient credit in your wallet to complete this transaction. Please Reload your wallet.</h6>
|
||||
<p class="text-complete fs-12 text-underline pointer" @click="calculation = ''">change the payment method?</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row m-b-20" v-if="data.company.wallet ? data.company.wallet.amount : 0 < (Math.round((calculation.total + Number.EPSILON) * 100) / 100).toFixed(2)">
|
||||
<div class="row m-b-20" v-if="paymentMethod.id === 'wallet' && walletOutstanding < 0">
|
||||
<div class="col">
|
||||
<wallet-component :data="data.company" :amount="(Math.round((calculation.total + Number.EPSILON) * 100) / 100).toFixed(2)"></wallet-component>
|
||||
<wallet-top-up-form-component :data="data.company" :amount="(Math.round(((walletOutstanding * -1)+ Number.EPSILON) * 100) / 100).toFixed(2)"></wallet-top-up-form-component>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -475,7 +475,7 @@
|
||||
<button class="btn btn-sm all-caps b-rad-none btn-default bg-master-lighter btn-block" @click="cancelQuotation()">Cancel</button>
|
||||
</div>
|
||||
<div class="col p-l-0" >
|
||||
<button class="btn btn-sm all-caps b-rad-none btn-success btn-block requestModal" data-type="paymentSummary" v-if="!(paymentMethod.id === 'wallet' && data.company.wallet ? data.company.wallet.amount : 0 < (Math.round((calculation.total + Number.EPSILON) * 100) / 100).toFixed(2))">Lock Booking</button>
|
||||
<button class="btn btn-sm all-caps b-rad-none btn-success btn-block requestModal" data-type="paymentSummary" v-if="paymentMethod.id !== 'wallet' || walletOutstanding >= 0">Lock Booking</button>
|
||||
</div>
|
||||
<modal-component v-if="calculation.total > 0" class="animate__animated animate__fast animate__fadeIn" styleType="fill-in" type="paymentSummary">
|
||||
<confirm-quotation-form-component v-on:cancelQuotation="cancelQuotation()" :calculation="calculation" :section="section" :id="item.id" :payment_method="paymentMethod.id" :bank_code="onlinePayment.id" :amount="amount"></confirm-quotation-form-component>
|
||||
@@ -524,6 +524,12 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
walletOutstanding(){
|
||||
let walletBalance = this.data.company.wallet ? this.data.company.wallet.amount : 0;
|
||||
return walletBalance - this.calculation.total;
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
updatePaymentType(payment){
|
||||
this.paymentMethod = {
|
||||
|
||||
Reference in New Issue
Block a user