Merge branch 'R_10_00' of http://10.65.20.33/sirio/CAMPO/campo into R_10_00
This commit is contained in:
commit
0e4764fef8
@ -17,24 +17,14 @@
|
|||||||
//===============================================================================================
|
//===============================================================================================
|
||||||
//maschera
|
//maschera
|
||||||
|
|
||||||
class TCalc_cesp_cms_mask: public TAutomask
|
class TCalc_cesp_cms_mask: public TSimpleAutomask
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
virtual bool on_field_event(TOperable_field& o, TField_event e, long jolly);
|
|
||||||
|
|
||||||
TCalc_cesp_cms_mask():TAutomask("ce4200a") {}
|
TCalc_cesp_cms_mask():TSimpleAutomask("ce4200a") {}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
bool TCalc_cesp_cms_mask::on_field_event(TOperable_field& o, TField_event e, long jolly)
|
|
||||||
{
|
|
||||||
/* switch (o.dlg())
|
|
||||||
{
|
|
||||||
default: break;
|
|
||||||
}*/
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
//===============================================================================================
|
//===============================================================================================
|
||||||
//form
|
//form
|
||||||
class TCalc_cesp_cms_form : public TForm
|
class TCalc_cesp_cms_form : public TForm
|
||||||
|
@ -1303,7 +1303,7 @@ void TContabilizza_ce::elabora()
|
|||||||
// 0) Acquisizione parametri generali, eliminazione movimenti provvisori
|
// 0) Acquisizione parametri generali, eliminazione movimenti provvisori
|
||||||
//--------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------
|
||||||
//gettiamo un po' di parametri dalla maschera
|
//gettiamo un po' di parametri dalla maschera
|
||||||
const long codes = _mask->get_long(F_ESERCIZIO);
|
const int codes = _mask->get_int(F_ESERCIZIO);
|
||||||
const TDate ini_es = _mask->get_date(F_INIZIO_ES);
|
const TDate ini_es = _mask->get_date(F_INIZIO_ES);
|
||||||
const TDate fine_es = _mask->get_date(F_FINE_ES);
|
const TDate fine_es = _mask->get_date(F_FINE_ES);
|
||||||
//se il trasferimento e' definitivo la data di calcolo e' quella finale dell'esercizio selezionato, senno'...
|
//se il trasferimento e' definitivo la data di calcolo e' quella finale dell'esercizio selezionato, senno'...
|
||||||
@ -1332,6 +1332,10 @@ void TContabilizza_ce::elabora()
|
|||||||
delete_old_movs(ini_es);
|
delete_old_movs(ini_es);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const int gruppo = _mask->get_int(F_GRUPPO);
|
||||||
|
const TString specie = _mask->get(F_SPECIE);
|
||||||
|
|
||||||
|
ditta_cespiti().set_attivita(codes, gruppo, specie);
|
||||||
//report con log errori
|
//report con log errori
|
||||||
TLog_report cont_cesp_log(TR("Contabilizzazione cespiti"));
|
TLog_report cont_cesp_log(TR("Contabilizzazione cespiti"));
|
||||||
cont_cesp_log.kill_duplicates();
|
cont_cesp_log.kill_duplicates();
|
||||||
@ -1383,7 +1387,7 @@ void TContabilizza_ce::elabora()
|
|||||||
|
|
||||||
TSaldo_per_codice* sc = (TSaldo_per_codice*)quote_per_codice.objptr(gsc);
|
TSaldo_per_codice* sc = (TSaldo_per_codice*)quote_per_codice.objptr(gsc);
|
||||||
//se non trova il codice (categoria o cespite) lo aggiunge...
|
//se non trova il codice (categoria o cespite) lo aggiunge...
|
||||||
if (sc == NULL)
|
if (sc == nullptr)
|
||||||
{
|
{
|
||||||
sc = new TSaldo_per_codice(gruppo, specie, codcat, idcespite);
|
sc = new TSaldo_per_codice(gruppo, specie, codcat, idcespite);
|
||||||
quote_per_codice.add(gsc, sc);
|
quote_per_codice.add(gsc, sc);
|
||||||
@ -1455,7 +1459,7 @@ void TContabilizza_ce::elabora()
|
|||||||
key.add(curr_salcecms_line.get(SALCECMS_CODFASE));
|
key.add(curr_salcecms_line.get(SALCECMS_CODFASE));
|
||||||
|
|
||||||
TSaldo_per_codice* anal_sc = (TSaldo_per_codice*)anal_quote_per_codice.objptr(key);
|
TSaldo_per_codice* anal_sc = (TSaldo_per_codice*)anal_quote_per_codice.objptr(key);
|
||||||
if (anal_sc == NULL)
|
if (anal_sc == nullptr)
|
||||||
{
|
{
|
||||||
anal_sc = new TSaldo_per_codice(gruppo, specie, codcat, idcespite);
|
anal_sc = new TSaldo_per_codice(gruppo, specie, codcat, idcespite);
|
||||||
|
|
||||||
|
@ -84,6 +84,7 @@ public:
|
|||||||
TSimpleVariableAutomask(const char* name, int num = 0) : TVariable_automask(name, num) { }
|
TSimpleVariableAutomask(const char* name, int num = 0) : TVariable_automask(name, num) { }
|
||||||
virtual ~TSimpleVariableAutomask() { }
|
virtual ~TSimpleVariableAutomask() { }
|
||||||
};
|
};
|
||||||
|
|
||||||
class TIBAN_mask : public TAutomask
|
class TIBAN_mask : public TAutomask
|
||||||
{
|
{
|
||||||
TString _last_iso;
|
TString _last_iso;
|
||||||
|
@ -678,12 +678,25 @@ public:
|
|||||||
virtual ~TReport();
|
virtual ~TReport();
|
||||||
};
|
};
|
||||||
|
|
||||||
class TProgramReport : public TReport
|
///////////////////////////////////////////////////////////
|
||||||
|
// Report senza maschera //
|
||||||
|
///////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
class TProgram_report : public TReport
|
||||||
{
|
{
|
||||||
public:
|
protected:
|
||||||
virtual bool use_mask() { return false; }
|
virtual bool use_mask() { return false; }
|
||||||
|
|
||||||
TProgramReport() {}
|
public:
|
||||||
virtual ~TProgramReport() {}
|
TProgram_report() {}
|
||||||
|
TProgram_report(const char * name) { load(name); }
|
||||||
|
};
|
||||||
|
|
||||||
|
class TConfigurable_report : public TProgram_report
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
|
||||||
|
TConfigurable_report() {}
|
||||||
|
virtual ~TConfigurable_report() {}
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
@ -56,17 +56,4 @@ public:
|
|||||||
TLog_report(const char* title = "", const char* name = "bagn010a");
|
TLog_report(const char* title = "", const char* name = "bagn010a");
|
||||||
};
|
};
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////
|
|
||||||
// Report senza maschera //
|
|
||||||
///////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
class TProgram_report : public TReport
|
|
||||||
{
|
|
||||||
protected:
|
|
||||||
virtual bool use_mask() { return false; }
|
|
||||||
|
|
||||||
public:
|
|
||||||
TProgram_report() {}
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -156,10 +156,8 @@ bool TVisLI_mask::on_field_event(TOperable_field& o, TField_event e, long jolly)
|
|||||||
if (e == fe_init)
|
if (e == fe_init)
|
||||||
{
|
{
|
||||||
o.set(today.year());
|
o.set(today.year());
|
||||||
load_config();
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case F_TIPORIC:
|
case F_TIPORIC:
|
||||||
if( e == fe_modify)
|
if( e == fe_modify)
|
||||||
{
|
{
|
||||||
@ -182,7 +180,6 @@ bool TVisLI_mask::on_field_event(TOperable_field& o, TField_event e, long jolly)
|
|||||||
// Creo una maschera che richiede la data
|
// Creo una maschera che richiede la data
|
||||||
TMask sto("li0700a");
|
TMask sto("li0700a");
|
||||||
|
|
||||||
|
|
||||||
// Lancio la maschera
|
// Lancio la maschera
|
||||||
sto.disable(F_ANNO_STO);
|
sto.disable(F_ANNO_STO);
|
||||||
sto.disable(F_FROM_CLI);
|
sto.disable(F_FROM_CLI);
|
||||||
@ -224,31 +221,6 @@ bool TVisLI_mask::on_field_event(TOperable_field& o, TField_event e, long jolly)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void TVisLI_mask::load_config()
|
|
||||||
{
|
|
||||||
TToken_string tipidoc(ini_get_string(CONFIG_DITTA, "li", "TIPIDOC"));
|
|
||||||
TSheet_field &docs = sfield(DOCUMENTI_STATO);
|
|
||||||
|
|
||||||
docs.destroy();
|
|
||||||
for (int i = 0; i < tipidoc.items(); i++)
|
|
||||||
{
|
|
||||||
TString td = tipidoc.get(i);
|
|
||||||
TToken_string stati(ini_get_string(CONFIG_DITTA, "li", td));
|
|
||||||
|
|
||||||
for (int j = 0; j < stati.items(); j++)
|
|
||||||
{
|
|
||||||
|
|
||||||
TToken_string s(stati.get(j), ',');
|
|
||||||
const int r = docs.set_row_cell(F_TIPODOC_C, td);
|
|
||||||
|
|
||||||
docs.set_row_cell(F_STATODOCDA_C, s.get(0), r);
|
|
||||||
docs.set_row_cell(F_STATODOCA_C, s.get(1), r);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
docs.force_update();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
class TVisLI_app : public TSkeleton_application
|
class TVisLI_app : public TSkeleton_application
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
@ -8,13 +8,8 @@
|
|||||||
#define F_ACODCF 408
|
#define F_ACODCF 408
|
||||||
#define F_ARAGSOC 409
|
#define F_ARAGSOC 409
|
||||||
|
|
||||||
#define DOCUMENTI_STATO 201
|
|
||||||
#define F_RIGHE 301
|
#define F_RIGHE 301
|
||||||
|
|
||||||
#define F_TIPODOC_C 101
|
|
||||||
#define F_STATODOCDA_C 102
|
|
||||||
#define F_STATODOCA_C 103
|
|
||||||
|
|
||||||
#define A_DATADOC 101
|
#define A_DATADOC 101
|
||||||
#define A_ANNO 102
|
#define A_ANNO 102
|
||||||
#define A_NUMDOC 103
|
#define A_NUMDOC 103
|
||||||
@ -25,6 +20,7 @@
|
|||||||
#define A_CODCF 108
|
#define A_CODCF 108
|
||||||
#define A_RAGSOC 109
|
#define A_RAGSOC 109
|
||||||
#define A_TOTDOC 110
|
#define A_TOTDOC 110
|
||||||
|
|
||||||
// Campi lettere intento
|
// Campi lettere intento
|
||||||
#define START_PLA 111
|
#define START_PLA 111
|
||||||
|
|
||||||
|
@ -144,23 +144,6 @@ BEGIN
|
|||||||
FLAGS "D"
|
FLAGS "D"
|
||||||
END
|
END
|
||||||
|
|
||||||
SPREADSHEET DOCUMENTI_STATO 45 10
|
|
||||||
BEGIN
|
|
||||||
PROMPT 18 10 ""
|
|
||||||
ITEM "Tipo Numerazione"
|
|
||||||
ITEM "Da stato"
|
|
||||||
ITEM "A stato"
|
|
||||||
FLAGS "D"
|
|
||||||
END
|
|
||||||
|
|
||||||
STRING DLG_PROFILE 256
|
|
||||||
BEGIN
|
|
||||||
PROMPT -1 -1 "Profilo "
|
|
||||||
PSELECT
|
|
||||||
FLAGS "H"
|
|
||||||
END
|
|
||||||
|
|
||||||
|
|
||||||
ENDPAGE
|
ENDPAGE
|
||||||
|
|
||||||
PAGE "Documenti/Lettere Intento" 0 2 0 0
|
PAGE "Documenti/Lettere Intento" 0 2 0 0
|
||||||
@ -204,31 +187,6 @@ ENDPAGE
|
|||||||
|
|
||||||
ENDMASK
|
ENDMASK
|
||||||
|
|
||||||
PAGE "Riga tipo numerazione" -1 -1 78 8
|
|
||||||
|
|
||||||
STRING F_TIPODOC_C 4
|
|
||||||
BEGIN
|
|
||||||
PROMPT 2 1 "Tipo Documento "
|
|
||||||
FIELD TIPODOC
|
|
||||||
END
|
|
||||||
|
|
||||||
STRING F_STATODOCDA_C 4
|
|
||||||
BEGIN
|
|
||||||
PROMPT 2 2 "Da Numerazione "
|
|
||||||
FIELD CODTAB
|
|
||||||
|
|
||||||
END
|
|
||||||
|
|
||||||
STRING F_STATODOCA_C 4
|
|
||||||
BEGIN
|
|
||||||
PROMPT 2 3 "A Numerazione "
|
|
||||||
FIELD CODTAB
|
|
||||||
END
|
|
||||||
|
|
||||||
ENDPAGE
|
|
||||||
|
|
||||||
ENDMASK
|
|
||||||
|
|
||||||
PAGE "Riga" -1 -1 69 14
|
PAGE "Riga" -1 -1 69 14
|
||||||
|
|
||||||
DATE A_DATADOC
|
DATE A_DATADOC
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
#include <automask.h>
|
#include <automask.h>
|
||||||
#include <defmask.h>
|
#include <defmask.h>
|
||||||
#include <relapp.h>
|
#include <relapp.h>
|
||||||
|
#include <reprint.h>
|
||||||
#include <tabutil.h>
|
#include <tabutil.h>
|
||||||
#include <filetext.h>
|
#include <filetext.h>
|
||||||
#include "..\ve\velib.h"
|
#include "..\ve\velib.h"
|
||||||
@ -13,177 +14,35 @@
|
|||||||
|
|
||||||
#define CONFIG_DICINT "DICINT.ini"
|
#define CONFIG_DICINT "DICINT.ini"
|
||||||
|
|
||||||
class TResDI_mask : public TAutomask
|
|
||||||
|
class TLista_dichiarazioni : public TSkeleton_application
|
||||||
{
|
{
|
||||||
private:
|
void elab(TSimpleAutomask& m);
|
||||||
TSheet_field& sheet; // Sheet
|
|
||||||
|
|
||||||
public:
|
|
||||||
bool on_field_event(TOperable_field& o, TField_event e, long jolly) { return true; };
|
|
||||||
TResDI_mask() : TAutomask("li0200a"), sheet(sfield(DOCUMENTI_STATO)) { load_config(); };
|
|
||||||
void load_config();
|
|
||||||
void elabTipiDoc(TToken_string& tipi, TToken_string& stati, TToken_string& tipif, TToken_string& statif);
|
|
||||||
};
|
|
||||||
|
|
||||||
void TResDI_mask::load_config()
|
|
||||||
{
|
|
||||||
//Anno
|
|
||||||
set(F_A_DATA, TDate(TODAY));
|
|
||||||
|
|
||||||
set(F_TABIVA_CODTAB, ini_get_string(CONFIG_DITTA, "li", "CODIVA"));
|
|
||||||
TToken_string tipidoc(ini_get_string(CONFIG_DITTA, "li", "TIPIDOC"));
|
|
||||||
|
|
||||||
TString_array& strarr = sheet.rows_array();
|
|
||||||
sheet.hide();
|
|
||||||
sheet.destroy();
|
|
||||||
|
|
||||||
for(int i = 0; i < tipidoc.items(); i++)
|
|
||||||
{
|
|
||||||
TString td = tipidoc.get(i);
|
|
||||||
TToken_string stati(ini_get_string(CONFIG_DITTA, "li", td));
|
|
||||||
for(int j = 0; j < stati.items(); j++)
|
|
||||||
{
|
|
||||||
TToken_string row, s(stati.get(j), ',');
|
|
||||||
row.add(td);
|
|
||||||
row.add(s.get(0));
|
|
||||||
row.add(s.get(1));
|
|
||||||
strarr.add(row);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
sheet.force_update();
|
|
||||||
sheet.show();
|
|
||||||
}
|
|
||||||
|
|
||||||
void TResDI_mask::elabTipiDoc(TToken_string& tipi, TToken_string& stati, TToken_string& tipif, TToken_string& statif)
|
|
||||||
{
|
|
||||||
bool fattura;
|
|
||||||
TString tipo;
|
|
||||||
for(int i = 0; i < sheet.items(); i++)
|
|
||||||
{
|
|
||||||
TToken_string row = sheet.row(i); // Es. "F01|1|5"
|
|
||||||
int statoin = row.get_int(1), statoout = row.get_int(2);
|
|
||||||
tipo = row.get(0);
|
|
||||||
|
|
||||||
if(cache().get("%TIP", tipo).get_int("I1") == 2) // Se il tipo è una fattura
|
|
||||||
fattura = true;
|
|
||||||
else
|
|
||||||
fattura = false;
|
|
||||||
|
|
||||||
for(; statoin <= statoout; statoin++)
|
|
||||||
{
|
|
||||||
// Aggiornamento: Ci sono 4 token string ora, due per le fatture e due per il resto.
|
|
||||||
// Immetto nelle due TToken_string i valori per gestire la classe TLista_documenti
|
|
||||||
// Per ogni posizione metto il documento e stato interessato, es. F01: da 1 a 3 -> tipi {F01|F01|F01} stati {1|2|3}
|
|
||||||
if (fattura)
|
|
||||||
{
|
|
||||||
tipif.add(tipo);
|
|
||||||
statif.add(statoin);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
tipi.add(tipo);
|
|
||||||
stati.add(statoin);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
class TResDI_app : public TSkeleton_application
|
|
||||||
{
|
|
||||||
void elab(TResDI_mask& m);
|
|
||||||
public:
|
public:
|
||||||
virtual void main_loop();
|
virtual void main_loop();
|
||||||
};
|
};
|
||||||
|
|
||||||
void TResDI_app::elab(TResDI_mask& m)
|
void TLista_dichiarazioni::elab(TSimpleAutomask& m)
|
||||||
{
|
{
|
||||||
int clifoda = m.get_long(F_CODICE_CLIFO_DA);
|
TProgram_report rep("li0200a");
|
||||||
int clifoa = m.get_long(F_CODICE_CLIFO_A);
|
TReport_book book;
|
||||||
TDate aData(m.get_date(F_A_DATA));
|
|
||||||
|
|
||||||
// Creo le TToken_string necessarie per filtrare i documenti
|
|
||||||
TToken_string tipi, stati, tipif, statif;
|
|
||||||
m.elabTipiDoc(tipi, stati, tipif, statif);
|
|
||||||
|
|
||||||
TRelation r_clifo(LF_CLIFO);
|
rep.mask2report(m);
|
||||||
TRectype fil_from(r_clifo.curr()), fil_to(r_clifo.curr());
|
book.add(rep);
|
||||||
fil_from.put("TIPOCF", "C");
|
rep.print_or_preview();
|
||||||
fil_to.put("TIPOCF", "C");
|
|
||||||
|
|
||||||
if(clifoda > 0)
|
|
||||||
fil_from.put("CODCF", clifoda);
|
|
||||||
|
|
||||||
if(clifoa > 0)
|
|
||||||
fil_to.put("CODCF", clifoa);
|
|
||||||
|
|
||||||
TCursor c_clifo(&r_clifo, "", 1, &fil_from, &fil_to);
|
|
||||||
|
|
||||||
TLog_report log(TR("Resoconto plafond"));
|
|
||||||
for(c_clifo = 0; c_clifo.pos() < c_clifo.items(); ++c_clifo)
|
|
||||||
{
|
|
||||||
TRectype row_clifo(c_clifo.curr());
|
|
||||||
|
|
||||||
TLi_manager cli(row_clifo.get_long("CODCF"), aData.year()); // Inizializzo l'oggetto per la gestione del plafond
|
|
||||||
|
|
||||||
if (cli.has_valid_plafond())
|
|
||||||
{
|
|
||||||
TArray arr = cli.get_plafond_array();
|
|
||||||
const int rows = arr.items();
|
|
||||||
|
|
||||||
for (int r = 0; r < rows; r++)
|
|
||||||
{
|
|
||||||
const TRectype & reclint = (const TRectype &) arr[r];
|
|
||||||
const int numprot = reclint.get_int(LETINT_NUMPROT);
|
|
||||||
real plafond = reclint.get_real(LETINT_IMPORTO);
|
|
||||||
real utilizzato = reclint.get_real(LETINT_UTILIZZATO);
|
|
||||||
real residuo = plafond - utilizzato;
|
|
||||||
const int tipo = reclint.get_int(LETINT_TIPOOP);
|
|
||||||
const TDate dal = reclint.get_date(LETINT_DAL);
|
|
||||||
const TDate al = reclint.get_date(LETINT_AL);
|
|
||||||
TString msg;
|
|
||||||
|
|
||||||
msg << TR("Dichiarazione di intento cliente ") << row_clifo.get_long(CLI_CODCF) << " - "<< row_clifo.get(CLI_RAGSOC) << '\n';
|
|
||||||
log.log(0, msg);
|
|
||||||
msg.cut(0) << TR("Protocollo: ") << numprot << " - " << TR("Plafond disponibile: ") << residuo << "€" << '\n';
|
|
||||||
log.log(0, msg);
|
|
||||||
msg.cut(0) << TR("Tipo dichiarazione: ");
|
|
||||||
switch (tipo)
|
|
||||||
{
|
|
||||||
case SOLUZIONE_UNICA:
|
|
||||||
msg << TR("Singola") << '\n';
|
|
||||||
break;
|
|
||||||
case FINO_A_PLAFOND:
|
|
||||||
msg << TR("A concorrenza ") << TR("Dal ") << dal << '\n';
|
|
||||||
break;
|
|
||||||
case A_TEMPO:
|
|
||||||
msg << TR("Dal ") << dal << TR("Al ") << al << '\n';
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
log.log(0, msg);
|
|
||||||
log.log(0, "");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
log.print_or_preview();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void TLista_dichiarazioni::main_loop()
|
||||||
void TResDI_app::main_loop()
|
|
||||||
{
|
{
|
||||||
TResDI_mask m;
|
TSimpleAutomask m("li0200a");
|
||||||
|
|
||||||
while (m.run() == K_ENTER)
|
while (m.run() == K_ENTER)
|
||||||
{
|
|
||||||
elab(m);
|
elab(m);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int li0200(int argc, char* argv[])
|
int li0200(int argc, char* argv[])
|
||||||
{
|
{
|
||||||
TResDI_app a;
|
TLista_dichiarazioni a;
|
||||||
a.run(argc, argv, TR("Stato lettere di intento"));
|
a.run(argc, argv, TR("Stato lettere di intento"));
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
@ -1,10 +1,3 @@
|
|||||||
#define F_TIPODOC 101
|
#define F_ANNO 101
|
||||||
#define F_STATODOCDA 102
|
#define F_CODCLI_DA 102
|
||||||
#define F_STATODOCA 103
|
#define F_CODCLI_A 103
|
||||||
|
|
||||||
#define DOCUMENTI_STATO 201
|
|
||||||
|
|
||||||
#define F_TABIVA_CODTAB 301
|
|
||||||
#define F_A_DATA 303
|
|
||||||
#define F_CODICE_CLIFO_DA 304
|
|
||||||
#define F_CODICE_CLIFO_A 305
|
|
132
src/li/li0200a.rep
Normal file
132
src/li/li0200a.rep
Normal file
@ -0,0 +1,132 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
<report libraries="" page_merge="" save_printer="" name="li0200a" use_printer_font="" orientation="2" page_split="" lpi="6" command="" class="">
|
||||||
|
<description>registro dichiarazioni d'intento</description>
|
||||||
|
<font face="Arial" size="8" />
|
||||||
|
<section repeat="" keep_with_next="" deactivated="" hidden_if_needed="" type="Head" level="" hidden="" page_break="" can_break="" pattern="1">
|
||||||
|
<field deactivated="" type="Stringa" hidden="" link="" dynamic_height="" shade_offset="" width="50" codval="" id="" pattern="1" hide_zero="" text="">
|
||||||
|
<font face="Arial Narrow" bold="1" size="10" />
|
||||||
|
<prescript description="H0.0 PRESCRIPT">"!RAGSOC"
|
||||||
|
GET_FIRM_DATA</prescript>
|
||||||
|
</field>
|
||||||
|
<field x="161" deactivated="" type="Testo" hidden="" link="" dynamic_height="" shade_offset="" width="4" codval="" id="" pattern="1" hide_zero="" text="Pag." />
|
||||||
|
<field x="165" deactivated="" type="Numero" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="5" codval="" id="" pattern="1" hide_zero="" text="">
|
||||||
|
<source>#PAGE</source>
|
||||||
|
<prescript description="H0.0 PRESCRIPT">#REPORT.PAGE</prescript>
|
||||||
|
</field>
|
||||||
|
<field y="1.5" deactivated="" type="Stringa" valign="center" hidden="" align="center" link="" dynamic_height="" shade_offset="" width="170" codval="" height="2" id="" pattern="1" hide_zero="" text="">
|
||||||
|
<font face="Arial" bold="1" size="14" />
|
||||||
|
<postscript description="H0.0 POSTSCRIPT">"Riepilogo dichiarazioni di intento "
|
||||||
|
#ANNO @
|
||||||
|
0
|
||||||
|
C;E;
|
||||||
|
IF
|
||||||
|
#ANNO @
|
||||||
|
+
|
||||||
|
THEN
|
||||||
|
#THIS !
|
||||||
|
</postscript>
|
||||||
|
</field>
|
||||||
|
<field border="1" y="4" deactivated="" type="Linea" hidden="" link="" dynamic_height="" shade_offset="" width="170" codval="" height="0" id="" pattern="1" hide_zero="" text="" />
|
||||||
|
<field border="2" y="4" deactivated="" type="Linea" hidden="" link="" dynamic_height="" shade_offset="" codval="" height="3" id="" pattern="1" hide_zero="" text="" />
|
||||||
|
<field y="4" deactivated="" type="Testo" valign="center" hidden="" align="center" link="" dynamic_height="" shade_offset="" width="20" codval="" height="2" id="" pattern="1" hide_zero="" text="Ricevimento dichiarazione">
|
||||||
|
<font face="Arial Narrow" bold="1" size="10" />
|
||||||
|
</field>
|
||||||
|
<field border="1" x="20" y="4" deactivated="" type="Linea" hidden="" link="" dynamic_height="" shade_offset="" codval="" height="3" id="" pattern="1" hide_zero="" text="" />
|
||||||
|
<field border="1" x="80" y="4" deactivated="" type="Linea" hidden="" link="" dynamic_height="" shade_offset="" codval="" height="3" id="" pattern="1" hide_zero="" text="" />
|
||||||
|
<field border="1" x="93" y="4" deactivated="" type="Linea" hidden="" link="" dynamic_height="" shade_offset="" codval="" height="3" id="" pattern="1" hide_zero="" text="" />
|
||||||
|
<field border="1" x="110" y="4" deactivated="" type="Linea" hidden="" link="" dynamic_height="" shade_offset="" codval="" height="3" id="" pattern="1" hide_zero="" text="" />
|
||||||
|
<field border="1" x="128" y="4" deactivated="" type="Linea" hidden="" link="" dynamic_height="" shade_offset="" codval="" height="3" id="" pattern="1" hide_zero="" text="" />
|
||||||
|
<field border="1" x="148" y="4" deactivated="" type="Linea" hidden="" link="" dynamic_height="" shade_offset="" codval="" height="3" id="" pattern="1" hide_zero="" text="" />
|
||||||
|
<field border="1" x="166" y="4" deactivated="" type="Linea" hidden="" link="" dynamic_height="" shade_offset="" codval="" height="3" id="" pattern="1" hide_zero="" text="" />
|
||||||
|
<field border="1" x="170" y="4" deactivated="" type="Linea" hidden="" link="" dynamic_height="" shade_offset="" codval="" height="3" id="" pattern="1" hide_zero="" text="" />
|
||||||
|
<field x="92" y="4.5" deactivated="" type="Testo" valign="center" hidden="" align="center" link="" dynamic_height="" shade_offset="" width="19" codval="" height="2" id="" pattern="1" hide_zero="" text="Tipo dichiarazione">
|
||||||
|
<font face="Arial Narrow" bold="1" size="10" />
|
||||||
|
</field>
|
||||||
|
<field x="109.5" y="4.5" deactivated="" type="Testo" valign="center" hidden="" align="center" link="" dynamic_height="" shade_offset="" width="19" codval="" height="2" id="" pattern="1" hide_zero="" text="Limiti dichiarazione">
|
||||||
|
<font face="Arial Narrow" bold="1" size="10" />
|
||||||
|
</field>
|
||||||
|
<field x="136" y="4.5" deactivated="" type="Testo" valign="center" hidden="" align="center" link="" dynamic_height="" shade_offset="" width="10" codval="" height="2" id="" pattern="1" hide_zero="" text="Plafond">
|
||||||
|
<font face="Arial Narrow" bold="1" size="10" />
|
||||||
|
</field>
|
||||||
|
<field x="154" y="4.5" deactivated="" type="Testo" valign="center" hidden="" align="center" link="" dynamic_height="" shade_offset="" width="12" codval="" height="2" id="" pattern="1" hide_zero="" text="Disponibile">
|
||||||
|
<font face="Arial Narrow" bold="1" size="10" />
|
||||||
|
</field>
|
||||||
|
<field x="21" y="4.75" deactivated="" type="Testo" valign="center" hidden="" align="center" link="" dynamic_height="" shade_offset="" width="57" codval="" height="1.25" id="" pattern="1" hide_zero="" text="Dichiarante o fornitore F; prestatore">
|
||||||
|
<font face="Arial Narrow" bold="1" size="10" />
|
||||||
|
</field>
|
||||||
|
<field x="81" y="5" deactivated="" type="Testo" valign="center" hidden="" align="center" link="" dynamic_height="" shade_offset="" width="11" codval="" id="" pattern="1" hide_zero="" text="Partita IVA">
|
||||||
|
<font face="Arial Narrow" bold="1" size="10" />
|
||||||
|
</field>
|
||||||
|
<field x="167" y="5" deactivated="" type="Testo" valign="center" hidden="" link="" dynamic_height="" shade_offset="" width="3" codval="" id="" pattern="1" hide_zero="" text="Ch.">
|
||||||
|
<font face="Arial Narrow" bold="1" size="10" />
|
||||||
|
</field>
|
||||||
|
<field y="5.75" deactivated="" type="Testo" valign="center" hidden="" align="center" link="" dynamic_height="" shade_offset="" width="10" codval="" id="" pattern="1" hide_zero="" text="Data">
|
||||||
|
<font face="Arial Narrow" bold="1" size="10" />
|
||||||
|
</field>
|
||||||
|
<field x="10" y="5.75" deactivated="" type="Testo" valign="center" hidden="" align="center" link="" dynamic_height="" shade_offset="" width="10" codval="" id="" pattern="1" hide_zero="" text="Protocollo">
|
||||||
|
<font face="Arial Narrow" bold="1" size="10" />
|
||||||
|
</field>
|
||||||
|
<field border="1" y="7" deactivated="" type="Linea" hidden="" link="" dynamic_height="" shade_offset="" width="170" codval="" height="0" id="" pattern="1" hide_zero="" text="" />
|
||||||
|
</section>
|
||||||
|
<section repeat="" keep_with_next="" deactivated="" hidden_if_needed="" type="Head" level="1" hidden="" page_break="" can_break="" pattern="1" />
|
||||||
|
<section repeat="" keep_with_next="" deactivated="" hidden_if_needed="" type="Body" level="" hidden="" page_break="" can_break="" pattern="1" />
|
||||||
|
<section repeat="" keep_with_next="" deactivated="" hidden_if_needed="" type="Body" level="1" hidden="" page_break="" can_break="" pattern="1">
|
||||||
|
<field x="1" deactivated="" type="Data" hidden="" link="" dynamic_height="" shade_offset="" width="10" codval="" id="" pattern="1" hide_zero="" text="">
|
||||||
|
<source>DATAREG</source>
|
||||||
|
</field>
|
||||||
|
<field x="12" deactivated="" type="Numero" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="6" codval="" id="" pattern="1" hide_zero="" text="">
|
||||||
|
<source>NUMPROT</source>
|
||||||
|
</field>
|
||||||
|
<field border="1" x="20" deactivated="" type="Linea" hidden="" link="" dynamic_height="" shade_offset="" codval="" id="" pattern="1" hide_zero="" text="" />
|
||||||
|
<field x="22" deactivated="" type="Numero" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="6" codval="" id="" pattern="1" hide_zero="" text="">
|
||||||
|
<source>CODCLI</source>
|
||||||
|
</field>
|
||||||
|
<field x="29" deactivated="" type="Stringa" hidden="" link="" dynamic_height="" shade_offset="" width="50" codval="" id="" pattern="1" hide_zero="" text="">
|
||||||
|
<source>CLIFO.RAGSOC</source>
|
||||||
|
</field>
|
||||||
|
<field border="1" x="80" deactivated="" type="Linea" hidden="" link="" dynamic_height="" shade_offset="" codval="" id="" pattern="1" hide_zero="" text="" />
|
||||||
|
<field x="81.5" deactivated="" type="Stringa" hidden="" link="" dynamic_height="" shade_offset="" width="12" codval="" id="" pattern="1" hide_zero="" text="">
|
||||||
|
<source>CLIFO.PAIV</source>
|
||||||
|
</field>
|
||||||
|
<field border="1" x="93.5" deactivated="" type="Linea" hidden="" link="" dynamic_height="" shade_offset="" codval="" id="" pattern="1" hide_zero="" text="" />
|
||||||
|
<field x="94" deactivated="" type="Array" hidden="" link="" dynamic_height="" shade_offset="" width="15" codval="" id="" pattern="1" hide_zero="" text="">
|
||||||
|
<source>154.TIPOOP</source>
|
||||||
|
<list>
|
||||||
|
<li Value="Singola" Code="1">MESSAGE SHOW,10@|HIDE,20@</li>
|
||||||
|
<li Value="A concorrenza" Code="2">MESSAGE SHOW,10@|HIDE,20@</li>
|
||||||
|
<li Value="Nel Periodo" Code="3">MESSAGE SHOW,20@|HIDE,10@</li>
|
||||||
|
</list>
|
||||||
|
</field>
|
||||||
|
<field border="1" x="110" deactivated="" type="Linea" hidden="" link="" dynamic_height="" shade_offset="" codval="" id="" pattern="1" hide_zero="" text="" />
|
||||||
|
<field x="110.5" deactivated="" type="Data" hidden="" link="" dynamic_height="" shade_offset="" width="8" codval="" id="" pattern="1" hide_zero="" text="">
|
||||||
|
<source>154.DAL</source>
|
||||||
|
</field>
|
||||||
|
<field x="119.5" deactivated="" type="Data" hidden="" link="" dynamic_height="" shade_offset="" width="8" codval="" id="" pattern="1" hide_zero="" text="">
|
||||||
|
<source>154.AL</source>
|
||||||
|
</field>
|
||||||
|
<field border="1" x="128" deactivated="" type="Linea" hidden="" link="" dynamic_height="" shade_offset="" codval="" id="" pattern="1" hide_zero="" text="" />
|
||||||
|
<field x="128.5" deactivated="" type="Valuta" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="15" codval="" id="" pattern="1" hide_zero="" text="###.###.###,@@">
|
||||||
|
<groups>10</groups>
|
||||||
|
<source>154.IMPORTO</source>
|
||||||
|
</field>
|
||||||
|
<field border="1" x="148" deactivated="" type="Linea" hidden="" link="" dynamic_height="" shade_offset="" codval="" id="" pattern="1" hide_zero="" text="" />
|
||||||
|
<field x="149" deactivated="" type="Valuta" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="15" codval="" id="" pattern="1" hide_zero="" text="###.###.###,@@">
|
||||||
|
<source>154.IMPORTO-154.UTILIZZATO</source>
|
||||||
|
</field>
|
||||||
|
<field border="1" x="166" deactivated="" type="Linea" hidden="" link="" dynamic_height="" shade_offset="" codval="" id="" pattern="1" hide_zero="" text="" />
|
||||||
|
<field x="168" deactivated="" type="Stringa" hidden="" link="" dynamic_height="" shade_offset="" width="1" codval="" id="" pattern="1" hide_zero="" text="">
|
||||||
|
<source>154.CHIUSA</source>
|
||||||
|
</field>
|
||||||
|
<field border="1" x="170" deactivated="" type="Linea" hidden="" link="" dynamic_height="" shade_offset="" codval="" id="" pattern="1" hide_zero="" text="" />
|
||||||
|
</section>
|
||||||
|
<section repeat="" keep_with_next="" deactivated="" hidden_if_needed="1" type="Foot" level="" hidden="" height="5" page_break="" can_break="" pattern="1">
|
||||||
|
<field border="1" deactivated="" type="Linea" hidden="" link="" dynamic_height="" shade_offset="" width="170" codval="" height="0" id="" pattern="1" hide_zero="" text="" />
|
||||||
|
</section>
|
||||||
|
<section repeat="" keep_with_next="" deactivated="" hidden_if_needed="" type="Foot" level="1" hidden="" height="5" page_break="" can_break="" pattern="1">
|
||||||
|
<field border="1" deactivated="" type="Linea" hidden="" link="" dynamic_height="" shade_offset="" width="170" codval="" height="0" id="" pattern="1" hide_zero="" text="" />
|
||||||
|
</section>
|
||||||
|
<sql>USE 154 SELECT BETWEEN(CODCLI,#F_CODCLI,#T_CODCLI)
|
||||||
|
JOIN CLIFO INTO TIPOCF=='C' CODCF==CODCLI
|
||||||
|
FROM ANNO=#ANNO
|
||||||
|
TO ANNO=#ANNO</sql>
|
||||||
|
</report>
|
@ -4,137 +4,46 @@ TOOLBAR "topbar" 0 0 0 2
|
|||||||
#include <stdbar.h>
|
#include <stdbar.h>
|
||||||
ENDPAGE
|
ENDPAGE
|
||||||
|
|
||||||
PAGE "Impostazioni dichiarazioni d'intento" 0 2 0 0
|
PAGE "Riepilogo dichiarazioni di intento" 0 2 0 0
|
||||||
|
|
||||||
STRING F_TABIVA_CODTAB 4
|
|
||||||
|
|
||||||
|
NUMBER F_ANNO 4
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 1 1 "Codice IVA plafond:"
|
PROMPT 1 2 "Anno : "
|
||||||
FIELD CODTAB
|
FLAGS "A"
|
||||||
KEY 1
|
FIELD ANNO
|
||||||
USE %IVA
|
|
||||||
FLAGS "U"
|
|
||||||
INPUT CODTAB F_TABIVA_CODTAB
|
|
||||||
DISPLAY "Codice" CODTAB
|
|
||||||
DISPLAY "Descrizione@50" S0
|
|
||||||
DISPLAY "Tipo" S1
|
|
||||||
DISPLAY "%@5" R0
|
|
||||||
DISPLAY "Vent." S6
|
|
||||||
DISPLAY "Sospeso" B2
|
|
||||||
OUTPUT F_TABIVA_CODTAB CODTAB
|
|
||||||
HELP "Inserire il codice IVA"
|
|
||||||
CHECKTYPE REQUIRED
|
|
||||||
VALIDATE ZEROFILL_FUNC 2
|
|
||||||
END
|
END
|
||||||
|
|
||||||
DATE F_A_DATA
|
NUMBER F_CODCLI_DA 6
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 1 2 "A data "
|
PROMPT 1 3 "Da cliente : "
|
||||||
CHECKTYPE REQUIRED
|
|
||||||
END
|
|
||||||
|
|
||||||
NUMBER F_CODICE_CLIFO_DA 6
|
|
||||||
BEGIN
|
|
||||||
PROMPT 1 3 "Da cod. cliente: "
|
|
||||||
FLAG "UR"
|
FLAG "UR"
|
||||||
USE LF_CLIFO
|
USE LF_CLIFO
|
||||||
INPUT TIPOCF "C"
|
INPUT TIPOCF "C"
|
||||||
INPUT CODCF F_CODICE_CLIFO_DA
|
INPUT CODCF F_CODCLI_DA
|
||||||
DISPLAY "Cliente" CODCF
|
DISPLAY "Cliente" CODCF
|
||||||
DISPLAY "Ragione sociale@60" RAGSOC
|
DISPLAY "Ragione sociale@60" RAGSOC
|
||||||
OUTPUT F_CODICE_CLIFO_DA CODCF
|
OUTPUT F_CODCLI_DA CODCF
|
||||||
|
FIELD F_CODCLI
|
||||||
GROUP 1
|
GROUP 1
|
||||||
END
|
END
|
||||||
|
|
||||||
NUMBER F_CODICE_CLIFO_A 6
|
NUMBER F_CODCLI_A 6
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 32 3 "a: "
|
PROMPT 32 3 "a : "
|
||||||
FLAG "UR"
|
FLAG "UR"
|
||||||
USE LF_CLIFO
|
USE LF_CLIFO
|
||||||
INPUT TIPOCF "C"
|
INPUT TIPOCF "C"
|
||||||
INPUT CODCF F_CODICE_CLIFO_A
|
INPUT CODCF F_CODCLI_A
|
||||||
COPY DISPLAY F_CODICE_CLIFO_DA
|
COPY DISPLAY F_CODCLI_DA
|
||||||
OUTPUT F_CODICE_CLIFO_A CODCF
|
OUTPUT F_CODCLI_A CODCF
|
||||||
NUM_EXPR #F_CODICE_CLIFO_A>=#F_CODICE_CLIFO_DA
|
NUM_EXPR #F_CODCLI_A>=#F_CODCLI_DA
|
||||||
WARNING "Digitare un codice maggiore o uguale al campo 'da codice cliente'"
|
WARNING "Digitare un codice maggiore o uguale al campo 'da codice cliente'"
|
||||||
GROUP 1
|
FIELD T_CODCLI
|
||||||
END
|
GROUP 2
|
||||||
|
|
||||||
SPREADSHEET DOCUMENTI_STATO 45 10
|
|
||||||
BEGIN
|
|
||||||
PROMPT 1 5 ""
|
|
||||||
ITEM "Tipo Numerazione"
|
|
||||||
ITEM "Da stato"
|
|
||||||
ITEM "A stato"
|
|
||||||
END
|
END
|
||||||
|
|
||||||
ENDPAGE
|
ENDPAGE
|
||||||
|
|
||||||
ENDMASK
|
ENDMASK
|
||||||
|
|
||||||
PAGE "Riga tipo numerazione" -1 -1 78 8
|
|
||||||
|
|
||||||
STRING F_TIPODOC 4
|
|
||||||
BEGIN
|
|
||||||
PROMPT 2 1 "Tipo Documento "
|
|
||||||
FIELD TIPODOC
|
|
||||||
HELP "Codice tipo documento"
|
|
||||||
USE %TIP
|
|
||||||
INPUT CODTAB F_TIPODOC
|
|
||||||
DISPLAY "Codice" CODTAB
|
|
||||||
DISPLAY "Descrizione@50" S0
|
|
||||||
OUTPUT F_TIPODOC CODTAB
|
|
||||||
CHECKTYPE REQUIRED
|
|
||||||
END
|
|
||||||
|
|
||||||
STRING F_STATODOCDA 4
|
|
||||||
BEGIN
|
|
||||||
PROMPT 2 2 "Da Numerazione "
|
|
||||||
FIELD CODTAB
|
|
||||||
KEY 1
|
|
||||||
USE %STD
|
|
||||||
FLAGS "U"
|
|
||||||
INPUT CODTAB F_STATODOCA
|
|
||||||
DISPLAY "Stato" CODTAB
|
|
||||||
DISPLAY "Descrizione@50" S0
|
|
||||||
OUTPUT F_STATODOCDA CODTAB
|
|
||||||
//CHECKTYPE REQUIRED
|
|
||||||
END
|
|
||||||
|
|
||||||
STRING F_STATODOCA 4
|
|
||||||
BEGIN
|
|
||||||
PROMPT 2 3 "A Numerazione "
|
|
||||||
FIELD CODTAB
|
|
||||||
KEY 1
|
|
||||||
USE %STD
|
|
||||||
FLAGS "U"
|
|
||||||
INPUT CODTAB F_STATODOCA
|
|
||||||
DISPLAY "Stato" CODTAB
|
|
||||||
DISPLAY "Descrizione@50" S0
|
|
||||||
OUTPUT F_STATODOCA CODTAB
|
|
||||||
NUM_EXPR #F_STATODOCA>=#F_STATODOCDA
|
|
||||||
//CHECKTYPE REQUIRED
|
|
||||||
END
|
|
||||||
|
|
||||||
ENDPAGE
|
|
||||||
|
|
||||||
TOOLBAR "Documento" 0 0 0 2
|
|
||||||
|
|
||||||
BUTTON DLG_OK 2 2
|
|
||||||
BEGIN
|
|
||||||
PROMPT 1 1 ""
|
|
||||||
END
|
|
||||||
|
|
||||||
BUTTON DLG_DELREC 2 2
|
|
||||||
BEGIN
|
|
||||||
PROMPT 1 1 ""
|
|
||||||
END
|
|
||||||
|
|
||||||
BUTTON DLG_CANCEL 2 2
|
|
||||||
BEGIN
|
|
||||||
PROMPT 1 1 ""
|
|
||||||
END
|
|
||||||
|
|
||||||
|
|
||||||
ENDPAGE
|
|
||||||
|
|
||||||
ENDMASK
|
|
@ -16,7 +16,7 @@ private:
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
bool on_field_event(TOperable_field& o, TField_event e, long jolly);
|
bool on_field_event(TOperable_field& o, TField_event e, long jolly);
|
||||||
TDI_mask() : TAutomask("li0300a"), sheet(sfield(DOC_STATO)) { load_config(); };
|
TDI_mask() : TAutomask("li0300a"), sheet(sfield(F_DOC_SHEET)) { load_config(); };
|
||||||
void load_config();
|
void load_config();
|
||||||
void save_config();
|
void save_config();
|
||||||
|
|
||||||
@ -26,12 +26,12 @@ bool TDI_mask::on_field_event(TOperable_field& o, TField_event e, long jolly)
|
|||||||
{
|
{
|
||||||
switch (o.dlg())
|
switch (o.dlg())
|
||||||
{
|
{
|
||||||
case FLD_TABIVA_CODTAB:
|
case F_CODIVA:
|
||||||
case FLD_TABIVA_CODTAB_ALT:
|
case F_CODIVA_ALT:
|
||||||
{
|
{
|
||||||
if(e == fe_modify)
|
if(e == fe_modify)
|
||||||
{
|
{
|
||||||
TString codiva = get(FLD_TABIVA_CODTAB), codiva2 = get(FLD_TABIVA_CODTAB_ALT);
|
TString codiva = get(F_CODIVA), codiva2 = get(F_CODIVA_ALT);
|
||||||
if(codiva == codiva2)
|
if(codiva == codiva2)
|
||||||
{
|
{
|
||||||
error_box("Attenzione! Questo codice è già stato inserito");
|
error_box("Attenzione! Questo codice è già stato inserito");
|
||||||
@ -48,8 +48,9 @@ bool TDI_mask::on_field_event(TOperable_field& o, TField_event e, long jolly)
|
|||||||
|
|
||||||
void TDI_mask::load_config()
|
void TDI_mask::load_config()
|
||||||
{
|
{
|
||||||
set(FLD_TABIVA_CODTAB, ini_get_string(CONFIG_DITTA, "li", "CODIVA"));
|
set(F_CODIVA, ini_get_string(CONFIG_DITTA, "li", "CODIVA"));
|
||||||
set(FLD_TABIVA_CODTAB_ALT, ini_get_string(CONFIG_DITTA, "li", "CODIVALT"));
|
set(F_CODIVA_ALT, ini_get_string(CONFIG_DITTA, "li", "CODIVALT"));
|
||||||
|
set(F_ENABLE_FATTURE, ini_get_bool(CONFIG_DITTA, "li", "ENABLEFATT"));
|
||||||
TToken_string tipidoc(ini_get_string(CONFIG_DITTA, "li", "TIPIDOC"));
|
TToken_string tipidoc(ini_get_string(CONFIG_DITTA, "li", "TIPIDOC"));
|
||||||
|
|
||||||
TString_array& strarr = sheet.rows_array();
|
TString_array& strarr = sheet.rows_array();
|
||||||
@ -86,8 +87,9 @@ void TDI_mask::save_config()
|
|||||||
val.add(row.get(2));
|
val.add(row.get(2));
|
||||||
ini_set_string(CONFIG_DITTA, "li", row.get(0), val);
|
ini_set_string(CONFIG_DITTA, "li", row.get(0), val);
|
||||||
}
|
}
|
||||||
ini_set_string(CONFIG_DITTA, "li", "CODIVA", get(FLD_TABIVA_CODTAB));
|
ini_set_string(CONFIG_DITTA, "li", "CODIVA", get(F_CODIVA));
|
||||||
ini_set_string(CONFIG_DITTA, "li", "CODIVALT", get(FLD_TABIVA_CODTAB_ALT));
|
ini_set_string(CONFIG_DITTA, "li", "CODIVALT", get(F_CODIVA_ALT));
|
||||||
|
ini_set_bool(CONFIG_DITTA, "li", "ENABLEFATT", get_bool(F_ENABLE_FATTURE));
|
||||||
ini_set_string(CONFIG_DITTA, "li", "TIPIDOC", tipidoc);
|
ini_set_string(CONFIG_DITTA, "li", "TIPIDOC", tipidoc);
|
||||||
message_box(TR("Impostazioni salvate correttamente"));
|
message_box(TR("Impostazioni salvate correttamente"));
|
||||||
}
|
}
|
||||||
@ -102,15 +104,13 @@ void TDISettings_app::main_loop()
|
|||||||
{
|
{
|
||||||
TDI_mask m;
|
TDI_mask m;
|
||||||
while (m.run() == K_SAVE)
|
while (m.run() == K_SAVE)
|
||||||
{
|
|
||||||
m.save_config();
|
m.save_config();
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int li0300(int argc, char* argv[])
|
int li0300(int argc, char* argv[])
|
||||||
{
|
{
|
||||||
TDISettings_app a;
|
TDISettings_app a;
|
||||||
a.run(argc, argv, TR("Lettere d'intento"));
|
a.run(argc, argv, TR("Configurazione lettere d'intento"));
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
@ -1,8 +1,8 @@
|
|||||||
#define FLD_TIPODOC 101
|
#define S_TIPODOC 101
|
||||||
#define FLD_STATODOCDA 102
|
#define S_STATODOCDA 102
|
||||||
#define FLD_STATODOCA 103
|
#define S_STATODOCA 103
|
||||||
|
|
||||||
#define DOC_STATO 201
|
#define F_CODIVA 201
|
||||||
|
#define F_CODIVA_ALT 202
|
||||||
#define FLD_TABIVA_CODTAB 301
|
#define F_ENABLE_FATTURE 203
|
||||||
#define FLD_TABIVA_CODTAB_ALT 302
|
#define F_DOC_SHEET 204
|
@ -13,50 +13,55 @@ END
|
|||||||
|
|
||||||
ENDPAGE
|
ENDPAGE
|
||||||
|
|
||||||
PAGE "Impostazioni dichiarazioni d'intento" 0 2 0 0
|
PAGE "Cofigurazione dichiarazioni d'intento" 0 2 0 0
|
||||||
|
|
||||||
STRING FLD_TABIVA_CODTAB 4
|
STRING F_CODIVA 4
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 2 1 "Codice IVA plafond: "
|
PROMPT 2 1 "Codice IVA plafond: "
|
||||||
FIELD CODTAB
|
FIELD CODTAB
|
||||||
KEY 1
|
KEY 1
|
||||||
USE %IVA
|
USE %IVA
|
||||||
FLAGS "U"
|
FLAGS "U"
|
||||||
INPUT CODTAB FLD_TABIVA_CODTAB
|
INPUT CODTAB F_CODIVA
|
||||||
DISPLAY "Codice" CODTAB
|
DISPLAY "Codice" CODTAB
|
||||||
DISPLAY "Descrizione@50" S0
|
DISPLAY "Descrizione@50" S0
|
||||||
DISPLAY "Tipo" S1
|
DISPLAY "Tipo" S1
|
||||||
DISPLAY "%@5" R0
|
DISPLAY "%@5" R0
|
||||||
DISPLAY "Vent." S6
|
DISPLAY "Vent." S6
|
||||||
DISPLAY "Sospeso" B2
|
DISPLAY "Sospeso" B2
|
||||||
OUTPUT FLD_TABIVA_CODTAB CODTAB
|
OUTPUT F_CODIVA CODTAB
|
||||||
HELP "Inserire il codice IVA"
|
HELP "Inserire il codice IVA"
|
||||||
CHECKTYPE REQUIRED
|
CHECKTYPE REQUIRED
|
||||||
VALIDATE ZEROFILL_FUNC 2
|
VALIDATE ZEROFILL_FUNC 2
|
||||||
END
|
END
|
||||||
|
|
||||||
STRING FLD_TABIVA_CODTAB_ALT 4
|
STRING F_CODIVA_ALT 4
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 2 2 "Codice IVA alternativo: "
|
PROMPT 2 2 "Codice IVA alternativo: "
|
||||||
FIELD CODTAB
|
FIELD CODTAB
|
||||||
KEY 1
|
KEY 1
|
||||||
USE %IVA
|
USE %IVA
|
||||||
FLAGS "U"
|
FLAGS "U"
|
||||||
INPUT CODTAB FLD_TABIVA_CODTAB
|
INPUT CODTAB F_CODIVA_ALT
|
||||||
DISPLAY "Codice" CODTAB
|
DISPLAY "Codice" CODTAB
|
||||||
DISPLAY "Descrizione@50" S0
|
DISPLAY "Descrizione@50" S0
|
||||||
DISPLAY "Tipo" S1
|
DISPLAY "Tipo" S1
|
||||||
DISPLAY "%@5" R0
|
DISPLAY "%@5" R0
|
||||||
DISPLAY "Vent." S6
|
DISPLAY "Vent." S6
|
||||||
DISPLAY "Sospeso" B2
|
DISPLAY "Sospeso" B2
|
||||||
OUTPUT FLD_TABIVA_CODTAB_ALT CODTAB
|
OUTPUT F_CODIVA_ALT CODTAB
|
||||||
HELP "Inserire il codice IVA"
|
HELP "Inserire il codice IVA"
|
||||||
VALIDATE ZEROFILL_FUNC 2
|
VALIDATE ZEROFILL_FUNC 2
|
||||||
END
|
END
|
||||||
|
|
||||||
SPREADSHEET DOC_STATO 45 10
|
BOOLEAN F_ENABLE_FATTURE
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 2 4 ""
|
PROMPT 2 2 "Considera attivi tutti i documenti fattura e nota di credito"
|
||||||
|
END
|
||||||
|
|
||||||
|
SPREADSHEET F_DOC_SHEET 45 -1
|
||||||
|
BEGIN
|
||||||
|
PROMPT 2 6 ""
|
||||||
ITEM "Tipo Documento"
|
ITEM "Tipo Documento"
|
||||||
ITEM "Da stato"
|
ITEM "Da stato"
|
||||||
ITEM "A stato"
|
ITEM "A stato"
|
||||||
@ -68,46 +73,42 @@ ENDMASK
|
|||||||
|
|
||||||
PAGE "Riga tipo numerazione" -1 -1 78 8
|
PAGE "Riga tipo numerazione" -1 -1 78 8
|
||||||
|
|
||||||
STRING FLD_TIPODOC 4
|
STRING S_TIPODOC 4
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 2 1 "Tipo Documento "
|
PROMPT 2 1 "Tipo Documento "
|
||||||
FIELD TIPODOC
|
|
||||||
HELP "Codice tipo documento"
|
HELP "Codice tipo documento"
|
||||||
USE %TIP
|
USE %TIP
|
||||||
INPUT CODTAB FLD_TIPODOC
|
INPUT CODTAB S_TIPODOC
|
||||||
DISPLAY "Codice" CODTAB
|
DISPLAY "Codice" CODTAB
|
||||||
DISPLAY "Descrizione@50" S0
|
DISPLAY "Descrizione@50" S0
|
||||||
OUTPUT FLD_TIPODOC CODTAB
|
OUTPUT S_TIPODOC CODTAB
|
||||||
CHECKTYPE REQUIRED
|
CHECKTYPE REQUIRED
|
||||||
END
|
END
|
||||||
|
|
||||||
STRING FLD_STATODOCDA 4
|
STRING S_STATODOCDA 4
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 2 2 "Da Numerazione "
|
PROMPT 2 2 "Da Numerazione "
|
||||||
FIELD CODTAB
|
|
||||||
KEY 1
|
KEY 1
|
||||||
USE %STD
|
USE %STD
|
||||||
FLAGS "U"
|
FLAGS "U"
|
||||||
INPUT CODTAB FLD_STATODOCA
|
INPUT CODTAB S_STATODOCA
|
||||||
DISPLAY "Stato" CODTAB
|
DISPLAY "Stato" CODTAB
|
||||||
DISPLAY "Descrizione@50" S0
|
DISPLAY "Descrizione@50" S0
|
||||||
OUTPUT FLD_STATODOCDA CODTAB
|
OUTPUT S_STATODOCDA CODTAB
|
||||||
//CHECKTYPE REQUIRED
|
|
||||||
END
|
END
|
||||||
|
|
||||||
STRING FLD_STATODOCA 4
|
STRING S_STATODOCA 4
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 2 3 "A Numerazione "
|
PROMPT 2 3 "A Numerazione "
|
||||||
FIELD CODTAB
|
FIELD CODTAB
|
||||||
KEY 1
|
KEY 1
|
||||||
USE %STD
|
USE %STD
|
||||||
FLAGS "U"
|
FLAGS "U"
|
||||||
INPUT CODTAB FLD_STATODOCA
|
INPUT CODTAB S_STATODOCA
|
||||||
DISPLAY "Stato" CODTAB
|
DISPLAY "Stato" CODTAB
|
||||||
DISPLAY "Descrizione@50" S0
|
DISPLAY "Descrizione@50" S0
|
||||||
OUTPUT FLD_STATODOCA CODTAB
|
OUTPUT S_STATODOCA CODTAB
|
||||||
NUM_EXPR #FLD_STATODOCA>=#FLD_STATODOCDA
|
NUM_EXPR #S_STATODOCA>=#S_STATODOCDA
|
||||||
//CHECKTYPE REQUIRED
|
|
||||||
END
|
END
|
||||||
|
|
||||||
ENDPAGE
|
ENDPAGE
|
||||||
|
@ -173,16 +173,15 @@ bool TPrint_letint_mask::ask_service_pwd()
|
|||||||
//---------------------------------------------------------------
|
//---------------------------------------------------------------
|
||||||
// REPORT
|
// REPORT
|
||||||
//---------------------------------------------------------------
|
//---------------------------------------------------------------
|
||||||
class TLetint_report : public TReport
|
class TLetint_report : public TProgram_report
|
||||||
{
|
{
|
||||||
word _last_printed_page;
|
word _last_printed_page;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual bool use_mask() { return false; }
|
|
||||||
virtual word last_printed_page() const { return _last_printed_page; }
|
virtual word last_printed_page() const { return _last_printed_page; }
|
||||||
|
|
||||||
public:
|
public:
|
||||||
TLetint_report(int last_printed_page) : _last_printed_page(last_printed_page) {}
|
TLetint_report(int last_printed_page) : TProgram_report("li0500a") , _last_printed_page(last_printed_page) {}
|
||||||
~TLetint_report() {}
|
~TLetint_report() {}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -278,7 +277,6 @@ void TPrint_letint::main_loop()
|
|||||||
path = m.get(F_REPORT);
|
path = m.get(F_REPORT);
|
||||||
if (path.empty())
|
if (path.empty())
|
||||||
path = "li0500a";
|
path = "li0500a";
|
||||||
rep.load(path);
|
|
||||||
rep.mask2report(m);
|
rep.mask2report(m);
|
||||||
|
|
||||||
|
|
||||||
|
@ -46,12 +46,15 @@ const TString & make_key(const int anno, const int numplaf)
|
|||||||
|
|
||||||
static TToken_string __tipidoc;
|
static TToken_string __tipidoc;
|
||||||
static TToken_string __statidoc;
|
static TToken_string __statidoc;
|
||||||
|
static bool __enable_fatture = false;
|
||||||
|
|
||||||
void get_tipi_stati()
|
void get_tipi_stati()
|
||||||
{
|
{
|
||||||
if (__tipidoc.blank())
|
if (__tipidoc.blank())
|
||||||
{
|
{
|
||||||
TToken_string tipidoc = (TToken_string &)ini_get_string(CONFIG_DITTA, "li", "TIPIDOC");
|
__enable_fatture = ini_get_bool(CONFIG_DITTA, "li", "ENABLEFATT");
|
||||||
|
|
||||||
|
TToken_string tipidoc = (TToken_string &)ini_get_string(CONFIG_DITTA, "li", "TIPIDOC");
|
||||||
|
|
||||||
for (const char * tipo = tipidoc.get(0); tipo && *tipo; tipo = tipidoc.get())
|
for (const char * tipo = tipidoc.get(0); tipo && *tipo; tipo = tipidoc.get())
|
||||||
{
|
{
|
||||||
@ -528,10 +531,19 @@ void TLi_manager::read(const char t, const long c, TDate inidic, TDate findic)
|
|||||||
|
|
||||||
bool TLi_manager::doc_ok(const TDocumento & doc) const
|
bool TLi_manager::doc_ok(const TDocumento & doc) const
|
||||||
{
|
{
|
||||||
const TString8 tipodoc = doc.tipo().codice();
|
const TString8 tipodoc = doc.tipo().codice();
|
||||||
const TString4 stato = doc.get(DOC_STATO);
|
const TString4 stato = doc.get(DOC_STATO);
|
||||||
|
TToken_string & t = tipi();
|
||||||
|
|
||||||
return (tipi().find(tipodoc) >= 0) && (stati().find(stato) >= 0);
|
if (__enable_fatture)
|
||||||
|
{
|
||||||
|
if (doc.tipo().is_fattura())
|
||||||
|
return doc.tipo().stato_bloccato() <= ' ' || stato[0] < doc.tipo().stato_bloccato();
|
||||||
|
else
|
||||||
|
return (t.find(tipodoc) >= 0) && (doc.tipo().stato_bloccato() <= ' ' || stato[0] < doc.tipo().stato_bloccato());
|
||||||
|
}
|
||||||
|
else
|
||||||
|
return (t.find(tipodoc) >= 0) && (stati().find(stato) >= 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool TLi_manager::plafond_write(TDocumento& d)
|
bool TLi_manager::plafond_write(TDocumento& d)
|
||||||
|
@ -5,8 +5,8 @@ Module = 16
|
|||||||
Flags = "F"
|
Flags = "F"
|
||||||
Item_01 = "Dichiarazioni d'intento", "li0 -3", ""
|
Item_01 = "Dichiarazioni d'intento", "li0 -3", ""
|
||||||
Item_02 = "Stampa dichiarazioni", "li0 -4", ""
|
Item_02 = "Stampa dichiarazioni", "li0 -4", ""
|
||||||
Item_03 = "Riepilogo dichiarazioni", "li0 -1", ""
|
Item_03 = "Riepilogo dichiarazioni d'intento", "li0 -1", ""
|
||||||
Item_04 = "Riepilogo Documenti/Lettere", "li0 -0", ""
|
Item_04 = "Riepilogo Documenti/Lettere", "li0 -0", ""
|
||||||
Item_05 = "Ricostruzione Plafond Lettere", "li0 -6", ""
|
Item_05 = "Ricostruzione Plafond Lettere", "li0 -6", ""
|
||||||
Item_06 = "Impostazioni", "li0 -2", ""
|
Item_06 = "Configurazione modulo", "li0 -2", ""
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user