diff --git a/src/li/batbtpe.h b/src/li/batbtpe.h new file mode 100644 index 000000000..d6fd6aa9c --- /dev/null +++ b/src/li/batbtpe.h @@ -0,0 +1,7 @@ + +#define F_CODTAB 101 +#define F_S0 102 +#define F_FLD 103 +#define F_PROMPT 104 +#define F_NO_PRINT 105 + diff --git a/src/li/batbtpe.uml b/src/li/batbtpe.uml new file mode 100644 index 000000000..355967023 --- /dev/null +++ b/src/li/batbtpe.uml @@ -0,0 +1,58 @@ +#include "batbtpe.h" + +TOOLBAR "topbar" 0 0 0 2 +#include +ENDPAGE + +PAGE "Tipologie di esenzione" -1 -1 78 19 + +STRING F_CODTAB 6 +BEGIN + PROMPT 1 1 "Codice " + KEY 1 + USE %TPE + FLAGS "UZ" + INPUT CODTAB F_CODTAB + DISPLAY "Codice" CODTAB + DISPLAY "Descrizione@50" S0 + OUTPUT F_CODTAB CODTAB + OUTPUT F_S0 S0 + CHECKTYPE REQUIRED + FIELD CODTAB +END + +STRING F_S0 50 +BEGIN + PROMPT 1 3 "Descrizione " + FIELD S0 + KEY 2 + USE %TPE KEY 2 + INPUT S0 102 + DISPLAY "Descrizione@50" S0 + DISPLAY "Codice" CODTAB + COPY OUTPUT F_CODTAB + CHECKTYPE REQUIRED +END + +STRING F_FLD 15 +BEGIN + PROMPT 1 5 "Tipo dato Invio fatture " + FIELD S4 +END + +STRING F_PROMPT 70 +BEGIN + PROMPT 1 7 "Descriz. invio fatture " + FIELD S1 +END + +BOOLEAN F_NO_PRINT +BEGIN + PROMPT 1 9 "Non stampare sulle fatture" + FIELD B0 +END + +ENDPAGE + +ENDMASK + diff --git a/src/li/f154.dir b/src/li/f154.dir index d60ce7f61..5478b0ef0 100755 --- a/src/li/f154.dir +++ b/src/li/f154.dir @@ -1,3 +1,3 @@ 154 0 -$letint|0|0|132|0|Lettere d'intento||| +$letint|0|0|135|0|Lettere d'intento||| diff --git a/src/li/f154.trr b/src/li/f154.trr index ea06533a9..9c5cd29ff 100755 --- a/src/li/f154.trr +++ b/src/li/f154.trr @@ -1,5 +1,5 @@ 154 -18 +19 ANNO|2|4|0|Anno NUMPROT|3|6|0|Numero protocollo DATAREG|5|8|0|Data di registrazione @@ -18,6 +18,7 @@ INVIATO|8|1|0|Inviato PROTINTF|1|17|0|Numero di protocollo passato dall agenzia delle entrate (prima parte) PROTINTS|1|6|0|Numero di protocollo passato dall agenzia delle entrate (seconda parte) CHIUSA|8|1|0|Indica se una lettera di intento č chiusa +CODTPE|1|3|0|Tipo di esenzione 2 ANNO+NUMPROT| CODCLI+ANNO+NUMPROT|X diff --git a/src/li/letint.h b/src/li/letint.h index 9336bddc2..552694851 100755 --- a/src/li/letint.h +++ b/src/li/letint.h @@ -19,5 +19,6 @@ #define LETINT_PROTINTF "PROTINTF" #define LETINT_PROTINTS "PROTINTS" #define LETINT_CHIUSA "CHIUSA" +#define LETINT_CODTPE "CODTPE" #endif diff --git a/src/li/li0400.cpp b/src/li/li0400.cpp index 2d987f39c..9320ba75f 100755 --- a/src/li/li0400.cpp +++ b/src/li/li0400.cpp @@ -103,7 +103,7 @@ bool TLetint_mask::on_field_event(TOperable_field& o, TField_event e, long jolly break; case F_TIPOOP: // Controlli - if(!keyforced && insert_mode() && get_int(F_TIPOOP) == 3 && get_date(F_DAL) > TDate(01,03,2017)) +/* if(!keyforced && insert_mode() && get_int(F_TIPOOP) == 3 && get_date(F_DAL) > TDate(01,03,2017)) { error_box(TR("Non puņ esistere una dichiarazione di intento di tipo \"A Periodo\"\ncon data posteriore al 01/03/2017!")); disable(DLG_SAVEREC); @@ -111,7 +111,7 @@ bool TLetint_mask::on_field_event(TOperable_field& o, TField_event e, long jolly else { enable(DLG_SAVEREC); - } + } */ // Abilitazione date switch (get_int(F_TIPOOP)) { diff --git a/src/li/li0400a.h b/src/li/li0400a.h index 9263751b7..41dc5fdc2 100755 --- a/src/li/li0400a.h +++ b/src/li/li0400a.h @@ -31,4 +31,6 @@ #define F_NOTE 125 #define B_CHIUSA 126 #define F_UTILIZZATO 127 -#define F_DISPONIBILE 128 \ No newline at end of file +#define F_DISPONIBILE 128 +#define F_TIPOES 129 +#define F_DESCTPE 130 \ No newline at end of file diff --git a/src/li/li0400a.uml b/src/li/li0400a.uml index ea1e23275..35cca4d75 100755 --- a/src/li/li0400a.uml +++ b/src/li/li0400a.uml @@ -213,6 +213,31 @@ BEGIN //CHECKTYPE REQUIRED END +STRING F_TIPOES 6 +BEGIN + PROMPT 1 13 "Codice " + USE %TPE + FLAGS "UZ" + INPUT CODTAB F_TIPOES + DISPLAY "Codice" CODTAB + DISPLAY "Descrizione@50" S0 + OUTPUT F_TIPOES CODTAB + OUTPUT F_DESCTPE S0 + CHECKTYPE NORMAL + FIELD CODTPE +END + +STRING F_DESCTPE 50 +BEGIN + PROMPT 20 13 "" + USE %TPE KEY 2 + INPUT S0 F_DESCTPE + DISPLAY "Descrizione@50" S0 + DISPLAY "Codice" CODTAB + COPY OUTPUT F_TIPOES + CHECKTYPE SEARCH +END + GROUPBOX DLG_NULL 75 6 BEGIN PROMPT 0 15 "@bOperazione" diff --git a/src/li/lilib01.cpp b/src/li/lilib01.cpp index 3beee295d..665db1187 100644 --- a/src/li/lilib01.cpp +++ b/src/li/lilib01.cpp @@ -410,6 +410,54 @@ bool TLi_manager::utilizza_plafond(const TDocumento & d, TToken_string & plafs, return ok; } +int TLi_manager::get_plafond_row(const TDocumento & d, TString & protinf, TString & protins, TDate & dataprot, real & utilizzo, TString & field, TString & descr, bool & to_print, int num) const +{ + TToken_string plafs(d.get(DOC_PLAFOND), ','); + const int plafsitems = plafs.items(); + + protinf.cut(0); + protins.cut(0); + dataprot = botime; + field.cut(0); + descr.cut(0); + to_print = false; + if (num >= 0 && num < plafsitems) + { + TToken_string plaf = plafs.get(num); + TToken_string key = plaf.get(_planno); + + utilizzo = plaf.get_real(_plimporto); + key.add(plaf.get(_plnumprot)); + + const TRectype & reclint = cache().get(LF_LETINT, key); + + if (reclint.full()) + { + const TString & type = reclint.get(LETINT_CODTPE); + const TRectype & rectype = cache().get("%TPE", type); + + protinf = reclint.get(LETINT_PROTINTF); + protins = reclint.get(LETINT_PROTINTS); + dataprot = reclint.get_date(LETINT_VSDATA); + if (type.full() && rectype.full()) + { + field = rectype.get("S4"); + descr = rectype.get("S1"); + to_print = !rectype.get("B0"); + } + else + { + field = "Dich.Inten"; + descr = "N.di protocollo di invio"; + to_print = true; + } + } + return ++num; + } + else + return -1; +} + void TLi_manager::clear_letint() { const int rows = _plafonds.items(); diff --git a/src/li/lilib01.h b/src/li/lilib01.h index aafba5148..2425d1cc5 100644 --- a/src/li/lilib01.h +++ b/src/li/lilib01.h @@ -90,6 +90,8 @@ public: const TArray & get_plafond_array() const { return _plafonds; } // Utilizza il plafond bool utilizza_plafond(const TDocumento & d, TToken_string & plafs, const real importo); + // Ritorna il tipo di plafond dell'iesimo plafond del documento + int get_plafond_row(const TDocumento & d, TString & protinf, TString & protins, TDate & dataprot, real & utilizzo, TString & field, TString & descr, bool & toprint, int num = 0) const; // Functions // Aggiunge a una lettera d'intento @@ -99,7 +101,7 @@ public: // Funzione che aggiorna il residuo plafond dichiarazione dalla data alla data void TLi_manager::rebuild_plafond(bool update_docs = true, const int anno = 0); - // Funzione che effettivamente effettua il calcolodalla data della dichiarazione alla data passata + // Funzione che effettivamente effettua il calcolo dalla data della dichiarazione alla data passata const real elab_util(TDate ad = 0L); bool plafond_write(TDocumento& d); bool plafond_rewrite(TDocumento& d); diff --git a/src/li/limenu.men b/src/li/limenu.men index 36784e72d..2ee0f07d0 100755 --- a/src/li/limenu.men +++ b/src/li/limenu.men @@ -4,9 +4,9 @@ Picture = Module = 16 Flags = "F" Item_01 = "Dichiarazioni d'intento", "li0 -3", "" -Item_02 = "Stampa dichiarazioni", "li0 -4", "" -Item_03 = "Riepilogo dichiarazioni d'intento", "li0 -1", "" -Item_04 = "Riepilogo Documenti/Lettere", "li0 -0", "" -Item_05 = "Ricostruzione Plafond Lettere", "li0 -6", "" -Item_06 = "Configurazione modulo", "li0 -2", "" - +Item_02 = "Tabella Tipologie di esenzione", "ba3 -0 %TPE", "" +Item_03 = "Stampa dichiarazioni", "li0 -4", "" +Item_04 = "Riepilogo dichiarazioni d'intento", "li0 -1", "" +Item_05 = "Riepilogo Documenti/Lettere", "li0 -0", "" +Item_06 = "Ricostruzione Plafond Lettere", "li0 -6", "" +Item_07 = "Configurazione modulo", "li0 -2", ""