Initial import: Carteasy Shop (Dev-Stand)

This commit is contained in:
Thomas Bartelt
2026-04-20 01:03:43 +02:00
commit d504f8a05d
3845 changed files with 761050 additions and 0 deletions
+35
View File
@@ -0,0 +1,35 @@
<?php
class Money {
protected function __construct() {}
private function __clone() {}
public static function show_money($number) {
// $temp = number_format($number, 2, '.');
//
// return $temp;
return $number;
}
public static function get_price_with_taxes($price, $taxrate) {
$temp = Money::get_gross_price($price, $taxrate);
return $temp;
}
// get price without taxes from price with taxes and tax rate
public static function get_net_price($gross_price, $taxrate) {
$temp = number_format((float)$gross_price / ((float)(100 + $taxrate) / 100), 2, '.', '');
return $temp;
}
// get price with taxes from price without taxes and tax rate
public static function get_gross_price($net_price, $taxrate) {
$temp = number_format($net_price * (((float)(100 + $taxrate)) / 100.0 ), 2, '.', '');
return $temp;
}
}