mirror of
https://github.com/devcode-it/openstamanager.git
synced 2025-02-19 21:10:49 +01:00
Fix #408
This commit is contained in:
parent
db2fd236c8
commit
e72d86412d
@ -118,12 +118,6 @@ if (!empty($structure['script'])) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Caricamento funzioni del modulo
|
|
||||||
$modutil = $structure->filepath('modutil.php');
|
|
||||||
if (!empty($modutil)) {
|
|
||||||
include_once $modutil;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Lettura risultato query del modulo
|
// Lettura risultato query del modulo
|
||||||
$init = $structure->filepath('init.php');
|
$init = $structure->filepath('init.php');
|
||||||
if (!empty($init)) {
|
if (!empty($init)) {
|
||||||
|
21
core.php
21
core.php
@ -30,6 +30,21 @@ foreach ($namespaces as $path => $namespace) {
|
|||||||
$loader->addPsr4($namespace.'\\', __DIR__.'/'.$path.'/src');
|
$loader->addPsr4($namespace.'\\', __DIR__.'/'.$path.'/src');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Inclusione dei file modutil.php
|
||||||
|
$files = glob(__DIR__.'/{modules,plugins}/*/modutil.php', GLOB_BRACE);
|
||||||
|
$custom_files = glob(__DIR__.'/{modules,plugins}/*/custom/modutil.php', GLOB_BRACE);
|
||||||
|
foreach ($custom_files as $key => $value) {
|
||||||
|
$index = array_search(str_replace('custom/', '', $value), $files);
|
||||||
|
if ($index !== false) {
|
||||||
|
unset($files[$index]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$list = array_merge($files, $custom_files);
|
||||||
|
foreach ($list as $file) {
|
||||||
|
include_once $file;
|
||||||
|
}
|
||||||
|
|
||||||
// Individuazione dei percorsi di base
|
// Individuazione dei percorsi di base
|
||||||
App::definePaths(__DIR__);
|
App::definePaths(__DIR__);
|
||||||
|
|
||||||
@ -49,6 +64,7 @@ if (!empty($config['redirectHTTPS']) && !isHTTPS(true)) {
|
|||||||
// Forza l'abilitazione del debug
|
// Forza l'abilitazione del debug
|
||||||
// $debug = App::debug(true);
|
// $debug = App::debug(true);
|
||||||
|
|
||||||
|
/* GESTIONE DEGLI ERRORI */
|
||||||
// Logger per la segnalazione degli errori
|
// Logger per la segnalazione degli errori
|
||||||
$logger = new Monolog\Logger('Logs');
|
$logger = new Monolog\Logger('Logs');
|
||||||
$logger->pushProcessor(new Monolog\Processor\UidProcessor());
|
$logger->pushProcessor(new Monolog\Processor\UidProcessor());
|
||||||
@ -123,7 +139,7 @@ Monolog\ErrorHandler::register($logger);
|
|||||||
// Database
|
// Database
|
||||||
$dbo = $database = database();
|
$dbo = $database = database();
|
||||||
|
|
||||||
// Inizializzazione della sessione
|
/* SESSIONE */
|
||||||
if (!API::isAPIRequest()) {
|
if (!API::isAPIRequest()) {
|
||||||
// Sicurezza della sessioni
|
// Sicurezza della sessioni
|
||||||
ini_set('session.use_trans_sid', '0');
|
ini_set('session.use_trans_sid', '0');
|
||||||
@ -147,6 +163,7 @@ if (!API::isAPIRequest()) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* INTERNAZIONALIZZAZIONE */
|
||||||
// Istanziamento del gestore delle traduzioni del progetto
|
// Istanziamento del gestore delle traduzioni del progetto
|
||||||
$lang = !empty($config['lang']) ? $config['lang'] : 'it';
|
$lang = !empty($config['lang']) ? $config['lang'] : 'it';
|
||||||
$formatter = !empty($config['formatter']) ? $config['formatter'] : [];
|
$formatter = !empty($config['formatter']) ? $config['formatter'] : [];
|
||||||
@ -159,6 +176,7 @@ $translator->setLocale($lang, $formatter);
|
|||||||
$version = Update::getVersion();
|
$version = Update::getVersion();
|
||||||
$revision = Update::getRevision();
|
$revision = Update::getRevision();
|
||||||
|
|
||||||
|
/* ACCESSO E INSTALLAZIONE */
|
||||||
// Controllo sulla presenza dei permessi di accesso basilari
|
// Controllo sulla presenza dei permessi di accesso basilari
|
||||||
$continue = $dbo->isInstalled() && !Update::isUpdateAvailable() && (Auth::check() || API::isAPIRequest());
|
$continue = $dbo->isInstalled() && !Update::isUpdateAvailable() && (Auth::check() || API::isAPIRequest());
|
||||||
|
|
||||||
@ -175,6 +193,7 @@ if (!$continue && getURLPath() != slashes(ROOTDIR.'/index.php') && !Permissions:
|
|||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* INIZIALIZZAZIONE GENERALE */
|
||||||
// Operazione aggiuntive (richieste non API)
|
// Operazione aggiuntive (richieste non API)
|
||||||
if (!API::isAPIRequest()) {
|
if (!API::isAPIRequest()) {
|
||||||
// Impostazioni di Content-Type e Charset Header
|
// Impostazioni di Content-Type e Charset Header
|
||||||
|
@ -33,12 +33,6 @@ if (!empty($id_plugin)) {
|
|||||||
|
|
||||||
$type = $structure['option'];
|
$type = $structure['option'];
|
||||||
|
|
||||||
// Caricamento funzioni del modulo
|
|
||||||
$modutil = $structure->filepath('modutil.php');
|
|
||||||
if (!empty($modutil)) {
|
|
||||||
include_once $modutil;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Lettura risultato query del modulo
|
// Lettura risultato query del modulo
|
||||||
// include $structure->filepath('init.php');
|
// include $structure->filepath('init.php');
|
||||||
|
|
||||||
|
@ -53,6 +53,7 @@ abstract class Description extends Model
|
|||||||
|
|
||||||
$this->save();
|
$this->save();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function copiaIn(Document $document)
|
public function copiaIn(Document $document)
|
||||||
{
|
{
|
||||||
$class = get_class($document);
|
$class = get_class($document);
|
||||||
@ -80,5 +81,6 @@ abstract class Description extends Model
|
|||||||
}
|
}
|
||||||
|
|
||||||
abstract public function parent();
|
abstract public function parent();
|
||||||
|
|
||||||
abstract public function getParentID();
|
abstract public function getParentID();
|
||||||
}
|
}
|
||||||
|
@ -39,7 +39,7 @@ abstract class Document extends Model
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Funzione per l'arrotondamento degli importi;.
|
* Funzione per l'arrotondamento degli importi.
|
||||||
*
|
*
|
||||||
* @param float $value
|
* @param float $value
|
||||||
*
|
*
|
||||||
|
@ -95,16 +95,13 @@ function customStructure()
|
|||||||
|
|
||||||
// Controlli di personalizzazione fisica
|
// Controlli di personalizzazione fisica
|
||||||
foreach ($dirs as $dir) {
|
foreach ($dirs as $dir) {
|
||||||
$files = glob(DOCROOT.'/'.$dir.'/*/custom/*');
|
$files = glob(DOCROOT.'/'.$dir.'/*/custom/*.{php,html}', GLOB_BRACE);
|
||||||
foreach ($files as $file) {
|
foreach ($files as $file) {
|
||||||
$file = str_replace(DOCROOT.'/', '', $file);
|
$file = str_replace(DOCROOT.'/', '', $file);
|
||||||
$result = explode('/custom/', $file)[0];
|
$result = explode('/custom/', $file)[0];
|
||||||
|
|
||||||
$info = new SplFileInfo($file);
|
if (!in_array($result, $results)) {
|
||||||
if ($info->getExtension() != 'jpg') {
|
$results[] = $result;
|
||||||
if (!in_array($result, $results)) {
|
|
||||||
$results[] = $result;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2,8 +2,6 @@
|
|||||||
|
|
||||||
include_once __DIR__.'/../../../core.php';
|
include_once __DIR__.'/../../../core.php';
|
||||||
|
|
||||||
include_once Modules::filepath('Preventivi', 'modutil.php');
|
|
||||||
|
|
||||||
// Interventi
|
// Interventi
|
||||||
$rsi = [];
|
$rsi = [];
|
||||||
if (in_array('Cliente', explode(',', $record['tipianagrafica']))) {
|
if (in_array('Cliente', explode(',', $record['tipianagrafica']))) {
|
||||||
|
@ -1,7 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
include_once Modules::filepath('Articoli', 'modutil.php');
|
|
||||||
|
|
||||||
use Modules\Articoli\Articolo;
|
use Modules\Articoli\Articolo;
|
||||||
|
|
||||||
switch ($resource) {
|
switch ($resource) {
|
||||||
|
@ -2,9 +2,6 @@
|
|||||||
|
|
||||||
include_once __DIR__.'/../../core.php';
|
include_once __DIR__.'/../../core.php';
|
||||||
|
|
||||||
// Necesario per funzione \Util\Ini::getList
|
|
||||||
include_once Modules::filepath('MyImpianti', 'modutil.php');
|
|
||||||
|
|
||||||
$_SESSION['superselect']['id_categoria'] = $record['id_categoria'];
|
$_SESSION['superselect']['id_categoria'] = $record['id_categoria'];
|
||||||
|
|
||||||
$img = null;
|
$img = null;
|
||||||
|
@ -2,8 +2,6 @@
|
|||||||
|
|
||||||
include_once __DIR__.'/../../core.php';
|
include_once __DIR__.'/../../core.php';
|
||||||
|
|
||||||
include_once Modules::filepath('Articoli', 'modutil.php');
|
|
||||||
|
|
||||||
switch (post('op')) {
|
switch (post('op')) {
|
||||||
case 'example':
|
case 'example':
|
||||||
|
|
||||||
|
@ -2,9 +2,6 @@
|
|||||||
|
|
||||||
include_once __DIR__.'/../../core.php';
|
include_once __DIR__.'/../../core.php';
|
||||||
|
|
||||||
// Necessaria per la funzione add_movimento_magazzino
|
|
||||||
include_once Modules::filepath('Articoli', 'modutil.php');
|
|
||||||
|
|
||||||
switch (post('op')) {
|
switch (post('op')) {
|
||||||
case 'update':
|
case 'update':
|
||||||
$targa = post('targa');
|
$targa = post('targa');
|
||||||
|
@ -29,8 +29,8 @@ switch (filter('op')) {
|
|||||||
|
|
||||||
case 'add':
|
case 'add':
|
||||||
$nome = filter('nome');
|
$nome = filter('nome');
|
||||||
$bic = filter('bic');
|
$bic = filter('bic');
|
||||||
$iban = filter('iban');
|
$iban = filter('iban');
|
||||||
|
|
||||||
if (isset($nome)) {
|
if (isset($nome)) {
|
||||||
$dbo->query('INSERT INTO `co_banche` (`nome`, `bic`, `iban`) VALUES ('.prepare($nome).', '.prepare($bic).', '.prepare($iban).')');
|
$dbo->query('INSERT INTO `co_banche` (`nome`, `bic`, `iban`) VALUES ('.prepare($nome).', '.prepare($bic).', '.prepare($iban).')');
|
||||||
|
@ -2,8 +2,6 @@
|
|||||||
|
|
||||||
include_once __DIR__.'/../../core.php';
|
include_once __DIR__.'/../../core.php';
|
||||||
|
|
||||||
include_once Modules::filepath('Fatture di vendita', 'modutil.php');
|
|
||||||
|
|
||||||
switch (post('op')) {
|
switch (post('op')) {
|
||||||
case 'add':
|
case 'add':
|
||||||
$idanagrafica = post('idanagrafica');
|
$idanagrafica = post('idanagrafica');
|
||||||
|
@ -2,11 +2,7 @@
|
|||||||
|
|
||||||
include_once __DIR__.'/../../../core.php';
|
include_once __DIR__.'/../../../core.php';
|
||||||
|
|
||||||
include_once Modules::filepath('Interventi', 'modutil.php');
|
/* CONSUNTIVO */
|
||||||
|
|
||||||
/*
|
|
||||||
CONSUNTIVO
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Salvo i colori e gli stati degli stati intervento su un array
|
// Salvo i colori e gli stati degli stati intervento su un array
|
||||||
$colori = [];
|
$colori = [];
|
||||||
|
@ -2,11 +2,8 @@
|
|||||||
|
|
||||||
include_once __DIR__.'/../../../core.php';
|
include_once __DIR__.'/../../../core.php';
|
||||||
|
|
||||||
include_once Modules::filepath('Fatture di vendita', 'modutil.php');
|
/* GESTIONE ORDINI DI SERVIZI */
|
||||||
|
|
||||||
/*
|
|
||||||
GESTIONE ORDINI DI SERVIZIO
|
|
||||||
*/
|
|
||||||
// TODO: aggiornare con la funzione months()
|
// TODO: aggiornare con la funzione months()
|
||||||
$mesi = [
|
$mesi = [
|
||||||
tr('Gennaio'),
|
tr('Gennaio'),
|
||||||
|
@ -2,8 +2,6 @@
|
|||||||
|
|
||||||
include_once __DIR__.'/../../core.php';
|
include_once __DIR__.'/../../core.php';
|
||||||
|
|
||||||
include_once Modules::filepath('Interventi', 'modutil.php');
|
|
||||||
|
|
||||||
if (!isset($user['idanagrafica'])) {
|
if (!isset($user['idanagrafica'])) {
|
||||||
$user['idanagrafica'] = '';
|
$user['idanagrafica'] = '';
|
||||||
}
|
}
|
||||||
|
@ -2,11 +2,6 @@
|
|||||||
|
|
||||||
include_once __DIR__.'/../../core.php';
|
include_once __DIR__.'/../../core.php';
|
||||||
|
|
||||||
// Necessaria per la funzione add_movimento_magazzino
|
|
||||||
include_once Modules::filepath('Articoli', 'modutil.php');
|
|
||||||
include_once Modules::filepath('Fatture di vendita', 'modutil.php');
|
|
||||||
include_once Modules::filepath('Ordini cliente', 'modutil.php');
|
|
||||||
|
|
||||||
$module = Modules::get($id_module);
|
$module = Modules::get($id_module);
|
||||||
|
|
||||||
if ($module['name'] == 'Ddt di vendita') {
|
if ($module['name'] == 'Ddt di vendita') {
|
||||||
|
@ -2,8 +2,6 @@
|
|||||||
|
|
||||||
include_once __DIR__.'/../../core.php';
|
include_once __DIR__.'/../../core.php';
|
||||||
|
|
||||||
include_once Modules::filepath('Fatture di vendita', 'modutil.php');
|
|
||||||
|
|
||||||
use Modules\Fatture\Fattura;
|
use Modules\Fatture\Fattura;
|
||||||
use Modules\Fatture\Tipo;
|
use Modules\Fatture\Tipo;
|
||||||
use Modules\Anagrafiche\Anagrafica;
|
use Modules\Anagrafiche\Anagrafica;
|
||||||
|
@ -2,8 +2,6 @@
|
|||||||
|
|
||||||
include_once __DIR__.'/../../core.php';
|
include_once __DIR__.'/../../core.php';
|
||||||
|
|
||||||
include_once Modules::filepath('Fatture di vendita', 'modutil.php');
|
|
||||||
|
|
||||||
echo '
|
echo '
|
||||||
<table class="table table-striped table-hover table-condensed table-bordered">
|
<table class="table table-striped table-hover table-condensed table-bordered">
|
||||||
<tr>
|
<tr>
|
||||||
@ -375,7 +373,7 @@ $(document).ready(function(){
|
|||||||
order += ","+$(this).data("id");
|
order += ","+$(this).data("id");
|
||||||
});
|
});
|
||||||
order = order.replace(/^,/, "");
|
order = order.replace(/^,/, "");
|
||||||
|
|
||||||
$.post("'.$rootdir.'/actions.php", {
|
$.post("'.$rootdir.'/actions.php", {
|
||||||
id: ui.item.data("id"),
|
id: ui.item.data("id"),
|
||||||
id_module: '.$id_module.',
|
id_module: '.$id_module.',
|
||||||
|
@ -47,15 +47,15 @@ include_once __DIR__.'/../../core.php';
|
|||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-4">
|
<div class="col-md-4">
|
||||||
{[ "type": "text", "label": "<?php echo tr('CC'); ?>", "name": "cc", "value": "$cc$", "help": "<?php echo ('Copia carbone.'); ?>" ]}
|
{[ "type": "text", "label": "<?php echo tr('CC'); ?>", "name": "cc", "value": "$cc$", "help": "<?php echo 'Copia carbone.'; ?>" ]}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-md-4">
|
<div class="col-md-4">
|
||||||
{[ "type": "text", "label": "<?php echo tr('CCN'); ?>", "name": "bcc", "value": "$bcc$", "help": "<?php echo ('Copia carbone nascosta.'); ?>" ]}
|
{[ "type": "text", "label": "<?php echo tr('CCN'); ?>", "name": "bcc", "value": "$bcc$", "help": "<?php echo 'Copia carbone nascosta.'; ?>" ]}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-md-4">
|
<div class="col-md-4">
|
||||||
{[ "type": "email", "label": "<?php echo tr('Rispondi a'); ?>", "name": "reply_to", "value": "$reply_to$", "help": "<?php echo ('Rispondi a questo indirizzo e-mail.'); ?>" ]}
|
{[ "type": "email", "label": "<?php echo tr('Rispondi a'); ?>", "name": "reply_to", "value": "$reply_to$", "help": "<?php echo 'Rispondi a questo indirizzo e-mail.'; ?>" ]}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -10,12 +10,6 @@ use Modules\Fatture\Components\Riga;
|
|||||||
use Modules\Fatture\Components\Descrizione;
|
use Modules\Fatture\Components\Descrizione;
|
||||||
use Modules\Articoli\Articolo as ArticoloOriginale;
|
use Modules\Articoli\Articolo as ArticoloOriginale;
|
||||||
|
|
||||||
// Necessaria per la funzione add_movimento_magazzino
|
|
||||||
include_once Modules::filepath('Articoli', 'modutil.php');
|
|
||||||
include_once Modules::filepath('Interventi', 'modutil.php');
|
|
||||||
include_once Modules::filepath('Ddt di vendita', 'modutil.php');
|
|
||||||
include_once Modules::filepath('Ordini cliente', 'modutil.php');
|
|
||||||
|
|
||||||
$module = Modules::get($id_module);
|
$module = Modules::get($id_module);
|
||||||
|
|
||||||
if ($module['name'] == 'Fatture di vendita') {
|
if ($module['name'] == 'Fatture di vendita') {
|
||||||
@ -45,8 +39,6 @@ switch (post('op')) {
|
|||||||
|
|
||||||
case 'update':
|
case 'update':
|
||||||
if (post('id_record') !== null) {
|
if (post('id_record') !== null) {
|
||||||
include_once Modules::filepath($module['name'], 'modutil.php');
|
|
||||||
|
|
||||||
$idstatodocumento = post('idstatodocumento');
|
$idstatodocumento = post('idstatodocumento');
|
||||||
$idpagamento = post('idpagamento');
|
$idpagamento = post('idpagamento');
|
||||||
|
|
||||||
|
@ -2,8 +2,6 @@
|
|||||||
|
|
||||||
include_once __DIR__.'/../../core.php';
|
include_once __DIR__.'/../../core.php';
|
||||||
|
|
||||||
include_once Modules::filepath('Interventi', 'modutil.php');
|
|
||||||
|
|
||||||
$module = Modules::get($id_module);
|
$module = Modules::get($id_module);
|
||||||
|
|
||||||
if ($module['name'] == 'Fatture di vendita') {
|
if ($module['name'] == 'Fatture di vendita') {
|
||||||
|
@ -40,10 +40,10 @@ if ($dir == 'entrata') {
|
|||||||
if ($rs2[0]['piva'] == '') {
|
if ($rs2[0]['piva'] == '') {
|
||||||
array_push($campi_mancanti, 'Partita IVA');
|
array_push($campi_mancanti, 'Partita IVA');
|
||||||
}
|
}
|
||||||
/*if ($rs2[0]['codice_fiscale'] == '') {
|
/*if ($rs2[0]['codice_fiscale'] == '') {
|
||||||
array_push($campi_mancanti, 'Codice fiscale');
|
array_push($campi_mancanti, 'Codice fiscale');
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
if ($rs2[0]['citta'] == '') {
|
if ($rs2[0]['citta'] == '') {
|
||||||
array_push($campi_mancanti, 'Città');
|
array_push($campi_mancanti, 'Città');
|
||||||
}
|
}
|
||||||
@ -53,7 +53,7 @@ if ($dir == 'entrata') {
|
|||||||
if ($rs2[0]['cap'] == '') {
|
if ($rs2[0]['cap'] == '') {
|
||||||
array_push($campi_mancanti, 'C.A.P.');
|
array_push($campi_mancanti, 'C.A.P.');
|
||||||
}
|
}
|
||||||
if ($rs2[0]['nazione'] == '') {
|
if ($rs2[0]['nazione'] == '') {
|
||||||
array_push($campi_mancanti, 'Nazione');
|
array_push($campi_mancanti, 'Nazione');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2,8 +2,6 @@
|
|||||||
|
|
||||||
include_once __DIR__.'/../../core.php';
|
include_once __DIR__.'/../../core.php';
|
||||||
|
|
||||||
include_once Modules::filepath('Fatture di vendita', 'modutil.php');
|
|
||||||
|
|
||||||
use Modules\Fatture\Descrizione;
|
use Modules\Fatture\Descrizione;
|
||||||
use Modules\Fatture\Articolo;
|
use Modules\Fatture\Articolo;
|
||||||
use Modules\Fatture\Riga;
|
use Modules\Fatture\Riga;
|
||||||
@ -192,11 +190,11 @@ foreach ($righe as $riga) {
|
|||||||
if (!$riga instanceof Descrizione) {
|
if (!$riga instanceof Descrizione) {
|
||||||
echo '
|
echo '
|
||||||
'.Translator::numberToLocale($riga->imponibile_scontato).' €';
|
'.Translator::numberToLocale($riga->imponibile_scontato).' €';
|
||||||
/*
|
/*
|
||||||
<br><small class="text-'.($riga->guadagno > 0 ? 'success' : 'danger').'">
|
<br><small class="text-'.($riga->guadagno > 0 ? 'success' : 'danger').'">
|
||||||
'.tr('Guadagno').': '.Translator::numberToLocale($riga->guadagno).' €
|
'.tr('Guadagno').': '.Translator::numberToLocale($riga->guadagno).' €
|
||||||
</small>';
|
</small>';
|
||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
echo '
|
echo '
|
||||||
</td>';
|
</td>';
|
||||||
|
@ -6,10 +6,6 @@ use Modules\Interventi\Intervento;
|
|||||||
use Modules\Articoli\Articolo as ArticoloOriginale;
|
use Modules\Articoli\Articolo as ArticoloOriginale;
|
||||||
use Modules\Interventi\Components\Articolo;
|
use Modules\Interventi\Components\Articolo;
|
||||||
|
|
||||||
include_once Modules::filepath('Interventi', 'modutil.php');
|
|
||||||
include_once Modules::filepath('Articoli', 'modutil.php');
|
|
||||||
include_once Modules::filepath('MyImpianti', 'modutil.php');
|
|
||||||
|
|
||||||
switch (post('op')) {
|
switch (post('op')) {
|
||||||
case 'update':
|
case 'update':
|
||||||
$idpreventivo = post('idpreventivo');
|
$idpreventivo = post('idpreventivo');
|
||||||
|
@ -2,8 +2,6 @@
|
|||||||
|
|
||||||
include_once __DIR__.'/../../core.php';
|
include_once __DIR__.'/../../core.php';
|
||||||
|
|
||||||
include_once Modules::filepath('Articoli', 'modutil.php');
|
|
||||||
|
|
||||||
$show_prezzi = Auth::user()['gruppo'] != 'Tecnici' || (Auth::user()['gruppo'] == 'Tecnici' && setting('Mostra i prezzi al tecnico'));
|
$show_prezzi = Auth::user()['gruppo'] != 'Tecnici' || (Auth::user()['gruppo'] == 'Tecnici' && setting('Mostra i prezzi al tecnico'));
|
||||||
|
|
||||||
$query = 'SELECT *, (SELECT codice FROM mg_articoli WHERE id=mg_articoli_interventi.idarticolo) AS codice, mg_articoli_interventi.id AS idriga, (SELECT prc_guadagno FROM mg_listini WHERE id=(SELECT idlistino_vendite FROM an_anagrafiche WHERE idanagrafica=(SELECT idanagrafica FROM in_interventi WHERE id=mg_articoli_interventi.idintervento) ) ) AS prc_guadagno FROM mg_articoli_interventi WHERE idintervento='.prepare($id_record).' '.Modules::getAdditionalsQuery('Magazzino');
|
$query = 'SELECT *, (SELECT codice FROM mg_articoli WHERE id=mg_articoli_interventi.idarticolo) AS codice, mg_articoli_interventi.id AS idriga, (SELECT prc_guadagno FROM mg_listini WHERE id=(SELECT idlistino_vendite FROM an_anagrafiche WHERE idanagrafica=(SELECT idanagrafica FROM in_interventi WHERE id=mg_articoli_interventi.idintervento) ) ) AS prc_guadagno FROM mg_articoli_interventi WHERE idintervento='.prepare($id_record).' '.Modules::getAdditionalsQuery('Magazzino');
|
||||||
|
@ -6,8 +6,6 @@ if (file_exists(__DIR__.'/../../../core.php')) {
|
|||||||
include_once __DIR__.'/../../core.php';
|
include_once __DIR__.'/../../core.php';
|
||||||
}
|
}
|
||||||
|
|
||||||
include_once Modules::filepath('Interventi', 'modutil.php');
|
|
||||||
|
|
||||||
$show_prezzi = Auth::user()['gruppo'] != 'Tecnici' || (Auth::user()['gruppo'] == 'Tecnici' && setting('Mostra i prezzi al tecnico'));
|
$show_prezzi = Auth::user()['gruppo'] != 'Tecnici' || (Auth::user()['gruppo'] == 'Tecnici' && setting('Mostra i prezzi al tecnico'));
|
||||||
|
|
||||||
$idiva = setting('Iva predefinita');
|
$idiva = setting('Iva predefinita');
|
||||||
|
@ -6,8 +6,6 @@ if (file_exists(__DIR__.'/../../../core.php')) {
|
|||||||
include_once __DIR__.'/../../core.php';
|
include_once __DIR__.'/../../core.php';
|
||||||
}
|
}
|
||||||
|
|
||||||
include_once Modules::filepath('Interventi', 'modutil.php');
|
|
||||||
|
|
||||||
$show_costi = true;
|
$show_costi = true;
|
||||||
// Limitazione delle azioni dei tecnici
|
// Limitazione delle azioni dei tecnici
|
||||||
if ($user['gruppo'] == 'Tecnici') {
|
if ($user['gruppo'] == 'Tecnici') {
|
||||||
|
@ -1,7 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
include_once Modules::filepath('Articoli', 'modutil.php');
|
|
||||||
|
|
||||||
use Modules\Interventi\Articolo;
|
use Modules\Interventi\Articolo;
|
||||||
use Modules\Interventi\Intervento;
|
use Modules\Interventi\Intervento;
|
||||||
use Modules\Articoli\Articolo as ArticoloOriginale;
|
use Modules\Articoli\Articolo as ArticoloOriginale;
|
||||||
|
@ -11,8 +11,6 @@ use Modules\Fatture\Fattura;
|
|||||||
use Modules\Fatture\Tipo;
|
use Modules\Fatture\Tipo;
|
||||||
use Modules\Anagrafiche\Anagrafica;
|
use Modules\Anagrafiche\Anagrafica;
|
||||||
|
|
||||||
include_once Modules::filepath('Fatture di vendita', 'modutil.php');
|
|
||||||
|
|
||||||
// Segmenti
|
// Segmenti
|
||||||
$id_fatture = Modules::get('Fatture di vendita')['id'];
|
$id_fatture = Modules::get('Fatture di vendita')['id'];
|
||||||
if (!isset($_SESSION['module_'.$id_fatture]['id_segment'])) {
|
if (!isset($_SESSION['module_'.$id_fatture]['id_segment'])) {
|
||||||
|
@ -2,8 +2,6 @@
|
|||||||
|
|
||||||
include_once __DIR__.'/../../../core.php';
|
include_once __DIR__.'/../../../core.php';
|
||||||
|
|
||||||
include_once Modules::filepath('Interventi', 'modutil.php');
|
|
||||||
|
|
||||||
// INTERVENTI ESEGUITI SU QUESTO IMPIANTO
|
// INTERVENTI ESEGUITI SU QUESTO IMPIANTO
|
||||||
echo '
|
echo '
|
||||||
<div class="box">
|
<div class="box">
|
||||||
|
@ -2,8 +2,6 @@
|
|||||||
|
|
||||||
include_once __DIR__.'/../../core.php';
|
include_once __DIR__.'/../../core.php';
|
||||||
|
|
||||||
include_once Modules::filepath('Fatture di vendita', 'modutil.php');
|
|
||||||
|
|
||||||
switch (post('op')) {
|
switch (post('op')) {
|
||||||
case 'add':
|
case 'add':
|
||||||
$idmastrino = get_new_idmastrino('co_movimenti_modelli');
|
$idmastrino = get_new_idmastrino('co_movimenti_modelli');
|
||||||
|
@ -94,8 +94,6 @@ switch ($op) {
|
|||||||
|
|
||||||
// Carica i campi da compilare del componente
|
// Carica i campi da compilare del componente
|
||||||
case 'load_componente':
|
case 'load_componente':
|
||||||
include_once Modules::filepath('MyImpianti', 'modutil.php');
|
|
||||||
|
|
||||||
$filename = post('filename');
|
$filename = post('filename');
|
||||||
$idarticolo = post('idarticolo');
|
$idarticolo = post('idarticolo');
|
||||||
|
|
||||||
|
@ -2,9 +2,6 @@
|
|||||||
|
|
||||||
include_once __DIR__.'/../../core.php';
|
include_once __DIR__.'/../../core.php';
|
||||||
|
|
||||||
include_once Modules::filepath('Articoli', 'modutil.php');
|
|
||||||
include_once Modules::filepath('Fatture di vendita', 'modutil.php');
|
|
||||||
|
|
||||||
$module = Modules::get($id_module);
|
$module = Modules::get($id_module);
|
||||||
|
|
||||||
if ($module['name'] == 'Ordini cliente') {
|
if ($module['name'] == 'Ordini cliente') {
|
||||||
|
@ -2,8 +2,6 @@
|
|||||||
|
|
||||||
include_once __DIR__.'/../../core.php';
|
include_once __DIR__.'/../../core.php';
|
||||||
|
|
||||||
include_once Modules::filepath('Fatture di vendita', 'modutil.php');
|
|
||||||
|
|
||||||
// Mostro le righe dell'ordine
|
// Mostro le righe dell'ordine
|
||||||
echo '
|
echo '
|
||||||
<table class="table table-striped table-hover table-condensed table-bordered">
|
<table class="table table-striped table-hover table-condensed table-bordered">
|
||||||
@ -355,7 +353,7 @@ $(document).ready(function(){
|
|||||||
order += ","+$(this).data("id");
|
order += ","+$(this).data("id");
|
||||||
});
|
});
|
||||||
order = order.replace(/^,/, "");
|
order = order.replace(/^,/, "");
|
||||||
|
|
||||||
$.post("'.$rootdir.'/actions.php", {
|
$.post("'.$rootdir.'/actions.php", {
|
||||||
id: ui.item.data("id"),
|
id: ui.item.data("id"),
|
||||||
id_module: '.$id_module.',
|
id_module: '.$id_module.',
|
||||||
|
@ -2,8 +2,6 @@
|
|||||||
|
|
||||||
include_once __DIR__.'/../../core.php';
|
include_once __DIR__.'/../../core.php';
|
||||||
|
|
||||||
include_once Modules::filepath('Fatture di vendita', 'modutil.php');
|
|
||||||
|
|
||||||
switch (post('op')) {
|
switch (post('op')) {
|
||||||
case 'add':
|
case 'add':
|
||||||
$idanagrafica = post('idanagrafica');
|
$idanagrafica = post('idanagrafica');
|
||||||
@ -153,14 +151,14 @@ switch (post('op')) {
|
|||||||
$numero = Util\Generator::generate(setting('Formato codice preventivi'), $rs[0]['numero']);
|
$numero = Util\Generator::generate(setting('Formato codice preventivi'), $rs[0]['numero']);
|
||||||
|
|
||||||
$dbo->query('UPDATE co_preventivi SET idstato=1, numero = '.$numero.', master_revision = id WHERE id='.prepare($id_record));
|
$dbo->query('UPDATE co_preventivi SET idstato=1, numero = '.$numero.', master_revision = id WHERE id='.prepare($id_record));
|
||||||
|
|
||||||
//copio anche le righe del preventivo
|
//copio anche le righe del preventivo
|
||||||
$dbo->query('CREATE TEMPORARY TABLE tmp SELECT * FROM co_righe_preventivi WHERE idpreventivo = '.filter('id_record'));
|
$dbo->query('CREATE TEMPORARY TABLE tmp SELECT * FROM co_righe_preventivi WHERE idpreventivo = '.filter('id_record'));
|
||||||
$dbo->query('ALTER TABLE tmp DROP id');
|
$dbo->query('ALTER TABLE tmp DROP id');
|
||||||
$dbo->query('UPDATE tmp SET idpreventivo = '.prepare($id_record));
|
$dbo->query('UPDATE tmp SET idpreventivo = '.prepare($id_record));
|
||||||
$dbo->query('INSERT INTO co_righe_preventivi SELECT NULL,tmp.* FROM tmp');
|
$dbo->query('INSERT INTO co_righe_preventivi SELECT NULL,tmp.* FROM tmp');
|
||||||
$dbo->query('DROP TEMPORARY TABLE tmp');
|
$dbo->query('DROP TEMPORARY TABLE tmp');
|
||||||
|
|
||||||
flash()->info(tr('Preventivo duplicato correttamente!'));
|
flash()->info(tr('Preventivo duplicato correttamente!'));
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
@ -2,11 +2,7 @@
|
|||||||
|
|
||||||
include_once __DIR__.'/../../../core.php';
|
include_once __DIR__.'/../../../core.php';
|
||||||
|
|
||||||
include_once Modules::filepath('Interventi', 'modutil.php');
|
/* CONSUNTIVO */
|
||||||
|
|
||||||
/*
|
|
||||||
CONSUNTIVO
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Salvo i colori e gli stati degli stati intervento su un array
|
// Salvo i colori e gli stati degli stati intervento su un array
|
||||||
$colori = [];
|
$colori = [];
|
||||||
|
@ -2,8 +2,6 @@
|
|||||||
|
|
||||||
include_once __DIR__.'/../../core.php';
|
include_once __DIR__.'/../../core.php';
|
||||||
|
|
||||||
include_once Modules::filepath('Fatture di vendita', 'modutil.php');
|
|
||||||
|
|
||||||
switch (post('op')) {
|
switch (post('op')) {
|
||||||
case 'add':
|
case 'add':
|
||||||
$all_ok = true;
|
$all_ok = true;
|
||||||
|
@ -33,7 +33,7 @@ switch (post('op')) {
|
|||||||
'from_address' => post('from_address'),
|
'from_address' => post('from_address'),
|
||||||
'encryption' => post('encryption'),
|
'encryption' => post('encryption'),
|
||||||
'pec' => post('pec'),
|
'pec' => post('pec'),
|
||||||
'ssl_no_verify' => post('ssl_no_verify'),
|
'ssl_no_verify' => post('ssl_no_verify'),
|
||||||
'predefined' => $predefined,
|
'predefined' => $predefined,
|
||||||
], ['id' => $id_record]);
|
], ['id' => $id_record]);
|
||||||
|
|
||||||
|
@ -5,8 +5,6 @@ include_once __DIR__.'/../../core.php';
|
|||||||
use Plugins\ImportFE\FatturaElettronica;
|
use Plugins\ImportFE\FatturaElettronica;
|
||||||
use Plugins\ImportFE\Interaction;
|
use Plugins\ImportFE\Interaction;
|
||||||
|
|
||||||
include_once Modules::filepath('Fatture di vendita', 'modutil.php');
|
|
||||||
|
|
||||||
$directory = Uploads::getDirectory($id_module);
|
$directory = Uploads::getDirectory($id_module);
|
||||||
|
|
||||||
switch (filter('op')) {
|
switch (filter('op')) {
|
||||||
|
@ -2,8 +2,6 @@
|
|||||||
|
|
||||||
include_once __DIR__.'/../../core.php';
|
include_once __DIR__.'/../../core.php';
|
||||||
|
|
||||||
include_once Modules::filepath('Articoli', 'modutil.php');
|
|
||||||
|
|
||||||
// Pianificazione intervento
|
// Pianificazione intervento
|
||||||
switch (filter('op')) {
|
switch (filter('op')) {
|
||||||
case 'add-promemoria':
|
case 'add-promemoria':
|
||||||
|
@ -54,10 +54,10 @@ echo ' </div>';
|
|||||||
echo ' </div>';
|
echo ' </div>';
|
||||||
echo " <div class='row'>";
|
echo " <div class='row'>";
|
||||||
echo " <div class='col-md-12 text-center'>";
|
echo " <div class='col-md-12 text-center'>";
|
||||||
echo " <button ".((sizeof($rs_revisioni)<2) ? 'disabled' : '')." type='submit' class='btn btn-primary' ><i class='fa fa-refresh'></i> ".tr('Cambia revisione')."</button>";
|
echo ' <button '.((sizeof($rs_revisioni) < 2) ? 'disabled' : '')." type='submit' class='btn btn-primary' ><i class='fa fa-refresh'></i> ".tr('Cambia revisione').'</button>';
|
||||||
echo " </div>";
|
echo ' </div>';
|
||||||
echo " </div>";
|
echo ' </div>';
|
||||||
echo "</form>";
|
echo '</form>';
|
||||||
|
|
||||||
echo "<form action='".$rootdir.'/editor.php?id_module='.$id_module.'&id_record='.$id_record."' method='post' id='form_deleterevision'>";
|
echo "<form action='".$rootdir.'/editor.php?id_module='.$id_module.'&id_record='.$id_record."' method='post' id='form_deleterevision'>";
|
||||||
echo " <input type='hidden' name='backto' value='record-edit'>";
|
echo " <input type='hidden' name='backto' value='record-edit'>";
|
||||||
|
@ -105,9 +105,6 @@ class API extends \Util\Singleton
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
if (in_array($resource, array_keys($resources))) {
|
if (in_array($resource, array_keys($resources))) {
|
||||||
// Inclusione funzioni del modulo
|
|
||||||
include_once App::filepath('modules/'.$resources[$resource].'|custom|', 'modutil.php');
|
|
||||||
|
|
||||||
// Esecuzione delle operazioni personalizzate
|
// Esecuzione delle operazioni personalizzate
|
||||||
$filename = DOCROOT.'/modules/'.$resources[$resource].'/api/'.$kind.'.php';
|
$filename = DOCROOT.'/modules/'.$resources[$resource].'/api/'.$kind.'.php';
|
||||||
include $filename;
|
include $filename;
|
||||||
@ -223,9 +220,6 @@ class API extends \Util\Singleton
|
|||||||
return self::error('notFound');
|
return self::error('notFound');
|
||||||
}
|
}
|
||||||
|
|
||||||
// Inclusione funzioni del modulo
|
|
||||||
include_once App::filepath('modules/'.$resources[$resource].'|custom|', 'modutil.php');
|
|
||||||
|
|
||||||
// Database
|
// Database
|
||||||
$dbo = $database = database();
|
$dbo = $database = database();
|
||||||
|
|
||||||
|
22
src/Mail.php
22
src/Mail.php
@ -181,18 +181,16 @@ class Mail extends PHPMailer\PHPMailer\PHPMailer
|
|||||||
if (in_array(strtolower($config['encryption']), ['ssl', 'tls'])) {
|
if (in_array(strtolower($config['encryption']), ['ssl', 'tls'])) {
|
||||||
$this->SMTPSecure = strtolower($config['encryption']);
|
$this->SMTPSecure = strtolower($config['encryption']);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!empty($config['ssl_no_verify'])){
|
if (!empty($config['ssl_no_verify'])) {
|
||||||
$this->SMTPOptions = array (
|
$this->SMTPOptions = [
|
||||||
'ssl' => array(
|
'ssl' => [
|
||||||
'verify_peer' => false,
|
'verify_peer' => false,
|
||||||
'verify_peer_name' => false,
|
'verify_peer_name' => false,
|
||||||
'allow_self_signed' => true
|
'allow_self_signed' => true,
|
||||||
)
|
],
|
||||||
);
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->From = $config['from_address'];
|
$this->From = $config['from_address'];
|
||||||
|
@ -124,11 +124,6 @@ class Prints
|
|||||||
|
|
||||||
$infos = self::get($print);
|
$infos = self::get($print);
|
||||||
|
|
||||||
$modutil = Modules::filepath($infos['id_module'], 'modutil.php');
|
|
||||||
if (!empty($modutil)) {
|
|
||||||
include_once $modutil;
|
|
||||||
}
|
|
||||||
|
|
||||||
Permissions::addModule($infos['id_module']);
|
Permissions::addModule($infos['id_module']);
|
||||||
|
|
||||||
if (empty($infos) || empty($infos['enabled']) || !Permissions::check([], false)) {
|
if (empty($infos) || empty($infos['enabled']) || !Permissions::check([], false)) {
|
||||||
|
@ -2,8 +2,6 @@
|
|||||||
|
|
||||||
include_once __DIR__.'/../../core.php';
|
include_once __DIR__.'/../../core.php';
|
||||||
|
|
||||||
include_once Modules::filepath('Interventi', 'modutil.php');
|
|
||||||
|
|
||||||
$report_name = 'contratto_'.$records[0]['numero'].'_cons.pdf';
|
$report_name = 'contratto_'.$records[0]['numero'].'_cons.pdf';
|
||||||
|
|
||||||
echo '
|
echo '
|
||||||
|
@ -2,8 +2,6 @@
|
|||||||
|
|
||||||
include_once __DIR__.'/../../core.php';
|
include_once __DIR__.'/../../core.php';
|
||||||
|
|
||||||
include_once Modules::filepath('Fatture di vendita', 'modutil.php');
|
|
||||||
|
|
||||||
$report_name = 'ddt_'.$numero.'.pdf';
|
$report_name = 'ddt_'.$numero.'.pdf';
|
||||||
|
|
||||||
$autofill = [
|
$autofill = [
|
||||||
|
@ -2,8 +2,6 @@
|
|||||||
|
|
||||||
include_once __DIR__.'/../../core.php';
|
include_once __DIR__.'/../../core.php';
|
||||||
|
|
||||||
include_once Modules::filepath('Fatture di vendita', 'modutil.php');
|
|
||||||
|
|
||||||
$report_name = 'fattura_'.$numero.'.pdf';
|
$report_name = 'fattura_'.$numero.'.pdf';
|
||||||
|
|
||||||
$autofill = [
|
$autofill = [
|
||||||
|
@ -2,8 +2,6 @@
|
|||||||
|
|
||||||
include_once __DIR__.'/../../core.php';
|
include_once __DIR__.'/../../core.php';
|
||||||
|
|
||||||
include_once Modules::filepath('Interventi', 'modutil.php');
|
|
||||||
|
|
||||||
$report_name = 'intervento_'.$records[0]['codice'].'.pdf';
|
$report_name = 'intervento_'.$records[0]['codice'].'.pdf';
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -2,8 +2,6 @@
|
|||||||
|
|
||||||
include_once __DIR__.'/../../core.php';
|
include_once __DIR__.'/../../core.php';
|
||||||
|
|
||||||
include_once Modules::filepath('Interventi', 'modutil.php');
|
|
||||||
|
|
||||||
$module_name = 'Interventi';
|
$module_name = 'Interventi';
|
||||||
|
|
||||||
// carica intervento
|
// carica intervento
|
||||||
|
@ -2,9 +2,6 @@
|
|||||||
|
|
||||||
include_once __DIR__.'/../../core.php';
|
include_once __DIR__.'/../../core.php';
|
||||||
|
|
||||||
include_once Modules::filepath('Interventi', 'modutil.php');
|
|
||||||
include_once Modules::filepath('Preventivi', 'modutil.php');
|
|
||||||
|
|
||||||
$report_name = 'preventivo_'.$records[0]['numero'].'_cons.pdf';
|
$report_name = 'preventivo_'.$records[0]['numero'].'_cons.pdf';
|
||||||
|
|
||||||
echo '
|
echo '
|
||||||
|
Loading…
x
Reference in New Issue
Block a user