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

<?php

if ($pay_type['package_pay_period'] === 0) {
	return;
}

$value_per_month = round( wiaas_PMT(
	Wiaas_Pricing::INTEREST_RATE,
	$pay_type['package_pay_period'],
	$pricing_rule['principal_amount']), 0);

?>
<tr>
	<td><?php _e( 'Principal amount:', 'wiaas' ); ?></td>
	<td class="wiaas_input_container">
		<input
			id="wiaas_principal_amount_<?php echo $name; ?>"
			class="wiaas_principal_amount"
			data-name="<?php echo $name; ?>"
			data-period="<?php echo $pay_type['package_pay_period']; ?>"
			name="wiaas_pricing_rules[<?php echo $name; ?>][principal_amount]"
			value="<?php echo $pricing_rule['principal_amount'] ?>"
			type="text" />
	</td>
	<td></td>
</tr>
<tr>
	<td></td>
	<td>
		<?php _e( 'Minimal recurrent package price ( ' .
		          $pay_type['services_contract_period'] .
		          ' ' . $pay_type['period_unit'] .
		          '): ', 'wiaas' ); ?>
	</td>
	<td>
				<span id="wiaas_minimal_recurrent_package_price_<?php echo $name; ?>">
					<?php echo $value_per_month ?>
				</span>
		<?php echo ' / ' . $pay_type['period_unit'] ?>
	</td>
</tr>
<?php

?>
