update
This commit is contained in:
@@ -55,6 +55,23 @@ class FinanceRepository
|
||||
return $this -> mdb -> select( 'crm_client', [ 'id', 'firm' ], [ 'ORDER' => [ 'firm' => 'ASC' ] ] );
|
||||
}
|
||||
|
||||
public function categoriesFlatList()
|
||||
{
|
||||
return $this -> mdb -> select( 'finance_categories', [ 'id', 'name', 'group_id', 'parent_id' ], [
|
||||
'ORDER' => [ 'name' => 'ASC' ]
|
||||
] );
|
||||
}
|
||||
|
||||
public function clientExists( $clientId )
|
||||
{
|
||||
return (bool)$this -> mdb -> has( 'crm_client', [ 'id' => (int)$clientId ] );
|
||||
}
|
||||
|
||||
public function categoryExists( $categoryId )
|
||||
{
|
||||
return (bool)$this -> mdb -> has( 'finance_categories', [ 'id' => (int)$categoryId ] );
|
||||
}
|
||||
|
||||
public function clientsWithRevenue( $date_from, $date_to, $group_id )
|
||||
{
|
||||
return $this -> mdb -> query(
|
||||
|
||||
Reference in New Issue
Block a user