Fix minori

This commit is contained in:
Pek5892 2024-05-09 10:29:53 +02:00
parent 8da9743c29
commit 44a9355477
11 changed files with 69 additions and 71 deletions

View File

@ -48,7 +48,7 @@ $id_anagrafica = $documento_finale->idanagrafica;
echo ' echo '
<div class="row"> <div class="row">
<div class="col-md-12"> <div class="col-md-12">
{[ "type": "select", "label": "'.tr('Ddt').'", "name": "id_documento", "values": "query=SELECT `dt_ddt`.`id`, CONCAT(IF(`numero_esterno` != \'\', `numero_esterno`, `numero`), \' del \', DATE_FORMAT(`data`, \'%d-%m-%Y\')) AS descrizione FROM `dt_ddt` INNER JOIN `dt_statiddt` ON `dt_ddt`.`idstatoddt` = `dt_statiddt`.`id` LEFT JOIN `dt_statiddt_lang` ON (`dt_statiddt`.`id` = `dt_statiddt_lang`.`id_record` AND `dt_statiddt_lang`.`id_lang` = '.prepare(Models\Locale::getDefault()->id).') INNER JOIN `dt_tipiddt` ON `dt_ddt`.`idtipoddt` = `dt_tipiddt`.`id` INNER JOIN `dt_righe_ddt` ON `dt_ddt`.`id` = `dt_righe_ddt`.`idddt` WHERE `dt_statiddt_lang`.`title` IN(\'Evaso\', \'Parzialmente evaso\', \'Parzialmente fatturato\') AND `dt_tipiddt`.`dir`='.prepare($dir == "entrata" ? "uscita" : "entrata").' AND (`dt_righe_ddt`.`qta` - `dt_righe_ddt`.`qta_evasa`) > 0 ORDER BY `data` DESC, `numero` DESC" ]} {[ "type": "select", "label": "'.tr('Ddt').'", "name": "id_documento", "values": "query=SELECT `dt_ddt`.`id`, CONCAT(IF(`numero_esterno` != \'\', `numero_esterno`, `numero`), \' del \', DATE_FORMAT(`data`, \'%d-%m-%Y\')) AS descrizione FROM `dt_ddt` INNER JOIN `dt_statiddt` ON `dt_ddt`.`idstatoddt` = `dt_statiddt`.`id` LEFT JOIN `dt_statiddt_lang` ON (`dt_statiddt`.`id` = `dt_statiddt_lang`.`id_record` AND `dt_statiddt_lang`.`id_lang` = '.prepare(Models\Locale::getDefault()->id).') INNER JOIN `dt_tipiddt` ON `dt_ddt`.`idtipoddt` = `dt_tipiddt`.`id` INNER JOIN `dt_righe_ddt` ON `dt_ddt`.`id` = `dt_righe_ddt`.`idddt` WHERE `dt_statiddt_lang`.`title` IN(\'Evaso\', \'Parzialmente evaso\', \'Parzialmente fatturato\') AND `dt_tipiddt`.`dir`='.prepare($dir == 'entrata' ? 'uscita' : 'entrata').' AND (`dt_righe_ddt`.`qta` - `dt_righe_ddt`.`qta_evasa`) > 0 ORDER BY `data` DESC, `numero` DESC" ]}
</div> </div>
</div> </div>

View File

@ -799,7 +799,7 @@ class Fattura extends Document
$pagamento = $this->pagamento; $pagamento = $this->pagamento;
if ($pagamento->isRiBa()) { if ($pagamento->isRiBa()) {
$banca = Banca::find($this->id_banca_controparte) ?: Banca::where('id_anagrafica', $this->idanagrafica)->where('predefined', 1)->first();; $banca = Banca::find($this->id_banca_controparte) ?: Banca::where('id_anagrafica', $this->idanagrafica)->where('predefined', 1)->first();
} else { } else {
$banca = Banca::find($this->id_banca_azienda); $banca = Banca::find($this->id_banca_azienda);
} }

View File

