mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-24 02:14:21 -04:00
Add translated stubs for the PDF Mock
This commit is contained in:
parent
4bd1895fa7
commit
64624afff1
@ -474,7 +474,7 @@ class Client extends BaseModel implements HasLocalePreference
|
||||
* of settings which have been merged from
|
||||
* Client > Group > Company levels.
|
||||
*
|
||||
* @return stdClass stdClass object of settings
|
||||
* @return \stdClass stdClass object of settings
|
||||
*/
|
||||
public function getMergedSettings() :object
|
||||
{
|
||||
@ -483,7 +483,7 @@ class Client extends BaseModel implements HasLocalePreference
|
||||
|
||||
return ClientSettings::buildClientSettings($this->company->settings, $group_settings);
|
||||
}
|
||||
|
||||
nlog(CompanySettings::setProperties(ClientSettings::buildClientSettings($this->company->settings, $this->settings)));
|
||||
return CompanySettings::setProperties(ClientSettings::buildClientSettings($this->company->settings, $this->settings));
|
||||
}
|
||||
|
||||
|
@ -445,6 +445,14 @@ class PdfBuilder
|
||||
return $elements;
|
||||
}
|
||||
|
||||
$_type = Str::startsWith($type, '$') ? ltrim($type, '$') : $type;
|
||||
$table_type = "{$_type}_columns";
|
||||
|
||||
if ($_type == 'product' && $this->service->config->entity instanceof Quote && !$this->service->config->settings?->sync_invoice_quote_columns) {
|
||||
$table_type = "product_quote_columns";
|
||||
}
|
||||
|
||||
|
||||
foreach ($items as $row) {
|
||||
$element = ['element' => 'tr', 'elements' => []];
|
||||
|
||||
@ -645,7 +653,13 @@ class PdfBuilder
|
||||
'$task.rate' => '$task.cost',
|
||||
];
|
||||
|
||||
foreach ($this->service->config->pdf_variables["{$type}_columns"] as $column) {
|
||||
$table_type = "{$type}_columns";
|
||||
|
||||
if ($type == 'product' && $this->service->config->entity instanceof Quote && !$this->service->config->settings_object?->sync_invoice_quote_columns) {
|
||||
$table_type = "product_quote_columns";
|
||||
}
|
||||
|
||||
foreach ($this->service->config->pdf_variables[$table_type] as $column) {
|
||||
if (array_key_exists($column, $aliases)) {
|
||||
$elements[] = ['element' => 'th', 'content' => $aliases[$column] . '_label', 'properties' => ['data-ref' => "{$type}_table-" . substr($aliases[$column], 1) . '-th', 'hidden' => $this->service->config->settings->hide_empty_columns_on_pdf]];
|
||||
} elseif ($column == '$product.discount' && !$this->service->company->enable_product_discount) {
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -681,8 +681,6 @@ class Design extends BaseDesign
|
||||
|
||||
$table_type = "{$type}_columns";
|
||||
|
||||
nlog($table_type);
|
||||
|
||||
if($type == 'product' && $this->entity instanceof Quote && !$this->settings_object->getSetting('sync_invoice_quote_columns'))
|
||||
$table_type = "product_quote_columns";
|
||||
|
||||
|
@ -511,7 +511,7 @@ class VendorHtmlEngine
|
||||
$data['values'][$key] = $value['value'];
|
||||
$data['labels'][$key.'_label'] = $value['label'];
|
||||
}
|
||||
|
||||
nlog($data);
|
||||
return $data;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user