Updates to 03-2025
This commit is contained in:
parent
7ec90d7e18
commit
824fa43e96
238 changed files with 12290 additions and 11908 deletions
|
|
@ -85,7 +85,15 @@ class Util
|
|||
return number_format($value, $dec, self::_decimal_separator(), self::_thousands_separator());
|
||||
|
||||
}
|
||||
|
||||
public static function cleanIntegerFromString($value) {
|
||||
// Entferne alle nicht-numerischen Zeichen außer Minus
|
||||
$cleanStr = preg_replace("/[^0-9-]/", "", $value);
|
||||
|
||||
// Konvertiere zu Integer und entferne führende Nullen
|
||||
$number = (int)$cleanStr;
|
||||
|
||||
return $number;
|
||||
}
|
||||
public static function cleanNumberFormat($num = 0, $dec = 2, $fullzero = false){
|
||||
|
||||
if($fullzero && $num == 0){
|
||||
|
|
@ -140,6 +148,35 @@ class Util
|
|||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public static function getInstanceStatus(){
|
||||
$identifier = self::getUserShopIdentifier();
|
||||
if($identifier && \Session::has('user_shop_payment') && \Session::get('user_shop_payment') === 6){
|
||||
return OrderPaymentService::getInstanceStatus($identifier);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public static function setInstanceStatus($status, $lower = true){
|
||||
$identifier = self::getUserShopIdentifier();
|
||||
if($identifier && \Session::has('user_shop_payment') && \Session::get('user_shop_payment') === 6){
|
||||
OrderPaymentService::updateInstanceStatus($identifier, $status, $lower);
|
||||
}
|
||||
}
|
||||
|
||||
public static function setInstanceStatusByPayment($shopping_payment, $status, $lower = true){
|
||||
if($shopping_payment->identifier){
|
||||
OrderPaymentService::updateInstanceStatus($shopping_payment->identifier, $status, $lower);
|
||||
}
|
||||
}
|
||||
|
||||
public static function getShoppingInstance(){
|
||||
if(\Session::has('shopping_instance')){
|
||||
return \Session::get('shopping_instance');
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public static function getUserHistory(){
|
||||
$auth_user = self::getAuthUser();
|
||||
$user_shop_identifier = self::getUserShopIdentifier();
|
||||
|
|
@ -171,7 +208,7 @@ class Util
|
|||
return 'test';
|
||||
}
|
||||
}
|
||||
return 'live';
|
||||
return config('app.mode');
|
||||
}
|
||||
public static function addRoute($p = []){
|
||||
$b = [];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue