Impostazione "Filigrana stampe"
This commit is contained in:
parent
2f8f512aca
commit
ff3ba2ff3d
|
@ -276,17 +276,27 @@ switch (post('op')) {
|
|||
|
||||
// Operazioni aggiuntive per il logo
|
||||
if (filter('op') == 'link_file') {
|
||||
$nome = 'Logo stampe';
|
||||
$nome = filter('nome_allegato');
|
||||
|
||||
if (setting('Azienda predefinita') == $id_record && filter('nome_allegato') == $nome) {
|
||||
Settings::setValue($nome, $upload);
|
||||
if ($nome == 'Logo stampe' or $nome = 'Filigrana stampe' ){
|
||||
if (setting('Azienda predefinita') == $id_record && filter('nome_allegato') == $nome) {
|
||||
Settings::setValue($nome, $upload);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Operazioni aggiuntive per il logo
|
||||
elseif (filter('op') == 'unlink_file') {
|
||||
$nome = 'Logo stampe';
|
||||
$filename = filter('filename');
|
||||
|
||||
if (setting('Azienda predefinita') == $id_record && filter('filename') == setting($nome)) {
|
||||
if (strpos($filename, setting('Logo stampe')) !== false) {
|
||||
$nome = 'Logo stampe';
|
||||
}
|
||||
if (strpos($filename, setting('Filigrana stampe')) !== false) {
|
||||
$nome = 'Filigrana stampe';
|
||||
}
|
||||
|
||||
if (setting('Azienda predefinita') == $id_record && $filename == setting($nome)) {
|
||||
Settings::setValue($nome, '');
|
||||
}
|
||||
}
|
||||
|
|
|
@ -455,6 +455,24 @@ class Prints
|
|||
//'PDFA' => true,
|
||||
//'PDFAauto' => true,
|
||||
]);
|
||||
|
||||
if (setting('Filigrana stampe')){
|
||||
|
||||
$mpdf->SetWatermarkImage(
|
||||
DOCROOT.'/files/anagrafiche/'.setting('Filigrana stampe'),
|
||||
0.5,
|
||||
'F',
|
||||
'F'
|
||||
);
|
||||
|
||||
// false = 'showWatermarkImage' => false,
|
||||
if ($settings['showWatermarkImage']==null){
|
||||
$mpdf->showWatermarkImage = true;
|
||||
}else{
|
||||
$mpdf->showWatermarkImage = intval($settings['showWatermarkImage']);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// Inclusione dei fogli di stile CSS
|
||||
$styles = [
|
||||
|
|
|
@ -114,4 +114,8 @@ UPDATE `zz_widgets` SET `query` = 'SELECT COUNT(id) AS dato,
|
|||
((SELECT SUM(co_righe_contratti.qta) FROM co_righe_contratti WHERE co_righe_contratti.um=\'ore\' AND co_righe_contratti.idcontratto=co_contratti.id) - IFNULL( (SELECT SUM(in_interventi_tecnici.ore) FROM in_interventi_tecnici INNER JOIN in_interventi ON in_interventi_tecnici.idintervento=in_interventi.id WHERE in_interventi.id_contratto=co_contratti.id AND in_interventi.idstatointervento IN (SELECT in_statiintervento.idstatointervento FROM in_statiintervento WHERE in_statiintervento.completato = 1)), 0) ) AS ore_rimanenti,
|
||||
data_conclusione, ore_preavviso_rinnovo, giorni_preavviso_rinnovo
|
||||
FROM co_contratti WHERE idstato IN (SELECT id FROM co_staticontratti WHERE is_fatturabile = 1) AND rinnovabile = 1 AND YEAR(data_conclusione) > 1970 AND (SELECT id FROM co_contratti contratti WHERE contratti.idcontratto_prev = co_contratti.id) IS NULL
|
||||
HAVING (ore_rimanenti < ore_preavviso_rinnovo OR DATEDIFF(data_conclusione, NOW()) < ABS(giorni_preavviso_rinnovo))' WHERE `zz_widgets`.`name` = 'Contratti in scadenza';
|
||||
HAVING (ore_rimanenti < ore_preavviso_rinnovo OR DATEDIFF(data_conclusione, NOW()) < ABS(giorni_preavviso_rinnovo))' WHERE `zz_widgets`.`name` = 'Contratti in scadenza';
|
||||
|
||||
|
||||
-- Impostazione "Filigrana stampe"
|
||||
INSERT INTO `zz_settings` (`id`, `nome`, `valore`, `tipo`, `editable`, `sezione`) VALUES (NULL, 'Filigrana stampe', '', 'string', '0', 'Generali');
|
Loading…
Reference in New Issue