Guthaben aufladen, löschen, Ansichten
This commit is contained in:
parent
6ac9fcc4d2
commit
3754f1c571
27 changed files with 603 additions and 89 deletions
|
|
@ -372,7 +372,7 @@ class HTMLHelper
|
|||
if($value->account){
|
||||
$to = $value->account->first_name." ".$value->account->last_name." | ";
|
||||
}
|
||||
$ret .= '<option value="'.$value->id.'" '.$attr.'>'.$to.$value->email.' #'.$value->number.'</option>\n';
|
||||
$ret .= '<option value="'.$value->id.'" '.$attr.'>'.$to.$value->email.' #'.$value->account->m_account.'</option>\n';
|
||||
|
||||
}
|
||||
return $ret;
|
||||
|
|
@ -386,10 +386,9 @@ class HTMLHelper
|
|||
$ret .= '<option value="">'.__('please select').'</option>\n';
|
||||
}
|
||||
foreach ($values as $value){
|
||||
dump($value);
|
||||
$attr = ($value->id == $id) ? 'selected="selected"' : '';
|
||||
$to = $value->billing_firstname." ".$value->billing_lastname." | ".$value->billing_email;
|
||||
$ret .= '<option value="'.$value->id.'" '.$attr.'>'.$to.' #'.$value->number.'</option>\n';
|
||||
$ret .= '<option value="'.$value->id.'" '.$attr.'>'.$to.' #'.$value->account->m_account.'</option>\n';
|
||||
|
||||
}
|
||||
return $ret;
|
||||
|
|
|
|||
|
|
@ -94,7 +94,6 @@ class Payment
|
|||
|
||||
public static function addUserPayCredits(User $user, $credit, $status, $message, $shopping_order_id = null){
|
||||
|
||||
$new_credit_total = $user->payment_credit;
|
||||
UserPayCredit::create([
|
||||
'user_id' => $user->id,
|
||||
'credit' => $credit,
|
||||
|
|
@ -108,6 +107,7 @@ class Payment
|
|||
$user->save();
|
||||
|
||||
}
|
||||
|
||||
public static function paymentStatusPaidAction(ShoppingOrder $shopping_order, $paid){
|
||||
$send_link = false;
|
||||
|
||||
|
|
@ -136,7 +136,7 @@ class Payment
|
|||
$user->payment_account = $date;
|
||||
$user->wizard = 100;
|
||||
$user->save();
|
||||
self::addUserPayCredits($user, $shopping_order_item->product->price, 1, 'payment_for_account');
|
||||
self::addUserPayCredits($user, $shopping_order_item->product->price, 1, 'payment_for_account', $shopping_order->id);
|
||||
$shopping_order->setUserHistoryValue(['status' => 9]);
|
||||
|
||||
}
|
||||
|
|
@ -173,7 +173,7 @@ class Payment
|
|||
//is payment credit, reduce
|
||||
if($shopping_order->shopping_order_margin->from_payment_credit > 0){
|
||||
$credit = $shopping_order->shopping_order_margin->from_payment_credit * -1;
|
||||
self::addUserPayCredits($shopping_order->auth_user, $credit, 2, 'user_order_deduction');
|
||||
self::addUserPayCredits($shopping_order->auth_user, $credit, 2, 'user_order_deduction', $shopping_order->id);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ class Util
|
|||
}
|
||||
|
||||
public static function _format_number($value){
|
||||
return preg_replace("/[^0-9,]/", "", $value);
|
||||
return preg_replace("/[^0-9,-]/", "", $value);
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue