Fix Calculation
This commit is contained in:
parent
00ac91903f
commit
80cecabfb0
@ -427,3 +427,4 @@ $_L['Buy_this_your_active_package_will_be_overwrite'] = 'Buy this? your active p
|
|||||||
$_L['Monthly_Registered_Customers'] = 'Monthly Registered Customers';
|
$_L['Monthly_Registered_Customers'] = 'Monthly Registered Customers';
|
||||||
$_L['Total_Monthly_Sales'] = 'Total Monthly Sales';
|
$_L['Total_Monthly_Sales'] = 'Total Monthly Sales';
|
||||||
$_L['Active_Users'] = 'Active Users';
|
$_L['Active_Users'] = 'Active Users';
|
||||||
|
$_L['All_Users_Insights'] = 'All Users Insights';
|
||||||
|
@ -192,8 +192,8 @@
|
|||||||
|
|
||||||
<script src="https://cdn.jsdelivr.net/npm/chart.js@3.5.1/dist/chart.min.js"></script>
|
<script src="https://cdn.jsdelivr.net/npm/chart.js@3.5.1/dist/chart.min.js"></script>
|
||||||
{literal}
|
{literal}
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
document.addEventListener("DOMContentLoaded", function () {
|
document.addEventListener("DOMContentLoaded", function() {
|
||||||
var counts = JSON.parse('{/literal}{$counts|json_encode}{literal}');
|
var counts = JSON.parse('{/literal}{$counts|json_encode}{literal}');
|
||||||
|
|
||||||
var monthNames = [
|
var monthNames = [
|
||||||
@ -241,10 +241,10 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
document.addEventListener("DOMContentLoaded", function () {
|
document.addEventListener("DOMContentLoaded", function() {
|
||||||
var monthlySales = JSON.parse('{/literal}{$monthlySales|json_encode}{literal}');
|
var monthlySales = JSON.parse('{/literal}{$monthlySales|json_encode}{literal}');
|
||||||
|
|
||||||
var monthNames = [
|
var monthNames = [
|
||||||
@ -303,20 +303,20 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
document.addEventListener("DOMContentLoaded", function () {
|
document.addEventListener("DOMContentLoaded", function() {
|
||||||
// Get the data from PHP and assign it to JavaScript variables
|
// Get the data from PHP and assign it to JavaScript variables
|
||||||
var u_act = '{/literal}{$u_act}{literal}';
|
var u_act = '{/literal}{$u_act}{literal}';
|
||||||
var c_all = '{/literal}{$c_all}{literal}';
|
var c_all = '{/literal}{$c_all}{literal}';
|
||||||
var u_all = '{/literal}{$u_all}{literal}';
|
var u_all = '{/literal}{$u_all}{literal}';
|
||||||
//lets calculate the inactive users as reported
|
//lets calculate the inactive users as reported
|
||||||
var inactive = u_all - u_act;
|
var expired = u_all - u_act;
|
||||||
|
var inactive = c_all - u_all;
|
||||||
// Create the chart data
|
// Create the chart data
|
||||||
var data = {
|
var data = {
|
||||||
labels: ['Active Users', 'Inactive Users', 'Total Users'],
|
labels: ['Active Users', 'Expired Users', 'Inactive Users'],
|
||||||
datasets: [{
|
datasets: [{
|
||||||
label: 'User Recharges',
|
label: 'User Recharges',
|
||||||
data: [parseInt(u_act), parseInt(inactive), parseInt(c_all)],
|
data: [parseInt(u_act), parseInt(expired), parseInt(inactive)],
|
||||||
backgroundColor: ['rgba(4, 191, 13)', 'rgba(191, 35, 4)', 'rgba(0, 0, 255, 0.5'],
|
backgroundColor: ['rgba(4, 191, 13)', 'rgba(191, 35, 4)', 'rgba(0, 0, 255, 0.5'],
|
||||||
borderColor: ['rgba(0, 255, 0, 1)', 'rgba(255, 99, 132, 1)', 'rgba(0, 0, 255, 0.7'],
|
borderColor: ['rgba(0, 255, 0, 1)', 'rgba(255, 99, 132, 1)', 'rgba(0, 0, 255, 0.7'],
|
||||||
borderWidth: 1
|
borderWidth: 1
|
||||||
@ -345,18 +345,18 @@
|
|||||||
options: options
|
options: options
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
{/literal}
|
{/literal}
|
||||||
<script>
|
<script>
|
||||||
window.addEventListener('DOMContentLoaded', function () {
|
window.addEventListener('DOMContentLoaded', function() {
|
||||||
$.getJSON("./version.json?" + Math.random(), function (data) {
|
$.getJSON("./version.json?" + Math.random(), function(data) {
|
||||||
var localVersion = data.version;
|
var localVersion = data.version;
|
||||||
$('#version').html('Version: ' + localVersion);
|
$('#version').html('Version: ' + localVersion);
|
||||||
$.getJSON(
|
$.getJSON(
|
||||||
"https://raw.githubusercontent.com/hotspotbilling/phpnuxbill/master/version.json?" +
|
"https://raw.githubusercontent.com/hotspotbilling/phpnuxbill/master/version.json?" +
|
||||||
Math
|
Math
|
||||||
.random(),
|
.random(),
|
||||||
function (data) {
|
function(data) {
|
||||||
var latestVersion = data.version;
|
var latestVersion = data.version;
|
||||||
if (localVersion !== latestVersion) {
|
if (localVersion !== latestVersion) {
|
||||||
$('#version').html('Latest Version: ' + latestVersion);
|
$('#version').html('Latest Version: ' + latestVersion);
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
{
|
{
|
||||||
"version": "2024.2.5"
|
"version": "2024.2.5.1"
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user