Gutschriften manuell hinzufügen, Yard 0& tax
This commit is contained in:
parent
e670b92f5d
commit
c02fffd883
24 changed files with 497 additions and 68 deletions
|
|
@ -32,12 +32,13 @@ class Yard extends Cart
|
|||
private $yard_commission;
|
||||
private $yard_margin;
|
||||
|
||||
private $global_tax_rate = 19;
|
||||
private $global_tax_rate = 0;
|
||||
|
||||
public function __construct(SessionManager $session, Dispatcher $events)
|
||||
{
|
||||
$this->ysession = $session;
|
||||
$this->yinstance = sprintf('%s.%s', 'cart', 'shipping_extras');
|
||||
|
||||
if($this->getYardExtra('shipping_price')){
|
||||
$this->shipping_price = (float) ($this->getYardExtra('shipping_price'));
|
||||
}
|
||||
|
|
@ -80,6 +81,11 @@ class Yard extends Cart
|
|||
if($this->getYardExtra('yard_margin')){
|
||||
$this->yard_margin = $this->getYardExtra('yard_margin');
|
||||
}
|
||||
if($this->getYardExtra('global_tax_rate') || $this->getYardExtra('global_tax_rate') === 0.0){
|
||||
$this->global_tax_rate = $this->getYardExtra('global_tax_rate');
|
||||
}else{
|
||||
$this->global_tax_rate = config('cart.tax');
|
||||
}
|
||||
|
||||
/*if($this->getYardExtra('num_comp')){
|
||||
$this->num_comp = $this->getYardExtra('num_comp');
|
||||
|
|
@ -104,6 +110,13 @@ class Yard extends Cart
|
|||
{
|
||||
return config('cart.tax');
|
||||
}
|
||||
|
||||
public function setGlobalTaxRate($value){
|
||||
|
||||
$this->global_tax_rate = floatval($value);
|
||||
$this->putYardExtra('global_tax_rate', $this->global_tax_rate);
|
||||
|
||||
}
|
||||
|
||||
public function putYardExtra($key, $value){
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue