mirror of
https://github.com/devcode-it/openstamanager.git
synced 2025-01-28 22:49:38 +01:00
Correzione per struttura stampe e traduzioni
This commit is contained in:
parent
203606855e
commit
5cbc4125a7
@ -86,7 +86,7 @@ class Template extends Model
|
||||
|
||||
public function getModuleAttribute()
|
||||
{
|
||||
return 'Template email';
|
||||
return $this->belongsTo(Module::class, 'id_module')->first();
|
||||
}
|
||||
|
||||
public static function getTranslatedFields()
|
||||
|
@ -26,5 +26,5 @@ if (isset($id_record)) {
|
||||
|
||||
$record = $print->toArray();
|
||||
$record['title'] = $print->getTranslation('title');
|
||||
$record['filename'] = $print->filename;
|
||||
$record['filename'] = $print->getTranslation('filename');
|
||||
}
|
||||
|
@ -44,14 +44,9 @@ class PrintTemplate extends Model
|
||||
|
||||
/* Relazioni Eloquent */
|
||||
|
||||
public function module()
|
||||
{
|
||||
return $this->belongsTo(Module::class, 'id_module');
|
||||
}
|
||||
|
||||
public function getModuleAttribute()
|
||||
{
|
||||
return '';
|
||||
return $this->belongsTo(Module::class, 'id_module')->first();
|
||||
}
|
||||
|
||||
public static function getTranslatedFields()
|
||||
|
@ -447,7 +447,7 @@ class Prints
|
||||
{
|
||||
$module = Module::find($record['id_module']);
|
||||
|
||||
$name = $record['filename'].'.pdf';
|
||||
$name = $record->getTranslation('filename').'.pdf';
|
||||
$name = $module->replacePlaceholders($id_record, $name);
|
||||
|
||||
$replaces = [];
|
||||
|
Loading…
x
Reference in New Issue
Block a user