File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -1724,11 +1724,12 @@ protected static function getAllegati($fattura)
17241724
17251725 // Inclusione
17261726 foreach ($ allegati as $ allegato ) {
1727- if ($ allegato ['category ' ] == 'Allegati Fattura Elettronica ' ) {
1727+ $ categoria = database ()->fetchOne ('SELECT `name` FROM `zz_files_categories` WHERE `id` = ' .prepare ($ allegato ['id_category ' ]))['name ' ];
1728+ if ($ categoria == 'Allegati Fattura Elettronica ' ) {
17281729 $ file = base_dir ().'/ ' .$ directory .'/ ' .$ allegato ['filename ' ];
17291730
17301731 $ attachments [] = [
1731- 'NomeAttachment ' => $ allegato ['name ' ],
1732+ 'NomeAttachment ' => $ allegato ['name ' ]. ' . ' .\Uploads:: fileInfo ( $ file )[ ' extension ' ] ,
17321733 'FormatoAttachment ' => \Uploads::fileInfo ($ file )['extension ' ],
17331734 'Attachment ' => base64_encode (file_get_contents ($ file )),
17341735 ];
You can’t perform that action at this time.
0 commit comments