        <?php
        if ((isset($service->cancellation_reason) ? $service->cancellation_reason : null)) {
        ?>
        <div class="alert alert-danger mb-2">
            <p><?php $this->_('ClientServices.serviceinfo.cancellation_reason', false, $service->cancellation_reason);?></p>
        </div>
        <?php
        }

        if ((isset($content) ? $content : null)) {
            echo $content;
        } else {
        ?>
        <div class="alert alert-info mb-2">
            <p><?php $this->_('ClientServices.serviceinfo.no_results');?></p>
        </div>
        <?php
        }

        // List add-on services
        if (($num_services = count((isset($services) ? $services : []))) > 0) {
        ?>
        <h4><?php $this->_('ClientServices.index.heading_addons');?></h4>
        <div class="table-responsive">
            <table class="table table-curved table-striped table-hover">
                <thead>
                    <tr>
                        <th><?php $this->_('ClientServices.index.heading_package');?></th>
                        <th><?php $this->_('ClientServices.index.heading_label');?></th>
                        <th><?php $this->_('ClientServices.index.heading_term');?></th>
                        <th><?php $this->_('ClientServices.index.heading_status');?></th>
                        <th><?php $this->_('ClientServices.index.heading_options');?></th>
                    </tr>
                </thead>
                <tbody>
                    <?php
                    for ($i = 0; $i < $num_services; $i++) {
                        $service_status = (isset($services[$i]->status) ? $services[$i]->status : null);
                    ?>
                    <tr class="expand service_info">
                        <td><?php (print (isset($services[$i]->package->name) ? $this->Html->safe($services[$i]->package->name) : null));?></td>
                        <td><?php (print (isset($services[$i]->name) ? $this->Html->safe($services[$i]->name) : null));?></td>
                        <td>
                            <?php
                            if ((isset($services[$i]->package_pricing->period) ? $services[$i]->package_pricing->period : null) == 'onetime') {
                                (print (isset($periods[$services[$i]->package_pricing->period]) ? $this->Html->safe($periods[$services[$i]->package_pricing->period]) : null));
                            } else {
                                $term = (isset($services[$i]->package_pricing->term) ? $this->Html->safe($services[$i]->package_pricing->term) : null);
                                $period = ($term == 1 ? (isset($periods[$services[$i]->package_pricing->period]) ? $periods[$services[$i]->package_pricing->period] : null) : (isset($periods[$services[$i]->package_pricing->period . '_plural']) ? $periods[$services[$i]->package_pricing->period . '_plural'] : null));
                                $renewal_price = $this->CurrencyFormat->format((isset($services[$i]->renewal_price) ? $services[$i]->renewal_price : null), (isset($services[$i]->override_currency) ? $services[$i]->override_currency : (isset($services[$i]->package_pricing->currency) ? $services[$i]->package_pricing->currency : null)));
                                $this->_('ClientServices.index.recurring_term', false, $this->Html->safe($term), $this->Html->safe($period), $this->Html->safe($renewal_price));
                            }
                            ?>
                        </td>
                        <td><?php echo (isset($statuses[$service_status]) ? $this->Html->safe($statuses[$service_status]) : null);?></td>
                        <td>
                            <?php
                            if ($services[$i]->status != 'canceled') {
                            ?>
                            <div class="btn-group">
                                <a href="<?php echo $this->base_uri . 'services/manage/' . (isset($services[$i]->id) ? $this->Html->safe($services[$i]->id) : null) . '/';?>" class="btn btn-sm btn-light">
                                    <i class="fas fa-cog fa-fw"></i> <?php $this->_('ClientServices.index.option_manage');?>
                                </a>
                            </div>
                            <?php
                            }
                            ?>
                        </td>
                    </tr>
                    <tr class="expand_details" id="services_<?php (print (isset($services[$i]->id) ? $this->Html->safe($services[$i]->id) : null));?>">
                        <td colspan="5" class="subtable">
                        </td>
                    </tr>
                    <?php
                    }
                    ?>
                </tbody>
            </table>
        </div>
        <?php
        }
        ?>
