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 | public function get_orders_with_status($status) |
||
50 | |||
51 | public function pending_orders() |
||
55 | |||
56 | public function cancelled_orders() |
||
60 | |||
61 | public function completed_orders() |
||
65 | |||
66 | public function getOrderById($orderid) |
||
70 | |||
71 | public function getOrdersOnDate($date) |
||
75 | |||
76 | |||
77 | public function getOrdersOnDateRange($startdate, $enddate) |
||
80 | |||
81 | |||
82 | /** Function to get an invoice */ |
||
83 | public function getInvoiceById($invoiceid) |
||
87 | |||
88 | |||
89 | /** Function to get an invoice */ |
||
90 | public function getInvoiceByOrderId($orderid) |
||
94 | |||
95 | |||
96 | |||
97 | /** |
||
98 | * |
||
99 | * User Queries |
||
100 | */ |
||
101 | |||
102 | |||
103 | /** Function to get given user orders */ |
||
104 | public function getUserOrders($userid) |
||
108 | |||
109 | |||
110 | /** Function to get given user orders by status */ |
||
111 | public function getUserOrdersByStatus($userid, $status) |
||
115 | |||
116 | |||
117 | |||
118 | |||
119 | /** Function to get orders by status */ |
||
120 | public function getOrdersByStatus( $status) |
||
124 | |||
125 | |||
126 | |||
127 | /** Function to get given user invoices */ |
||
128 | public function getUserInvoices($userid) |
||
132 | |||
133 | |||
134 | /** Function that returns total number of user invoices */ |
||
135 | public function totalUserInvoices($userid): int |
||
139 | |||
140 | |||
141 | |||
142 | |||
143 | /** Function to get given user invoices by status */ |
||
144 | public function getUserInvoiceByStatus($userid, $status) |
||
148 | |||
149 | |||
150 | |||
151 | |||
152 | /** Function to get given all invoices by status */ |
||
153 | public function getInvoiceByStatus( $status) |
||
157 | |||
158 | |||
159 | /** |
||
160 | * @param $userid |
||
161 | * @param $status |
||
162 | * @return mixed |
||
163 | * Function to get given user invoices by status |
||
164 | */ |
||
165 | public function sumUserInvoiceByStatus($userid, $status) : int |
||
169 | |||
170 | |||
171 | |||
172 | |||
173 | |||
174 | /** |
||
175 | * @param $userid |
||
176 | * @param $status |
||
177 | * @return mixed |
||
178 | * Function to get given user invoices by status |
||
179 | */ |
||
180 | public function totalUserInvoiceByStatus($userid, $status) |
||
184 | |||
185 | /** Function that gets full billing history */ |
||
186 | |||
187 | public function getAllBillingHistory() |
||
192 | |||
193 | |||
194 | /** Function that gets full user billing history*/ |
||
195 | |||
196 | public function getUserBillingHistory($userid) |
||
201 | |||
202 | |||
203 | |||
204 | |||
205 | public function getUserBillingHistoryByStartDate($userid, $start_date) |
||
210 | |||
211 | |||
212 | /** Function to get payment history of a given user for a given period */ |
||
213 | |||
214 | public function getUserBillingHistoryBetweenDates($userid, $start_date, $enddate) |
||
219 | |||
220 | |||
221 | /** |
||
222 | * Returns the model instance to be updated |
||
223 | */ |
||
224 | public function updateBillingHistory($invoiceid): BillingPayment |
||
228 | |||
229 | |||
230 | /** |
||
231 | * Returns the model instance to be updated |
||
232 | */ |
||
233 | public function updateInvoiceByInstance($invoiceid): Invoice |
||
237 | |||
238 | /** |
||
239 | * |
||
240 | * Returns updated invoice with new due_date |
||
241 | */ |
||
242 | public function updateDueDate($date, $invoiceid): Invoice |
||
249 | |||
250 | |||
251 | |||
252 | public function getBillingHistoryByStatus($status) |
||
257 | |||
258 | |||
259 | public function getUserBillingHistoryByStatus($userid, $status) |
||
264 | |||
265 | /** Return OrderItems for particular order |
||
266 | *@param $orderid |
||
267 | **/ |
||
268 | public function getOrderItems($orderid) |
||
273 | |||
274 | |||
275 | /** Return OrderItems for particular order gets invoiceid |
||
276 | *@param $invoiceid |
||
277 | **/ |
||
278 | public function getOrderItemsByInvoiceId($invoiceid) |
||
283 | } |
||
284 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.