1
0
mirror of https://github.com/devcode-it/openstamanager.git synced 2025-02-28 09:17:55 +01:00
This commit is contained in:
MatteoPistorello 2022-03-11 09:11:17 +01:00
commit be0a8f00c6
4 changed files with 47 additions and 23 deletions

View File

@ -174,16 +174,18 @@ foreach ($settings as $name => $values) {
} }
// MySQL // MySQL
$db = [ if ($database->isInstalled()){
$db = [
'mysql_version' => [ 'mysql_version' => [
'type' => 'mysql', 'type' => 'mysql',
'description' => '5.7.x - 8.0.x', 'description' => '5.7.x - 8.0.x',
'minimum' => '5.7.0', 'minimum' => '5.7.0',
'maximum' => '8.0.99', 'maximum' => '8.0.99',
], ],
]; ];
}
foreach ($db as $name => $values) { foreach ($db as $name => $values) {
$description = $values['description']; $description = $values['description'];
@ -222,6 +224,7 @@ foreach ($dirs as $name => $description) {
]; ];
} }
$requirements = [ $requirements = [
tr('Apache') => $apache, tr('Apache') => $apache,
tr('PHP (_VERSION_ _SUPPORTED_)', [ tr('PHP (_VERSION_ _SUPPORTED_)', [
@ -232,6 +235,10 @@ $requirements = [
tr('Percorsi di servizio') => $directories, tr('Percorsi di servizio') => $directories,
]; ];
if (!$database->isInstalled() || empty($mysql)){
unset($requirements['MySQL']);
}
// Tabelle di riepilogo // Tabelle di riepilogo
foreach ($requirements as $key => $values) { foreach ($requirements as $key => $values) {

View File

@ -29,30 +29,47 @@ include_once __DIR__.'/../../core.php';
<div class="row"> <div class="row">
<?php <?php
//Controllo se alla prima nota solo collegate più fatture
$rs_doc = $dbo->fetchArray('SELECT DISTINCT iddocumento, (SELECT IFNULL(numero_esterno, numero) FROM co_documenti WHERE id=co_movimenti.iddocumento) AS numero FROM co_movimenti WHERE idmastrino='.prepare($record['idmastrino']).' AND iddocumento!=0'); $rs_doc = $dbo->fetchArray('SELECT DISTINCT iddocumento, (SELECT IFNULL(numero_esterno, numero) FROM co_documenti WHERE id=co_movimenti.iddocumento) AS numero FROM co_movimenti WHERE idmastrino='.prepare($record['idmastrino']).' AND iddocumento!=0');
if (sizeof($rs_doc) > 0) { if (sizeof($rs_doc) > 0) {
if (sizeof($rs_doc) == 1) { if (sizeof($rs_doc) == 1) {
$rs = $dbo->fetchArray('SELECT dir FROM co_tipidocumento INNER JOIN co_documenti ON co_tipidocumento.id=co_documenti.idtipodocumento WHERE co_documenti.id='.prepare($rs_doc[0]['iddocumento'])); $rs = $dbo->fetchArray('SELECT dir FROM co_tipidocumento INNER JOIN co_documenti ON co_tipidocumento.id=co_documenti.idtipodocumento WHERE co_documenti.id='.prepare($rs_doc[0]['iddocumento']));
$modulo = ($rs[0]['dir'] == 'entrata') ? 'Fatture di vendita' : 'Fatture di acquisto'; ?> $modulo = ($rs[0]['dir'] == 'entrata') ? 'Fatture di vendita' : 'Fatture di acquisto'; ?>
<div class=" col-md-2">
<div class="col-md-2">
<br> <br>
<a href="<?php echo base_path(); ?>/editor.php?id_module=<?php echo Modules::get($modulo)['id']; ?>&id_record=<?php echo $rs_doc[0]['iddocumento']; ?>" class="btn btn-info"><i class="fa fa-chevron-left"></i> <?php echo tr('Vai alla fattura'); ?></a> <div class="btn-group">
<a href="<?php echo base_path(); ?>/editor.php?id_module=<?php echo Modules::get($modulo)['id']; ?>&id_record=<?php echo $rs_doc[0]['iddocumento']; ?>" class="btn btn-info"><i class="fa fa-chevron-left"></i> <?php echo tr('Vai alla fattura'); ?></a>
<a type="button" class="btn btn-info dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<span class="caret"></span>
<span class="sr-only">Toggle Dropdown</span>
</a>
<ul class="dropdown-menu">
<li><a href="<?php echo base_path(); ?>/controller.php?id_module=<?php echo Modules::get($modulo)['id']; ?>" class="dropdown-item"><i class="fa fa-chevron-left"></i> <?php echo tr('Vai all\'elenco delle fatture'); ?></a></li>
</ul>
</div>
</div> </div>
<?php <?php
} else { } else {
?> ?>
<div class=" col-md-2"> <div class="col-md-2">
<br> <br>
<div class="dropdown"> <div class="btn-group">
<button class="btn btn-primary dropdown-toggle" type="button" data-toggle="dropdown" style="width:100%;">Fatture collegate
<span class="caret"></span></button>
<button type="button" class="btn btn-info dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<?php echo tr('Più fatture collegate'); ?>... <span class="caret"></span>
<span class="sr-only">Toggle Dropdown</span>
</button>
<ul class="dropdown-menu"> <ul class="dropdown-menu">
<?php <?php
for ($i = 0; $i < sizeof($rs_doc); ++$i) { for ($i = 0; $i < sizeof($rs_doc); ++$i) {
$rs = $dbo->fetchArray('SELECT dir FROM co_tipidocumento INNER JOIN co_documenti ON co_tipidocumento.id=co_documenti.idtipodocumento WHERE co_documenti.id='.prepare($rs_doc[$i]['iddocumento'])); $rs = $dbo->fetchArray('SELECT dir FROM co_tipidocumento INNER JOIN co_documenti ON co_tipidocumento.id=co_documenti.idtipodocumento WHERE co_documenti.id='.prepare($rs_doc[$i]['iddocumento']));
$modulo = ($rs[0]['dir'] == 'entrata') ? 'Fatture di vendita' : 'Fatture di acquisto'; ?> $modulo = ($rs[0]['dir'] == 'entrata') ? 'Fatture di vendita' : 'Fatture di acquisto'; ?>
<li><a href="<?php echo base_path(); ?>/editor.php?id_module=<?php echo Modules::get($modulo)['id']; ?>&id_record=<?php echo $rs_doc[$i]['iddocumento']; ?>" class="dropdown-item"><?php echo tr('Vai alla fattura n. '.$rs_doc[$i]['numero']); ?></a></li> <li><a href="<?php echo base_path(); ?>/editor.php?id_module=<?php echo Modules::get($modulo)['id']; ?>&id_record=<?php echo $rs_doc[$i]['iddocumento']; ?>" class="dropdown-item"><i class="fa fa-chevron-left"></i> <?php echo tr('Vai alla fattura n. '.$rs_doc[$i]['numero']); ?></a></li>
<?php <?php
} ?> } ?>
</ul> </ul>

View File

@ -39,7 +39,7 @@ switch (post('op')) {
} }
if ($n_scadenze > 0) { if ($n_scadenze > 0) {
flash()->info(tr('Distinta aggiornata a _NUM_ scadenze!', [ flash()->info(tr('Info distinta aggiornata a _NUM_ scadenze!', [
'_NUM_' => $n_scadenze, '_NUM_' => $n_scadenze,
])); ]));
} else { } else {
@ -80,11 +80,11 @@ $operations['registrazione-contabile'] = [
]; ];
$operations['change_distinta'] = [ $operations['change_distinta'] = [
'text' => '<span><i class="fa fa-refresh"></i> '.tr('Aggiorna distinta'), 'text' => '<span><i class="fa fa-edit"></i> '.tr('Info distinta'),
'data' => [ 'data' => [
'title' => tr('Aggiornare la distinta per le scadenze selezionate?'), 'title' => tr('Modificare le informazioni della distinta?'),
'msg' => tr('Per ciascuna scadenza selezionata verrà aggiornata la distinta').'.<br> 'msg' => tr('Per ciascuna scadenza selezionata verrà modificata l\'informazione della distinta associata').'.<br>
<br>{[ "type": "text", "label": "'.tr('Distinta').'", "name": "distinta", "required": 1 ]}', <br>{[ "type": "text", "label": "'.tr('Info distinta').'", "name": "distinta", "required": 1 ]}',
'button' => tr('Procedi'), 'button' => tr('Procedi'),
'class' => 'btn btn-lg btn-warning', 'class' => 'btn btn-lg btn-warning',
'blank' => false, 'blank' => false,

View File

@ -86,7 +86,7 @@ if (!empty($documento)) {
</tr> </tr>
<tr> <tr>
<th>'.tr('Distinta').':</th> <th>'.tr('Info distinta').' <span class="tip" title="'.tr("Informazioni/Note sulla distinta associata alla scadenza (es. numero)").'" ><i class="fa fa-question-circle-o" ></i></span>:</th>
<td> <td>
{[ "type": "text", "name": "distinta", "value": "'.$record['distinta'].'" ]} {[ "type": "text", "name": "distinta", "value": "'.$record['distinta'].'" ]}
</td> </td>
@ -118,7 +118,7 @@ if (!empty($documento)) {
echo input([ echo input([
'type' => 'text', 'type' => 'text',
'label' => tr('Distinta'), 'label' => tr('Info distinta'),
'name' => 'distinta', 'name' => 'distinta',
'value' => $scadenza['distinta'], 'value' => $scadenza['distinta'],
]); ]);