1
0
mirror of https://github.com/devcode-it/openstamanager.git synced 2024-12-12 08:26:20 +01:00
openstamanager/plugins/rinnovi_contratti/edit.php

58 lines
2.2 KiB
PHP
Raw Normal View History

2019-07-08 10:21:35 +02:00
<?php
2020-09-07 15:04:06 +02:00
/*
* OpenSTAManager: il software gestionale open source per l'assistenza tecnica e la fatturazione
* Copyright (C) DevCode s.n.c.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
2019-07-08 10:21:35 +02:00
2019-07-09 18:29:40 +02:00
include_once __DIR__.'/../../core.php';
2019-07-08 10:21:35 +02:00
$id_contratto_precedente = $record['idcontratto_prev'];
2019-07-08 12:25:51 +02:00
if (empty($id_contratto_precedente)) {
2019-07-08 10:21:35 +02:00
echo '
<script>$("#link-tab_'.$plugin['id'].'").addClass("disabled");</script>';
}
echo '
<table class="table table-hover table-condensed table-bordered table-striped">
<tr>
<th>'.tr('Descrizione').'</th>
<th width="100">'.tr('Totale').'</th>
<th width="150">'.tr('Data inizio').'</th>
<th width="150">'.tr('Data conclusione').'</th>
</tr>';
while (!empty($id_contratto_precedente)) {
$rs = $dbo->fetchArray('SELECT nome, numero, data_accettazione, data_conclusione, budget, idcontratto_prev FROM co_contratti WHERE id='.prepare($id_contratto_precedente));
2019-07-08 12:25:51 +02:00
echo '
2019-07-08 10:21:35 +02:00
<tr>
<td>
'.Modules::link($id_module, $id_contratto_precedente, tr('Contratto num. _NUM_', [
'_NUM_' => $rs[0]['numero'],
]).'<br><small class="text-muted">'.$rs[0]['nome'].'</small>').'
</td>
<td class="text-right">'.moneyFormat($rs[0]['budget']).'</td>
2019-07-08 10:21:35 +02:00
<td align="center">'.Translator::dateToLocale($rs[0]['data_accettazione']).'</td>
<td align="center">'.Translator::dateToLocale($rs[0]['data_conclusione']).'</td>
</tr>';
$id_contratto_precedente = $rs[0]['idcontratto_prev'];
}
echo '
</table>';