This commit is contained in:
Pek5892 2024-03-25 12:27:34 +01:00
parent 15d55d140b
commit 935738af86
5 changed files with 11 additions and 11 deletions

View File

@ -167,7 +167,7 @@ if ($dir == 'entrata' && $fattura->stato->getTranslation('name') == 'Bozza') {
if ($dir == 'entrata') {
// Calcolo il numero previsto solo se la data della fattura è maggiore o uguale all'impostazione "Data inizio verifica contatore fattura di vendita" oppure l'impostazione non è valorizzata.
if (!empty(setting('Data inizio verifica contatore fattura di vendita'))) {
$dateFormat = "d/m/Y";
$dateFormat = 'd/m/Y';
$carbonDate = Carbon::createFromFormat($dateFormat, setting('Data inizio verifica contatore fattura di vendita'));
$data_inizio_verifica_contatore = (($carbonDate !== false) ? $carbonDate->format('Y-m-d') : null);
}

View File

@ -130,7 +130,7 @@ class FileManager implements ManagerInterface
$file = Upload::find($r['id']);
$result .= '
<tr id="row_'.$file->id.'" data-id="'.$file->id.'" data-filename="'.$file->filename.'" data-nome="'.$file->getTranslation('name').'">
<tr id="row_'.$file->id.'" data-id="'.$file->id.'" data-filename="'.$file->filename.'" data-nome="'.$file->name.'">
<td class="text-center">
<input class="check_files unblockable" type="checkbox"/>
</td>
@ -148,7 +148,7 @@ class FileManager implements ManagerInterface
$result .= '
<a href="'.base_path().'/view.php?file_id='.$file->id.'" target="_blank">
<i class="fa fa-external-link"></i> '.$file->getTranslation('name').'
<i class="fa fa-external-link"></i> '.$file->name.'
</a>
<small> ('.$file->extension.')'.((!empty($file->size)) ? ' ('.FileSystem::formatBytes($file->size).')' : '').' '.(((setting('Logo stampe') == $file->filename) || (setting('Filigrana stampe') == $file->filename)) ? '<span class="tip" title="'.tr('Logo caricato correttamente').'." >✔️</span>' : '').'</small>'.'

View File

@ -136,9 +136,9 @@ class Upload extends Model
// Rimozione estensione dal nome visibile
$extension = $file['extension'];
if (string_ends_with($model->getTranslation('name'), $extension)) {
if (string_ends_with($model->name, $extension)) {
$length = strlen($extension) + 1;
$model->setTranslation('name', substr($model->getTranslation('name'), 0, -$length));
$model->name = substr($model->name, 0, -$length);
}
$model->save();
@ -153,7 +153,7 @@ class Upload extends Model
{
$parent = $this->plugin ?: $this->module;
return strtolower($parent->getTranslation('name'));
return strtolower($parent->name);
}
/**
@ -253,7 +253,7 @@ class Upload extends Model
$file = $filesystem->read($this->directory.'/'.$this->filename);
$result = self::build($file, $data, $this->getTranslation('name'), $this->category);
$result = self::build($file, $data, $this->name, $this->category);
return $result;
}