fix sales report decimals

This commit is contained in:
omair saleh
2021-10-06 21:49:05 +08:00
parent 0a5aa9843d
commit d2485eaae7
@@ -19,15 +19,15 @@
<div class="col-xs-height col-top">
<div class="p-l-20 p-t-50 p-b-40 p-r-20">
<h3 class="no-margin p-b-5">{{(Math.ceil(report.total_cbm * 1000) / 1000).toFixed(3)}}</h3>
<span class="small hint-text pull-left">{{ Math.ceil((((report.total_cbm / 1000) * 100) * 100) / 100).toFixed(2)}}%</span>
<span class="pull-right small text-primary">Goal: 1000 CBM</span>
<span class="small hint-text pull-left">{{ (report.total_cbm / 800).toFixed(2)}}%</span>
<span class="pull-right small text-primary">Goal: 800 CBM</span>
</div>
</div>
</div>
<div class="row-xs-height">
<div class="col-xs-height col-bottom">
<div class="progress progress-small m-b-0">
<div class="progress-bar progress-bar-primary" :style="{'width': Math.ceil((((report.total_cbm / 1000) * 100) * 100) / 100).toFixed(2)+'%'}"></div>
<div class="progress-bar progress-bar-primary" :style="{'width': (report.total_cbm / 800).toFixed(2)+'%'}"></div>
</div>
</div>
</div>
@@ -50,7 +50,7 @@
<div class="col-xs-height col-top">
<div class="p-l-20 p-t-50 p-b-40 p-r-20">
<h3 class="no-margin p-b-5">{{report.activated_orders}}</h3>
<span class="small hint-text pull-left">{{ Math.ceil((((report.activated_orders / report.total_orders) * 100) * 100) / 100).toFixed(2)}}%</span>
<span class="small hint-text pull-left">{{ (report.activated_orders / report.total_orders).toFixed(2)}}%</span>
<span class="pull-right small text-primary">Created Orders: {{report.total_orders}}</span>
</div>
</div>
@@ -58,7 +58,7 @@
<div class="row-xs-height">
<div class="col-xs-height col-bottom">
<div class="progress progress-small m-b-0">
<div class="progress-bar progress-bar-primary" :style="{'width': Math.ceil((((report.activated_orders / report.total_orders) * 100) * 100) / 100).toFixed(2)+'%'}"></div>
<div class="progress-bar progress-bar-primary" :style="{'width': (report.activated_orders / report.total_orders).toFixed(2)+'%'}"></div>
</div>
</div>
</div>
@@ -81,7 +81,7 @@
<div class="col-xs-height col-top">
<div class="p-l-20 p-t-50 p-b-40 p-r-20">
<h3 class="no-margin p-b-5">{{report.active_customers}}</h3>
<span class="small hint-text pull-left">{{ Math.ceil((((report.active_customers / report.total_customers) * 100) * 100) / 100).toFixed(2)}}%</span>
<span class="small hint-text pull-left">{{ (report.active_customers / report.total_customers).toFixed(2)}}%</span>
<span class="pull-right small text-primary">Total Customers: {{report.total_customers}}</span>
</div>
</div>
@@ -89,7 +89,7 @@
<div class="row-xs-height">
<div class="col-xs-height col-bottom">
<div class="progress progress-small m-b-0">
<div class="progress-bar progress-bar-primary" :style="{'width': Math.ceil((((report.active_customers / report.total_customers) * 100) * 100) / 100).toFixed(2)+'%'}"></div>
<div class="progress-bar progress-bar-primary" :style="{'width': (report.active_customers / report.total_customers).toFixed(2)+'%'}"></div>
</div>
</div>
</div>
@@ -112,7 +112,7 @@
<div class="col-xs-height col-top">
<div class="p-l-20 p-t-50 p-b-40 p-r-20">
<h3 class="no-margin p-b-5">{{report.new_customers}}</h3>
<span class="small hint-text pull-left">{{ Math.ceil((((report.new_converted_customers / report.new_customers) * 100) * 100) / 100).toFixed(2)}}%</span>
<span class="small hint-text pull-left">{{ (report.new_converted_customers / report.new_customers).toFixed(2)}}%</span>
<span class="pull-right small text-primary">Confirmed Order: {{report.new_converted_customers}}</span>
</div>
</div>
@@ -120,7 +120,7 @@
<div class="row-xs-height">
<div class="col-xs-height col-bottom">
<div class="progress progress-small m-b-0">
<div class="progress-bar progress-bar-primary" :style="{'width': Math.ceil((((report.new_converted_customers / report.new_customers) * 100) * 100) / 100).toFixed(2)+'%'}"></div>
<div class="progress-bar progress-bar-primary" :style="{'width': (report.new_converted_customers / report.new_customers).toFixed(2)+'%'}"></div>
</div>
</div>
</div>