#10 Promotion Modul, Kommentar 2
This commit is contained in:
parent
f0da981737
commit
c9e1545693
128 changed files with 8194 additions and 637 deletions
|
|
@ -213,6 +213,9 @@ class Payment
|
|||
//when stone, put it back SalesController
|
||||
public static function handelUserPayCredits(ShoppingOrder $shopping_order, $do){
|
||||
//is payment credit, reduce Sae
|
||||
if(!$shopping_order->shopping_order_margin){
|
||||
return;
|
||||
}
|
||||
if($do === 'deduction'){
|
||||
if($shopping_order->shopping_order_margin->from_payment_credit > 0){
|
||||
$credit = $shopping_order->shopping_order_margin->from_payment_credit * -1;
|
||||
|
|
|
|||
|
|
@ -222,6 +222,18 @@ class Util
|
|||
}
|
||||
return url($uri);
|
||||
}
|
||||
|
||||
public static function substr_ellipsis($str, $len=100, $clean, $ell="..."){
|
||||
if($clean){
|
||||
$str = strip_tags($str);
|
||||
}
|
||||
if(strlen($str) > $len){
|
||||
$lastPos = ($len - 3) - strlen($str);
|
||||
$str = substr($str, 0, strrpos($str, ' ', $lastPos)) ." ".$ell;
|
||||
}
|
||||
return $str;
|
||||
|
||||
}
|
||||
public static function sanitize($string, $force_lowercase = true, $anal = false, $substr = false, $anCon = false)
|
||||
{
|
||||
$strip = array("~", "`", "!", "@", "#", "$", "%", "^", "&", "*", "(", ")", "=", "+", "[", "{", "]",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue