Patch level : 10.0 290

Files correlati     :  ve7.ex
Commento            :

Dichiarazione IVA inizio 

git-svn-id: svn://10.65.10.50/branches/R_10_00@23303 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
bonazzi 2016-09-21 07:20:25 +00:00
parent b63072d269
commit 8af5856437
33 changed files with 2060 additions and 23 deletions

View File

@ -355,15 +355,15 @@ BEGIN
PROMPT 2 18 "Contabilità analitica"
FIELD MOVIND
MODULE ca,cm
MESSAGE FALSE CLEAR,F_CONTIND
MESSAGE TRUE ENABLE,F_CONTIND
MESSAGE FALSE CLEAR,F_MOVCGIND
MESSAGE TRUE ENABLE,F_MOVCGIND
END
BOOLEAN F_CONTIND
BOOLEAN F_MOVCGIND
BEGIN
PROMPT 34 18 "Contabilità industriale"
FIELD MOVCGIND
MODULE ci
MODULE CI
END
NUMBER F_REGSPIVA 2
@ -371,7 +371,7 @@ BEGIN
PROMPT 2 19 "Regimi speciali IVA "
INPUT F_REGSPIVA
SHEET "Codice|Descrizione@75"
ITEM "|Nessuno"
ITEM "|Nessuno"
ITEM "1|Acquisti beni dallo Stato del Vaticano e dalla Repubblica di San Marino"
ITEM "2|Estrazione beni da depositi Iva"
ITEM "3|Acquisti beni e servizi da soggetti non residenti"

View File

@ -80,13 +80,17 @@ class TStampa_bilanci : public TPrintapp
TParagraph_string* _d;
const char* _buff;
bool _noseparator; // Usa separatore delle migliaia o no?
#ifdef CONT_SEP
bool _fl_cont_sep;
#endif
TString _cofi,_cap,_paiva,_ragsoc,_comunefis,_provfis,_viafis;
TString _descr_dare, _descr_avere, _gc_corr_dare, _gc_corr_avere, _descr;
TString _gc_prec_dare, _gc_prec_avere, _situazione, _descr_succ;
TString _tmp;
#ifdef CONT_SEP
TString _cont_sep;
#endif
char _tipo_conto, _tipoc_succ;
int _annoes, _bilancio, _tipo_stampa, _tipo_stampa1,_stampa_width,_gp,_cp,_i;
@ -938,10 +942,12 @@ bool TStampa_bilanci::bil_sez_contr()
if (_tipo_stampa == 1) //bil. a sez. contrapposte per data limite
{
#ifdef CONT_SEP
if (_fl_cont_sep)
movimentato = sld.saldo_cont_sep(g, c, s, _annoes, _datalim, indbil_conto, _cont_sep, _stampa_mov_prov) ;
else
movimentato = sld.data_limite_bilancio(_bilancio, g, c, s, _dataini, _datalim, indbil_conto, _stampa_mov_prov);
#endif
movimentato = sld.data_limite_bilancio(_bilancio, g, c, s, _dataini, _datalim, indbil_conto, _stampa_mov_prov);
}
else
{
@ -1110,9 +1116,11 @@ bool TStampa_bilanci::ricerca_sottoc_clifo(int g,int c, bool compensa, int indbi
if (_tipo_stampa == 1) //bil. a sez. contrapposte per data limite
{
#ifdef CONT_SEP
if (_fl_cont_sep)
movimentato = sld.saldo_cont_sep(g, c, s, _annoes, _datalim, indbil_conto, _cont_sep, _stampa_mov_prov);
else
#endif
movimentato = sld.data_limite_bilancio(_bilancio,g,c,s,_dataini,_datalim,indbil_conto,_stampa_mov_prov);
}
else
@ -3786,8 +3794,10 @@ bool TStampa_bilanci::set_print(int)
_quadratura = m.get_bool(F_QUADRATURA);
_hide_clifo = m.get_bool(F_HIDE_CLIFO);
_noseparator = m.get_bool(F_SEPARATOR);
#ifdef CONT_SEP
_fl_cont_sep = m.get_bool(F_ST_CONTSEP);
_cont_sep = m.get(F_CONTSEP);
#endif
//qui getti le terne dei 2 conti da mettere in bill_from e bill_to con un metodo dei TBill
_bill_from.get(m, F_DA_GRUPPO, F_DA_CONTO, F_DA_SOTTOCONTO);

View File

@ -78,11 +78,15 @@ BEGIN
HELP "Indicare il tipo di stampa"
ITEM "1|Per date limite"
MESSAGE SHOW,F_DATALIM|SHOW,F_TOTALI|SHOW,F_CODICI|SHOW,F_SALDO
#ifdef CONT_SEP
MESSAGE SHOW,F_ST_CONTSEP
#endif
ITEM "2|All'ultima immissione"
MESSAGE HIDE,F_DATALIM|RESET,F_DATALIM
MESSAGE SHOW,F_TOTALI|SHOW,F_CODICI|SHOW,F_SALDO
#ifdef CONT_SEP
MESSAGE HIDE,F_ST_CONTSEP
#endif
END
RADIOBUTTON F_STAMPA1 28
@ -92,11 +96,15 @@ BEGIN
HELP "Indicare il tipo di stampa"
ITEM "1|Per date limite"
MESSAGE SHOW,F_VERIFICA|SHOW,F_MODULO|SHOW,F_STAMPAMPROV
#ifdef CONT_SEP
MESSAGE SHOW,F_ST_CONTSEP
#endif
ITEM "2|All'ultima immissione"
MESSAGE SHOW,F_VERIFICA|SHOW,F_MODULO|SHOW,F_STAMPAMPROV
MESSAGE COPY,F_STAMPA
#ifdef CONT_SEP
MESSAGE HIDE,F_ST_CONTSEP
#endif
END
DATE F_DATALIM
@ -176,6 +184,7 @@ BEGIN
PROMPT 2 13 "Quadratura con Libro Giornale"
END
#ifdef CONT_SEP
BOOLEAN F_ST_CONTSEP
BEGIN
PROMPT 2 14 "Bilancio a contabilità separata"
@ -195,6 +204,7 @@ BEGIN
CHECKTYPE NORMAL
MODULE NP
END
#endif
ENDPAGE

View File

@ -119,7 +119,9 @@ private:
TString16 _reg;
int _anno_iva;
bool _stampa_definitiva;
bool _cont_sep;
#ifdef CONT_SEP
bool _st_cont_sep;
#endif
bool _MovGiaStampato;
bool _totals_updated;
@ -986,7 +988,10 @@ void TStampa_giornale::set_rows (int file, int counter)
{
TString16 datadoc_str, datareg_str, numdoc, frm, caus;
TDate datadoc, datareg;
TString80 mov_descr, rmv_descr;
#ifdef CONT_SEP
TString80 mov_descr, rmv_descr, cont_sep;
#endif
long numreg, protiva;
int r = 1;
int g, c;
@ -1015,8 +1020,10 @@ void TStampa_giornale::set_rows (int file, int counter)
numreg = mov.get_long("NUMREG");
mov_descr = mov.get("DESCR");
if (_cont_sep )
cont_sep = cache().get("&NPENT", mov.get(MOV_CONTSEP), "S0");
#ifdef CONT_SEP
if (_st_cont_sep )
_st_cont_sep = cache().get("&NPENT", mov.get(MOV_CONTSEP), "S0");
#endif
// Usati in setta_righe_iva per determinare tipo attivita'
_reg = mov.get(MOV_REG);
@ -1053,9 +1060,20 @@ void TStampa_giornale::set_rows (int file, int counter)
fmt.format("@%dg*", _stampa_width == 132 ? 131 : 197);
set_row(r,fmt);
}
if (cont_sep.full())
set_row(++r,FR("%-50s"), (const char*)cont_sep);
#ifdef CONT_SEP
if (_st_cont_sep)
{
const TString & cod_cont_sep = mov.get(MOV_CONTSEP);
if (cod_cont_sep.full())
{
const TString & desc_cont_sep = cache().get("&NPENT", cod_cont_sep, "S0");
if (_stampa_width == 132)
set_row(++r,FR("@68g@b%-50s"), (const char *) desc_cont_sep);
else
set_row(r,FR("@130g@b%-50s"), (const char *) desc_cont_sep);
}
}
#endif
if (caus.not_empty())
{
const char* desc_caus = get_descr_caus(caus);
@ -1779,11 +1797,14 @@ bool TStampa_giornale::set_print(int)
{
_reg_cod = ma.get(CODREG);
_stampa_definitiva = ma.get_bool(STAMPA_DEF);
#ifdef CONT_SEP
_st_cont_sep = ma.get_bool(STAMPA_CS);
#endif
_data_da = ma.get(DATA_DA);
_data_a = ma.get(DATA_A);
#ifdef CONT_SEP
_cont_sep = ma.get_bool(F_ST_CONTSEP);
#endif
_stampa_width = ma.get_int(STAMPA_WIDTH);
_stampa_len = ma.get_int(STAMPA_LEN);

View File

@ -1637,7 +1637,10 @@ class TMastrini_grid : public TGrid_field
TColor_mask _colmsk;
COLOR _mas_back, _mas_fore;
COLOR _con_back, _con_fore;
bool _primanoting, _contsep;
bool _primanoting;
#ifdef CONT_SEP
bool _contsep;
#endif
protected: // TGrid_field
virtual bool on_record(long rec);
@ -1663,14 +1666,19 @@ public:
void save_colors();
void load_colors();
void set_colors();
#ifdef CONT_SEP
void set_contsep(bool cs) { _contsep = cs; }
#endif
TMastrini_grid(TMask* m);
virtual ~TMastrini_grid() { }
};
TMastrini_grid::TMastrini_grid(TMask* m)
: TGrid_field(m), _causali(LF_CAUSALI, CAU_DESCR), _primanoting(false), _contsep(false)
: TGrid_field(m), _causali(LF_CAUSALI, CAU_DESCR), _primanoting(false)
#ifdef CONT_SEP
, _contsep(false)
#endif
{
load_colors();
}
@ -1786,12 +1794,14 @@ void TMastrini_grid::cell_request(long rec, short id, TGrid_cell& cell)
descr = conto.descrizione();
}
}
#ifdef CONT_SEP
if (_contsep)
{
const TString16 cs = mov.get(MOV_CONTSEP);
if (cs.full())
descr << "\n" << cache().get("&NPENT", cs, "S0");
}
#endif
cell.set(descr);
}
break;
@ -2606,8 +2616,10 @@ void TQuery_mask::do_query()
conto.set(*_gm, F_GRUPPO, F_CONTO, F_SOTTOCONTO, 0, F_DESSOTTOC);
TMastrini_grid& gf = _gm->grid();
#ifdef CONT_SEP
gf.set_contsep(get_bool(F_ST_CONTSEP));
gf.read(conto, annoes, da_data, a_data, da_caus, a_caus, provv);
#endif
gf.read(conto, annoes, da_data, a_data, da_caus, a_caus, provv);
gf.select(get_bool(F_END) ? gf.items() -1 : 0);
_gm->run();

View File

@ -1,15 +1,19 @@
#include <xvt.h>
#include "cg7.h"
int main(int argc,char** argv)
{
const int r = (argc > 1) ? atoi(&argv[1][1]) : -1;
switch (r)
{
default:
case 0: cg7100(argc, argv); break; // gestore stampe generico modulo FE (stampe particolari CG)
case 1: cg7200(argc, argv); break; // lista fatture per imponibile
default: cg7300(argc, argv); break; // gestore tabelle di modulo CG
case 2: cg7300(argc, argv); break; // gestore tabelle di modulo CG
case 3: cg7400(argc,argv); break; // Quadro VC
case 4: cg7500(argc,argv); break; // Quadro VE
}
return 0;
}

View File

@ -1,3 +1,5 @@
int cg7100(int argc, char* argv[]);
int cg7200(int argc, char* argv[]);
int cg7300(int argc, char* argv[]);
int cg7400(int argc, char* argv[]);
int cg7500(int argc, char* argv[]);

52
src/cg/cg7400.cpp Normal file
View File

@ -0,0 +1,52 @@
// Programma per la stampa del quadro VC
#include <tabutil.h>
#include "cg7401.h"
#include "cg7400a.h"
class TQuadro_VC_recordset : public TQuadro_IVA_recordset
{
protected:
virtual void load(const long year);
public:
TQuadro_VC_recordset(const char* use, const int year) : TQuadro_IVA_recordset(use, year) {}
virtual ~TQuadro_VC_recordset() {}
};
void TQuadro_VC_recordset::load(const long year)
{
TArray _aliquote;
TArray _codiva;
TTable pem("PEM");
TString16 key;
key.format("%04d00", year);
pem.put("CODTAB", key);
int err = pem.read();
if (err == NOERR)
{
}
else
warning_box(FR("Risultati liquidazione non presenti o da ricalcolare per l'anno %d."), year);
}
class TQuadro_VC_app : public TQuadro_IVA_app
{
public:
virtual TQuadro_IVA_recordset * app_recordset(const char* use, const int year) { return new TQuadro_VC_recordset(use, year); }
TQuadro_VC_app() : TQuadro_IVA_app("Stampa Quadro VC", "cg7400a") {}
virtual ~TQuadro_VC_app() {}
};
int cg7400(int argc, char* argv[])
{
TQuadro_VC_app a;
a.run(argc, argv, TR("Quadro VC"));
return 0;
}

5
src/cg/cg7400a.h Normal file
View File

@ -0,0 +1,5 @@
#define F_YEAR 101
#define F_CODDITTA 102
#define F_RAGSOC 103
#define F_REPORT 104
#define F_DESREPORT 105

BIN
src/cg/cg7400a.pdf Normal file

Binary file not shown.

BIN
src/cg/cg7400a.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 67 KiB

216
src/cg/cg7400a.rep Normal file
View File

@ -0,0 +1,216 @@
<?xml version="1.0" encoding="UTF-8" ?>
<report name="cg7400a" lpi="6">
<description>Stampa quadro VC</description>
<font face="Courier New" size="12" />
<section type="Head" pattern="1" />
<section type="Head" level="1" pattern="1" />
<section type="Body" pattern="1">
<section type="Body" level="1" pattern="1">
<field type="Immagine" width="83" height="72" pattern="1">
<source>"c:\u\r_12_00\src\cg\cg7400a.png"</source>
</field>
</section>
<field y="1" type="Numero" align="right" width="6" pattern="8">
<source>CODDITTA</source>
</field>
<field x="51" y="12.25" type="Numero" align="right" width="11" id="101" pattern="1" text="###.###.###">
<source>VE01.1</source>
<postscript description="B1.101 POSTSCRIPT">MESSAGE ADD,B1.2301</postscript>
</field>
<field x="65.5" y="12.25" type="Numero" align="right" width="11" id="102" pattern="1" text="###.###.###">
<source>VE01.2</source>
<postscript description="B1.102 POSTSCRIPT">MESSAGE ADD,B1.2302</postscript>
</field>
<field x="51" y="13.4" type="Numero" align="right" width="11" id="201" pattern="1" text="###.###.###">
<source>VE02.1</source>
<postscript description="B1.201 POSTSCRIPT">MESSAGE ADD,B1.2301</postscript>
</field>
<field x="65.5" y="13.4" type="Numero" align="right" width="11" id="202" pattern="1" text="###.###.###">
<source>VE01.2</source>
<postscript description="B1.202 POSTSCRIPT">MESSAGE ADD,B1.2302</postscript>
</field>
<field x="51" y="14.4" type="Numero" align="right" width="11" id="301" pattern="1" text="###.###.###">
<source>VE03.1</source>
<postscript description="B1.301 POSTSCRIPT">MESSAGE ADD,B1.2301</postscript>
</field>
<field x="65.5" y="14.4" type="Numero" align="right" width="11" id="302" pattern="1" text="###.###.###">
<source>VE03.2</source>
<postscript description="B1.302 POSTSCRIPT">MESSAGE ADD,B1.2302</postscript>
</field>
<field x="51" y="15.4" type="Numero" align="right" width="11" id="401" pattern="1" text="###.###.###">
<source>VE04.1</source>
<postscript description="B1.401 POSTSCRIPT">MESSAGE ADD,B1.2301</postscript>
</field>
<field x="65.5" y="15.4" type="Numero" align="right" width="11" id="402" pattern="1" text="###.###.###">
<source>VE04.2</source>
<postscript description="B1.402 POSTSCRIPT">MESSAGE ADD,B1.2302</postscript>
</field>
<field x="51" y="16.5" type="Numero" align="right" width="11" id="501" pattern="1" text="###.###.###">
<source>VE05.1</source>
<postscript description="B1.501 POSTSCRIPT">MESSAGE ADD,B1.2301</postscript>
</field>
<field x="65.5" y="16.5" type="Numero" align="right" width="11" id="502" pattern="1" text="###.###.###">
<source>VE05.2</source>
<postscript description="B1.502 POSTSCRIPT">MESSAGE ADD,B1.2302</postscript>
</field>
<field x="51" y="17.5" type="Numero" align="right" width="11" id="601" pattern="1" text="###.###.###">
<source>VE06.1</source>
<postscript description="B1.601 POSTSCRIPT">MESSAGE ADD,B1.2301</postscript>
</field>
<field x="65.5" y="17.5" type="Numero" align="right" width="11" id="602" pattern="1" text="###.###.###">
<source>VE06.2</source>
<postscript description="B1.602 POSTSCRIPT">MESSAGE ADD,B1.2302</postscript>
</field>
<field x="51" y="18.5" type="Numero" align="right" width="11" id="701" pattern="1" text="###.###.###">
<source>VE07.1</source>
<postscript description="B1.701 POSTSCRIPT">MESSAGE ADD,B1.2301</postscript>
</field>
<field x="65.5" y="18.5" type="Numero" align="right" width="11" id="702" pattern="1" text="###.###.###">
<source>VE07,2</source>
<postscript description="B1.702 POSTSCRIPT">MESSAGE ADD,B1.2302</postscript>
</field>
<field x="51" y="19.5" type="Numero" align="right" width="11" id="801" pattern="1" text="###.###.###">
<source>VE08.1</source>
<postscript description="B1.801 POSTSCRIPT">MESSAGE ADD,B1.2301</postscript>
</field>
<field x="65.5" y="19.5" type="Numero" align="right" width="11" id="802" pattern="1" text="###.###.###">
<source>VE08.2</source>
<postscript description="B1.802 POSTSCRIPT">MESSAGE ADD,B1.2302</postscript>
</field>
<field x="51" y="20.5" type="Numero" align="right" width="11" id="901" pattern="1" text="###.###.###">
<source>VE09.1</source>
<postscript description="B1.901 POSTSCRIPT">MESSAGE ADD,B1.2301</postscript>
</field>
<field x="65.5" y="20.5" type="Numero" align="right" width="11" id="902" pattern="1" text="###.###.###">
<source>VE09.1</source>
<postscript description="B1.902 POSTSCRIPT">MESSAGE ADD,B1.2302</postscript>
</field>
<field x="51" y="22.5" type="Numero" align="right" width="11" id="2001" pattern="1" text="###.###.###">
<source>VE20.1</source>
<postscript description="B1.2001 POSTSCRIPT">MESSAGE ADD,B1.2301</postscript>
</field>
<field x="65.5" y="22.5" type="Numero" align="right" width="11" id="2002" pattern="1" text="###.###.###">
<source>VE20.2</source>
<postscript description="B1.2002 POSTSCRIPT">MESSAGE ADD,B1.2302</postscript>
</field>
<field x="51" y="23.65" type="Numero" align="right" width="11" id="2101" pattern="1" text="###.###.###">
<source>VE21.1</source>
<postscript description="B1.2101 POSTSCRIPT">MESSAGE ADD,B1.2301</postscript>
</field>
<field x="65.5" y="23.65" type="Numero" align="right" width="11" id="2102" pattern="1" text="###.###.###">
<source>VE21.1</source>
<postscript description="B1.2102 POSTSCRIPT">MESSAGE ADD,B1.2302</postscript>
</field>
<field x="51" y="24.6" type="Numero" align="right" width="11" id="2201" pattern="1" text="###.###.###">
<source>VE22.1</source>
<postscript description="B1.2201 POSTSCRIPT">MESSAGE ADD,B1.2301</postscript>
</field>
<field x="65.5" y="24.6" type="Numero" align="right" width="11" id="2202" pattern="1" text="###.###.###">
<source>VE22.2</source>
<postscript description="B1.2202 POSTSCRIPT">MESSAGE ADD,B1.2302</postscript>
</field>
<field x="51" y="25.75" type="Numero" align="right" width="11" id="2301" pattern="1" text="###.###.###" />
<field x="65.5" y="25.75" type="Numero" align="right" width="11" id="2302" pattern="1" text="###.###.###">
<postscript description="B1.2302 POSTSCRIPT">MESSAGE ADD,B1.2502</postscript>
</field>
<field x="65.5" y="26.75" type="Numero" align="right" width="11" id="2402" pattern="1" text="###.###.###">
<source>VE24.2</source>
<postscript description="B1.2402 POSTSCRIPT">MESSAGE ADD,B1.2502</postscript>
</field>
<field x="65.5" y="27.75" type="Numero" align="right" width="11" id="2502" pattern="1" text="###.###.###" />
<field x="19" y="30.75" type="Numero" align="right" width="11" id="3002" pattern="1" text="###.###.###">
<source>VE30.2</source>
<postscript description="B1.3002 POSTSCRIPT">MESSAGE ADD,B1.3010</postscript>
</field>
<field x="37" y="30.75" type="Numero" align="right" width="11" id="3003" pattern="1" text="###.###.###">
<source>VE30.3</source>
<postscript description="B1.3003 POSTSCRIPT">MESSAGE ADD,B1.3010</postscript>
</field>
<field x="19" y="32.75" type="Numero" align="right" width="11" id="3004" pattern="1" text="###.###.###">
<source>V30.4</source>
<postscript description="B1.3004 POSTSCRIPT">MESSAGE ADD,B1.3010</postscript>
</field>
<field x="37" y="32.75" type="Numero" align="right" width="11" id="3005" pattern="1" text="###.###.###">
<source>VE30.5</source>
<postscript description="B1.3005 POSTSCRIPT">MESSAGE ADD,B1.3010</postscript>
</field>
<field x="51" y="28.75" type="Numero" align="right" width="11" id="3010" pattern="1" text="###.###.###">
<postscript description="B1.3010 POSTSCRIPT">MESSAGE ADD,B1.2301</postscript>
</field>
<field x="51" y="33.9" type="Numero" align="right" width="11" id="3101" pattern="1" text="###.###.###">
<source>VE31.1</source>
</field>
<field x="51" y="34.95" type="Numero" align="right" width="11" id="3201" pattern="1" text="###.###.###">
<source>VE32.1</source>
</field>
<field x="51" y="35.95" type="Numero" align="right" width="11" id="3301" pattern="1" text="###.###.###">
<source>VE33.1</source>
</field>
<field x="51" y="36.95" type="Numero" align="right" width="11" id="3401" pattern="1" text="###.###.###">
<source>VE34.1</source>
<postscript description="B1.3401 POSTSCRIPT">MESSAGE ADD,B1.2301</postscript>
</field>
<field x="19" y="40" type="Numero" align="right" width="11" id="3502" pattern="1" text="###.###.###">
<source>VE35.2</source>
<postscript description="B1.3502 POSTSCRIPT">MESSAGE ADD,B1.3510</postscript>
</field>
<field x="37" y="40" type="Numero" align="right" width="11" id="3503" pattern="1" text="###.###.###">
<source>VE35.3</source>
<postscript description="B1.3503 POSTSCRIPT">MESSAGE ADD,B1.3510</postscript>
</field>
<field x="19" y="42.1" type="Numero" align="right" width="11" id="3504" pattern="1" text="###.###.###">
<source>V35.4</source>
<postscript description="B1.3504 POSTSCRIPT">MESSAGE ADD,B1.3510</postscript>
</field>
<field x="37" y="42.1" type="Numero" align="right" width="11" id="3505" pattern="1" text="###.###.###">
<source>VE35.5</source>
<postscript description="B1.3505 POSTSCRIPT">MESSAGE ADD,B1.3510</postscript>
</field>
<field x="19" y="44.15" type="Numero" align="right" width="11" id="3506" pattern="1" text="###.###.###">
<source>V35.6</source>
<postscript description="B1.3506 POSTSCRIPT">MESSAGE ADD,B1.3510</postscript>
</field>
<field x="37" y="44.15" type="Numero" align="right" width="11" id="3507" pattern="1" text="###.###.###">
<source>VE35.7</source>
<postscript description="B1.3507 POSTSCRIPT">MESSAGE ADD,B1.3510</postscript>
</field>
<field x="19" y="46.15" type="Numero" align="right" width="11" id="3508" pattern="1" text="###.###.###">
<source>V35.8</source>
<postscript description="B1.3508 POSTSCRIPT">MESSAGE ADD,B1.3510</postscript>
</field>
<field x="37" y="46.15" type="Numero" align="right" width="11" id="3509" pattern="1" text="###.###.###">
<source>VE35.9</source>
<postscript description="B1.3509 POSTSCRIPT">MESSAGE ADD,B1.3510</postscript>
</field>
<field x="51" y="38" type="Numero" align="right" width="11" id="3510" pattern="1" text="###.###.###">
<postscript description="B1.3510 POSTSCRIPT">MESSAGE ADD,B1.2301</postscript>
</field>
<field x="51" y="47.25" type="Numero" align="right" width="11" id="3601" pattern="1" text="###.###.###">
<source>VE36.1</source>
</field>
<field x="51" y="48.25" type="Numero" align="right" width="11" id="3701" pattern="1" text="###.###.###">
<source>VE37.1</source>
</field>
<field x="37" y="50.25" type="Numero" align="right" width="11" id="3702" pattern="1" text="###.###.###">
<source>VE37.1</source>
</field>
<field x="51" y="51.25" type="Numero" align="right" width="11" id="3801" pattern="1" text="###.###.###">
<source>VE38.1</source>
<postscript description="B1.3801 POSTSCRIPT">MESSAGE ADD,B1.5001</postscript>
</field>
<field x="51" y="52.35" type="Numero" align="right" width="11" id="3901" pattern="1" text="###.###.###">
<source>VE39.1</source>
<postscript description="B1.3901 POSTSCRIPT">MESSAGE SUB,B1.5001</postscript>
</field>
<field x="51" y="53.35" type="Numero" align="right" width="11" id="4001" pattern="1" text="###.###.###">
<source>VE40.1</source>
<postscript description="B1.4001 POSTSCRIPT">MESSAGE SUB,B1.5001</postscript>
</field>
<field x="51" y="54.5" type="Numero" align="right" width="11" id="5001" pattern="1" text="###.###.###">
<postscript description="B1.5001 POSTSCRIPT">MESSAGE ADD,B1.2301</postscript>
</field>
</section>
<section type="Foot" pattern="1" />
<section type="Foot" level="1" pattern="1" />
<sql>USE NDITTE SELECT CODDITTA==#CODDITTA</sql>
</report>

50
src/cg/cg7400a.uml Normal file
View File

@ -0,0 +1,50 @@
#include "cg7400a.h"
TOOLBAR "Toolbar" 0 0 0 2
#include <printbar.h>
ENDPAGE
PAGE "Quadro VC" 0 0 0 0
#include <printbar.h>
ENDPAGE
PAGE "Quadro VC" 0 0 0 0
NUMBER F_YEAR 4
BEGIN
PROMPT 3 3 "Anno "
FLAGS "A"
END
NUMBER F_CODDITTA 5
BEGIN
PROMPT 3 6 "Ditta "
FLAGS "B"
FIELD #CODDITTA
END
STRING F_RAGSOC 50
BEGIN
PROMPT 20 6 ""
FLAGS "B"
END
STRING F_REPORT 1
BEGIN
PROMPT 3 9 "Report "
FLAGS "B"
END
STRING F_DESREPORT 70
BEGIN
PROMPT 8 11 ""
FLAGS "D"
END
ENDPAGE
ENDMASK

BIN
src/cg/cg7400a.zop Normal file

Binary file not shown.

358
src/cg/cg7401.cpp Normal file
View File

@ -0,0 +1,358 @@
// Programma per la stampa del quadri IVA
#include <recarray.h>
#include <reprint.h>
#include <tabutil.h>
#include "cg7401.h"
#include <nditte.h>
#include "cg7400a.h"
TQuadro_IVA_selfirm_mask::TQuadro_IVA_selfirm_mask(const char * maskname)
: TAutomask(maskname),
_ditte(-1, -1, -4, -4, TR("Selezione Ditte"), HR("@1|Codice|Ragione Sociale@50")),
_reports(-1, -1, -4, -4, TR("Selezione Reports"), HR("@1|Codice|Report@7|Nome@70")),
_last_row_ditte(0), _last_row_reports(0)
{
const TDate oggi(TODAY);
_year = oggi.year();
build_ditte_sheet();
build_report_sheet();
}
long TQuadro_IVA_selfirm_mask::get_ditta()
{
for (int i =_last_row_ditte + 1; i <_ditte.items(); i++)
{
if (_ditte.checked(i))
{
_last_row_ditte = i;
return _ditte.row(i).get_long(1);
}
}
_last_row_ditte = -1;
return 0L;
}
const char * TQuadro_IVA_selfirm_mask::get_report()
{
for (int i =_last_row_reports + 1; i <_reports.items(); i++)
{
if (_reports.checked(i))
{
_last_row_reports = i;
return _reports.row(i).get(2);
}
}
_last_row_reports = -1;
return "";
}
void TQuadro_IVA_selfirm_mask::build_ditte_sheet()
{
_ditte.destroy();
TPointer_array firms;
TPrefix::firms(firms);
reset(F_CODDITTA);
reset(F_RAGSOC);
FOR_EACH_ARRAY_ITEM(firms, i, obj)
{
TToken_string* d = new TToken_string(63);
const long codditta = firms.get_long(i);
TString key; key.format("%05ld%04d", codditta, _year);
const bool good = cache().get("%LIA", key).full();
d->add(good && empty(F_CODDITTA)? "X" : "");
d->add(codditta);
d->add(cache().get(LF_NDITTE, codditta, NDT_RAGSOC));
const long pos = _ditte.add(d);
if (good)
{
if (empty(F_CODDITTA))
{
set(F_CODDITTA, d->get(1));
set(F_RAGSOC, d->get(2));
}
}
else
_ditte.disable_row(pos);
}
}
void TQuadro_IVA_selfirm_mask::build_report_sheet()
{
TToken_string d(80);
const char quadro = source_file()[3];
_reports.destroy();
switch (quadro)
{
case '4':
_reports.add("|1|cg7400b|Prova");
break;
case '5' :
_reports.add("|1|cg7500b|Stampa esportazioni");
_reports.add("|2|cg7500c|Stampa cessioni Intracomunitarie");
_reports.add("|3|cg7500d|Stampa cessioni verso San Marino");
_reports.add("|4|cg7500e|Stampa operazioni assimilate");
_reports.add("|5|cg7500f|Stampa operazioni non imponibili in seguito a dichirazione d'intenti");
_reports.add("|6|cg7500g|Stampa altre operazioni non imponibili");
_reports.add("|7|cg7500h|Stampa esenti art. 10");
_reports.add("|8|cg7500i|Stampa operazioni non soggette ai sensi art. 7 da uno a septies");
break;
default :
break;
}
}
bool TQuadro_IVA_selfirm_mask::select_button()
{
if (_ditte.run() == K_ENTER)
{
TToken_string& row = _ditte.row(_ditte.selected());
set(F_CODDITTA, row.get(1));
set(F_RAGSOC, row.get(2));
return true;
}
return false;
}
bool TQuadro_IVA_selfirm_mask::select_report()
{
if (_reports.run() == K_ENTER)
{
TToken_string& row = _reports.row(_ditte.selected());
set(F_REPORT, row.get(1));
set(F_DESREPORT, row.get(3));
return true;
}
return false;
}
bool TQuadro_IVA_selfirm_mask::on_field_event(TOperable_field& o, TField_event e, long jolly)
{
switch (o.dlg())
{
case F_CODDITTA:
if (e == fe_button)
return select_button();
if (e == fe_modify)
{
bool found = false;
TString16 ditta = o.get();
for (int i = 0; i < _ditte.items(); i++)
{
TToken_string& row = _ditte.row(i);
if (ditta == row.get(1))
{
row.add("X",0);
_ditte.check(i);
if (_ditte.row_enabled(i))
{
set(F_CODDITTA, row.get(1));
set(F_RAGSOC, row.get(2));
found = true;
}
else
{
warning_box(FR("Non sono definiti i parametri liquidazione per la ditta %ld"),
atol(ditta));
o.reset();
}
break;
}
}
if (!found)
o.reset();
return found;
}
break;
case F_RAGSOC:
if (e == fe_button)
return select_button();
if (e == fe_modify)
{
bool found = false;
TString8 ditta = o.get();
for (int i = 0; i < _ditte.items(); i++)
{
TToken_string& row = _ditte.row(i);
TString ts(row.get(1));
if (ts.find(ditta) != -1)
{
if (_ditte.row_enabled(i))
{
set(F_CODDITTA, row.get(0));
set(F_RAGSOC, row.get(1));
found = true;
break;
}
}
}
if (!found) o.reset();
return found;
}
break;
case F_YEAR:
if (e == fe_modify)
{
_year = atoi(o.get());
build_ditte_sheet();
set(F_CODDITTA, "");
set(F_RAGSOC, "");
}
break;
case F_REPORT:
if (e == fe_button)
return select_report();
if (e == fe_modify)
{
bool found = false;
const int codice = atoi(o.get()) - 1;
if (codice >= 0 && codice < _reports.items())
{
TToken_string& row = _reports.row(codice);
row.add("X",0);
_reports.check(codice);
set(F_REPORT, row.get(1));
set(F_DESREPORT, row.get(3));
found = true;
}
else
o.reset();
return found;
}
return true;
break;
default:
break;
}
return true;
}
const TVariant& TQuadro_IVA_recordset::get(const char* column_name) const
{
const TFixed_string name(column_name);
if (name.find('.') > 0)
{
TVariant & var = get_tmp_var();
real * value = (real *) _values.objptr(name);
if (value == NULL)
var = ZERO;
else
{
value->round(0);
var = *value;
}
return var;
}
return TISAM_recordset::get(column_name);
}
void TQuadro_IVA_recordset::add_value(const TString *s, real value)
{
if (s != NULL)
{
real * val = (real *)_values.objptr(*s);
if (val == NULL)
_values.add(*s, val = new real);
*val += value;
}
}
void TQuadro_IVA_recordset::add_value(const TString &s, real value)
{
real * val = (real *)_values.objptr(s);
if (val == NULL)
_values.add(s, val = new real);
*val += value;
}
TQuadro_IVA_recordset::TQuadro_IVA_recordset(const char* use, const int year) : TISAM_recordset(use)
{
//load(year);
}
TQuadro_IVA_report::TQuadro_IVA_report(const char * report_name)
{
load(report_name);
}
bool TQuadro_IVA_app::create()
{
open_files(LF_TAB, LF_TABCOM, LF_NDITTE, 0);
return TSkeleton_application::create();
}
void TQuadro_IVA_app::print()
{
TReport_book book(_print_title);
long ditta;
const TString8 year = _mask->get(F_YEAR);
_mask->restart_ditte();
while ((ditta = _mask->get_ditta()) > 0)
{
set_firm(ditta);
_name.ext("rep");
if (_name.exist() || _name.custom_path())
{
TQuadro_IVA_report rep(_name);
TRecordset * set = rep.recordset();
rep.set_recordset(app_recordset(set->query_text(), atoi(year)));
set = rep.recordset();
set->set_var("#ANNO", year);
set->set_var("#CODDITTA", ditta);
book.add(rep);
}
TFilename repname;
_mask->restart_reports();
while ((repname = _mask->get_report()).full())
{
repname.ext("rep");
if (repname.exist() || repname.custom_path())
{
TProgram_report rep;
rep.load(repname);
TRecordset * set = rep.recordset();
set->set_var("#ANNO", year);
book.add(rep);
}
}
}
book.print_or_preview();
}
void TQuadro_IVA_app::main_loop()
{
const long oldditta = get_firm();
KEY k;
_mask = new TQuadro_IVA_selfirm_mask(_name);
while ((k = _mask->run()) != K_QUIT)
print();
set_firm(oldditta);
}

