2018-02-22 11:07:52 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
include_once __DIR__.'/../../core.php';
|
|
|
|
|
2018-06-26 14:30:26 +02:00
|
|
|
$rs_documento = $dbo->fetchArray('SELECT * FROM co_righe_documenti WHERE idcontratto='.prepare($id_record));
|
|
|
|
if (sizeof($rs_documento) > 0) {
|
|
|
|
echo '
|
|
|
|
<button type="button" class="btn btn-info" disabled>
|
|
|
|
<i class="fa fa-magic"></i> '.tr('Crea fattura').'...
|
2018-03-27 18:34:49 +02:00
|
|
|
</button>';
|
2018-06-26 14:30:26 +02:00
|
|
|
} else {
|
2018-03-27 18:34:49 +02:00
|
|
|
echo "
|
|
|
|
<button type=\"button\" class=\"btn btn-info\" onclick=\"if( confirm('Creare una fattura per questo contratto?') ){fattura_da_contratto();}\">
|
|
|
|
<i class=\"fa fa-magic\"></i> ".tr('Crea fattura').'...
|
|
|
|
</button>';
|
|
|
|
}
|
|
|
|
|
2018-02-22 11:07:52 +01:00
|
|
|
if ($records[0]['rinnovabile']) {
|
|
|
|
echo "
|
|
|
|
<button type=\"button\" class=\"btn btn-warning\" onclick=\"if( confirm('Rinnovare questo contratto?') ){ location.href='".$rootdir.'/editor.php?op=renew&id_module='.$id_module.'&id_record='.$id_record."'; }\">
|
|
|
|
<i class=\"fa fa-refresh\"></i> ".tr('Rinnova').'...
|
|
|
|
</button>';
|
|
|
|
}
|