mirror of
https://github.com/devcode-it/openstamanager.git
synced 2025-02-16 11:30:55 +01:00
Plugin Asssicurazione crediti
This commit is contained in:
parent
246f0e8295
commit
7de3170635
@ -114,6 +114,7 @@
|
||||
"Modules\\Partitario\\": ["modules/partitario/custom/src/", "modules/partitario/src/"],
|
||||
"Modules\\StatoEmail\\": ["modules/stato_email/custom/src/", "modules/stato_email/src/"],
|
||||
"Modules\\FileAdapters\\": ["modules/adattatori_archiviazione/custom/src/", "modules/adattatori_archiviazione/src/"],
|
||||
"Plugins\\AssicurazioneCrediti\\": ["plugins/assicurazione_crediti/custom/src/", "plugins/assicurazione_crediti/src/"],
|
||||
"Plugins\\ExportFE\\": ["plugins/exportFE/custom/src/", "plugins/exportFE/src/"],
|
||||
"Plugins\\ImportFE\\": ["plugins/importFE/custom/src/", "plugins/importFE/src/"],
|
||||
"Plugins\\ReceiptFE\\": ["plugins/receiptFE/custom/src/", "plugins/receiptFE/src/"],
|
||||
|
@ -28,6 +28,7 @@ use Modules\Fatture\Stato as StatoFattura;
|
||||
use Modules\Interventi\Intervento;
|
||||
use Modules\Iva\Aliquota;
|
||||
use Modules\Ordini\Stato as StatoOrdine;
|
||||
use Plugins\AssicurazioneCrediti\AssicurazioneCrediti;
|
||||
use Plugins\ExportFE\Interaction;
|
||||
|
||||
include_once __DIR__.'/../../core.php';
|
||||
@ -172,6 +173,17 @@ if ($dir == 'entrata' && $fattura->stato->id == $id_stato_bozza) {
|
||||
<i class="fa fa-info"></i> '.tr("Questa è una fattura per conto di terzi. Nell'XML della Fattura Elettronica sarà indicato il fornitore _FORNITORE_ come cessionario e il cliente come cedente/prestatore", ['_FORNITORE_' => '"<b>'.stripslashes($database->fetchOne('SELECT ragione_sociale FROM an_anagrafiche WHERE idanagrafica = '.prepare(setting('Azienda predefinita')))['ragione_sociale']).'</b>"']).'.</b>
|
||||
</div>';
|
||||
}
|
||||
|
||||
$assicurazione_crediti = AssicurazioneCrediti::where('id_anagrafica', $fattura->idanagrafica)->where('data_inizio', '<=', $fattura->data)->where('data_fine', '>=', $fattura->data)->first();
|
||||
if (!empty($assicurazione_crediti)) {
|
||||
if (($assicurazione_crediti->totale + $fattura->totale) >= $assicurazione_crediti->fido_assicurato) {
|
||||
echo '
|
||||
<div class="alert alert-warning text-center">
|
||||
<i class="fa fa-exclamation-triangle"></i> '.tr("Attenzone! Il fido assicurato per questo cliente è stato superato!").'<br>('.moneyFormat(($assicurazione_crediti->totale + $fattura->totale), 2).' / '.moneyFormat($assicurazione_crediti->fido_assicurato, 2).')
|
||||
'.Plugins::link('Assicurazione crediti', $fattura->idanagrafica).'
|
||||
</div>';
|
||||
}
|
||||
}
|
||||
}
|
||||
// Verifica aggiuntive sulla sequenzialità dei numeri
|
||||
if ($dir == 'entrata') {
|
||||
|
@ -21,6 +21,7 @@ namespace Modules\Fatture\Gestori;
|
||||
|
||||
use Modules\Fatture\Fattura;
|
||||
use Modules\Scadenzario\Scadenza;
|
||||
use Plugins\AssicurazioneCrediti\AssicurazioneCrediti;
|
||||
use Plugins\ImportFE\FatturaElettronica as FatturaElettronicaImport;
|
||||
use Util\XML;
|
||||
|
||||
@ -88,7 +89,20 @@ class Scadenze
|
||||
*/
|
||||
public function rimuovi()
|
||||
{
|
||||
$scadenze = $this->fattura->scadenze;
|
||||
foreach ($scadenze as $scadenza) {
|
||||
$assicurazione_crediti = AssicurazioneCrediti::where('id_anagrafica', $scadenza->idanagrafica)->where('data_inizio', '<=', $scadenza->scadenza)->where('data_fine', '>=', $scadenza->scadenza)->first();
|
||||
if (!empty($assicurazione_crediti)) {
|
||||
$assicurazioni[] = $assicurazione_crediti;
|
||||
}
|
||||
}
|
||||
|
||||
database()->delete('co_scadenziario', ['iddocumento' => $this->fattura->id]);
|
||||
|
||||
foreach ($assicurazioni as $assicurazione) {
|
||||
$assicurazione->fixTotale();
|
||||
$assicurazione->save();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@ -111,6 +125,12 @@ class Scadenze
|
||||
$scadenza->data_emissione = $fattura->data;
|
||||
|
||||
$scadenza->save();
|
||||
|
||||
$assicurazione_crediti = AssicurazioneCrediti::where('id_anagrafica', $scadenza->idanagrafica)->where('data_inizio', '<=', $scadenza->scadenza)->where('data_fine', '>=', $scadenza->scadenza)->first();
|
||||
if (!empty($assicurazione_crediti)) {
|
||||
$assicurazione_crediti->fixTotale();
|
||||
$assicurazione_crediti->save();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -23,6 +23,7 @@ use Models\Module;
|
||||
use Models\PrintTemplate;
|
||||
use Modules\Fatture\Tipo;
|
||||
use Modules\Scadenzario\Scadenza;
|
||||
use Plugins\AssicurazioneCrediti\AssicurazioneCrediti;
|
||||
|
||||
switch (post('op')) {
|
||||
case 'add':
|
||||
@ -37,6 +38,12 @@ switch (post('op')) {
|
||||
$dbo->query('INSERT INTO co_scadenziario(idanagrafica, iddocumento, descrizione, tipo, data_emissione, scadenza, da_pagare, pagato) VALUES('.prepare($idanagrafica).', '.prepare($iddocumento).', '.prepare($descrizione).', '.prepare($tipo).', '.prepare($data_emissione).', '.prepare($data).', '.prepare($da_pagare).", '0')");
|
||||
$id_record = $dbo->lastInsertedID();
|
||||
|
||||
$assicurazione_crediti = AssicurazioneCrediti::where('id_anagrafica', $idanagrafica)->where('data_inizio', '<=', $data)->where('data_fine', '>=', $data)->first();
|
||||
if (!empty($assicurazione_crediti)) {
|
||||
$assicurazione_crediti->fixTotale();
|
||||
$assicurazione_crediti->save();
|
||||
}
|
||||
|
||||
flash()->info(tr('Scadenza inserita!'));
|
||||
break;
|
||||
|
||||
@ -127,6 +134,12 @@ switch (post('op')) {
|
||||
if ($pagato != $da_pagare) {
|
||||
$id_scadenza_non_completa = $id_scadenza;
|
||||
}
|
||||
|
||||
$assicurazione_crediti = AssicurazioneCrediti::where('id_anagrafica', $idanagrafica)->where('data_inizio', '<=', $scadenza)->where('data_fine', '>=', $scadenza)->first();
|
||||
if (!empty($assicurazione_crediti)) {
|
||||
$assicurazione_crediti->fixTotale();
|
||||
$assicurazione_crediti->save();
|
||||
}
|
||||
}
|
||||
|
||||
flash()->info(tr('Scadenze aggiornate!'));
|
||||
@ -134,8 +147,18 @@ switch (post('op')) {
|
||||
break;
|
||||
|
||||
case 'delete':
|
||||
$scadenza = Scadenza::find($id_record);
|
||||
$assicurazione_crediti = AssicurazioneCrediti::where('id_anagrafica', $scadenza->idanagrafica)->where('data_inizio', '<=', $scadenza->scadenza)->where('data_fine', '>=', $scadenza->scadenza)->first();
|
||||
|
||||
$dbo->query("DELETE FROM co_scadenziario WHERE id='".$id_record."'");
|
||||
|
||||
if (!empty($assicurazione_crediti)) {
|
||||
$assicurazione_crediti->fixTotale();
|
||||
$assicurazione_crediti->save();
|
||||
}
|
||||
|
||||
flash()->info(tr('Scadenza eliminata!'));
|
||||
|
||||
break;
|
||||
|
||||
case 'allega_fattura':
|
||||
|
53
plugins/assicurazione_crediti/actions.php
Normal file
53
plugins/assicurazione_crediti/actions.php
Normal file
@ -0,0 +1,53 @@
|
||||
<?php
|
||||
/*
|
||||
* OpenSTAManager: il software gestionale open source per l'assistenza tecnica e la fatturazione
|
||||
* Copyright (C) DevCode s.r.l.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
use Modules\Anagrafiche\Anagrafica;
|
||||
use Plugins\AssicurazioneCrediti\AssicurazioneCrediti;
|
||||
|
||||
include_once __DIR__.'/../../core.php';
|
||||
|
||||
$operazione = filter('op');
|
||||
|
||||
switch ($operazione) {
|
||||
case 'add':
|
||||
$anagrafica = Anagrafica::find($id_parent);
|
||||
$assicurazione_crediti = AssicurazioneCrediti::build($anagrafica, post('fido_assicurato'), post('data_inizio'), post('data_fine'));
|
||||
$assicurazione_crediti->save();
|
||||
|
||||
flash()->info(tr("Assicurazione crediti aggiunta!"));
|
||||
|
||||
break;
|
||||
|
||||
case 'update':
|
||||
$assicurazione_crediti->data_inizio = post('data_inizio');
|
||||
$assicurazione_crediti->data_fine = post('data_fine');
|
||||
$assicurazione_crediti->fido_assicurato = post('fido_assicurato');
|
||||
$assicurazione_crediti->save();
|
||||
|
||||
flash()->info(tr("Assicurazione crediti aggiornata!"));
|
||||
|
||||
break;
|
||||
|
||||
case 'delete':
|
||||
$assicurazione_crediti->delete();
|
||||
|
||||
flash()->info(tr("Assicurazione crediti eliminata!"));
|
||||
|
||||
break;
|
||||
}
|
51
plugins/assicurazione_crediti/add.php
Normal file
51
plugins/assicurazione_crediti/add.php
Normal file
@ -0,0 +1,51 @@
|
||||
<?php
|
||||
/*
|
||||
* OpenSTAManager: il software gestionale open source per l'assistenza tecnica e la fatturazione
|
||||
* Copyright (C) DevCode s.r.l.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
include_once __DIR__.'/../../core.php';
|
||||
|
||||
echo '
|
||||
<form action="" method="post" role="form">
|
||||
<input type="hidden" name="id_parent" value="'.$id_parent.'">
|
||||
<input type="hidden" name="backto" value="record-edit">
|
||||
<input type="hidden" name="op" value="add">
|
||||
|
||||
<!-- Fix creazione da Anagrafica -->
|
||||
<input type="hidden" name="id_record" value="0">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
{[ "type": "date", "label": "'.tr('Data inizio').'", "name": "data_inizio", "required": 1 ]}
|
||||
</div>
|
||||
|
||||
<div class="col-md-4">
|
||||
{[ "type": "date", "label": "'.tr('Data fine').'", "name": "data_fine", "required": 1 ]}
|
||||
</div>
|
||||
|
||||
<div class="col-md-4">
|
||||
{[ "type": "number", "label": "'.tr('Fido assicurato').'", "name": "fido_assicurato", "required": 1, "icon-after": "'.currency().'" ]}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- PULSANTI -->
|
||||
<div class="row">
|
||||
<div class="col-md-12 text-right">
|
||||
<button type="submit" class="btn btn-primary"><i class="fa fa-plus"></i> '.tr('Aggiungi').'</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>';
|
63
plugins/assicurazione_crediti/edit.php
Normal file
63
plugins/assicurazione_crediti/edit.php
Normal file
@ -0,0 +1,63 @@
|
||||
<?php
|
||||
/*
|
||||
* OpenSTAManager: il software gestionale open source per l'assistenza tecnica e la fatturazione
|
||||
* Copyright (C) DevCode s.r.l.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
include_once __DIR__.'/../../core.php';
|
||||
|
||||
echo '
|
||||
<form action="" method="post" role="form" id="form_sedi">
|
||||
<input type="hidden" name="id_plugin" value="'.$id_plugin.'">
|
||||
<input type="hidden" name="id_parent" value="'.$id_parent.'">
|
||||
<input type="hidden" name="id_record" value="'.$record['id'].'">
|
||||
<input type="hidden" name="backto" value="record-edit">
|
||||
<input type="hidden" name="op" value="update">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
{[ "type": "date", "label": "'.tr('Data inizio').'", "name": "data_inizio", "value": "'.$record['data_inizio'].'", "required": 1 ]}
|
||||
</div>
|
||||
|
||||
<div class="col-md-4">
|
||||
{[ "type": "date", "label": "'.tr('Data fine').'", "name": "data_fine", "value": "'.$record['data_fine'].'", "required": 1 ]}
|
||||
</div>
|
||||
|
||||
<div class="col-md-4">
|
||||
{[ "type": "number", "label": "'.tr('Fido assicurato').'", "name": "fido_assicurato", "value": "'.$record['fido_assicurato'].'", "required": 1, "icon-after": "'.currency().'" ]}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<span class="pull-right" ><b>'.tr('Totale utilizzato').':</b> '.moneyFormat($record['totale']).'</span>
|
||||
</div>
|
||||
<div class="clearfix"> </div>
|
||||
</div>
|
||||
|
||||
<!-- PULSANTI -->
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<a class="btn btn-danger ask" data-backto="record-edit" data-op="delete" data-id_record="'.$record['id'].'" data-id_plugin="'.$id_plugin.'" data-id_parent="'.$id_parent.'">
|
||||
<i class="fa fa-trash"></i> '.tr('Elimina').'
|
||||
</a>
|
||||
|
||||
<button type="submit" class="btn btn-primary pull-right">
|
||||
<i class="fa fa-edit"></i> '.tr('Modifica').'
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>';
|
28
plugins/assicurazione_crediti/init.php
Normal file
28
plugins/assicurazione_crediti/init.php
Normal file
@ -0,0 +1,28 @@
|
||||
<?php
|
||||
/*
|
||||
* OpenSTAManager: il software gestionale open source per l'assistenza tecnica e la fatturazione
|
||||
* Copyright (C) DevCode s.r.l.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
use Plugins\AssicurazioneCrediti\AssicurazioneCrediti;
|
||||
|
||||
include_once __DIR__.'/../../core.php';
|
||||
|
||||
if (isset($id_record)) {
|
||||
$assicurazione_crediti = AssicurazioneCrediti::find($id_record);
|
||||
|
||||
$record = $assicurazione_crediti ? $assicurazione_crediti->toArray() : [];
|
||||
}
|
77
plugins/assicurazione_crediti/src/AssicurazioneCrediti.php
Normal file
77
plugins/assicurazione_crediti/src/AssicurazioneCrediti.php
Normal file
@ -0,0 +1,77 @@
|
||||
<?php
|
||||
/*
|
||||
* OpenSTAManager: il software gestionale open source per l'assistenza tecnica e la fatturazione
|
||||
* Copyright (C) DevCode s.r.l.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
namespace Plugins\AssicurazioneCrediti;
|
||||
|
||||
use Common\SimpleModelTrait;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Modules\Anagrafiche\Anagrafica;
|
||||
use Modules\Scadenzario\Scadenza;
|
||||
|
||||
/*
|
||||
* Classe per la gestione delle assicurazioni crediti.
|
||||
*
|
||||
* @since 2.4.11
|
||||
*/
|
||||
class AssicurazioneCrediti extends Model
|
||||
{
|
||||
use SimpleModelTrait;
|
||||
|
||||
protected $table = 'an_assicurazione_crediti';
|
||||
|
||||
/**
|
||||
* Registra una nuova assicurazione crediti.
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
public static function build(?Anagrafica $anagrafica = null, $fido_assicurato = null, $data_inizio = null, $data_fine = null)
|
||||
{
|
||||
$model = new static();
|
||||
|
||||
$model->anagrafica()->associate($anagrafica);
|
||||
$model->data_inizio = $data_inizio;
|
||||
$model->data_fine = $data_fine;
|
||||
$model->fido_assicurato = $fido_assicurato;
|
||||
|
||||
$model->save();
|
||||
|
||||
return $model;
|
||||
}
|
||||
|
||||
/**
|
||||
* Metodo per ricalcolare il totale utlizzato della dichiarazione.
|
||||
*/
|
||||
public function fixTotale()
|
||||
{
|
||||
$scadenze = Scadenza::where('idanagrafica', $this->id_anagrafica)->where('scadenza', '>=', $this->data_inizio)->where('scadenza', '<=', $this->data_fine)->get();
|
||||
$totale = 0;
|
||||
foreach ($scadenze as $scadenza) {
|
||||
$totale += $scadenza->da_pagare - $scadenza->pagato;
|
||||
}
|
||||
|
||||
$this->totale = $totale;
|
||||
}
|
||||
|
||||
// Relazioni Eloquent
|
||||
|
||||
public function anagrafica()
|
||||
{
|
||||
return $this->belongsTo(Anagrafica::class, 'id_anagrafica');
|
||||
}
|
||||
}
|
@ -961,3 +961,10 @@ UPDATE `zz_plugins` SET `options` = ' { "main_query": [ { "type": "table", "fie
|
||||
|
||||
-- Fix plugin Ddt del cliente
|
||||
UPDATE `zz_plugins` SET `options` = '{ \"main_query\": [ { \"type\": \"table\", \"fields\": \"Numero, Data, Descrizione, Qtà\", \"query\": \"SELECT dt_ddt.id, IF(dt_tipiddt.dir = \'entrata\', (SELECT `id` FROM `zz_modules` WHERE `name` = \'Ddt di vendita\'), (SELECT `id` FROM `zz_modules` WHERE `name` = \'Ddt di acquisto\')) AS _link_module_, dt_ddt.id AS _link_record_, IF(dt_ddt.numero_esterno = \'\', dt_ddt.numero, dt_ddt.numero_esterno) AS Numero, DATE_FORMAT(dt_ddt.data, \'%d/%m/%Y\') AS Data, dt_righe_ddt.descrizione AS `Descrizione`, REPLACE(REPLACE(REPLACE(FORMAT(dt_righe_ddt.qta, 2), \',\', \'#\'), \'.\', \',\'), \'#\', \'.\') AS `Qtà` FROM dt_ddt LEFT JOIN dt_righe_ddt ON dt_ddt.id=dt_righe_ddt.idddt JOIN dt_tipiddt ON dt_ddt.idtipoddt = dt_tipiddt.id WHERE dt_ddt.idanagrafica=|id_parent| HAVING 2=2 ORDER BY dt_ddt.id DESC\"} ]}' WHERE `zz_plugins`.`name` = 'Ddt del cliente';
|
||||
|
||||
-- Plugin Assicurazione crediti
|
||||
CREATE TABLE `an_assicurazione_crediti` ( `id` INT NOT NULL AUTO_INCREMENT , `id_anagrafica` INT NOT NULL , `data_inizio` DATE NULL , `data_fine` DATE NULL , `fido_assicurato` DECIMAL(15,6) NOT NULL , `totale` DECIMAL(15,6) NOT NULL , `created_at` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP , `updated_at` TIMESTAMP on update CURRENT_TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP , PRIMARY KEY (`id`));
|
||||
|
||||
INSERT INTO `zz_plugins` (`id`, `name`, `idmodule_from`, `idmodule_to`, `position`, `script`, `enabled`, `default`, `order`, `compatibility`, `version`, `options2`, `options`, `directory`, `help`, `created_at`) VALUES (NULL, 'Assicurazione crediti', (SELECT `id` FROM `zz_modules` WHERE `name` = 'Anagrafiche'), (SELECT `id` FROM `zz_modules` WHERE `name` = 'Anagrafiche'), 'tab', '', '1', '1', '0', '2.*', '', NULL, '{ \"main_query\": [ { \"type\": \"table\", \"fields\": \"Fido assicurato, Data inizio, Data fine\", \"query\": \"SELECT id, DATE_FORMAT(data_inizio,\'%d/%m/%Y\') AS \'Data inizio\', DATE_FORMAT(data_fine,\'%d/%m/%Y\') AS \'Data fine\', ROUND(fido_assicurato, 2) AS \'Fido assicurato\', ROUND(totale, 2) AS Totale FROM an_assicurazione_crediti WHERE 1=1 AND id_anagrafica = |id_parent| HAVING 2=2 ORDER BY an_assicurazione_crediti.id DESC\"} ]}', 'assicurazione_crediti', '', NULL);
|
||||
|
||||
INSERT INTO `zz_plugins_lang` (`id_lang`, `id_record`, `title`) VALUES ((SELECT `id` FROM `zz_langs` WHERE `predefined` = 1), (SELECT `id` FROM `zz_plugins` WHERE `name` = 'Assicurazione crediti'), 'Assicurazione crediti');
|
||||
|
Loading…
x
Reference in New Issue
Block a user