<?php
if ( ! defined( 'ABSPATH' ) ) {
	exit;
}
?>

<?php

$label = 'Minimal services and support price ';
if ($pay_type['services_contract_period'] > 0) {
	$label .= '(' . $pay_type['services_contract_period'] . ' ' . $pay_type['period_unit'] . ')';
} else {
	$label .= '(Unbound)';
}

?>
<tr>
	<td class="wiaas_label_container">
		<?php _e( $label . ':', 'wiaas' ); ?>
	</td>
	<td class="wiaas_input_container">
		<input
			id="wiaas_minimal_services_price_<?php echo $name; ?>"
			class="wiaas_minimal_services_price"
			data-name="<?php echo $name; ?>"
			data-period="<?php echo $pay_type['services_contract_period']; ?>"
			name="wiaas_pricing_rules[<?php echo $name; ?>][minimal_services_price]"
			value="<?php echo $pricing_rule['minimal_services_price'] ?>"
			type="text" />
	</td>
	<td>
				<span style="line-height: 28px; margin-left: 10px;">
				<?php echo ' / ' . $pay_type['period_unit'] ?>
				</span>
	</td>
</tr>
<?php

if ($pay_type['services_contract_period'] > 0) {
	?>
	<tr>
		<td></td>
		<td>Final total:</td>
		<td>
					<span id="wiaas_minimal_services_price_<?php echo $name; ?>_final">
						<?php echo round(
							$pricing_rule['minimal_services_price'] * $pay_type['services_contract_period'],
							2) ?>
					</span>
		</td>
	</tr>
	<?php
}

?>


