mirror of
https://github.com/devcode-it/openstamanager.git
synced 2025-02-27 16:57:38 +01:00
Merge branch 'master' of https://github.com/devcode-it/openstamanager
This commit is contained in:
commit
be0a8f00c6
@ -174,16 +174,18 @@ foreach ($settings as $name => $values) {
|
||||
}
|
||||
|
||||
// MySQL
|
||||
$db = [
|
||||
if ($database->isInstalled()){
|
||||
$db = [
|
||||
|
||||
'mysql_version' => [
|
||||
'type' => 'mysql',
|
||||
'description' => '5.7.x - 8.0.x',
|
||||
'minimum' => '5.7.0',
|
||||
'maximum' => '8.0.99',
|
||||
],
|
||||
'mysql_version' => [
|
||||
'type' => 'mysql',
|
||||
'description' => '5.7.x - 8.0.x',
|
||||
'minimum' => '5.7.0',
|
||||
'maximum' => '8.0.99',
|
||||
],
|
||||
|
||||
];
|
||||
];
|
||||
}
|
||||
|
||||
foreach ($db as $name => $values) {
|
||||
$description = $values['description'];
|
||||
@ -222,6 +224,7 @@ foreach ($dirs as $name => $description) {
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
$requirements = [
|
||||
tr('Apache') => $apache,
|
||||
tr('PHP (_VERSION_ _SUPPORTED_)', [
|
||||
@ -232,6 +235,10 @@ $requirements = [
|
||||
tr('Percorsi di servizio') => $directories,
|
||||
];
|
||||
|
||||
if (!$database->isInstalled() || empty($mysql)){
|
||||
unset($requirements['MySQL']);
|
||||
}
|
||||
|
||||
|
||||
// Tabelle di riepilogo
|
||||
foreach ($requirements as $key => $values) {
|
||||
|
@ -28,31 +28,48 @@ include_once __DIR__.'/../../core.php';
|
||||
|
||||
<div class="row">
|
||||
<?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');
|
||||
|
||||
if (sizeof($rs_doc) > 0) {
|
||||
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']));
|
||||
$modulo = ($rs[0]['dir'] == 'entrata') ? 'Fatture di vendita' : 'Fatture di acquisto'; ?>
|
||||
<div class=" col-md-2">
|
||||
|
||||
<div class="col-md-2">
|
||||
<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>
|
||||
<?php
|
||||
} else {
|
||||
?>
|
||||
<div class=" col-md-2">
|
||||
<div class="col-md-2">
|
||||
<br>
|
||||
<div class="dropdown">
|
||||
<button class="btn btn-primary dropdown-toggle" type="button" data-toggle="dropdown" style="width:100%;">Fatture collegate
|
||||
<span class="caret"></span></button>
|
||||
<div class="btn-group">
|
||||
|
||||
|
||||
<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">
|
||||
<?php
|
||||
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']));
|
||||
$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
|
||||
} ?>
|
||||
</ul>
|
||||
|
@ -39,7 +39,7 @@ switch (post('op')) {
|
||||
}
|
||||
|
||||
if ($n_scadenze > 0) {
|
||||
flash()->info(tr('Distinta aggiornata a _NUM_ scadenze!', [
|
||||
flash()->info(tr('Info distinta aggiornata a _NUM_ scadenze!', [
|
||||
'_NUM_' => $n_scadenze,
|
||||
]));
|
||||
} else {
|
||||
@ -80,11 +80,11 @@ $operations['registrazione-contabile'] = [
|
||||
];
|
||||
|
||||
$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' => [
|
||||
'title' => tr('Aggiornare la distinta per le scadenze selezionate?'),
|
||||
'msg' => tr('Per ciascuna scadenza selezionata verrà aggiornata la distinta').'.<br>
|
||||
<br>{[ "type": "text", "label": "'.tr('Distinta').'", "name": "distinta", "required": 1 ]}',
|
||||
'title' => tr('Modificare le informazioni della distinta?'),
|
||||
'msg' => tr('Per ciascuna scadenza selezionata verrà modificata l\'informazione della distinta associata').'.<br>
|
||||
<br>{[ "type": "text", "label": "'.tr('Info distinta').'", "name": "distinta", "required": 1 ]}',
|
||||
'button' => tr('Procedi'),
|
||||
'class' => 'btn btn-lg btn-warning',
|
||||
'blank' => false,
|
||||
|
@ -86,7 +86,7 @@ if (!empty($documento)) {
|
||||
</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>
|
||||
{[ "type": "text", "name": "distinta", "value": "'.$record['distinta'].'" ]}
|
||||
</td>
|
||||
@ -118,7 +118,7 @@ if (!empty($documento)) {
|
||||
|
||||
echo input([
|
||||
'type' => 'text',
|
||||
'label' => tr('Distinta'),
|
||||
'label' => tr('Info distinta'),
|
||||
'name' => 'distinta',
|
||||
'value' => $scadenza['distinta'],
|
||||
]);
|
||||
|
Loading…
x
Reference in New Issue
Block a user