1107 lines
37 KiB
Java
1107 lines
37 KiB
Java
|
|
package it.acxent.anag;
|
||
|
|
|
||
|
|
import com.lowagie.text.Cell;
|
||
|
|
import com.lowagie.text.Chunk;
|
||
|
|
import com.lowagie.text.Document;
|
||
|
|
import com.lowagie.text.Element;
|
||
|
|
import com.lowagie.text.Font;
|
||
|
|
import com.lowagie.text.Image;
|
||
|
|
import com.lowagie.text.Table;
|
||
|
|
import com.lowagie.text.pdf.PdfPCell;
|
||
|
|
import com.lowagie.text.pdf.PdfPTable;
|
||
|
|
import com.lowagie.text.pdf.PdfWriter;
|
||
|
|
import it.acxent.cart.Cart;
|
||
|
|
import it.acxent.common.Parm;
|
||
|
|
import it.acxent.common.SimboliLavaggio;
|
||
|
|
import it.acxent.common.TtFont;
|
||
|
|
import it.acxent.contab.TipoDocumento;
|
||
|
|
import it.acxent.db.ApplParmFull;
|
||
|
|
import it.acxent.db.DBAdapter;
|
||
|
|
import it.acxent.db.ResParm;
|
||
|
|
import it.acxent.util.PdfFontFactory;
|
||
|
|
import it.acxent.util.StringTokenizer;
|
||
|
|
import java.awt.Color;
|
||
|
|
import java.io.File;
|
||
|
|
import java.util.Calendar;
|
||
|
|
|
||
|
|
public class _AnagAdapter extends DBAdapter {
|
||
|
|
public static String KEY_ENCODE_DIZ = "Xg3Z5sFQ";
|
||
|
|
|
||
|
|
public static final long SF_BOZZA = 0L;
|
||
|
|
|
||
|
|
public static final long SF_EMESSA = 1L;
|
||
|
|
|
||
|
|
public static final long SF_REG_IVA = 2L;
|
||
|
|
|
||
|
|
public static final String P_CC_LIMITA_AMM = "CC_LIMITA_AMM";
|
||
|
|
|
||
|
|
public static final String P_CC_CHECK_AVAIL = "CC_CHECK_AVAIL";
|
||
|
|
|
||
|
|
public static final String P_CC_QTA_LOW = "CC_QTA_LOW";
|
||
|
|
|
||
|
|
public static final String P_CC_SOSPENDI_DOPO_N_GG_NO_IMPORT = "CC_SOSPENDI_DOPO_N_GG_NO_IMPORT";
|
||
|
|
|
||
|
|
public static final String P_CC_ARROTONDA_PREZZO_A_EURO_SOPRA = "CC_ARROTONDA_PREZZO_A_EURO_SOPRA";
|
||
|
|
|
||
|
|
public static final String P_CC_ARROTONDA_DECIMALE_PER_PREZZI_BASSI = "CC_ARROTONDA_DECIMALE_PER_PREZZI_BASSI";
|
||
|
|
|
||
|
|
public static final String P_CC_RICARICO_MINIMO_OFFERTE = "CC_RICARICO_MINIMO_OFFERTE";
|
||
|
|
|
||
|
|
public static final String P_CC_LINK_WEB_CON_MARCA = "CC_LINK_WEB_CON_MARCA";
|
||
|
|
|
||
|
|
public static final String P_CC_N_ORDINI_WWW_AL_GIORNO = "CC_N_ORDINI_WWW_AL_GIORNO";
|
||
|
|
|
||
|
|
public static final String P_GOOGLE_USE_SFTP = "GOOGLE_USE_SFTP";
|
||
|
|
|
||
|
|
public static final String P_GOOGLE_FTP_USER = "GOOGLE_FTP_USER";
|
||
|
|
|
||
|
|
public static final String P_GOOGLE_FTP_PASSWORD = "GOOGLE_FTP_PASSWORD";
|
||
|
|
|
||
|
|
public static final String P_GOOGLE_PREZZO_PUBBLICO_MINIMO_X_EXPORT = "GOOGLE_PREZZO_PUBBLICO_MINIMO_X_EXPORT";
|
||
|
|
|
||
|
|
public static final String P_GOOGLE_QTA_MINIMA_X_EXPORT = "GOOGLE_QTA_MINIMA_X_EXPORT";
|
||
|
|
|
||
|
|
public static final String C_GOOGLE_FTP_SERVER = "uploads.google.com";
|
||
|
|
|
||
|
|
public static final String C_GOOGLE_SFTP_SERVER = "partnerupload.google.com";
|
||
|
|
|
||
|
|
public static final String C_GOOGLE_SFTP_KNOWN_HOSTS = "[partnerupload.google.com]:19321 ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDUvACPnrXEiscmd7NoP7diO1w3uP9uGJ55/SDL5eviKZhy/WLTLMGRcJDWj3GPRVdAy2xVVOU4IxUIK8nxdZP5O0s5bJVzT2XRP4IXYKUrPn7AkQlnifP7M0InAMnK7S1KHvwBgWBaGfb0OBeI46a+iKBduCMD9xER6ymTVbcgNzt1o52vNGTUiQp28Q5jUBs3yvQ8Ag7d4U0qEioV95ef4AbjDwO8jV09hQGjBIsTZoMo2Tmo+FVKah2YO0+QFKe1pk5zL2nXlgF7hUxN65lIeS3PhRZzVF80Qe5vXjjuKfiJVkBdSxLoq84uXx6XCjvWci2JbTUbsavoaDO3VBy5";
|
||
|
|
|
||
|
|
public static final int C_GOOGLE_SFTP_PORT = 19321;
|
||
|
|
|
||
|
|
public static final String P_GOOGLE_SIGNIN_ENABLE = "GOOGLE_SIGNIN_ENABLE";
|
||
|
|
|
||
|
|
public static final String P_GOOGLE_SIGNIN_CLIENT_ID = "GOOGLE_SIGNIN_CLIENT_ID";
|
||
|
|
|
||
|
|
public static final String P_FACEBOOK_SIGNIN_ENABLE = "FACEBOOK_SIGNIN_ENABLE";
|
||
|
|
|
||
|
|
public static final String P_FACEBOOK_SIGNIN_CLIENT_ID = "FACEBOOK_SIGNIN_CLIENT_ID";
|
||
|
|
|
||
|
|
public static final String P_FACEBOOK_SIGNIN_SECRET_KEY = "FACEBOOK_SIGNIN_SECRET_KEY";
|
||
|
|
|
||
|
|
public static final String P_SEISOFT_CONTO_RM_IVA_ESENTE = "SEISOFT_CONTO_RM_IVA_ESENTE";
|
||
|
|
|
||
|
|
public static final String P_SEISOFT_CONTO_NOL_AZ = "SEISOFT_CONTO_NOL_AZ";
|
||
|
|
|
||
|
|
public static final String P_SEISOFT_CONTO_RM_IVA_VEND = "SEISOFT_CONTO_RM_IVA_VEND";
|
||
|
|
|
||
|
|
public static final String P_SEISOFT_CONTO_NOL_PRIV = "SEISOFT_CONTO_NOL_PRIV";
|
||
|
|
|
||
|
|
public static final String P_SEISOFT_CONTO_SPESE = "SEISOFT_CONTO_SPESE";
|
||
|
|
|
||
|
|
public static final String P_SEISOFT_CONTO_VEND_AZ = "SEISOFT_CONTO_VEND_AZ";
|
||
|
|
|
||
|
|
public static final String P_SEISOFT_CONTO_VEND_PRIV = "SEISOFT_CONTO_VEND_PRIV";
|
||
|
|
|
||
|
|
public static final String P_SEISOFT_CONTO_VEND_PRIV_USATO = "SEISOFT_CONTO_VEND_PRIV_USATO";
|
||
|
|
|
||
|
|
public static final String P_SEISOFT_CONTO_VEND_AZ_USATO = "SEISOFT_CONTO_VEND_AZ_USATO";
|
||
|
|
|
||
|
|
public static final String P_ORDINI_WEB_ORE_ANNULLAMENTO = "ORDINI_WEB_ORE_ANNULLAMENTO";
|
||
|
|
|
||
|
|
public static final String P_QTA_MINIMA_VISIBILE = "QTA_MINIMA_VISIBILE";
|
||
|
|
|
||
|
|
public static final String P_WEB_SEND_ORDER_MAIL_CODE = "WEB_SEND_ORDER_MAIL_CODE";
|
||
|
|
|
||
|
|
public static final String P_VARIANTI = "VARIANTI";
|
||
|
|
|
||
|
|
public static final String P_MSG_AVVISO_RIP_SMS = "MSG_AVVISO_RIP_SMS";
|
||
|
|
|
||
|
|
public static final String P_MAIL_INVIO_DOC = "MAIL_INVIO_DOC";
|
||
|
|
|
||
|
|
public static final String P_ART_SIMBOLI_LAVAGGIO_DEFAULT = "ART_SIMBOLI_LAVAGGIO_DEFAULT";
|
||
|
|
|
||
|
|
public static final String P_PATH_IMG_TIPO = "PATH_IMG_TIPO";
|
||
|
|
|
||
|
|
public static final String P_PATH_IMG_TAB_TAG = "PATH_IMG_TAB_TAG";
|
||
|
|
|
||
|
|
public static final String P_SERIALI_UNIVOCI = "SERIALI_UNIVOCI";
|
||
|
|
|
||
|
|
public static final String P_USE_SEARCH_LAST_2_OCCURRENCE = "USE_SEARCH_LAST_2_OCCURRENCE";
|
||
|
|
|
||
|
|
public static final String P_CASSA_STAMPA_DISPLAY1 = "CASSA_STAMPA_DISPLAY1";
|
||
|
|
|
||
|
|
public static final String P_CASSA_STAMPA_PROMO = "CASSA_STAMPA_PROMO";
|
||
|
|
|
||
|
|
public static final String P_CASSA_STAMPA_DISPLAY = "CASSA_STAMPA_DISPLAY";
|
||
|
|
|
||
|
|
public static final String P_AZIENDA_CODICE_SIA = "AZIENDA_CODICE_SIA";
|
||
|
|
|
||
|
|
public static final String P_AZIENDA_PIVA = "AZIENDA_PIVA";
|
||
|
|
|
||
|
|
public static final String P_PATH_FILE_RIBA = "PATH_FILE_RIBA";
|
||
|
|
|
||
|
|
public static final String P_CODICE_TIPO_TESSUTO_STD = "CODICE_TIPO_TESSUTO_STD";
|
||
|
|
|
||
|
|
public static final String P_ANAG_DESC_COMPLETA_CON_TIPO = "ANAG_DESC_COMPLETA_CON_TIPO";
|
||
|
|
|
||
|
|
public static final String P_ARTICOLO_CLIENTE = "ARTICOLO_CLIENTE";
|
||
|
|
|
||
|
|
public static final String P_B2B = "B2B";
|
||
|
|
|
||
|
|
protected static final float[] colWidthsRighe20 = new float[] {
|
||
|
|
5.0F, 5.0F, 5.0F, 5.0F, 5.0F, 5.0F, 5.0F, 5.0F, 5.0F, 5.0F,
|
||
|
|
5.0F, 5.0F, 5.0F, 5.0F, 5.0F, 5.0F, 5.0F, 5.0F, 5.0F, 5.0F };
|
||
|
|
|
||
|
|
protected static final float[] colWidthsRighe40 = new float[] {
|
||
|
|
2.5F, 2.5F, 2.5F, 2.5F, 2.5F, 2.5F, 2.5F, 2.5F, 2.5F, 2.5F,
|
||
|
|
2.5F, 2.5F, 2.5F, 2.5F, 2.5F, 2.5F, 2.5F, 2.5F, 2.5F, 2.5F,
|
||
|
|
2.5F, 2.5F, 2.5F, 2.5F, 2.5F, 2.5F, 2.5F, 2.5F, 2.5F, 2.5F,
|
||
|
|
2.5F, 2.5F, 2.5F, 2.5F, 2.5F, 2.5F, 2.5F, 2.5F, 2.5F, 2.5F };
|
||
|
|
|
||
|
|
public static final Font PDF_fGrandissimo = PdfFontFactory.PDF_fGrandissimo;
|
||
|
|
|
||
|
|
public static final Font PDF_fGrandissimoB = PdfFontFactory.PDF_fGrandissimoB;
|
||
|
|
|
||
|
|
public static final Font PDF_fGrandissimoBianco = PdfFontFactory.PDF_fGrandissimoBianco;
|
||
|
|
|
||
|
|
public static final Font PDF_fGrandissimoBlu = PdfFontFactory.PDF_fGrandissimoBlu;
|
||
|
|
|
||
|
|
public static final Font PDF_fGrandissimoRouge = PdfFontFactory.PDF_fGrandissimoRouge;
|
||
|
|
|
||
|
|
public static final Font PDF_fGrande = PdfFontFactory.PDF_fGrande;
|
||
|
|
|
||
|
|
public static final Font PDF_fGrandeB = PdfFontFactory.PDF_fGrandeB;
|
||
|
|
|
||
|
|
public static final Font PDF_fGrandeBianco = PdfFontFactory.PDF_fGrandeBianco;
|
||
|
|
|
||
|
|
public static final Font PDF_fGrandeBlu = PdfFontFactory.PDF_fGrandeBlu;
|
||
|
|
|
||
|
|
public static final Font PDF_fGrandeRouge = PdfFontFactory.PDF_fGrandeRouge;
|
||
|
|
|
||
|
|
public static final Font PDF_fIntestazione = PdfFontFactory.PDF_fIntestazione;
|
||
|
|
|
||
|
|
public static final Font PDF_fMedio = PdfFontFactory.PDF_fMedio;
|
||
|
|
|
||
|
|
public static final Font PDF_fMedioB = PdfFontFactory.PDF_fMedioB;
|
||
|
|
|
||
|
|
public static final Font PDF_fMedioBianco = PdfFontFactory.PDF_fMedioBianco;
|
||
|
|
|
||
|
|
public static final Font PDF_fMedioBlu = PdfFontFactory.PDF_fMedioBlu;
|
||
|
|
|
||
|
|
public static final Font PDF_fMedioRosso = PdfFontFactory.PDF_fMedioRosso;
|
||
|
|
|
||
|
|
public static final Font PDF_fMedioRouge = PdfFontFactory.PDF_fMedioRouge;
|
||
|
|
|
||
|
|
public static final Font PDF_fPiccolissimo = PdfFontFactory.PDF_fPiccolissimo;
|
||
|
|
|
||
|
|
public static final Font PDF_fPiccolissimo6 = PdfFontFactory.PDF_fPiccolissimo6;
|
||
|
|
|
||
|
|
public static final Font PDF_fPiccolissimoB = PdfFontFactory.PDF_fPiccolissimoB;
|
||
|
|
|
||
|
|
public static final Font PDF_fPiccolo = PdfFontFactory.PDF_fPiccolo;
|
||
|
|
|
||
|
|
public static final Font PDF_fPiccoloB = PdfFontFactory.PDF_fPiccoloB;
|
||
|
|
|
||
|
|
public static final Font PDF_fPiccoloBianco = PdfFontFactory.PDF_fPiccoloBianco;
|
||
|
|
|
||
|
|
public static final Font PDF_fPiccoloBlu = PdfFontFactory.PDF_fPiccoloBlu;
|
||
|
|
|
||
|
|
public static final Font PDF_fPiccoloRosso = PdfFontFactory.PDF_fPiccoloRosso;
|
||
|
|
|
||
|
|
public static final Font PDF_H_Grandissimo = PdfFontFactory.PDF_H_Grandissimo;
|
||
|
|
|
||
|
|
public static final Font PDF_H_GrandissimoB = PdfFontFactory.PDF_H_GrandissimoB;
|
||
|
|
|
||
|
|
public static final Font PDF_H_GrandissimoBianco = PdfFontFactory.PDF_H_GrandissimoBianco;
|
||
|
|
|
||
|
|
public static final Font PDF_H_GrandissimoBlu = PdfFontFactory.PDF_H_GrandissimoBlu;
|
||
|
|
|
||
|
|
public static final Font PDF_H_GrandissimoRouge = PdfFontFactory.PDF_H_GrandissimoRouge;
|
||
|
|
|
||
|
|
public static final Font PDF_H_Grande = PdfFontFactory.PDF_H_Grande;
|
||
|
|
|
||
|
|
public static final Font PDF_H_GrandeB = PdfFontFactory.PDF_H_GrandeB;
|
||
|
|
|
||
|
|
public static final Font PDF_H_GrandeBianco = PdfFontFactory.PDF_H_GrandeBianco;
|
||
|
|
|
||
|
|
public static final Font PDF_H_GrandeBlu = PdfFontFactory.PDF_H_GrandeBlu;
|
||
|
|
|
||
|
|
public static final Font PDF_H_GrandeRouge = PdfFontFactory.PDF_H_GrandeRouge;
|
||
|
|
|
||
|
|
public static final Font PDF_H_Intestazione = PdfFontFactory.PDF_H_Intestazione;
|
||
|
|
|
||
|
|
public static final Font PDF_H_Medio = PdfFontFactory.PDF_H_Medio;
|
||
|
|
|
||
|
|
public static final Font PDF_H_MedioB = PdfFontFactory.PDF_H_MedioB;
|
||
|
|
|
||
|
|
public static final Font PDF_H_MedioBianco = PdfFontFactory.PDF_H_MedioBianco;
|
||
|
|
|
||
|
|
public static final Font PDF_H_MedioBlu = PdfFontFactory.PDF_H_MedioBlu;
|
||
|
|
|
||
|
|
public static final Font PDF_H_MedioRosso = PdfFontFactory.PDF_H_MedioRosso;
|
||
|
|
|
||
|
|
public static final Font PDF_H_MedioRouge = PdfFontFactory.PDF_H_MedioRouge;
|
||
|
|
|
||
|
|
public static final Font PDF_H_Piccolissimo = PdfFontFactory.PDF_H_Piccolissimo;
|
||
|
|
|
||
|
|
public static final Font PDF_H_Piccolissimo6 = PdfFontFactory.PDF_H_Piccolissimo6;
|
||
|
|
|
||
|
|
public static final Font PDF_A_PiccolissimoB = PdfFontFactory.PDF_A_PiccolissimoB;
|
||
|
|
|
||
|
|
public static final Font PDF_A_Piccolo = PdfFontFactory.PDF_A_Piccolo;
|
||
|
|
|
||
|
|
public static final Font PDF_A_PiccoloB = PdfFontFactory.PDF_A_PiccoloB;
|
||
|
|
|
||
|
|
public static final Font PDF_A_PiccoloBianco = PdfFontFactory.PDF_A_PiccoloBianco;
|
||
|
|
|
||
|
|
public static final Font PDF_A_PiccoloBlu = PdfFontFactory.PDF_A_PiccoloBlu;
|
||
|
|
|
||
|
|
public static final Font PDF_A_PiccoloRosso = PdfFontFactory.PDF_A_PiccoloRosso;
|
||
|
|
|
||
|
|
protected PdfPTable pdfPcorpo;
|
||
|
|
|
||
|
|
protected Document document;
|
||
|
|
|
||
|
|
protected PdfWriter writer;
|
||
|
|
|
||
|
|
protected Table pdfcorpo;
|
||
|
|
|
||
|
|
public static final String P_ORDINI_WWW_USA_PROG_WWW = "ORDINI_WWW_USA_PROG_WWW";
|
||
|
|
|
||
|
|
public static final String P_ID_DOC_CASSA = "ID_DOC_CASSA";
|
||
|
|
|
||
|
|
public static final String P_LABEL_ANAG_A4_MARGINE = "LABEL_ANAG_A4_MARGINE";
|
||
|
|
|
||
|
|
public static final String P_LABEL_ANAG_A4_COL_ROW = "LABEL_ANAG_A4_COL_ROW";
|
||
|
|
|
||
|
|
public static final String P_LABEL_ART_A4_MARGINE = "LABEL_ART_A4_MARGINE";
|
||
|
|
|
||
|
|
public static final String P_LABEL_ART_A4_COL_ROW = "LABEL_ART_A4_COL_ROW";
|
||
|
|
|
||
|
|
public static final String P_LABEL_PK_LIST_A4_ZEBRA = "LABEL_PK_LIST_A4_ZEBRA";
|
||
|
|
|
||
|
|
public static final String P_LABEL_PK_LIST_A4_COL_ROW = "LABEL_PK_LIST_A4_COL_ROW";
|
||
|
|
|
||
|
|
public static final String P_LABEL_PK_LIST_A4_MARGINE = "LABEL_PK_LIST_A4_MARGINE";
|
||
|
|
|
||
|
|
public static final String P_LABEL_ART_FONT_SIZE = "LABEL_ART_FONT_SIZE";
|
||
|
|
|
||
|
|
public static final String P_LABEL_ART_SIZE = "LABEL_ART_SIZE";
|
||
|
|
|
||
|
|
public static final String P_SCONTO_3_PERCENTUALI = "SCONTO_3_PERCENTUALI";
|
||
|
|
|
||
|
|
public static final String P_STAMPA_BORDI_COLONNE_DOCUMENTO = "STAMPA_BORDI_COLONNE_DOCUMENTO";
|
||
|
|
|
||
|
|
public static final String P_DATA_FATTURA_PRIMA_DISPONIBILE = "DATA_FATTURA_PRIMA_DISPONIBILE";
|
||
|
|
|
||
|
|
public static final String P_DOC_POSIZIONE_NOTA = "DOC_POSIZIONE_NOTA";
|
||
|
|
|
||
|
|
public static final String P_BLOCCO_FATTURE_EMSTA = "BLOCCO_FATTURE_EMSTA";
|
||
|
|
|
||
|
|
public static final String P_DOC_BANCA_APPOGGIO_IBAN = "DOC_BANCA_APPOGGIO_IBAN";
|
||
|
|
|
||
|
|
public static final String P_DOC_BANCA_APPOGGIO_DESC = "DOC_BANCA_APPOGGIO_DESC";
|
||
|
|
|
||
|
|
public static final String P_USA_MAGAZZINO_SU_ARTICOLI = "USA_MAGAZZINO";
|
||
|
|
|
||
|
|
public static final String P_USA_QUANTITA_INTERE = "USA_QUANTITA_INTERE";
|
||
|
|
|
||
|
|
public static final String P_STORNO_ORDINE_A_FORNITORE = "STORNO_ORDINE_A_FORNITORE";
|
||
|
|
|
||
|
|
public static final Font PDF_fMedioGrigio = PdfFontFactory.PDF_fMedioGrigio;
|
||
|
|
|
||
|
|
public static final String P_TAGLIE = "TAGLIE";
|
||
|
|
|
||
|
|
public static final String P_PROGETTISTA_ARTICOLO = "PROGETTISTA_ARTICOLO";
|
||
|
|
|
||
|
|
public static final String P_CASSA_STAMPA_DISPLAY_TIMEOUT = "CASSA_STAMPA_DISPLAY_TIMEOUT";
|
||
|
|
|
||
|
|
public static final String P_DOC_BCC = "DOC_BCC";
|
||
|
|
|
||
|
|
public static final String P_OTTIMIZZO = "OTTIMIZZO";
|
||
|
|
|
||
|
|
public static final String P_PATH_IMG_ART = "PATH_IMG_ART";
|
||
|
|
|
||
|
|
public static final String P_MSG_ORDINE_SPEDITO = "MSG_ORDINE_SPEDITO";
|
||
|
|
|
||
|
|
public static final String P_ID_DOC_ORDINE = "ID_DOC_ORDINE";
|
||
|
|
|
||
|
|
public static final String P_ID_DOC_ORDINE_TAGLIO = "ID_DOC_ORDINE_TAGLIO";
|
||
|
|
|
||
|
|
public static final String P_LABEL_ART_ACC_FONT_SIZE = "LABEL_ART_ACC_FONT_SIZE";
|
||
|
|
|
||
|
|
public static final String P_LABEL_ART_A4_ZEBRA = "LABEL_ART_A4_ZEBRA";
|
||
|
|
|
||
|
|
public static final String P_LABEL_PK_LIST_FONT_SIZE = "LABEL_PK_LIST_FONT_SIZE";
|
||
|
|
|
||
|
|
public static final String P_LABEL_ANAG_SIZE = "LABEL_ANAG_SIZE";
|
||
|
|
|
||
|
|
public static final String P_LABEL_PK_LIST_SIZE = "LABEL_PK_LIST_SIZE";
|
||
|
|
|
||
|
|
public static final String P_LABEL_ANAG_FONT_SIZE = "LABEL_ANAG_FONT_SIZE";
|
||
|
|
|
||
|
|
public static final String P_ART_ATTACH_PATH = "ART_ATTACH_PATH";
|
||
|
|
|
||
|
|
public static final String P_TMPL_MSG_ATTACH_PATH = "TMPL_MSG_ATTACH_PATH";
|
||
|
|
|
||
|
|
public static final String P_MAIL_ADMIN_SCAD_CI = "MAIL_ADMIN_SCAD_CI";
|
||
|
|
|
||
|
|
public static final String P_ID_DOC_ORDINE_WWW = "ID_DOC_ORDINE_WWW";
|
||
|
|
|
||
|
|
public static final String P_ID_DOC_FT_NOLEGGIO = "ID_DOC_FT_NOLEGGIO";
|
||
|
|
|
||
|
|
public static final String P_MAILING_LIST_ON = "MAIL_LIST_ON";
|
||
|
|
|
||
|
|
public static final String P_CLIFOR_ATTACH_PATH = "CLIFOR_ATTACH_PATH";
|
||
|
|
|
||
|
|
public static final String P_DOC_ATTACH_PATH = "DOC_ATTACH_PATH";
|
||
|
|
|
||
|
|
public static final String P_PATH_IMG_BANNER = "PATH_IMG_BANNER";
|
||
|
|
|
||
|
|
public static final String P_MAILING_LIST_MAIL_CR = "MAIL_LIST_MAIL_CR";
|
||
|
|
|
||
|
|
public static final String P_MAILING_LIST_FILE_CR = "MAIL_LIST_FILE_CR";
|
||
|
|
|
||
|
|
public static final String P_MSG_AVVISO_PREN_EMAIL = "MSG_AVVISO_PREN_EMAIL";
|
||
|
|
|
||
|
|
public static final String P_MSG_AVVISO_PREN_SMS = "MSG_AVVISO_PREN_SMS";
|
||
|
|
|
||
|
|
public static final String P_RIP_NOTA_SCHEDA_RIPARAZIONE = "RIP_NOTA_SCHEDA_RIPARAZIONE";
|
||
|
|
|
||
|
|
public static final String P_RIP_NOTA_ACCETTAZIONE_PREVENTIVO = "RIP_NOTA_ACCETTAZIONE_PREVENTIVO";
|
||
|
|
|
||
|
|
public static final String P_DOC_ARTICOLI_CON_CODICE = "DOC_ARTICOLI_CON_CODICE";
|
||
|
|
|
||
|
|
public static final String P_DOC_ARTICOLI_CON_TIPO = "DOC_ARTICOLI_CON_TIPO";
|
||
|
|
|
||
|
|
public static final String P_ID_DOC_RIPARAZIONE = "ID_DOC_RIPARAZIONE";
|
||
|
|
|
||
|
|
public static final String P_MSG_AVVISO_RIP_EMAIL = "MSG_AVVISO_RIP_EMAIL";
|
||
|
|
|
||
|
|
public static final String P_HEAD_SLIP = "HEAD_SLIP";
|
||
|
|
|
||
|
|
public static final String P_ID_DOC_PRENOTAZIONE = "ID_DOC_PRENOTAZIONE";
|
||
|
|
|
||
|
|
public static final String P_ID_DOC_RICEVUTA = "ID_DOC_RICEVUTA";
|
||
|
|
|
||
|
|
public static final String P_COSTO_STIRO_DEFAULT = "COSTO_STIRO_DEFAULT";
|
||
|
|
|
||
|
|
public static final String P_COSTO_SPESE_FISSE_DEFAULT = "COSTO_SPESE_FISSE_DEFAULT";
|
||
|
|
|
||
|
|
public static final String P_PERC_RICARICO_DEFAULT = "PERC_RICARICO_DEFAULT";
|
||
|
|
|
||
|
|
public static final String P_SMS_SERVER = "SMS_SERVER";
|
||
|
|
|
||
|
|
public static final String P_CODA_MESSAGGI_PATH_IMG_MSG = "CODA_MESSAGGI_PATH_IMG_MSG";
|
||
|
|
|
||
|
|
public static final String P_CODA_MESSAGGI_EMAIL_DELAY = "CODA_MESSAGGI_EMAIL_DELAY";
|
||
|
|
|
||
|
|
public static final String P_CODA_MESSAGGI_IMG_URL_BASE = "CODA_MESSAGGI_IMG_URL_BASE";
|
||
|
|
|
||
|
|
public static final String P_CODA_MESSAGGI_SMS_DELAY = "CODA_MESSAGGI_SMS_DELAY";
|
||
|
|
|
||
|
|
public static final String P_CODA_MESSAGGI_USE_EMBEDDED_IMG = "CODA_MESSAGGI_USE_EMBEDDED_IMG";
|
||
|
|
|
||
|
|
public static final String CODA_MESSAGGI_PATH_IMG_MSG = "_img/_imgMsg";
|
||
|
|
|
||
|
|
public static final String P_CODA_MESSAGGI_USE_OPEN_TAG = "CODA_MESSAGGI_USE_OPEN_TAG";
|
||
|
|
|
||
|
|
public static final String P_CODA_MESSAGGI_ATTACH_PATH = "CODA_MESSAGGI_ATTACH_PATH";
|
||
|
|
|
||
|
|
public static final String P_CODA_MESSAGGI_MAIL_FROM = "CODA_MESSAGGI_MAIL_FROM";
|
||
|
|
|
||
|
|
public static final String P_DOC_FONT_ROW_SIZE = "DOC_FONT_ROW_SIZE";
|
||
|
|
|
||
|
|
public static final String P_PERC_RIT_ACCONTO = "PERC_RITENUTA_ACCONTO";
|
||
|
|
|
||
|
|
public static final String P_PERC_CONT_INTEGRATIVO = "PERC_CONT_INTEGRATIVO";
|
||
|
|
|
||
|
|
public static final String P_SMS_PORT = "SMS_PORT";
|
||
|
|
|
||
|
|
public static final String P_SMS_PDU = "SMS_PDU";
|
||
|
|
|
||
|
|
public static final String P_IMPORT_FILE = "ART_IMPORT_FILE";
|
||
|
|
|
||
|
|
public static final String P_MSG_EMAIL_FROM = "MSG_EMAIL_FROM";
|
||
|
|
|
||
|
|
public static final String P_PREZZO_CON_IVA = "PREZZO_CON_IVA";
|
||
|
|
|
||
|
|
public static final Font PDF_fPiccolissimo4B = PdfFontFactory.PDF_fPiccolissimo4B;
|
||
|
|
|
||
|
|
public static final Font PDF_fPiccolissimo5 = PdfFontFactory.PDF_fPiccolissimo5;
|
||
|
|
|
||
|
|
public static final Font PDF_fPiccolissimo6B = PdfFontFactory.PDF_fPiccolissimo6B;
|
||
|
|
|
||
|
|
public static final Font PDF_fPiccolissimo4 = PdfFontFactory.PDF_fPiccolissimo4;
|
||
|
|
|
||
|
|
public static final Font PDF_fPiccolissimo5B = PdfFontFactory.PDF_fPiccolissimo5B;
|
||
|
|
|
||
|
|
public static final String P_DESC_SCONTRINO_FULL = "DESC_SCONTRINO_FULL";
|
||
|
|
|
||
|
|
public static final String P_TAGLIE_LINGUE = "TAGLIE_LINGUE";
|
||
|
|
|
||
|
|
public static final String P_DOC_LEADROW = "DOC_LEADROW";
|
||
|
|
|
||
|
|
public static final String P_DOC_FIRMA_INVIO_FATTURA = "DOC_FIRMA_INVIO_FATTURA";
|
||
|
|
|
||
|
|
public static final String P_HEAD_DOC = "HEAD_DOC";
|
||
|
|
|
||
|
|
public static final String P_TIPO_PAG_SCONTRINO_CON_FATTURA = "TIPO_PAG_SC_CON_FT";
|
||
|
|
|
||
|
|
public static final String P_FOOT_DOC = "FOOT_DOC";
|
||
|
|
|
||
|
|
public static final String P_ESERCIZIO = "ESERCIZIO";
|
||
|
|
|
||
|
|
public static final String P_DBNAME2 = "DBNAME2";
|
||
|
|
|
||
|
|
public static final String P_DBDRIVER2 = "DBDRIVER2";
|
||
|
|
|
||
|
|
public static final String P_USER2 = "USER2";
|
||
|
|
|
||
|
|
public static final String P_PASSWORD2 = "PASSWORD2";
|
||
|
|
|
||
|
|
public static final String P_TESSUTI = "TESSUTI";
|
||
|
|
|
||
|
|
public static final String P_IMMOBILI = "IMMOBILI";
|
||
|
|
|
||
|
|
public static final String P_ASTE = "ASTE";
|
||
|
|
|
||
|
|
public static final String P_DESTINAZIONE = "DESTINAZIONE";
|
||
|
|
|
||
|
|
public static final String P_STAMPA_NOME_DOCUMENTO = "STAMPA_NOME_DOCUMENTO";
|
||
|
|
|
||
|
|
public static final String P_STAMPA_INDENTAZIONE = "STAMPA_INDENTAZIONE";
|
||
|
|
|
||
|
|
public static final String P_SMS_URL = "SMS_URL";
|
||
|
|
|
||
|
|
public static final String P_SMS_USER = "SMS_USER";
|
||
|
|
|
||
|
|
public static final String P_SMS_PASS = "SMS_PASS";
|
||
|
|
|
||
|
|
public static final String P_TIPO_FATTURE_VENDITA = "TIPO_FATTURE_VENDITA";
|
||
|
|
|
||
|
|
public static final String P_TIPO_FATTURE_ACQUISTO = "TIPO_FATTURE_ACQUISTO";
|
||
|
|
|
||
|
|
public static final String P_RIGA_DOC_CODICE_ARTICOLO_ESPLICITO = "RIGA_DOC_CODICE_ARTICOLO_ESPLICITO";
|
||
|
|
|
||
|
|
public static final String P_AGENTI_ON = "AGENTI_ON";
|
||
|
|
|
||
|
|
public static final String P_ATR_ON = "ATR_ON";
|
||
|
|
|
||
|
|
public static final String P_FATTURA_ELETTRONICA_ON = "FATTURA_ELETTRONICA_ON";
|
||
|
|
|
||
|
|
public static final String P_SEO_VERSION = "SEO_VERSION";
|
||
|
|
|
||
|
|
public static final String P_MNU_DOC_STD = "MNU_DOC_STD";
|
||
|
|
|
||
|
|
public static final String P_MNU_COAVE = "MNU_COAVE";
|
||
|
|
|
||
|
|
public static final String P_MNU_TESSITURA = "MNU_TESSITURA";
|
||
|
|
|
||
|
|
public static final String P_MNU_NEWSLETTER = "MNU_NEWSLETTER";
|
||
|
|
|
||
|
|
public static final String P_MNU_NEWS = "MNU_NEWS";
|
||
|
|
|
||
|
|
public static final String P_MNU_FILATI = "MNU_FILATI";
|
||
|
|
|
||
|
|
public static final String P_MNU_CONFEZIONE = "MNU_CONFEZIONE";
|
||
|
|
|
||
|
|
public static final String P_MNU_LAVORAZIONI = "MNU_LAVORAZIONI";
|
||
|
|
|
||
|
|
public static final String P_MNU_TESSUTI = "MNU_TESSUTI";
|
||
|
|
|
||
|
|
public static final String P_MNU_BANNER = "MNU_BANNER";
|
||
|
|
|
||
|
|
public static final String P_MNU_CONTRATTI = "MNU_CONTRATTI";
|
||
|
|
|
||
|
|
public static final String P_MNU_WWW = "MNU_WWW";
|
||
|
|
|
||
|
|
public static final String P_MNU_CONFIG_ANAG = "MNU_CONFIG_ANAG";
|
||
|
|
|
||
|
|
public static final String P_MNU_CONFIG_ART = "MNU_CONFIG_ART";
|
||
|
|
|
||
|
|
public static final String P_MNU_CONFIG_CONTAB = "MNU_CONFIG_CONTAB";
|
||
|
|
|
||
|
|
public static final String P_MNU_CONFIG_ADMIN = "MNU_CONFIG_ADMIN";
|
||
|
|
|
||
|
|
public static final String P_MNU_GEST_ARTICOLI = "MNU_GEST_ARTICOLI";
|
||
|
|
|
||
|
|
public static final String P_MNU_GEST_CONTATTI = "MNU_GEST_CONTATTI";
|
||
|
|
|
||
|
|
public static final String P_MNU_GEST_SCADENZE = "MNU_GEST_SCADENZE";
|
||
|
|
|
||
|
|
public static final String P_MNU_GEST_PAGAMENTI = "MNU_GEST_PAGAMENTI";
|
||
|
|
|
||
|
|
public static final String P_MNU_GEST_RIBA = "MNU_GEST_RIBA";
|
||
|
|
|
||
|
|
public static final String P_MNU_CC = "MNU_CC";
|
||
|
|
|
||
|
|
public static final String P_MNU_FACE = "MNU_FACE";
|
||
|
|
|
||
|
|
public static final String P_MNU_FR = "MNU_FR";
|
||
|
|
|
||
|
|
public static final String P_MNU_M_DOC_STD = "MNU_M_DOC_STD";
|
||
|
|
|
||
|
|
public static final String P_MNU_M_COAVE = "MNU_M_COAVE";
|
||
|
|
|
||
|
|
public static final String P_MNU_M_CASSA = "MNU_M_CASSA";
|
||
|
|
|
||
|
|
public static final String P_MNU_M_PRENOTAZIONI = "MNU_M_PRENOTAZIONI";
|
||
|
|
|
||
|
|
public static final String P_MNU_M_EBAY = "MNU_M_EBAY";
|
||
|
|
|
||
|
|
public static final String P_MNU_M_RIPARAZIONI = "MNU_M_RIPARAZIONI";
|
||
|
|
|
||
|
|
public static final String P_MNU_M_ORDINI = "MNU_M_ORDINI";
|
||
|
|
|
||
|
|
public static final String P_MNU_M_FILATI = "MNU_M_FILATI";
|
||
|
|
|
||
|
|
public static final String P_MNU_M_CONFEZIONE = "MNU_M_CONFEZIONE";
|
||
|
|
|
||
|
|
public static final String P_MNU_M_TESSUTI = "MNU_M_TESSUTI";
|
||
|
|
|
||
|
|
public static final String P_MNU_M_TESSITURA = "MNU_M_TESSITURA";
|
||
|
|
|
||
|
|
public static final String P_MNU_M_TESSITURA_PRODUZIONE = "MNU_M_TESSITURA_PRODUZIONE";
|
||
|
|
|
||
|
|
public static final String P_MNU_M_ARTICOLI = "MNU_M_ARTICOLI";
|
||
|
|
|
||
|
|
public static final String P_MNU_M_CC = "MNU_M_CC";
|
||
|
|
|
||
|
|
public static final String P_MNU_M_CC_GODMODE = "MNU_CC_GODMODE";
|
||
|
|
|
||
|
|
public static final String P_MNU_M_FACE = "MNU_M_FACE";
|
||
|
|
|
||
|
|
public static final String P_MNU_M_FR = "MNU_M_FR";
|
||
|
|
|
||
|
|
private static Iva ivaArt8A;
|
||
|
|
|
||
|
|
private static Iva ivaArt8C;
|
||
|
|
|
||
|
|
private static Iva ivaArt41;
|
||
|
|
|
||
|
|
private static Iva ivaArt58;
|
||
|
|
|
||
|
|
private static Iva ivaStdVendita;
|
||
|
|
|
||
|
|
private static Iva ivaEsenteBolli;
|
||
|
|
|
||
|
|
private static Iva ivaReverseCharge;
|
||
|
|
|
||
|
|
private static Iva ivaRegimeMargine;
|
||
|
|
|
||
|
|
public _AnagAdapter() {}
|
||
|
|
|
||
|
|
public _AnagAdapter(ApplParmFull newApplParmFull) {
|
||
|
|
super(newApplParmFull);
|
||
|
|
}
|
||
|
|
|
||
|
|
protected ResParm checkDeleteCascade() {
|
||
|
|
return new ResParm(true);
|
||
|
|
}
|
||
|
|
|
||
|
|
protected void deleteCascade() {}
|
||
|
|
|
||
|
|
public long getCodiceIvaEsenteBolli() {
|
||
|
|
return getParm("CODICE_IVA_ESENTE").getNumeroLong();
|
||
|
|
}
|
||
|
|
|
||
|
|
public long getCodiceIvaCeeAziendaArt41() {
|
||
|
|
return getParm("CODICE_IVA_CEE_AZIENDA_ART41").getNumeroLong();
|
||
|
|
}
|
||
|
|
|
||
|
|
protected long getCurrentEsercizio() {
|
||
|
|
Calendar cal = Calendar.getInstance();
|
||
|
|
return (long)cal.get(1);
|
||
|
|
}
|
||
|
|
|
||
|
|
protected String getAdminMail() {
|
||
|
|
String temp = getParm("BCC").getTesto();
|
||
|
|
return temp;
|
||
|
|
}
|
||
|
|
|
||
|
|
protected boolean useNullFor0() {
|
||
|
|
return false;
|
||
|
|
}
|
||
|
|
|
||
|
|
protected String getCheckOutMailMessage(String lang) {
|
||
|
|
String temp = getParm(Cart.P_CHECKOUTMSG).getTesto();
|
||
|
|
if (lang != null && !lang.isEmpty()) {
|
||
|
|
int dot = temp.lastIndexOf(".");
|
||
|
|
if (dot > 0)
|
||
|
|
temp = temp.substring(0, dot) + "_" + temp.substring(0, dot) + lang.toLowerCase();
|
||
|
|
}
|
||
|
|
return temp;
|
||
|
|
}
|
||
|
|
|
||
|
|
protected String getAllarmeOrdineEbayMessage() {
|
||
|
|
return "/mailMessage/allarmeEbay.html";
|
||
|
|
}
|
||
|
|
|
||
|
|
protected String getResoMailMessage(String lang) {
|
||
|
|
String temp = getParm(Parm.P_RESOMSG).getTesto();
|
||
|
|
if (lang != null && !lang.isEmpty()) {
|
||
|
|
int dot = temp.lastIndexOf(".");
|
||
|
|
if (dot > 0)
|
||
|
|
temp = temp.substring(0, dot) + "_" + temp.substring(0, dot) + lang.toLowerCase();
|
||
|
|
}
|
||
|
|
return temp;
|
||
|
|
}
|
||
|
|
|
||
|
|
protected void prepareNewPdfPcorpoDocument() {
|
||
|
|
try {
|
||
|
|
this.pdfPcorpo = new PdfPTable(40);
|
||
|
|
this.pdfPcorpo.setWidthPercentage(100.0F);
|
||
|
|
this.pdfPcorpo.setWidths(colWidthsRighe40);
|
||
|
|
} catch (Exception e) {
|
||
|
|
handleDebug(e, 2);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
public PdfPTable getPdfPcorpo() {
|
||
|
|
return this.pdfPcorpo;
|
||
|
|
}
|
||
|
|
|
||
|
|
public void setPdfPcorpo(PdfPTable corpo) {
|
||
|
|
this.pdfPcorpo = corpo;
|
||
|
|
}
|
||
|
|
|
||
|
|
public Document getDocument() {
|
||
|
|
return this.document;
|
||
|
|
}
|
||
|
|
|
||
|
|
public void setDocument(Document document) {
|
||
|
|
this.document = document;
|
||
|
|
}
|
||
|
|
|
||
|
|
public PdfWriter getWriter() {
|
||
|
|
return this.writer;
|
||
|
|
}
|
||
|
|
|
||
|
|
public void setWriter(PdfWriter writer) {
|
||
|
|
this.writer = writer;
|
||
|
|
}
|
||
|
|
|
||
|
|
protected void prepareNewPdfCorpoDocument() {
|
||
|
|
this.pdfcorpo = getNewPdfCorpoDocument();
|
||
|
|
}
|
||
|
|
|
||
|
|
protected Table getNewPdfCorpoDocument() {
|
||
|
|
Table l_pdfcorpo = null;
|
||
|
|
try {
|
||
|
|
l_pdfcorpo = new Table(40);
|
||
|
|
l_pdfcorpo.setWidth(100.0F);
|
||
|
|
l_pdfcorpo.setBorder(0);
|
||
|
|
l_pdfcorpo.setBorderWidth(0.0F);
|
||
|
|
l_pdfcorpo.setBorderColor(new Color(255, 255, 255));
|
||
|
|
l_pdfcorpo.setPadding(2.0F);
|
||
|
|
l_pdfcorpo.setSpacing(0.0F);
|
||
|
|
l_pdfcorpo.setWidths(colWidthsRighe40);
|
||
|
|
} catch (Exception e) {
|
||
|
|
handleDebug(e, 2);
|
||
|
|
}
|
||
|
|
return l_pdfcorpo;
|
||
|
|
}
|
||
|
|
|
||
|
|
public Table getPdfcorpo() {
|
||
|
|
return this.pdfcorpo;
|
||
|
|
}
|
||
|
|
|
||
|
|
public void setPdfcorpo(Table pdfcorpo) {
|
||
|
|
this.pdfcorpo = pdfcorpo;
|
||
|
|
}
|
||
|
|
|
||
|
|
public TipoPagamento getTipoPagamentoScontrinoConFattura() {
|
||
|
|
TipoPagamento tp = new TipoPagamento(getApFull());
|
||
|
|
tp.findByPrimaryKey(getParm("TIPO_PAG_SC_CON_FT").getNumeroLong());
|
||
|
|
return tp;
|
||
|
|
}
|
||
|
|
|
||
|
|
protected int getDocFontRowSize() {
|
||
|
|
return getParm("DOC_FONT_ROW_SIZE").getNumeroInt();
|
||
|
|
}
|
||
|
|
|
||
|
|
protected int getDocFontRowSize(TipoDocumento tipoDocumento) {
|
||
|
|
if (tipoDocumento.getDocFontSizeRow() > 0L)
|
||
|
|
return (int)tipoDocumento.getDocFontSizeRow();
|
||
|
|
return getParm("DOC_FONT_ROW_SIZE").getNumeroInt();
|
||
|
|
}
|
||
|
|
|
||
|
|
protected int getDocLeadRow() {
|
||
|
|
return getParm("DOC_LEADROW").getNumeroInt();
|
||
|
|
}
|
||
|
|
|
||
|
|
protected long getDocPosizioneNota() {
|
||
|
|
return getParm("DOC_POSIZIONE_NOTA").getNumeroLong();
|
||
|
|
}
|
||
|
|
|
||
|
|
public boolean usaPrezzoConIva() {
|
||
|
|
return getParm("PREZZO_CON_IVA").isTrue();
|
||
|
|
}
|
||
|
|
|
||
|
|
protected int getImgLogoWidth() {
|
||
|
|
return (int)getDocLogoWidth();
|
||
|
|
}
|
||
|
|
|
||
|
|
public String getMailSubject() {
|
||
|
|
if (getApFull() == null)
|
||
|
|
return "";
|
||
|
|
return getApFull().getResource("SUBJECT");
|
||
|
|
}
|
||
|
|
|
||
|
|
protected SimboliLavaggio getSimboliLavaggioDefault() {
|
||
|
|
String temp = getParm("ART_SIMBOLI_LAVAGGIO_DEFAULT").getTesto();
|
||
|
|
if (temp.isEmpty())
|
||
|
|
return null;
|
||
|
|
try {
|
||
|
|
SimboliLavaggio simboliLavaggio = new SimboliLavaggio();
|
||
|
|
StringTokenizer st = new StringTokenizer(temp, ",");
|
||
|
|
if (st.hasMoreTokens()) {
|
||
|
|
temp = st.nextToken().trim();
|
||
|
|
simboliLavaggio.setLavaggio(Long.valueOf(temp).longValue());
|
||
|
|
}
|
||
|
|
if (st.hasMoreTokens()) {
|
||
|
|
temp = st.nextToken().trim();
|
||
|
|
simboliLavaggio.setCandeggio(Long.valueOf(temp).longValue());
|
||
|
|
}
|
||
|
|
if (st.hasMoreTokens()) {
|
||
|
|
temp = st.nextToken().trim();
|
||
|
|
simboliLavaggio.setAsciugatura(Long.valueOf(temp).longValue());
|
||
|
|
}
|
||
|
|
if (st.hasMoreTokens()) {
|
||
|
|
temp = st.nextToken().trim();
|
||
|
|
simboliLavaggio.setStiratura(Long.valueOf(temp).longValue());
|
||
|
|
}
|
||
|
|
if (st.hasMoreTokens()) {
|
||
|
|
temp = st.nextToken().trim();
|
||
|
|
simboliLavaggio.setPulituraSecco(Long.valueOf(temp).longValue());
|
||
|
|
}
|
||
|
|
return simboliLavaggio;
|
||
|
|
} catch (Exception e) {
|
||
|
|
return null;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
protected String getMessaggioAvvisoRiparazioneEmail() {
|
||
|
|
return getParm("MSG_AVVISO_RIP_EMAIL").getTesto();
|
||
|
|
}
|
||
|
|
|
||
|
|
public String getMessaggioDocumentiEmailFrom() {
|
||
|
|
return getParm("MSG_EMAIL_FROM").getTesto();
|
||
|
|
}
|
||
|
|
|
||
|
|
protected String getMessaggioAvvisoPrenotazioneSms() {
|
||
|
|
return getParm("MSG_AVVISO_PREN_SMS").getTesto();
|
||
|
|
}
|
||
|
|
|
||
|
|
protected String getMessaggioAvvisoRiparazioneSms() {
|
||
|
|
return getParm("MSG_AVVISO_RIP_SMS").getTesto();
|
||
|
|
}
|
||
|
|
|
||
|
|
protected String getSmsServer() {
|
||
|
|
return getParm("SMS_SERVER").getTesto();
|
||
|
|
}
|
||
|
|
|
||
|
|
protected int getSmsPort() {
|
||
|
|
return getParm("SMS_PORT").getNumeroInt();
|
||
|
|
}
|
||
|
|
|
||
|
|
protected float getRectDocumentoH(String L_TIPO) {
|
||
|
|
return getRectDocumento(L_TIPO, 3);
|
||
|
|
}
|
||
|
|
|
||
|
|
private float getRectDocumento(String L_TIPO, int theVaule) {
|
||
|
|
StringTokenizer temp = new StringTokenizer(getParm(L_TIPO).getTesto(), ",");
|
||
|
|
if (temp.countToken() != 4)
|
||
|
|
return 0.0F;
|
||
|
|
try {
|
||
|
|
return Float.parseFloat(temp.getToken(theVaule));
|
||
|
|
} catch (Exception e) {
|
||
|
|
handleDebug(e, 2);
|
||
|
|
return 0.0F;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
protected float getRectDocumentoY(String L_TIPO) {
|
||
|
|
return getRectDocumento(L_TIPO, 1);
|
||
|
|
}
|
||
|
|
|
||
|
|
protected float getRectDocumentoW(String L_TIPO) {
|
||
|
|
return getRectDocumento(L_TIPO, 2);
|
||
|
|
}
|
||
|
|
|
||
|
|
protected float getRectDocumentoX(String L_TIPO) {
|
||
|
|
return getRectDocumento(L_TIPO, 0);
|
||
|
|
}
|
||
|
|
|
||
|
|
protected boolean isSmsPdu() {
|
||
|
|
return (getParm("SMS_PDU").getNumeroInt() == 1);
|
||
|
|
}
|
||
|
|
|
||
|
|
public Font getFont(String baseFont, int size, int type, Color theColor) {
|
||
|
|
return TtFont.getInstance(getApFull()).getFont(baseFont, size, type, theColor);
|
||
|
|
}
|
||
|
|
|
||
|
|
protected int getStringValueCase(String l_colomnName) {
|
||
|
|
return super.getStringValueCase(l_colomnName);
|
||
|
|
}
|
||
|
|
|
||
|
|
protected long getId_docCassa() {
|
||
|
|
return getParm("ID_DOC_CASSA").getNumeroLong();
|
||
|
|
}
|
||
|
|
|
||
|
|
protected long getId_docOrdine() {
|
||
|
|
return getParm("ID_DOC_ORDINE").getNumeroLong();
|
||
|
|
}
|
||
|
|
|
||
|
|
public long getId_docOrdineTaglio() {
|
||
|
|
return getParm("ID_DOC_ORDINE_TAGLIO").getNumeroLong();
|
||
|
|
}
|
||
|
|
|
||
|
|
protected long getId_docPrenotazione() {
|
||
|
|
return getParm("ID_DOC_PRENOTAZIONE").getNumeroLong();
|
||
|
|
}
|
||
|
|
|
||
|
|
protected long getId_docRiparazione() {
|
||
|
|
return getParm("ID_DOC_RIPARAZIONE").getNumeroLong();
|
||
|
|
}
|
||
|
|
|
||
|
|
public long getCodiceIvaArt8_A() {
|
||
|
|
return getParm("CODICE_IVA_ART8_A").getNumeroLong();
|
||
|
|
}
|
||
|
|
|
||
|
|
public long getCodiceIvaArt8_C() {
|
||
|
|
return getParm("CODICE_IVA_EXTRA_CEE_ESP_ABITUALE_ART8_C").getNumeroLong();
|
||
|
|
}
|
||
|
|
|
||
|
|
public long getCodiceIvaItaCeeAziendaArt58() {
|
||
|
|
return getParm("CODICE_IVA_ITA_CEE_AZIENDA_ART58").getNumeroLong();
|
||
|
|
}
|
||
|
|
|
||
|
|
public boolean isIvaEsteroAziendaEsente() {
|
||
|
|
return getParm("IVA_ESTERO_AZIENDA_ESENTE").isTrue();
|
||
|
|
}
|
||
|
|
|
||
|
|
public boolean isIvaCeeOneStopShop() {
|
||
|
|
return getParm("IVA_CEE_ONE_STOP_SHOP").isTrue();
|
||
|
|
}
|
||
|
|
|
||
|
|
public long getCodiceIvaVendStd() {
|
||
|
|
return getParm("CODICE_IVA_STD_VEND").getNumeroLong();
|
||
|
|
}
|
||
|
|
|
||
|
|
public long getCodiceIvaAcquistoStd() {
|
||
|
|
return getParm("CODICE_IVA_STD_ACQ").getNumeroLong();
|
||
|
|
}
|
||
|
|
|
||
|
|
public long getCodiceIvaRegimeMargine() {
|
||
|
|
return getParm("CODICE_IVA_REGIME_MARGINE").getNumeroLong();
|
||
|
|
}
|
||
|
|
|
||
|
|
public long getCodiceTipoTessutoStandard() {
|
||
|
|
return getParm("CODICE_TIPO_TESSUTO_STD").getNumeroLong();
|
||
|
|
}
|
||
|
|
|
||
|
|
public long getCodiceIvaReverseCharge() {
|
||
|
|
return getParm("CODICE_IVA_REVERSE_CHARGE").getNumeroLong();
|
||
|
|
}
|
||
|
|
|
||
|
|
public String getPathAllegato() {
|
||
|
|
return getDocBase() + getDocBase() + getParm("CLIFOR_ATTACH_PATH").getTesto();
|
||
|
|
}
|
||
|
|
|
||
|
|
public long getId_docOrdineWWW() {
|
||
|
|
return getParm("ID_DOC_ORDINE_WWW").getNumeroLong();
|
||
|
|
}
|
||
|
|
|
||
|
|
public long getId_docFtNoleggio() {
|
||
|
|
return getParm("ID_DOC_FT_NOLEGGIO").getNumeroLong();
|
||
|
|
}
|
||
|
|
|
||
|
|
public boolean isPercentualiSconto3() {
|
||
|
|
return getParm("SCONTO_3_PERCENTUALI").isTrue();
|
||
|
|
}
|
||
|
|
|
||
|
|
protected Document creaIntestazioneReportPdfPTable(String titolo, String sottoTitolo) {
|
||
|
|
int cellLeading = 12;
|
||
|
|
int pdfCorpoPadding = 2;
|
||
|
|
try {
|
||
|
|
PdfPCell rigaVuota = new PdfPCell();
|
||
|
|
rigaVuota.setVerticalAlignment(4);
|
||
|
|
rigaVuota.setHorizontalAlignment(0);
|
||
|
|
rigaVuota.setBorder(0);
|
||
|
|
rigaVuota.setColspan(40);
|
||
|
|
this.pdfPcorpo = new PdfPTable(40);
|
||
|
|
this.pdfPcorpo.setWidthPercentage(100.0F);
|
||
|
|
this.pdfPcorpo.setWidths(colWidthsRighe40);
|
||
|
|
if (new File(getDocBase() + getDocBase()).exists()) {
|
||
|
|
Image imgLogo = Image.getInstance(getDocBase() + getDocBase());
|
||
|
|
imgLogo.scaleToFit(100.0F, 100.0F);
|
||
|
|
imgLogo.setAlignment(5);
|
||
|
|
PdfPCell cell = new PdfPCell();
|
||
|
|
cell.addElement(new Chunk(imgLogo, -10.0F, -15.0F));
|
||
|
|
cell.setBorder(0);
|
||
|
|
cell.setColspan(8);
|
||
|
|
this.pdfPcorpo.addCell(cell);
|
||
|
|
} else {
|
||
|
|
PdfPCell cell = new PdfPCell();
|
||
|
|
cell.setBorder(0);
|
||
|
|
cell.setColspan(8);
|
||
|
|
this.pdfPcorpo.addCell(cell);
|
||
|
|
}
|
||
|
|
PdfPCell pdfPCell1 = new PdfPCell();
|
||
|
|
pdfPCell1.addElement(new Chunk("Report: " + titolo, PdfFontFactory.PDF_fGrandeB));
|
||
|
|
pdfPCell1.addElement(new Chunk(sottoTitolo, PdfFontFactory.PDF_fMedio));
|
||
|
|
pdfPCell1.setBorder(0);
|
||
|
|
pdfPCell1.setVerticalAlignment(4);
|
||
|
|
pdfPCell1.setColspan(27);
|
||
|
|
this.pdfPcorpo.addCell(pdfPCell1);
|
||
|
|
pdfPCell1 = new PdfPCell();
|
||
|
|
pdfPCell1.addElement(new Chunk(getDataFormat().format(getToday()), PdfFontFactory.PDF_fGrandeB));
|
||
|
|
pdfPCell1.setBorder(0);
|
||
|
|
pdfPCell1.setVerticalAlignment(6);
|
||
|
|
pdfPCell1.setColspan(5);
|
||
|
|
this.pdfPcorpo.addCell(pdfPCell1);
|
||
|
|
this.pdfPcorpo.addCell(rigaVuota);
|
||
|
|
this.pdfPcorpo.setHeaderRows(2);
|
||
|
|
} catch (Exception e) {
|
||
|
|
handleDebug(e);
|
||
|
|
}
|
||
|
|
return this.document;
|
||
|
|
}
|
||
|
|
|
||
|
|
protected Document creaIntestazioneReport(String titolo, String sottoTitolo) {
|
||
|
|
int cellLeading = 12;
|
||
|
|
int pdfCorpoPadding = 2;
|
||
|
|
try {
|
||
|
|
Cell rigaVuota = new Cell(new Chunk(" ", PdfFontFactory.PDF_fPiccolissimo));
|
||
|
|
rigaVuota.setVerticalAlignment(4);
|
||
|
|
rigaVuota.setHorizontalAlignment(0);
|
||
|
|
rigaVuota.setLeading((float)cellLeading);
|
||
|
|
rigaVuota.setBorder(0);
|
||
|
|
rigaVuota.setColspan(40);
|
||
|
|
rigaVuota.setRowspan(1);
|
||
|
|
Image imgLogo = Image.getInstance(getDocBase() + getDocBase());
|
||
|
|
imgLogo.scaleToFit(50.0F, 100.0F);
|
||
|
|
imgLogo.setAlignment(5);
|
||
|
|
this.pdfcorpo = new Table(40);
|
||
|
|
this.pdfcorpo.setWidth(100.0F);
|
||
|
|
this.pdfcorpo.setPadding((float)pdfCorpoPadding);
|
||
|
|
this.pdfcorpo.setSpacing(0.0F);
|
||
|
|
this.pdfcorpo.setWidths(colWidthsRighe40);
|
||
|
|
this.pdfcorpo.setBorder(0);
|
||
|
|
Cell cell = new Cell();
|
||
|
|
cell.add(new Chunk(imgLogo, 10.0F, 0.0F));
|
||
|
|
cell.setLeading(12.0F);
|
||
|
|
cell.setBorder(0);
|
||
|
|
cell.setColspan(6);
|
||
|
|
cell.setRowspan(1);
|
||
|
|
this.pdfcorpo.addCell(cell);
|
||
|
|
cell = new Cell(new Chunk("Report: " + titolo, PdfFontFactory.PDF_fGrandeB));
|
||
|
|
cell.add(new Chunk("\n\n" + sottoTitolo, PdfFontFactory.PDF_fMedio));
|
||
|
|
cell.setLeading(12.0F);
|
||
|
|
cell.setBorder(0);
|
||
|
|
cell.setVerticalAlignment(4);
|
||
|
|
cell.setColspan(28);
|
||
|
|
cell.setRowspan(1);
|
||
|
|
this.pdfcorpo.addCell(cell);
|
||
|
|
cell = new Cell(new Chunk(getDataFormat().format(getToday()), PdfFontFactory.PDF_fGrandeB));
|
||
|
|
cell.setLeading(12.0F);
|
||
|
|
cell.setBorder(0);
|
||
|
|
cell.setVerticalAlignment(6);
|
||
|
|
cell.setColspan(6);
|
||
|
|
cell.setRowspan(1);
|
||
|
|
this.pdfcorpo.addCell(cell);
|
||
|
|
this.pdfcorpo.addCell(rigaVuota);
|
||
|
|
this.document.add((Element)this.pdfcorpo);
|
||
|
|
this.pdfcorpo = new Table(40);
|
||
|
|
this.pdfcorpo.setWidth(100.0F);
|
||
|
|
this.pdfcorpo.setPadding((float)pdfCorpoPadding);
|
||
|
|
this.pdfcorpo.setSpacing(0.0F);
|
||
|
|
this.pdfcorpo.setWidths(colWidthsRighe40);
|
||
|
|
this.pdfcorpo.setBorder(0);
|
||
|
|
} catch (Exception e) {
|
||
|
|
handleDebug(e);
|
||
|
|
}
|
||
|
|
return this.document;
|
||
|
|
}
|
||
|
|
|
||
|
|
public boolean isFatturaElettronicaOn() {
|
||
|
|
return getParm("FATTURA_ELETTRONICA_ON").isTrue();
|
||
|
|
}
|
||
|
|
|
||
|
|
public boolean isCostoSpedizioneFull() {
|
||
|
|
return getParm("CC_COSTO_SPED_FULL").isTrue();
|
||
|
|
}
|
||
|
|
|
||
|
|
protected String getMessaggioAvvisoPrenotazioneEmail() {
|
||
|
|
return getParm("MSG_AVVISO_PREN_EMAIL").getTesto();
|
||
|
|
}
|
||
|
|
|
||
|
|
public double getRatealeImportoMinimo() {
|
||
|
|
return getParm("SELLA_P_CREDIT_IMPORTO_MINIMO").getNumeroDouble();
|
||
|
|
}
|
||
|
|
|
||
|
|
public boolean isRata0Attiva() {
|
||
|
|
return (getParm("CONSEL_RATA0").getNumeroLong() == 1L);
|
||
|
|
}
|
||
|
|
|
||
|
|
public boolean isQuantitaMagazzinoIntere() {
|
||
|
|
return getParm("USA_QUANTITA_INTERE").isTrue();
|
||
|
|
}
|
||
|
|
|
||
|
|
public Iva getIvaArt8A() {
|
||
|
|
if (ivaArt8A == null) {
|
||
|
|
ivaArt8A = new Iva(getApFull());
|
||
|
|
ivaArt8A.findByPrimaryKey(getCodiceIvaArt8_A());
|
||
|
|
}
|
||
|
|
return ivaArt8A;
|
||
|
|
}
|
||
|
|
|
||
|
|
public Iva getIvaRegimeMargine() {
|
||
|
|
if (ivaRegimeMargine == null) {
|
||
|
|
ivaRegimeMargine = new Iva(getApFull());
|
||
|
|
ivaRegimeMargine.findByPrimaryKey(getCodiceIvaRegimeMargine());
|
||
|
|
}
|
||
|
|
return ivaRegimeMargine;
|
||
|
|
}
|
||
|
|
|
||
|
|
public Iva getIvaArt8C() {
|
||
|
|
if (ivaArt8C == null) {
|
||
|
|
ivaArt8C = new Iva(getApFull());
|
||
|
|
ivaArt8C.findByPrimaryKey(getCodiceIvaArt8_C());
|
||
|
|
}
|
||
|
|
return ivaArt8C;
|
||
|
|
}
|
||
|
|
|
||
|
|
public Iva getIvaArt41() {
|
||
|
|
if (ivaArt41 == null) {
|
||
|
|
ivaArt41 = new Iva(getApFull());
|
||
|
|
ivaArt41.findByPrimaryKey(getCodiceIvaCeeAziendaArt41());
|
||
|
|
}
|
||
|
|
return ivaArt41;
|
||
|
|
}
|
||
|
|
|
||
|
|
public Iva getIvaArt58() {
|
||
|
|
if (ivaArt58 == null) {
|
||
|
|
ivaArt58 = new Iva(getApFull());
|
||
|
|
ivaArt58.findByPrimaryKey(getCodiceIvaItaCeeAziendaArt58());
|
||
|
|
}
|
||
|
|
return ivaArt58;
|
||
|
|
}
|
||
|
|
|
||
|
|
public Iva getIvaStdVendita() {
|
||
|
|
if (ivaStdVendita == null) {
|
||
|
|
ivaStdVendita = new Iva(getApFull());
|
||
|
|
ivaStdVendita.findByPrimaryKey(getCodiceIvaVendStd());
|
||
|
|
}
|
||
|
|
return ivaStdVendita;
|
||
|
|
}
|
||
|
|
|
||
|
|
public Iva getIvaEsenteBolli() {
|
||
|
|
if (ivaEsenteBolli == null) {
|
||
|
|
ivaEsenteBolli = new Iva(getApFull());
|
||
|
|
ivaEsenteBolli.findByPrimaryKey(getCodiceIvaEsenteBolli());
|
||
|
|
}
|
||
|
|
return ivaEsenteBolli;
|
||
|
|
}
|
||
|
|
|
||
|
|
public Iva getIvaReverseCharge() {
|
||
|
|
if (ivaReverseCharge == null) {
|
||
|
|
ivaReverseCharge = new Iva(getApFull());
|
||
|
|
ivaReverseCharge.findByPrimaryKey(getCodiceIvaReverseCharge());
|
||
|
|
}
|
||
|
|
return ivaReverseCharge;
|
||
|
|
}
|
||
|
|
}
|