Skip to content

Commit f1dc4ae

Browse files
committed
fix: eliminazione fatture da bulk
1 parent 9f7ade8 commit f1dc4ae

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

modules/fatture/bulk.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -502,7 +502,7 @@
502502

503503
foreach ($id_records as $id) {
504504
$documento = Fattura::find($id);
505-
$emails = database()->fetchOne("SELECT COUNT(id) as `count` FROM `em_emails` INNER JOIN `zz_operations` ON `zz_operations`.`id_email` = `em_emails`.`id` WHERE `id_module` IN(SELECT `id` FROM `zz_modules` WHERE name = 'Fatture di vendita') AND `zz_operations`.`op` = 'send-email' AND `em_emails`.`id_record` = ".$id.' GROUP BY `em_emails`.`id_record`')['count'];
505+
$emails = database()->fetchOne("SELECT COUNT(`em_emails`.`id`) as `count` FROM `em_emails` INNER JOIN `zz_operations` ON `zz_operations`.`id_email` = `em_emails`.`id` WHERE `id_module` IN(SELECT `id` FROM `zz_modules` WHERE name = 'Fatture di vendita') AND `zz_operations`.`op` = 'send-email' AND `em_emails`.`id_record` = ".$id.' GROUP BY `em_emails`.`id_record`')['count'];
506506

507507
if (($documento->codice_stato_fe == 'GEN' || $documento->codice_stato_fe == '') && empty($emails)) {
508508
try {
@@ -533,7 +533,7 @@
533533
$documento = Fattura::find($id);
534534
$documento->id_banca_azienda = post('id_banca');
535535
$documento->save();
536-
array_push($list, $fattura->numero_esterno);
536+
array_push($list, $documento->numero_esterno);
537537
}
538538

539539
flash()->info(tr('Banca aggiornata per le Fatture _LIST_ !', [

0 commit comments

Comments
 (0)