<?php
namespace App\Services\Yard;


use App\Services\Util;

class Commission
{
    public $price_net;
    public $single_price_net;
    public $single_value_commission;
    public $single_partner_commission;
    public $single_amount_commission;
    public $single_price_net_commission;

    public function __construct()
    {
        $this->price_net = 0;
        $this->single_price_net = 0;
        $this->single_amount_commission = 0;
        $this->single_partner_commission = 0;
        $this->single_value_commission = 0;
        $this->single_price_net_commission = 0;
    }

    public function isCommission(){
        return ($this->single_value_commission > 0) ? true : false;
    }

    public function getFormatted($key)
    {
        return isset($this->{$key}) ? Util::formatNumber($this->{$key}) : "";
    }
}