mirror of
https://github.com/hotspotbilling/phpnuxbill.git
synced 2025-08-03 17:54:41 +02:00
reset_day
This commit is contained in:
parent
703593d5e2
commit
d758ea2b11
2 changed files with 12 additions and 4 deletions
|
@ -20,10 +20,17 @@ if(isset($_GET['refresh'])){
|
|||
r2(U . 'dashboard', 's', 'Data Refreshed');
|
||||
}
|
||||
|
||||
$fdate = date('Y-m-01');
|
||||
$tdate = date('Y-m-t');
|
||||
$reset_day = $config['reset_day'];
|
||||
if(empty($reset_day)){
|
||||
$reset_day = 1;
|
||||
}
|
||||
|
||||
//first day of month
|
||||
$first_day_month = date('Y-m-01');
|
||||
if($reset_day >= date("d")){
|
||||
$first_day_month = date('Y-m-'.$reset_day);
|
||||
}else{
|
||||
$first_day_month = date('Y-m-'.$reset_day, strtotime("-1 MONTH"));
|
||||
}
|
||||
$mdate = date('Y-m-d');
|
||||
$month_n = date('n');
|
||||
|
||||
|
@ -194,6 +201,7 @@ if (file_exists($cacheMSfile) && time() - filemtime($cacheMSfile) < 43200) {
|
|||
}
|
||||
|
||||
// Assign the monthly sales data to Smarty
|
||||
$ui->assign('first_day_month',$first_day_month);
|
||||
$ui->assign('monthlySales', $monthlySales);
|
||||
$ui->assign('xfooter', '');
|
||||
$ui->assign('monthlyRegistered', $monthlyRegistered);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue