<html>
<head>
<title>Price Calculator Class Example</title>
<style>
<!--
label {width:10em;}
input {display:block;text-align:right}
-->
</style>
</head>
<body>
<?php
require_once('pricecalc.class.php');
/* set price without taxes */
$price_wihout_taxes="1000";
/* set taxes in percents */
$taxes=19;
/* set price reduction in percents */
$reduction=10;
/* set price signature */
$price_signature="EUR";
$price = new PriceCalc($price_wihout_taxes,$taxes,$reduction,$price_signature);
echo '
<label>Old price with tax:</label> <input type="text" value="'.$price->OldWithDph_f().'" />
<label>New price with tax:</label> <input type="text" value="'.$price->WithDph_f().'" />
<label>Price without tax:</label> <input type="text" value="'.$price->WithoutDph_f().'" />
<label>Tax part of price:</label> <input type="text" value="'.$price->DPH_f().'" />
<label>Saved moneys with tax:</label> <input type="text" value="'.$price->SavedMoneyWithDph_f().'" />
';
?>
</body>
</html>
|