1 | <?php |
||
20 | class AccountingData |
||
21 | { |
||
22 | |||
23 | |||
24 | |||
25 | public function _construct(){ |
||
28 | |||
29 | /** |
||
30 | * Get sum of total income |
||
31 | */ |
||
32 | public function total_sum_Income() : int |
||
36 | |||
37 | |||
38 | /** |
||
39 | * @param int $category |
||
40 | * @return int |
||
41 | * function gets sum of an income by a given category .. |
||
42 | */ |
||
43 | public function sumOfIncomeByCategory(int $category) : int |
||
47 | |||
48 | |||
49 | /** |
||
50 | * @param int $category |
||
51 | * @return int |
||
52 | * function gets sum of an expense by a given category .. |
||
53 | */ |
||
54 | public function sumOfExpenseByCategory(int $category) : int |
||
58 | |||
59 | /** |
||
60 | * @return int |
||
61 | * |
||
62 | * function gets the total income for the current month |
||
63 | */ |
||
64 | public function total_sum_of_income_this_month() : int |
||
68 | |||
69 | /** |
||
70 | * @return int |
||
71 | * function that gets the total_sum_of_all_expense |
||
72 | */ |
||
73 | public function total_sum_Expense() :int |
||
77 | |||
78 | /** |
||
79 | * @return int |
||
80 | * function that gets total expense for the current month |
||
81 | */ |
||
82 | public function totalExpenseThisMonth() : int |
||
86 | |||
87 | |||
88 | /** |
||
89 | * @return int |
||
90 | * function that gets totalincome of the current year |
||
91 | */ |
||
92 | public function totalIncomeThisYear() : int |
||
96 | |||
97 | /** |
||
98 | * @return int |
||
99 | * |
||
100 | *sum_of_total_income_last_year |
||
101 | */ |
||
102 | public function sum_of_total_income_last_year() : int |
||
109 | |||
110 | /** |
||
111 | * @return int |
||
112 | * |
||
113 | * sum_of_total_income_last_month |
||
114 | */ |
||
115 | |||
116 | public function sum_of_total_income_last_month() : int |
||
123 | |||
124 | |||
125 | /** |
||
126 | * @return int |
||
127 | * |
||
128 | * function that |
||
129 | */ |
||
130 | public function sum_of_expense_this_year() : int |
||
134 | |||
135 | /** |
||
136 | * @return ExpenseCategory[]|\Illuminate\Database\Eloquent\Collection |
||
137 | * |
||
138 | * Function to return all Expense Categories |
||
139 | */ |
||
140 | public function getExpenseCategories() |
||
144 | |||
145 | |||
146 | /** |
||
147 | * @return IncomeCategory[]|\Illuminate\Database\Eloquent\Collection |
||
148 | * Function to return all IncomeCategories |
||
149 | */ |
||
150 | public function getIncomeCategories() |
||
154 | |||
155 | |||
156 | /** |
||
157 | * @param $incomeid |
||
158 | * @return Income |
||
159 | * |
||
160 | * Function to return specific income instance per income if passed |
||
161 | */ |
||
162 | public function getIncomeById($incomeid) : Income |
||
167 | |||
168 | |||
169 | /** |
||
170 | * @param $expenseid |
||
171 | * @return Expense |
||
172 | * Function to return specific expense instance per expense id passed |
||
173 | */ |
||
174 | public function getExpenseById($expenseid) : Expense |
||
179 | |||
180 | /** |
||
181 | * @return Expense[]|\Illuminate\Database\Eloquent\Collection |
||
182 | * function to get all expenses |
||
183 | */ |
||
184 | public function getAllExpenses(){ |
||
188 | |||
189 | |||
190 | /** |
||
191 | * @return Income[]|\Illuminate\Database\Eloquent\Collection |
||
192 | * function to get all incomes |
||
193 | */ |
||
194 | public function getAllIncomes() |
||
199 | |||
200 | |||
201 | public function getIncomeCategoryIdByName($categoryname){ |
||
205 | |||
206 | |||
207 | public function getExpenseCategoryIdByName($categoryname){ |
||
211 | |||
212 | public function getIncomeOnDateRange($from_date,$to_date){ |
||
218 | |||
219 | |||
220 | public function getIncomeOnDateRangeFromIncomeType($from_date,$to_date,$income_type) |
||
228 | |||
229 | |||
230 | public function getExpensesOnDateRange($from_date,$to_date){ |
||
236 | |||
237 | public function getExpensesOnDateRangeFromExpenseType($from_date,$to_date,$expense_type) |
||
245 | |||
246 | |||
247 | |||
248 | } |
||
249 |