Update Framework, Invoices
This commit is contained in:
parent
cc5c147c27
commit
9b0b5feb7e
174 changed files with 28356 additions and 8093 deletions
|
|
@ -45,6 +45,9 @@ use Illuminate\Database\Eloquent\SoftDeletes;
|
|||
* @property float|null $price_net
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingOrderItem whereComp($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingOrderItem wherePriceNet($value)
|
||||
* @property int|null $homeparty_id
|
||||
* @property-read \App\Models\Homeparty|null $homeparty
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ShoppingOrderItem whereHomepartyId($value)
|
||||
*/
|
||||
class ShoppingOrderItem extends Model
|
||||
{
|
||||
|
|
@ -63,10 +66,13 @@ class ShoppingOrderItem extends Model
|
|||
'price',
|
||||
'price_net',
|
||||
'tax_rate',
|
||||
'tax',
|
||||
'price_vk_net',
|
||||
'discount',
|
||||
'points',
|
||||
'slug',
|
||||
];
|
||||
|
||||
|
||||
public function shopping_order()
|
||||
{
|
||||
return $this->belongsTo('App\Models\ShoppingOrder','shopping_order_id');
|
||||
|
|
@ -97,6 +103,27 @@ class ShoppingOrderItem extends Model
|
|||
return formatNumber($this->attributes['price_net']);
|
||||
}
|
||||
|
||||
public function getFormattedPriceVkNet()
|
||||
{
|
||||
return formatNumber($this->attributes['price_vk_net']);
|
||||
}
|
||||
|
||||
public function getFormattedTaxRate()
|
||||
{
|
||||
return cleanNumberFormat($this->attributes['tax_rate']);
|
||||
}
|
||||
|
||||
public function getTaxRate()
|
||||
{
|
||||
return formatNumber($this->attributes['tax']);
|
||||
}
|
||||
|
||||
|
||||
public function getFormattedDiscount()
|
||||
{
|
||||
return cleanNumberFormat($this->attributes['discount']);
|
||||
}
|
||||
|
||||
public function getFormattedTotalPriceNet()
|
||||
{
|
||||
return formatNumber($this->attributes['price_net'] * $this->attributes['qty']);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue