<?php $sales = $listing->getSales(); ?>
<?php if (count($sales) > 0) { ?>
<table class="table table-striped">
    <thead>
        <tr>
            <th><?php echo $this->_('User'); ?></th>
            <th><?php echo $this->_('Price'); ?></th>
            <th><?php echo $this->_('Quantity'); ?></th>
            <th><?php echo $this->_('Date'); ?></th>
        </tr>
    </thead>
    <tbody>
        <?php foreach ($sales as $sale) { ?>
        <tr>
            <td><?php echo $this->userDetails()->setUser($sale->findParentRow('\Ppb\Db\Table\Users', 'Buyer'))->display($listing['private_auction']); ?></td>
            <td><?php echo $this->amount($sale['price'], $listing['currency']); ?></td>
            <td><?php echo $sale['quantity']; ?></td>
            <td><?php echo $this->date($sale['created_at']); ?></td>
        </tr>
        <?php } ?>
    </tbody>
</table>
<?php } else { ?>
<div>
    <?php echo $this->_('The listing has not been sold.'); ?>
</div>
<?php } ?>
