April 2026 waren Wirtschaft Feedback
This commit is contained in:
parent
02f2a4c23e
commit
9ce711d6b2
167 changed files with 25278 additions and 8518 deletions
|
|
@ -3,7 +3,9 @@
|
|||
namespace App\Models;
|
||||
|
||||
use App\Services\Util;
|
||||
use Illuminate\Database\Eloquent\Collection;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Support\Carbon;
|
||||
|
||||
/**
|
||||
* App\Models\ShoppingPayment
|
||||
|
|
@ -18,11 +20,12 @@ use Illuminate\Database\Eloquent\Model;
|
|||
* @property string $currency
|
||||
* @property string|null $status
|
||||
* @property string|null $txaction
|
||||
* @property \Illuminate\Support\Carbon|null $created_at
|
||||
* @property \Illuminate\Support\Carbon|null $updated_at
|
||||
* @property-read \Illuminate\Database\Eloquent\Collection|\App\Models\PaymentTransaction[] $payment_transactions
|
||||
* @property Carbon|null $created_at
|
||||
* @property Carbon|null $updated_at
|
||||
* @property-read Collection|PaymentTransaction[] $payment_transactions
|
||||
* @property-read int|null $payment_transactions_count
|
||||
* @property-read \App\Models\ShoppingOrder $shopping_order
|
||||
* @property-read ShoppingOrder $shopping_order
|
||||
*
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingPayment newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingPayment newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingPayment query()
|
||||
|
|
@ -38,8 +41,17 @@ use Illuminate\Database\Eloquent\Model;
|
|||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingPayment whereTxaction($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingPayment whereUpdatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingPayment whereWallettype($value)
|
||||
*
|
||||
* @property string|null $mode
|
||||
*
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingPayment whereMode($value)
|
||||
*
|
||||
* @property int|null $reminder
|
||||
* @property Carbon|null $reminder_date
|
||||
*
|
||||
* @method static \Illuminate\Database\Eloquent\Builder<static>|ShoppingPayment whereReminder($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder<static>|ShoppingPayment whereReminderDate($value)
|
||||
*
|
||||
* @mixin \Eloquent
|
||||
*/
|
||||
class ShoppingPayment extends Model
|
||||
|
|
@ -58,7 +70,7 @@ class ShoppingPayment extends Model
|
|||
'reminder',
|
||||
'reminder_date',
|
||||
'txaction',
|
||||
'mode'
|
||||
'mode',
|
||||
];
|
||||
|
||||
protected $casts = [
|
||||
|
|
@ -66,44 +78,46 @@ class ShoppingPayment extends Model
|
|||
'reminder_date' => 'datetime',
|
||||
];
|
||||
|
||||
|
||||
public function shopping_order()
|
||||
{
|
||||
return $this->belongsTo('App\Models\ShoppingOrder','shopping_order_id');
|
||||
return $this->belongsTo('App\Models\ShoppingOrder', 'shopping_order_id');
|
||||
}
|
||||
|
||||
public function payment_transactions()
|
||||
{
|
||||
return $this->hasMany('App\Models\PaymentTransaction','shopping_payment_id');
|
||||
return $this->hasMany('App\Models\PaymentTransaction', 'shopping_payment_id');
|
||||
}
|
||||
|
||||
public function getPaymentType(){
|
||||
public function getPaymentType()
|
||||
{
|
||||
|
||||
if($this->clearingtype === 'pp') {
|
||||
if ($this->clearingtype === 'pp') {
|
||||
return 'PayPal';
|
||||
}
|
||||
if($this->clearingtype === 'cc') {
|
||||
if ($this->clearingtype === 'cc') {
|
||||
return 'Kreditkarte';
|
||||
}
|
||||
if($this->clearingtype === 'vor') {
|
||||
if ($this->clearingtype === 'vor') {
|
||||
return 'Vorkasse';
|
||||
}
|
||||
if($this->clearingtype === 'elv') {
|
||||
if ($this->clearingtype === 'elv') {
|
||||
return 'SEPA Lastschrift';
|
||||
}
|
||||
if($this->clearingtype === 'sb') {
|
||||
if ($this->clearingtype === 'sb') {
|
||||
return 'Sofort Überweisung';
|
||||
}
|
||||
if($this->clearingtype === 'fnc') {
|
||||
if ($this->clearingtype === 'fnc') {
|
||||
return 'Rechnung';
|
||||
}
|
||||
if($this->clearingtype === 'non') {
|
||||
if ($this->clearingtype === 'non') {
|
||||
return 'keine';
|
||||
}
|
||||
|
||||
return 'keine';
|
||||
}
|
||||
|
||||
public function getPaymentAmount(){
|
||||
return Util::formatNumber($this->amount/100)." ".$this->currency;
|
||||
public function getPaymentAmount()
|
||||
{
|
||||
return Util::formatNumber($this->amount / 100).' '.$this->currency;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue