1 | <?php |
||
19 | class AccountingData |
||
20 | { |
||
21 | |||
22 | /** |
||
23 | * Get sum of total income |
||
24 | */ |
||
25 | public function total_sum_Income() : int |
||
26 | { |
||
27 | return Income::sum('amount'); |
||
28 | } |
||
29 | |||
30 | |||
31 | /** |
||
32 | * @param int $category |
||
33 | * @return int |
||
34 | * function gets sum of an income by a given category .. |
||
35 | */ |
||
36 | public function sumOfIncomeByCategory(int $category) : int |
||
40 | |||
41 | |||
42 | /** |
||
43 | * @param int $category |
||
44 | * @return int |
||
45 | * function gets sum of an expense by a given category .. |
||
46 | */ |
||
47 | public function sumOfExpenseByCategory(int $category) : int |
||
51 | |||
52 | /** |
||
53 | * @return int |
||
54 | * |
||
55 | * function gets the total income for the current month |
||
56 | */ |
||
57 | public function totalIncomeThisMonth() : int |
||
61 | |||
62 | /** |
||
63 | * @return int |
||
64 | * function that gets the total_sum_of_all_expense |
||
65 | */ |
||
66 | public function total_sum_Expense() :int |
||
70 | |||
71 | public function totalExpenseThisMonth() |
||
75 | |||
76 | public function totalIncomeThisYear() |
||
84 | } |
||
85 |