mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-08 16:54:31 -04:00
Fixes for e-invoices
This commit is contained in:
parent
3541324d1a
commit
a946cf346d
@ -220,7 +220,7 @@ class CreateRawPdf implements ShouldQueue
|
|||||||
*/
|
*/
|
||||||
private function checkEInvoice(string $pdf): string
|
private function checkEInvoice(string $pdf): string
|
||||||
{
|
{
|
||||||
if(!$this->entity instanceof Invoice)
|
if(!$this->entity instanceof Invoice || !$this->company->getSetting('enable_e_invoice'))
|
||||||
return $pdf;
|
return $pdf;
|
||||||
|
|
||||||
$e_invoice_type = $this->entity->client->getSetting('e_invoice_type');
|
$e_invoice_type = $this->entity->client->getSetting('e_invoice_type');
|
||||||
|
@ -105,22 +105,22 @@ class BaseModel extends Model
|
|||||||
return $value;
|
return $value;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function __call($method, $params)
|
// public function __call($method, $params)
|
||||||
{
|
// {
|
||||||
$entity = strtolower(class_basename($this));
|
// $entity = strtolower(class_basename($this));
|
||||||
|
|
||||||
if ($entity) {
|
// if ($entity) {
|
||||||
$configPath = "modules.relations.$entity.$method";
|
// $configPath = "modules.relations.$entity.$method";
|
||||||
|
|
||||||
if (config()->has($configPath)) {
|
// if (config()->has($configPath)) {
|
||||||
$function = config()->get($configPath);
|
// $function = config()->get($configPath);
|
||||||
|
|
||||||
return call_user_func_array([$this, $function[0]], $function[1]);
|
// return call_user_func_array([$this, $function[0]], $function[1]);
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
return parent::__call($method, $params);
|
// return parent::__call($method, $params);
|
||||||
}
|
// }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param \Illuminate\Database\Eloquent\Builder $query
|
* @param \Illuminate\Database\Eloquent\Builder $query
|
||||||
|
Loading…
x
Reference in New Issue
Block a user