Fix minori

This commit is contained in:
Luca 2018-12-10 18:08:55 +01:00
parent 9f944597bb
commit 905d8a7bdd
3 changed files with 10 additions and 10 deletions

View File

@ -85,7 +85,7 @@ if (str_contains($current_module['option'], '|segment|')) {
</div>
<div class="col-md-6">
{[ "type": "checkbox", "label": "<?php echo tr('Sezionale fiscale'); ?>", "name": "is_fiscale", "value": "$is_fiscale$" ]}
{[ "type": "checkbox", "label": "<?php echo tr('Sezionale fiscale'); ?>", "name": "is_fiscale", "value": "$is_fiscale$", "extra": "<?php echo ($tot > 0) ? 'readonly' : ''; ?>" ]}
</div>
</div>
@ -138,13 +138,6 @@ $list = [
</form>
<?php
$array = preg_match('/(?<=FROM)\s([^\s]+)\s/', $record['options'], $table);
if (strpos($table[0], 'co_documenti') !== false) {
$righe = $dbo->fetchArray('SELECT COUNT(*) AS tot FROM '.$table[0].' WHERE id_segment = '.prepare($id_record));
$tot = $righe[0]['tot'];
}
if ($tot > 0) {
echo "<div class='alert alert-danger' style='margin:0px;'>";

View File

@ -4,4 +4,11 @@ include_once __DIR__.'/../../core.php';
if (isset($id_record)) {
$record = $dbo->fetchOne('SELECT *, (SELECT options FROM zz_modules WHERE id = zz_segments.id_module) options, (SELECT name FROM zz_modules WHERE id = zz_segments.id_module) AS modulo, (SELECT COUNT(t.id) FROM zz_segments t WHERE t.id_module = zz_segments.id_module) AS n_sezionali FROM zz_segments WHERE id='.prepare($id_record));
$array = preg_match('/(?<=FROM)\s([^\s]+)\s/', $record['options'], $table);
if (strpos($table[0], 'co_documenti') !== false) {
$righe = $dbo->fetchArray('SELECT COUNT(*) AS tot FROM '.$table[0].' WHERE id_segment = '.prepare($id_record));
$tot = $righe[0]['tot'];
}
}

View File

@ -30,7 +30,7 @@ class Interaction
return self::$client;
}
public function isEnabled()
public static function isEnabled()
{
return false;
}
@ -58,7 +58,7 @@ class Interaction
$fattura = new FatturaElettronica($id_record);
$file = DOCROOT.'/'.FatturaElettronica::getDirectory().'/'.$fattura->getFilename();
$response = static::request('POST', 'send_fattura', [
$response = static::request('POST', 'send', [
'name' => $fattura->getFilename(),
], [
'multipart' => [