function ym_bundle_units_sold($args)
{
    $bundle_id = isset($args['bundle_id']) ? $args['bundle_id'] : FALSE;
    if ($bundle_id) {
        return '';
    }
    return ym_bundle_purchased_count($bundle_id);
}
    echo '<td>(' . $purchase->pack_id . ') ' . $purchase->name . '</td>';
    $expires = $purchase->purchaseexpire * 86400 + $purchase->purchasetime;
    echo '<td>' . ($purchase->purchaseexpire ? date(YM_DATE, $expires) : __('No Expire', 'ym')) . '</td>';
    echo '<td>' . date(YM_DATE, $purchase->purchasetime) . '</td>';
    echo '<td>' . $purchase->payment_method . '</td>';
    echo '<td><form action="" method="post">
<input type="hidden" name="delete_bundle_purchase" value="' . $purchase->purchase_id . '" />
<input type="image" src="' . YM_PLUGIN_DIR_URL . '/images/cross.png" alt="Delete" class="deletelink" />
</form></td>';
    echo '</tr>';
}
echo '</table>';
echo ym_end_box();
echo ym_start_box(__('Bundles Purchased Count', 'ym'));
echo '<table style="width: 100%;" class="form-table widefat">
	<tr>
		<th>' . __('(ID) Name', 'ym') . '</th>
		<th>' . __('Cost', 'ym') . '</th>
		<th>' . __('Count', 'ym') . '</th>
	</tr>';
foreach ($bundles as $bundle) {
    $count = ym_bundle_purchased_count($bundle->id);
    echo '<tr>';
    echo '<td>(' . $bundle->id . ') ' . $bundle->name . '</td>';
    echo '<td>' . number_format($bundle->cost, 2) . ' ' . ym_get_currency() . '</td>';
    echo '<td>' . $count . '</td>';
    echo '</tr>';
}
echo '</table>';
echo ym_end_box();
echo '</div>';