Berater Bestellung / online

This commit is contained in:
Kevin Adametz 2020-08-24 18:17:02 +02:00
parent 16fe2fa363
commit ecc71c616f
26 changed files with 828 additions and 240 deletions

View file

@ -17,15 +17,25 @@ class Payment
'failed' => "abbruch",
'extern' => "extern",
'invoice_open' => "Re. offen",
'invoice_paid' => "Re. bezahlt",
'invoice_non' => "keine Zahlung",
'NULL' => 'keine Zahlung',
];
public static $txaction_invoice = [
'invoice_open' => "Re. offen",
'invoice_paid' => "Re. bezahlt",
'invoice_non' => 'keine Zahlung',
];
public static $txaction_color = [
'paid' => "success",
'appointed' => "warning",
'failed' => "danger",
'extern' => "success",
'invoice_open' => "warning",
'invoice_paid' => "success",
'invoice_non' => "failed",
];

View file

@ -11,7 +11,7 @@ class Shop
{
public static function userOrders() {
$shopping_users = ShoppingUser::whereHas('shopping_order', function($q) {
$q->where('txaction', 'paid')->OrWhere('txaction', 'appointed')->OrWhere('txaction', 'extern');
$q->where('txaction', 'paid')->OrWhere('txaction', 'appointed')->OrWhere('txaction', 'extern')->OrWhere('txaction', 'invoice_open')->OrWhere('txaction', 'invoice_paid');
})->where('orders', '=', NULL)->get();
foreach ($shopping_users as $shopping_user) {
if ($shopping_user->number) {

View file

@ -2,6 +2,7 @@
namespace App\Services;
use App\Models\UserHistory;
use Yard;
class Util
{
@ -158,9 +159,13 @@ class Util
}
public static function getUserPaymentFor(){
if(Yard::instance('shopping')->getYardExtra('user_shop_payment')){
return Yard::instance('shopping')->getYardExtra('user_shop_payment');
}
if(\Session::has('user_shop_payment')){
return \Session::get('user_shop_payment');
}
return null;
}

View file

@ -31,6 +31,14 @@ class Yard extends Cart
$this->shipping_price = (float) ($this->getYardExtra('shipping_price'));
}
if($this->getYardExtra('shipping_price_net')){
$this->shipping_price_net = (float) ($this->getYardExtra('shipping_price_net'));
}
if($this->getYardExtra('shipping_tax_rate')){
$this->shipping_tax_rate = (float) ($this->getYardExtra('shipping_tax_rate'));
}
if($this->getYardExtra('shipping_tax')){
$this->shipping_tax = (float) ($this->getYardExtra('shipping_tax'));
}