mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-03 16:24:37 -04:00
Fixes for tax calculations
This commit is contained in:
parent
7c695a8de2
commit
eb44584fe8
@ -117,6 +117,9 @@ class Rule extends BaseRule implements RuleInterface
|
|||||||
if(in_array($this->tax_data?->txbService,['Y','L'])) {
|
if(in_array($this->tax_data?->txbService,['Y','L'])) {
|
||||||
$this->default($item);
|
$this->default($item);
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
$this->taxExempt($item);
|
||||||
|
}
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
@ -120,10 +120,10 @@ class ExpenseFilters extends QueryFilters
|
|||||||
|
|
||||||
$search_key = $split[0] == 'client' ? 'client_id' : 'project_id';
|
$search_key = $split[0] == 'client' ? 'client_id' : 'project_id';
|
||||||
|
|
||||||
return $this->builder->whereNotNull('invoice_id')
|
return $this->builder->whereHas('invoice', function ($query) use ($search_key, $split){
|
||||||
->whereHas('invoice', function ($query) use ($search_key, $split){
|
$query->where($search_key, $this->decodePrimaryKey($split[1]))
|
||||||
$query->where($search_key, $this->decodePrimaryKey($split[1]));
|
->whereIn('status_id', [\App\Models\Invoice::STATUS_DRAFT, \App\Models\Invoice::STATUS_SENT, \App\Models\Invoice::STATUS_PARTIAL]);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->builder;
|
return $this->builder;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user