76
src/cg/cg7401.h Normal file
View File

@ -0,0 +1,76 @@
// Programma per la stampa del quadri IVA
#include <applicat.h>
#include <automask.h>
#include <reputils.h>
#include <sheet.h>
class TQuadro_IVA_selfirm_mask : public TAutomask
{
TArray_sheet _ditte;
TArray_sheet _reports;
int _year;
long _last_row_ditte;
long _last_row_reports;
protected:
bool select_button();
bool select_report();
void build_ditte_sheet();
void build_report_sheet();
public:
const int get_year() const { return _year; }
void restart_ditte() { _last_row_ditte = -1;}
void restart_reports() { _last_row_reports = -1;}
long get_ditta();
const char * get_report();
virtual bool on_field_event(TOperable_field& o, TField_event e, long jolly);
TQuadro_IVA_selfirm_mask(const char * mask_name);
~TQuadro_IVA_selfirm_mask() {}
};
class TQuadro_IVA_recordset : public TISAM_recordset
{
TAssoc_array _values;
protected:
void add_value(const TString *s, real value);
void add_value(const TString &s, real value);
virtual void load(const long year) pure;
virtual const TVariant& get(const char* column_name) const;
public:
TQuadro_IVA_recordset(const char* use, const int year);
virtual ~TQuadro_IVA_recordset() {}
};
class TQuadro_IVA_report : public TProgram_report
{
protected:
public:
TQuadro_IVA_report(const char * report_name);
};
class TQuadro_IVA_app : public TSkeleton_application
{
TQuadro_IVA_selfirm_mask * _mask;
TFilename _name;
const TString20 _print_title;
protected:
virtual bool create();
virtual void print();
virtual void main_loop();
public:
virtual TQuadro_IVA_recordset * app_recordset(const char* use, const int year) pure;
virtual bool firm_change_enabled() const { return false; }
TQuadro_IVA_app(const char * print_title, const char * name)
: _print_title(print_title), _name(name) {}
virtual ~TQuadro_IVA_app() {}
};

231
src/cg/cg7500.cpp Normal file
View File

@ -0,0 +1,231 @@
// Programma per la stampa del quadro VE
#include <recarray.h>
#include <tabutil.h>
#include <utility.h>
#include "cg7401.h"
#include "cgpim.h"
#include "cg7500a.h"
enum tipo_sospensione { nessuna, normale, vol_affari, liquidazione };
class TQuadro_VE_recordset : public TQuadro_IVA_recordset
{
protected:
virtual void load(const long year);
public:
TQuadro_VE_recordset(const char* use, const int year) : TQuadro_IVA_recordset(use, year) {load(year);}
virtual ~TQuadro_VE_recordset() {}
};
void TQuadro_VE_recordset::load(const long year)
{
TAssoc_array imponibile_agricolo;
TAssoc_array imposta_agricola;
TAssoc_array imponibile;
TAssoc_array imposta;
imponibile_agricolo.add("2.00", TString8("VE01.1"));
imposta_agricola.add("2.00", TString8("VE01.2"));
imponibile_agricolo.add("4,00", TString8("VE02.2"));
imposta_agricola.add("4,00", TString8("VE02.2"));
imponibile_agricolo.add("7.00", TString8("VE03.1"));
imposta_agricola.add("7.00", TString8("VE03.2"));
imponibile_agricolo.add("7.30", TString8("VE04.1"));
imposta_agricola.add("7.30", TString8("VE04.2"));
imponibile_agricolo.add("7.50", TString8("VE05.1"));
imposta_agricola.add("7.50", TString8("VE05.2"));
imponibile_agricolo.add("8.30", TString8("VE06.1"));
imposta_agricola.add("8.30", TString8("VE06.2"));
imponibile_agricolo.add("8,50", TString8("VE07.1"));
imposta_agricola.add("8,50", TString8("VE07.2"));
imponibile_agricolo.add("8.80", TString8("VE08.1"));
imposta_agricola.add("8.80", TString8("VE08.2"));
imponibile_agricolo.add("12.30", TString8("VE09.1"));
imposta_agricola.add("12.30", TString8("VE09.2"));
imponibile.add("4.00", TString8("VE20.1"));
imposta.add("4.00", TString8("VE20.2"));
imponibile.add("10.00",TString8("VE21.1"));
imposta.add("10.00",TString8("VE21.2"));
imponibile.add("22.00", TString8("VE22.1"));
imposta.add("22.00", TString8("VE22.2"));
TString80 query("USE PIM\nFROM CODTAB=");
query << year << "\nTO CODTAB=" << year;
TISAM_recordset pim(query);
bool good = pim.items() > 0;
for (pim.move_first(); !pim.eof(); pim.move_next())
{
const TString80 codtab = pim.get("CODTAB").as_string();
const TString8 codreg(format("%d%-3s",year, (const char*)codtab.mid(10,3)));
const TRectype & reg = cache().get("REG", codreg);
const tiporec tipo = (tiporec) reg.get_int("I9");
const bool vendite = reg.get("I0") == 1;
if (tipo != liquidazione)
{
const TString8 codiva(codtab.mid(16,4));
const TRectype & ivar = cache().get("%IVA", codiva);
const TString8 aliquota = ivar.get("R0");
if (aliquota.full())
{
tiporec tipo;
real imp;
real iva;
if (classify_pim(pim, imp, iva, tipo, true))
{
switch (tipo)
{
case acq_norm: // acquisti normali
break;
case vend_norm: // vendite normali
case corr_norm:
{
const bool agricolo = ivar.get_int("I4") != 0;
if (agricolo)
{
const TString * field = (TString *) imponibile_agricolo.objptr(aliquota);
add_value(field, imp);
field = (TString *) imposta_agricola.objptr(aliquota);
add_value(field, iva);
}
else
{
const TString * field = (TString *) imponibile.objptr(aliquota);
add_value(field, imp);
field = (TString *) imposta.objptr(aliquota);
add_value(field, iva);
}
const int tipo_plafond = ivar.get_int("S3");
const bool plafond = tipo_plafond > 0;
if (plafond)
{
switch (tipo_plafond)
{
case 1:
case 2:
add_value(TString8("V30.2"), imp);
break;
case 3:
add_value(TString8("V30.5"), imp);
break;
default:
// San Marino ??? VE30.4
break;
}
}
}
break;
case acq_simp:
break;
case vend_simp: // acq. e vend. sosp. imposta
break;
case bolle_doganali: // bolle doganali (acquisti)
break;
case acq_beni_riv : // acq. beni per rivendita
break;
case base_ventilazione: // base calcolo per ventil.
break;
case corr_simp: // corrispettivi n. e s. imp.
break;
case acq_beni_ammort: // acq. beni ammortizz. detr.
break;
case acq_beni_ammort_nd: // beni ammort. non detraibili
break;
case acq_beni_leasing: // beni strum. acq in leasing
break;
case acq_amm_ultdetr: // beni amm. ult. detr 6%
break;
case acq_ind_op_es: // acq. indetr. su op.es.
break;
case acq_ind_pass_int: // passaggi interni
if (vendite)
add_value(TString8("VE40.1"), iva);
break;
case acq_ind_art_19: // indetr. art. 19
break;
case cess_amm: // cessioni amministrative
add_value(TString8("VE40.1"), iva);
break;
case vend_rimborso: // vendite valide per rimborso
break;
case acq_rimborso: // acq. validi per rimborso
break;
case acq_bd_ind_art_19: // acq. con tipo documento BD e tipo detr 9
break;
default:
break;
};
const bool non_imponibile = ivar.get("S1") == "NI";
const TString tipo_iva11_ven = ivar.get("S2");
if (non_imponibile)
{
if (false)
{
/// add_value("VE31.1", imp); non imponibile dich intenti ???
}
else
add_value(TString8("VE32.1"), imp);
}
if (tipo_iva11_ven.starts_with("B"))
add_value(TString8("VE33.1"), imp);
// VE34.1 non imp art 7 7 sexties lo abbiamo ??
// VE35.2 9 reverse charge causale -> movimenti ??
// VE36.1 terremotati lo abbiamo ??
// VE37.1 2 iva sospensione
// VE38.1 art 17 ter pubblica amministrazione movimenti ??
// VE39 iva sospensione incassata
}
}
}
}
query = "USE LIM\n FROM CODTAB==";
query << year << "\nTO CODTAB==" << year;
TISAM_recordset lim(query);
good |= lim.items() > 0;
for (lim.move_first(); !lim.eof(); lim.move_next())
{
add_value(TString8("VE24.2"), lim.get("R17").as_real());
}
if (!good)
warning_box(FR("Risultati liquidazione non presenti o da ricalcolare per l'anno %d."), year);
}
class TQuadro_VE_app : public TQuadro_IVA_app
{
public:
virtual TQuadro_IVA_recordset * app_recordset(const char* use, const int year) { return new TQuadro_VE_recordset(use, year); }
TQuadro_VE_app() : TQuadro_IVA_app("Stampa Quadro VE", "cg7500a") {}
virtual ~TQuadro_VE_app() {}
};
int cg7500(int argc, char* argv[])
{
TQuadro_VE_app a;
a.run(argc, argv, TR("Quadro VE"));
return 0;
}

6
src/cg/cg7500a.h Normal file
View File

@ -0,0 +1,6 @@
#define F_YEAR 101
#define F_CODDITTA 102
#define F_RAGSOC 103
#define F_REPORT 104
#define F_DESREPORT 105

BIN
src/cg/cg7500a.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 192 KiB

BIN
src/cg/cg7500a.pdf Normal file

Binary file not shown.

BIN
src/cg/cg7500a.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 69 KiB

233
src/cg/cg7500a.rep Normal file
View File

