mirror of
https://github.com/devcode-it/openstamanager.git
synced 2025-06-05 22:09:38 +02:00
Correzione generazione stampe
This commit is contained in:
@@ -19,12 +19,12 @@ class Categoria extends Model
|
||||
$model->save();
|
||||
|
||||
$gruppi = database()->fetchArray('SELECT `id` FROM `zz_groups`');
|
||||
foreach($gruppi as $array) {
|
||||
foreach($array as $k=>$v) {
|
||||
foreach ($gruppi as $array) {
|
||||
foreach ($array as $k => $v) {
|
||||
$newArray[$k] = $v;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$model->syncPermessi($newArray);
|
||||
|
||||
return $model;
|
||||
@@ -33,7 +33,7 @@ class Categoria extends Model
|
||||
public function syncPermessi(array $groups)
|
||||
{
|
||||
$groups[] = 1;
|
||||
|
||||
|
||||
$database = database();
|
||||
$database->sync('do_permessi', ['id_categoria' => $this->id], [
|
||||
'id_gruppo' => $groups,
|
||||
|
||||
@@ -590,7 +590,7 @@ if (empty($domenica)) {
|
||||
|
||||
echo "
|
||||
minTime: '".setting('Inizio orario lavorativo')."',
|
||||
maxTime: '".((setting('Fine orario lavorativo') != '00:00:00' and !empty(setting('Fine orario lavorativo'))) ? setting('Fine orario lavorativo'):'23:59:59')."',
|
||||
maxTime: '".((setting('Fine orario lavorativo') != '00:00:00' and !empty(setting('Fine orario lavorativo'))) ? setting('Fine orario lavorativo') : '23:59:59')."',
|
||||
";
|
||||
|
||||
?>
|
||||
|
||||
@@ -125,23 +125,25 @@ class Prints
|
||||
$dbo = $database = database();
|
||||
$infos = self::get($print);
|
||||
|
||||
Permissions::addModule($infos['id_module']);
|
||||
if (!$return_string) {
|
||||
Permissions::addModule($infos['id_module']);
|
||||
|
||||
$has_access = true;
|
||||
if (!empty($infos['is_record'])) {
|
||||
$module = Modules::get($infos['id_module']);
|
||||
$has_access = true;
|
||||
if (!empty($infos['is_record'])) {
|
||||
$module = Modules::get($infos['id_module']);
|
||||
|
||||
Util\Query::setSegments(false);
|
||||
$query = Util\Query::getQuery($module, [
|
||||
'id' => $id_record,
|
||||
]);
|
||||
Util\Query::setSegments(true);
|
||||
Util\Query::setSegments(false);
|
||||
$query = Util\Query::getQuery($module, [
|
||||
'id' => $id_record,
|
||||
]);
|
||||
Util\Query::setSegments(true);
|
||||
|
||||
$has_access = !empty($query) ? $dbo->fetchNum($query) !== 0 : true;
|
||||
}
|
||||
$has_access = !empty($query) ? $dbo->fetchNum($query) !== 0 : true;
|
||||
}
|
||||
|
||||
if (empty($infos) || empty($infos['enabled']) || !Permissions::check([], false) || !$has_access) {
|
||||
return false;
|
||||
if (empty($infos) || empty($infos['enabled']) || !Permissions::check([], false) || !$has_access) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// Individuazione della configurazione
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
|
||||
namespace Update\v2_4_10;
|
||||
|
||||
use Common\Document;
|
||||
use Common\Components\Row;
|
||||
use Common\Document;
|
||||
use Illuminate\Database\Eloquent\Builder;
|
||||
use Modules\Articoli\Articolo as Original;
|
||||
use UnexpectedValueException;
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
|
||||
namespace Update\v2_4_10\Components;
|
||||
|
||||
use Update\v2_4_10\Article;
|
||||
use Modules\Articoli\Articolo as Original;
|
||||
use Update\v2_4_10\Article;
|
||||
use Update\v2_4_10\Fattura;
|
||||
|
||||
class Articolo extends Article
|
||||
|
||||
Reference in New Issue
Block a user