Store legal entity ids and company key on license
This commit is contained in:
parent
febf45a240
commit
c4a111c16f
|
|
@ -89,20 +89,23 @@ class License extends StaticModel
|
|||
|
||||
public function addEntity(TaxEntity $entity)
|
||||
{
|
||||
$entities = $this->entities;
|
||||
|
||||
if (is_array($this->entities)) {
|
||||
$this->entities[] = $entity;
|
||||
if (is_array($entities)) {
|
||||
$entities[] = $entity;
|
||||
} else {
|
||||
$this->entities = [$entity];
|
||||
$entities = [$entity];
|
||||
}
|
||||
|
||||
$this->entities = $entities;
|
||||
|
||||
$this->save();
|
||||
|
||||
}
|
||||
|
||||
public function removeEntity(TaxEntity $entity)
|
||||
{
|
||||
|
||||
|
||||
if (!is_array($this->entities)) {
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -83,6 +83,8 @@ class GenerateDeliveryNote
|
|||
|
||||
$variables = $html->generateLabelsAndValues();
|
||||
$variables['labels']['$entity_label'] = ctrans('texts.delivery_note');
|
||||
$variables['labels']['$invoice.date_label'] = ctrans('texts.date');
|
||||
$variables['labels']['$invoice.number_label'] = ctrans('texts.number');
|
||||
|
||||
$state = [
|
||||
'template' => $template->elements([
|
||||
|
|
|
|||
|
|
@ -1478,6 +1478,11 @@ class PdfBuilder
|
|||
{
|
||||
$variables = $this->service->config->pdf_variables['invoice_details'];
|
||||
|
||||
// $_v = $this->service->html_variables;
|
||||
|
||||
// $_v['labels']['$invoice.date_label'] = ctrans('text.date');
|
||||
// $this->service->html_variables = $_v;
|
||||
|
||||
$variables = array_filter($variables, function ($m) {
|
||||
return !in_array($m, ['$invoice.balance_due', '$invoice.total']);
|
||||
});
|
||||
|
|
|
|||
|
|
@ -380,7 +380,7 @@ class Design extends BaseDesign
|
|||
// We don't want to show account balance or invoice total on PDF.. or any amount with currency.
|
||||
if ($this->type == self::DELIVERY_NOTE) {
|
||||
$variables = array_filter($variables, function ($m) {
|
||||
return !in_array($m, ['$invoice.balance_due', '$invoice.total']);
|
||||
return !in_array($m, ['$invoice.balance_due', '$invoice.total', '$invoice.amount']);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue