laon order

This commit is contained in:
2024-11-26 15:32:08 +05:00
parent 0865c2dc9e
commit bd5a72117f
2 changed files with 26 additions and 8 deletions

View File

@@ -202,6 +202,9 @@ function localeAppUrl(): string
return config('app.locale_app.url');
}
/**
* Original quality :D
*/
function convertToOriginalFormat($apiPrice)
{
$originalPrice = intval($apiPrice) / 100;
@@ -209,6 +212,9 @@ function convertToOriginalFormat($apiPrice)
return number_format($originalPrice, 2, '.', '');
}
/**
* Date day mf
*/
function lastDayOfMonth($month, $year)
{
$date = new DateTime("$year-$month-01");
@@ -216,3 +222,17 @@ function lastDayOfMonth($month, $year)
return $date;
}
/**
* Get index by value from array
*/
function indexByValue($value, $array)
{
for ($i = 0; $i < count($array); $i++) {
if ($array[$i] == $value) {
return $i;
}
}
return null;
}