1
0
mirror of https://github.com/devcode-it/openstamanager.git synced 2025-02-16 19:40:44 +01:00

Fix stile

This commit is contained in:
loviuz 2020-02-05 14:51:39 +01:00
parent 8e85ab8f98
commit 4d2280c5ce
26 changed files with 86 additions and 112 deletions

View File

@ -297,7 +297,6 @@ switch ($resource) {
break; break;
case 'relazioni': case 'relazioni':
$query = 'SELECT id, descrizione, colore AS _bgcolor_ FROM an_relazioni ORDER BY descrizione'; $query = 'SELECT id, descrizione, colore AS _bgcolor_ FROM an_relazioni ORDER BY descrizione';
@ -312,7 +311,6 @@ switch ($resource) {
break; break;
case 'dichiarazioni_intento': case 'dichiarazioni_intento':
$query = "SELECT id, CONCAT_WS(' - ', numero_protocollo, numero_progressivo) as descrizione FROM co_dichiarazioni_intento |where| ORDER BY data"; $query = "SELECT id, CONCAT_WS(' - ', numero_protocollo, numero_progressivo) as descrizione FROM co_dichiarazioni_intento |where| ORDER BY data";

View File

@ -1,4 +1,5 @@
<?php <?php
if (in_array($id_cliente, $tipi_anagrafica) or in_array($id_fornitore, $tipi_anagrafica)) { if (in_array($id_cliente, $tipi_anagrafica) or in_array($id_fornitore, $tipi_anagrafica)) {
echo ' echo '
<div class="btn-group"> <div class="btn-group">
@ -15,7 +16,6 @@ if (in_array($id_cliente, $tipi_anagrafica) or in_array($id_fornitore, $tipi_ana
</a></li>'; </a></li>';
} }
if (in_array($id_cliente, $tipi_anagrafica)) { if (in_array($id_cliente, $tipi_anagrafica)) {
echo ' echo '
<li><a data-toggle="modal" data-title="'.tr('Aggiungi intervento').'" data-href="add.php?id_module='.Modules::get('Interventi')['id'].'&idanagrafica='.$record['idanagrafica'].'"><i class="fa fa-wrench"></i>'.tr('Nuovo intervento').' <li><a data-toggle="modal" data-title="'.tr('Aggiungi intervento').'" data-href="add.php?id_module='.Modules::get('Interventi')['id'].'&idanagrafica='.$record['idanagrafica'].'"><i class="fa fa-wrench"></i>'.tr('Nuovo intervento').'

View File

@ -4,9 +4,9 @@ include_once __DIR__.'/../../core.php';
use Modules\Anagrafiche\Anagrafica; use Modules\Anagrafiche\Anagrafica;
$rs = $dbo->fetchArray("SELECT idtipoanagrafica, descrizione FROM an_tipianagrafiche"); $rs = $dbo->fetchArray('SELECT idtipoanagrafica, descrizione FROM an_tipianagrafiche');
foreach ($rs as $riga) { foreach ($rs as $riga) {
${"id_".strtolower($riga['descrizione'])} = $riga['idtipoanagrafica']; ${'id_'.strtolower($riga['descrizione'])} = $riga['idtipoanagrafica'];
} }
if (isset($id_record)) { if (isset($id_record)) {

View File

@ -22,7 +22,7 @@ switch (filter('op')) {
$nota = filter('nota'); $nota = filter('nota');
$colore = filter('colore'); $colore = filter('colore');
$n = $dbo->fetchNum("SELECT * FROM `mg_categorie` WHERE `nome` LIKE ".prepare($nome)); $n = $dbo->fetchNum('SELECT * FROM `mg_categorie` WHERE `nome` LIKE '.prepare($nome));
if (isset($nome)) { if (isset($nome)) {
if ($n == 0) { if ($n == 0) {

View File

@ -490,7 +490,6 @@ switch (post('op')) {
flash()->info(tr('Intervento _NUM_ rimosso!', [ flash()->info(tr('Intervento _NUM_ rimosso!', [
'_NUM_' => $idintervento, '_NUM_' => $idintervento,
])); ]));
} catch (InvalidArgumentException $e) { } catch (InvalidArgumentException $e) {
flash()->error(tr('Errore durante l\'eliminazione della riga!')); flash()->error(tr('Errore durante l\'eliminazione della riga!'));
} }

View File

@ -191,26 +191,26 @@ switch (post('op')) {
$fattura = Fattura::find($id); $fattura = Fattura::find($id);
$id_segment = (post('id_segment') ? post('id_segment') : $fattura->id_segment); $id_segment = (post('id_segment') ? post('id_segment') : $fattura->id_segment);
$dir = $dbo->fetchOne("SELECT dir FROM co_tipidocumento WHERE id=".prepare($fattura->idtipodocumento))['dir']; $dir = $dbo->fetchOne('SELECT dir FROM co_tipidocumento WHERE id='.prepare($fattura->idtipodocumento))['dir'];
//+ 1 giorno //+ 1 giorno
if (post('skip_time') == 'Giorno') { if (post('skip_time') == 'Giorno') {
$data = date("Y-m-d", strtotime( '+1 day' , strtotime ( $fattura->data )) ); $data = date('Y-m-d', strtotime('+1 day', strtotime($fattura->data)));
} }
//+ 1 settimana //+ 1 settimana
if (post('skip_time') == 'Settimana') { if (post('skip_time') == 'Settimana') {
$data = date("Y-m-d", strtotime( '+1 week' , strtotime ( $fattura->data )) ); $data = date('Y-m-d', strtotime('+1 week', strtotime($fattura->data)));
} }
//+ 1 mese //+ 1 mese
if (post('skip_time') == 'Mese') { if (post('skip_time') == 'Mese') {
$data = date("Y-m-d", strtotime( '+1 month' , strtotime ( $fattura->data )) ); $data = date('Y-m-d', strtotime('+1 month', strtotime($fattura->data)));
} }
//+ 1 anno //+ 1 anno
if (post('skip_time') == 'Anno') { if (post('skip_time') == 'Anno') {
$data = date("Y-m-d", strtotime( '+1 year' , strtotime ( $fattura->data )) ); $data = date('Y-m-d', strtotime('+1 year', strtotime($fattura->data)));
} }
$new = $fattura->replicate(); $new = $fattura->replicate();
@ -223,7 +223,6 @@ switch (post('op')) {
$righe = $fattura->getRighe(); $righe = $fattura->getRighe();
foreach ($righe as $riga) { foreach ($righe as $riga) {
if (!post('riferimenti')) { if (!post('riferimenti')) {
$riga->idpreventivo = 0; $riga->idpreventivo = 0;
$riga->idcontratto = 0; $riga->idcontratto = 0;
@ -242,7 +241,6 @@ switch (post('op')) {
$articolo->movimentaMagazzino($articolo->qta); $articolo->movimentaMagazzino($articolo->qta);
} }
} }
} }
flash()->info(tr('Fatture duplicate correttamente!')); flash()->info(tr('Fatture duplicate correttamente!'));

View File

@ -193,7 +193,8 @@ if (empty($record['is_fiscale'])) {
} else { } else {
?> ?>
{[ "type": "select", "label": "<?php echo tr('Fornitore'); ?>", "name": "idanagrafica", "required": 1, "ajax-source": "fornitori", "value": "$idanagrafica$" ]} {[ "type": "select", "label": "<?php echo tr('Fornitore'); ?>", "name": "idanagrafica", "required": 1, "ajax-source": "fornitori", "value": "$idanagrafica$" ]}
<?php } ?> <?php
} ?>
</div> </div>
@ -212,8 +213,7 @@ if (empty($record['is_fiscale'])) {
<div class="col-md-6"> <div class="col-md-6">
<?php <?php
echo Plugins::link('Sedi', $record['idsede_partenza'], null, null, 'class="pull-right"'); echo Plugins::link('Sedi', $record['idsede_partenza'], null, null, 'class="pull-right"'); ?>
?>
{[ "type": "select", "label": "<?php echo tr('Partenza merce'); ?>", "name": "idsede_partenza", "ajax-source": "sedi", "placeholder": "Sede legale", "value": "$idsede_partenza$", "icon-after": "add|<?php echo Modules::get('Anagrafiche')['id']; ?>|id_plugin=<?php echo Plugins::get('Sedi')['id']; ?>&id_parent=<?php echo $record['idanagrafica']; ?>||<?php echo (intval($block_edit)) ? 'disabled' : ''; ?>" ]} {[ "type": "select", "label": "<?php echo tr('Partenza merce'); ?>", "name": "idsede_partenza", "ajax-source": "sedi", "placeholder": "Sede legale", "value": "$idsede_partenza$", "icon-after": "add|<?php echo Modules::get('Anagrafiche')['id']; ?>|id_plugin=<?php echo Plugins::get('Sedi')['id']; ?>&id_parent=<?php echo $record['idanagrafica']; ?>||<?php echo (intval($block_edit)) ? 'disabled' : ''; ?>" ]}
</div> </div>
@ -221,8 +221,7 @@ if (empty($record['is_fiscale'])) {
<div class="col-md-6"> <div class="col-md-6">
<?php <?php
echo Plugins::link('Sedi', $record['idsede_destinazione'], null, null, 'class="pull-right"'); echo Plugins::link('Sedi', $record['idsede_destinazione'], null, null, 'class="pull-right"'); ?>
?>
{[ "type": "select", "label": "<?php echo tr('Destinazione merce'); ?>", "name": "idsede_destinazione", "ajax-source": "sedi_azienda", "value": "$idsede_destinazione$", "readonly": "<?php echo (sizeof($articolo)) ? 1 : 0; ?>" ]} {[ "type": "select", "label": "<?php echo tr('Destinazione merce'); ?>", "name": "idsede_destinazione", "ajax-source": "sedi_azienda", "value": "$idsede_destinazione$", "readonly": "<?php echo (sizeof($articolo)) ? 1 : 0; ?>" ]}
</div> </div>
@ -232,8 +231,7 @@ if (empty($record['is_fiscale'])) {
<div class="col-md-6"> <div class="col-md-6">
<?php <?php
echo Plugins::link('Sedi', $record['idsede_partenza'], null, null, 'class="pull-right"'); echo Plugins::link('Sedi', $record['idsede_partenza'], null, null, 'class="pull-right"'); ?>
?>
{[ "type": "select", "label": "<?php echo tr('Partenza merce'); ?>", "name": "idsede_partenza", "ajax-source": "sedi_azienda", "placeholder": "Sede legale", "value": "$idsede_partenza$", "readonly": "<?php echo (sizeof($articolo)) ? 1 : 0; ?>" ]} {[ "type": "select", "label": "<?php echo tr('Partenza merce'); ?>", "name": "idsede_partenza", "ajax-source": "sedi_azienda", "placeholder": "Sede legale", "value": "$idsede_partenza$", "readonly": "<?php echo (sizeof($articolo)) ? 1 : 0; ?>" ]}
</div> </div>
@ -241,8 +239,7 @@ if (empty($record['is_fiscale'])) {
<div class="col-md-6"> <div class="col-md-6">
<?php <?php
echo Plugins::link('Sedi', $record['idsede_destinazione'], null, null, 'class="pull-right"'); echo Plugins::link('Sedi', $record['idsede_destinazione'], null, null, 'class="pull-right"'); ?>
?>
{[ "type": "select", "label": "<?php echo tr('Destinazione merce'); ?>", "name": "idsede_destinazione", "ajax-source": "sedi", "value": "$idsede_destinazione$", "readonly": "", "icon-after": "add|<?php echo Modules::get('Anagrafiche')['id']; ?>|id_plugin=<?php echo Plugins::get('Sedi')['id']; ?>&id_parent=<?php echo $record['idanagrafica']; ?>||<?php echo (intval($block_edit)) ? 'disabled' : ''; ?>" ]} {[ "type": "select", "label": "<?php echo tr('Destinazione merce'); ?>", "name": "idsede_destinazione", "ajax-source": "sedi", "value": "$idsede_destinazione$", "readonly": "", "icon-after": "add|<?php echo Modules::get('Anagrafiche')['id']; ?>|id_plugin=<?php echo Plugins::get('Sedi')['id']; ?>&id_parent=<?php echo $record['idanagrafica']; ?>||<?php echo (intval($block_edit)) ? 'disabled' : ''; ?>" ]}
</div> </div>

View File

@ -6,20 +6,16 @@ switch (filter('op')) {
case 'update': case 'update':
$is_all_valid = true; $is_all_valid = true;
foreach (post('setting') as $id => $value) { foreach (post('setting') as $id => $value) {
$result = Settings::get($id); $result = Settings::get($id);
if (preg_match("/multiple\[(.+?)\]/", $result['tipo'], $m)) { if (preg_match("/multiple\[(.+?)\]/", $result['tipo'], $m)) {
$value = implode(",", $value); $value = implode(',', $value);
} }
$is_valid = Settings::setValue($id, $value); $is_valid = Settings::setValue($id, $value);
if (!$is_valid) { if (!$is_valid) {
// integer // integer
if ($result['tipo'] == 'integer') { if ($result['tipo'] == 'integer') {
flash()->error(tr('Il valore inserito del parametro _NAME_ deve essere un numero intero!', [ flash()->error(tr('Il valore inserito del parametro _NAME_ deve essere un numero intero!', [
@ -34,8 +30,6 @@ switch (filter('op')) {
'_NAME_' => '"'.$result['nome'].'"', '_NAME_' => '"'.$result['nome'].'"',
])); ]));
} }
} }
$is_all_valid &= $is_valid; $is_all_valid &= $is_valid;

View File

@ -169,13 +169,10 @@ class Intervento extends Document
//$ultimo = Generator::getPreviousFrom($maschera, 'in_interventi', 'codice'); //$ultimo = Generator::getPreviousFrom($maschera, 'in_interventi', 'codice');
if ((strpos($maschera, 'YYYY') !== false) or (strpos($maschera, 'yy') !== false)) { if ((strpos($maschera, 'YYYY') !== false) or (strpos($maschera, 'yy') !== false)) {
$ultimo = Generator::getPreviousFrom($maschera, 'in_interventi', 'codice', [ $ultimo = Generator::getPreviousFrom($maschera, 'in_interventi', 'codice', [
'YEAR(data_richiesta) = '.prepare(date('Y', strtotime($data))), 'YEAR(data_richiesta) = '.prepare(date('Y', strtotime($data))),
]); ]);
} else { } else {
$ultimo = Generator::getPreviousFrom($maschera, 'in_interventi', 'codice'); $ultimo = Generator::getPreviousFrom($maschera, 'in_interventi', 'codice');
} }

View File

@ -238,11 +238,9 @@ class Preventivo extends Document
$maschera = setting('Formato codice preventivi'); $maschera = setting('Formato codice preventivi');
if ((strpos($maschera, 'YYYY') !== false) or (strpos($maschera, 'yy') !== false)) { if ((strpos($maschera, 'YYYY') !== false) or (strpos($maschera, 'yy') !== false)) {
$ultimo = Generator::getPreviousFrom($maschera, 'co_preventivi', 'numero', [ $ultimo = Generator::getPreviousFrom($maschera, 'co_preventivi', 'numero', [
'YEAR(data_bozza) = '.prepare(date('Y', strtotime($data))), 'YEAR(data_bozza) = '.prepare(date('Y', strtotime($data))),
]); ]);
} else { } else {
$ultimo = Generator::getPreviousFrom($maschera, 'co_preventivi', 'numero'); $ultimo = Generator::getPreviousFrom($maschera, 'co_preventivi', 'numero');
} }

View File

@ -73,7 +73,6 @@ switch (post('op')) {
$query = 'DELETE FROM co_contratti_tipiintervento WHERE idtipointervento='.prepare($id_record); $query = 'DELETE FROM co_contratti_tipiintervento WHERE idtipointervento='.prepare($id_record);
$dbo->query($query); $dbo->query($query);
$query = 'DELETE FROM in_tipiintervento WHERE idtipointervento='.prepare($id_record); $query = 'DELETE FROM in_tipiintervento WHERE idtipointervento='.prepare($id_record);
$dbo->query($query); $dbo->query($query);

View File

@ -2,8 +2,9 @@
include_once __DIR__.'/../../core.php'; include_once __DIR__.'/../../core.php';
if (!empty(filter('idanagrafica'))) if (!empty(filter('idanagrafica'))) {
$utente['id_anagrafica'] = filter('idanagrafica'); $utente['id_anagrafica'] = filter('idanagrafica');
}
$_SESSION['superselect']['idanagrafica'] = $utente['id_anagrafica']; $_SESSION['superselect']['idanagrafica'] = $utente['id_anagrafica'];

View File

@ -462,7 +462,6 @@ class Prints
]); ]);
if (setting('Filigrana stampe')) { if (setting('Filigrana stampe')) {
$mpdf->SetWatermarkImage( $mpdf->SetWatermarkImage(
DOCROOT.'/files/anagrafiche/'.setting('Filigrana stampe'), DOCROOT.'/files/anagrafiche/'.setting('Filigrana stampe'),
0.5, 0.5,
@ -476,7 +475,6 @@ class Prints
} else { } else {
$mpdf->showWatermarkImage = intval($settings['showWatermarkImage']); $mpdf->showWatermarkImage = intval($settings['showWatermarkImage']);
} }
} }
// Inclusione dei fogli di stile CSS // Inclusione dei fogli di stile CSS

View File

@ -87,10 +87,8 @@ class Settings
*/ */
public static function setValue($setting, $value) public static function setValue($setting, $value)
{ {
$setting = self::get($setting); $setting = self::get($setting);
// Trasformazioni // Trasformazioni
// Boolean (checkbox) // Boolean (checkbox)
if ($setting->tipo == 'boolean') { if ($setting->tipo == 'boolean') {
@ -107,15 +105,12 @@ class Settings
// verifico che il valore scelto sia nella lista enumerata nel db // verifico che il valore scelto sia nella lista enumerata nel db
elseif (preg_match("/list\[(.+?)\]/", $setting->tipo, $m)) { elseif (preg_match("/list\[(.+?)\]/", $setting->tipo, $m)) {
$validator = v::in(explode(',', $m[1])); $validator = v::in(explode(',', $m[1]));
} }
// multiple // multiple
// verifico che il valore scelto sia nella lista enumerata nel db // verifico che il valore scelto sia nella lista enumerata nel db
elseif (preg_match("/multiple\[(.+?)\]/", $setting->tipo, $m[0][0])) { elseif (preg_match("/multiple\[(.+?)\]/", $setting->tipo, $m[0][0])) {
//$validator = v::in(explode(',', $m[0][0][1])); //$validator = v::in(explode(',', $m[0][0][1]));
} }
// Boolean (checkbox) // Boolean (checkbox)