mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-24 02:14:21 -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'])) {
|
||||
$this->default($item);
|
||||
}
|
||||
else {
|
||||
$this->taxExempt($item);
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
@ -120,10 +120,10 @@ class ExpenseFilters extends QueryFilters
|
||||
|
||||
$search_key = $split[0] == 'client' ? 'client_id' : 'project_id';
|
||||
|
||||
return $this->builder->whereNotNull('invoice_id')
|
||||
->whereHas('invoice', function ($query) use ($search_key, $split){
|
||||
$query->where($search_key, $this->decodePrimaryKey($split[1]));
|
||||
});
|
||||
return $this->builder->whereHas('invoice', function ($query) use ($search_key, $split){
|
||||
$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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user