Guthaben aufladen, löschen, Ansichten
This commit is contained in:
parent
6ac9fcc4d2
commit
3754f1c571
27 changed files with 603 additions and 89 deletions
|
|
@ -83,17 +83,17 @@ class MembershipController extends Controller
|
|||
}*/
|
||||
//#### payment order
|
||||
//#### shop upgrade
|
||||
/*if($action === "upgrade_order" || $action === "payment_order"){
|
||||
if($action === "upgrade_order" || $action === "payment_order"){
|
||||
if(Request::get('switchers-package-wizard')){
|
||||
$user = User::find(Auth::user()->id);
|
||||
Yard::instance('shopping')->destroy();
|
||||
$product = Product::find(Request::get('switchers-package-wizard'));
|
||||
$showAboOptions = false;
|
||||
if(Request::get('abo_options')){
|
||||
// $showAboOptions = false;
|
||||
/* if(Request::get('abo_options')){
|
||||
$showAboOptions = true;
|
||||
$user->abo_options = true;
|
||||
$user->save();
|
||||
}
|
||||
}*/
|
||||
if($product && $product->active && $product->show_at >= 3){
|
||||
$image = "";
|
||||
if($product->images->count()){
|
||||
|
|
@ -102,15 +102,17 @@ class MembershipController extends Controller
|
|||
$qty = Request::get('qty') ? Request::get('qty') : 1;
|
||||
Yard::instance('shopping')->add($product->id, $product->getLang('name'), $qty, $product->price, ['image' => $image, 'slug' => $product->slug, 'weight' => $product->weight]);
|
||||
|
||||
/*
|
||||
do {
|
||||
$identifier = Util::getToken();
|
||||
} while( ShoppingInstance::where('identifier', $identifier)->count() );
|
||||
|
||||
*/
|
||||
$identifier = Util::getToken();
|
||||
$data = [];
|
||||
$data['is_from'] = 'membership';
|
||||
$data['is_for'] = 'me';
|
||||
|
||||
ShoppingInstance::create([
|
||||
/* ShoppingInstance::create([
|
||||
'identifier' => $identifier,
|
||||
'user_shop_id' => 1, //is first faker shop for nuy intern
|
||||
'auth_user_id' => Auth::user()->id,
|
||||
|
|
@ -120,16 +122,21 @@ class MembershipController extends Controller
|
|||
'shopping_data' => $data,
|
||||
'back' => url()->previous(),
|
||||
|
||||
]);
|
||||
Yard::instance('shopping')->store($identifier);
|
||||
]);*/
|
||||
Yard::instance('shopping')->putYardExtra('shopping_data', $data);
|
||||
|
||||
//Yard::instance('shopping')->store($identifier);
|
||||
//add to DB
|
||||
$path = route('checkout.checkout_card', ['identifier'=>$identifier]);
|
||||
UserHistory::create(['user_id' => $user->id, 'action'=>$action, 'status'=>1, 'product_id'=>$product->id, 'identifier'=>$identifier, 'abo_options'=>$showAboOptions]);
|
||||
UserHistory::create(['user_id' => $user->id, 'action'=>$action, 'status'=>1, 'product_id'=>$product->id, 'identifier'=>$identifier]);
|
||||
|
||||
//$path = route('checkout.checkout_card', ['identifier'=>$identifier]);
|
||||
//$path = str_replace('http', 'https', $path);
|
||||
return redirect()->secure($path);
|
||||
// return redirect()->secure($path);
|
||||
return redirect(route('user_checkout', [$identifier]));
|
||||
|
||||
}
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
||||
/*
|
||||
if($action === "change_order"){
|
||||
|
|
|
|||
|
|
@ -49,15 +49,12 @@ class ModalController extends Controller
|
|||
$product = Product::find($data['id']); //current user form order
|
||||
$ret = view("admin.modal.show_product", compact('product', 'data'))->render();
|
||||
}
|
||||
|
||||
if($data['action'] === 'user-order-my-delivery-show'){
|
||||
$user = \Auth::user();
|
||||
$ret = view("admin.modal.show_user_customers", compact('user', 'data'))->render();
|
||||
}
|
||||
|
||||
if($data['action'] === 'user-order-my-delivery-add'){
|
||||
$user = \Auth::user();
|
||||
|
||||
/* $product = Product::find($data['id']); //current user form order
|
||||
$ret = view("admin.modal.show_product", compact('product', 'data'))->render(); */
|
||||
}
|
||||
|
|
@ -67,16 +64,21 @@ class ModalController extends Controller
|
|||
$user = User::find($data['id']);
|
||||
$ret = view("admin.modal.user_level_margin", compact('user', 'data'))->render();
|
||||
}
|
||||
if($data['action'] === 'show-user-pay-credits'){
|
||||
$user = User::find($data['id']);
|
||||
$ret = view("admin.modal.user_pay_credits", compact('user', 'data'))->render();
|
||||
}
|
||||
if($data['action'] === 'add-user-pay-credit'){
|
||||
$value = [];
|
||||
$ret = view("admin.modal.add_pay_credit", compact('value', 'data'))->render();
|
||||
}
|
||||
|
||||
|
||||
if($data['action'] === 'homeparty-add-product') {
|
||||
/*if($data['action'] === 'homeparty-add-product') {
|
||||
$homeparty = Homeparty::find($data['id']);
|
||||
$homeparty_user = HomepartyUser::find($data['user_id']);
|
||||
$data['homeparty'] = $homeparty;
|
||||
$ret = view("user.homeparty.modal_show_products", compact( 'data', 'homeparty', 'homeparty_user'))->render();
|
||||
|
||||
|
||||
}
|
||||
}*/
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -152,7 +152,7 @@ class PayController extends Controller
|
|||
'userid' => 0,
|
||||
'status' => $this->shopping_payment->clearingtype,
|
||||
'transmitted_data' => $request,
|
||||
'txaction' => 'open',
|
||||
'txaction' => 'prev',
|
||||
'mode' => $this->shopping_payment->mode,
|
||||
]);
|
||||
|
||||
|
|
|
|||
|
|
@ -2,13 +2,14 @@
|
|||
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use Carbon;
|
||||
use Request;
|
||||
use App\User;
|
||||
use App\Services\Invoice;
|
||||
use Validator;
|
||||
use App\Services\Util;
|
||||
use App\Models\UserPayCredit;
|
||||
use App\Services\Payment;
|
||||
use App\Models\ShoppingOrder;
|
||||
|
||||
|
||||
class PaymentPayCreditController extends Controller
|
||||
{
|
||||
|
|
@ -37,15 +38,66 @@ class PaymentPayCreditController extends Controller
|
|||
}
|
||||
}
|
||||
|
||||
public function store(){
|
||||
$data = Request::all();
|
||||
|
||||
if(isset($data['action']) && $data['action'] === 'add-user-pay-credit'){
|
||||
|
||||
$validator = Validator::make(Request::all(), []);
|
||||
$add_credit_error = false;
|
||||
if(!isset($data['member_id']) || !$user = User::find($data['member_id'])){
|
||||
$add_credit_error = 'Vertriebspartner nicht gefunden';
|
||||
}
|
||||
if(!isset($data['credit'])){
|
||||
$add_credit_error = 'Bitte Betrag eingeben';
|
||||
}
|
||||
if(!isset($data['message'])){
|
||||
$add_credit_error = 'Bitte Mitteilung eingeben';
|
||||
}
|
||||
if($add_credit_error){
|
||||
$this->setActiveFilter();
|
||||
$data = [
|
||||
'filter_user_status' => $this->filter_user_status,
|
||||
'add_credit_error' => $add_credit_error,
|
||||
];
|
||||
return view('admin.payment.pay_credit.index', $data);
|
||||
}
|
||||
|
||||
$credit = Util::reFormatNumber($data['credit']);
|
||||
$credit = number_format($credit, 2, '.', '');
|
||||
|
||||
Payment::addUserPayCredits($user, $credit, 3, $data['message']);
|
||||
\Session()->flash('alert-success', "Guthaben aufgeladen");
|
||||
}
|
||||
|
||||
return redirect(route('admin_payments_paycredit'));
|
||||
}
|
||||
|
||||
|
||||
public function delete($id){
|
||||
|
||||
$UserPayCredit = UserPayCredit::findOrFail($id);
|
||||
if($UserPayCredit->status === 3 && $deleteTime = $UserPayCredit->deleteTime()){
|
||||
$user = $UserPayCredit->user;
|
||||
$credit = $UserPayCredit->credit;
|
||||
$user->payment_credit = $user->payment_credit - $credit;
|
||||
$user->save();
|
||||
$UserPayCredit->delete();
|
||||
\Session()->flash('alert-success', "Guthaben ist gelöscht");
|
||||
}else{
|
||||
\Session()->flash('alert-error', "Guthaben kann nicht gelöscht werden");
|
||||
}
|
||||
|
||||
return redirect(route('admin_payments_paycredit'));
|
||||
}
|
||||
|
||||
public function datatable(){
|
||||
|
||||
$this->setActiveFilter();
|
||||
|
||||
|
||||
$query = User::with('account')->select('users.*')->where('users.deleted_at', '=', null)
|
||||
->where('active', true);
|
||||
|
||||
|
||||
//->orderBy('created_at', 'DESC');
|
||||
|
||||
return \DataTables::eloquent($query)
|
||||
|
|
@ -71,10 +123,10 @@ class PaymentPayCreditController extends Controller
|
|||
return '<span class="badge badge-pill badge-danger"><i class="fa fa-times"></i></span></a>';
|
||||
})
|
||||
->addColumn('action', function (User $user) {
|
||||
$ret = '<a href="#" target="_blank" class="btn btn-warning btn-xs"><i class="fa fa-eye"></i></a>';
|
||||
return $ret;
|
||||
return '<button class="btn btn-warning btn-sm icon-btn md-btn-flat" title="details" data-modal="modal-xl"
|
||||
data-toggle="modal" data-target="#modals-load-content" data-id="'.$user->id.'" data-route="'.route('modal_load').'"
|
||||
data-action="show-user-pay-credits" data-view="customer"><i class="ion ion-md-eye"></i></button>';
|
||||
})
|
||||
|
||||
->orderColumn('id', 'id $1')
|
||||
->orderColumn('txaction', 'txaction $1')
|
||||
->orderColumn('payment_credit', 'payment_credit $1')
|
||||
|
|
|
|||
|
|
@ -319,13 +319,13 @@ class SalesController extends Controller
|
|||
]);
|
||||
|
||||
$shopping_order->txaction = $data['txaction'];
|
||||
$shopping_order->paid = true;
|
||||
$shopping_order->paid = $payt->txaction === 'paid' ? true : false;
|
||||
$shopping_order->save();
|
||||
$shopping_payment->txaction = $data['txaction'];
|
||||
$shopping_payment->save();
|
||||
|
||||
if($payt->status === 'vor' && $payt->txaction === 'paid'){
|
||||
$send_link = Payment::paymentStatusPaidAction($shopping_order, false);
|
||||
$send_link = Payment::paymentStatusPaidAction($shopping_order, true);
|
||||
}
|
||||
$edata = [
|
||||
'mode' => $payt->mode,
|
||||
|
|
|
|||
|
|
@ -3,20 +3,23 @@
|
|||
namespace App\Http\Controllers\SyS;
|
||||
|
||||
|
||||
use App\Http\Controllers\Api\KasController;
|
||||
use App\Http\Controllers\Api\KasSLLController;
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Mail\MailInfo;
|
||||
use App\Models\PaymentMethod;
|
||||
use App\Models\ShoppingUser;
|
||||
use App\Models\UserShop;
|
||||
use App\Repositories\ContractPDFRepository;
|
||||
use App\Services\CustomerPriority;
|
||||
use App\Services\Shop;
|
||||
use App\User;
|
||||
use Auth;
|
||||
use Illuminate\Support\Facades\Mail;
|
||||
use Request;
|
||||
use App\User;
|
||||
use App\Mail\MailInfo;
|
||||
use App\Services\Shop;
|
||||
use App\Models\UserShop;
|
||||
use App\Services\Payment;
|
||||
use App\Models\ShoppingUser;
|
||||
use App\Models\PaymentMethod;
|
||||
use App\Models\ShoppingOrder;
|
||||
use App\Models\UserPayCredit;
|
||||
use App\Services\CustomerPriority;
|
||||
use App\Http\Controllers\Controller;
|
||||
use Illuminate\Support\Facades\Mail;
|
||||
use App\Http\Controllers\Api\KasController;
|
||||
use App\Repositories\ContractPDFRepository;
|
||||
use App\Http\Controllers\Api\KasSLLController;
|
||||
|
||||
|
||||
class AdminToolsController extends Controller
|
||||
|
|
@ -29,15 +32,104 @@ class AdminToolsController extends Controller
|
|||
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
|
||||
*/
|
||||
public function index()
|
||||
public function index($action)
|
||||
{
|
||||
dd('index');
|
||||
|
||||
switch ($action) {
|
||||
case 'pay_credits':
|
||||
# code...
|
||||
$value = $this->makeUserPayCredits();
|
||||
$data = [
|
||||
'values' => $value,
|
||||
'text' => '',
|
||||
];
|
||||
return view('sys.admin.index', $data);
|
||||
break;
|
||||
case 'value':
|
||||
# code...
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
public function customers()
|
||||
public function store($action)
|
||||
{
|
||||
dd($action);
|
||||
$data = [];
|
||||
switch ($action) {
|
||||
case 'pay_credits':
|
||||
# code...
|
||||
return view('sys.admin.index', $data);
|
||||
|
||||
break;
|
||||
case 'value':
|
||||
# code...
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private function makeUserPayCredits()
|
||||
{
|
||||
//is the first of
|
||||
$shopping_orders = ShoppingOrder::whereHas('shopping_order_items', function($q) {
|
||||
$q->where('product_id', 1);
|
||||
})->where('paid', 1)->where('total_shipping', '>', 0)->get();
|
||||
|
||||
|
||||
foreach ($shopping_orders as $shopping_order) {
|
||||
$payment_credit = $shopping_order->total_shipping;
|
||||
$c = UserPayCredit::where('shopping_order_id', $shopping_order->id)->first();
|
||||
if(!$c){
|
||||
$uP = UserPayCredit::create([
|
||||
'user_id' => $shopping_order->auth_user->id,
|
||||
'credit' => $payment_credit,
|
||||
'old_credit_total' => 0,
|
||||
'new_credit_total' => $payment_credit,
|
||||
'message' => 'payment_for_account',
|
||||
'status' => 1,
|
||||
'shopping_order_id' => $shopping_order->id
|
||||
]);
|
||||
|
||||
$uP->created_at = $shopping_order->created_at;
|
||||
$uP->updated_at = $shopping_order->created_at;
|
||||
$uP->save();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$shopping_orders = ShoppingOrder::where('payment_credit', '>', 0)->where('paid', 1)->get();
|
||||
foreach ($shopping_orders as $shopping_order) {
|
||||
$payment_credit = $shopping_order->payment_credit;
|
||||
$c = UserPayCredit::where('shopping_order_id', $shopping_order->id)->first();
|
||||
if(!$c){
|
||||
//find last
|
||||
$UserPayCredit = UserPayCredit::where('user_id', $shopping_order->auth_user->id)->orderBy('created_at', 'desc')->first();
|
||||
$old_credit = 0;
|
||||
$credit = $shopping_order->payment_credit*-1;
|
||||
if($UserPayCredit){
|
||||
$old_credit = $UserPayCredit->new_credit_total;
|
||||
}
|
||||
$uP = UserPayCredit::create([
|
||||
'user_id' => $shopping_order->auth_user->id,
|
||||
'credit' => $credit,
|
||||
'old_credit_total' => $old_credit,
|
||||
'new_credit_total' => $old_credit + $credit,
|
||||
'message' => 'user_order_deduction',
|
||||
'status' => 2,
|
||||
'shopping_order_id' => $shopping_order->id
|
||||
]);
|
||||
$uP->created_at = $shopping_order->created_at;
|
||||
$uP->updated_at = $shopping_order->created_at;
|
||||
$uP->save();
|
||||
|
||||
}
|
||||
}
|
||||
return $shopping_orders;
|
||||
}
|
||||
|
||||
/*public function customers()
|
||||
{
|
||||
|
||||
$shopping_users = ShoppingUser::where('member_id', '=', NULL)->where('auth_user_id', '=', NULL)->get();
|
||||
|
|
@ -90,9 +182,6 @@ class AdminToolsController extends Controller
|
|||
return back();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public function cronjobs()
|
||||
{
|
||||
//$user_shops = UserShop::all();
|
||||
|
|
@ -199,6 +288,7 @@ class AdminToolsController extends Controller
|
|||
return back();
|
||||
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -311,7 +311,7 @@ class CheckoutController extends Controller
|
|||
Yard::instance('shopping')->destroy();
|
||||
$this->destroy();
|
||||
|
||||
if($payt->status === 'fnc' || $payt->status === 'vor'){
|
||||
if(($payt->status === 'fnc' || $payt->status === 'vor') && $payt->txaction === 'prev'){
|
||||
$this->directPaymentStatus($payt, $identifier);
|
||||
}
|
||||
|
||||
|
|
@ -558,20 +558,17 @@ class CheckoutController extends Controller
|
|||
$shopping_payment->txaction = 'open';
|
||||
$shopping_order->txaction = 'open';
|
||||
|
||||
|
||||
}
|
||||
if($payt->status === 'fnc'){
|
||||
$send_link = Payment::paymentStatusPaidAction($shopping_order, false);
|
||||
$send_link = Payment::paymentStatusPaidAction($shopping_order, true);
|
||||
$shopping_payment->txaction = 'open';
|
||||
$shopping_order->txaction = 'open';
|
||||
|
||||
|
||||
}
|
||||
$shopping_payment->save();
|
||||
}
|
||||
|
||||
//$payt->request = "approved";
|
||||
//$payt->save();
|
||||
$payt->txaction = "open";
|
||||
$payt->save();
|
||||
$data = [
|
||||
'mode' => $payt->transmitted_data['mode'],
|
||||
'txaction' => $payt->txaction,
|
||||
|
|
|
|||
|
|
@ -374,8 +374,6 @@ class OrderController extends Controller
|
|||
data-toggle="modal" data-target="#modals-load-content" data-id="'.Auth::user()->id.'" data-route="'.route('modal_load').'"
|
||||
data-action="user-order-show-user-level-margin" data-view="customer"><i class="ion ion-md-eye"></i></button>';
|
||||
})
|
||||
|
||||
|
||||
->addColumn('action', function (Product $product) {
|
||||
return '<button class="btn btn-default btn-sm icon-btn md-btn-flat product-tooltip" title="details" data-modal="modal-lg"
|
||||
data-toggle="modal" data-target="#modals-load-content" data-id="'.$product->id.'" data-route="'.route('modal_load').'"
|
||||
|
|
|
|||
62
app/Http/Controllers/User/PaymentController.php
Normal file
62
app/Http/Controllers/User/PaymentController.php
Normal file
|
|
@ -0,0 +1,62 @@
|
|||
<?php
|
||||
|
||||
|
||||
namespace App\Http\Controllers\User;
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\User;
|
||||
use Request;
|
||||
use Carbon;
|
||||
use App\Models\ShoppingOrder;
|
||||
|
||||
|
||||
class PaymentController extends Controller
|
||||
{
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->middleware('auth');
|
||||
}
|
||||
|
||||
public function paycredit()
|
||||
{
|
||||
$data = [
|
||||
'user' => \Auth::user()
|
||||
];
|
||||
return view('user.payment.paycredit', $data);
|
||||
}
|
||||
|
||||
/*public function index()
|
||||
{
|
||||
$start = 2021;
|
||||
$end = date('Y');
|
||||
$years = range($start, $end);
|
||||
|
||||
if(Request::get('filter_sales_year')){
|
||||
$active_year = Request::get('filter_sales_year');
|
||||
}else{
|
||||
$active_year = $end;
|
||||
}
|
||||
|
||||
$date1 = Carbon::parse('01.01.'.$active_year." 00:00:00")->format('Y-m-d H:i:s');
|
||||
$date2 = Carbon::parse('31.12.'.$active_year." 23:59:59")->toDateString();
|
||||
|
||||
|
||||
$values = ShoppingOrder::where('shopping_orders.auth_user_id', '!=', NULL) //::with('shopping_user', )->select('shopping_orders.*')
|
||||
->where('mode', '=', 'live')
|
||||
->where('paid', '=', 1)
|
||||
->whereHas('shopping_order_items', function($q) {
|
||||
|
||||
$q->where('product_id', 34)->OrWhere('product_id', 35)->OrWhere('product_id', 36)->OrWhere('product_id', 67)->OrWhere('product_id', 69);
|
||||
})
|
||||
->whereBetween('created_at', [$date1, $date2])
|
||||
->get();
|
||||
|
||||
$data = [
|
||||
'years' => $years,
|
||||
'active_year' => $active_year,
|
||||
'values' => $values,
|
||||
];
|
||||
return view('user.revenue.index', $data);
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
|
@ -63,6 +63,15 @@ class UserPayCredit extends Model
|
|||
|
||||
public function user()
|
||||
{
|
||||
return $this->belongsTo(User::class);
|
||||
return $this->belongsTo('App\User','user_id');
|
||||
}
|
||||
|
||||
public function deleteTime(){
|
||||
$time = '+30 min';
|
||||
if(Carbon::parse($this->created_at)->modify($time)->gt(Carbon::now())){
|
||||
return Carbon::now()->diffInMinutes(Carbon::parse($this->created_at)->modify($time));
|
||||
}
|
||||
return false;
|
||||
}
|
||||
/*getFormattedPriceFrom */
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -167,6 +167,12 @@ class User extends Authenticatable
|
|||
return $this->hasMany('App\Models\UserUpdateEmail', 'user_id', 'id');
|
||||
}
|
||||
|
||||
public function user_pay_credits()
|
||||
{
|
||||
return $this->hasMany('App\Models\UserPayCredit', 'user_id', 'id')->orderBy('created_at', 'DESC');
|
||||
}
|
||||
|
||||
|
||||
public function getMUserSponsor(){
|
||||
if($this->user_sponsor && $this->user_sponsor->account){
|
||||
return $this->user_sponsor->account->first_name." ".$this->user_sponsor->account->last_name." | ".$this->user_sponsor->email;
|
||||
|
|
|
|||
|
|
@ -53,6 +53,13 @@ if (! function_exists('get_active_badge')) {
|
|||
}
|
||||
}
|
||||
|
||||
if (! function_exists('formatDate')) {
|
||||
function formatDate($date)
|
||||
{
|
||||
return Carbon::parse($date)->format(\Util::formatDateDB());
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
if (! function_exists('formatNumber')) {
|
||||
function formatNumber($number, $dec=2)
|
||||
|
|
|
|||
|
|
@ -18,6 +18,8 @@ return [
|
|||
'checkout_error' => 'Zahlungsvorgang Fehler',
|
||||
'auto_renewal_hl' => 'Automatische Verlängerung',
|
||||
'auto_renewal_line_1' => 'Sicher ist sicher! Wir empfehlen, diese Option zu aktivieren, wenn Du Deine jährliche Mitgliedschaft dauerhaft bestehen lassen möchtest. Denn geht eine manuelle Zahlung nach Ablauf der Jahresmitgliedschaft nicht zeitig ein, deaktiviert das System Deinen Onlineshop bzw. Deinen Zugang zum Salescenter. Dann kannst Du keine Bestellungen mehr tätigen oder Einblick in Deinen Statistiken erhalten, bis eine erneute Zahlung Deinen Account reaktiviert. Daher raten wir Dir, die Zahlung per SEPA-Lastschrift zu tätigen. Wir speichern dieses Mandat und buchen 14 Tage vor Ablauf Deine Jahresgebühr automatisch ab. So hast Du einen reibungslosen Prozess, ohne dass Du darauf achten musst.',
|
||||
'auto_renewal_line_2' => 'Du kannst diese Option natürlich jederzeit in Deinem Account rückgängig machen bzw. Deinen Account / Deine Vertriebspartnerschaft kündigen.'
|
||||
'auto_renewal_line_2' => 'Du kannst diese Option natürlich jederzeit in Deinem Account rückgängig machen bzw. Deinen Account / Deine Vertriebspartnerschaft kündigen.',
|
||||
],
|
||||
'payment_for_account' => 'Aufladung durch Mitgliedschaft',
|
||||
'user_order_deduction' => 'Abzug durch Bestellung',
|
||||
];
|
||||
|
|
@ -696,9 +696,10 @@
|
|||
<label class="mt-0 fs-14 fw-400">BIC*</label>
|
||||
{!! Form::text('elv_bic', (isset($payment_data['bic']) ? $payment_data['bic'] : ''), ['class' => 'form-control', 'id'=>'elv_bic', 'placeholder'=>'Beisp.: PBNKDEFF']) !!}
|
||||
</div>
|
||||
@if($shopping_user->abo_options)
|
||||
{{-- @if($shopping_user->abo_options)
|
||||
<p>Automatische Verlängerung wurde ausgewählt. Dein SEPA-Mandart wird gespeichert und die jährliche Zahlung automatisch ausgeführt.</p>
|
||||
@endif
|
||||
--}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
45
resources/views/admin/modal/add_pay_credit.blade.php
Normal file
45
resources/views/admin/modal/add_pay_credit.blade.php
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
{!! Form::open(['url' => route('admin_payments_paycredit'), 'class' => 'modal-content', 'enctype' => 'multipart/form-data']) !!}
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title">
|
||||
{{ __('Guthaben') }}
|
||||
<span class="font-weight-light">aufladen</span>
|
||||
</h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">×</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<input type="hidden" name="action" value="{{$data['action']}}">
|
||||
<input type="hidden" name="id" value="{{$data['id']}}">
|
||||
|
||||
|
||||
<div class="form-row">
|
||||
<div class="form-group col-12">
|
||||
<label for="member_id" class="form-label">{{ __('Vertriebspartner auswählen') }}*</label>
|
||||
<select class="selectpicker" name="member_id" data-style="btn-light" data-live-search="true" required>
|
||||
{!! HTMLHelper::getMembersOptions(0, true) !!}
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-12">
|
||||
<label class="form-label" for="credit">{{ __('Betrag') }}</label>
|
||||
{{ Form::text('credit', '', array('placeholder'=>__('in Euro'), 'class'=>'form-control', 'required'=>true)) }}
|
||||
</div>
|
||||
|
||||
<div class="form-group col-12">
|
||||
<label class="form-label" for="message">{{ __('Mitteilung') }}</label>
|
||||
{{ Form::textarea('message', '' , array('placeholder'=>__('Mitteilung'), 'class'=>'form-control', 'rows'=>4, 'required'=>true)) }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">schließen</button>
|
||||
<button type="submit" class="btn btn-primary">{{__('Guthaben aufladen')}}</button>
|
||||
|
||||
</div>
|
||||
{!! Form::close() !!}
|
||||
|
||||
<script type="text/javascript">
|
||||
$( document ).ready(function() {
|
||||
|
||||
});
|
||||
</script>
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title">
|
||||
{{ __('Staffelprovision') }} <strong>{{$user->user_level->name}}
|
||||
{{ __('Staffelprovision') }} <strong>{{$user->user_level->name}}</strong>
|
||||
</h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">×</button>
|
||||
</div>
|
||||
|
|
|
|||
72
resources/views/admin/modal/user_pay_credits.blade.php
Normal file
72
resources/views/admin/modal/user_pay_credits.blade.php
Normal file
|
|
@ -0,0 +1,72 @@
|
|||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title">
|
||||
{{ __('Zahlungen / Guthaben') }}
|
||||
<strong>
|
||||
@if($user->account)
|
||||
{{ $user->account->first_name }}
|
||||
{{ $user->account->last_name }}
|
||||
@endif
|
||||
</strong>
|
||||
</h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">×</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<input type="hidden" name="action" value="{{$data['action']}}">
|
||||
<input type="hidden" name="id" value="{{$data['id']}}">
|
||||
<input type="hidden" name="view" value="{{$data['view']}}">
|
||||
|
||||
|
||||
<table class="table table-striped" style="border-top: 0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width: 55%">Mitteilung</th>
|
||||
<th>Betrag</th>
|
||||
<th>altes Guthaben</th>
|
||||
<th>neues Guthaben</th>
|
||||
<th>Datum</th>
|
||||
<th>Aktion</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@if($user && $user->user_pay_credits)
|
||||
@foreach($user->user_pay_credits as $user_pay_credit)
|
||||
<tr>
|
||||
@if($user_pay_credit->status === 3)
|
||||
<th scope="row"> {!! nl2br($user_pay_credit->message) !!}</th>
|
||||
@else
|
||||
<th scope="row">{{ trans('payment.'.$user_pay_credit->message) }}</th>
|
||||
@endif
|
||||
<td><div class="no-line-break">{{ formatNumber($user_pay_credit->credit) }} €</div></td>
|
||||
<td><div class="no-line-break">{{ formatNumber($user_pay_credit->old_credit_total) }} €</div></td>
|
||||
<td><div class="no-line-break">{{ formatNumber($user_pay_credit->new_credit_total) }} €</div></td>
|
||||
<td><div class="no-line-break">{{ formatDate($user_pay_credit->created_at) }}</div></td>
|
||||
|
||||
@if($user_pay_credit->shopping_order_id)
|
||||
<td><a class="btn btn-secondary btn-xs" href="{{ route('admin_sales_users_detail', [$user_pay_credit->shopping_order_id]) }}"><i class="ion ion-ios-redo"></i></a></td>
|
||||
@else
|
||||
@if($user_pay_credit->status === 3 && $deleteTime = $user_pay_credit->deleteTime())
|
||||
<td><div class="no-line-break"><a class="btn btn-danger btn-xs" href="{{ route('admin_payments_paycredit_delete', [$user_pay_credit->id]) }}"><i class="ion ion-ios-trash"></i></a> noch {{ $deleteTime }} min.</div>
|
||||
</td>
|
||||
@else
|
||||
<td>-</td>
|
||||
@endif
|
||||
@endif
|
||||
</tr>
|
||||
@endforeach
|
||||
@endif
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">schließen</button>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
|
||||
$( document ).ready(function() {
|
||||
|
||||
});
|
||||
|
||||
|
||||
</script>
|
||||
|
|
@ -4,6 +4,15 @@
|
|||
<div class="card">
|
||||
<h6 class="card-header">
|
||||
Zahlungen / Guthaben
|
||||
|
||||
<div class="float-right">
|
||||
<button type="button" class="btn btn-sm btn-primary" data-toggle="modal" data-target="#modals-load-content"
|
||||
data-id="new"
|
||||
data-action="add-user-pay-credit"
|
||||
data-back="{{url()->current()}}"
|
||||
data-route="{{ route('modal_load') }}"><span class="far fa-plus-circle"></span> Guthaben aufladen
|
||||
</button>
|
||||
</div>
|
||||
</h6>
|
||||
{{-- <div class="col-sm-6 mb-0 mt-2">
|
||||
{!! Form::open(['url' => route('admin_payments_paycredit'), 'class' => 'form-horizontal', 'id'=>'form_filter_user_status']) !!}
|
||||
|
|
@ -18,7 +27,17 @@
|
|||
</div>
|
||||
--}}
|
||||
|
||||
<div class="card-datatable table-responsive pt-0">
|
||||
@if(isset($add_credit_error) && $add_credit_error)
|
||||
<div class="col-sm-12">
|
||||
<div class="alert alert-danger p-2 mt-2">
|
||||
<ul>
|
||||
<li>{{ $add_credit_error }}</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div class="card-datatable table-responsive pt-2">
|
||||
<table class="datatables-style table table-striped table-bordered" id="datatable-pay-credit">
|
||||
<thead>
|
||||
<tr>
|
||||
|
|
@ -39,7 +58,6 @@
|
|||
</div>
|
||||
|
||||
<script>
|
||||
|
||||
$( document ).ready(function() {
|
||||
var oTable = $('#datatable-pay-credit').DataTable({
|
||||
"processing": true,
|
||||
|
|
|
|||
|
|
@ -199,8 +199,13 @@
|
|||
</table>
|
||||
<p class="text-right" style="font-size: 0.9em"><i>* Nettobeträge</i></p>
|
||||
<hr>
|
||||
<p><span class="ion ion-md-checkmark-circle-outline text-secondary"></span>
|
||||
{{__('Guthaben')}} bis {{ $user->getPaymentAccountDateFormat(false) }}: <strong>{{ $user->getFormattedPaymentCredit() }} €</strong>
|
||||
<p>
|
||||
<div class="float-right">
|
||||
<a class="btn btn-sm btn-secondary" href="{{ route('user_payment_paycredit') }}">zur Übersicht</a>
|
||||
</div>
|
||||
<span class="ion ion-md-checkmark-circle-outline text-secondary"></span>
|
||||
{{__('Guthaben')}}: <strong>{{ $user->getFormattedPaymentCredit() }} €</strong>
|
||||
|
||||
</p>
|
||||
<hr>
|
||||
@else
|
||||
|
|
|
|||
|
|
@ -19,6 +19,14 @@
|
|||
<div>{{ __('navigation.my_account') }}</div>
|
||||
</a>
|
||||
<ul class="sidenav-menu">
|
||||
<li class="sidenav-item Request::is('user/payment/paycredit') ? ' active' : '' }} {{ Request::is('user/payment/paycredit') ? ' active' : '' }}">
|
||||
<a href="{{ route('user_payment_paycredit') }}" class="sidenav-link"><i class="sidenav-icon ion ion-ios-cash"></i><div>{{ __('navigation.paycredit') }}</div></a>
|
||||
</li>
|
||||
{{--
|
||||
<li class="sidenav-item Request::is('user/payment/credit') ? ' active' : '' }} {{ Request::is('user/payment/credit') ? ' active' : '' }}">
|
||||
<a href="{{ route('user_payment_credit') }}" class="sidenav-link"><i class="sidenav-icon ion ion-md-cash"></i><div>{{ __('navigation.credit') }}</div></a>
|
||||
</li>
|
||||
--}}
|
||||
<li class="sidenav-item{{ Request::is('user/edit') ? ' active' : '' }}">
|
||||
<a href="{{ route('user_edit') }}" class="sidenav-link"><i class="sidenav-icon ion ion-ios-create"></i><div>{{ __('navigation.my_data') }}</div></a>
|
||||
</li>
|
||||
|
|
@ -27,9 +35,7 @@
|
|||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
{{-- <li class="sidenav-item Request::is('user/revenue') ? ' active' : '' }} {{ Request::is('user/revenues/*') ? ' active' : '' }}">
|
||||
<a href="{{ route('user_revenue') }}" class="sidenav-link"><i class="sidenav-icon ion ion-md-cash"></i><div>{{ __('navigation.revenue') }}</div></a>
|
||||
</li>--}}
|
||||
|
||||
|
||||
@if(Auth::user()->isActiveAccount())
|
||||
<li class="sidenav-item @if(Request::is('user/team/*')) open @endif">
|
||||
|
|
@ -210,6 +216,11 @@
|
|||
<i class="sidenav-icon ion ion-ios-settings"></i>
|
||||
<div>Tools</div>
|
||||
</a>
|
||||
<ul class="sidenav-menu">
|
||||
<li class="sidenav-item{{ Request::is('sysadmin/tools/pay_credits') ? ' active' : '' }}">
|
||||
<a href="{{ route('sysadmin_tools', ['pay_credits']) }}" class="sidenav-link"><i class="sidenav-icon ion ion-md-contact"></i><div>Kunden</div></a>
|
||||
</li>
|
||||
</ul>
|
||||
{{-- <ul class="sidenav-menu">
|
||||
<li class="sidenav-item{{ Request::is('sysadmin/tools/customers') ? ' active' : '' }}">
|
||||
<a href="{{ route('sysadmin_tools_customers') }}" class="sidenav-link"><i class="sidenav-icon ion ion-md-contact"></i><div>Kunden</div></a>
|
||||
|
|
|
|||
76
resources/views/sys/admin/index.blade.php
Normal file
76
resources/views/sys/admin/index.blade.php
Normal file
|
|
@ -0,0 +1,76 @@
|
|||
@extends('layouts.layout-2')
|
||||
|
||||
@section('content')
|
||||
|
||||
@if ($errors->any())
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="alert alert-danger">
|
||||
<ul>
|
||||
@foreach ($errors->all() as $error)
|
||||
<li>{{ $error }}</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
|
||||
<h4 class="font-weight-bold mb-4">
|
||||
Kunden
|
||||
</h4>
|
||||
|
||||
{!! Form::open(['url' => url()->current(), 'class' => '']) !!}
|
||||
<div class="card mb-4">
|
||||
|
||||
<div class="card-body">
|
||||
<!-- Controls -->
|
||||
|
||||
<div class="form-group mb-1">
|
||||
<label class="form-label" for="description">Description</label>
|
||||
{{ Form::textarea('text', $text, array('class'=>'form-control', 'rows'=>1)) }}
|
||||
</div>
|
||||
|
||||
<button type="submit" name="action" value="store" class="btn btn-primary"><i class="ion"></i> store</button>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
@if(count($values)>0)
|
||||
<div class="card-body">
|
||||
|
||||
<div class="card-datatable table-responsive">
|
||||
<table class="table table-striped table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="max-width: 60px;">ID</th>
|
||||
<th>{{__('shopping_user_id')}}</th>
|
||||
<th>{{__('total_shipping')}}</th>
|
||||
<th>{{__('payment_credit')}}</th>
|
||||
<th>{{__('txaction')}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($values as $shopping_order)
|
||||
<tr>
|
||||
<td>{{$shopping_order->id}}</td>
|
||||
<td>{{$shopping_order->auth_user_id}}</td>
|
||||
|
||||
<td>{{$shopping_order->total_shipping}}</td>
|
||||
<td>{{$shopping_order->payment_credit}}</td>
|
||||
<td>{{$shopping_order->txaction}}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
<!-- Controls -->
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
</div>
|
||||
{!! Form::close() !!}
|
||||
|
||||
@endsection
|
||||
|
||||
|
|
@ -41,7 +41,7 @@
|
|||
</table>
|
||||
</div>
|
||||
<div class="text-left mt-3">
|
||||
@if(!$user->isAboOption())
|
||||
{{-- @if(!$user->isAboOption())
|
||||
<hr>
|
||||
<label class="custom-control custom-checkbox">
|
||||
<input type="checkbox" class="custom-control-input" name="abo_options">
|
||||
|
|
@ -54,6 +54,7 @@
|
|||
Ist die Mitgliedschaft vor dem {!! Carbon::parse($user->payment_account)->modify('-'.config('main.abo_booking_days').' days')->format('d.m.Y') !!} bezahlt, wird das SEPA Mandart nicht ausgeführt!</p>
|
||||
<hr>
|
||||
@endif
|
||||
--}}
|
||||
<button type="submit" class="btn btn-secondary">{{ __('wählen und weiter zur Kasse') }}</button>
|
||||
<br><br>
|
||||
<em class="small text-center"> <i class="fa fa-lock"></i> Du wirst auf unseren checkout weitergeletet, die Verbindung ist SSL verschlüsselt.</em>
|
||||
|
|
|
|||
47
resources/views/user/payment/paycredit.blade.php
Normal file
47
resources/views/user/payment/paycredit.blade.php
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
@extends('layouts.layout-2')
|
||||
|
||||
@section('content')
|
||||
<h4 class="font-weight-bold py-2 mb-2">
|
||||
{{ __('navigation.my_account') }} / {{ __('navigation.paycredit') }}
|
||||
</h4>
|
||||
|
||||
<div class="card">
|
||||
<div class="card-datatable table-responsive">
|
||||
<table class="datatables-style table table-striped table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width: 55%">Mitteilung</th>
|
||||
<th>Betrag</th>
|
||||
<th>altes Guthaben</th>
|
||||
<th>neues Guthaben</th>
|
||||
<th>Datum</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@if($user && $user->user_pay_credits)
|
||||
@foreach($user->user_pay_credits as $user_pay_credit)
|
||||
<tr>
|
||||
@if($user_pay_credit->status === 3)
|
||||
<th scope="row"> {!! nl2br($user_pay_credit->message) !!}</th>
|
||||
@else
|
||||
<th scope="row">{{ trans('payment.'.$user_pay_credit->message) }}
|
||||
@if($user_pay_credit->shopping_order_id)
|
||||
<a class="btn btn-outline-secondary btn-xs" href="{{ route('admin_sales_users_detail', [$user_pay_credit->shopping_order_id]) }}"><i class="ion ion-ios-redo"></i></a>
|
||||
@endif
|
||||
</th>
|
||||
@endif
|
||||
<td><div class="no-line-break">{{ formatNumber($user_pay_credit->credit) }} €</div></td>
|
||||
<td><div class="no-line-break">{{ formatNumber($user_pay_credit->old_credit_total) }} €</div></td>
|
||||
<td><div class="no-line-break">{{ formatNumber($user_pay_credit->new_credit_total) }} €</div></td>
|
||||
<td><div class="no-line-break">{{ formatDate($user_pay_credit->created_at) }}</div></td>
|
||||
</tr>
|
||||
@endforeach
|
||||
@endif
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
|
||||
</script>
|
||||
@endsection
|
||||
|
|
@ -179,9 +179,12 @@ Route::group(['middleware' => ['auth:user']], function() {
|
|||
Route::get('/user/membership', 'MembershipController@index')->name('user_membership');
|
||||
Route::post('/user/membership/store/{action}', 'MembershipController@storePayment')->name('user_membership_store');
|
||||
|
||||
Route::get('/user/revenue', 'User\RevenueController@index')->name('user_revenue');
|
||||
Route::post('/user/revenue', 'User\RevenueController@index')->name('user_revenue');
|
||||
|
||||
Route::get('/user/payment/paycredit', 'User\PaymentController@paycredit')->name('user_payment_paycredit');
|
||||
//Route::post('/user/payment/paycredit', 'User\PaymentController@index')->name('user_payment_paycredit');
|
||||
|
||||
Route::get('/user/payment/credit', 'User\PaymentController@credit')->name('user_payment_credit');
|
||||
//Route::post('/user/payment/paycredit', 'User\PaymentController@index')->name('user_payment_paycredit');
|
||||
|
||||
Route::get('/user/checkout/{identifier?}', 'User\CheckoutController@checkout')->name('user_checkout');
|
||||
Route::post('/user/checkout_store/{identifier?}', 'User\CheckoutController@store')->name('user_checkout_store');
|
||||
|
|
@ -289,9 +292,9 @@ Route::group(['middleware' => ['admin']], function()
|
|||
Route::post('/admin/payments/credit/create', 'PaymentCreditController@create')->name('admin_payments_credit_create');
|
||||
|
||||
Route::get('/admin/payments/paycredit', 'PaymentPayCreditController@index')->name('admin_payments_paycredit');
|
||||
Route::post('/admin/payments/paycredit', 'PaymentPayCreditController@index')->name('admin_payments_paycredit');
|
||||
Route::post('/admin/payments/paycredit', 'PaymentPayCreditController@store')->name('admin_payments_paycredit');
|
||||
Route::get('/admin/payments/paycredit/datatable', 'PaymentPayCreditController@datatable')->name('admin_payments_paycredit_datatable');
|
||||
Route::post('/admin/payments/paycredit/create', 'PaymentPayCreditController@create')->name('admin_payments_paycredit_create');
|
||||
Route::get('/admin/payments/paycredit/delete/{id}', 'PaymentPayCreditController@delete')->name('admin_payments_paycredit_delete');
|
||||
|
||||
Route::get('/admin/payments/invoice', 'PaymentInvoiceController@index')->name('admin_payments_invoice');
|
||||
Route::post('/admin/payments/invoice', 'PaymentInvoiceController@index')->name('admin_payments_invoice');
|
||||
|
|
@ -343,7 +346,11 @@ Route::group(['middleware' => ['superadmin']], function() {
|
|||
|
||||
//login pages for sysadmin
|
||||
Route::group(['middleware' => ['sysadmin']], function() {
|
||||
Route::get('/sysadmin/tools/customers', 'SyS\AdminToolsController@customers')->name('sysadmin_tools_customers');
|
||||
|
||||
Route::get('/sysadmin/tools/{action}', 'SyS\AdminToolsController@index')->name('sysadmin_tools');
|
||||
Route::post('/sysadmin/tools/{action}', 'SyS\AdminToolsController@store')->name('sysadmin_tools');
|
||||
|
||||
/*Route::get('/sysadmin/tools/customers', 'SyS\AdminToolsController@customers')->name('sysadmin_tools_customers');
|
||||
Route::post('/sysadmin/tools/customers', 'SyS\AdminToolsController@customerStore')->name('sysadmin_tools_customers');
|
||||
|
||||
Route::get('/sysadmin/tools/domainssl', 'SyS\AdminToolsController@domainSSL')->name('sysadmin_tools_domainssl');
|
||||
|
|
@ -360,7 +367,7 @@ Route::group(['middleware' => ['sysadmin']], function() {
|
|||
Route::get('/sysadmin/import/show/{type}/{filename}/{skip?}/{limit?}', 'SyS\ImportController@importShow')->name('sysadmin_import_show');
|
||||
|
||||
Route::get('/sysadmin/settings', 'SyS\SettingController@index')->name('sysadmin_settings');
|
||||
Route::post('/sysadmin/tools/setting/store', 'SyS\SettingController@store')->name('sysadmin_setting_store');
|
||||
Route::post('/sysadmin/tools/setting/store', 'SyS\SettingController@store')->name('sysadmin_setting_store');*/
|
||||
});
|
||||
|
||||
/*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue