Gutschriften
This commit is contained in:
parent
35ae3da244
commit
6ac9fcc4d2
20 changed files with 510 additions and 63 deletions
|
|
@ -2,9 +2,10 @@
|
||||||
|
|
||||||
namespace App\Http\Controllers;
|
namespace App\Http\Controllers;
|
||||||
|
|
||||||
use App\Services\Invoice;
|
|
||||||
use Response;
|
|
||||||
use Storage;
|
use Storage;
|
||||||
|
use Response;
|
||||||
|
use App\Services\Credit;
|
||||||
|
use App\Services\Invoice;
|
||||||
|
|
||||||
class FileController extends Controller
|
class FileController extends Controller
|
||||||
{
|
{
|
||||||
|
|
@ -63,8 +64,8 @@ class FileController extends Controller
|
||||||
|
|
||||||
if ($disk === 'credit'){
|
if ($disk === 'credit'){
|
||||||
$UserCredit = \App\Models\UserCredit::findOrFail($id);
|
$UserCredit = \App\Models\UserCredit::findOrFail($id);
|
||||||
$filename = Invoice::getCreditFilename($UserCredit);
|
$filename = Credit::getFilename($UserCredit);
|
||||||
$path = Invoice::getCreditDownloadPath($UserCredit);
|
$path = Credit::getDownloadPath($UserCredit);
|
||||||
if (!Storage::disk('public')->exists($path)) {
|
if (!Storage::disk('public')->exists($path)) {
|
||||||
return Response::make('File no found.', 404);
|
return Response::make('File no found.', 404);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -5,11 +5,9 @@ namespace App\Http\Controllers;
|
||||||
use Carbon;
|
use Carbon;
|
||||||
use Request;
|
use Request;
|
||||||
use App\User;
|
use App\User;
|
||||||
use App\Services\Invoice;
|
use App\Services\Credit;
|
||||||
use App\Services\Payment;
|
|
||||||
use App\Models\ShoppingOrder;
|
|
||||||
use App\Models\ShoppingOrderMargin;
|
|
||||||
use App\Models\UserCredit;
|
use App\Models\UserCredit;
|
||||||
|
use App\Models\ShoppingOrderMargin;
|
||||||
use App\Repositories\CreditRepository;
|
use App\Repositories\CreditRepository;
|
||||||
|
|
||||||
class PaymentCreditController extends Controller
|
class PaymentCreditController extends Controller
|
||||||
|
|
@ -120,7 +118,7 @@ class PaymentCreditController extends Controller
|
||||||
})*/
|
})*/
|
||||||
->addColumn('credit', function (UserCredit $UserCredit) {
|
->addColumn('credit', function (UserCredit $UserCredit) {
|
||||||
$ret = "";
|
$ret = "";
|
||||||
if(Invoice::isCredit($UserCredit)){
|
if(Credit::isCredit($UserCredit)){
|
||||||
$ret .= '<a href="'.route('storage_file', [$UserCredit->id, 'credit', 'download']).'" class="btn btn-primary btn-xs"><i class="fa fa-download"></i></a> ';
|
$ret .= '<a href="'.route('storage_file', [$UserCredit->id, 'credit', 'download']).'" class="btn btn-primary btn-xs"><i class="fa fa-download"></i></a> ';
|
||||||
$ret .= '<a href="'.route('storage_file', [$UserCredit->id, 'credit', 'stream']).'" target="_blank" class="btn btn-warning btn-xs"><i class="fa fa-eye"></i></a>';
|
$ret .= '<a href="'.route('storage_file', [$UserCredit->id, 'credit', 'stream']).'" target="_blank" class="btn btn-warning btn-xs"><i class="fa fa-eye"></i></a>';
|
||||||
}else{
|
}else{
|
||||||
|
|
|
||||||
85
app/Http/Controllers/PaymentPayCreditController.php
Normal file
85
app/Http/Controllers/PaymentPayCreditController.php
Normal file
|
|
@ -0,0 +1,85 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
|
||||||
|
namespace App\Http\Controllers;
|
||||||
|
use Carbon;
|
||||||
|
use Request;
|
||||||
|
use App\User;
|
||||||
|
use App\Services\Invoice;
|
||||||
|
use App\Services\Payment;
|
||||||
|
use App\Models\ShoppingOrder;
|
||||||
|
|
||||||
|
|
||||||
|
class PaymentPayCreditController extends Controller
|
||||||
|
{
|
||||||
|
|
||||||
|
private $filter_user_status;
|
||||||
|
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
$this->middleware('auth');
|
||||||
|
$this->filter_user_status = 'all';
|
||||||
|
}
|
||||||
|
|
||||||
|
public function index()
|
||||||
|
{
|
||||||
|
|
||||||
|
$this->setActiveFilter();
|
||||||
|
$data = [
|
||||||
|
'filter_user_status' => $this->filter_user_status,
|
||||||
|
];
|
||||||
|
return view('admin.payment.pay_credit.index', $data);
|
||||||
|
}
|
||||||
|
|
||||||
|
private function setActiveFilter(){
|
||||||
|
if(Request::get('filter_user_status')){
|
||||||
|
$this->filter_user_status = Request::get('filter_user_status');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
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)
|
||||||
|
->addColumn('id', function (User $user) {
|
||||||
|
return '<a href="' . route('admin_lead_edit', [$user->id]) . '" class="btn icon-btn btn-sm btn-primary"><span class="fa fa-edit"></span></a>';
|
||||||
|
})
|
||||||
|
->addColumn('first_name', function (User $user) {
|
||||||
|
return $user->account ? $user->account->first_name : '';
|
||||||
|
})
|
||||||
|
->addColumn('last_name', function (User $user) {
|
||||||
|
return $user->account ? $user->account->last_name : '';
|
||||||
|
})
|
||||||
|
->addColumn('payment_credit', function (User $user) {
|
||||||
|
return $user->payment_credit ? $user->getFormattedPaymentCredit().' €' : '';
|
||||||
|
})
|
||||||
|
->addColumn('is_active_account', function (User $user) {
|
||||||
|
if($user->payment_account){
|
||||||
|
if($user->isActiveAccount()){
|
||||||
|
return '<span class="badge badge-pill badge-success"><i class="fa fa-check"></i></span></a>';
|
||||||
|
}
|
||||||
|
return '<span class="badge badge-pill badge-warning"><i class="fa fa-ban"></i></span></a>';
|
||||||
|
}
|
||||||
|
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;
|
||||||
|
})
|
||||||
|
|
||||||
|
->orderColumn('id', 'id $1')
|
||||||
|
->orderColumn('txaction', 'txaction $1')
|
||||||
|
->orderColumn('payment_credit', 'payment_credit $1')
|
||||||
|
->orderColumn('is_active_account', 'is_active_account $1')
|
||||||
|
->rawColumns(['id', 'shipping_order', 'is_active_account', 'action'])
|
||||||
|
->make(true);
|
||||||
|
}
|
||||||
|
}
|
||||||
52
app/Mail/MailCredit.php
Normal file
52
app/Mail/MailCredit.php
Normal file
|
|
@ -0,0 +1,52 @@
|
||||||
|
<?php
|
||||||
|
namespace App\Mail;
|
||||||
|
|
||||||
|
use Storage;
|
||||||
|
use App\User;
|
||||||
|
use App\Services\Credit;
|
||||||
|
use App\Services\Invoice;
|
||||||
|
use App\Models\UserCredit;
|
||||||
|
use App\Models\ShoppingOrder;
|
||||||
|
use Illuminate\Bus\Queueable;
|
||||||
|
use Illuminate\Mail\Mailable;
|
||||||
|
use Illuminate\Queue\SerializesModels;
|
||||||
|
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||||
|
|
||||||
|
class MailCredit extends Mailable
|
||||||
|
{
|
||||||
|
use Queueable, SerializesModels;
|
||||||
|
|
||||||
|
protected $user_credit;
|
||||||
|
|
||||||
|
public $subject;
|
||||||
|
|
||||||
|
|
||||||
|
public function __construct(UserCredit $user_credit)
|
||||||
|
{
|
||||||
|
$this->user_credit = $user_credit;
|
||||||
|
$this->subject = 'Gutschrift auf Grüne Seele';
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public function build()
|
||||||
|
{
|
||||||
|
$title = __('email.credit_title');
|
||||||
|
$copy1line = __('email.credit_copy1line');
|
||||||
|
|
||||||
|
$filename = Credit::getFilename($this->user_credit);
|
||||||
|
$path = Credit::getDownloadPath($this->user_credit);
|
||||||
|
if (!Storage::disk('public')->exists($path)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
$file = Storage::disk('public')->path($path);
|
||||||
|
$mime = Storage::disk('public')->mimeType($path);
|
||||||
|
|
||||||
|
return $this->view('emails.blank')->with([
|
||||||
|
'title' => $title,
|
||||||
|
'copy1line' => $copy1line,
|
||||||
|
])->attach($file,[
|
||||||
|
'as' => $filename,
|
||||||
|
'mime' => $mime,
|
||||||
|
]); // attach file;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -76,6 +76,7 @@ class ShoppingOrderMargin extends Model
|
||||||
'status' => 'int',
|
'status' => 'int',
|
||||||
'partner_commission_pending_to' => 'datetime',
|
'partner_commission_pending_to' => 'datetime',
|
||||||
'partner_commission_paid' => 'bool',
|
'partner_commission_paid' => 'bool',
|
||||||
|
'user_credit_id' => 'int',
|
||||||
];
|
];
|
||||||
|
|
||||||
protected $dates = [
|
protected $dates = [
|
||||||
|
|
@ -97,6 +98,7 @@ class ShoppingOrderMargin extends Model
|
||||||
'status',
|
'status',
|
||||||
'partner_commission_pending_to',
|
'partner_commission_pending_to',
|
||||||
'partner_commission_paid',
|
'partner_commission_paid',
|
||||||
|
'user_credit_id',
|
||||||
'content'
|
'content'
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
|
||||||
68
app/Models/UserPayCredit.php
Normal file
68
app/Models/UserPayCredit.php
Normal file
|
|
@ -0,0 +1,68 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Created by Reliese Model.
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace App\Models;
|
||||||
|
|
||||||
|
use Carbon\Carbon;
|
||||||
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class UserPayCredit
|
||||||
|
*
|
||||||
|
* @property int $id
|
||||||
|
* @property int $user_id
|
||||||
|
* @property float|null $credit
|
||||||
|
* @property float|null $old_credit_total
|
||||||
|
* @property float|null $new_credit_total
|
||||||
|
* @property string|null $message
|
||||||
|
* @property int $status
|
||||||
|
* @property int|null $shopping_order_id
|
||||||
|
* @property Carbon|null $created_at
|
||||||
|
* @property Carbon|null $updated_at
|
||||||
|
*
|
||||||
|
* @property ShoppingOrder|null $shopping_order
|
||||||
|
* @property User $user
|
||||||
|
*
|
||||||
|
* @package App\Models
|
||||||
|
*/
|
||||||
|
class UserPayCredit extends Model
|
||||||
|
{
|
||||||
|
|
||||||
|
public $statusType = [
|
||||||
|
1 => 'add from payment',
|
||||||
|
2 => 'deduction from payment',
|
||||||
|
];
|
||||||
|
protected $table = 'user_pay_credits';
|
||||||
|
|
||||||
|
protected $casts = [
|
||||||
|
'user_id' => 'int',
|
||||||
|
'credit' => 'float',
|
||||||
|
'old_credit_total' => 'float',
|
||||||
|
'new_credit_total' => 'float',
|
||||||
|
'status' => 'int',
|
||||||
|
'shopping_order_id' => 'int'
|
||||||
|
];
|
||||||
|
|
||||||
|
protected $fillable = [
|
||||||
|
'user_id',
|
||||||
|
'credit',
|
||||||
|
'old_credit_total',
|
||||||
|
'new_credit_total',
|
||||||
|
'message',
|
||||||
|
'status',
|
||||||
|
'shopping_order_id'
|
||||||
|
];
|
||||||
|
|
||||||
|
public function shopping_order()
|
||||||
|
{
|
||||||
|
return $this->belongsTo(ShoppingOrder::class);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function user()
|
||||||
|
{
|
||||||
|
return $this->belongsTo(User::class);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -4,7 +4,7 @@ namespace App\Repositories;
|
||||||
|
|
||||||
use PDF;
|
use PDF;
|
||||||
use Storage;
|
use Storage;
|
||||||
use App\Services\Invoice;
|
use App\Services\Credit;
|
||||||
use App\Services\MyPDFMerger;
|
use App\Services\MyPDFMerger;
|
||||||
use App\Services\UserMarign;
|
use App\Services\UserMarign;
|
||||||
use App\Models\UserCredit;
|
use App\Models\UserCredit;
|
||||||
|
|
@ -21,10 +21,10 @@ class CreditRepository extends BaseRepository {
|
||||||
public function create($request = [])
|
public function create($request = [])
|
||||||
{
|
{
|
||||||
//need invoice $data
|
//need invoice $data
|
||||||
$credit_number = isset($request['credit_number']) ? $request['credit_number'] : Invoice::getInvoiceNumber();
|
$credit_number = isset($request['credit_number']) ? $request['credit_number'] : Credit::getCreditNumber();
|
||||||
$credit_date = isset($request['credit_date']) ? $request['credit_date'] : \Carbon::now()->format("d.m.Y");
|
$credit_date = isset($request['credit_date']) ? $request['credit_date'] : \Carbon::now()->format("d.m.Y");
|
||||||
$credit_send_mail = isset($request['credit_send_mail']) ? true: false;
|
$credit_send_mail = isset($request['credit_send_mail']) ? true: false;
|
||||||
$credit_number = Invoice::createInvoiceNumber($credit_number, $credit_date);
|
$credit_number = Credit::createCreditNumber($credit_number, $credit_date);
|
||||||
|
|
||||||
$user_credits = $this->makeUserCredit();
|
$user_credits = $this->makeUserCredit();
|
||||||
|
|
||||||
|
|
@ -38,13 +38,13 @@ class CreditRepository extends BaseRepository {
|
||||||
$pdf = PDF::loadView('pdf.credit', $data);
|
$pdf = PDF::loadView('pdf.credit', $data);
|
||||||
$pdf->setPaper('A4', 'portrait');
|
$pdf->setPaper('A4', 'portrait');
|
||||||
|
|
||||||
$dir = Invoice::getCreditStorageDir($credit_date);
|
$dir = Credit::getCreditStorageDir($credit_date);
|
||||||
|
|
||||||
if(!Storage::disk('public')->exists( $dir )){
|
if(!Storage::disk('public')->exists( $dir )){
|
||||||
Storage::disk('public')->makeDirectory($dir); //creates directory
|
Storage::disk('public')->makeDirectory($dir); //creates directory
|
||||||
}
|
}
|
||||||
$path = Storage::disk('public')->getAdapter()->getPathPrefix();
|
$path = Storage::disk('public')->getAdapter()->getPathPrefix();
|
||||||
$filename = Invoice::makeCreditFilename($credit_number);
|
$filename = Credit::makeCreditFilename($credit_number);
|
||||||
|
|
||||||
$pdf->save($path.$dir.$filename);
|
$pdf->save($path.$dir.$filename);
|
||||||
|
|
||||||
|
|
@ -61,7 +61,7 @@ class CreditRepository extends BaseRepository {
|
||||||
'invoice_number' => $credit_number,
|
'invoice_number' => $credit_number,
|
||||||
'credit_date' => $credit_date,
|
'credit_date' => $credit_date,
|
||||||
];
|
];
|
||||||
UserCredit::create([
|
$user_credit = UserCredit::create([
|
||||||
'auth_user_id' => $this->model->id,
|
'auth_user_id' => $this->model->id,
|
||||||
'net' => $user_credits->net,
|
'net' => $user_credits->net,
|
||||||
'tax_rate' => $user_credits->tax_rate,
|
'tax_rate' => $user_credits->tax_rate,
|
||||||
|
|
@ -72,31 +72,47 @@ class CreditRepository extends BaseRepository {
|
||||||
'user_margins' => $user_credits->margins,
|
'user_margins' => $user_credits->margins,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if($credit_send_mail){
|
if($credit_send_mail){
|
||||||
//Invoice::sendInvoiceMail($this->model);
|
Credit::sendCreditMail($user_credit);
|
||||||
}
|
}
|
||||||
//Invoice::makeNextInvoiceNumber();
|
$this->finishUserCredit($user_credit);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
//return $pdf->stream('invoice.pdf');
|
//return $pdf->stream('invoice.pdf');
|
||||||
//return $this->output($path.$dir, $filename);
|
//return $this->output($path.$dir, $filename);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private function finishUserCredit($user_credit){
|
||||||
|
//next number
|
||||||
|
Credit::makeNextCreditNumber();
|
||||||
|
//mark as payed
|
||||||
|
$ShoppingOrderMargins = UserMarign::getOrderFromPartnerCommissionByID($this->model->id);
|
||||||
|
foreach($ShoppingOrderMargins as $ShoppingOrderMargin){
|
||||||
|
$ShoppingOrderMargin->partner_commission_paid = true;
|
||||||
|
$ShoppingOrderMargin->user_credit_id = $user_credit->id;
|
||||||
|
$ShoppingOrderMargin->save();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
private function makeUserCredit(){
|
private function makeUserCredit(){
|
||||||
|
|
||||||
$ret = new \stdClass();
|
$ret = new \stdClass();
|
||||||
$ret->net = 0;
|
$ret->net = 0;
|
||||||
$UserMarigns = UserMarign::getOrderFromPartnerCommissionByID($this->model->id);
|
$ShoppingOrderMargins = UserMarign::getOrderFromPartnerCommissionByID($this->model->id);
|
||||||
foreach($UserMarigns as $UserMarign){
|
foreach($ShoppingOrderMargins as $ShoppingOrderMargin){
|
||||||
$margin = new \stdClass();
|
$margin = new \stdClass();
|
||||||
$margin->id = $UserMarign->id;
|
$margin->id = $ShoppingOrderMargin->id;
|
||||||
$margin->net = $UserMarign->net_partner_commission;
|
$margin->net = $ShoppingOrderMargin->net_partner_commission;
|
||||||
$margin->reference = $UserMarign->shopping_order->getLastShoppingPayment('reference');
|
$margin->reference = $ShoppingOrderMargin->shopping_order->getLastShoppingPayment('reference');
|
||||||
$margin->firstname = $UserMarign->shopping_order->shopping_user->billing_firstname;
|
$margin->firstname = $ShoppingOrderMargin->shopping_order->shopping_user->billing_firstname;
|
||||||
$margin->lastname = $UserMarign->shopping_order->shopping_user->billing_lastname;
|
$margin->lastname = $ShoppingOrderMargin->shopping_order->shopping_user->billing_lastname;
|
||||||
$margin->created_at = $UserMarign->shopping_order->created_at->format("d.m.Y");
|
$margin->created_at = $ShoppingOrderMargin->shopping_order->created_at->format("d.m.Y");
|
||||||
$ret->margins[] = $margin;
|
$ret->margins[] = $margin;
|
||||||
$ret->net += $UserMarign->net_partner_commission;
|
$ret->net += $ShoppingOrderMargin->net_partner_commission;
|
||||||
}
|
}
|
||||||
/* taxable_sales //user tax
|
/* taxable_sales //user tax
|
||||||
1 //umsatzsteuerpflichtig
|
1 //umsatzsteuerpflichtig
|
||||||
|
|
|
||||||
81
app/Services/Credit.php
Normal file
81
app/Services/Credit.php
Normal file
|
|
@ -0,0 +1,81 @@
|
||||||
|
<?php
|
||||||
|
namespace App\Services;
|
||||||
|
|
||||||
|
use App\Services\Util;
|
||||||
|
use App\Models\Setting;
|
||||||
|
use App\Mail\MailCredit;
|
||||||
|
use App\Models\UserCredit;
|
||||||
|
use Illuminate\Support\Facades\Mail;
|
||||||
|
|
||||||
|
class Credit
|
||||||
|
{
|
||||||
|
|
||||||
|
public static function getCreditNumber(){
|
||||||
|
return (int) Setting::getContentBySlug('credit-number');
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static function makeNextCreditNumber(){
|
||||||
|
$invoice_number = self::getCreditNumber();
|
||||||
|
$invoice_number = $invoice_number+1;
|
||||||
|
Setting::setContentBySlug('credit-number', $invoice_number, 'int');
|
||||||
|
return $invoice_number;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function createCreditNumber($invoice_number, $invoice_date){
|
||||||
|
$prefix = "GS".\Carbon::parse($invoice_date)->format('Ym');
|
||||||
|
return $prefix.$invoice_number;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function getCreditStorageDir($invoice_date){
|
||||||
|
return "/credit/".\Carbon::parse($invoice_date)->format('Y/m/');
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function makeCreditFilename($invoice_number){
|
||||||
|
return "Gutschrift-".$invoice_number.".pdf";
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function isCredit(UserCredit $user_credit){
|
||||||
|
return isset($user_credit->credit['filename']) ? true : false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function getFilename(UserCredit $user_credit){
|
||||||
|
return isset($user_credit->credit['filename']) ? $user_credit->credit['filename'] : false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static function getDir(UserCredit $user_credit){
|
||||||
|
return isset($user_credit->credit['dir']) ? $user_credit->credit['dir'] : false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function getDownloadURL(UserCredit $user_credit, $do = false){
|
||||||
|
return route('storage_file', [$user_credit->id, 'cms_download_file', $do]);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function getDownloadPath(UserCredit $user_credit, $full = false){
|
||||||
|
$dir = self::getDir($user_credit);
|
||||||
|
$filename = self::getFilename($user_credit);
|
||||||
|
if(!$full){
|
||||||
|
return $dir.$filename;
|
||||||
|
}
|
||||||
|
return \Storage::disk('public')->path($dir.$filename);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function sendCreditMail(UserCredit $user_credit){
|
||||||
|
$bcc = [];
|
||||||
|
$email = $user_credit->user->email;
|
||||||
|
$email = "kevin.adametz@me.com";
|
||||||
|
if(!$email){
|
||||||
|
if($user_credit->user->mode === 'test'){
|
||||||
|
}else{
|
||||||
|
$email = config('app.checkout_mail');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if($user_credit->user->mode === 'test'){
|
||||||
|
$bcc[] = config('app.checkout_test_mail');
|
||||||
|
}else{
|
||||||
|
$bcc[] = config('app.checkout_mail');
|
||||||
|
}
|
||||||
|
Mail::to($email)->bcc($bcc)->send(new MailCredit($user_credit));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -31,41 +31,22 @@ class Invoice
|
||||||
return "/invoice/".\Carbon::parse($invoice_date)->format('Y/m/');
|
return "/invoice/".\Carbon::parse($invoice_date)->format('Y/m/');
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function getCreditStorageDir($invoice_date){
|
|
||||||
return "/credit/".\Carbon::parse($invoice_date)->format('Y/m/');
|
|
||||||
}
|
|
||||||
|
|
||||||
public static function makeInvoiceFilename($invoice_number){
|
public static function makeInvoiceFilename($invoice_number){
|
||||||
return "Rechnung-".$invoice_number.".pdf";
|
return "Rechnung-".$invoice_number.".pdf";
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function makeCreditFilename($invoice_number){
|
|
||||||
return "Gutschrift-".$invoice_number.".pdf";
|
|
||||||
}
|
|
||||||
|
|
||||||
public static function isInvoice(ShoppingOrder $shopping_order){
|
public static function isInvoice(ShoppingOrder $shopping_order){
|
||||||
return isset($shopping_order->invoice['filename']) ? true : false;
|
return isset($shopping_order->invoice['filename']) ? true : false;
|
||||||
}
|
}
|
||||||
public static function isCredit(UserCredit $user_credit){
|
|
||||||
return isset($user_credit->credit['filename']) ? true : false;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static function getFilename(ShoppingOrder $shopping_order){
|
public static function getFilename(ShoppingOrder $shopping_order){
|
||||||
return isset($shopping_order->invoice['filename']) ? $shopping_order->invoice['filename'] : false;
|
return isset($shopping_order->invoice['filename']) ? $shopping_order->invoice['filename'] : false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function getCreditFilename(UserCredit $user_credit){
|
|
||||||
return isset($user_credit->credit['filename']) ? $user_credit->credit['filename'] : false;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static function getDir(ShoppingOrder $shopping_order){
|
public static function getDir(ShoppingOrder $shopping_order){
|
||||||
return isset($shopping_order->invoice['dir']) ? $shopping_order->invoice['dir'] : false;
|
return isset($shopping_order->invoice['dir']) ? $shopping_order->invoice['dir'] : false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function getCreditDir(UserCredit $user_credit){
|
|
||||||
return isset($user_credit->credit['dir']) ? $user_credit->credit['dir'] : false;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static function getDownloadURL(ShoppingOrder $shopping_order, $do = false){
|
public static function getDownloadURL(ShoppingOrder $shopping_order, $do = false){
|
||||||
return route('storage_file', [$shopping_order->id, 'cms_download_file', $do]);
|
return route('storage_file', [$shopping_order->id, 'cms_download_file', $do]);
|
||||||
}
|
}
|
||||||
|
|
@ -78,15 +59,6 @@ class Invoice
|
||||||
return \Storage::disk('public')->path($dir.$filename);
|
return \Storage::disk('public')->path($dir.$filename);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function getCreditDownloadPath(UserCredit $user_credit, $full = false){
|
|
||||||
$dir = self::getCreditDir($user_credit);
|
|
||||||
$filename = self::getCreditFilename($user_credit);
|
|
||||||
if(!$full){
|
|
||||||
return $dir.$filename;
|
|
||||||
}
|
|
||||||
return \Storage::disk('public')->path($dir.$filename);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static function sendInvoiceMail($shopping_order){
|
public static function sendInvoiceMail($shopping_order){
|
||||||
$bcc = [];
|
$bcc = [];
|
||||||
$billing_email = $shopping_order->shopping_user->billing_email;
|
$billing_email = $shopping_order->shopping_user->billing_email;
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,7 @@ use App\Mail\MailCheckout;
|
||||||
use App\Models\Setting;
|
use App\Models\Setting;
|
||||||
use App\Models\ShoppingOrder;
|
use App\Models\ShoppingOrder;
|
||||||
use App\Models\ShoppingPayment;
|
use App\Models\ShoppingPayment;
|
||||||
|
use App\Models\UserPayCredit;
|
||||||
use App\User;
|
use App\User;
|
||||||
use Illuminate\Support\Facades\Mail;
|
use Illuminate\Support\Facades\Mail;
|
||||||
|
|
||||||
|
|
@ -91,7 +92,22 @@ class Payment
|
||||||
return '<span class="badge badge-pill badge-'.self::getFormattedTxactionColor($shopping_payment->txaction).'">'.self::getFormattedTxaction($shopping_payment->txaction).'</span>';
|
return '<span class="badge badge-pill badge-'.self::getFormattedTxactionColor($shopping_payment->txaction).'">'.self::getFormattedTxaction($shopping_payment->txaction).'</span>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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,
|
||||||
|
'old_credit_total' => $user->payment_credit,
|
||||||
|
'new_credit_total' => $user->payment_credit + $credit,
|
||||||
|
'message' => $message,
|
||||||
|
'status' => $status,
|
||||||
|
'shopping_order_id' => $shopping_order_id,
|
||||||
|
]);
|
||||||
|
$user->payment_credit = $user->payment_credit + $credit;
|
||||||
|
$user->save();
|
||||||
|
|
||||||
|
}
|
||||||
public static function paymentStatusPaidAction(ShoppingOrder $shopping_order, $paid){
|
public static function paymentStatusPaidAction(ShoppingOrder $shopping_order, $paid){
|
||||||
$send_link = false;
|
$send_link = false;
|
||||||
|
|
||||||
|
|
@ -119,8 +135,10 @@ class Payment
|
||||||
// $user->payment_order_id = $shopping_order_item->product->id; //34
|
// $user->payment_order_id = $shopping_order_item->product->id; //34
|
||||||
$user->payment_account = $date;
|
$user->payment_account = $date;
|
||||||
$user->wizard = 100;
|
$user->wizard = 100;
|
||||||
$user->payment_credit = $shopping_order_item->product->price;
|
$user->save();
|
||||||
|
self::addUserPayCredits($user, $shopping_order_item->product->price, 1, 'payment_for_account');
|
||||||
$shopping_order->setUserHistoryValue(['status' => 9]);
|
$shopping_order->setUserHistoryValue(['status' => 9]);
|
||||||
|
|
||||||
}
|
}
|
||||||
/*if($shopping_order_item->product->getActionName($do) === 'payment_for_shop'){
|
/*if($shopping_order_item->product->getActionName($do) === 'payment_for_shop'){
|
||||||
$user->payment_order_id = $shopping_order_item->product->id; //35
|
$user->payment_order_id = $shopping_order_item->product->id; //35
|
||||||
|
|
@ -140,7 +158,7 @@ class Payment
|
||||||
$user->m_level = $shopping_order_item->product->upgrade_to_id;
|
$user->m_level = $shopping_order_item->product->upgrade_to_id;
|
||||||
}
|
}
|
||||||
}*/
|
}*/
|
||||||
$user->save();
|
//$user->save();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -154,10 +172,8 @@ class Payment
|
||||||
$shopping_order->shopping_order_margin->save();
|
$shopping_order->shopping_order_margin->save();
|
||||||
//is payment credit, reduce
|
//is payment credit, reduce
|
||||||
if($shopping_order->shopping_order_margin->from_payment_credit > 0){
|
if($shopping_order->shopping_order_margin->from_payment_credit > 0){
|
||||||
$new_credit = $shopping_order->auth_user->payment_credit - $shopping_order->shopping_order_margin->from_payment_credit;
|
$credit = $shopping_order->shopping_order_margin->from_payment_credit * -1;
|
||||||
$new_credit = $new_credit < 0 ? 0 : $new_credit;
|
self::addUserPayCredits($shopping_order->auth_user, $credit, 2, 'user_order_deduction');
|
||||||
$shopping_order->auth_user->payment_credit = $new_credit;
|
|
||||||
$shopping_order->auth_user->save();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -293,6 +293,9 @@ class User extends Authenticatable
|
||||||
return Carbon::now()->diffForHumans(Carbon::parse($this->payment_shop));
|
return Carbon::now()->diffForHumans(Carbon::parse($this->payment_shop));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function isAboOption(){
|
||||||
|
return false;
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -34,6 +34,8 @@ class CreateShoppingOrderMarginsTable extends Migration
|
||||||
|
|
||||||
$table->timestamp('partner_commission_pending_to')->nullable();
|
$table->timestamp('partner_commission_pending_to')->nullable();
|
||||||
$table->boolean('partner_commission_paid')->default(false);
|
$table->boolean('partner_commission_paid')->default(false);
|
||||||
|
$table->unsignedBigInteger('user_credit_id')->nullable();
|
||||||
|
|
||||||
|
|
||||||
$table->text('content')->nullable();
|
$table->text('content')->nullable();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,52 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
|
class CreateUserPayCreditsTable extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function up()
|
||||||
|
{
|
||||||
|
Schema::create('user_pay_credits', function (Blueprint $table) {
|
||||||
|
$table->id();
|
||||||
|
|
||||||
|
$table->unsignedInteger('user_id');
|
||||||
|
|
||||||
|
$table->decimal('credit', 13, 2)->nullable();
|
||||||
|
$table->decimal('old_credit_total', 13, 2)->nullable();
|
||||||
|
$table->decimal('new_credit_total', 13, 2)->nullable();
|
||||||
|
|
||||||
|
$table->text('message')->nullable();
|
||||||
|
|
||||||
|
$table->unsignedTinyInteger('status')->index()->default(0);
|
||||||
|
|
||||||
|
$table->unsignedInteger('shopping_order_id')->nullable();
|
||||||
|
$table->timestamps();
|
||||||
|
|
||||||
|
$table->foreign('user_id')
|
||||||
|
->references('id')
|
||||||
|
->on('users');
|
||||||
|
|
||||||
|
$table->foreign('shopping_order_id')
|
||||||
|
->references('id')
|
||||||
|
->on('shopping_orders');
|
||||||
|
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function down()
|
||||||
|
{
|
||||||
|
Schema::dropIfExists('user_pay_credits');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -46,7 +46,9 @@
|
||||||
'checkout_copy3line_extern' => 'Bestellung über Berater:',
|
'checkout_copy3line_extern' => 'Bestellung über Berater:',
|
||||||
'status_copy1line' => 'Status zu Deiner Bestellung auf Grüne Seele',
|
'status_copy1line' => 'Status zu Deiner Bestellung auf Grüne Seele',
|
||||||
'invoice_title' => 'Rechnung zu Deiner Bestellung auf Grüne Seele',
|
'invoice_title' => 'Rechnung zu Deiner Bestellung auf Grüne Seele',
|
||||||
|
'credit_title' => 'Gutschrift aus Vertriebspartnerbestellungen auf Grüne Seele',
|
||||||
'invoice_copy1line' => 'vielen Dank für Deine Bestellung bei Grüne Seele. Nachfolgend senden wir Dir die Rechnung zu deiner Bestellung: ',
|
'invoice_copy1line' => 'vielen Dank für Deine Bestellung bei Grüne Seele. Nachfolgend senden wir Dir die Rechnung zu deiner Bestellung: ',
|
||||||
|
'credit_copy1line' => 'vielen Dank für Deine Vertriebspartnerschaft bei Grüne Seele. Nachfolgend senden wir Dir eine Gutschrift zu Bestellungen von deinen Vertriebspartnern: ',
|
||||||
'footer_copy1' => 'GRÜNE SEELE GbR | Hauptstrasse 174 | 51143 Köln | Telefon: (+49) 2203 183 86 14 | E-Mail: service@gruene-seele.bio',
|
'footer_copy1' => 'GRÜNE SEELE GbR | Hauptstrasse 174 | 51143 Köln | Telefon: (+49) 2203 183 86 14 | E-Mail: service@gruene-seele.bio',
|
||||||
'footer_copy2' => '',
|
'footer_copy2' => '',
|
||||||
'footer_copy3' => '© 2021 All Rights Reserved',
|
'footer_copy3' => '© 2021 All Rights Reserved',
|
||||||
|
|
|
||||||
|
|
@ -44,4 +44,5 @@ return [
|
||||||
'credit' => 'Gutschriften',
|
'credit' => 'Gutschriften',
|
||||||
'invoice' => 'Rechnungen',
|
'invoice' => 'Rechnungen',
|
||||||
'revenue' => 'Umsätze',
|
'revenue' => 'Umsätze',
|
||||||
|
'paycredit' => 'Guthaben',
|
||||||
];
|
];
|
||||||
|
|
|
||||||
|
|
@ -211,8 +211,8 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group col-sm-12">
|
<div class="form-group col-sm-12">
|
||||||
<label class="form-label" for="credit_number">{{ __('Gutschriftsnummer') }}</label>
|
<label class="form-label" for="credit_number">{{ __('Gutschriftsnummer') }}</label>
|
||||||
{!! Form::text('credit_number', App\Services\Invoice::getInvoiceNumber(), ['class'=>'form-control']) !!}
|
{!! Form::text('credit_number', App\Services\Credit::getCreditNumber(), ['class'=>'form-control']) !!}
|
||||||
<em> nächste Rechnungsnummer <a href="{{ route('admin_settings') }}"><i class="fa fa-edit"></i></a></em>
|
<em> nächste Gutschriftsnummer <a href="{{ route('admin_settings') }}"><i class="fa fa-edit"></i></a></em>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group col-sm-12">
|
<div class="form-group col-sm-12">
|
||||||
<label class="custom-control custom-checkbox">
|
<label class="custom-control custom-checkbox">
|
||||||
|
|
|
||||||
82
resources/views/admin/payment/pay_credit/index.blade.php
Executable file
82
resources/views/admin/payment/pay_credit/index.blade.php
Executable file
|
|
@ -0,0 +1,82 @@
|
||||||
|
@extends('layouts.layout-2')
|
||||||
|
|
||||||
|
@section('content')
|
||||||
|
<div class="card">
|
||||||
|
<h6 class="card-header">
|
||||||
|
Zahlungen / Guthaben
|
||||||
|
</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']) !!}
|
||||||
|
<label class="form-label" for="filter_user_status">Filter User</label>
|
||||||
|
<select class="custom-select" name="filter_user_status" id="filter_user_status">
|
||||||
|
<option value="all" @if($filter_user_status === 'all') selected @endif>alle</option>
|
||||||
|
<option value="active" @if($filter_user_status === 'active') selected @endif>Acount aktiv</option>
|
||||||
|
<option value="deactive" @if($filter_user_status === 'deactive') selected @endif>Acount deaktiv</option>
|
||||||
|
</select>
|
||||||
|
{!! Form::close() !!}
|
||||||
|
|
||||||
|
</div>
|
||||||
|
--}}
|
||||||
|
|
||||||
|
<div class="card-datatable table-responsive pt-0">
|
||||||
|
<table class="datatables-style table table-striped table-bordered" id="datatable-pay-credit">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>ID</th>
|
||||||
|
<th>{{__('Vorname')}}</th>
|
||||||
|
<th>{{__('Nachname') }}</th>
|
||||||
|
<th>{{__('E-Mail') }}</th>
|
||||||
|
<th>{{__('Guthaben') }}</th>
|
||||||
|
<th>{{__('Account')}}</th>
|
||||||
|
<th> </th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
|
||||||
|
$( document ).ready(function() {
|
||||||
|
var oTable = $('#datatable-pay-credit').DataTable({
|
||||||
|
"processing": true,
|
||||||
|
"serverSide": true,
|
||||||
|
ajax: {
|
||||||
|
url: '{!! route( 'admin_payments_paycredit_datatable') !!}',
|
||||||
|
data: function(d) {
|
||||||
|
d.filter_user_status = $('select[name=filter_user_status]').val();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"order": [[0, "desc" ]],
|
||||||
|
"columns": [
|
||||||
|
{ data: 'id', searchable: false },
|
||||||
|
{ data: 'first_name', name: 'account.first_name' },
|
||||||
|
{ data: 'last_name', name: 'account.last_name' },
|
||||||
|
{ data: 'email', name: 'email' },
|
||||||
|
{ data: 'payment_credit', name: 'payment_credit' },
|
||||||
|
{ data: 'is_active_account', name: 'is_active_account', orderable: false, searchable: false },
|
||||||
|
{ data: 'action', name: 'action', orderable: false, searchable: false },
|
||||||
|
],
|
||||||
|
"bLengthChange": false,
|
||||||
|
"iDisplayLength": 100,
|
||||||
|
"language": {
|
||||||
|
"url": "/js/German.json"
|
||||||
|
}
|
||||||
|
});
|
||||||
|
$('#filter_user_status').on('change', function(){
|
||||||
|
oTable.draw();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*$('#filter_user_status').on('change', function(){
|
||||||
|
$('#form_filter_user_status').submit();
|
||||||
|
});*/
|
||||||
|
|
||||||
|
|
||||||
|
</script>
|
||||||
|
@endsection
|
||||||
|
|
@ -46,6 +46,13 @@
|
||||||
{{ Form::hidden('settings[invoice-number][type]', 'int') }}
|
{{ Form::hidden('settings[invoice-number][type]', 'int') }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="form-row">
|
||||||
|
<div class="form-group col-sm-12">
|
||||||
|
<label class="form-label">{{ __('nächste Gutschriftsnummer') }}*</label>
|
||||||
|
{{ Form::text('settings[credit-number][val]', \App\Models\Setting::getContentBySlug('credit-number'), array('class'=>'form-control')) }}
|
||||||
|
{{ Form::hidden('settings[credit-number][type]', 'int') }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<button type="submit" name="action" value="save_prepayment" class="btn btn-primary btn-sm mb-2"><i class="ion ion-ios-save"></i> speichern</button>
|
<button type="submit" name="action" value="save_prepayment" class="btn btn-primary btn-sm mb-2"><i class="ion ion-ios-save"></i> speichern</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -114,6 +114,9 @@
|
||||||
<li class="sidenav-item{{ Request::is('admin/payments/credit') ? ' active' : '' }}">
|
<li class="sidenav-item{{ Request::is('admin/payments/credit') ? ' active' : '' }}">
|
||||||
<a href="{{ route('admin_payments_credit') }}" class="sidenav-link"><i class="sidenav-icon ion ion-ios-arrow-dropright-circle"></i><div>{{ __('navigation.credit') }}</div></a>
|
<a href="{{ route('admin_payments_credit') }}" class="sidenav-link"><i class="sidenav-icon ion ion-ios-arrow-dropright-circle"></i><div>{{ __('navigation.credit') }}</div></a>
|
||||||
</li>
|
</li>
|
||||||
|
<li class="sidenav-item{{ Request::is('admin/payments/paycredit') ? ' active' : '' }}">
|
||||||
|
<a href="{{ route('admin_payments_paycredit') }}" class="sidenav-link"><i class="sidenav-icon ion ion-ios-arrow-dropup-circle"></i><div>{{ __('navigation.paycredit') }}</div></a>
|
||||||
|
</li>
|
||||||
<li class="sidenav-item{{ Request::is('admin/payments/invoice') ? ' active' : '' }}">
|
<li class="sidenav-item{{ Request::is('admin/payments/invoice') ? ' active' : '' }}">
|
||||||
<a href="{{ route('admin_payments_invoice') }}" class="sidenav-link"><i class="sidenav-icon ion ion-ios-arrow-dropleft-circle"></i><div>{{ __('navigation.invoice') }}</div></a>
|
<a href="{{ route('admin_payments_invoice') }}" class="sidenav-link"><i class="sidenav-icon ion ion-ios-arrow-dropleft-circle"></i><div>{{ __('navigation.invoice') }}</div></a>
|
||||||
</li>
|
</li>
|
||||||
|
|
|
||||||
|
|
@ -288,6 +288,10 @@ Route::group(['middleware' => ['admin']], function()
|
||||||
Route::get('/admin/payments/credit/datatable', 'PaymentCreditController@datatable')->name('admin_payments_credit_datatable');
|
Route::get('/admin/payments/credit/datatable', 'PaymentCreditController@datatable')->name('admin_payments_credit_datatable');
|
||||||
Route::post('/admin/payments/credit/create', 'PaymentCreditController@create')->name('admin_payments_credit_create');
|
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::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/invoice', 'PaymentInvoiceController@index')->name('admin_payments_invoice');
|
Route::get('/admin/payments/invoice', 'PaymentInvoiceController@index')->name('admin_payments_invoice');
|
||||||
Route::post('/admin/payments/invoice', 'PaymentInvoiceController@index')->name('admin_payments_invoice');
|
Route::post('/admin/payments/invoice', 'PaymentInvoiceController@index')->name('admin_payments_invoice');
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue