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 | /** Function to get given user invoices */ |
||
118 | public function getUserInvoices($userid) |
||
122 | |||
123 | |||
124 | /** Function that returns total number of user invoices */ |
||
125 | public function totalUserInvoices($userid): int |
||
129 | |||
130 | |||
131 | |||
132 | |||
133 | /** Function to get given user invoices by status */ |
||
134 | public function getUserInvoiceByStatus($userid, $status) |
||
138 | |||
139 | |||
140 | |||
141 | |||
142 | /** |
||
143 | * @param $userid |
||
144 | * @param $status |
||
145 | * @return mixed |
||
146 | * Function to get given user invoices by status |
||
147 | */ |
||
148 | public function sumUserInvoiceByStatus($userid, $status) : int |
||
152 | |||
153 | |||
154 | |||
155 | |||
156 | |||
157 | /** |
||
158 | * @param $userid |
||
159 | * @param $status |
||
160 | * @return mixed |
||
161 | * Function to get given user invoices by status |
||
162 | */ |
||
163 | public function totalUserInvoiceByStatus($userid, $status) |
||
167 | |||
168 | /** Function that gets full billing history */ |
||
169 | |||
170 | public function getAllBillingHistory() |
||
175 | |||
176 | |||
177 | /** Function that gets full user billing history*/ |
||
178 | |||
179 | public function getUserBillingHistory($userid) |
||
184 | |||
185 | |||
186 | |||
187 | |||
188 | public function getUserBillingHistoryByStartDate($userid, $start_date) |
||
193 | |||
194 | |||
195 | /** Function to get payment history of a given user for a given period */ |
||
196 | |||
197 | public function getUserBillingHistoryBetweenDates($userid, $start_date, $enddate) |
||
202 | |||
203 | |||
204 | /** |
||
205 | * Returns the model instance to be updated |
||
206 | */ |
||
207 | public function updateBillingHistory($invoiceid): BillingPayment |
||
211 | |||
212 | |||
213 | /** |
||
214 | * Returns the model instance to be updated |
||
215 | */ |
||
216 | public function updateInvoiceByInstance($invoiceid): Invoice |
||
220 | |||
221 | /** |
||
222 | * |
||
223 | * Returns updated invoice with new due_date |
||
224 | */ |
||
225 | public function updateDueDate($date, $invoiceid): Invoice |
||
232 | |||
233 | |||
234 | |||
235 | public function getBillingHistoryByStatus($status) |
||
240 | |||
241 | |||
242 | public function getUserBillingHistoryByStatus($userid, $status) |
||
247 | |||
248 | /** Return OrderItems for particular order |
||
249 | *@param $orderid |
||
250 | **/ |
||
251 | public function getOrderItems($orderid) |
||
256 | |||
257 | |||
258 | /** Return OrderItems for particular order gets invoiceid |
||
259 | *@param $invoiceid |
||
260 | **/ |
||
261 | public function getOrderItemsByInvoiceId($invoiceid) |
||
266 | } |
||
267 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.