Compare commits

...

5 Commits

Author SHA1 Message Date
valentina e2c53d34cd Fix upload immagine utente 2024-09-06 17:34:31 +02:00
valentina 3c4e2dbaa7 Fix ricevute FE 2024-09-06 17:19:40 +02:00
valentina 2f7ebc9c6b Fix stampa partitario mastrino 2024-09-06 16:19:09 +02:00
valentina f1db260a6e Fix minore 2024-09-06 12:21:57 +02:00
valentina db4e0b7f13 Fix minore 2024-09-06 12:20:08 +02:00
7 changed files with 19 additions and 8 deletions

View File

@ -61,8 +61,9 @@ class OSMFilesystem extends Filesystem
} while ($this->fileExists($directory.'/'.$filename));
$this->write($directory.'/'.$filename, $contents);
$size = $this->fileSize($directory.'/'.$filename);
return ['filename' => $filename, 'extension' => $extension];
return ['filename' => $filename, 'extension' => $extension, 'size' => $size];
}
protected static function isSupportedType($extension)

View File

@ -137,7 +137,7 @@ if ($nome_stampa != 'Liquidazione IVA') {
'_END_' => dateFormat($_SESSION['period_end']),
]).'</h3>
<div class="card-tools pull-right">
<button type="button" class="btn btn-tool" data-widget="collapse"><i class="fa fa-plus"></i></button>
<button type="button" class="btn btn-tool" data-card-widget="collapse"><i class="fa fa-plus"></i></button>
</div>
</div>
<div class="card-body">

View File

@ -211,12 +211,18 @@ function upload(btn) {
function importMessage(data) {
data = JSON.parse(data);
var ricevuta = "<br>'.tr('Ricevuta').': " + data.file;
var ricevuta = "<br><h5>'.tr('Ricevuta').': " + data.file+ "</h5>";
if(data.fattura) {
data_fattura = new Date(data.fattura.data);
data_fattura = data_fattura.toLocaleDateString("it-IT", {
year: "numeric",
month: "2-digit",
day: "2-digit"
}).replace(",", "/");
swal({
title: "'.tr('Importazione completata!').'",
html: "'.tr('Fattura aggiornata correttamente').':" + data.fattura + ricevuta,
html: "'.tr('Fattura aggiornata correttamente').': <h4>" + data.fattura.numero_esterno + " '.tr('del').' " + data_fattura + "</h4>" + ricevuta,
type: "success",
});
} else {

View File

@ -75,8 +75,8 @@ class Upload extends Model
// Informazioni di base
$name = $data['name'] ?? $name;
$name ??= basename($source['name']);
$original_name = $source['name'] ?? $name;
$name ??= basename($source);
$original_name = basename($source) ?? $name;
$category = $data['category'] ?? $category;
// Nome e categoria dell'allegato
@ -122,7 +122,8 @@ class Upload extends Model
} else {
// Caricamento con l'interfaccia di upload
try {
$file = $filesystem->upload($model->directory, $original_name, $source);
$file = $filesystem->upload($model->directory, $original_name, file_exists($source) ? file_get_contents($source) : $source);
$model->size = $file['size'];
} catch (\Exception) {
flash()->error(tr('Impossibile creare il file!'));

View File

@ -287,7 +287,7 @@ class Modules
$extra .= !empty($blank) ? ' target="_blank"' : '';
if (!empty($module) && in_array($module->permission, ['r', 'rw'])) {
$link = !empty($id_record) ? 'editor.php?id_module='.$module['id'].'&id_record='.$id_record : 'controller.php?id_module='.$module['id'];
$link = !empty($id_record) ? 'editor.php?id_module='.$module->id.'&id_record='.$id_record : 'controller.php?id_module='.$module->id;
return '<a href="'.base_path().'/'.$link.$params.'#'.$anchor.'" '.$extra.'>'.$testo.'</a>';
} else {

View File

@ -86,3 +86,5 @@ if (get('lev') == '2' || get('lev') == '3') {
</tr>
</table>';
}
echo '</tbody></table>';

View File

@ -23,6 +23,7 @@ $date_start = $_SESSION['period_start'];
$date_end = $_SESSION['period_end'];
$saldo_iniziale = 0;
$i = 0;
$records = [];
if (get('lev') == '3') {
$conto3 = $dbo->fetchOne('SELECT * FROM co_pianodeiconti3 WHERE id='.prepare($id_record));