This commit is contained in:
MatteoPistorello 2024-04-03 17:21:35 +02:00
commit 247ad030ca
2 changed files with 4 additions and 7 deletions

View File

@ -197,10 +197,10 @@ elseif (filter('op') == 'download-zip-allegati') {
$src = basename($allegato->filepath);
$dst = basename($allegato->original_name);
$file = slashes($module->upload_directory.'/'.$src);
$dest = slashes($dir.'tmp/'.$dst);
$file_content = $allegato->get_contents();
$result = copy($file, $dest);
$dest = slashes($dir.'tmp/'.$dst);
file_put_contents($dest, $file_content);
}
// Creazione zip

View File

@ -165,10 +165,7 @@ if (!function_exists('ricalcola_costiagg_ddt')) {
// Leggo l'iva predefinita per calcolare l'iva aggiuntiva sulla rivalsa inps
$qi = Aliquota::find(setting('Iva predefinita'))->percentuale;
if ($qi) {
$rsi = $dbo->fetchArray($qi);
}
$iva_rivalsainps = $rivalsainps / 100 * $rsi[0]['percentuale'];
$iva_rivalsainps = $rivalsainps / 100 * $qi;
// Aggiorno la rivalsa inps
$dbo->query("UPDATE dt_ddt SET rivalsainps='$rivalsainps', iva_rivalsainps='$iva_rivalsainps' WHERE id='$idddt'");