mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-10 13:12:50 +01:00
remove tax_data from transformers
This commit is contained in:
parent
f356ddd845
commit
85b261ab21
@ -188,7 +188,7 @@ class BaseRule implements RuleInterface
|
||||
try {
|
||||
return USStates::getState(strlen($this->client->postal_code) > 1 ? $this->client->postal_code : $this->client->shipping_postal_code);
|
||||
} catch (\Exception $e) {
|
||||
return 'CA';
|
||||
return $this->client->company->country()->iso_3166_2 == 'US' ? $this->client->company->tax_data->seller_subregion : 'CA';
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -149,7 +149,7 @@ class ClientTransformer extends EntityTransformer
|
||||
'number' => (string) $client->number ?: '',
|
||||
'has_valid_vat_number' => (bool) $client->has_valid_vat_number,
|
||||
'is_tax_exempt' => (bool) $client->is_tax_exempt,
|
||||
'tax_data' => $client->tax_data ?: '',
|
||||
// 'tax_data' => $client->tax_data ?: '',
|
||||
];
|
||||
}
|
||||
}
|
||||
|
@ -149,7 +149,7 @@ class InvoiceTransformer extends EntityTransformer
|
||||
'paid_to_date' => (float) $invoice->paid_to_date,
|
||||
'subscription_id' => $this->encodePrimaryKey($invoice->subscription_id),
|
||||
'auto_bill_enabled' => (bool) $invoice->auto_bill_enabled,
|
||||
'tax_data' => $invoice->tax_data ?: '',
|
||||
// 'tax_data' => $invoice->tax_data ?: '',
|
||||
];
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user