default.php
3 days ago
default_appointments.php
3 days ago
default_billing.php
3 days ago
default_draft.php
3 days ago
default_notes.php
3 days ago
default_packages.php
3 days ago
index.html
3 days ago
default_billing.php
698 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 | $customer = $this->customer; |
| 15 | |
| 16 | $vik = VAPApplication::getInstance(); |
| 17 | |
| 18 | $canEdit = JFactory::getUser()->authorise('core.edit', 'com_vikappointments'); |
| 19 | |
| 20 | ?> |
| 21 | |
| 22 | <style> |
| 23 | .area-draft-wrapper { |
| 24 | margin-top: 0; |
| 25 | position: relative; |
| 26 | display: flex; |
| 27 | } |
| 28 | .area-draft-wrapper textarea { |
| 29 | width: 100%; |
| 30 | padding-right: 24px; |
| 31 | } |
| 32 | .area-draft-wrapper .draft-tip { |
| 33 | position: absolute; |
| 34 | top: 0px; |
| 35 | right: 8px; |
| 36 | } |
| 37 | .vap-customer-image { |
| 38 | cursor: default; |
| 39 | } |
| 40 | </style> |
| 41 | |
| 42 | <div class="row-fluid"> |
| 43 | |
| 44 | <div class="span6"> |
| 45 | <?php echo $vik->openFieldset(JText::translate('VAPMANAGECUSTOMERTITLE2'), 'form-horizontal'); ?> |
| 46 | |
| 47 | <div class="order-fields extended"> |
| 48 | |
| 49 | <!-- BILLING NAME --> |
| 50 | |
| 51 | <div class="order-field"> |
| 52 | <label><?php echo JText::translate('VAPMANAGECUSTOMER2'); ?></label> |
| 53 | <div class="order-field-value"> |
| 54 | <b><?php echo $customer->billing_name; ?></b> |
| 55 | |
| 56 | <?php |
| 57 | // plugins can use the "billing.name" key to introduce custom |
| 58 | // HTML next to the billing name |
| 59 | if (isset($this->addons['billing.name'])) |
| 60 | { |
| 61 | echo $this->addons['billing.name']; |
| 62 | |
| 63 | // unset details form to avoid displaying it twice |
| 64 | unset($this->addons['billing.name']); |
| 65 | } |
| 66 | ?> |
| 67 | </div> |
| 68 | |
| 69 | <!-- Define role to detect the supported hook --> |
| 70 | <!-- {"rule":"customizer","event":"onDisplayViewCustomerinfo","key":"billing.name","type":"field"} --> |
| 71 | </div> |
| 72 | |
| 73 | <!-- BILLING MAIL --> |
| 74 | |
| 75 | <div class="order-field"> |
| 76 | <label><?php echo JText::translate('VAPMANAGECUSTOMER3'); ?></label> |
| 77 | <div class="order-field-value"> |
| 78 | <b><?php echo $customer->billing_mail; ?></b> |
| 79 | |
| 80 | <?php |
| 81 | if ($customer->billing_mail) |
| 82 | { |
| 83 | ?> |
| 84 | <a href="mailto:<?php echo $this->escape($customer->billing_mail); ?>" style="margin-left:4px;"> |
| 85 | <i class="fas fa-envelope"></i> |
| 86 | </a> |
| 87 | <?php |
| 88 | } |
| 89 | |
| 90 | // plugins can use the "billing.mail" key to introduce custom |
| 91 | // HTML next to the billing mail |
| 92 | if (isset($this->addons['billing.mail'])) |
| 93 | { |
| 94 | echo $this->addons['billing.mail']; |
| 95 | |
| 96 | // unset details form to avoid displaying it twice |
| 97 | unset($this->addons['billing.mail']); |
| 98 | } |
| 99 | ?> |
| 100 | </div> |
| 101 | |
| 102 | <!-- Define role to detect the supported hook --> |
| 103 | <!-- {"rule":"customizer","event":"onDisplayViewCustomerinfo","key":"billing.mail","type":"field"} --> |
| 104 | </div> |
| 105 | |
| 106 | <!-- BILLING PHONE --> |
| 107 | |
| 108 | <div class="order-field"> |
| 109 | <label><?php echo JText::translate('VAPMANAGECUSTOMER4'); ?></label> |
| 110 | <div class="order-field-value"> |
| 111 | <b><?php echo $customer->billing_phone; ?></b> |
| 112 | |
| 113 | <?php |
| 114 | if ($customer->billing_phone) |
| 115 | { |
| 116 | ?> |
| 117 | <a href="tel:<?php echo $this->escape($customer->billing_phone); ?>" style="margin-left:4px;"> |
| 118 | <i class="fas fa-phone"></i> |
| 119 | </a> |
| 120 | <?php |
| 121 | } |
| 122 | |
| 123 | // plugins can use the "billing.phone" key to introduce custom |
| 124 | // HTML next to the billing phone |
| 125 | if (isset($this->addons['billing.phone'])) |
| 126 | { |
| 127 | echo $this->addons['billing.phone']; |
| 128 | |
| 129 | // unset details form to avoid displaying it twice |
| 130 | unset($this->addons['billing.phone']); |
| 131 | } |
| 132 | ?> |
| 133 | </div> |
| 134 | |
| 135 | <!-- Define role to detect the supported hook --> |
| 136 | <!-- {"rule":"customizer","event":"onDisplayViewCustomerinfo","key":"billing.phone","type":"field"} --> |
| 137 | </div> |
| 138 | |
| 139 | <!-- BILLING COUNTRY --> |
| 140 | |
| 141 | <div class="order-field"> |
| 142 | <label><?php echo JText::translate('VAPMANAGECUSTOMER5'); ?></label> |
| 143 | <div class="order-field-value"> |
| 144 | <b><?php echo $customer->country; ?></b> |
| 145 | |
| 146 | <?php |
| 147 | // plugins can use the "billing.country" key to introduce custom |
| 148 | // HTML next to the billing country |
| 149 | if (isset($this->addons['billing.country'])) |
| 150 | { |
| 151 | echo $this->addons['billing.country']; |
| 152 | |
| 153 | // unset details form to avoid displaying it twice |
| 154 | unset($this->addons['billing.country']); |
| 155 | } |
| 156 | ?> |
| 157 | </div> |
| 158 | |
| 159 | <!-- Define role to detect the supported hook --> |
| 160 | <!-- {"rule":"customizer","event":"onDisplayViewCustomerinfo","key":"billing.country","type":"field"} --> |
| 161 | </div> |
| 162 | |
| 163 | <!-- BILLING STATE --> |
| 164 | |
| 165 | <div class="order-field"> |
| 166 | <label><?php echo JText::translate('VAPMANAGECUSTOMER6'); ?></label> |
| 167 | <div class="order-field-value"> |
| 168 | <b><?php echo $customer->billing_state; ?></b> |
| 169 | |
| 170 | <?php |
| 171 | // plugins can use the "billing.state" key to introduce custom |
| 172 | // HTML next to the billing state |
| 173 | if (isset($this->addons['billing.state'])) |
| 174 | { |
| 175 | echo $this->addons['billing.state']; |
| 176 | |
| 177 | // unset details form to avoid displaying it twice |
| 178 | unset($this->addons['billing.state']); |
| 179 | } |
| 180 | ?> |
| 181 | </div> |
| 182 | |
| 183 | <!-- Define role to detect the supported hook --> |
| 184 | <!-- {"rule":"customizer","event":"onDisplayViewCustomerinfo","key":"billing.state","type":"field"} --> |
| 185 | </div> |
| 186 | |
| 187 | <!-- BILLING CITY --> |
| 188 | |
| 189 | <div class="order-field"> |
| 190 | <label><?php echo JText::translate('VAPMANAGECUSTOMER7'); ?></label> |
| 191 | <div class="order-field-value"> |
| 192 | <b><?php echo $customer->billing_city; ?></b> |
| 193 | |
| 194 | <?php |
| 195 | // plugins can use the "billing.city" key to introduce custom |
| 196 | // HTML next to the billing city |
| 197 | if (isset($this->addons['billing.city'])) |
| 198 | { |
| 199 | echo $this->addons['billing.city']; |
| 200 | |
| 201 | // unset details form to avoid displaying it twice |
| 202 | unset($this->addons['billing.city']); |
| 203 | } |
| 204 | ?> |
| 205 | </div> |
| 206 | |
| 207 | <!-- Define role to detect the supported hook --> |
| 208 | <!-- {"rule":"customizer","event":"onDisplayViewCustomerinfo","key":"billing.city","type":"field"} --> |
| 209 | </div> |
| 210 | |
| 211 | <!-- BILLING ADDRESS --> |
| 212 | |
| 213 | <div class="order-field"> |
| 214 | <label><?php echo JText::translate('VAPMANAGECUSTOMER8'); ?></label> |
| 215 | <div class="order-field-value"> |
| 216 | <b> |
| 217 | <?php |
| 218 | echo $customer->billing_address; |
| 219 | |
| 220 | if ($customer->billing_address_2) |
| 221 | { |
| 222 | echo ' (' . $customer->billing_address_2 . ')'; |
| 223 | } |
| 224 | ?> |
| 225 | </b> |
| 226 | |
| 227 | <?php |
| 228 | // plugins can use the "billing.address" key to introduce custom |
| 229 | // HTML next to the billing address |
| 230 | if (isset($this->addons['billing.address'])) |
| 231 | { |
| 232 | echo $this->addons['billing.address']; |
| 233 | |
| 234 | // unset details form to avoid displaying it twice |
| 235 | unset($this->addons['billing.address']); |
| 236 | } |
| 237 | ?> |
| 238 | </div> |
| 239 | |
| 240 | <!-- Define role to detect the supported hook --> |
| 241 | <!-- {"rule":"customizer","event":"onDisplayViewCustomerinfo","key":"billing.address","type":"field"} --> |
| 242 | </div> |
| 243 | |
| 244 | <!-- BILLING ZIP CODE --> |
| 245 | |
| 246 | <div class="order-field"> |
| 247 | <label><?php echo JText::translate('VAPMANAGECUSTOMER9'); ?></label> |
| 248 | <div class="order-field-value"> |
| 249 | <b><?php echo $customer->billing_zip; ?></b> |
| 250 | |
| 251 | <?php |
| 252 | // plugins can use the "billing.zip" key to introduce custom |
| 253 | // HTML next to the billing zip |
| 254 | if (isset($this->addons['billing.zip'])) |
| 255 | { |
| 256 | echo $this->addons['billing.zip']; |
| 257 | |
| 258 | // unset details form to avoid displaying it twice |
| 259 | unset($this->addons['billing.zip']); |
| 260 | } |
| 261 | ?> |
| 262 | </div> |
| 263 | |
| 264 | <!-- Define role to detect the supported hook --> |
| 265 | <!-- {"rule":"customizer","event":"onDisplayViewCustomerinfo","key":"billing.zip","type":"field"} --> |
| 266 | </div> |
| 267 | |
| 268 | <!-- BILLING COMPANY --> |
| 269 | |
| 270 | <div class="order-field"> |
| 271 | <label><?php echo JText::translate('VAPMANAGECUSTOMER10'); ?></label> |
| 272 | <div class="order-field-value"> |
| 273 | <b><?php echo $customer->company; ?></b> |
| 274 | |
| 275 | <?php |
| 276 | // plugins can use the "billing.company" key to introduce custom |
| 277 | // HTML next to the billing company |
| 278 | if (isset($this->addons['billing.company'])) |
| 279 | { |
| 280 | echo $this->addons['billing.company']; |
| 281 | |
| 282 | // unset details form to avoid displaying it twice |
| 283 | unset($this->addons['billing.company']); |
| 284 | } |
| 285 | ?> |
| 286 | </div> |
| 287 | |
| 288 | <!-- Define role to detect the supported hook --> |
| 289 | <!-- {"rule":"customizer","event":"onDisplayViewCustomerinfo","key":"billing.company","type":"field"} --> |
| 290 | </div> |
| 291 | |
| 292 | <!-- BILLING VAT NUMBER --> |
| 293 | |
| 294 | <div class="order-field"> |
| 295 | <label><?php echo JText::translate('VAPMANAGECUSTOMER11'); ?></label> |
| 296 | <div class="order-field-value"> |
| 297 | <b><?php echo $customer->vatnum; ?></b> |
| 298 | |
| 299 | <?php |
| 300 | // plugins can use the "billing.vatnum" key to introduce custom |
| 301 | // HTML next to the billing vatnum |
| 302 | if (isset($this->addons['billing.vatnum'])) |
| 303 | { |
| 304 | echo $this->addons['billing.vatnum']; |
| 305 | |
| 306 | // unset details form to avoid displaying it twice |
| 307 | unset($this->addons['billing.vatnum']); |
| 308 | } |
| 309 | ?> |
| 310 | </div> |
| 311 | |
| 312 | <!-- Define role to detect the supported hook --> |
| 313 | <!-- {"rule":"customizer","event":"onDisplayViewCustomerinfo","key":"billing.vatnum","type":"field"} --> |
| 314 | </div> |
| 315 | |
| 316 | <!-- BILLING SSN --> |
| 317 | |
| 318 | <div class="order-field"> |
| 319 | <label><?php echo JText::translate('VAPMANAGECUSTOMER20'); ?></label> |
| 320 | <div class="order-field-value"> |
| 321 | <b><?php echo $customer->ssn; ?></b> |
| 322 | |
| 323 | <?php |
| 324 | // plugins can use the "billing.ssn" key to introduce custom |
| 325 | // HTML next to the billing ssn |
| 326 | if (isset($this->addons['billing.ssn'])) |
| 327 | { |
| 328 | echo $this->addons['billing.ssn']; |
| 329 | |
| 330 | // unset details form to avoid displaying it twice |
| 331 | unset($this->addons['billing.ssn']); |
| 332 | } |
| 333 | ?> |
| 334 | </div> |
| 335 | |
| 336 | <!-- Define role to detect the supported hook --> |
| 337 | <!-- {"rule":"customizer","event":"onDisplayViewCustomerinfo","key":"billing.ssn","type":"field"} --> |
| 338 | </div> |
| 339 | |
| 340 | <!-- Define role to detect the supported hook --> |
| 341 | <!-- {"rule":"customizer","event":"onDisplayViewCustomerinfo","key":"billing.custom","type":"field"} --> |
| 342 | |
| 343 | <?php |
| 344 | // plugins can use the "billing.custom" key to introduce custom |
| 345 | // HTML at the end of the block |
| 346 | if (isset($this->addons['billing.custom'])) |
| 347 | { |
| 348 | echo $this->addons['billing.custom']; |
| 349 | |
| 350 | // unset details form to avoid displaying it twice |
| 351 | unset($this->addons['billing.custom']); |
| 352 | } |
| 353 | ?> |
| 354 | |
| 355 | </div> |
| 356 | |
| 357 | <?php echo $vik->closeFieldset(); ?> |
| 358 | </div> |
| 359 | |
| 360 | <div class="span6"> |
| 361 | |
| 362 | <div class="row-fluid"> |
| 363 | |
| 364 | <div class="span12"> |
| 365 | <?php echo $vik->openFieldset(JText::translate('VAPMANAGECUSTOMERTITLE1')); ?> |
| 366 | |
| 367 | <!-- JOOMLA AVATAR --> |
| 368 | |
| 369 | <a href="javascript:void(0);" id="avatar-handle"> |
| 370 | <?php |
| 371 | if (empty($customer->image)) |
| 372 | { |
| 373 | ?> |
| 374 | <img src="<?php echo VAPASSETS_URI . 'css/images/default-profile.png'; ?>" class="vap-customer-image" /> |
| 375 | <?php |
| 376 | } |
| 377 | else |
| 378 | { |
| 379 | ?> |
| 380 | <img src="<?php echo VAPCUSTOMERS_AVATAR_URI . $customer->image; ?>" class="vap-customer-image" /> |
| 381 | <?php |
| 382 | } |
| 383 | ?> |
| 384 | </a> |
| 385 | |
| 386 | <?php |
| 387 | if ($customer->user->id) |
| 388 | { |
| 389 | ?> |
| 390 | <div class="order-fields extended"> |
| 391 | |
| 392 | <!-- CMS ACCOUNT NAME --> |
| 393 | |
| 394 | <div class="order-field"> |
| 395 | <label><?php echo JText::translate('VAPMANAGECUSTOMER2'); ?></label> |
| 396 | <div class="order-field-value"> |
| 397 | <b><?php echo $customer->user->name; ?></b> |
| 398 | |
| 399 | <?php |
| 400 | // plugins can use the "account.name" key to introduce custom |
| 401 | // HTML next to the account name |
| 402 | if (isset($this->addons['account.name'])) |
| 403 | { |
| 404 | echo $this->addons['account.name']; |
| 405 | |
| 406 | // unset details form to avoid displaying it twice |
| 407 | unset($this->addons['account.name']); |
| 408 | } |
| 409 | ?> |
| 410 | </div> |
| 411 | |
| 412 | <!-- Define role to detect the supported hook --> |
| 413 | <!-- {"rule":"customizer","event":"onDisplayViewCustomerinfo","key":"account.name","type":"field"} --> |
| 414 | </div> |
| 415 | |
| 416 | <!-- CMS ACCOUNT USERNAME --> |
| 417 | |
| 418 | <div class="order-field"> |
| 419 | <label><?php echo JText::translate('JGLOBAL_USERNAME'); ?></label> |
| 420 | <div class="order-field-value"> |
| 421 | <b><?php echo $customer->user->username; ?></b> |
| 422 | |
| 423 | <?php |
| 424 | // plugins can use the "account.username" key to introduce custom |
| 425 | // HTML next to the account username |
| 426 | if (isset($this->addons['account.username'])) |
| 427 | { |
| 428 | echo $this->addons['account.username']; |
| 429 | |
| 430 | // unset details form to avoid displaying it twice |
| 431 | unset($this->addons['account.username']); |
| 432 | } |
| 433 | ?> |
| 434 | </div> |
| 435 | |
| 436 | <!-- Define role to detect the supported hook --> |
| 437 | <!-- {"rule":"customizer","event":"onDisplayViewCustomerinfo","key":"account.username","type":"field"} --> |
| 438 | </div> |
| 439 | |
| 440 | <!-- CMS ACCOUNT MAIL --> |
| 441 | |
| 442 | <div class="order-field"> |
| 443 | <label><?php echo JText::translate('VAPMANAGECUSTOMER3'); ?></label> |
| 444 | <div class="order-field-value"> |
| 445 | <b><?php echo $customer->user->email; ?></b> |
| 446 | |
| 447 | <?php |
| 448 | // plugins can use the "account.mail" key to introduce custom |
| 449 | // HTML next to the account mail |
| 450 | if (isset($this->addons['account.mail'])) |
| 451 | { |
| 452 | echo $this->addons['account.mail']; |
| 453 | |
| 454 | // unset details form to avoid displaying it twice |
| 455 | unset($this->addons['account.mail']); |
| 456 | } |
| 457 | ?> |
| 458 | </div> |
| 459 | |
| 460 | <!-- Define role to detect the supported hook --> |
| 461 | <!-- {"rule":"customizer","event":"onDisplayViewCustomerinfo","key":"account.mail","type":"field"} --> |
| 462 | </div> |
| 463 | |
| 464 | </div> |
| 465 | <?php |
| 466 | } |
| 467 | else |
| 468 | { |
| 469 | ?> |
| 470 | <div class="customer-info-guest" style="max-width: calc(100% - 64px);"> |
| 471 | <?php echo $vik->alert(JText::translate('VAPMANAGECUSTOMER15')); ?> |
| 472 | </div> |
| 473 | <?php |
| 474 | } |
| 475 | ?> |
| 476 | |
| 477 | <!-- Define role to detect the supported hook --> |
| 478 | <!-- {"rule":"customizer","event":"onDisplayViewCustomerinfo","key":"account.custom","type":"field"} --> |
| 479 | |
| 480 | <?php |
| 481 | // plugins can use the "account.custom" key to introduce custom |
| 482 | // HTML at the end of the "User Account" block |
| 483 | if (isset($this->addons['account.custom'])) |
| 484 | { |
| 485 | echo $this->addons['account.custom']; |
| 486 | |
| 487 | // unset details form to avoid displaying it twice |
| 488 | unset($this->addons['account.custom']); |
| 489 | } |
| 490 | ?> |
| 491 | |
| 492 | <div class="order-fields extended"> |
| 493 | |
| 494 | <!-- CREDIT --> |
| 495 | |
| 496 | <?php |
| 497 | if ($customer->credit > 0) |
| 498 | { |
| 499 | ?> |
| 500 | <div class="order-field"> |
| 501 | <label><?php echo JText::translate('VAPUSERCREDIT'); ?></label> |
| 502 | <div class="order-field-value"> |
| 503 | <b><?php echo VAPFactory::getCurrency()->format($customer->credit); ?></b> |
| 504 | |
| 505 | <?php |
| 506 | // plugins can use the "account.credit" key to introduce custom |
| 507 | // HTML next to the account credit |
| 508 | if (isset($this->addons['account.credit'])) |
| 509 | { |
| 510 | echo $this->addons['account.credit']; |
| 511 | |
| 512 | // unset details form to avoid displaying it twice |
| 513 | unset($this->addons['account.credit']); |
| 514 | } |
| 515 | ?> |
| 516 | </div> |
| 517 | |
| 518 | <!-- Define role to detect the supported hook --> |
| 519 | <!-- {"rule":"customizer","event":"onDisplayViewCustomerinfo","key":"account.credit","type":"field"} --> |
| 520 | </div> |
| 521 | <?php |
| 522 | } |
| 523 | ?> |
| 524 | |
| 525 | <!-- SUBSCRIPTION ACTIVATION DATE --> |
| 526 | |
| 527 | <?php |
| 528 | if (!VAPDateHelper::isNull($customer->active_since)) |
| 529 | { |
| 530 | ?> |
| 531 | <div class="order-field"> |
| 532 | <label><?php echo JText::translate('VAPMANAGEEMPLOYEE28'); ?></label> |
| 533 | <div class="order-field-value"> |
| 534 | <b><?php echo JHtml::fetch('date', $customer->active_since, JText::translate('DATE_FORMAT_LC5')); ?></b> |
| 535 | |
| 536 | <?php |
| 537 | // plugins can use the "account.activesince" key to introduce custom |
| 538 | // HTML next to the account activation date |
| 539 | if (isset($this->addons['account.activesince'])) |
| 540 | { |
| 541 | echo $this->addons['account.activesince']; |
| 542 | |
| 543 | // unset details form to avoid displaying it twice |
| 544 | unset($this->addons['account.activesince']); |
| 545 | } |
| 546 | ?> |
| 547 | </div> |
| 548 | |
| 549 | <!-- Define role to detect the supported hook --> |
| 550 | <!-- {"rule":"customizer","event":"onDisplayViewCustomerinfo","key":"account.activesince","type":"field"} --> |
| 551 | </div> |
| 552 | <?php |
| 553 | } |
| 554 | ?> |
| 555 | |
| 556 | <!-- SUBSCRIPTION EXPIRATION DATE --> |
| 557 | |
| 558 | <?php |
| 559 | if (!VAPDateHelper::isNull($customer->active_to_date) || $customer->lifetime) |
| 560 | { |
| 561 | ?> |
| 562 | <div class="order-field"> |
| 563 | <label><?php echo JText::translate('VAPMANAGEEMPLOYEE27'); ?></label> |
| 564 | <div class="order-field-value"> |
| 565 | <?php |
| 566 | if ($customer->lifetime) |
| 567 | { |
| 568 | ?> |
| 569 | <span class="vapreservationstatusconfirmed"><?php echo JText::translate('VAPSUBSCRTYPE5'); ?></span> |
| 570 | <?php |
| 571 | } |
| 572 | else |
| 573 | { |
| 574 | if ($customer->daysLeft <= 0) |
| 575 | { |
| 576 | // expired |
| 577 | $class = 'vapreservationstatusremoved'; |
| 578 | } |
| 579 | else if ($customer->daysLeft < 7) |
| 580 | { |
| 581 | // close to expire |
| 582 | $class = 'vapreservationstatuspending'; |
| 583 | } |
| 584 | else |
| 585 | { |
| 586 | // active |
| 587 | $class = 'vapreservationstatusconfirmed'; |
| 588 | } |
| 589 | |
| 590 | ?> |
| 591 | <span class="<?php echo $class; ?>"><?php echo JHtml::fetch('date', $customer->active_to_date, JText::translate('DATE_FORMAT_LC5')); ?></span> |
| 592 | <?php |
| 593 | } |
| 594 | |
| 595 | $subscr_info = array(); |
| 596 | |
| 597 | if ($customer->subscription) |
| 598 | { |
| 599 | // display subscription plan |
| 600 | $subscr_info[] = $customer->subscription['name']; |
| 601 | } |
| 602 | |
| 603 | if ($customer->daysLeft > 0) |
| 604 | { |
| 605 | // display number of remaining days |
| 606 | $subscr_info[] = JText::plural('VAP_N_DAYS_LEFT', $customer->daysLeft); |
| 607 | } |
| 608 | |
| 609 | if ($subscr_info) |
| 610 | { |
| 611 | ?> |
| 612 | <i class="fas fa-info-circle hasTooltip" title="<?php echo $this->escape(implode(' : ', $subscr_info)); ?>"></i> |
| 613 | <?php |
| 614 | } |
| 615 | |
| 616 | // plugins can use the "account.expdate" key to introduce custom |
| 617 | // HTML next to the account expiration date |
| 618 | if (isset($this->addons['account.expdate'])) |
| 619 | { |
| 620 | echo $this->addons['account.expdate']; |
| 621 | |
| 622 | // unset details form to avoid displaying it twice |
| 623 | unset($this->addons['account.expdate']); |
| 624 | } |
| 625 | ?> |
| 626 | </div> |
| 627 | |
| 628 | <!-- Define role to detect the supported hook --> |
| 629 | <!-- {"rule":"customizer","event":"onDisplayViewCustomerinfo","key":"account.expdate","type":"field"} --> |
| 630 | </div> |
| 631 | <?php |
| 632 | } |
| 633 | ?> |
| 634 | |
| 635 | <!-- REDEEMED PACKAGES --> |
| 636 | |
| 637 | <?php if ($this->packUserCount->num_app): ?> |
| 638 | <div class="order-field"> |
| 639 | <label><?php echo JText::translate('VAPMENUPACKAGES'); ?></label> |
| 640 | <div class="order-field-value"> |
| 641 | <span style="text-transform: lowercase;" class="<?php echo $this->packUserCount->used_app < $this->packUserCount->num_app ? 'vapreservationstatusconfirmed' : 'vapreservationstatuspending'; ?>"> |
| 642 | <?php echo JText::sprintf('VAPREDEEMEDPACKAGES', $this->packUserCount->used_app, $this->packUserCount->num_app); ?> |
| 643 | </span> |
| 644 | |
| 645 | <?php |
| 646 | // plugins can use the "account.packages" key to introduce custom |
| 647 | // HTML next to the number of redeemed/total packages |
| 648 | if (isset($this->addons['account.packages'])) |
| 649 | { |
| 650 | echo $this->addons['account.packages']; |
| 651 | |
| 652 | // unset details form to avoid displaying it twice |
| 653 | unset($this->addons['account.packages']); |
| 654 | } |
| 655 | ?> |
| 656 | </div> |
| 657 | </div> |
| 658 | <?php endif; ?> |
| 659 | |
| 660 | </div> |
| 661 | |
| 662 | <?php echo $vik->closeFieldset(); ?> |
| 663 | </div> |
| 664 | |
| 665 | </div> |
| 666 | |
| 667 | <div class="row-fluid"> |
| 668 | |
| 669 | <div class="span12"> |
| 670 | <?php |
| 671 | echo $vik->openFieldset(JText::translate('VAPMANAGECUSTOMERTITLE4')); |
| 672 | echo $this->loadTemplate('draft'); |
| 673 | ?> |
| 674 | |
| 675 | <!-- Define role to detect the supported hook --> |
| 676 | <!-- {"rule":"customizer","event":"onDisplayViewCustomerinfo","key":"billing.notes","type":"field"} --> |
| 677 | |
| 678 | <?php |
| 679 | // plugins can use the "billing.notes" key to introduce custom |
| 680 | // HTML at the end of the "Notes" block |
| 681 | if (isset($this->addons['billing.notes'])) |
| 682 | { |
| 683 | echo $this->addons['billing.notes']; |
| 684 | |
| 685 | // unset details form to avoid displaying it twice |
| 686 | unset($this->addons['billing.notes']); |
| 687 | } |
| 688 | ?> |
| 689 | |
| 690 | <?php echo $vik->closeFieldset(); ?> |
| 691 | </div> |
| 692 | |
| 693 | </div> |
| 694 | |
| 695 | </div> |
| 696 | |
| 697 | </div> |
| 698 |