mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-03 17:34:37 -04:00
Enhancements for reports
This commit is contained in:
parent
b66272c974
commit
57e7b4f879
@ -129,11 +129,13 @@ class Rule extends BaseRule implements RuleInterface
|
|||||||
*/
|
*/
|
||||||
public function taxShipping($item): self
|
public function taxShipping($item): self
|
||||||
{
|
{
|
||||||
|
|
||||||
if($this->tax_data?->txbFreight == 'Y') {
|
if($this->tax_data?->txbFreight == 'Y') {
|
||||||
$this->default($item);
|
return $this->default($item);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$this->tax_rate1 = 0;
|
||||||
|
$this->tax_name1 = '';
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -33,6 +33,8 @@ class BaseExport
|
|||||||
|
|
||||||
public string $client_description = 'All Clients';
|
public string $client_description = 'All Clients';
|
||||||
|
|
||||||
|
public array $forced_keys = [];
|
||||||
|
|
||||||
protected function filterByClients($query)
|
protected function filterByClients($query)
|
||||||
{
|
{
|
||||||
if (isset($this->input['client_id']) && $this->input['client_id'] != 'all') {
|
if (isset($this->input['client_id']) && $this->input['client_id'] != 'all') {
|
||||||
@ -170,7 +172,7 @@ class BaseExport
|
|||||||
{
|
{
|
||||||
$header = [];
|
$header = [];
|
||||||
|
|
||||||
foreach ($this->input['report_keys'] as $value) {
|
foreach (array_merge($this->input['report_keys'], $this->forced_keys) as $value) {
|
||||||
$key = array_search($value, $this->entity_keys);
|
$key = array_search($value, $this->entity_keys);
|
||||||
|
|
||||||
$key = str_replace('item.', '', $key);
|
$key = str_replace('item.', '', $key);
|
||||||
|
@ -81,6 +81,10 @@ class ClientExport extends BaseExport
|
|||||||
'client.industry',
|
'client.industry',
|
||||||
];
|
];
|
||||||
|
|
||||||
|
public array $forced_keys = [
|
||||||
|
'status',
|
||||||
|
];
|
||||||
|
|
||||||
public function __construct(Company $company, array $input)
|
public function __construct(Company $company, array $input)
|
||||||
{
|
{
|
||||||
$this->company = $company;
|
$this->company = $company;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user