mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-19 04:23:55 +00:00
update
This commit is contained in:
@@ -17,11 +17,14 @@
|
||||
{{item.created_at}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-auto">
|
||||
<div class="font-heading fs-10 muted all-caps">Reference</div>
|
||||
<div class="font-heading fs-10">
|
||||
<a :href="route('booking.details', item.booking.marking)">{{item.booking.marking}}</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col text-right">
|
||||
<div class="font-heading fs-10 muted all-caps">Amount</div>
|
||||
<!-- <div class="font-heading fs-14 text-success bold" v-if="is1688Supplier">
|
||||
{{item.original_currency.short_code}} {{((Math.round(( item.original_amount + Number.EPSILON) * 100) / 100)).toFixed(2).toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",")}}
|
||||
</div> -->
|
||||
<div class="font-heading fs-14 text-success bold">
|
||||
{{item.currency.short_code}} {{((Math.round(( item.amount + Number.EPSILON) * 100) / 100)).toFixed(2).toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",")}}
|
||||
</div>
|
||||
|
||||
@@ -117,7 +117,7 @@
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<div class="row" v-if="(Math.round((poTotal + Number.EPSILON) * 1000) / 1000).toFixed(3) > (Math.round((data.paid_amount + Number.EPSILON) * 1000) / 1000).toFixed(3)">
|
||||
<div class="row" v-if="(Math.round((poTotal + Number.EPSILON) * 1000) / 1000).toFixed(3) > (Math.round((data.amount + Number.EPSILON) * 1000) / 1000).toFixed(3)">
|
||||
<div class="col">
|
||||
<div class="alert alert-warning padding-15" role="alert" v-if="false">
|
||||
<div class="font-heading fs-12 all-caps bold m-b-15">Can't Complete Your Purchase Order ?</div>
|
||||
@@ -140,17 +140,17 @@
|
||||
<h6 class="font-heading all-caps bold">Total:</h6>
|
||||
</div>
|
||||
<div class="col-auto b-t b-grey p-t-10 p-r-0">
|
||||
<h6><span v-if="!submitted" class="bold m-r-5" :class="[{'text-danger' : (Math.round((poTotal + Number.EPSILON) * 1000) / 1000).toFixed(3) !== (Math.round((data.paid_amount + Number.EPSILON) * 1000) / 1000).toFixed(3)}, {'text-success' : (Math.round((this.poTotal + Number.EPSILON) * 1000) / 1000).toFixed(3) === (Math.round((this.data.paid_amount + Number.EPSILON) * 1000) / 1000).toFixed(3)}]">{{(Math.round(( poTotal + Number.EPSILON) * 1000) / 1000).toFixed(3)}}/</span><span class="text-primary bold m-l-5">{{(Math.round((data.paid_amount + Number.EPSILON) * 1000) / 1000).toFixed(3)}} {{data.fixed_currency.short_code}}</span></h6>
|
||||
<h6><span v-if="!submitted" class="bold m-r-5" :class="[{'text-danger' : (Math.round((poTotal + Number.EPSILON) * 1000) / 1000).toFixed(3) !== (Math.round((data.amount + Number.EPSILON) * 1000) / 1000).toFixed(3)}, {'text-success' : (Math.round((this.poTotal + Number.EPSILON) * 1000) / 1000).toFixed(3) === (Math.round((this.data.amount + Number.EPSILON) * 1000) / 1000).toFixed(3)}]">{{(Math.round(( poTotal + Number.EPSILON) * 1000) / 1000).toFixed(3)}}/</span><span class="text-primary bold m-l-5">{{(Math.round((data.amount + Number.EPSILON) * 1000) / 1000).toFixed(3)}} {{data.fixed_currency.short_code}}</span></h6>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" v-if="poTotal > 0 && !submitted">
|
||||
<div class="col">
|
||||
<div class="row m-b-10">
|
||||
<div class="col">
|
||||
<button id="save-purchase-order" name="save-purchase-order" class="btn btn-xs all-caps b-rad-none btn-primary btn-block" @click="submitForm()">{{(Math.round((poTotal + Number.EPSILON) * 1000) / 1000).toFixed(3) !== (Math.round((data.paid_amount + Number.EPSILON) * 1000) / 1000).toFixed(3) ? 'Save Purchase Order' : 'Save & Confirm'}}</button>
|
||||
<button id="save-purchase-order" name="save-purchase-order" class="btn btn-xs all-caps b-rad-none btn-primary btn-block" @click="submitForm()">{{(Math.round((poTotal + Number.EPSILON) * 1000) / 1000).toFixed(3) !== (Math.round((data.amount + Number.EPSILON) * 1000) / 1000).toFixed(3) ? 'Save Purchase Order' : 'Save & Confirm'}}</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" v-if="(Math.round((poTotal + Number.EPSILON) * 1000) / 1000).toFixed(3) !== data.paid_amount">
|
||||
<div class="row" v-if="(Math.round((poTotal + Number.EPSILON) * 1000) / 1000).toFixed(3) !== data.amount">
|
||||
<div class="col">
|
||||
<div class="fs-10">** you purchase order will be saved but wont be approved until your <span class="text-danger bold all-caps">purchase order's total</span> matches your <span class="text-success bold all-caps">transfer order's total</span>.</div>
|
||||
</div>
|
||||
@@ -286,7 +286,7 @@
|
||||
this.submit(route('api.transaction.po.import', this.data.id), 'post', this.section, true, true);
|
||||
},
|
||||
successHandler(){
|
||||
if((Math.round((this.poTotal + Number.EPSILON) * 1000) / 1000).toFixed(3) === (Math.round((this.data.paid_amount + Number.EPSILON) * 1000) / 1000).toFixed(3)){
|
||||
if((Math.round((this.poTotal + Number.EPSILON) * 1000) / 1000).toFixed(3) === (Math.round((this.data.amount + Number.EPSILON) * 1000) / 1000).toFixed(3)){
|
||||
this.submitted = true;
|
||||
}
|
||||
this.updateList()
|
||||
|
||||
Reference in New Issue
Block a user