Skip to content

Commit 0340aab

Browse files
committed
fix: se l'articolo è un servizio, disabilito i plugin Movimenti e Giacenze
1 parent 3e7add2 commit 0340aab

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

modules/articoli/edit.php

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,20 @@
2121

2222
use Models\Module;
2323
use Modules\Iva\Aliquota;
24+
use Models\Plugin;
25+
26+
if ($articolo->servizio) {
27+
$ignore = Plugin::where('name', 'Movimenti')
28+
->orWhere('name', 'Giacenze')
29+
->get();
30+
31+
foreach ($ignore as $plugin) {
32+
echo '
33+
<script>
34+
$("li.btn-default.nav-item:has(#link-tab_'.$plugin->id.')").addClass("disabled");
35+
</script>';
36+
}
37+
}
2438

2539
?><form action="" method="post" id="edit-form" enctype="multipart/form-data">
2640
<input type="hidden" name="backto" value="record-edit">

0 commit comments

Comments
 (0)