@ -0,0 +1,233 @@
<?xml version="1.0" encoding="UTF-8" ?>
<report name="cg7500a" lpi="6">
<description>Stampa quadro VE</description>
<font face="Courier New" size="12" />
<section type="Head" pattern="1" />
<section type="Head" level="1" pattern="1" />
<section type="Body" pattern="1">
<field type="Immagine" width="83" height="72" pattern="1">
<source>"c:\u\r_12_00\src\cg\cg7500a.tif"</source>
</field>
</section>
<section type="Body" level="1" pattern="1">
<font face="Courier New" size="10" />
<field x="4" y="1" type="Testo" width="5" pattern="1" text="Ditta" />
<field x="10" y="1" type="Numero" align="right" width="6" pattern="1" text=" ">
<source>CODDITTA</source>
<postscript description="B1.0 POSTSCRIPT">MON
#THIS @
2
*
#THIS !</postscript>
</field>
<field x="51" y="12.25" type="Numero" align="right" width="11" id="101" pattern="1" text="###.###.###">
<source>VE01.1</source>
<postscript description="B1.101 POSTSCRIPT">MESSAGE ADD,B1.2301</postscript>
</field>
<field x="65.5" y="12.25" type="Numero" align="right" width="11" id="102" pattern="1" text="###.###.###">
<source>VE01.2</source>
<postscript description="B1.102 POSTSCRIPT">MESSAGE ADD,B1.2302</postscript>
</field>
<field x="51" y="13.4" type="Numero" align="right" width="11" id="201" pattern="1" text="###.###.###">
<source>VE02.1</source>
<postscript description="B1.201 POSTSCRIPT">MESSAGE ADD,B1.2301</postscript>
</field>
<field x="65.5" y="13.4" type="Numero" align="right" width="11" id="202" pattern="1" text="###.###.###">
<source>VE01.2</source>
<postscript description="B1.202 POSTSCRIPT">MESSAGE ADD,B1.2302</postscript>
</field>
<field x="51" y="14.4" type="Numero" align="right" width="11" id="301" pattern="1" text="###.###.###">
<source>VE01.3</source>
<postscript description="B1.301 POSTSCRIPT">MESSAGE ADD,B1.2301</postscript>
</field>
<field x="65.5" y="14.4" type="Numero" align="right" width="11" id="302" pattern="1" text="###.###.###">
<source>VE03.2</source>
<postscript description="B1.302 POSTSCRIPT">MESSAGE ADD,B1.2302</postscript>
</field>
<field x="51" y="15.4" type="Numero" align="right" width="11" id="401" pattern="1" text="###.###.###">
<source>VE04.1</source>
<postscript description="B1.401 POSTSCRIPT">MESSAGE ADD,B1.2301</postscript>
</field>
<field x="65.5" y="15.4" type="Numero" align="right" width="11" id="402" pattern="1" text="###.###.###">
<source>VE04.2</source>
<postscript description="B1.402 POSTSCRIPT">MESSAGE ADD,B1.2302</postscript>
</field>
<field x="51" y="16.5" type="Numero" align="right" width="11" id="501" pattern="1" text="###.###.###">
<source>VE05.1</source>
<postscript description="B1.501 POSTSCRIPT">MESSAGE ADD,B1.2301</postscript>
</field>
<field x="65.5" y="16.5" type="Numero" align="right" width="11" id="502" pattern="1" text="###.###.###">
<source>VE05.2</source>
<postscript>MESSAGE ADD,B1.2302</postscript>
</field>
<field x="51" y="17.5" type="Numero" align="right" width="11" id="601" pattern="1" text="###.###.###">
<source>VE06.1</source>
<postscript>MESSAGE ADD,B1.2301</postscript>
</field>
<field x="65.5" y="17.5" type="Numero" align="right" width="11" id="602" pattern="1" text="###.###.###">
<source>VE06.2</source>
<postscript>MESSAGE ADD,B1.2302</postscript>
</field>
<field x="51" y="18.5" type="Numero" align="right" width="11" id="701" pattern="1" text="###.###.###">
<source>VE07.1</source>
<postscript>MESSAGE ADD,B1.2301</postscript>
</field>
<field x="65.5" y="18.5" type="Numero" align="right" width="11" id="702" pattern="1" text="###.###.###">
<source>VE07.2</source>
<postscript description="B1.702 POSTSCRIPT">MESSAGE ADD,B1.2302</postscript>
</field>
<field x="51" y="19.5" type="Numero" align="right" width="11" id="801" pattern="1" text="###.###.###">
<source>VE08.1</source>
<postscript>MESSAGE ADD,B1.2301</postscript>
</field>
<field x="65.5" y="19.5" type="Numero" align="right" width="11" id="802" pattern="1" text="###.###.###">
<source>VE08.2</source>
<postscript>MESSAGE ADD,B1.2302</postscript>
</field>
<field x="51" y="20.5" type="Numero" align="right" width="11" id="901" pattern="1" text="###.###.###">
<source>VE09.1</source>
<postscript>MESSAGE ADD,B1.2301</postscript>
</field>
<field x="65.5" y="20.5" type="Numero" align="right" width="11" id="902" pattern="1" text="###.###.###">
<source>VE09.2</source>
<postscript>MESSAGE ADD,B1.2302</postscript>
</field>
<field x="51" y="22.5" type="Numero" align="right" width="11" id="2001" pattern="1" text="###.###.###">
<source>VE20.1</source>
<postscript>MESSAGE ADD,B1.2301</postscript>
</field>
<field x="65.5" y="22.5" type="Numero" align="right" width="11" id="2002" pattern="1" text="###.###.###">
<source>VE20.2</source>
<postscript>MESSAGE ADD,B1.2302</postscript>
</field>
<field x="51" y="23.65" type="Numero" align="right" width="11" id="2101" pattern="1" text="###.###.###">
<source>VE21.1</source>
<postscript>MESSAGE ADD,B1.2301</postscript>
</field>
<field x="65.5" y="23.65" type="Numero" align="right" width="11" id="2102" pattern="1" text="###.###.###">
<source>VE21.1</source>
<postscript>MESSAGE ADD,B1.2302</postscript>
</field>
<field x="51" y="24.6" type="Numero" align="right" width="11" id="2201" pattern="1" text="###.###.###">
<source>VE22.1</source>
<postscript description="B1.2201 POSTSCRIPT">MON
#B1.2301 @
#THIS @
+
#B1.2301 !</postscript>
</field>
<field x="65.5" y="24.6" type="Numero" align="right" width="11" id="2202" pattern="1" text="###.###.###">
<source>VE22.2</source>
<postscript>MESSAGE ADD,B1.2302</postscript>
</field>
<field x="51" y="25.75" type="Numero" align="right" width="11" id="2301" pattern="1" text="###.###.###">
<postscript description="B1.2301 POSTSCRIPT">MON
#THIS @
2
*
#THIS !</postscript>
</field>
<field x="65.5" y="25.75" type="Numero" align="right" width="11" id="2302" pattern="1" text="###.###.###">
<postscript>MESSAGE ADD,B1.2502</postscript>
</field>
<field x="65.5" y="26.75" type="Numero" align="right" width="11" id="2402" pattern="1" text="###.###.###">
<source>VE24.2</source>
<postscript>MESSAGE ADD,B1.2502</postscript>
</field>
<field x="65.5" y="27.75" type="Numero" align="right" width="11" id="2502" pattern="1" text="###.###.###" />
<field x="19" y="30.75" type="Numero" align="right" width="11" id="3002" pattern="1" text="###.###.###">
<source>VE30.2</source>
<postscript>MESSAGE ADD,B1.3010</postscript>
</field>
<field x="37" y="30.75" type="Numero" align="right" width="11" id="3003" pattern="1" text="###.###.###">
<source>VE30.3</source>
<postscript>MESSAGE ADD,B1.3010</postscript>
</field>
<field x="19" y="32.75" type="Numero" align="right" width="11" id="3004" pattern="1" text="###.###.###">
<source>VE30.4</source>
<postscript>MESSAGE ADD,B1.3010</postscript>
</field>
<field x="37" y="32.75" type="Numero" align="right" width="11" id="3005" pattern="1" text="###.###.###">
<source>VE30.5</source>
<postscript>MESSAGE ADD,B1.3010</postscript>
</field>
<field x="51" y="28.75" type="Numero" align="right" width="11" id="3010" pattern="1" text="###.###.###">
<postscript>MESSAGE ADD,B1.2301</postscript>
</field>
<field x="51" y="33.9" type="Numero" align="right" width="11" id="3101" pattern="1" text="###.###.###">
<source>VE31.1</source>
</field>
<field x="51" y="34.95" type="Numero" align="right" width="11" id="3201" pattern="1" text="###.###.###">
<source>VE32.1</source>
</field>
<field x="51" y="35.95" type="Numero" align="right" width="11" id="3301" pattern="1" text="###.###.###">
<source>VE33.1</source>
</field>
<field x="51" y="36.95" type="Numero" align="right" width="11" id="3401" pattern="1" text="###.###.###">
<source>VE34.1</source>
<postscript>MESSAGE ADD,B1.2301</postscript>
</field>
<field x="19" y="40" type="Numero" align="right" width="11" id="3502" pattern="1" text="###.###.###">
<source>VE35.2</source>
<postscript>MESSAGE ADD,B1.3510</postscript>
</field>
<field x="37" y="40" type="Numero" align="right" width="11" id="3503" pattern="1" text="###.###.###">
<source>VE35.3</source>
<postscript>MESSAGE ADD,B1.3510</postscript>
</field>
<field x="19" y="42.1" type="Numero" align="right" width="11" id="3504" pattern="1" text="###.###.###">
<source>V35.4</source>
<postscript>MESSAGE ADD,B1.3510</postscript>
</field>
<field x="37" y="42.1" type="Numero" align="right" width="11" id="3505" pattern="1" text="###.###.###">
<source>VE35.5</source>
<postscript>MESSAGE ADD,B1.3510</postscript>
</field>
<field x="19" y="44.15" type="Numero" align="right" width="11" id="3506" pattern="1" text="###.###.###">
<source>V35.6</source>
<postscript>MESSAGE ADD,B1.3510</postscript>
</field>
<field x="37" y="44.15" type="Numero" align="right" width="11" id="3507" pattern="1" text="###.###.###">
<source>VE35.7</source>
<postscript>MESSAGE ADD,B1.3510</postscript>
</field>
<field x="19" y="46.15" type="Numero" align="right" width="11" id="3508" pattern="1" text="###.###.###">
<source>V35.8</source>
<postscript>MESSAGE ADD,B1.3510</postscript>
</field>
<field x="37" y="46.15" type="Numero" align="right" width="11" id="3509" pattern="1" text="###.###.###">
<source>VE35.9</source>
<postscript>MESSAGE ADD,B1.3510</postscript>
</field>
<field x="51" y="38" type="Numero" align="right" width="11" id="3510" pattern="1" text="###.###.###">
<postscript>MESSAGE ADD,B1.2301</postscript>
</field>
<field x="51" y="47.25" type="Numero" align="right" width="11" id="3601" pattern="1" text="###.###.###">
<source>VE36.1</source>
</field>
<field x="51" y="48.25" type="Numero" align="right" width="11" id="3701" pattern="1" text="###.###.###">
<source>VE37.1</source>
</field>
<field x="37" y="50.25" type="Numero" align="right" width="11" id="3702" pattern="1" text="###.###.###">
<source>VE37.1</source>
</field>
<field x="51" y="51.25" type="Numero" align="right" width="11" id="3801" pattern="1" text="###.###.###">
<source>VE38.1</source>
<postscript>MESSAGE ADD,B1.5001</postscript>
</field>
<field x="51" y="52.35" type="Numero" align="right" width="11" id="3901" pattern="1" text="###.###.###">
<source>VE39.1</source>
<postscript>MESSAGE SUB,B1.5001</postscript>
</field>
<field x="51" y="53.35" type="Numero" align="right" width="11" id="4001" pattern="1" text="###.###.###">
<source>VE40.1</source>
<postscript>MESSAGE SUB,B1.5001</postscript>
</field>
<field x="51" y="54.5" type="Numero" align="right" width="11" id="5001" pattern="1" text="###.###.###">
<postscript>MESSAGE ADD,B1.2301</postscript>
</field>
</section>
<section type="Foot" pattern="1" />
<section type="Foot" level="1" pattern="1" />
<sql>USE NDITTE SELECT CODDITTA==#CODDITTA</sql>
</report>

218
src/cg/cg7500a.rep.bak Normal file
View File

@ -0,0 +1,218 @@
<?xml version="1.0" encoding="UTF-8" ?>
<report name="cg7500a" lpi="6">
<description>Stampa quadro VE</description>
<font face="Courier New" size="12" />
<section type="Head" pattern="1" />
<section type="Head" level="1" pattern="1" />
<section type="Body" pattern="1">
<field type="Immagine" width="83" height="72" pattern="1">
<source>"c:\u\r_12_00\src\cg\cg7500a.tif"</source>
</field>
</section>
<section type="Body" level="1" pattern="1">
<font face="Courier New" size="10" />
<field x="4" y="1" type="Testo" width="5" pattern="1" text="Ditta" />
<field x="10" y="1" type="Numero" align="right" width="6" pattern="1" text=" ">
<source>CODDITTA</source>
</field>
<field x="51" y="12.25" type="Numero" align="right" width="11" id="101" pattern="1" text="###.###.###">
<source>VE01.1</source>
<postscript description="B1.101 POSTSCRIPT">MESSAGE ADD,B1.2301</postscript>
</field>
<field x="65.5" y="12.25" type="Numero" align="right" width="11" id="102" pattern="1" text="###.###.###">
<source>VE01.2</source>
<postscript description="B1.102 POSTSCRIPT">MESSAGE ADD,B1.2302</postscript>
</field>
<field x="51" y="13.4" type="Numero" align="right" width="11" id="201" pattern="1" text="###.###.###">
<source>VE02.1</source>
<postscript description="B1.201 POSTSCRIPT">MESSAGE ADD,B1.2301</postscript>
</field>
<field x="65.5" y="13.4" type="Numero" align="right" width="11" id="202" pattern="1" text="###.###.###">
<source>VE01.2</source>
<postscript description="B1.202 POSTSCRIPT">MESSAGE ADD,B1.2302</postscript>
</field>
<field x="51" y="14.4" type="Numero" align="right" width="11" id="301" pattern="1" text="###.###.###">
<source>VE01.3</source>
<postscript description="B1.301 POSTSCRIPT">MESSAGE ADD,B1.2301</postscript>
</field>
<field x="65.5" y="14.4" type="Numero" align="right" width="11" id="302" pattern="1" text="###.###.###">
<source>VE03.2</source>
<postscript description="B1.302 POSTSCRIPT">MESSAGE ADD,B1.2302</postscript>
</field>
<field x="51" y="15.4" type="Valuta" align="right" width="13" id="401" pattern="1" text="###.###.###,@@">
<source>VE04.1</source>
<postscript description="B1.401 POSTSCRIPT">MESSAGE ADD,B1.2301</postscript>
</field>
<field x="65.5" y="15.4" type="Numero" align="right" width="11" id="402" pattern="1" text="###.###.###">
<source>VE04.2</source>
<postscript description="B1.402 POSTSCRIPT">MESSAGE ADD,B1.2302</postscript>
</field>
<field x="51" y="16.5" type="Valuta" align="right" width="13" id="501" pattern="1" text="###.###.###,@@">
<source>VE05.1</source>
<postscript description="B1.501 POSTSCRIPT">MESSAGE ADD,B1.2301</postscript>
</field>
<field x="65.5" y="16.5" type="Valuta" align="right" width="13" id="502" pattern="1" text="###.###.###,@@">
<source>VE05.2</source>
<postscript>MESSAGE ADD,B1.2302</postscript>
</field>
<field x="51" y="17.5" type="Valuta" align="right" width="13" id="601" pattern="1" text="###.###.###,@@">
<source>VE06.1</source>
<postscript>MESSAGE ADD,B1.2301</postscript>
</field>
<field x="65.5" y="17.5" type="Valuta" align="right" width="13" id="602" pattern="1" text="###.###.###,@@">
<source>VE06.2</source>
<postscript>MESSAGE ADD,B1.2302</postscript>
</field>
<field x="51" y="18.5" type="Valuta" align="right" width="13" id="701" pattern="1" text="###.###.###,@@">
<source>VE07.1</source>
<postscript>MESSAGE ADD,B1.2301</postscript>
</field>
<field x="65.5" y="18.5" type="Valuta" align="right" width="13" id="702" pattern="1" text="###.###.###,@@">
<source>VE07.2</source>
<postscript description="B1.702 POSTSCRIPT">MESSAGE ADD,B1.2302</postscript>
</field>
<field x="51" y="19.5" type="Valuta" align="right" width="13" id="801" pattern="1" text="###.###.###,@@">
<source>VE08.1</source>
<postscript>MESSAGE ADD,B1.2301</postscript>
</field>
<field x="65.5" y="19.5" type="Valuta" align="right" width="13" id="802" pattern="1" text="###.###.###,@@">
<source>VE08.2</source>
<postscript>MESSAGE ADD,B1.2302</postscript>
</field>
<field x="51" y="20.5" type="Valuta" align="right" width="13" id="901" pattern="1" text="###.###.###,@@">
<source>VE09.1</source>
<postscript>MESSAGE ADD,B1.2301</postscript>
</field>
<field x="65.5" y="20.5" type="Valuta" align="right" width="13" id="902" pattern="1" text="###.###.###,@@">
<source>VE09.2</source>
<postscript>MESSAGE ADD,B1.2302</postscript>
</field>
<field x="51" y="22.5" type="Valuta" align="right" width="13" id="2001" pattern="1" text="###.###.###,@@">
<source>VE20.1</source>
<postscript>MESSAGE ADD,B1.2301</postscript>
</field>
<field x="65.5" y="22.5" type="Valuta" align="right" width="13" id="2002" pattern="1" text="###.###.###,@@">
<source>VE20.2</source>
<postscript>MESSAGE ADD,B1.2302</postscript>
</field>
<field x="51" y="23.65" type="Valuta" align="right" width="13" id="2101" pattern="1" text="###.###.###,@@">
<source>VE21.1</source>
<postscript>MESSAGE ADD,B1.2301</postscript>
</field>
<field x="65.5" y="23.65" type="Valuta" align="right" width="13" id="2102" pattern="1" text="###.###.###,@@">
<source>VE21.1</source>
<postscript>MESSAGE ADD,B1.2302</postscript>
</field>
<field x="51" y="24.6" type="Numero" align="right" width="11" id="2201" pattern="1" text="###.###.###">
<source>VE22.1</source>
<postscript description="B1.2201 POSTSCRIPT">MESSAGE ADD,B1.2301</postscript>
</field>
<field x="65.5" y="24.6" type="Valuta" align="right" width="13" id="2202" pattern="1" text="###.###.###,@@">
<source>VE22.2</source>
<postscript>MESSAGE ADD,B1.2302</postscript>
</field>
<field x="51" y="25.75" type="Numero" align="right" width="11" id="2301" pattern="1" text="###.###.###" />
<field x="65.5" y="25.75" type="Valuta" align="right" width="13" id="2302" pattern="1" text="###.###.###,@@">
<postscript>MESSAGE ADD,B1.2502</postscript>
</field>
<field x="65.5" y="26.75" type="Valuta" align="right" width="13" id="2402" pattern="1" text="###.###.###,@@">
<source>VE24.2</source>
<postscript>MESSAGE ADD,B1.2502</postscript>
</field>
<field x="65.5" y="27.75" type="Valuta" align="right" width="13" id="2502" pattern="1" text="###.###.###,@@" />
<field x="19" y="30.75" type="Valuta" align="right" width="13" id="3002" pattern="1" text="###.###.###,@@">
<source>VE30.2</source>
<postscript>MESSAGE ADD,B1.3010</postscript>
</field>
<field x="37" y="30.75" type="Valuta" align="right" width="13" id="3003" pattern="1" text="###.###.###,@@">
<source>VE30.3</source>
<postscript>MESSAGE ADD,B1.3010</postscript>
</field>
<field x="19" y="32.75" type="Valuta" align="right" width="13" id="3004" pattern="1" text="###.###.###,@@">
<source>VE30.4</source>
<postscript>MESSAGE ADD,B1.3010</postscript>
</field>
<field x="37" y="32.75" type="Valuta" align="right" width="13" id="3005" pattern="1" text="###.###.###,@@">
<source>VE30.5</source>
<postscript>MESSAGE ADD,B1.3010</postscript>
</field>
<field x="51" y="28.75" type="Valuta" align="right" width="13" id="3010" pattern="1" text="###.###.###,@@">
<postscript>MESSAGE ADD,B1.2301</postscript>
</field>
<field x="51" y="33.9" type="Valuta" align="right" width="13" id="3101" pattern="1" text="###.###.###,@@">
<source>VE31.1</source>
</field>
<field x="51" y="34.95" type="Valuta" align="right" width="13" id="3201" pattern="1" text="###.###.###,@@">
<source>VE32.1</source>
</field>
<field x="51" y="35.95" type="Valuta" align="right" width="13" id="3301" pattern="1" text="###.###.###,@@">
<source>VE33.1</source>
</field>
<field x="51" y="36.95" type="Valuta" align="right" width="13" id="3401" pattern="1" text="###.###.###,@@">
<source>VE34.1</source>
<postscript>MESSAGE ADD,B1.2301</postscript>
</field>
<field x="19" y="40" type="Valuta" align="right" width="13" id="3502" pattern="1" text="###.###.###,@@">
<source>VE35.2</source>
<postscript>MESSAGE ADD,B1.3510</postscript>
</field>
<field x="37" y="40" type="Valuta" align="right" width="13" id="3503" pattern="1" text="###.###.###,@@">
<source>VE35.3</source>
<postscript>MESSAGE ADD,B1.3510</postscript>
</field>
<field x="19" y="42.1" type="Valuta" align="right" width="13" id="3504" pattern="1" text="###.###.###,@@">
<source>V35.4</source>
<postscript>MESSAGE ADD,B1.3510</postscript>
</field>
<field x="37" y="42.1" type="Valuta" align="right" width="13" id="3505" pattern="1" text="###.###.###,@@">
<source>VE35.5</source>
<postscript>MESSAGE ADD,B1.3510</postscript>
</field>
<field x="19" y="44.15" type="Valuta" align="right" width="13" id="3506" pattern="1" text="###.###.###,@@">
<source>V35.6</source>
<postscript>MESSAGE ADD,B1.3510</postscript>
</field>
<field x="37" y="44.15" type="Valuta" align="right" width="13" id="3507" pattern="1" text="###.###.###,@@">
<source>VE35.7</source>
<postscript>MESSAGE ADD,B1.3510</postscript>
</field>
<field x="19" y="46.15" type="Valuta" align="right" width="13" id="3508" pattern="1" text="###.###.###,@@">
<source>V35.8</source>
<postscript>MESSAGE ADD,B1.3510</postscript>
</field>
<field x="37" y="46.15" type="Valuta" align="right" width="13" id="3509" pattern="1" text="###.###.###,@@">
<source>VE35.9</source>
<postscript>MESSAGE ADD,B1.3510</postscript>
</field>
<field x="51" y="38" type="Valuta" align="right" width="13" id="3510" pattern="1" text="###.###.###,@@">
<postscript>MESSAGE ADD,B1.2301</postscript>
</field>
<field x="51" y="47.25" type="Valuta" align="right" width="13" id="3601" pattern="1" text="###.###.###,@@">
<source>VE36.1</source>
</field>
<field x="51" y="48.25" type="Valuta" align="right" width="13" id="3701" pattern="1" text="###.###.###,@@">
<source>VE37.1</source>
</field>
<field x="37" y="50.25" type="Valuta" align="right" width="13" id="3702" pattern="1" text="###.###.###,@@">
<source>VE37.1</source>
</field>
<field x="51" y="51.25" type="Valuta" align="right" width="13" id="3801" pattern="1" text="###.###.###,@@">
<source>VE38.1</source>
<postscript>MESSAGE ADD,B1.5001</postscript>
</field>
<field x="51" y="52.35" type="Valuta" align="right" width="13" id="3901" pattern="1" text="###.###.###,@@">
<source>VE39.1</source>
<postscript>MESSAGE SUB,B1.5001</postscript>
</field>
<field x="51" y="53.35" type="Valuta" align="right" width="13" id="4001" pattern="1" text="###.###.###,@@">
<source>VE40.1</source>
<postscript>MESSAGE SUB,B1.5001</postscript>
</field>
<field x="51" y="54.5" type="Valuta" align="right" width="13" id="5001" pattern="1" text="###.###.###,@@">
<postscript>MESSAGE ADD,B1.2301</postscript>
</field>
</section>
<section type="Foot" pattern="1" />
<section type="Foot" level="1" pattern="1" />
<sql>USE NDITTE SELECT CODDITTA==#CODDITTA</sql>
</report>

