Update Framework, Invoices
This commit is contained in:
parent
cc5c147c27
commit
9b0b5feb7e
174 changed files with 28356 additions and 8093 deletions
|
|
@ -2,11 +2,12 @@
|
|||
namespace App\Services;
|
||||
|
||||
|
||||
use App\User;
|
||||
use App\Mail\MailCheckout;
|
||||
use App\Models\ShoppingOrder;
|
||||
use App\Models\ShoppingPayment;
|
||||
use App\User;
|
||||
use Illuminate\Support\Facades\Mail;
|
||||
use App\Repositories\InvoiceRepository;
|
||||
|
||||
class Payment
|
||||
{
|
||||
|
|
@ -16,15 +17,15 @@ class Payment
|
|||
'appointed' => "offen",
|
||||
'failed' => "abbruch",
|
||||
'extern' => "extern",
|
||||
'invoice_open' => "Re. offen",
|
||||
'invoice_paid' => "Re. bezahlt",
|
||||
'invoice_open' => "offen",
|
||||
'invoice_paid' => "bezahlt",
|
||||
'invoice_non' => "keine Zahlung",
|
||||
'NULL' => 'keine Zahlung',
|
||||
];
|
||||
|
||||
public static $txaction_invoice = [
|
||||
'invoice_open' => "Re. offen",
|
||||
'invoice_paid' => "Re. bezahlt",
|
||||
'invoice_open' => "Rechnung offen",
|
||||
'invoice_paid' => "Rechnung bezahlt",
|
||||
'invoice_non' => 'keine Zahlung',
|
||||
];
|
||||
|
||||
|
|
@ -70,6 +71,11 @@ class Payment
|
|||
return '<span class="badge badge-pill badge-'.self::getFormattedTxactionColor($shopping_payment->txaction).'">'.self::getFormattedTxaction($shopping_payment->txaction).'</span>';
|
||||
}
|
||||
|
||||
/*
|
||||
Wir bei Zahlung aufgerufen.
|
||||
Betätigung durch Payone oder Zahlung auf MIVITA Rechnung
|
||||
$paid = Status der Zahlung, Payone = true, MIVITA Rechnung = false
|
||||
*/
|
||||
|
||||
public static function paymentStatusPaidAction(ShoppingOrder $shopping_order, $paid){
|
||||
$send_link = false;
|
||||
|
|
@ -128,6 +134,12 @@ class Payment
|
|||
$shopping_order->homeparty->completed = 1;
|
||||
$shopping_order->homeparty->save();
|
||||
}
|
||||
//make Invoice and
|
||||
|
||||
$invoice_repo = new InvoiceRepository($shopping_order);
|
||||
if(!$shopping_order->isInvoice()){
|
||||
$invoice_repo->createAndSalesVolume();
|
||||
}
|
||||
return $send_link;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue