26 lines
500 B
PHP
26 lines
500 B
PHP
<?php
|
|
|
|
namespace OCA\Gestion\Helpers;
|
|
|
|
use DateTime;
|
|
use DateTimeZone;
|
|
use Exception;
|
|
|
|
class PriceHelpers
|
|
{
|
|
public static function calculPriceWithVatValue($price,$vat)
|
|
{
|
|
return ($price * (1 + ($vat / 100)));
|
|
}
|
|
|
|
public static function formatDecimalPrice($price){
|
|
return number_format($price,2,'.','');
|
|
}
|
|
|
|
public static function formatDecimalPriceWithCurrency($price,$currency = '€')
|
|
{
|
|
return self::formatDecimalPrice($price) . $currency;
|
|
}
|
|
|
|
}
|