We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ff7241d commit 6c1e156Copy full SHA for 6c1e156
1 file changed
modules/iva/edit.php
@@ -36,7 +36,7 @@
36
37
$id = prepare($id_record);
38
39
-$res = $dbo->fetchNum('
+$res = $dbo->fetchOne('
40
SELECT (
41
SELECT COUNT(*) FROM `co_righe_documenti` WHERE `co_righe_documenti`.`idiva` = '.$id.'
42
) + (
@@ -51,9 +51,9 @@
51
SELECT COUNT(*) FROM `mg_articoli` WHERE `mg_articoli`.`idiva_vendita` = '.$id.'
52
53
SELECT COUNT(*) FROM `an_anagrafiche` WHERE `an_anagrafiche`.`idiva_vendite` = '.$id.' OR `an_anagrafiche`.`idiva_acquisti` = '.$id.'
54
- ) AS total');
+ ) AS total')['total'];
55
$is_readonly = 0;
56
-if ($res) {
+if ($res > 0) {
57
$is_readonly = '1';
58
}
59
0 commit comments