<?php
/**
 * @var $class
 * @var $main_amount
 * @var $pid
 * @var $sample_prc
 * @var $include_price_type
 */
?>

<div class="job-price-purchase payment-main-item <?php echo $class; ?>" data-mainamount="<?php echo $main_amount; ?>">

	<?php if ( get_post_meta( $pid, 'job_packages', true ) == 'yes' && ! empty( $_POST['package_price'] ) )
		echo wpj_show_price( $_POST['package_price'] );

	elseif ( $sample_prc > 0 )
		echo wpj_show_price( $sample_prc );

	else {
		if ( wpj_bool_option( 'wpjobster_replace_zero_with_free' ) )
			echo __( 'Free', 'wpjobster' );

		else
			echo wpj_show_price( 0 );

	}

	if ( isset( $_REQUEST['tips'] ) )
		echo __( ' tip', 'wpjobster' );

	elseif ( isset( $_REQUEST['custom_extra'] ) )
		echo apply_filters( 'wpj_custom_extra_lower_string_filter', __( ' custom extra', 'wpjobster' ) );

	elseif ( $include_price_type && get_post_meta( $pid, 'price_type', true ) && get_post_meta( $pid, 'price_type', true ) != 'fixed' )
		echo '&nbsp;' . wpj_translate_string( get_post_meta( $pid, 'price_type', true ) ); ?>

</div>