mirror of
https://github.com/devcode-it/openstamanager.git
synced 2025-06-05 22:09:38 +02:00
Miglioramenti minori
This commit is contained in:
@@ -1,6 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
include_once __DIR__.'/../../core.php';
|
|
||||||
include_once __DIR__.'/init.php';
|
include_once __DIR__.'/init.php';
|
||||||
|
|
||||||
switch (filter('op')) {
|
switch (filter('op')) {
|
||||||
@@ -25,8 +24,4 @@ switch (filter('op')) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'download':
|
|
||||||
download($upload_dir.'/'.$fattura_pa->getFilename());
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
5
plugins/exportFE/download.php
Normal file
5
plugins/exportFE/download.php
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
include_once __DIR__.'/init.php';
|
||||||
|
|
||||||
|
download($upload_dir.'/'.$fattura_pa->getFilename());
|
@@ -1,6 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
include_once __DIR__.'/../../core.php';
|
|
||||||
include_once __DIR__.'/init.php';
|
include_once __DIR__.'/init.php';
|
||||||
|
|
||||||
use Plugins\ExportFE\FatturaElettronica;
|
use Plugins\ExportFE\FatturaElettronica;
|
||||||
@@ -25,6 +24,30 @@ if (!empty($fattura_pa)) {
|
|||||||
$generated = false;
|
$generated = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Campi obbligatori per il pagamento
|
||||||
|
$pagamento = $database->fetchOne('SELECT * FROM `co_pagamenti` WHERE `id` = '.prepare($record['idpagamento']));
|
||||||
|
$fields = [
|
||||||
|
'codice_modalita_pagamento_fe' => 'Codice di pagamento FE',
|
||||||
|
];
|
||||||
|
|
||||||
|
$missing = [];
|
||||||
|
foreach ($fields as $key => $name) {
|
||||||
|
if (empty($pagamento[$key])) {
|
||||||
|
$missing[] = $name;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!empty($missing) && !$generated) {
|
||||||
|
echo '
|
||||||
|
<div class="alert alert-warning">
|
||||||
|
<p><i class="fa fa-warning"></i> '.tr("Prima di procedere alla generazione della fattura elettronica completa i seguenti campi del tipo di pagamento: _FIELDS_", [
|
||||||
|
'_FIELDS_' => '<b>'.implode(', ', $missing).'</b>',
|
||||||
|
]).'</p>
|
||||||
|
</div>';
|
||||||
|
|
||||||
|
$disabled = true;
|
||||||
|
}
|
||||||
|
|
||||||
// Campi obbligatori per l'anagrafica Azienda
|
// Campi obbligatori per l'anagrafica Azienda
|
||||||
$azienda = FatturaElettronica::getAzienda();
|
$azienda = FatturaElettronica::getAzienda();
|
||||||
$fields = [
|
$fields = [
|
||||||
@@ -118,7 +141,7 @@ echo '
|
|||||||
echo '
|
echo '
|
||||||
<i class="fa fa-arrow-right fa-fw text-muted"></i>
|
<i class="fa fa-arrow-right fa-fw text-muted"></i>
|
||||||
|
|
||||||
<a href="'.ROOTDIR.'/editor.php?id_module='.$id_module.'&id_plugin='.$id_plugin.'&id_record='.$id_record.'&op=download" class="btn btn-success btn-lg '.($generated ? '' : 'disabled').'" target="_blank" '.($generated ? '' : 'disabled').'>
|
<a href="'.ROOTDIR.'/plugins/exportFE/download.php?id_record='.$id_record.'" class="btn btn-success btn-lg '.($generated ? '' : 'disabled').'" target="_blank" '.($generated ? '' : 'disabled').'>
|
||||||
<i class="fa fa-download"></i> '.tr('Scarica').'
|
<i class="fa fa-download"></i> '.tr('Scarica').'
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
|
@@ -1,5 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
include_once __DIR__.'/../../core.php';
|
||||||
|
|
||||||
use Plugins\ExportFE\FatturaElettronica;
|
use Plugins\ExportFE\FatturaElettronica;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
@@ -1,6 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
include_once __DIR__.'/../../core.php';
|
|
||||||
include_once __DIR__.'/init.php';
|
include_once __DIR__.'/init.php';
|
||||||
|
|
||||||
echo $fattura_pa;
|
echo $fattura_pa;
|
||||||
|
Reference in New Issue
Block a user