mirror of
https://github.com/devcode-it/openstamanager.git
synced 2025-06-05 22:09:38 +02:00
Merge branch 'master' into revisione-banche
This commit is contained in:
@@ -86,7 +86,7 @@ echo '
|
||||
|
||||
<i class="fa fa-arrow-right fa-fw text-muted"></i>
|
||||
|
||||
<a href="'.ROOTDIR.'/view.php?file_id='.($file ? $file->id : null).'" class="btn btn-info btn-lg '.($generated ? '' : 'disabled').'" target="_blank" '.($generated ? '' : 'disabled').'>
|
||||
<a href="'.base_path().'/view.php?file_id='.($file ? $file->id : null).'" class="btn btn-info btn-lg '.($generated ? '' : 'disabled').'" target="_blank" '.($generated ? '' : 'disabled').'>
|
||||
<i class="fa fa-eye"></i> '.tr('Visualizza').'
|
||||
</a>';
|
||||
|
||||
@@ -143,7 +143,7 @@ if (!empty($record['codice_stato_fe'])) {
|
||||
|
||||
if (!empty($ultima_ricevuta)) {
|
||||
echo '
|
||||
<a href="'.ROOTDIR.'/view.php?file_id='.$ultima_ricevuta->id.'" target="_blank" class="btn btn-info btn-xs">
|
||||
<a href="'.base_path().'/view.php?file_id='.$ultima_ricevuta->id.'" target="_blank" class="btn btn-info btn-xs">
|
||||
<i class="fa fa-external-link"></i> '.tr('Visualizza ricevuta').'
|
||||
</a>';
|
||||
}
|
||||
|
@@ -26,4 +26,4 @@ try {
|
||||
} catch (UnexpectedValueException $e) {
|
||||
}
|
||||
|
||||
$upload_dir = DOCROOT.'/'.FatturaElettronica::getDirectory();
|
||||
$upload_dir = base_dir().'/'.FatturaElettronica::getDirectory();
|
||||
|
@@ -85,7 +85,7 @@ class FatturaElettronica
|
||||
{
|
||||
$documento = $this->getDocumento();
|
||||
|
||||
return !empty($documento['progressivo_invio']) && file_exists(DOCROOT.'/'.static::getDirectory().'/'.$this->getFilename());
|
||||
return !empty($documento['progressivo_invio']) && file_exists(base_dir().'/'.static::getDirectory().'/'.$this->getFilename());
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1185,8 +1185,8 @@ class FatturaElettronica
|
||||
$descrizione = str_replace('’', ' ', $descrizione);
|
||||
|
||||
// Aggiunta dei riferimenti ai documenti
|
||||
if (setting('Riferimento dei documenti in Fattura Elettronica') && $riga->hasOriginal()) {
|
||||
$descrizione .= "\n".$riga->getOriginal()->parent->getReference();
|
||||
if (setting('Riferimento dei documenti in Fattura Elettronica') && $riga->hasOriginalComponent()) {
|
||||
$descrizione .= "\n".$riga->getOriginalComponent()->getDocument()->getReference();
|
||||
}
|
||||
|
||||
$dettaglio['Descrizione'] = $descrizione;
|
||||
@@ -1454,7 +1454,7 @@ class FatturaElettronica
|
||||
// Inclusione
|
||||
foreach ($allegati as $allegato) {
|
||||
if ($allegato['category'] == 'Allegati Fattura Elettronica') {
|
||||
$file = DOCROOT.'/'.$directory.'/'.$allegato['filename'];
|
||||
$file = base_dir().'/'.$directory.'/'.$allegato['filename'];
|
||||
|
||||
$attachments[] = [
|
||||
'NomeAttachment' => $allegato['name'],
|
||||
@@ -1482,7 +1482,7 @@ class FatturaElettronica
|
||||
$dir = static::getDirectory();
|
||||
|
||||
$print = Prints::getModulePredefinedPrint($id_module);
|
||||
$info = Prints::render($print['id'], $documento['id'], DOCROOT.'/'.$dir);
|
||||
$info = Prints::render($print['id'], $documento['id'], base_dir().'/'.$dir);
|
||||
|
||||
$name = 'Stampa allegata';
|
||||
$is_presente = database()->fetchNum('SELECT id FROM zz_files WHERE id_module = '.prepare($id_module).' AND id_record = '.prepare($documento['id']).' AND name = '.prepare($name));
|
||||
|
@@ -33,7 +33,7 @@ class Interaction extends Services
|
||||
{
|
||||
try {
|
||||
$fattura = new FatturaElettronica($id_record);
|
||||
$file = DOCROOT.'/'.FatturaElettronica::getDirectory().'/'.$fattura->getFilename();
|
||||
$file = base_dir().'/'.FatturaElettronica::getDirectory().'/'.$fattura->getFilename();
|
||||
|
||||
$response = static::request('POST', 'invio_fattura_xml', [
|
||||
'xml' => file_get_contents($file),
|
||||
|
Reference in New Issue
Block a user