Updates to 03-2025
This commit is contained in:
parent
6167273a48
commit
9b54eb0512
348 changed files with 34535 additions and 5774 deletions
|
|
@ -51,7 +51,6 @@ use Illuminate\Database\Eloquent\SoftDeletes;
|
|||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingOrder whereUpdatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingOrder whereUserShopId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingOrder whereWeight($value)
|
||||
* @mixin \Eloquent
|
||||
* @property int|null $payment_for
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingOrder wherePaymentFor($value)
|
||||
* @property int|null $member_id
|
||||
|
|
@ -104,6 +103,9 @@ use Illuminate\Database\Eloquent\SoftDeletes;
|
|||
* @property-read \App\Models\PromotionUser|null $promotion_user
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ShoppingOrder wherePromotionUserId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ShoppingOrder whereShippingOption($value)
|
||||
* @property array|null $delivery
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ShoppingOrder whereDelivery($value)
|
||||
* @mixin \Eloquent
|
||||
*/
|
||||
class ShoppingOrder extends Model
|
||||
{
|
||||
|
|
@ -116,10 +118,10 @@ class ShoppingOrder extends Model
|
|||
'shopping_user_id',
|
||||
'auth_user_id',
|
||||
'promotion_user_id',
|
||||
'user_shop_id',
|
||||
'member_id',
|
||||
'payment_for',
|
||||
'country_id',
|
||||
'user_shop_id',
|
||||
'total',
|
||||
'subtotal_full',
|
||||
'discount',
|
||||
|
|
@ -135,6 +137,7 @@ class ShoppingOrder extends Model
|
|||
'weight',
|
||||
'paid',
|
||||
'invoice',
|
||||
'delivery',
|
||||
'invoice_number',
|
||||
'txaction',
|
||||
'wp_invoice_path',
|
||||
|
|
@ -149,6 +152,7 @@ class ShoppingOrder extends Model
|
|||
protected $casts = [
|
||||
'wp_notice' => 'array',
|
||||
'invoice' => 'array',
|
||||
'delivery' => 'array',
|
||||
'shipped_at' => 'datetime',
|
||||
];
|
||||
|
||||
|
|
@ -196,10 +200,10 @@ class ShoppingOrder extends Model
|
|||
|
||||
public static $apiShippedTypes = [
|
||||
0 => 'open', //(Fullfilment durch Händler)',
|
||||
1 => 'process', //(Fullfilment durch MIVITA: nicht Versand)
|
||||
2 => 'sent', //(Fullfilment durch MIVITA: Versand erfolgt)'
|
||||
3 => 'close', //(Fullfilment durch MIVITA: Versand erfolgt)',
|
||||
4 => 'pick_up', //(Fullfilment durch MIVITA: Versand erfolgt)',
|
||||
1 => 'process', //(Fullfilment: nicht Versand)
|
||||
2 => 'sent', //(Fullfilment: Versand erfolgt)'
|
||||
3 => 'close', //(Fullfilment: Versand erfolgt)',
|
||||
4 => 'pick_up', //(Fullfilment: Versand erfolgt)',
|
||||
10 => 'cancel'
|
||||
];
|
||||
|
||||
|
|
@ -232,6 +236,11 @@ class ShoppingOrder extends Model
|
|||
return $this->belongsTo('App\Models\PromotionUser','promotion_user_id');
|
||||
}
|
||||
|
||||
public function user_shop()
|
||||
{
|
||||
return $this->belongsTo('App\Models\UserShop','user_shop_id');
|
||||
}
|
||||
|
||||
//can null
|
||||
public function member()
|
||||
{
|
||||
|
|
@ -367,6 +376,11 @@ class ShoppingOrder extends Model
|
|||
}
|
||||
return $count;
|
||||
}
|
||||
|
||||
public function isInvoice(){
|
||||
return $this->user_invoice ? true : false;
|
||||
}
|
||||
|
||||
public function isPickUp(){
|
||||
return $this->shipping_option === 'pick_up' ? true : false;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue