<?php
/**
 * @var $pid
 */

if ( wpj_get_orders_in_queue_count( $pid ) > 0 )
	echo '<span class="value">' . wpj_get_orders_in_queue_count( $pid ) . '</span>';

elseif ( wpj_get_user_jobs_count( $pid, 'in-queue' ) > 0 )
	echo '<span class="value">' . wpj_get_user_jobs_count( $pid, 'in-queue' ) . '</span>';

else
	echo '<span class="value">0</span>';