Add first_operation_date method and update date handling in Finances class
This commit is contained in:
20
.vscode/ftp-kr.sync.cache.json
vendored
20
.vscode/ftp-kr.sync.cache.json
vendored
@@ -498,6 +498,26 @@
|
||||
"lmtime": 0,
|
||||
"modified": false
|
||||
}
|
||||
},
|
||||
"wiki": {
|
||||
"category-edit.php": {
|
||||
"type": "-",
|
||||
"size": 3635,
|
||||
"lmtime": 1738095324002,
|
||||
"modified": false
|
||||
},
|
||||
"category-preview.php": {
|
||||
"type": "-",
|
||||
"size": 883,
|
||||
"lmtime": 1738095479467,
|
||||
"modified": false
|
||||
},
|
||||
"main-view.php": {
|
||||
"type": "-",
|
||||
"size": 3541,
|
||||
"lmtime": 0,
|
||||
"modified": false
|
||||
}
|
||||
}
|
||||
},
|
||||
"upload": {}
|
||||
|
||||
@@ -170,7 +170,7 @@ class Finances
|
||||
$dates = \S::get_session( 'finance-dates' );
|
||||
$dates = explode( '_-_', $dates );
|
||||
|
||||
$dates[0] ? $date_from = $dates[0] : $date_from = date( 'Y-m-01' );
|
||||
$dates[0] ? $date_from = $dates[0] : $date_from = \factory\Finances::first_operation_date();
|
||||
$dates[1] ? $date_to = $dates[1] : $date_to = date( 'Y-m-t' );
|
||||
|
||||
if ( $group_id == 3 )
|
||||
|
||||
@@ -2,6 +2,12 @@
|
||||
namespace factory;
|
||||
class Finances
|
||||
{
|
||||
static public function first_operation_date()
|
||||
{
|
||||
global $mdb;
|
||||
return $mdb -> get( 'finance_operations', 'date', [ 'ORDER' => [ 'date' => 'ASC' ] ] );
|
||||
}
|
||||
|
||||
static public function get_operation_tags( int $operation_id )
|
||||
{
|
||||
global $mdb;
|
||||
|
||||
Reference in New Issue
Block a user