PluginProbe ʕ •ᴥ•ʔ
VikAppointments Services Booking Calendar / 1.2.21
VikAppointments Services Booking Calendar v1.2.21
1.2.21 1.2.20 trunk 1.2.17 1.2.18 1.2.19
vikappointments / admin / views / orderinfo / tmpl / default_payment.php
vikappointments / admin / views / orderinfo / tmpl Last commit date
closure.php 2 days ago default.php 2 days ago default_customer.php 2 days ago default_details.php 2 days ago default_fields.php 2 days ago default_options.php 2 days ago default_payment.php 2 days ago index.html 2 days ago list.php 2 days ago
default_payment.php
292 lines
1 <?php
2 /**
3 * @package VikAppointments
4 * @subpackage core
5 * @author E4J s.r.l.
6 * @copyright Copyright (C) 2021 E4J s.r.l. All Rights Reserved.
7 * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
8 * @link https://vikwp.com
9 */
10
11 // No direct access
12 defined('ABSPATH') or die('No script kiddies please!');
13
14 $currency = VAPFactory::getCurrency();
15
16 ?>
17
18 <h3><?php echo JText::translate('VAPMANAGERESERVATION13'); ?></h3>
19
20 <div class="order-fields">
21
22 <!-- Define role to detect the supported hook -->
23 <!-- {"rule":"customizer","event":"onDisplayViewOrderinfo","key":"payment.start","type":"field"} -->
24
25 <?php
26 // plugins can use the "payment.start" key to introduce custom
27 // HTML before all the payment lines
28 if (isset($this->addons['payment.start']))
29 {
30 echo $this->addons['payment.start'];
31
32 // unset details form to avoid displaying it twice
33 unset($this->addons['payment.start']);
34 }
35 ?>
36
37 <!-- Net -->
38
39 <div class="order-field total-net">
40
41 <label>
42 <?php echo JText::translate('VAPINVTOTAL'); ?>
43 </label>
44
45 <div class="order-field-value">
46 <b><?php echo $currency->format($this->order->totals->net); ?></b>
47 </div>
48
49 </div>
50
51 <?php
52 if ($this->order->totals->payCharge > 0)
53 {
54 ?>
55 <!-- Payment Charge -->
56
57 <div class="order-field payment-charge">
58
59 <label>
60 <?php echo JText::translate('VAPINVPAYCHARGE'); ?>
61 </label>
62
63 <div class="order-field-value">
64 <b><?php echo $currency->format($this->order->totals->payCharge); ?></b>
65 </div>
66
67 </div>
68 <?php
69 }
70
71 if ($this->order->totals->tax > 0)
72 {
73 ?>
74 <!-- Taxes -->
75
76 <div class="order-field total-tax">
77
78 <label>
79 <?php echo JText::translate('VAPINVTAXES'); ?>
80 </label>
81
82 <div class="order-field-value">
83 <b><?php echo $currency->format($this->order->totals->tax); ?></b>
84 </div>
85
86 </div>
87 <?php
88 }
89 ?>
90
91 <!-- Define role to detect the supported hook -->
92 <!-- {"rule":"customizer","event":"onDisplayViewOrderinfo","key":"payment.init","type":"field"} -->
93
94 <?php
95 // plugins can use the "payment.init" key to introduce custom
96 // HTML after the total net and the taxes
97 if (isset($this->addons['payment.init']))
98 {
99 echo $this->addons['payment.init'];
100
101 // unset details form to avoid displaying it twice
102 unset($this->addons['payment.init']);
103 }
104 ?>
105
106 <!-- Paid -->
107
108 <div class="order-field total-paid">
109
110 <label>
111 <?php
112 if ($this->order->payment)
113 {
114 $name = $this->order->payment->name;
115 $icon = $this->order->payment->icon;
116
117 ?><i class="<?php echo $icon; ?> hasTooltip" title="<?php echo $this->escape($name); ?>" style="margin-right:4px;"></i><?php
118 }
119
120 echo JText::translate('VAPORDERPAID');
121 ?>
122 </label>
123
124 <div class="order-field-value">
125 <b><?php echo $currency->format($this->order->totals->paid); ?></b>
126 </div>
127
128 </div>
129
130 <?php
131 if ($this->order->totals->due > 0)
132 {
133 ?>
134 <!-- Due -->
135
136 <div class="order-field total-due">
137
138 <label><?php echo JText::translate('VAPORDERDUE'); ?></label>
139
140 <div class="order-field-value">
141 <b><?php echo $currency->format($this->order->totals->due); ?></b>
142 </div>
143
144 </div>
145 <?php
146 }
147 ?>
148
149 <!-- Define role to detect the supported hook -->
150 <!-- {"rule":"customizer","event":"onDisplayViewOrderinfo","key":"payment.total","type":"field"} -->
151
152 <?php
153 // plugins can use the "payment.total" key to introduce custom
154 // HTML before the grand total
155 if (isset($this->addons['payment.total']))
156 {
157 echo $this->addons['payment.total'];
158
159 // unset details form to avoid displaying it twice
160 unset($this->addons['payment.total']);
161 }
162 ?>
163
164 <!-- Total Cost -->
165
166 <div class="order-field total-cost">
167
168 <label><?php echo JText::translate('VAPORDERDEPOSIT'); ?></label>
169
170 <div class="order-field-value">
171 <b><?php echo $currency->format($this->order->totals->gross); ?></b>
172 </div>
173
174 </div>
175
176 </div>
177
178 <?php
179 if ($this->order->coupon)
180 {
181 $title = JText::translate('VAPMANAGERESERVATION21');
182
183 if ($this->order->coupon->amount)
184 {
185 $title .= ' : ';
186
187 if ($this->order->coupon->type == 1)
188 {
189 $title .= $this->order->coupon->amount . '%';
190 }
191 else
192 {
193 $title .= $currency->format($this->order->coupon->amount);
194 }
195 }
196 ?>
197 <!-- Coupon -->
198
199 <div class="coupon-box">
200
201 <span class="coupon-code">
202 <i class="fas fa-ticket-alt hasTooltip" title="<?php echo $this->escape($title); ?>"></i>
203 <b><?php echo $this->order->coupon->code; ?></b>
204 </span>
205
206 <?php
207 if ($this->order->totals->discount)
208 {
209 ?>
210 <span class="coupon-amount">
211 <?php echo $currency->format($this->order->totals->discount); ?>
212 </span>
213 <?php
214 }
215 ?>
216
217 </div>
218 <?php
219 }
220
221 if ($this->order->invoice)
222 {
223 ?>
224 <hr />
225
226 <!-- Invoice -->
227
228 <div class="invoice-record">
229
230 <!-- Invoice Number -->
231
232 <div class="invoice-id">
233 <b><?php echo $this->order->invoice->inv_number; ?></b>
234 </div>
235
236 <!-- Invoice Creation Date -->
237
238 <div class="invoice-date">
239 <?php echo JHtml::fetch('date', $this->order->invoice->createdon, JText::translate('DATE_FORMAT_LC2')); ?>
240 </div>
241
242 <!-- Invoice File -->
243
244 <div class="invoice-download">
245 <a href="<?php echo $this->order->invoice->uri; ?>" target="_blank">
246 <i class="fas fa-file-pdf"></i>
247 </a>
248 </div>
249
250 </div>
251 <?php
252 }
253 ?>
254
255 <!-- Define role to detect the supported hook -->
256 <!-- {"rule":"customizer","event":"onDisplayViewOrderinfo","key":"payment.middle","type":"field"} -->
257
258 <?php
259 // plugins can use the "payment.middle" key to introduce custom
260 // HTML between the coupon code and the payment logs
261 if (isset($this->addons['payment.middle']))
262 {
263 echo $this->addons['payment.middle'];
264
265 // unset details form to avoid displaying it twice
266 unset($this->addons['payment.middle']);
267 }
268
269 if ($this->order->log)
270 {
271 ?>
272 <div class="logs-box">
273 <pre><?php echo $this->order->log; ?></pre>
274 </div>
275 <?php
276 }
277 ?>
278
279 <!-- Define role to detect the supported hook -->
280 <!-- {"rule":"customizer","event":"onDisplayViewOrderinfo","key":"payment.bottom","type":"field"} -->
281
282 <?php
283 // plugins can use the "payment.bottom" key to introduce custom
284 // HTML after the payment logs
285 if (isset($this->addons['payment.bottom']))
286 {
287 echo $this->addons['payment.bottom'];
288
289 // unset details form to avoid displaying it twice
290 unset($this->addons['payment.bottom']);
291 }
292