BIN
src/cg/cg7500a.tif Normal file

Binary file not shown.

44
src/cg/cg7500a.uml Normal file
View File

@ -0,0 +1,44 @@
#include "cg7500a.h"
TOOLBAR "Toolbar" 0 0 0 2
#include <printbar.h>
ENDPAGE
PAGE "Quadro VE" 0 0 0 0
NUMBER F_YEAR 4
BEGIN
PROMPT 3 3 "Anno "
FLAGS "A"
END
NUMBER F_CODDITTA 5
BEGIN
PROMPT 3 6 "Ditta "
FLAGS "B"
FIELD #CODDITTA
END
STRING F_RAGSOC 50
BEGIN
PROMPT 20 6 ""
FLAGS "B"
END
STRING F_REPORT 1
BEGIN
PROMPT 3 9 "Report "
FLAGS "B"
END
STRING F_DESREPORT 70
BEGIN
PROMPT 8 11 ""
FLAGS "D"
END
ENDPAGE
ENDMASK

126
src/cg/cg7500b.rep Normal file
View File

@ -0,0 +1,126 @@
<?xml version="1.0" encoding="UTF-8" ?>
<report name="cg7400b" orientation="2" lpi="6">
<description>Dichiarazione IVA Quadro VE</description>
<font face="Arial" size="8" />
<section type="Head" pattern="1">
<field x="2" y="0.5" type="Testo" align="right" width="7" pattern="1" text="Num.Reg" />
<field x="10" y="0.5" type="Testo" hidden="1" width="3" pattern="1" text="N.R." />
<field x="14" y="0.5" type="Testo" width="10" pattern="1" text="Data Reg." />
<field x="25" y="0.5" type="Stringa" hidden="1" width="1" pattern="1">
<source>RMOVIVA.INTRA</source>
</field>
<field x="27" y="0.5" type="Testo" width="10" pattern="1" text="Data Doc." />
<field x="38" y="0.5" type="Testo" width="7" pattern="1" text="N. Doc." />
<field x="46" y="0.5" type="Testo" width="4" pattern="1" text="Caus" />
<field x="51" y="0.5" type="Testo" width="50" pattern="1" text="Cliente Ragione Sociale" />
<field x="102" y="0.5" type="Testo" align="right" width="18" pattern="1" text="Imponibile" />
<field x="121" y="0.5" type="Testo" width="4" pattern="1" text="C.Iva" />
<field x="126" y="0.5" type="Stringa" hidden="1" width="10" pattern="1">
<source>201@.S3</source>
</field>
<field border="2" x="2" y="1.5" type="Linea" width="125" height="0" pattern="1" />
</section>
<section type="Head" level="1" pattern="1">
<prescript description="H1 PRESCRIPT">MESSAGE RESET,F1</prescript>
<field x="2" type="Stringa" width="40" pattern="1">
<font face="Arial" bold="1" size="8" />
<source>#SYSTEM.RAGSOC</source>
</field>
<field x="97" type="Stringa" align="right" width="30" pattern="1">
<source>"Data di Stampa: "+#SYSTEM.DATE+" - Pag. "+#PAGE</source>
</field>
<field x="2" y="1" type="Stringa" align="center" width="125" pattern="1">
<source>"ELENCO FATTURE ESPORTAZIONE - "+#ANNO</source>
</field>
</section>
<section type="Head" level="2" hidden="1" pattern="1">
<groupby>NUMREG+CODIVA</groupby>
<prescript description="H2 PRESCRIPT">MESSAGE RESET,F2</prescript>
<field type="Stringa" width="10" pattern="1">
<source>NUMREG+" "+CODIVA</source>
</field>
</section>
<section type="Body" pattern="1" />
<section type="Body" level="1" hidden="1" bg_color="#80FF80" pattern="2">
<condition>201@.S3="1"</condition>
<field x="126" type="Stringa" width="10" pattern="1">
<source>201@.S3</source>
</field>
<field x="2" type="Numero" align="right" width="7" id="5" pattern="1">
<source>RMOVIVA.NUMREG</source>
</field>
<field x="10" type="Numero" align="right" width="3" id="10" pattern="1">
<source>RMOVIVA.NUMRIG</source>
</field>
<field x="14" type="Data" width="10" id="15" pattern="1">
<source>MOV.DATAREG</source>
</field>
<field x="25" type="Stringa" width="1" id="20" pattern="1">
<source>RMOVIVA.INTRA</source>
</field>
<field x="27" type="Data" width="10" id="25" pattern="1">
<source>MOV.DATADOC</source>
</field>
<field x="38" type="Stringa" width="7" id="30" pattern="1">
<source>MOV.NUMDOC</source>
</field>
<field x="46" type="Stringa" width="4" id="35" pattern="1">
<source>MOV.CODCAUS</source>
</field>
<field x="51" type="Stringa" width="50" id="40" pattern="1">
<source>CLIFO.RAGSOC</source>
</field>
<field x="102" type="Valuta" align="right" width="18" id="100" pattern="1" text="###.###.###,@@">
<source>RMOVIVA.IMPONIBILE</source>
<prescript description="B1.100 PRESCRIPT">MESSAGE ADD,F2.100</prescript>
</field>
<field x="121" type="Stringa" width="4" id="105" pattern="1">
<source>RMOVIVA.CODIVA</source>
</field>
</section>
<section type="Foot" pattern="1" />
<section type="Foot" level="1" pattern="1">
<field border="2" x="2" y="0.5" type="Linea" width="125" height="0" pattern="1" />
<field x="50" y="1" type="Testo" align="right" width="50" pattern="1" text="TOTALE GENERALE:" />
<field x="102" y="1" type="Valuta" align="right" width="18" id="100" pattern="1" text="###.###.###,@@" />
</section>
<section type="Foot" level="2" height="1" pattern="1">
<field x="2" type="Numero" align="right" link="23.NUMREG" width="7" pattern="1">
<source>#B1.5</source>
</field>
<field x="10" type="Numero" hidden="1" align="right" width="3" pattern="1">
<source>RMOVIVA.NUMRIG</source>
</field>
<field x="14" type="Data" width="10" pattern="1">
<source>#B1.15</source>
</field>
<field x="25" type="Stringa" hidden="1" width="1" pattern="1">
<source>RMOVIVA.INTRA</source>
</field>
<field x="27" type="Data" width="10" pattern="1">
<source>#B1.25</source>
</field>
<field x="38" type="Stringa" width="7" pattern="1">
<source>#B1.30</source>
</field>
<field x="46" type="Stringa" width="4" pattern="1">
<source>#B1.35</source>
</field>
<field x="51" type="Stringa" width="50" pattern="1">
<source>#B1.40</source>
</field>
<field x="121" type="Stringa" width="4" pattern="1">
<source>#B1.105</source>
</field>
<field x="126" type="Stringa" hidden="1" width="10" pattern="1">
<source>201@.S3</source>
</field>
<field x="102" type="Valuta" align="right" width="18" id="100" pattern="1" text="###.###.###,@@">
<prescript description="F2.100 PRESCRIPT">MESSAGE ADD,F1.100</prescript>
</field>
</section>
<sql>USE RMOVIVA SELECT (23.ANNOIVA=#ANNO)&#26;&#26;((201@.S3="1")||(201@.S3="2"))
JOIN MOV INTO NUMREG==NUMREG
JOIN 20 TO MOV INTO TIPOCF==TIPO CODCF==CODCF
JOIN %IVA ALIAS 201 INTO CODTAB=CODIVA</sql>
</report>

BIN
src/cg/cg7600a.pdf Normal file

Binary file not shown.

BIN
src/cg/cg7600b.pdf Normal file

Binary file not shown.

BIN
src/cg/cg7700a.pdf Normal file

Binary file not shown.

View File

@ -207,7 +207,7 @@ void TPagamento::set_numero_rate(int n, int sscad, int rdiff)
const int nr = n_rate();
const int first = _tpr < 4 ? 0 : 1;
real sum = 0.0;
real sum;
int i = 0;
bool inv = in_valuta();
@ -408,13 +408,13 @@ void TPagamento::set_numero_rate(int n, int sscad, int rdiff)
{
for (i = first; sum < CENTO; i++)
{
if ((CENTO - sum) < (const real)p)
if (real(CENTO - sum) < p)
p = CENTO - sum;
sum += p;
// if necessary add remainder on first one
if ((CENTO - sum) /* still */ < p)
if (real(CENTO - sum) /* still */ < p)
{
real prc = perc_rata(first);
prc += CENTO - sum;
@ -1140,7 +1140,7 @@ word TPagamento::change_value_uguali(int row, real user_val, bool is_perc, bool
if (n_rate() == 1)
{
// se il numero rate e' 1 si aggiungono rate uguali a coprire l'importo
if ((to_share - user_div) < user_div) return 0;
if (real(to_share - user_div) < user_div) return 0;
real div = to_share / user_div;
real delta = to_share - (user_div * real(div.integer()));
if (div > real(999.0)) return P_TOOMANY;

View File

@ -249,3 +249,249 @@ bool classify_pim(const TRectype& pimr, real& imp, real& iva, tiporec& t, bool t
return last_checked != -1;
}
bool classify_pim(const TISAM_recordset& pim, real& imp, real& iva, tiporec& t, bool tipost)
{
static int last_checked = -1;
// parse CODTAB of pim record
const TString80 ctab = pim.get("CODTAB").as_string();
const int tipocr = atoi(ctab.mid(15,1)); // tipo costo_ricavo
const int tipodet = atoi(ctab.mid(20,1)); // tipo detraibilita'
const int corrisp = (int)pim.get("I0").as_int(); // netto = 1, lordo = 2
const int tipomov = (int)pim.get("I1").as_int(); // 1 = vendita, 2 = acquisto
// const bool vola = pimr.get_bool("B2");
const bool rimb = pim.get("B3").as_bool();
const bool ricl = pim.get("B4").as_bool();
const TString4 tipoiva = pim.get("S5").as_string();
// cominciamo cosi'
imp = ZERO; iva = ZERO;
for (int i = last_checked + 1; i <= MAX_TIPOREC+1; i++)
{
tiporec tocheck = (tiporec)i;
bool found = FALSE;
switch(tocheck)
{
case acq_norm:
//found = tipomov == 2 && tipoiva != "NS";
found = tipomov == 2;
found &= (tipodet == 0 /* || tipodet == 1 || tipodet == 3 ||
tipodet == 5 || tipodet == 9 */);
if (found)
{
if (tipost) //stampa
{
imp = pim.get("R0").as_real() - pim.get("R9").as_real();
iva = pim.get("R1").as_real() - pim.get("R10").as_real();
}
else //visualizza
{
imp = pim.get("R0").as_real();
iva = pim.get("R1").as_real();
}
}
break;
case vend_norm:
//found = tipomov == 1 /* && corrisp == 1 */ && tipoiva != "NS";
found = tipomov == 1 /* && corrisp == 1 */;
if (found)
{
imp = pim.get("R0").as_real();
iva = pim.get("R1").as_real();
}
break;
case acq_simp:
if (tipomov == 2)
{
imp = pim.get("R11").as_real();
iva = pim.get("R12").as_real();
}
found = !imp.is_zero() || !iva.is_zero();
break;
case vend_simp:
if (tipomov == 1 /* && corrisp == 1 */)
{
imp = pim.get("R11").as_real();
iva = pim.get("R12").as_real();
}
found = !imp.is_zero() || !iva.is_zero();
break;
case bolle_doganali:
//if (tipomov == 2 && tipoiva != "NS")
if (tipomov == 2 && tipodet != 9) // scarta le bolle doganali con tipo detr. == 9
{
imp = pim.get("R9").as_real();
iva = pim.get("R10").as_real();
}
found = !imp.is_zero() || !iva.is_zero();
break;
case base_ventilazione:
found = (tipomov == 2 && tipodet != 9 && tipocr == 1);
found &= (tipoiva != "NS" && tipoiva != "NI" && tipoiva != "ES");
found &= (ricl ? TRUE : tipodet == 3);
if (found)
{
imp = pim.get("R0").as_real();
iva = pim.get("R1").as_real();
}
found &= !imp.is_zero() || !iva.is_zero();
break;
case acq_beni_riv:
/*
found = (tipomov == 2 && tipodet != 9 &&
(tipocr == 1 || (tipocr == 5 && tipodet == 3)));
found &= tipoiva != "NS" && tipoiva != "NI" && tipoiva != "ES";
found &= (ricl ? TRUE : tipodet == 3);
*/
found = (tipomov == 2 && (tipocr == 1 || tipocr == 5));
if (found)
{
imp = pim.get("R0").as_real();
iva = pim.get("R1").as_real();
}
found &= (!imp.is_zero() || !iva.is_zero());
break;
case corr_norm:
found = tipomov == 1 && corrisp == 2 && tipoiva != "NS";
if (found)
{
imp = pim.get("R0").as_real();
iva = pim.get("R1").as_real();
found &= (!imp.is_zero() || !iva.is_zero());
}
break;
case corr_simp:
if (tipomov == 1 && corrisp == 2)
{
imp = pim.get("R11").as_real();
iva = pim.get("R12").as_real();
}
found = !imp.is_zero() || !iva.is_zero();
break;
case acq_beni_ammort:
//found = tipomov == 2 && tipocr == 2 &&
// tipodet == 0 && tipoiva != "NS";
found = tipomov == 2 && tipocr == 2 && tipodet == 0;
if (found)
{
imp = pim.get("R0").as_real();
iva = pim.get("R1").as_real();
found &= (!imp.is_zero() || !iva.is_zero());
}
break;
case acq_beni_ammort_nd:
//found = tipomov == 2 && tipocr ==2 &&
// tipodet != 0 && tipoiva != "NS";
found = tipomov == 2 && tipocr ==2 && tipodet != 0;
if (found)
{
imp = pim.get("R0").as_real();
iva = pim.get("R1").as_real();
found &= (!imp.is_zero() || !iva.is_zero());
}
break;
case acq_beni_leasing:
//found = tipomov == 2 && tipocr == 8 && tipoiva != "NS";
found = tipomov == 2 && tipocr == 8;
if (found)
{
imp = pim.get("R0").as_real();
iva = pim.get("R1").as_real();
found &= (!imp.is_zero() || !iva.is_zero());
}
break;
case acq_amm_ultdetr:
//found = tipomov == 2 && tipocr == 3 && tipoiva != "NS";
found = tipomov == 2 && tipocr == 3;
if (found)
{
imp = pim.get("R0").as_real();
iva = pim.get("R1").as_real();
found &= (!imp.is_zero() || !iva.is_zero());
}
break;
case acq_ind_op_es:
found = tipomov == 2 && tipodet == 1 && tipoiva != "NS";
if (found)
{
imp = pim.get("R0").as_real();
iva = pim.get("R1").as_real();
found &= (!imp.is_zero() || !iva.is_zero());
}
break;
case acq_ind_pass_int:
found = tipomov == 2 && tipodet == 3 && tipoiva != "NS";
if (found)
{
imp = pim.get("R0").as_real();
iva = pim.get("R1").as_real();
found &= (!imp.is_zero() || !iva.is_zero());
}
break;
case acq_ind_art_19:
found = tipomov == 2 && tipodet == 9 && tipoiva != "NS";
if (found)
{
imp = pim.get("R0").as_real() - pim.get("R9").as_real(); // toglie le bolle doganali (sono a parte)
iva = pim.get("R1").as_real() - pim.get("R10").as_real();
found &= (!imp.is_zero() || !iva.is_zero());
}
break;
case cess_amm:
//found = tipomov == 1 && tipocr == 4 && tipoiva != "NS";
found = tipomov == 1 && tipocr == 4;
if (found)
{
imp = pim.get("R0").as_real();
iva = pim.get("R1").as_real();
found &= (!imp.is_zero() || !iva.is_zero());
}
break;
case vend_rimborso:
found = tipomov == 1 && rimb && tipoiva != "NS";
if (found)
{
imp = pim.get("R0").as_real();
iva = pim.get("R1").as_real();
found &= (!imp.is_zero() || !iva.is_zero());
}
break;
case acq_rimborso:
found = tipomov == 2 && rimb && tipoiva != "NS";
if (found)
{
imp = pim.get("R0").as_real();
iva = pim.get("R1").as_real();
found &= (!imp.is_zero() || !iva.is_zero());
}
break;
case acq_bd_ind_art_19:
found = tipomov == 2 && tipodet == 9 && tipoiva != "NS";
if (found)
{
imp = pim.get("R9").as_real();
iva = pim.get("R10").as_real();
found &= (!imp.is_zero() || !iva.is_zero());
}
break;
}
if (i == MAX_TIPOREC+1)
last_checked = -1;
else if (found)
{
t = tocheck;
last_checked = i;
break;
}
}
return last_checked != -1;
}

View File

@ -11,7 +11,7 @@ class TRectype;
#ifndef __REAL_H
#include <real.h>
#endif
#include <recset.h>
// per ora ci si fotte di agenzie viaggio e di
// regimi agricoli
@ -83,5 +83,6 @@ const int MAX_TIPOREC = 19;
// -----------------------------------------------------------
bool classify_pim(const TRectype& pimr, real& imp, real& iva, tiporec& t, bool ts);
bool classify_pim(const TISAM_recordset& pim, real& imp, real& iva, tiporec& t, bool ts);
#endif

116
src/cg/ve7500b.rep.bak Normal file
View File

@ -0,0 +1,116 @@
<?xml version="1.0" encoding="UTF-8" ?>
<report name="dic_ve" orientation="2" lpi="6">
<description>Dichiarazione IVA Quadro VE</description>
<font face="Arial" size="8" />
<section type="Head" pattern="1">
<field y="0.5" type="Testo" align="right" width="7" pattern="1" text="Num.Reg" />
<field x="8" y="0.5" type="Testo" hidden="1" width="3" pattern="1" text="N.R." />
<field x="12" y="0.5" type="Testo" width="10" pattern="1" text="Data Reg." />
<field x="23" y="0.5" type="Stringa" hidden="1" width="1" pattern="1">
<source>RMOVIVA.INTRA</source>
</field>
<field x="25" y="0.5" type="Testo" width="10" pattern="1" text="Data Doc." />
<field x="36" y="0.5" type="Testo" width="7" pattern="1" text="N. Doc." />
<field x="44" y="0.5" type="Testo" width="4" pattern="1" text="Caus" />
<field x="49" y="0.5" type="Testo" width="50" pattern="1" text="Cliente Ragione Sociale" />
<field x="100" y="0.5" type="Testo" align="right" width="18" pattern="1" text="Imponibile" />
<field x="119" y="0.5" type="Testo" width="4" pattern="1" text="C.Iva" />
<field x="124" y="0.5" type="Stringa" hidden="1" width="10" pattern="1">
<source>201@.S3</source>
</field>
<field border="2" y="1.5" type="Linea" width="125" height="0" pattern="1" />
</section>
<section type="Head" level="1" pattern="1">
<prescript description="H1 PRESCRIPT">MESSAGE RESET,F1</prescript>
</section>
<section type="Head" level="2" hidden="1" pattern="1">
<groupby>NUMREG+CODIVA</groupby>
<prescript description="H2 PRESCRIPT">MESSAGE RESET,F2</prescript>
<field type="Stringa" width="10" pattern="1">
<source>NUMREG+" "+CODIVA</source>
</field>
</section>
<section type="Body" pattern="1" />
<section type="Body" level="1" hidden="1" bg_color="#80FF80" pattern="2">
<condition>201@.S3="1"</condition>
<field x="124" type="Stringa" width="10" pattern="1">
<source>201@.S3</source>
</field>
<field type="Numero" align="right" width="7" id="5" pattern="1">
<source>RMOVIVA.NUMREG</source>
</field>
<field x="8" type="Numero" align="right" width="3" id="10" pattern="1">
<source>RMOVIVA.NUMRIG</source>
</field>
<field x="12" type="Data" width="10" id="15" pattern="1">
<source>MOV.DATAREG</source>
</field>
<field x="23" type="Stringa" width="1" id="20" pattern="1">
<source>RMOVIVA.INTRA</source>
</field>
<field x="25" type="Data" width="10" id="25" pattern="1">
<source>MOV.DATADOC</source>
</field>
<field x="36" type="Stringa" width="7" id="30" pattern="1">
<source>MOV.NUMDOC</source>
</field>
<field x="44" type="Stringa" width="4" id="35" pattern="1">
<source>MOV.CODCAUS</source>
</field>
<field x="49" type="Stringa" width="50" id="40" pattern="1">
<source>CLIFO.RAGSOC</source>
</field>
<field x="100" type="Valuta" align="right" width="18" id="100" pattern="1" text="###.###.###,@@">
<source>RMOVIVA.IMPONIBILE</source>
<prescript description="B1.100 PRESCRIPT">MESSAGE ADD,F2.100</prescript>
</field>
<field x="119" type="Stringa" width="4" id="105" pattern="1">
<source>RMOVIVA.CODIVA</source>
</field>
</section>
<section type="Foot" pattern="1" />
<section type="Foot" level="1" pattern="1">
<field border="2" y="0.5" type="Linea" width="125" height="0" pattern="1" />
<field x="48" y="1" type="Testo" align="right" width="50" pattern="1" text="TOTALE GENERALE:" />
<field x="100" y="1" type="Valuta" align="right" width="18" id="100" pattern="1" text="###.###.###,@@" />
</section>
<section type="Foot" level="2" height="1" pattern="1">
<field type="Numero" align="right" width="7" pattern="1">
<source>#B1.5</source>
</field>
<field x="8" type="Numero" hidden="1" align="right" width="3" pattern="1">
<source>RMOVIVA.NUMRIG</source>
</field>
<field x="12" type="Data" width="10" pattern="1">
<source>#B1.15</source>
</field>
<field x="23" type="Stringa" hidden="1" width="1" pattern="1">
<source>RMOVIVA.INTRA</source>
</field>
<field x="25" type="Data" width="10" pattern="1">
<source>#B1.25</source>
</field>
<field x="36" type="Stringa" width="7" pattern="1">
<source>#B1.30</source>
</field>
<field x="44" type="Stringa" width="4" pattern="1">
<source>#B1.35</source>
</field>
<field x="49" type="Stringa" width="50" pattern="1">
<source>#B1.40</source>
</field>
<field x="119" type="Stringa" width="4" pattern="1">
<source>#B1.105</source>
</field>
<field x="124" type="Stringa" hidden="1" width="10" pattern="1">
<source>201@.S3</source>
</field>
<field x="100" type="Valuta" align="right" width="18" id="100" pattern="1" text="###.###.###,@@">
<prescript description="F2.100 PRESCRIPT">MESSAGE ADD,F1.100</prescript>
</field>
</section>
<sql>USE RMOVIVA SELECT (23.ANNOIVA=#ANNO)&#26;&#26;((201@.S3="1")||(201@.S3="2"))
JOIN MOV INTO NUMREG==NUMREG
JOIN 20 TO MOV INTO TIPOCF==TIPO CODCF==CODCF
JOIN %IVA ALIAS 201 INTO CODTAB=CODIVA</sql>
</report>