-- phpMyAdmin SQL Dump
-- version 5.2.1
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Creato il: Ott 12, 2024 alle 15:02
-- Versione del server: 10.6.17-MariaDB-cll-lve
-- Versione PHP: 8.3.11

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";


/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;

--
-- Database: `a2160xg1_13333033`
--

-- --------------------------------------------------------

--
-- Struttura della tabella `amministratori_condominio`
--

CREATE TABLE `amministratori_condominio` (
  `id` int(10) UNSIGNED NOT NULL,
  `username` varchar(150) NOT NULL,
  `password` varchar(150) NOT NULL,
  `nome` varchar(100) DEFAULT NULL,
  `cognome` varchar(100) DEFAULT NULL,
  `ragione_sociale` varchar(100) DEFAULT NULL,
  `indirizzo` varchar(100) DEFAULT NULL,
  `citta` varchar(50) DEFAULT NULL,
  `cap` varchar(100) DEFAULT NULL,
  `provincia` varchar(100) DEFAULT NULL,
  `codice_fiscale` varchar(16) DEFAULT NULL,
  `partita_iva` varchar(20) DEFAULT NULL,
  `tipo_notifica` varchar(20) DEFAULT NULL,
  `notifica` varchar(50) DEFAULT NULL,
  `qualifica` int(20) NOT NULL DEFAULT 1,
  `email` varchar(50) DEFAULT NULL,
  `telefono1` char(20) DEFAULT NULL,
  `telefono2` char(20) DEFAULT NULL,
  `utente_abilitato` tinyint(4) NOT NULL DEFAULT 1,
  `utente_lemon` tinyint(4) NOT NULL DEFAULT 1,
  `livello_accessi` tinyint(4) NOT NULL DEFAULT 0,
  `livello_accesso` tinyint(4) NOT NULL DEFAULT 0,
  `dominio` varchar(50) DEFAULT NULL,
  `activation_code` text DEFAULT NULL,
  `priv_admin` text DEFAULT NULL,
  `lingua` tinyint(4) NOT NULL DEFAULT 1,
  `spec_id` tinyint(4) NOT NULL DEFAULT 0,
  `amministratore_condominio` tinyint(4) NOT NULL DEFAULT 0,
  `authkey` varchar(200) DEFAULT NULL,
  `id_sponsor` int(10) NOT NULL DEFAULT 0,
  `firma` varchar(255) DEFAULT NULL,
  `logo` varchar(255) DEFAULT NULL,
  `nuovaposta_status` tinyint(4) NOT NULL DEFAULT 1,
  `nuovaposta_utente` varchar(255) DEFAULT NULL,
  `nuovaposta_token` varchar(255) DEFAULT NULL,
  `dfsystem_status` tinyint(4) NOT NULL DEFAULT 0,
  `mav_status` tinyint(4) NOT NULL DEFAULT 1,
  `mobypay_status` tinyint(4) NOT NULL DEFAULT 1,
  `clackpay_status` tinyint(4) NOT NULL DEFAULT 1
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci COMMENT='Security: Elenco Utenti';

-- --------------------------------------------------------

--
-- Struttura della tabella `bolle`
--

CREATE TABLE `bolle` (
  `idBolla` int(11) NOT NULL,
  `dominio` varchar(10) DEFAULT NULL COMMENT 'dominio utente lemon',
  `idAmministratore` int(6) DEFAULT NULL,
  `cognomeNomeAmministratore` varchar(100) DEFAULT NULL,
  `indirizzoAmministratore` varchar(150) DEFAULT NULL,
  `capAmministratore` varchar(5) DEFAULT NULL,
  `cittaAmministratore` varchar(100) DEFAULT NULL,
  `provinciaAmministratore` varchar(2) DEFAULT NULL,
  `cfAmministratore` varchar(16) DEFAULT NULL,
  `piAmministratore` varchar(11) DEFAULT NULL,
  `dataSpedizione` date DEFAULT NULL COMMENT 'data computer in fase generazione documento',
  `ora` varchar(10) DEFAULT NULL COMMENT 'ora computer in fase generazione documento',
  `contenuto` longtext NOT NULL COMMENT 'campo editabile utente',
  `tipoDocumento` varchar(30) NOT NULL COMMENT 'Tipo documento	\r\nAvviso	\r\nBollettino TD 123	\r\nBollettino TD 896	\r\nMav	\r\nBollettino freccia	\r\nEstratto conto	\r\nSollecito	\r\nConvocazione Assemblea	\r\nVerbale Assemblea	\r\nComunicazione generica	',
  `idCondominio` int(6) DEFAULT NULL,
  `ragioneSociale` varchar(150) DEFAULT NULL COMMENT 'Intestazione Fattura',
  `indirizzo` varchar(100) DEFAULT NULL,
  `cap` varchar(5) DEFAULT NULL,
  `citta` varchar(100) DEFAULT NULL,
  `provincia` varchar(2) DEFAULT NULL,
  `codiceFiscale` varchar(16) DEFAULT NULL,
  `partitaIva` varchar(11) DEFAULT NULL,
  `trasmissioneFattura` varchar(1) DEFAULT NULL COMMENT '1 - SDI \r\n2 - PEC\r\n3 - SETTE ZERI',
  `pecSdi` varchar(60) DEFAULT NULL,
  `pdfFascicoloComune` varchar(250) DEFAULT NULL COMMENT 'PDF FASCICOLO COMUNE (nome file + percorso)			',
  `pdfFascicoloComune_1` varchar(254) DEFAULT NULL,
  `pdfFascicoloComune_2` varchar(254) DEFAULT NULL,
  `pdfFascicoloComune_3` varchar(254) DEFAULT NULL,
  `bollaAcquisita` varchar(1) NOT NULL DEFAULT 'N' COMMENT 'BOLLA ACQUISITA (S/N) - default N	',
  `telamministratore` varchar(100) NOT NULL,
  `codice_bill` varchar(100) DEFAULT NULL,
  `testo` longtext DEFAULT NULL,
  `istitutoBancario` varchar(100) DEFAULT NULL COMMENT 'ISTITUTO BANCARIO (vedi tabella dettaglioDocumento)',
  `intestazioneConto` varchar(100) DEFAULT NULL COMMENT 'INTESTAZIONE CONTO',
  `ibanPaese` varchar(2) DEFAULT NULL,
  `ibanCheck` varchar(2) DEFAULT NULL,
  `ibanCin` varchar(1) DEFAULT NULL,
  `ibanAbi` varchar(5) DEFAULT NULL,
  `ibanCab` varchar(5) DEFAULT NULL,
  `ibanConto` varchar(12) DEFAULT NULL,
  `siaMittente` varchar(5) DEFAULT NULL,
  `mittente_busta_denominazione` varchar(100) NOT NULL DEFAULT '-',
  `mittente_busta_indirizzo` varchar(100) NOT NULL DEFAULT '-',
  `mittente_busta_cap` varchar(5) NOT NULL DEFAULT '-',
  `mittente_busta_citta` varchar(100) NOT NULL DEFAULT '-',
  `mittente_busta_provincia` varchar(2) NOT NULL DEFAULT '-',
  `parametro1` varchar(100) NOT NULL,
  `parametro2` varchar(100) NOT NULL,
  `id_finanziaria` tinyint(4) NOT NULL DEFAULT 0,
  `utente` varchar(100) NOT NULL,
  `password` varchar(100) NOT NULL,
  `ibanfinanziaria` varchar(200) NOT NULL,
  `payer_name` varchar(200) DEFAULT NULL,
  `cf_payer` varchar(200) DEFAULT NULL,
  `email_payer` varchar(200) DEFAULT NULL,
  `parametro3` varchar(200) DEFAULT NULL,
  `payIstitutoBancario` varchar(200) DEFAULT NULL,
  `payIntestazioneConto` varchar(200) DEFAULT NULL,
  `payIbanPaese` varchar(200) DEFAULT NULL,
  `payIbanCheck` varchar(200) DEFAULT NULL,
  `payIbanCin` varchar(200) DEFAULT NULL,
  `payIbanAbi` varchar(200) DEFAULT NULL,
  `payIbanCab` varchar(200) DEFAULT NULL,
  `payIbanConto` varchar(200) DEFAULT NULL,
  `paySiaMittente` varchar(200) DEFAULT NULL,
  `registratoNome` varchar(200) DEFAULT NULL,
  `codiceFiscaleReferente` varchar(200) DEFAULT NULL,
  `emailReferente` varchar(200) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;

-- --------------------------------------------------------

--
-- Struttura della tabella `categorie_prodotti`
--

CREATE TABLE `categorie_prodotti` (
  `id` int(11) NOT NULL,
  `codice_merceologico` int(11) NOT NULL DEFAULT 31,
  `descrizione` varchar(255) NOT NULL,
  `richiede_evasione` tinyint(4) NOT NULL DEFAULT 0,
  `estratto_conto` tinyint(4) NOT NULL DEFAULT 0
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;

--
-- Dump dei dati per la tabella `categorie_prodotti`
--

INSERT INTO `categorie_prodotti` (`id`, `codice_merceologico`, `descrizione`, `richiede_evasione`, `estratto_conto`) VALUES
(1, 31, 'PRODOTTI DIGITALI', 0, 1),
(3, 33, 'PRODOTTI CARTACEI', 1, 0);

-- --------------------------------------------------------

--
-- Struttura della tabella `categorie_prodotti_dettaglio`
--

CREATE TABLE `categorie_prodotti_dettaglio` (
  `id` int(11) NOT NULL,
  `codice_merceologico` int(11) NOT NULL DEFAULT 31,
  `descrizione_servizio` varchar(100) NOT NULL,
  `ordine` tinyint(4) NOT NULL DEFAULT 0,
  `descrizione` varchar(255) NOT NULL,
  `abilitazione` tinyint(1) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;

--
-- Dump dei dati per la tabella `categorie_prodotti_dettaglio`
--

INSERT INTO `categorie_prodotti_dettaglio` (`id`, `codice_merceologico`, `descrizione_servizio`, `ordine`, `descrizione`, `abilitazione`) VALUES
(1, 31, 'PRODOTTI DIGITALI', 1, 'Bollettino Digitale', 1),
(4, 33, 'PRODOTTI CARTACEI', 1, 'Bollettini MB Letter', 1),
(5, 33, 'PRODOTTI CARTACEI', 2, 'Bollettini MB A4', 1),
(6, 33, 'PRODOTTI CARTACEI', 3, 'Ricevute MR A4', 1),
(7, 33, 'PRODOTTI CARTACEI', 4, 'Bollettini A4 Tr Lemon', 2);

-- --------------------------------------------------------

--
-- Struttura della tabella `dati_mittente`
--

CREATE TABLE `dati_mittente` (
  `denominazione` varchar(200) DEFAULT NULL,
  `indirizzo` varchar(254) DEFAULT NULL,
  `cap` varchar(10) DEFAULT NULL,
  `citta` varchar(254) DEFAULT NULL,
  `provincia` varchar(254) DEFAULT NULL,
  `scelta_attiva` int(10) NOT NULL DEFAULT 1
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci COMMENT='tabella dati mittente';

-- --------------------------------------------------------

--
-- Struttura della tabella `destinatariBolla`
--

CREATE TABLE `destinatariBolla` (
  `id` int(11) NOT NULL,
  `codiceBolla` int(12) DEFAULT NULL COMMENT 'E'' idBolla della tabella bolla',
  `numeroDocumento` int(20) DEFAULT NULL COMMENT 'in tabella emissioneDocumento LEMON',
  `numeroBollettinoMav` varchar(15) DEFAULT NULL,
  `codiceMavBanca` varchar(255) DEFAULT NULL,
  `istitutoBancario` int(10) NOT NULL DEFAULT 0,
  `dataEmissione` date DEFAULT NULL COMMENT '(vedi campo dataBollettino tabella emissioneDocumento)					',
  `scadenzaDocumento` date DEFAULT NULL COMMENT 'Scadenza documento (vedi campo scadenzaBollettino tabella emissioneDocumento)						',
  `codiceUnita` int(8) DEFAULT NULL COMMENT 'CodiceUnita (vedi codiceUnitaImmobile tab. emissioneDocumento, necessario per addebito spese su Lemon)								',
  `idSoggetto` int(10) DEFAULT NULL COMMENT 'ID SOGGETTO (vedi codiceCondomino tabella emisisoneDocumento)					',
  `titolo` varchar(15) DEFAULT NULL COMMENT 'Esempio: Preg.mo, Spett.le, Gentilissimo',
  `destinatario` varchar(200) DEFAULT NULL COMMENT 'Destinatario (vedi campo cognomeNome tabella emissioneDocumento)					',
  `indirizzoDestinatario` varchar(150) DEFAULT NULL,
  `capDestinatario` varchar(5) DEFAULT NULL,
  `cittaDestinatario` varchar(150) DEFAULT NULL,
  `provinciaDestinatario` varchar(2) DEFAULT NULL,
  `nazioneDestinatario` varchar(2) DEFAULT NULL,
  `email1Destinatario` varchar(100) DEFAULT NULL,
  `email2Destinatario` varchar(100) DEFAULT NULL,
  `pecDestinatario` varchar(100) DEFAULT NULL,
  `telefono1Destinatario` varchar(15) DEFAULT NULL,
  `codiceFiscaleDestinatario` varchar(16) DEFAULT NULL,
  `modalitaSpedizione` varchar(30) DEFAULT NULL COMMENT 'Modalità di spedizione	\r\nEmail 	\r\nPec 	\r\nPosta Prioritaria  	\r\nPosta Prioritaria 1	\r\nVETTORE PRIVATO 	\r\nRaccomandata semplice	\r\nRaccomandata AR	\r\nRaccomandata 1	\r\nRaccomandata 1 PDC 	\r\nPOSTE ITALIANE 	\r\n	\r\nRaccomandata semplice	\r\nRaccomandata AR	\r\nRaccomandata 1	\r\nRaccomandata 1 PDC 	',
  `tipoDocumento` varchar(20) DEFAULT NULL COMMENT 'Avviso 	\r\nBollettino 123	\r\nBollettino 896	\r\nEstratto conto 	\r\nSolleciti	\r\nMav	\r\nFreccia	',
  `pdf_documento` varchar(255) DEFAULT NULL,
  `pdfFascicoloPersonalizzato` varchar(250) DEFAULT NULL COMMENT 'solo per questo soggetto',
  `pdfFascicoloComune` varchar(250) DEFAULT NULL,
  `tipoSoggetto` varchar(20) DEFAULT NULL COMMENT 'Tipo soggetto	\r\nP=Proprietario	\r\nI=Inquilino	\r\nC=Comproprietario	\r\nU=Usufruttuario	\r\nN=Nudo Propriertario	',
  `statoInvio` tinyint(4) NOT NULL DEFAULT 0,
  `id_txt` int(11) NOT NULL DEFAULT 0,
  `id_servizio_pagamento` tinyint(4) NOT NULL DEFAULT 1,
  `codice_bill` varchar(100) DEFAULT NULL,
  `data_pagamento` datetime DEFAULT NULL,
  `checkout_reference` varchar(100) DEFAULT NULL,
  `url_pagamento` varchar(255) DEFAULT NULL,
  `importo_pagato` decimal(10,2) NOT NULL DEFAULT 0.00,
  `esito_pagamento` varchar(255) DEFAULT NULL,
  `comunicato_a_lemon` tinyint(4) NOT NULL DEFAULT 0,
  `n_download` int(11) NOT NULL DEFAULT 0,
  `stato_cancellazione` tinyint(4) NOT NULL DEFAULT 0,
  `stato_addebito` tinyint(4) NOT NULL DEFAULT 0
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;

-- --------------------------------------------------------

--
-- Struttura della tabella `dettaglio_listini`
--

CREATE TABLE `dettaglio_listini` (
  `id` int(11) NOT NULL,
  `id_listino` int(10) NOT NULL DEFAULT 0,
  `numero_listino` tinyint(4) NOT NULL DEFAULT 1,
  `da` int(10) NOT NULL DEFAULT 0,
  `a` int(10) NOT NULL DEFAULT 0,
  `importo` decimal(10,2) NOT NULL DEFAULT 0.00,
  `iva` decimal(10,2) NOT NULL DEFAULT 0.00,
  `ritenuta_acconto` int(10) NOT NULL DEFAULT 0
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;

--
-- Dump dei dati per la tabella `dettaglio_listini`
--

INSERT INTO `dettaglio_listini` (`id`, `id_listino`, `numero_listino`, `da`, `a`, `importo`, `iva`, `ritenuta_acconto`) VALUES
(9, 12, 1, 1, 10, 30.00, 22.00, 4),
(10, 12, 1, 11, 20, 28.00, 22.00, 4),
(11, 12, 1, 21, 100, 25.00, 22.00, 4),
(12, 13, 1, 1, 10, 30.00, 22.00, 4),
(13, 13, 1, 11, 20, 30.00, 22.00, 4),
(14, 13, 1, 21, 100, 28.00, 22.00, 4),
(15, 14, 1, 1, 10, 30.00, 22.00, 4),
(16, 14, 1, 11, 20, 30.00, 22.00, 4),
(65, 5, 1, 1, 1000, 100.00, 22.00, 4),
(95, 6, 1, 1, 1, 38.00, 22.00, 0),
(96, 6, 1, 2, 2, 37.00, 22.00, 0),
(97, 6, 1, 3, 3, 36.00, 22.00, 0),
(98, 6, 1, 4, 4, 35.00, 22.00, 0),
(99, 6, 1, 5, 99999, 34.00, 22.00, 0),
(100, 16, 1, 1, 1, 38.00, 22.00, 0),
(101, 16, 1, 2, 2, 37.00, 22.00, 0),
(102, 16, 1, 3, 3, 36.00, 22.00, 0),
(103, 16, 1, 4, 4, 35.00, 22.00, 0),
(104, 16, 1, 5, 9999, 34.00, 22.00, 0),
(115, 18, 1, 1, 1, 38.00, 22.00, 0),
(116, 18, 1, 2, 2, 37.00, 22.00, 0),
(117, 18, 1, 3, 3, 36.00, 22.00, 0),
(118, 18, 1, 4, 4, 35.00, 22.00, 0),
(119, 18, 1, 5, 99999, 34.00, 22.00, 0),
(120, 19, 1, 1, 1, 0.50, 22.00, 0),
(121, 19, 1, 2, 2, 1.00, 22.00, 0),
(122, 19, 1, 3, 3, 1.20, 22.00, 0),
(123, 19, 1, 4, 4, 0.75, 22.00, 0),
(124, 20, 1, 1, 1, 0.50, 22.00, 0),
(125, 20, 1, 2, 2, 1.00, 22.00, 0),
(126, 20, 1, 3, 3, 1.20, 22.00, 0),
(127, 20, 1, 4, 4, 0.75, 22.00, 0),
(128, 20, 1, 5, 5, 0.60, 22.00, 0),
(132, 4, 1, 1, 50, 10.00, 22.00, 4),
(133, 4, 1, 51, 150, 0.45, 22.00, 4),
(134, 4, 1, 151, 300, 0.40, 22.00, 4),
(135, 21, 1, 1, 100, 0.30, 22.00, 4);

-- --------------------------------------------------------

--
-- Struttura della tabella `dettaglio_ordini`
--

CREATE TABLE `dettaglio_ordini` (
  `id` int(10) UNSIGNED NOT NULL,
  `id_ordine` int(20) NOT NULL DEFAULT 0,
  `tipo_servizio` int(10) NOT NULL DEFAULT 0,
  `tipo_prodotto` tinyint(4) NOT NULL DEFAULT 0,
  `quantita` int(20) NOT NULL DEFAULT 0,
  `importo` decimal(10,2) NOT NULL DEFAULT 0.00
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci COMMENT='tabella ordini';

-- --------------------------------------------------------

--
-- Struttura della tabella `estratto_conto`
--

CREATE TABLE `estratto_conto` (
  `id` int(10) UNSIGNED NOT NULL,
  `riferimento_codice_bolla` int(20) NOT NULL DEFAULT 0,
  `riferimento_id_ordini` varchar(100) DEFAULT NULL,
  `codice_prodotto` int(20) NOT NULL DEFAULT 0,
  `tipo_servizio` int(11) NOT NULL DEFAULT 0,
  `nome_prodotto` varchar(200) DEFAULT NULL,
  `id_condominio` int(20) NOT NULL DEFAULT 0,
  `nome_condominio` varchar(200) DEFAULT NULL,
  `id_soggetto` int(20) NOT NULL DEFAULT 0,
  `nome_soggetto` varchar(200) DEFAULT NULL,
  `quantita` int(20) NOT NULL DEFAULT 0,
  `entrata` int(14) NOT NULL DEFAULT 0,
  `uscita` int(14) NOT NULL DEFAULT 0,
  `data_movimento` date DEFAULT NULL,
  `tipo_movimento` int(20) NOT NULL DEFAULT 0,
  `contenuto` varchar(254) DEFAULT NULL,
  `saldoProgressivo` decimal(10,2) NOT NULL DEFAULT 0.00
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci COMMENT='tabella estratto conto';

-- --------------------------------------------------------

--
-- Struttura della tabella `flussiMav`
--

CREATE TABLE `flussiMav` (
  `id` mediumint(9) NOT NULL,
  `dominio` varchar(20) DEFAULT NULL COMMENT 'dominio utente lemon',
  `codiceBolla` int(12) DEFAULT NULL COMMENT 'E'' idBolla della tabella bolla',
  `numeroBollettinoMav` varchar(15) DEFAULT NULL,
  `istitutoBancario` varchar(15) DEFAULT NULL,
  `dataEmissione` date DEFAULT NULL COMMENT '(vedi campo dataBollettino tabella emissioneDocumento)					',
  `mav_banca` varchar(100) DEFAULT NULL,
  `data_pagamento` datetime DEFAULT NULL,
  `importo_mav` decimal(10,2) NOT NULL DEFAULT 0.00,
  `importo_pagato` decimal(10,2) NOT NULL DEFAULT 0.00,
  `comunicato_a_api` tinyint(4) NOT NULL DEFAULT 0,
  `file_name` varchar(100) DEFAULT NULL,
  `causale` varchar(10) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;

-- --------------------------------------------------------

--
-- Struttura della tabella `incassi`
--

CREATE TABLE `incassi` (
  `id` int(11) NOT NULL,
  `codiceBolla` int(10) DEFAULT NULL COMMENT 'vedi id bolla',
  `numeroDocumento` int(20) DEFAULT NULL COMMENT 'in tabella emissioneDocumento LEMON',
  `tipologia` varchar(15) DEFAULT NULL COMMENT 'Versamento o restituzione',
  `dataRegistrazione` date DEFAULT NULL,
  `dataPagamento` date DEFAULT NULL,
  `descrizione` varchar(150) DEFAULT NULL,
  `importo` float(13,2) DEFAULT NULL,
  `acquisito` char(1) NOT NULL DEFAULT 'N',
  `dominio` varchar(10) NOT NULL DEFAULT '13516074'
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

-- --------------------------------------------------------

--
-- Struttura della tabella `istitutiBancari`
--

CREATE TABLE `istitutiBancari` (
  `id` bigint(20) NOT NULL,
  `denominazione` varchar(100) NOT NULL,
  `note` text NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;

--
-- Dump dei dati per la tabella `istitutiBancari`
--

INSERT INTO `istitutiBancari` (`id`, `denominazione`, `note`) VALUES
(1, 'BPS', ''),
(2, 'INTESA S. PAOLO', '');

-- --------------------------------------------------------

--
-- Struttura della tabella `kp_listini`
--

CREATE TABLE `kp_listini` (
  `id` int(11) NOT NULL,
  `descrizione` varchar(100) NOT NULL,
  `importo_listino_1` decimal(10,2) NOT NULL DEFAULT 0.00,
  `importo_listino_2` decimal(10,2) NOT NULL DEFAULT 0.00,
  `importo_listino_3` decimal(10,2) NOT NULL DEFAULT 0.00,
  `iva` decimal(10,2) NOT NULL DEFAULT 0.00,
  `ritenuta_acconto` int(10) NOT NULL DEFAULT 0
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;

-- --------------------------------------------------------

--
-- Struttura della tabella `listini`
--

CREATE TABLE `listini` (
  `id` int(11) NOT NULL,
  `descrizione` varchar(100) NOT NULL,
  `id_prodotto` int(11) NOT NULL DEFAULT 0,
  `codice_prodotto` int(10) NOT NULL DEFAULT 0,
  `categoria_merceologica` int(11) NOT NULL DEFAULT 31,
  `descrizione_servizio` varchar(200) DEFAULT NULL,
  `abilitazione` tinyint(4) NOT NULL DEFAULT 1
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;

--
-- Dump dei dati per la tabella `listini`
--

INSERT INTO `listini` (`id`, `descrizione`, `id_prodotto`, `codice_prodotto`, `categoria_merceologica`, `descrizione_servizio`, `abilitazione`) VALUES
(4, 'Bollettini MB Lettera', 4, 4, 33, 'PRODOTTI CARTACEI', 0),
(5, 'Lettere', 2, 2, 32, 'PRODOTTI VETTORE', 0),
(6, 'Bollettini MB Lettera', 4, 4, 33, 'PRODOTTI CARTACEI', 0),
(16, 'Bollettini A4 Tr Lemon', 7, 7, 33, 'PRODOTTI CARTACEI', 0),
(18, 'Ricevute A4', 6, 6, 33, 'PRODOTTI CARTACEI', 0),
(19, 'Bollettini A4', 5, 5, 33, 'PRODOTTI CARTACEI', 0),
(21, 'Bollettino Digitale', 1, 1, 31, 'PRODOTTI DIGITALI', 0);

-- --------------------------------------------------------

--
-- Struttura della tabella `mail_address`
--

CREATE TABLE `mail_address` (
  `idMail` int(11) NOT NULL,
  `dominio` varchar(10) DEFAULT NULL COMMENT 'dominio utente lemon',
  `idAmministratore` int(6) DEFAULT NULL,
  `eMail` varchar(100) DEFAULT NULL,
  `tipoeMail` varchar(100) DEFAULT NULL,
  `categoriaeMail` tinyint(4) NOT NULL DEFAULT 1,
  `mailhost` varchar(100) DEFAULT NULL,
  `username` varchar(100) DEFAULT NULL,
  `password` varchar(100) DEFAULT NULL,
  `porta` varchar(100) DEFAULT NULL,
  `predefinita` tinyint(4) NOT NULL DEFAULT 0,
  `oggetto` varchar(255) DEFAULT NULL,
  `testo` text DEFAULT NULL,
  `imaphost` int(6) NOT NULL DEFAULT 0,
  `turbomail` int(6) NOT NULL DEFAULT 0,
  `mailcc` int(6) NOT NULL DEFAULT 0,
  `usernamebcc` varchar(100) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;

-- --------------------------------------------------------

--
-- Struttura della tabella `ordini`
--

CREATE TABLE `ordini` (
  `id` int(10) UNSIGNED NOT NULL,
  `tipo_servizio` int(20) NOT NULL DEFAULT 0,
  `id_amministratore` int(20) NOT NULL DEFAULT 0,
  `dominio` varchar(255) NOT NULL DEFAULT '0',
  `data_ordine` datetime NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `ordine` varchar(20) NOT NULL DEFAULT '0',
  `ragione_sociale` varchar(200) DEFAULT NULL,
  `indirizzo` varchar(100) DEFAULT NULL,
  `cap` varchar(10) DEFAULT NULL,
  `citta` varchar(50) DEFAULT NULL,
  `provincia` varchar(2) NOT NULL,
  `spedizione_ragione_sociale` varchar(100) NOT NULL,
  `spedizione_indirizzo` varchar(100) NOT NULL,
  `spedizione_cap` varchar(5) NOT NULL,
  `spedizione_citta` varchar(100) NOT NULL,
  `spedizione_provincia` varchar(2) NOT NULL,
  `spedizione_nota` text NOT NULL,
  `codice_fiscale` varchar(16) DEFAULT NULL,
  `partita_iva` varchar(20) DEFAULT NULL,
  `email` varchar(50) DEFAULT NULL,
  `modalita_trasmissione_fattura` tinyint(4) NOT NULL DEFAULT 0,
  `pec` varchar(50) DEFAULT NULL,
  `sdi` varchar(50) DEFAULT NULL,
  `tipo_prodotto` tinyint(4) NOT NULL DEFAULT 0,
  `quantita` int(20) NOT NULL DEFAULT 0,
  `imponibile_fattura` decimal(10,2) NOT NULL DEFAULT 0.00,
  `sconto` decimal(10,2) NOT NULL DEFAULT 0.00,
  `iva_fattura` decimal(10,2) NOT NULL DEFAULT 0.00,
  `totale_fattura` decimal(10,2) NOT NULL DEFAULT 0.00,
  `ritenuta_acconto` decimal(10,2) NOT NULL DEFAULT 0.00,
  `netto_da_pagare` decimal(10,2) NOT NULL DEFAULT 0.00,
  `stato_pagamento` tinyint(4) NOT NULL DEFAULT 0,
  `pagato` tinyint(4) NOT NULL DEFAULT 0,
  `data_pagamento` varchar(20) DEFAULT NULL,
  `modalita_pagamento` tinyint(4) NOT NULL DEFAULT 0,
  `emissione_fattura` tinyint(4) NOT NULL DEFAULT 1,
  `confermato` tinyint(4) NOT NULL DEFAULT 0,
  `id_servizio_pagamento` tinyint(4) NOT NULL DEFAULT 1,
  `codice_bill` varchar(100) NOT NULL,
  `checkout_reference` varchar(255) NOT NULL,
  `url_pagamento` varchar(255) NOT NULL,
  `importo_pagato` decimal(10,2) NOT NULL DEFAULT 0.00,
  `esito_pagamento` varchar(255) NOT NULL,
  `n_fattura` int(11) NOT NULL DEFAULT 0
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci COMMENT='tabella ordini';

-- --------------------------------------------------------

--
-- Struttura della tabella `ordini_descrizione`
--

CREATE TABLE `ordini_descrizione` (
  `id` int(10) UNSIGNED NOT NULL,
  `id_ordine` int(10) NOT NULL DEFAULT 0,
  `ordine` varchar(20) NOT NULL,
  `id_servizio` int(11) NOT NULL DEFAULT 0,
  `codice_prodotto` tinyint(4) NOT NULL DEFAULT 0,
  `quantita` int(20) NOT NULL DEFAULT 1,
  `imponibile` decimal(10,2) NOT NULL DEFAULT 0.00,
  `sconto` decimal(10,2) NOT NULL DEFAULT 0.00,
  `iva` decimal(10,2) NOT NULL DEFAULT 0.00,
  `totale` decimal(10,2) NOT NULL DEFAULT 0.00,
  `ritenuta_acconto` decimal(10,2) NOT NULL DEFAULT 0.00,
  `netto_da_pagare` decimal(10,2) NOT NULL DEFAULT 0.00,
  `id_condominio` varchar(20) DEFAULT NULL,
  `descrizione` varchar(255) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci COMMENT='descrizione bolla join con bolla';

-- --------------------------------------------------------

--
-- Struttura della tabella `pdfBolle`
--

CREATE TABLE `pdfBolle` (
  `id` int(11) NOT NULL,
  `codiceBolla` int(12) DEFAULT NULL COMMENT 'E'' idBolla della tabella bolla',
  `numeroDocumento` int(20) DEFAULT NULL COMMENT 'in tabella emissioneDocumento LEMON',
  `numeroBollettinoMav` varchar(15) DEFAULT NULL,
  `idSoggetto` int(10) DEFAULT NULL COMMENT 'ID SOGGETTO (vedi codiceCondomino tabella emisisoneDocumento)					',
  `tipoDocumento` varchar(20) DEFAULT NULL COMMENT 'Avviso 	\r\nBollettino 123	\r\nBollettino 896	\r\nEstratto conto 	\r\nSolleciti	\r\nMav	\r\nFreccia	',
  `url_pdf` varchar(250) DEFAULT NULL COMMENT 'solo per questo soggetto'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;

-- --------------------------------------------------------

--
-- Struttura della tabella `rate`
--

CREATE TABLE `rate` (
  `id` int(11) NOT NULL,
  `codiceBolla` int(12) DEFAULT NULL COMMENT 'vedi bolla',
  `codiceNominativo` int(10) DEFAULT NULL COMMENT 'Codice Nominativo (vedi campo ID tabella destinatariBolla)				',
  `codiceImmobile` int(10) DEFAULT NULL COMMENT 'Codice Immobile (vedi campo codiceUnitaImmobile tabella dettaglioDocumento)						',
  `edificio` varchar(30) DEFAULT NULL COMMENT 'Edificio/scala/interno (vedi campo Edificio tabella dettaglioDocumento)					',
  `rata` varchar(20) DEFAULT NULL COMMENT 'Rata (vedi campo rata tabella dettaglioDocumento)				',
  `denominazioneRata` longtext DEFAULT NULL COMMENT 'Denominazione rata (es: 2 rata condomniale 2022 - vedi campo desrizioneRata tab. dettaglioDocumento)								',
  `importoDovuto` float(13,2) DEFAULT NULL COMMENT 'Importo dovuto (vedi campo importiTotaleDocumento tabella dettaglioDocumento)						',
  `importoVersato` float(13,2) DEFAULT NULL COMMENT 'Importo versato (vedi campo versamentoiTotaleDocumento tabella dettaglioDocumento)						',
  `importoResiduo` float(13,2) DEFAULT NULL COMMENT 'importo residuo (vedi campo residuiTotaleDocumento tabella dettaglioDocumento)						',
  `scadenzaRata` date DEFAULT NULL COMMENT 'scadenza rata (vedi campo scadenzaBollettino tabella dettaglioDocumento)					',
  `numeroDocumento` varchar(30) DEFAULT NULL COMMENT 'Numero documento (vedi tabella DESTINATARI  BOLLA) 				',
  `istitutoBancario` varchar(100) DEFAULT NULL COMMENT 'ISTITUTO BANCARIO (vedi tabella dettaglioDocumento)				',
  `intestazioneConto` varchar(100) DEFAULT NULL COMMENT 'INTESTAZIONE CONTO	',
  `ibanPaese` varchar(2) NOT NULL,
  `ibanCheck` varchar(2) NOT NULL,
  `ibanCin` varchar(1) NOT NULL,
  `ibanAbi` varchar(5) DEFAULT NULL,
  `ibanCab` varchar(5) DEFAULT NULL,
  `ibanConto` varchar(12) DEFAULT NULL,
  `siaMittente` varchar(5) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

-- --------------------------------------------------------

--
-- Struttura della tabella `report_invii`
--

CREATE TABLE `report_invii` (
  `id` bigint(20) NOT NULL,
  `id_bolla` int(11) NOT NULL DEFAULT 0,
  `id_documento` int(11) NOT NULL DEFAULT 0,
  `contenuto_bolla` text NOT NULL,
  `tipo_invio` int(11) NOT NULL DEFAULT 0,
  `tipo_documento` varchar(255) DEFAULT NULL,
  `mittente_nome` varchar(255) NOT NULL,
  `condominio` varchar(255) DEFAULT NULL,
  `id_email_mittente` int(11) NOT NULL DEFAULT 0,
  `id_pec_mittente` int(11) NOT NULL DEFAULT 0,
  `destinatario_nome` varchar(255) DEFAULT NULL,
  `destinatario_via` varchar(255) DEFAULT NULL,
  `destinatario_cap` varchar(255) DEFAULT NULL,
  `destinatario_citta` varchar(255) DEFAULT NULL,
  `destinatario_provincia` varchar(10) NOT NULL,
  `destinatario_email` varchar(255) DEFAULT NULL,
  `destinatario_pec` varchar(255) DEFAULT NULL,
  `url_documento` varchar(255) DEFAULT NULL,
  `url_allegato_1` varchar(255) NOT NULL,
  `url_allegato_2` varchar(255) NOT NULL,
  `url_allegato_3` varchar(255) NOT NULL,
  `nome_documento` varchar(255) DEFAULT NULL,
  `esito_spedizione` text DEFAULT NULL,
  `data_invio` datetime NOT NULL DEFAULT current_timestamp(),
  `stato_invio` tinyint(4) NOT NULL DEFAULT 0,
  `id_reinvio` int(11) NOT NULL DEFAULT 0,
  `id_vettore` int(11) NOT NULL DEFAULT 0,
  `prezzo` decimal(10,2) NOT NULL DEFAULT 0.00,
  `barcode` varchar(255) DEFAULT NULL,
  `id_testo_email` int(11) NOT NULL DEFAULT 0,
  `id_testo_pec` int(11) NOT NULL DEFAULT 0,
  `id_soggetto` int(11) NOT NULL DEFAULT 0,
  `id_condominio` int(11) NOT NULL DEFAULT 0,
  `codiceUnita` int(8) NOT NULL DEFAULT 0,
  `inviato_a_lemon` tinyint(4) NOT NULL DEFAULT 0,
  `inviato_a_webfruit` tinyint(4) NOT NULL DEFAULT 0,
  `vettore_url` varchar(200) NOT NULL,
  `vettore_login_url` varchar(200) NOT NULL,
  `vettore_pdf_url` varchar(200) NOT NULL,
  `vettore_price_url` varchar(200) NOT NULL,
  `vettore_login` varchar(200) NOT NULL,
  `vettore_password` varchar(200) NOT NULL,
  `vettore_domain` varchar(200) NOT NULL,
  `dominio` text NOT NULL,
  `pdfGenerale` varchar(200) DEFAULT NULL,
  `password_accesso_file` varchar(50) DEFAULT NULL,
  `acronimoSpedizione` varchar(10) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;

-- --------------------------------------------------------

--
-- Struttura della tabella `responsabili_utenti`
--

CREATE TABLE `responsabili_utenti` (
  `id` int(10) UNSIGNED NOT NULL,
  `id_amministratore` int(11) NOT NULL DEFAULT 0,
  `cognome_nome` varchar(254) DEFAULT NULL,
  `indirizzo` varchar(100) DEFAULT NULL,
  `cap` varchar(100) DEFAULT NULL,
  `citta` varchar(50) DEFAULT NULL,
  `provincia` varchar(100) DEFAULT NULL,
  `telefono1` char(20) DEFAULT NULL,
  `telefono2` char(20) DEFAULT NULL,
  `email` varchar(50) DEFAULT NULL,
  `qualifica` int(20) NOT NULL DEFAULT 1,
  `username` varchar(150) NOT NULL,
  `password` varchar(150) NOT NULL,
  `utente_abilitato` tinyint(4) NOT NULL DEFAULT 1,
  `livello_accesso` tinyint(4) NOT NULL DEFAULT 0
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci COMMENT='Security: Elenco Utenti';

-- --------------------------------------------------------

--
-- Struttura della tabella `settaggio_123`
--

CREATE TABLE `settaggio_123` (
  `margine_superiore` decimal(10,2) NOT NULL DEFAULT 0.00,
  `margine_primo_riquadro` decimal(10,2) NOT NULL DEFAULT 0.00,
  `margine_secondo_riquadro` decimal(10,2) NOT NULL DEFAULT 0.00
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;

--
-- Dump dei dati per la tabella `settaggio_123`
--

INSERT INTO `settaggio_123` (`margine_superiore`, `margine_primo_riquadro`, `margine_secondo_riquadro`) VALUES
(116.00, 10.00, 140.00);

-- --------------------------------------------------------

--
-- Struttura della tabella `settaggio_896`
--

CREATE TABLE `settaggio_896` (
  `id` int(10) NOT NULL,
  `nome` varchar(50) DEFAULT NULL,
  `X` int(10) NOT NULL DEFAULT 0,
  `Y` int(10) NOT NULL DEFAULT 0
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;

--
-- Dump dei dati per la tabella `settaggio_896`
--

INSERT INTO `settaggio_896` (`id`, `nome`, `X`, `Y`) VALUES
(1, 'cc', 49, 116),
(2, 'cc2', 163, 115),
(3, 'importo', 92, 115),
(4, 'importo2', 242, 115),
(5, 'iban', 46, 122),
(6, 'iban2', 179, 122),
(7, 'intestato', 7, 130),
(8, 'intestato2', 134, 130),
(9, 'eseguito_da', 6, 145),
(10, 'eseguito_da2', 186, 145),
(11, 'via', 5, 150),
(12, 'via2', 184, 150),
(13, 'citta', 5, 155),
(14, 'citta2', 184, 155),
(15, 'causale', 6, 160),
(16, 'causale2', 187, 160),
(17, 'cc_esteso', 134, 145),
(18, 'barcode', 186, 172),
(19, 'datamatix', 155, 192),
(20, 'c_cliente_f', 134, 198),
(21, 'importo_footer', 199, 198),
(22, 'cc_footer', 238, 198),
(23, '896_footer', 274, 198),
(24, 'aut', 285, 170),
(25, 'mittente', 5, 80),
(26, 'debitore', 5, 120),
(27, 'codicebollettino', 5, 160),
(28, 'scadenza', 5, 180),
(29, 'dettagliorate', 5, 190);

-- --------------------------------------------------------

--
-- Struttura della tabella `settaggio_avviso`
--

CREATE TABLE `settaggio_avviso` (
  `margine_superiore` decimal(10,2) NOT NULL DEFAULT 0.00,
  `margine_primo_riquadro` decimal(10,2) NOT NULL DEFAULT 0.00,
  `margine_secondo_riquadro` decimal(10,2) NOT NULL DEFAULT 0.00
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;

--
-- Dump dei dati per la tabella `settaggio_avviso`
--

INSERT INTO `settaggio_avviso` (`margine_superiore`, `margine_primo_riquadro`, `margine_secondo_riquadro`) VALUES
(6.00, 7.00, 136.00);

-- --------------------------------------------------------

--
-- Struttura della tabella `settaggio_buste`
--

CREATE TABLE `settaggio_buste` (
  `id` int(10) NOT NULL,
  `nome` varchar(50) DEFAULT NULL,
  `X` int(10) NOT NULL DEFAULT 0,
  `Y` int(10) NOT NULL DEFAULT 0
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;

--
-- Dump dei dati per la tabella `settaggio_buste`
--

INSERT INTO `settaggio_buste` (`id`, `nome`, `X`, `Y`) VALUES
(45, 'busta_grande_mittente', 20, 50),
(46, 'busta_grande_destinatario', 50, 80),
(51, 'busta_media_mittente', 10, 50),
(52, 'busta_media_destinatario', 50, 80),
(57, 'busta_americano_mittente', 10, 10),
(58, 'busta_americano_destinatario', 50, 60);

-- --------------------------------------------------------

--
-- Struttura della tabella `settaggio_etichette`
--

CREATE TABLE `settaggio_etichette` (
  `id` int(10) NOT NULL,
  `nome` varchar(50) DEFAULT NULL,
  `X` int(10) NOT NULL DEFAULT 0,
  `Y` int(10) NOT NULL DEFAULT 0,
  `codice` varchar(10) NOT NULL,
  `altezza` int(11) NOT NULL DEFAULT 0,
  `larghezza` int(11) NOT NULL DEFAULT 0
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;

--
-- Dump dei dati per la tabella `settaggio_etichette`
--

INSERT INTO `settaggio_etichette` (`id`, `nome`, `X`, `Y`, `codice`, `altezza`, `larghezza`) VALUES
(32, '3_piste', 0, 0, '101720', 0, 0),
(37, '2_piste', 0, 0, 'L7163', 0, 0),
(41, 'etichetta_1_pista_1', 0, 0, '', 89, 36);

-- --------------------------------------------------------

--
-- Struttura della tabella `stato_attivazione`
--

CREATE TABLE `stato_attivazione` (
  `id` tinyint(4) NOT NULL,
  `descrizione` varchar(50) NOT NULL,
  `colore` varchar(10) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;

--
-- Dump dei dati per la tabella `stato_attivazione`
--

INSERT INTO `stato_attivazione` (`id`, `descrizione`, `colore`) VALUES
(1, 'ACCESSO COMPLETO', 'red'),
(2, 'ACCESSO COMPLETO SENZA INSERIMENTO ALTRI UTENTI', 'orange');

-- --------------------------------------------------------

--
-- Struttura della tabella `testata_report_invii`
--

CREATE TABLE `testata_report_invii` (
  `id` bigint(20) NOT NULL,
  `id_bolla` int(11) NOT NULL DEFAULT 0,
  `tipo_invio` int(11) NOT NULL DEFAULT 0,
  `esito_spedizione` text DEFAULT NULL,
  `data_invio` datetime NOT NULL DEFAULT current_timestamp(),
  `stato_invio` tinyint(4) NOT NULL DEFAULT 0,
  `contenuto_bolla` text NOT NULL,
  `condominio` text NOT NULL,
  `dominio` text NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;

-- --------------------------------------------------------

--
-- Struttura della tabella `testi_personalizzati`
--

CREATE TABLE `testi_personalizzati` (
  `id` int(11) NOT NULL,
  `riferimento` tinyint(4) NOT NULL DEFAULT 0,
  `titolo` varchar(100) NOT NULL DEFAULT 'avviso',
  `contenuto` text NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;

-- --------------------------------------------------------

--
-- Struttura della tabella `tipo_documento`
--

CREATE TABLE `tipo_documento` (
  `id` tinyint(4) NOT NULL,
  `descrizione` varchar(50) NOT NULL,
  `colore` varchar(10) NOT NULL,
  `lemon_1` varchar(50) NOT NULL,
  `lemon_2` varchar(50) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;

--
-- Dump dei dati per la tabella `tipo_documento`
--

INSERT INTO `tipo_documento` (`id`, `descrizione`, `colore`, `lemon_1`, `lemon_2`) VALUES
(1, 'Avviso', 'red', 'AVVISO', ''),
(2, 'Bollettino 123', 'orange', 'BOLLETTINO TD 123', ''),
(3, 'Bollettino 896', 'green', '', ''),
(4, 'Estratto conto', 'green', 'ESTRATTO', ''),
(5, 'Solleciti', 'green', 'SOLLECITO', ''),
(6, 'Mav', 'green', '', ''),
(7, 'Freccia', 'green', '', '');

-- --------------------------------------------------------

--
-- Struttura della tabella `tipo_notifica`
--

CREATE TABLE `tipo_notifica` (
  `id` tinyint(4) NOT NULL,
  `descrizione` varchar(50) NOT NULL,
  `colore` varchar(10) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;

--
-- Dump dei dati per la tabella `tipo_notifica`
--

INSERT INTO `tipo_notifica` (`id`, `descrizione`, `colore`) VALUES
(1, 'SDI', 'red'),
(2, 'PEC', 'orange'),
(3, 'SETTE ZERI', 'green');

-- --------------------------------------------------------

--
-- Struttura della tabella `tipo_pagamenti`
--

CREATE TABLE `tipo_pagamenti` (
  `id` tinyint(4) NOT NULL,
  `descrizione` varchar(50) NOT NULL,
  `colore` varchar(10) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;

--
-- Dump dei dati per la tabella `tipo_pagamenti`
--

INSERT INTO `tipo_pagamenti` (`id`, `descrizione`, `colore`) VALUES
(1, 'Contante', 'red'),
(2, 'Bonifico', 'orange'),
(3, 'Carta di Credito', 'green'),
(4, 'PayPal', 'green'),
(5, 'Assegno', 'green');

-- --------------------------------------------------------

--
-- Struttura della tabella `tipo_spedizione`
--

CREATE TABLE `tipo_spedizione` (
  `id` tinyint(4) NOT NULL,
  `id_webfruit` int(10) NOT NULL DEFAULT 0,
  `descrizione` varchar(50) NOT NULL,
  `colore` varchar(10) NOT NULL,
  `ProductAcronim` varchar(10) NOT NULL DEFAULT 'AR'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;

--
-- Dump dei dati per la tabella `tipo_spedizione`
--

INSERT INTO `tipo_spedizione` (`id`, `id_webfruit`, `descrizione`, `colore`, `ProductAcronim`) VALUES
(1, 1, 'Email', 'green', 'LEMAIL'),
(2, 2, 'Pec', 'green', 'LPEC'),
(3, 8, 'Posta ordinaria 1 (Vettore Privato)', 'green', 'LPO1VP'),
(4, 9, 'Posta ordinaria 4 (Vettore Privato)', 'green', 'LPO4VP'),
(5, 10, 'Raccomandata semplice (Vettore Privato)', 'green', 'LRSVP'),
(6, 11, 'Raccomandata A.R. (Vettore Privato)', 'green', 'LRRVP'),
(7, 12, 'Raccomandata 1 ((Vettore Privato)', 'green', 'LR1VP'),
(8, 13, 'Raccomandatra 1 PDC (Vettore Privato)', 'green', 'LR1RVP'),
(9, 14, 'Consegna pacco (Vettore Privato)', 'green', 'LCPVP'),
(10, 15, 'Affissione in bacheca (Vettore Privato)', 'green', 'LABVP'),
(11, 16, 'Svuotamento cassetta condominiale (Vettore Privato', 'green', 'LSCVP'),
(12, 17, 'Posta ordinaria 1 (Poste italiane)', 'green', 'LPO1PI'),
(13, 18, 'Raccomandata semplice (Poste Italiane)', 'green', 'LRSPI'),
(14, 19, 'Raccomandata A.R. (Poste Italiane)', 'green', 'LRRPI'),
(15, 20, 'Raccomandata 1 ((Poste Italiane)', 'green', 'LR1PI'),
(16, 21, 'Raccomandatra 1 PDC (Poste Italiane)', 'green', 'LPDCPI'),
(17, 22, 'Consegna pacco (Poste Italiane)', 'green', 'LCPPI'),
(18, 23, 'Posta ordinaria 4 (poste Italiane)', 'green', 'LPO4PI'),
(19, 24, 'Email e raccomandata RR', 'green', 'LEMRR'),
(20, 25, 'PEC e raccomandata RR', 'green', 'LPERR'),
(21, 26, 'Wathsapp e raccomandata RR', 'green', 'LWARR'),
(22, 27, 'Email e raccomandata 1 PDC', 'green', 'LEMPDC'),
(23, 28, 'PEC e raccomandata1 PDC', 'green', 'LPEPDC'),
(24, 29, 'Email e PEC', 'green', 'LEMPEC'),
(25, 30, 'Wathsapp e PEC', 'green', 'LWAPEC');

-- --------------------------------------------------------

--
-- Struttura della tabella `tipo_spedizione_vettori`
--

CREATE TABLE `tipo_spedizione_vettori` (
  `id` tinyint(4) NOT NULL,
  `id_vettore` int(10) NOT NULL DEFAULT 0,
  `acronimo_lemon` varchar(6) NOT NULL,
  `acronimo_vettore` varchar(6) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;

--
-- Dump dei dati per la tabella `tipo_spedizione_vettori`
--

INSERT INTO `tipo_spedizione_vettori` (`id`, `id_vettore`, `acronimo_lemon`, `acronimo_vettore`) VALUES
(69, 1, 'LABVP', ''),
(70, 1, 'LCPPI', 'PACCHI'),
(71, 1, 'LCPVP', 'PACCHI'),
(72, 1, 'LEMAIL', 'MAIL'),
(73, 1, 'LEMPDC', ''),
(74, 1, 'LEMPEC', ''),
(75, 1, 'LEMRR', ''),
(76, 1, 'LPDCPI', ''),
(77, 1, 'LPEC', ''),
(78, 1, 'LPEPDC', ''),
(79, 1, 'LPERR', ''),
(80, 1, 'LPO1PI', 'BUS1'),
(81, 1, 'LPO1VP', 'BUS1'),
(82, 1, 'LPO4PI', 'BUSTA'),
(83, 1, 'LPO4VP', 'BUSTA'),
(84, 1, 'LR1PI', 'R1'),
(85, 1, 'LR1RVP', ''),
(86, 1, 'LR1VP', 'AR1'),
(87, 1, 'LRRPI', 'AR'),
(88, 1, 'LRRVP', 'AR'),
(89, 1, 'LRSPI', 'RS'),
(90, 1, 'LRSVP', 'RS'),
(91, 1, 'LSCVP', ''),
(92, 1, 'LWAPEC', ''),
(93, 1, 'LWARR', '');

-- --------------------------------------------------------

--
-- Struttura della tabella `vettore_utenti`
--

CREATE TABLE `vettore_utenti` (
  `id` int(10) UNSIGNED NOT NULL,
  `id_webfruit` int(11) NOT NULL DEFAULT 0,
  `cognome_nome` varchar(254) DEFAULT NULL,
  `ragione_sociale` varchar(100) DEFAULT NULL,
  `lista_cap` varchar(255) NOT NULL,
  `nazionale` tinyint(4) NOT NULL DEFAULT 1,
  `ws_url` varchar(200) NOT NULL,
  `ws_login_url` varchar(200) NOT NULL,
  `ws_pdf_url` varchar(200) NOT NULL,
  `ws_price_url` varchar(200) NOT NULL,
  `ws_method` varchar(200) NOT NULL DEFAULT 'POST',
  `ws_login` varchar(200) NOT NULL,
  `ws_password` varchar(200) NOT NULL,
  `ws_domain` varchar(200) NOT NULL,
  `ws_file_name` varchar(200) NOT NULL,
  `url_sito_vettore` varchar(255) NOT NULL,
  `path_api_invio` varchar(255) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci COMMENT='Security: Elenco Utenti';

--
-- Dump dei dati per la tabella `vettore_utenti`
--

INSERT INTO `vettore_utenti` (`id`, `id_webfruit`, `cognome_nome`, `ragione_sociale`, `lista_cap`, `nazionale`, `ws_url`, `ws_login_url`, `ws_pdf_url`, `ws_price_url`, `ws_method`, `ws_login`, `ws_password`, `ws_domain`, `ws_file_name`, `url_sito_vettore`, `path_api_invio`) VALUES
(310, 1, 'ISOPO ALESSIO', 'POSTA E SERVIZI SRL ', '00119,00122,00122,00122,00124,00126,00141,00143,10020,10020,10020,10020,10020,10020,10020,10020,10020,10020,10020,10020,10020,10020,10020,10020,10020,10020,10020,10020,10020,10020,10020,10020,10020', 0, 'https://ws.postofficemanager.it/AddMail', 'https://ws.postofficemanager.it/Auth', 'https://ws.postofficemanager.it/AddPDF', 'https://ws.postofficemanager.it/CalcTotalPrice', 'POST', 'User_00000037', 'fWEMJHNU', 'postaservizi', '', '', '');

--
-- Indici per le tabelle scaricate
--

--
-- Indici per le tabelle `amministratori_condominio`
--
ALTER TABLE `amministratori_condominio`
  ADD PRIMARY KEY (`id`);

--
-- Indici per le tabelle `categorie_prodotti`
--
ALTER TABLE `categorie_prodotti`
  ADD PRIMARY KEY (`id`);

--
-- Indici per le tabelle `categorie_prodotti_dettaglio`
--
ALTER TABLE `categorie_prodotti_dettaglio`
  ADD PRIMARY KEY (`id`);

--
-- Indici per le tabelle `dettaglio_listini`
--
ALTER TABLE `dettaglio_listini`
  ADD PRIMARY KEY (`id`);

--
-- Indici per le tabelle `dettaglio_ordini`
--
ALTER TABLE `dettaglio_ordini`
  ADD PRIMARY KEY (`id`);

--
-- Indici per le tabelle `estratto_conto`
--
ALTER TABLE `estratto_conto`
  ADD PRIMARY KEY (`id`);

--
-- Indici per le tabelle `flussiMav`
--
ALTER TABLE `flussiMav`
  ADD PRIMARY KEY (`id`);

--
-- Indici per le tabelle `incassi`
--
ALTER TABLE `incassi`
  ADD PRIMARY KEY (`id`);

--
-- Indici per le tabelle `istitutiBancari`
--
ALTER TABLE `istitutiBancari`
  ADD PRIMARY KEY (`id`);

--
-- Indici per le tabelle `kp_listini`
--
ALTER TABLE `kp_listini`
  ADD PRIMARY KEY (`id`);

--
-- Indici per le tabelle `listini`
--
ALTER TABLE `listini`
  ADD PRIMARY KEY (`id`);

--
-- Indici per le tabelle `mail_address`
--
ALTER TABLE `mail_address`
  ADD PRIMARY KEY (`idMail`);

--
-- Indici per le tabelle `ordini`
--
ALTER TABLE `ordini`
  ADD PRIMARY KEY (`id`);

--
-- Indici per le tabelle `ordini_descrizione`
--
ALTER TABLE `ordini_descrizione`
  ADD PRIMARY KEY (`id`);

--
-- Indici per le tabelle `rate`
--
ALTER TABLE `rate`
  ADD PRIMARY KEY (`id`);

--
-- Indici per le tabelle `report_invii`
--
ALTER TABLE `report_invii`
  ADD PRIMARY KEY (`id`);

--
-- Indici per le tabelle `responsabili_utenti`
--
ALTER TABLE `responsabili_utenti`
  ADD PRIMARY KEY (`id`);

--
-- Indici per le tabelle `settaggio_896`
--
ALTER TABLE `settaggio_896`
  ADD PRIMARY KEY (`id`);

--
-- Indici per le tabelle `settaggio_buste`
--
ALTER TABLE `settaggio_buste`
  ADD PRIMARY KEY (`id`);

--
-- Indici per le tabelle `settaggio_etichette`
--
ALTER TABLE `settaggio_etichette`
  ADD PRIMARY KEY (`id`);

--
-- Indici per le tabelle `stato_attivazione`
--
ALTER TABLE `stato_attivazione`
  ADD PRIMARY KEY (`id`);

--
-- Indici per le tabelle `testata_report_invii`
--
ALTER TABLE `testata_report_invii`
  ADD PRIMARY KEY (`id`);

--
-- Indici per le tabelle `testi_personalizzati`
--
ALTER TABLE `testi_personalizzati`
  ADD PRIMARY KEY (`id`);

--
-- Indici per le tabelle `tipo_documento`
--
ALTER TABLE `tipo_documento`
  ADD PRIMARY KEY (`id`);

--
-- Indici per le tabelle `tipo_notifica`
--
ALTER TABLE `tipo_notifica`
  ADD PRIMARY KEY (`id`);

--
-- Indici per le tabelle `tipo_pagamenti`
--
ALTER TABLE `tipo_pagamenti`
  ADD PRIMARY KEY (`id`);

--
-- Indici per le tabelle `vettore_utenti`
--
ALTER TABLE `vettore_utenti`
  ADD PRIMARY KEY (`id`);

--
-- AUTO_INCREMENT per le tabelle scaricate
--

--
-- AUTO_INCREMENT per la tabella `amministratori_condominio`
--
ALTER TABLE `amministratori_condominio`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT per la tabella `categorie_prodotti`
--
ALTER TABLE `categorie_prodotti`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- AUTO_INCREMENT per la tabella `categorie_prodotti_dettaglio`
--
ALTER TABLE `categorie_prodotti_dettaglio`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8;

--
-- AUTO_INCREMENT per la tabella `dettaglio_listini`
--
ALTER TABLE `dettaglio_listini`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=136;

--
-- AUTO_INCREMENT per la tabella `dettaglio_ordini`
--
ALTER TABLE `dettaglio_ordini`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT per la tabella `estratto_conto`
--
ALTER TABLE `estratto_conto`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT per la tabella `flussiMav`
--
ALTER TABLE `flussiMav`
  MODIFY `id` mediumint(9) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT per la tabella `incassi`
--
ALTER TABLE `incassi`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT per la tabella `istitutiBancari`
--
ALTER TABLE `istitutiBancari`
  MODIFY `id` bigint(20) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT per la tabella `kp_listini`
--
ALTER TABLE `kp_listini`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT per la tabella `listini`
--
ALTER TABLE `listini`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=22;

--
-- AUTO_INCREMENT per la tabella `mail_address`
--
ALTER TABLE `mail_address`
  MODIFY `idMail` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT per la tabella `ordini`
--
ALTER TABLE `ordini`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT per la tabella `ordini_descrizione`
--
ALTER TABLE `ordini_descrizione`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT per la tabella `rate`
--
ALTER TABLE `rate`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT per la tabella `report_invii`
--
ALTER TABLE `report_invii`
  MODIFY `id` bigint(20) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT per la tabella `responsabili_utenti`
--
ALTER TABLE `responsabili_utenti`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT per la tabella `settaggio_896`
--
ALTER TABLE `settaggio_896`
  MODIFY `id` int(10) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=30;

--
-- AUTO_INCREMENT per la tabella `settaggio_buste`
--
ALTER TABLE `settaggio_buste`
  MODIFY `id` int(10) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=59;

--
-- AUTO_INCREMENT per la tabella `settaggio_etichette`
--
ALTER TABLE `settaggio_etichette`
  MODIFY `id` int(10) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=42;

--
-- AUTO_INCREMENT per la tabella `testata_report_invii`
--
ALTER TABLE `testata_report_invii`
  MODIFY `id` bigint(20) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT per la tabella `testi_personalizzati`
--
ALTER TABLE `testi_personalizzati`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT per la tabella `tipo_documento`
--
ALTER TABLE `tipo_documento`
  MODIFY `id` tinyint(4) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8;

--
-- AUTO_INCREMENT per la tabella `tipo_pagamenti`
--
ALTER TABLE `tipo_pagamenti`
  MODIFY `id` tinyint(4) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;

--
-- AUTO_INCREMENT per la tabella `vettore_utenti`
--
ALTER TABLE `vettore_utenti`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=311;
COMMIT;

/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
