commit 2bdbfaec541c3d51489f32e0fa6f7523ca4e4f6f
Author: Olivier Legat <olivier.legat@ldc.fr>
Date: Thu Apr 8 15:48:13 2021 +0200
arrondis de taxe dans le panier
commit ce748bcac15a0b633cacc06b8232cbb92a8e455c
Author: Olivier Legat <olivier.legat@ldc.fr>
Date: Thu Apr 8 11:53:54 2021 +0200
Prix calcules - affichés
commit cc79e7c633d81290371eceabe9864d4d0ee9e4a5
Author: Olivier Legat <olivier.legat@ldc.fr>
Date: Wed Apr 7 18:09:12 2021 +0200
Affichage des promowork in progress => prix remisés
commit 8545d1079da2456f090557eeef005e4d37154a1e
Author: Olivier Legat <olivier.legat@ldc.fr>
Date: Wed Apr 7 13:04:28 2021 +0200
resource BO Promotions
commit d7145835de675da32e57bec3f0b8f06e1e447b27
Author: Olivier Legat <olivier.legat@ldc.fr>
Date: Tue Apr 6 18:23:36 2021 +0200
structure DB, debut BO
28 lines
594 B
PHP
28 lines
594 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class OrderLine extends Model
|
|
{
|
|
use HasFactory;
|
|
|
|
//Relations
|
|
public function order()
|
|
{
|
|
return $this->belongsTo(Order::class);
|
|
}
|
|
|
|
public function product()
|
|
{
|
|
return $this->belongsTo(Product::class);
|
|
}
|
|
|
|
//Formattages
|
|
public function getFormattedTotalTtcAttribute()
|
|
{
|
|
return $this->attributes['formattedTotalTtc'] = sprintf('%s €', number_format($this->attributes['total_ttc'], 2, ',', ' '));
|
|
}
|
|
}
|