@ -20,15 +20,15 @@
include_once __DIR__.'/../../core.php'; include_once __DIR__.'/../../core.php';
use Carbon\Carbon; use Carbon\Carbon;
use Models\Upload;
use Models\Module; use Models\Module;
use Models\Upload;
use Modules\Anagrafiche\Anagrafica; use Modules\Anagrafiche\Anagrafica;
use Modules\Anagrafiche\Sede; use Modules\Anagrafiche\Sede;
use Modules\Contratti\Contratto; use Modules\Contratti\Contratto;
use Modules\Interventi\Intervento; use Modules\Interventi\Intervento;
use Modules\Scadenzario\Scadenza;
use Modules\Preventivi\Preventivo;
use Modules\Ordini\Ordine; use Modules\Ordini\Ordine;
use Modules\Preventivi\Preventivo;
use Modules\Scadenzario\Scadenza;
// Anagrafica // Anagrafica
$anagrafica = $intervento->anagrafica; $anagrafica = $intervento->anagrafica;

View File

@ -19,9 +19,9 @@
include_once __DIR__.'/../../core.php'; include_once __DIR__.'/../../core.php';
use Models\PrintTemplate;
use Models\Module; use Models\Module;
use Models\OperationLog; use Models\OperationLog;
use Models\PrintTemplate;
use Modules\Anagrafiche\Anagrafica; use Modules\Anagrafiche\Anagrafica;
use Modules\Emails\Mail; use Modules\Emails\Mail;
use Modules\Emails\Template; use Modules\Emails\Template;

View File

@ -19,8 +19,6 @@
include_once __DIR__.'/../../core.php'; include_once __DIR__.'/../../core.php';
if (!empty($id_record)) { if (!empty($id_record)) {
$record = $dbo->fetchOne('SELECT * FROM `in_tags` WHERE `in_tags`.`id`='.prepare($id_record)); $record = $dbo->fetchOne('SELECT * FROM `in_tags` WHERE `in_tags`.`id`='.prepare($id_record));
} }

View File

@ -553,7 +553,7 @@ class Gestore
protected static function cleanString($string) protected static function cleanString($string)
{ {
// sostituisci tutti i caratteri accentati con la versione non accentata // sostituisci tutti i caratteri accentati con la versione non accentata
$replace = array( $replace = [
'ъ' => '-', 'Ь' => '-', 'Ъ' => '-', 'ь' => '-', 'ъ' => '-', 'Ь' => '-', 'Ъ' => '-', 'ь' => '-',
'Ă' => 'A', 'Ą' => 'A', 'À' => 'A', 'Ã' => 'A', 'Á' => 'A', 'Æ' => 'A', 'Â' => 'A', 'Å' => 'A', 'Ä' => 'Ae', 'Ă' => 'A', 'Ą' => 'A', 'À' => 'A', 'Ã' => 'A', 'Á' => 'A', 'Æ' => 'A', 'Â' => 'A', 'Å' => 'A', 'Ä' => 'Ae',
'Þ' => 'B', 'Þ' => 'B',
@ -593,8 +593,8 @@ class Gestore
'в' => 'v', 'ו' => 'v', 'В' => 'v', 'в' => 'v', 'ו' => 'v', 'В' => 'v',
'ש' => 'w', 'ŵ' => 'w', 'Ŵ' => 'w', 'ש' => 'w', 'ŵ' => 'w', 'Ŵ' => 'w',
'ы' => 'y', 'ŷ' => 'y', 'ý' => 'y', 'ÿ' => 'y', 'Ÿ' => 'y', 'Ŷ' => 'y', 'ы' => 'y', 'ŷ' => 'y', 'ý' => 'y', 'ÿ' => 'y', 'Ÿ' => 'y', 'Ŷ' => 'y',
'Ы'=>'y', 'ž'=>'z', 'З'=>'z', 'з'=>'z', 'ź'=>'z', 'ז'=>'z', 'ż'=>'z', 'ſ'=>'z', 'Ж'=>'zh', 'ж'=>'zh' 'Ы' => 'y', 'ž' => 'z', 'З' => 'z', 'з' => 'z', 'ź' => 'z', 'ז' => 'z', 'ż' => 'z', 'ſ' => 'z', 'Ж' => 'zh', 'ж' => 'zh',
); ];
$unaccentedString = strtr($string, $replace); $unaccentedString = strtr($string, $replace);