Correzioni minori JS e stile del codice

This commit is contained in:
Dasc3er 2021-09-20 12:06:30 +02:00 committed by Thomas Zilio
parent 2f8f472fe8
commit aa337d4164
49 changed files with 107 additions and 108 deletions

View File

@ -64,7 +64,7 @@ $(document).ready(function () {
url: table.ajax.url(), url: table.ajax.url(),
data: params, data: params,
type: 'GET', type: 'GET',
dataType: "json", dataType: "JSON",
success: function (response) { success: function (response) {
var row_ids = response.data.map(function (a) { var row_ids = response.data.map(function (a) {
return a.id; return a.id;

View File

@ -141,7 +141,7 @@ function aggiungiAllegato(gestione) {
form.ajaxSubmit({ form.ajaxSubmit({
url: globals.rootdir + "/actions.php", url: globals.rootdir + "/actions.php",
data: data, data: data,
type: "post", type: "POST",
uploadProgress: function (event, position, total, percentComplete) { uploadProgress: function (event, position, total, percentComplete) {
$(id + " #upload").prop("disabled", true).html(percentComplete + "%").removeClass("btn-success").addClass("btn-info"); $(id + " #upload").prop("disabled", true).html(percentComplete + "%").removeClass("btn-success").addClass("btn-info");
}, },

View File

@ -491,7 +491,7 @@ function getTable(selector) {
return $.ajax({ return $.ajax({
url: globals.rootdir + "/ajax.php", url: globals.rootdir + "/ajax.php",
type: "POST", type: "POST",
dataType: "json", dataType: "JSON",
data: { data: {
id_module: this.id_module, id_module: this.id_module,
id_plugin: this.id_plugin, id_plugin: this.id_plugin,

View File

@ -50,7 +50,7 @@ function submitAjax(form, data, callback, errorCallback) {
$(form).ajaxSubmit({ $(form).ajaxSubmit({
url: globals.rootdir + "/actions.php", url: globals.rootdir + "/actions.php",
data: data, data: data,
type: "post", type: "POST",
success: function (data) { success: function (data) {
let response = data.trim(); let response = data.trim();

View File

@ -22,7 +22,7 @@
function startHooks() { function startHooks() {
$.ajax({ $.ajax({
url: globals.rootdir + "/ajax.php", url: globals.rootdir + "/ajax.php",
type: "get", type: "GET",
data: { data: {
op: "hooks", op: "hooks",
}, },
@ -58,7 +58,7 @@ function startHooks() {
function startHook(hook, init) { function startHook(hook, init) {
$.ajax({ $.ajax({
url: globals.rootdir + "/ajax.php", url: globals.rootdir + "/ajax.php",
type: "get", type: "GET",
data: { data: {
op: "hook-lock", op: "hook-lock",
id: hook.id, id: hook.id,
@ -94,7 +94,7 @@ function startHook(hook, init) {
function executeHook(hook, token) { function executeHook(hook, token) {
$.ajax({ $.ajax({
url: globals.rootdir + "/ajax.php", url: globals.rootdir + "/ajax.php",
type: "get", type: "GET",
data: { data: {
op: "hook-execute", op: "hook-execute",
id: hook.id, id: hook.id,
@ -127,7 +127,7 @@ function executeHook(hook, token) {
function updateHook(hook) { function updateHook(hook) {
$.ajax({ $.ajax({
url: globals.rootdir + "/ajax.php", url: globals.rootdir + "/ajax.php",
type: "get", type: "GET",
data: { data: {
op: "hook-response", op: "hook-response",
id: hook.id, id: hook.id,

View File

@ -299,7 +299,7 @@ if (empty($creation) && (!file_exists('config.inc.php') || !$valid_config)) {
data: { data: {
test: 1, test: 1,
}, },
type: "post", type: "POST",
success: function(data){ success: function(data){
data = parseFloat(data.trim()); data = parseFloat(data.trim());

View File

@ -165,7 +165,7 @@ function search(button) {
$.ajax({ $.ajax({
url: globals.rootdir + "/actions.php", url: globals.rootdir + "/actions.php",
type: "post", type: "POST",
data: { data: {
id_module: globals.id_module, id_module: globals.id_module,
op: "check", op: "check",

View File

@ -378,7 +378,7 @@ echo '
$.ajax({ $.ajax({
url: globals.rootdir + "/actions.php", url: globals.rootdir + "/actions.php",
type: "POST", type: "POST",
dataType: "json", dataType: "JSON",
data: { data: {
id_module: globals.id_module, id_module: globals.id_module,
id_record: globals.id_record, id_record: globals.id_record,

View File

@ -187,7 +187,7 @@ if (!empty($numero_documenti)) {
iban: iban.get(), iban: iban.get(),
}, },
type: 'GET', type: 'GET',
dataType: "json", dataType: "JSON",
success: function (response) { success: function (response) {
compilaCampi(response); compilaCampi(response);
}, },
@ -221,7 +221,7 @@ if (!empty($numero_documenti)) {
id_nazione: id_nazione.get(), id_nazione: id_nazione.get(),
}, },
type: 'GET', type: 'GET',
dataType: "json", dataType: "JSON",
success: function (response) { success: function (response) {
compilaCampi(response); compilaCampi(response);
}, },

View File

@ -61,8 +61,7 @@ if (isset($id_original)) {
<div class="col-md-12 text-right"> <div class="col-md-12 text-right">
<?php <?php
if (isset($id_record)) { if (isset($id_record)) {
$has_access = \Util\Query::checkAccess($id_record); $has_access = \Util\Query::checkAccess($id_record); ?>
?>
<button type="submit" class="btn btn-success"><i class="fa fa-save"></i> <?php echo tr('Salva'); ?></button> <button type="submit" class="btn btn-success"><i class="fa fa-save"></i> <?php echo tr('Salva'); ?></button>
<?php <?php
} else { } else {

View File

@ -280,7 +280,7 @@ function rimuoviRiga(button) {
$.ajax({ $.ajax({
url: globals.rootdir + "/actions.php", url: globals.rootdir + "/actions.php",
type: "POST", type: "POST",
dataType: "json", dataType: "JSON",
data: { data: {
id_module: globals.id_module, id_module: globals.id_module,
id_record: globals.id_record, id_record: globals.id_record,

View File

@ -338,7 +338,7 @@ function rimuoviRiga(button) {
$.ajax({ $.ajax({
url: globals.rootdir + "/actions.php", url: globals.rootdir + "/actions.php",
type: "POST", type: "POST",
dataType: "json", dataType: "JSON",
data: { data: {
id_module: globals.id_module, id_module: globals.id_module,
id_record: globals.id_record, id_record: globals.id_record,

View File

@ -131,7 +131,7 @@ $(document).ready(function () {
$.ajax({ $.ajax({
url: globals.rootdir + "/actions.php", url: globals.rootdir + "/actions.php",
type: "POST", type: "POST",
dataType: "json", dataType: "JSON",
data: { data: {
id_module: globals.id_module, id_module: globals.id_module,
id_anagrafica: data.id, id_anagrafica: data.id,
@ -162,7 +162,7 @@ $(document).ready(function () {
$.ajax({ $.ajax({
url: globals.rootdir + "/actions.php", url: globals.rootdir + "/actions.php",
type: "POST", type: "POST",
dataType: "json", dataType: "JSON",
data: { data: {
id_module: globals.id_module, id_module: globals.id_module,
id_anagrafica: data.id, id_anagrafica: data.id,

View File

@ -786,7 +786,7 @@ if ($dir == 'uscita' && $fattura->isFE()) {
$(document).ready(function() { $(document).ready(function() {
$.ajax({ $.ajax({
url: globals.rootdir + "/actions.php", url: globals.rootdir + "/actions.php",
type: "post", type: "POST",
data: { data: {
id_module: globals.id_module, id_module: globals.id_module,
id_record: globals.id_record, id_record: globals.id_record,

View File

@ -439,7 +439,7 @@ function rimuoviRiga(button) {
$.ajax({ $.ajax({
url: globals.rootdir + "/actions.php", url: globals.rootdir + "/actions.php",
type: "POST", type: "POST",
dataType: "json", dataType: "JSON",
data: { data: {
id_module: globals.id_module, id_module: globals.id_module,
id_record: globals.id_record, id_record: globals.id_record,

View File

@ -47,8 +47,9 @@ class Scadenze
$this->fattura = $fattura; $this->fattura = $fattura;
} }
public function getGruppo(){ public function getGruppo()
if (isset($this->gruppo)){ {
if (isset($this->gruppo)) {
return $this->gruppo; return $this->gruppo;
} }
@ -56,7 +57,7 @@ class Scadenze
$this->gruppo = Gruppo::where('id_documento', '=', $this->fattura->id)->first(); $this->gruppo = Gruppo::where('id_documento', '=', $this->fattura->id)->first();
// Generazione Gruppo Scadenza associato alla Fattura // Generazione Gruppo Scadenza associato alla Fattura
if (empty($this->gruppo)){ if (empty($this->gruppo)) {
$this->gruppo = Gruppo::build($this->fattura->getReference(), $this->fattura); $this->gruppo = Gruppo::build($this->fattura->getReference(), $this->fattura);
} }

View File

@ -59,7 +59,7 @@ include_once __DIR__.'/../../core.php';
$("#example").click(function() { $("#example").click(function() {
$.ajax({ $.ajax({
url: globals.rootdir + "/actions.php", url: globals.rootdir + "/actions.php",
type: "post", type: "POST",
data: { data: {
op: "example", op: "example",
id_module: globals.id_module, id_module: globals.id_module,

View File

@ -194,7 +194,7 @@ function importPage(page) {
$("#edit-form").ajaxSubmit({ $("#edit-form").ajaxSubmit({
url: globals.rootdir + "/actions.php", url: globals.rootdir + "/actions.php",
data: data, data: data,
type: "post", type: "POST",
success: function(data) { success: function(data) {
data = JSON.parse(data); data = JSON.parse(data);

View File

@ -314,7 +314,7 @@ function add_tecnici(id_tecnico) {
op: "add_sessione", op: "add_sessione",
id_tecnico: id_tecnico, id_tecnico: id_tecnico,
}, },
type: "post", type: "POST",
success: function() { success: function() {
caricaTecnici(); caricaTecnici();
caricaCosti(); caricaCosti();
@ -343,7 +343,7 @@ function elimina_sessione(id_sessione) {
op: "delete_sessione", op: "delete_sessione",
id_sessione: id_sessione, id_sessione: id_sessione,
}, },
type: "post", type: "POST",
success: function() { success: function() {
caricaTecnici(); caricaTecnici();
caricaCosti(); caricaCosti();

View File

@ -253,7 +253,7 @@ function rimuoviRiga(button) {
$.ajax({ $.ajax({
url: globals.rootdir + "/actions.php", url: globals.rootdir + "/actions.php",
type: "POST", type: "POST",
dataType: "json", dataType: "JSON",
data: { data: {
id_module: globals.id_module, id_module: globals.id_module,
id_record: globals.id_record, id_record: globals.id_record,

View File

@ -30,9 +30,6 @@ if (setting('Attiva scorciatoie da tastiera')) {
?> ?>
<form action="" method="post" id="add-form"> <form action="" method="post" id="add-form">
<input type="hidden" name="op" value="add"> <input type="hidden" name="op" value="add">
<input type="hidden" name="backto" value="record-edit"> <input type="hidden" name="backto" value="record-edit">
@ -104,7 +101,7 @@ echo '
<script> <script>
// Lettura codici da lettore barcode // Lettura codici da lettore barcode
$(document).unbind("keyup"); $(document).unbind("keyup");
$("#modals > div").on( "shown.bs.modal", function(){'; $("#modals > div").on("shown.bs.modal", function(){';
if (setting('Attiva scorciatoie da tastiera')) { if (setting('Attiva scorciatoie da tastiera')) {
echo 'EnableHotkeys()'; echo 'EnableHotkeys()';
} }
@ -121,7 +118,7 @@ echo '
$("#articolo-missing").addClass("hidden"); $("#articolo-missing").addClass("hidden");
let barcode = $("#barcode"); let barcode = $("#barcode");
if ( barcode.val() == "" && $("#idarticolo").val() == null && key === 13 ){ if (barcode.val() == "" && $("#idarticolo").val() == null && key === 13) {
swal("'.tr('Inserisci barcode o seleziona un articolo').'", "", "warning"); swal("'.tr('Inserisci barcode o seleziona un articolo').'", "", "warning");
} }
else if (key === 13) { else if (key === 13) {
@ -134,13 +131,13 @@ echo '
} }
}); });
function abilitaSede(id){ function abilitaSede(id) {
$(id).removeClass("disabled") $(id).removeClass("disabled")
.attr("disabled", false) .attr("disabled", false)
.attr("required", true); .attr("required", true);
} }
function disabilitaSede(id){ function disabilitaSede(id) {
$(id).addClass("disabled") $(id).addClass("disabled")
.attr("disabled", true) .attr("disabled", true)
.attr("required", false); .attr("required", false);

View File

@ -367,7 +367,7 @@ function rimuoviRiga(button) {
$.ajax({ $.ajax({
url: globals.rootdir + "/actions.php", url: globals.rootdir + "/actions.php",
type: "POST", type: "POST",
dataType: "json", dataType: "JSON",
data: { data: {
id_module: globals.id_module, id_module: globals.id_module,
id_record: globals.id_record, id_record: globals.id_record,

View File

@ -451,7 +451,7 @@ echo '
$.ajax({ $.ajax({
url: "'.$structure->fileurl('dettagli_conto.php').'", url: "'.$structure->fileurl('dettagli_conto.php').'",
type: "get", type: "GET",
data: { data: {
id_module: globals.id_module, id_module: globals.id_module,
id_conto: id_conto, id_conto: id_conto,

View File

@ -347,7 +347,7 @@ function rimuoviRiga(button) {
$.ajax({ $.ajax({
url: globals.rootdir + "/actions.php", url: globals.rootdir + "/actions.php",
type: "POST", type: "POST",
dataType: "json", dataType: "JSON",
data: { data: {
id_module: globals.id_module, id_module: globals.id_module,
id_record: globals.id_record, id_record: globals.id_record,

View File

@ -45,18 +45,18 @@ if (!empty($documento)) {
echo ' echo '
<div class="row"> <div class="row">
<div class="col-md-4"> <div class="col-md-4">
<h4>' . tr('Documento') . '</h4> <h4>'.tr('Documento').'</h4>
' . Modules::link($documento->getModule(), $documento->id, $documento->getReference()) . ' '.Modules::link($documento->getModule(), $documento->id, $documento->getReference()).'
</div> </div>
<div class="col-md-4"> <div class="col-md-4">
<h4>' . ($documento->direzione == 'entrata' ? tr('Cliente') : tr('Fornitore')) . '</h4> <h4>'.($documento->direzione == 'entrata' ? tr('Cliente') : tr('Fornitore')).'</h4>
' . Modules::link('Anagrafiche', $documento->anagrafica->id, $documento->anagrafica->ragione_sociale) . ' '.Modules::link('Anagrafiche', $documento->anagrafica->id, $documento->anagrafica->ragione_sociale).'
</div> </div>
<div class="col-md-4"> <div class="col-md-4">
<h4>' . tr('Netto a pagare') . '</h4> <h4>'.tr('Netto a pagare').'</h4>
' . moneyFormat($documento->netto) . ' '.moneyFormat($documento->netto).'
</div> </div>
</div> </div>

View File

@ -54,9 +54,9 @@ class Gruppo extends Model
/** /**
* Metodo per la gestione dei trigger alla modifica delle scadenze del gruppo. * Metodo per la gestione dei trigger alla modifica delle scadenze del gruppo.
* @param Scadenza $trigger
*/ */
public function triggerScadenza(Scadenza $trigger){ public function triggerScadenza(Scadenza $trigger)
{
$this->totale_pagato = $this->scadenze()->sum('pagato'); $this->totale_pagato = $this->scadenze()->sum('pagato');
$this->save(); $this->save();
} }
@ -65,7 +65,8 @@ class Gruppo extends Model
* Metodo per rimuovere completamente le scadenze associate al gruppo. * Metodo per rimuovere completamente le scadenze associate al gruppo.
* Da utilizzare per le Fatture. * Da utilizzare per le Fatture.
*/ */
public function rimuoviScadenze() { public function rimuoviScadenze()
{
$this->scadenze()->delete(); $this->scadenze()->delete();
} }

View File

@ -40,7 +40,7 @@ class Stat {
$.ajax({ $.ajax({
url: this.calendar.info.url + "/" + this.file, url: this.calendar.info.url + "/" + this.file,
type: "get", type: "GET",
data: data, data: data,
success: function(data){ success: function(data){
callback(data) callback(data)

View File

@ -33,7 +33,7 @@ function formatBytes(a,b=2){if(0===a)return"0 Bytes";const c=0>b?0:b,d=Math.floo
$(document).ready(function() { $(document).ready(function() {
$.ajax({ $.ajax({
url: globals.rootdir + "/actions.php", url: globals.rootdir + "/actions.php",
type: "get", type: "GET",
data: { data: {
id_module: '.$module->id.', id_module: '.$module->id.',
op: "sizes", op: "sizes",

View File

@ -134,7 +134,7 @@ function testQuery(){
$.ajax({ $.ajax({
url: "'.base_path().'/actions.php?id_module=" + globals.id_module + "&id_record=" + globals.id_record + "&op=test", url: "'.base_path().'/actions.php?id_module=" + globals.id_module + "&id_record=" + globals.id_record + "&op=test",
cache: false, cache: false,
type: "post", type: "POST",
processData: false, processData: false,
contentType: false, contentType: false,
dataType : "html", dataType : "html",

View File

@ -198,8 +198,8 @@ if ($fattura !== null) {
$.ajax({ $.ajax({
url: globals.rootdir + "/actions.php", url: globals.rootdir + "/actions.php",
type: "post", type: "POST",
dataType: "json", dataType: "JSON",
data: { data: {
op: "send", op: "send",
id_module: "'.$id_module.'", id_module: "'.$id_module.'",
@ -239,7 +239,7 @@ if ($fattura !== null) {
$.ajax({ $.ajax({
url: globals.rootdir + "/actions.php", url: globals.rootdir + "/actions.php",
type: "post", type: "POST",
data: { data: {
op: "verify", op: "verify",
id_module: "'.$id_module.'", id_module: "'.$id_module.'",

View File

@ -115,8 +115,8 @@ function gestioneRicevuta(button, name, type) {
$.ajax({ $.ajax({
url: globals.rootdir + "/actions.php", url: globals.rootdir + "/actions.php",
type: "post", type: "POST",
dataType: "json", dataType: "JSON",
data: { data: {
op: "gestione_ricevuta", op: "gestione_ricevuta",
id_module: "'.$id_module.'", id_module: "'.$id_module.'",

View File

@ -46,7 +46,7 @@ function compile(btn) {
url: globals.rootdir + "/actions.php", url: globals.rootdir + "/actions.php",
cache: false, cache: false,
type: "GET", type: "GET",
dataType: "json", dataType: "JSON",
data: { data: {
id_module: "'.$id_module.'", id_module: "'.$id_module.'",
id_plugin: "'.$id_plugin.'", id_plugin: "'.$id_plugin.'",
@ -93,7 +93,7 @@ function compilaRiferimenti(btn) {
url: globals.rootdir + "/actions.php", url: globals.rootdir + "/actions.php",
cache: false, cache: false,
type: "GET", type: "GET",
dataType: "json", dataType: "JSON",
data: { data: {
id_module: "'.$id_module.'", id_module: "'.$id_module.'",
id_plugin: "'.$id_plugin.'", id_plugin: "'.$id_plugin.'",

View File

@ -46,7 +46,7 @@ echo '
id_module: "'.$id_module.'", id_module: "'.$id_module.'",
id_plugin: "'.$id_plugin.'", id_plugin: "'.$id_plugin.'",
}, },
type: "post", type: "POST",
success: function(data){ success: function(data){
data = JSON.parse(data); data = JSON.parse(data);
@ -170,7 +170,7 @@ function importAll(btn) {
id_module: "'.$id_module.'", id_module: "'.$id_module.'",
id_plugin: "'.$id_plugin.'", id_plugin: "'.$id_plugin.'",
}, },
type: "post", type: "POST",
success: function(data){ success: function(data){
data = JSON.parse(data); data = JSON.parse(data);
@ -179,7 +179,7 @@ function importAll(btn) {
data.forEach(function(element) { data.forEach(function(element) {
$.ajax({ $.ajax({
url: globals.rootdir + "/actions.php", url: globals.rootdir + "/actions.php",
type: "get", type: "GET",
data: { data: {
id_module: "'.$id_module.'", id_module: "'.$id_module.'",
id_plugin: "'.$id_plugin.'", id_plugin: "'.$id_plugin.'",

View File

@ -70,7 +70,7 @@ function skip() {
function cleanup(){ function cleanup(){
$.ajax({ $.ajax({
url: globals.rootdir + "/actions.php", url: globals.rootdir + "/actions.php",
type: "get", type: "GET",
data: { data: {
id_module: "'.$id_module.'", id_module: "'.$id_module.'",
id_plugin: "'.$id_plugin.'", id_plugin: "'.$id_plugin.'",
@ -81,7 +81,7 @@ function cleanup(){
$.ajax({ $.ajax({
url: globals.rootdir + "/actions.php", url: globals.rootdir + "/actions.php",
type: "get", type: "GET",
data: { data: {
id_module: "'.$id_module.'", id_module: "'.$id_module.'",
id_plugin: "'.$id_plugin.'", id_plugin: "'.$id_plugin.'",

View File

@ -133,7 +133,7 @@ function import_fe(button, file, data_registrazione) {
$.ajax({ $.ajax({
url: globals.rootdir + "/actions.php", url: globals.rootdir + "/actions.php",
type: "get", type: "GET",
data: { data: {
id_module: globals.id_module, id_module: globals.id_module,
id_plugin: '.$id_plugin.', id_plugin: '.$id_plugin.',
@ -176,7 +176,7 @@ function process_fe(button, file) {
$.ajax({ $.ajax({
url: globals.rootdir + "/actions.php", url: globals.rootdir + "/actions.php",
type: "get", type: "GET",
data: { data: {
id_module: globals.id_module, id_module: globals.id_module,
id_plugin: '.$id_plugin.', id_plugin: '.$id_plugin.',
@ -204,7 +204,7 @@ function delete_fe(button, file_id) {
$.ajax({ $.ajax({
url: globals.rootdir + "/actions.php", url: globals.rootdir + "/actions.php",
type: "get", type: "GET",
data: { data: {
id_module: globals.id_module, id_module: globals.id_module,
id_plugin: '.$id_plugin.', id_plugin: '.$id_plugin.',

View File

@ -188,7 +188,7 @@ function upload(btn) {
id_module: "'.$id_module.'", id_module: "'.$id_module.'",
id_plugin: "'.$id_plugin.'", id_plugin: "'.$id_plugin.'",
}, },
type: "post", type: "POST",
success: function(data){ success: function(data){
importMessage(data); importMessage(data);
@ -246,7 +246,7 @@ function importAll(btn) {
id_module: "'.$id_module.'", id_module: "'.$id_module.'",
id_plugin: "'.$id_plugin.'", id_plugin: "'.$id_plugin.'",
}, },
type: "post", type: "POST",
success: function(data){ success: function(data){
data = JSON.parse(data); data = JSON.parse(data);

View File

@ -87,7 +87,7 @@ function import_fe(button, file) {
$.ajax({ $.ajax({
url: globals.rootdir + "/actions.php", url: globals.rootdir + "/actions.php",
type: "get", type: "GET",
data: { data: {
id_module: globals.id_module, id_module: globals.id_module,
id_plugin: '.$id_plugin.', id_plugin: '.$id_plugin.',
@ -120,7 +120,7 @@ function delete_fe(button, file_id) {
$.ajax({ $.ajax({
url: globals.rootdir + "/actions.php", url: globals.rootdir + "/actions.php",
type: "get", type: "GET",
data: { data: {
id_module: globals.id_module, id_module: globals.id_module,
id_plugin: '.$id_plugin.', id_plugin: '.$id_plugin.',
@ -148,7 +148,7 @@ function process_fe(button, file) {
$.ajax({ $.ajax({
url: globals.rootdir + "/actions.php", url: globals.rootdir + "/actions.php",
type: "get", type: "GET",
data: { data: {
id_module: globals.id_module, id_module: globals.id_module,
id_plugin: '.$id_plugin.', id_plugin: '.$id_plugin.',

View File

@ -126,7 +126,7 @@ class HTMLWrapper implements WrapperInterface
$.ajax({ $.ajax({
url: globals.rootdir + "/actions.php", url: globals.rootdir + "/actions.php",
type: "post", type: "POST",
data: { data: {
id_module: "'.$id_module.'", id_module: "'.$id_module.'",
id_record: "'.$id_record.'", id_record: "'.$id_record.'",

View File

@ -326,11 +326,12 @@ class Query
/** /**
* Controlla se l'utente ha accesso a un record specifico seguendo la query principale del modulo. * Controlla se l'utente ha accesso a un record specifico seguendo la query principale del modulo.
* *
* @return bool
* @throws \Exception * @throws \Exception
*
* @return bool
*/ */
public static function checkAccess($id_record){ public static function checkAccess($id_record)
{
self::setSegments(false); self::setSegments(false);
$query = self::getQuery(Modules::getCurrent(), [ $query = self::getQuery(Modules::getCurrent(), [
'id' => $id_record, 'id' => $id_record,