1 | <?php |
||
24 | class Queries extends Stats |
||
25 | { |
||
26 | |||
27 | public function orders() |
||
32 | |||
33 | |||
34 | public function orders_orderby($orderby) |
||
37 | |||
38 | |||
39 | |||
40 | public function orders_today() |
||
44 | |||
45 | |||
46 | |||
47 | public function orders_todayByStatus($status) |
||
51 | |||
52 | |||
53 | |||
54 | public function orders_thisMonth() |
||
58 | |||
59 | public function orders_thisMonthByStatus($status) |
||
63 | |||
64 | |||
65 | |||
66 | public function orders_thisYear() |
||
71 | |||
72 | |||
73 | public function orders_thisYearByStatus($status) |
||
78 | |||
79 | |||
80 | public function get_orders_with_status($status) |
||
84 | |||
85 | public function pending_orders() |
||
89 | |||
90 | public function cancelled_orders() |
||
94 | |||
95 | public function completed_orders() |
||
99 | |||
100 | public function getOrderById($orderid) |
||
104 | |||
105 | public function getOrdersOnDate($date) |
||
109 | |||
110 | |||
111 | public function getOrdersOnDateRange($startdate, $enddate) |
||
114 | |||
115 | |||
116 | /** Function to get an invoice */ |
||
117 | public function getInvoiceById($invoiceid) |
||
121 | |||
122 | |||
123 | /** Function to get an invoice */ |
||
124 | public function getInvoiceByOrderId($orderid) |
||
128 | |||
129 | |||
130 | |||
131 | /** |
||
132 | * |
||
133 | * User Queries |
||
134 | */ |
||
135 | |||
136 | |||
137 | /** Function to get given user orders */ |
||
138 | public function getUserOrders($userid) |
||
142 | |||
143 | |||
144 | /** Function to get given user orders by status */ |
||
145 | public function getUserOrdersByStatus($userid, $status) |
||
149 | |||
150 | |||
151 | |||
152 | |||
153 | /** Function to get orders by status */ |
||
154 | public function getOrdersByStatus( $status) |
||
158 | |||
159 | |||
160 | |||
161 | /** Function to get given user invoices */ |
||
162 | public function getUserInvoices($userid) |
||
166 | |||
167 | |||
168 | /** Function that returns total number of user invoices */ |
||
169 | public function totalUserInvoices($userid): int |
||
173 | |||
174 | |||
175 | |||
176 | |||
177 | /** Function to get given user invoices by status */ |
||
178 | public function getUserInvoiceByStatus($userid, $status) |
||
182 | |||
183 | |||
184 | |||
185 | |||
186 | /** Function to get given all invoices by status */ |
||
187 | public function getInvoiceByStatus( $status) |
||
191 | |||
192 | |||
193 | /** |
||
194 | * @param $userid |
||
195 | * @param $status |
||
196 | * @return mixed |
||
197 | * Function to get given user invoices by status |
||
198 | */ |
||
199 | public function sumUserInvoiceByStatus($userid, $status) : int |
||
203 | |||
204 | |||
205 | |||
206 | |||
207 | |||
208 | /** |
||
209 | * @param $userid |
||
210 | * @param $status |
||
211 | * @return mixed |
||
212 | * Function to get given user invoices by status |
||
213 | */ |
||
214 | public function totalUserInvoiceByStatus($userid, $status) |
||
218 | |||
219 | /** Function that gets full billing history */ |
||
220 | |||
221 | public function getAllBillingHistory() |
||
226 | |||
227 | |||
228 | /** Function that gets full user billing history*/ |
||
229 | |||
230 | public function getUserBillingHistory($userid) |
||
235 | |||
236 | |||
237 | |||
238 | |||
239 | public function getUserBillingHistoryByStartDate($userid, $start_date) |
||
244 | |||
245 | |||
246 | /** Function to get payment history of a given user for a given period */ |
||
247 | |||
248 | public function getUserBillingHistoryBetweenDates($userid, $start_date, $enddate) |
||
253 | |||
254 | |||
255 | /** |
||
256 | * Returns the model instance to be updated |
||
257 | */ |
||
258 | public function updateBillingHistory($invoiceid): BillingPayment |
||
262 | |||
263 | |||
264 | /** |
||
265 | * Returns the model instance to be updated |
||
266 | */ |
||
267 | public function updateInvoiceByInstance($invoiceid): Invoice |
||
271 | |||
272 | /** |
||
273 | * |
||
274 | * Returns updated invoice with new due_date |
||
275 | */ |
||
276 | public function updateDueDate($date, $invoiceid): Invoice |
||
283 | |||
284 | |||
285 | |||
286 | public function getBillingHistoryByStatus($status) |
||
291 | |||
292 | |||
293 | public function getUserBillingHistoryByStatus($userid, $status) |
||
298 | |||
299 | /** Return OrderItems for particular order |
||
300 | *@param $orderid |
||
301 | **/ |
||
302 | public function getOrderItems($orderid) |
||
307 | |||
308 | |||
309 | /** Return OrderItems for particular order gets invoiceid |
||
310 | *@param $invoiceid |
||
311 | **/ |
||
312 | public function getOrderItemsByInvoiceId($invoiceid) |
||
317 | } |
||
318 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.