commit 08-2025

This commit is contained in:
Kevin Adametz 2025-08-12 15:51:04 +02:00
parent 9b54eb0512
commit 02f2a4c23e
184 changed files with 31653 additions and 22327 deletions

View file

@ -0,0 +1,57 @@
<?php
/**
* Created by Reliese Model.
*/
namespace App\Models;
use Carbon\Carbon;
use Illuminate\Database\Eloquent\Model;
/**
* Class PaymentReminder
*
* @property int $id
* @property string|null $title
* @property int|null $interval
* @property string|null $message
* @property string|null $action
* @property bool $active
* @property Carbon|null $created_at
* @property Carbon|null $updated_at
*
* @package App\Models
*/
class PaymentReminder extends Model
{
protected $table = 'payment_reminders';
protected $casts = [
'interval' => 'int',
'active' => 'bool'
];
protected $fillable = [
'title',
'subject',
'interval',
'message',
'action',
'clearingtype',
'active'
];
protected static $clearingtypes = [
'fnc' => 'Rechnung',
'vor' => 'Vorkasse',
];
public function getClearingtype(){
return isset(self::$clearingtypes[$this->clearingtype]) ? self::$clearingtypes[$this->clearingtype] : 'Kein Typ';
}
public static function returnClearingtypes(){
return self::$clearingtypes;
}
}

View file

@ -105,6 +105,8 @@ use Illuminate\Database\Eloquent\SoftDeletes;
* @method static \Illuminate\Database\Eloquent\Builder|ShoppingOrder whereShippingOption($value)
* @property array|null $delivery
* @method static \Illuminate\Database\Eloquent\Builder|ShoppingOrder whereDelivery($value)
* @property bool $user_white_label
* @method static \Illuminate\Database\Eloquent\Builder<static>|ShoppingOrder whereUserWhiteLabel($value)
* @mixin \Eloquent
*/
class ShoppingOrder extends Model
@ -138,6 +140,7 @@ class ShoppingOrder extends Model
'paid',
'invoice',
'delivery',
'user_white_label',
'invoice_number',
'txaction',
'wp_invoice_path',
@ -146,7 +149,7 @@ class ShoppingOrder extends Model
'shipped',
'shipped_at',
'shipping_option',
'tracking'
'tracking',
];
protected $casts = [
@ -154,6 +157,7 @@ class ShoppingOrder extends Model
'invoice' => 'array',
'delivery' => 'array',
'shipped_at' => 'datetime',
'user_white_label' => 'boolean',
];
public static $shippedTypes = [
@ -161,6 +165,7 @@ class ShoppingOrder extends Model
1 => 'in Bearbeitung',
2 => 'versendet',
3 => 'abgeschlossen',
5 => 'Wartestellung',
4 => 'Abholung',
10 => 'storniert'
];
@ -213,6 +218,7 @@ class ShoppingOrder extends Model
2 => 'success',
3 => 'secondary',
4 => 'success',
5 => 'warning-dark',
10 => 'danger',
];

View file

@ -58,6 +58,14 @@ use Illuminate\Database\Eloquent\Model;
* @method static \Illuminate\Database\Eloquent\Builder|ShoppingOrderMargin wherePartnerCommissionPendingTo($value)
* @property int|null $user_credit_id
* @method static \Illuminate\Database\Eloquent\Builder|ShoppingOrderMargin whereUserCreditId($value)
* @property bool $order_paid
* @property bool $out_paid
* @property \Illuminate\Support\Carbon|null $margin_pending_to
* @property bool|null $margin_paid
* @method static \Illuminate\Database\Eloquent\Builder<static>|ShoppingOrderMargin whereMarginPaid($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|ShoppingOrderMargin whereMarginPendingTo($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|ShoppingOrderMargin whereOrderPaid($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|ShoppingOrderMargin whereOutPaid($value)
* @mixin \Eloquent
*/
class ShoppingOrderMargin extends Model
@ -113,7 +121,12 @@ class ShoppingOrderMargin extends Model
public static $statusTypes = [
0 => 'user order',
1 => '',
1 => 'Registrierung',
2 => 'Mitgliedschaft',
3 => 'Guthabenaufladung',
4 => 'VP.Bestellung Abholung',
5 => 'VP.Bestellung Lieferung',
6 => 'VP.Kundenbestellung',
7 => 'from promotion',
8 => 'from shop',
9 => 'storniert'

View file

@ -54,9 +54,18 @@ class ShoppingPayment extends Model
'reference',
'amount',
'currency',
'status',
'reminder',
'reminder_date',
'txaction',
'mode'
];
protected $casts = [
'reminder' => 'integer',
'reminder_date' => 'datetime',
];
public function shopping_order()
{
@ -91,6 +100,7 @@ class ShoppingPayment extends Model
if($this->clearingtype === 'non') {
return 'keine';
}
return 'keine';
}
public function getPaymentAmount(){