diff --git a/modules/interventi/ajax_tecnici.php b/modules/interventi/ajax_tecnici.php index 47c642152..f2d6a6e10 100755 --- a/modules/interventi/ajax_tecnici.php +++ b/modules/interventi/ajax_tecnici.php @@ -143,7 +143,7 @@ if (!empty($sessioni)) { // ORE echo ' - '.($ore <= 0 ? '' : '').' + '.(((\Carbon\Carbon::createFromFormat('Y-m-d H:i:s', $sessione['orario_inizio'])->eq(\Carbon\Carbon::createFromFormat('Y-m-d H:i:s', $sessione['orario_fine']))) || (\Carbon\Carbon::createFromFormat('Y-m-d H:i:s', $sessione['orario_inizio'])->gt(\Carbon\Carbon::createFromFormat('Y-m-d H:i:s', $sessione['orario_fine'])))) ? '' : '').' {[ "type": "number", "name": "ore_'.$sessione['id'].'", "required": 1, "value": "'.numberFormat($ore, 'qta').'", "disabled": "1" ]} diff --git a/src/Prints.php b/src/Prints.php index 5b954649d..694680fe5 100755 --- a/src/Prints.php +++ b/src/Prints.php @@ -260,7 +260,7 @@ class Prints { $info = self::render($print, $id_record, $directory); - return self::getPDFLink($info['path']); + return self::getPDFLink($info['path'].'?'.rand()); } /** @@ -272,7 +272,7 @@ class Prints */ public static function getPDFLink($path) { - return base_path().'/assets/dist/pdfjs/web/viewer.html?file='.base_url().'/'.ltrim(str_replace(base_dir(), '', $path), '/'); + return base_path().'/assets/dist/pdfjs/web/viewer.html?file='.base_url().'/'.ltrim(str_replace(base_dir(), '', $path.'?'.rand()), '/'); } /**