Patch level : 12.0 348
Files correlati     : cg7.exe cg7600a.png cg7600a.rep cg7700a.png cg7700a.rep
                      cg7700a.png cg7700b.rep cg7800a.png cg7800a.rep
                      cg7700b.rep cg7700b.png 
Quadri Ve VF e VJ della dichiarazioone IVA
Aggiunti ai regimi speciali sulle causali 
6  Acquisti di rottami e mat.di di recupero art. 74, commi 7 e 8
7  Acquisti di oro industriale e argento puro (art. 17, comma 5)
8  Acquisti di oro da investimento imp.per opzione (art. 17, comma 5)
9  Acquisti intrac. di CPU,PC, tablet,cellulari,console,microproc.
10 Importazioni rottami e altri mat.di recupero imposta non è versata
14 Acquisti di fabbricati (art. 17, comma 6, lett. a-bis)
15 Acquisti di telefoni cellulari (art. 17, comma 6, lett. b)
16 Acquisti di prodotti elettronici (art. 17, comma 6, lett. c)
17 Acquisti di servizi del comp.edile e sett.connessi art. 17,comma 6, lett. a-ter
18 Acquisti di beni e servizi del sett.energetico art. 17, c.6 d-bis,ter,d-quater
19 Acquisti delle P.A., titolari di partita IVA art. 17-ter
git-svn-id: svn://10.65.10.50/branches/R_10_00@23639 c028cbd2-c16b-5b4b-a496-9718f37d4682
			
			
							
								
								
									
										17
									
								
								src/cg/Cg7 quadri.txt
									
									
									
									
									
										Normal file
									
								
							
							
						
						| @ -0,0 +1,17 @@ | ||||
| Report				Quadro | ||||
| cg7400a				Intestazione | ||||
| cg7400b				A-B | ||||
| cg7500a				C-D | ||||
| cg7600a				E | ||||
| cg7700a				F pag. 1 | ||||
| cg7700b				F pag. 2 | ||||
| cg7800a				J-I | ||||
| cg7900a				J-I | ||||
| cg7a00a				L | ||||
| cg7b00a				T | ||||
| cg7c00a				X | ||||
| cg7d00a				O pag.1 | ||||
| cg7d00b				O pag.2 | ||||
| cg7e00a				G | ||||
| cg7f00a				S | ||||
| cg7g00a				V-W-Y-Z | ||||
							
								
								
									
										
											BIN
										
									
								
								src/cg/IVA_2017_istruzioni.pdf
									
									
									
									
									
										Normal file
									
								
							
							
						
						
							
								
								
									
										
											BIN
										
									
								
								src/cg/IVA_2017_modello.pdf
									
									
									
									
									
										Normal file
									
								
							
							
						
						| @ -377,8 +377,19 @@ BEGIN | ||||
| 	ITEM "3|Acquisti beni e servizi da soggetti non residenti" | ||||
| 	ITEM "4|Operazioni di cui all'art.74,c.1,lett.e)"          | ||||
| 	ITEM "5|Provvigioni corrisposte dalle agenzie di viaggio ai loro intermediari" | ||||
| 	ITEM "6|Acquisti di rottami e mat.di di recupero art. 74, commi 7 e 8" | ||||
| 	ITEM "7|Acquisti di oro industriale e argento puro (art. 17, comma 5)" | ||||
| 	ITEM "8|Acquisti di oro da investimento imp.per opzione (art. 17, comma 5)" | ||||
| 	ITEM "9|Acquisti intrac. di CPU,PC, tablet,cellulari,console,microproc." | ||||
| 	item "10|Importazioni rottami e altri mat.di recupero imposta non è versata" | ||||
| 	ITEM "12|Acquisti di tartufi (art.1,c.109,legge 311/2004)" | ||||
| 	ITEM "13|Subappalti in edilizia (Reverse charge)" | ||||
| 	ITEM "14|Acquisti di fabbricati (art. 17, comma 6, lett. a-bis)" | ||||
| 	ITEM "15|Acquisti di telefoni cellulari (art. 17, comma 6, lett. b)" | ||||
| 	ITEM "16|Acquisti di prodotti elettronici (art. 17, comma 6, lett. c)" | ||||
| 	ITEM "17|Acquisti di servizi del comp.edile e sett.connessi art. 17, comma 6, lett. a-ter " | ||||
| 	ITEM "18|Acquisti di beni e servizi del sett.energetico art. 17, c.6 d-bis,ter,d-quater" | ||||
| 	ITEM "19|Acquisti delle P.A., titolari di partita IVA art. 17-ter" | ||||
| 	ITEM "50|Importazione di oro o argento (Reverse charge)" | ||||
| 	ITEM "51|Rottami (Reverse charge)" | ||||
| 	ITEM "52|Operazioni effettuate nei confronti di condominii" | ||||
|  | ||||
| @ -8,14 +8,14 @@ | ||||
| class TQuadro_VC_recordset : public TQuadro_IVA_recordset | ||||
| { | ||||
| protected: | ||||
| 	virtual void load(const long year); | ||||
| 	virtual void load(); | ||||
| 
 | ||||
| public: | ||||
| 	TQuadro_VC_recordset(const char* use, const int year) : TQuadro_IVA_recordset(use, year) {} | ||||
| 	TQuadro_VC_recordset(TQuadro_IVA_mask * mask, const char* use, const int year) : TQuadro_IVA_recordset(mask, use, year) { load(); } | ||||
| 	virtual ~TQuadro_VC_recordset() {} | ||||
| }; | ||||
| 
 | ||||
| void TQuadro_VC_recordset::load(const long year) | ||||
| void TQuadro_VC_recordset::load() | ||||
| { | ||||
| 	TArray _aliquote; | ||||
| 	TArray _codiva; | ||||
| @ -23,7 +23,7 @@ void TQuadro_VC_recordset::load(const long year) | ||||
|   TTable pem("PEM"); | ||||
|   TString16 key; | ||||
| 
 | ||||
|   key.format("%04d00", year); | ||||
|   key.format("%04d00", year()); | ||||
| 	pem.put("CODTAB", key); | ||||
| 	int err = pem.read(); | ||||
|    | ||||
| @ -32,14 +32,14 @@ void TQuadro_VC_recordset::load(const long year) | ||||
| 	{ | ||||
| 	} | ||||
| 	else | ||||
|     warning_box(FR("Risultati liquidazione non presenti o da ricalcolare per l'anno %d."), year); | ||||
|     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); } | ||||
| 	virtual TQuadro_IVA_recordset * app_recordset(const char* use, const int year) { return new TQuadro_VC_recordset(mask(), use, year); } | ||||
| 	TQuadro_VC_app() : TQuadro_IVA_app("Stampa Quadro VC", "cg7400a") {} | ||||
| 	virtual ~TQuadro_VC_app() {} | ||||
| }; | ||||
|  | ||||
| Before Width: | Height: | Size: 173 KiB After Width: | Height: | Size: 127 KiB | 
							
								
								
									
										
											BIN
										
									
								
								src/cg/cg7400b.pdf
									
									
									
									
									
										Normal file
									
								
							
							
						
						| @ -2,7 +2,9 @@ | ||||
| // Programma per la stampa del quadri IVA
 | ||||
| #include <recarray.h> | ||||
| #include <reprint.h> | ||||
| #include <reputils.h> | ||||
| #include <tabutil.h> | ||||
| #include <utility.h> | ||||
| 
 | ||||
| #include "cg7401.h" | ||||
| 
 | ||||
| @ -93,31 +95,7 @@ void TQuadro_IVA_mask::build_report_sheet() | ||||
| 	TSheet_field & sf = sfield(F_REPORTS); | ||||
| 
 | ||||
| 	sf.destroy(); | ||||
| 	switch (quadro) | ||||
| 	{ | ||||
| 		case '4': | ||||
| 			{ | ||||
| 			  TToken_string & row = sf.row(sf.items());	row.add("|1|Prova|cg7400b"); | ||||
| 			} | ||||
| 			break; | ||||
| 		case '6' : | ||||
| 			{ | ||||
| 			  TToken_string & row1 = sf.row(sf.items()); row1.add("|1|Stampa esportazioni|cg7600b"); | ||||
| 				TToken_string & row2 = sf.row(sf.items()); row2.add("|2|Stampa cessioni Intracomunitarie|cg7600c"); | ||||
| 				TToken_string & row3 = sf.row(sf.items()); row3.add("|3|Stampa cessioni verso San Marino|cg7600d"); | ||||
| 				TToken_string & row4 = sf.row(sf.items()); row4.add("|4|Stampa operazioni assimilate|cg7600e"); | ||||
| 				TToken_string & row5 = sf.row(sf.items()); row5.add("|5|Stampa operazioni non imp. in seguito a dich. d'intenti|cg7600f"); | ||||
| 				TToken_string & row6 = sf.row(sf.items()); row6.add("|6|Stampa altre operazioni non imponibili|cg7600g"); | ||||
| 				TToken_string & row7 = sf.row(sf.items()); row7.add("|7|Stampa esenti art. 10|cg7600h"); | ||||
| 				TToken_string & row8 = sf.row(sf.items()); row8.add("|8|Stampa operazioni non sogg. ai sensi art.7 da uno a septies|cg7600i"); | ||||
| 				TToken_string & row9 = sf.row(sf.items()); row9.add("|9|Stampa operazioni reverse charge|cg7600l"); | ||||
| 				TToken_string & row10 = sf.row(sf.items()); row10.add("|10|Stampa operazioni terremotati|cg7600m"); | ||||
| 				TToken_string & row11 = sf.row(sf.items()); row11.add("|11|Stampa operazioni effettuate con PA ai sensi art.17|cg7600n"); | ||||
| 			} | ||||
| 			break; | ||||
| 		default : | ||||
| 			break; | ||||
| 	} | ||||
| 	((TQuadro_IVA_app &) main_app()).load_sheet(sf); | ||||
| 	__stop.load("STOP"); | ||||
| 	const int items = sf.items(); | ||||
| 
 | ||||
| @ -181,22 +159,67 @@ bool TQuadro_IVA_mask::on_field_event(TOperable_field& o, TField_event e, long j | ||||
|   return true; | ||||
| }  | ||||
| 
 | ||||
| const real TQuadro_IVA_recordset::evaluate_recordset(const int code, const int year, const char * field, const char * expr) | ||||
| { | ||||
| 	real	val; | ||||
| 	TProgram_report & rep = _mask->get_report(code - 1); | ||||
| 	TISAM_recordset * set = (TISAM_recordset *) rep.recordset(); | ||||
| 	TExpression e(expr == NULL ? "\"X\"" : expr); | ||||
| 		 | ||||
| 	if (set != NULL) | ||||
| 	{ | ||||
| 		set->set_var("#ANNO", format("%d", year)); | ||||
| 
 | ||||
| 		if (set->items() > 0) | ||||
| 			for (set->move_first(); !set->eof(); set->move_next()) | ||||
| 			{ | ||||
| 				int numvar = e.numvar(); | ||||
| 
 | ||||
| 				for (int i = 0; i < numvar; i++) | ||||
| 				{ | ||||
| 					const TString16 name  = e.vars().varname(i); | ||||
| 					const TString val = set->get(name).as_string(); | ||||
| 
 | ||||
| 					e.setvar(name, val); | ||||
| 				} | ||||
| 				if ((bool)e) | ||||
| 					val += set->get(field).as_real(); | ||||
| 			} | ||||
| 		set->freeze(); | ||||
| 	} | ||||
| 
 | ||||
| 	return val; | ||||
| } | ||||
| 
 | ||||
| const TVariant& TQuadro_IVA_recordset::get(const char* column_name) const | ||||
| { | ||||
| 	const TFixed_string name(column_name); | ||||
| 
 | ||||
| 	if (!name.starts_with("#") && name.find('.') > 0) | ||||
| 	{ | ||||
| 		TVariant & var = get_tmp_var(); | ||||
| 		real * value = (real *) _values.objptr(name); | ||||
| 		TObject * obj = _values.objptr(name); | ||||
| 		TVariant & var = get_tmp_var(); var == NULL_VARIANT; | ||||
| 
 | ||||
| 		if (value == NULL) | ||||
| 			var = ZERO; | ||||
| 		else | ||||
| 		if (TString(column_name) == "VF30.1") | ||||
| 			int i = 1; | ||||
| 
 | ||||
| 		if (obj != NULL) | ||||
| 		{ | ||||
| 			TObject * typeobj = _types.objptr(name); | ||||
| 
 | ||||
| 			if (typeobj != NULL && ((TString &) *typeobj) == "real") | ||||
| 			{ | ||||
| 				real * value = (real *) obj; | ||||
| 		 | ||||
| 				value->round(0); | ||||
| 				var = *value; | ||||
| 			} | ||||
| 			else | ||||
| 				var = (TString &) *obj; | ||||
| 		} | ||||
| 		else | ||||
| 			var = ZERO; | ||||
| 
 | ||||
| 		return var; | ||||
| 	} | ||||
| 	return TISAM_recordset::get(column_name); | ||||
| @ -210,10 +233,23 @@ void TQuadro_IVA_recordset::add_value(const char *s, real value) | ||||
| 	{ | ||||
| 		const TString8 key(s); | ||||
| 		_values.add(key, val = new real); | ||||
| 		_types.add(key, TString("real")); | ||||
| 	} | ||||
| 	*val += value; | ||||
| } | ||||
| 
 | ||||
| void TQuadro_IVA_recordset::set_bool(const char *s, bool on) | ||||
| { | ||||
| 	TString * val = (TString *)_values.objptr(s); | ||||
| 
 | ||||
| 	if (val == NULL) | ||||
| 	{ | ||||
| 		const TString8 key(s); | ||||
| 		_values.add(key, val = new TString4); | ||||
| 	} | ||||
| 	*val = on ? "X" : ""; | ||||
| } | ||||
| 
 | ||||
| TQuadro_IVA_report::TQuadro_IVA_report(const char * report_name) | ||||
| { | ||||
| 	load(report_name); | ||||
| @ -234,11 +270,20 @@ void TQuadro_IVA_app::print() | ||||
| 	_mask->restart_ditte(); | ||||
| 	while ((ditta = _mask->get_ditta()) > 0) | ||||
| 	{ | ||||
| 		TFilename name; | ||||
| 
 | ||||
| 		set_firm(ditta); | ||||
| 		_name.ext("rep"); | ||||
| 		if (_name.exist() || _name.custom_path()) | ||||
| 		name = _name; | ||||
| 		name.rtrim(1); | ||||
| 		for (char c = 'a'; c <= last_quadro_report(); c++) | ||||
| 		{ | ||||
| 			TQuadro_IVA_report rep(_name); | ||||
| 			TFilename repname(name); | ||||
| 
 | ||||
| 			repname << c; | ||||
| 			repname.ext("rep"); | ||||
| 			if (repname.exist() || repname.custom_path()) | ||||
| 			{ | ||||
| 				TQuadro_IVA_report rep(repname); | ||||
| 				TRecordset * set = rep.recordset(); | ||||
| 		 | ||||
| 				rep.set_recordset(app_recordset(set->query_text(), atoi(year))); | ||||
| @ -249,10 +294,10 @@ void TQuadro_IVA_app::print() | ||||
| 				if (fld != NULL) | ||||
| 					fld->set(year); | ||||
| 				set->set_var("#CODDITTA", ditta); | ||||
| 				set->set_var("#ANNO", year); | ||||
| 				book.add(rep); | ||||
| 			} | ||||
| 		 | ||||
| 
 | ||||
| 		} | ||||
| 		_mask->restart_reports(); | ||||
| 		TProgram_report * rep = _mask->get_report(); | ||||
| 		TFilename repname = rep->filename(); | ||||
| @ -288,3 +333,7 @@ void TQuadro_IVA_app::main_loop() | ||||
|   set_firm(oldditta); | ||||
| } | ||||
| 
 | ||||
| TQuadro_IVA_app & app() | ||||
| { | ||||
| 	return (TQuadro_IVA_app &) main_app(); | ||||
| } | ||||
| @ -2,9 +2,13 @@ | ||||
| 
 | ||||
| #include <applicat.h> | ||||
| #include <automask.h> | ||||
| #include <automask.h> | ||||
| #include <expr.h> | ||||
| #include <reputils.h> | ||||
| #include <sheet.h> | ||||
| 
 | ||||
| #include <rmoviva.h> | ||||
| 
 | ||||
| class TQuadro_IVA_mask : public TAutomask | ||||
| { | ||||
|   int						_year; | ||||
| @ -23,6 +27,7 @@ public: | ||||
| 	long get_ditta(); | ||||
| 	TProgram_report * get_report(); | ||||
| 	TProgram_report & get_report(const int code) const { return (TProgram_report &) _reports[code];} | ||||
| 	TISAM_recordset * get_recset(const int code) const { return (TISAM_recordset *)((TProgram_report &) _reports[code - 1]).recordset();} | ||||
|   virtual bool on_field_event(TOperable_field& o, TField_event e, long jolly); | ||||
| 
 | ||||
| 	TQuadro_IVA_mask(const char * mask_name); | ||||
| @ -32,15 +37,25 @@ public: | ||||
| class TQuadro_IVA_recordset : public TISAM_recordset | ||||
| { | ||||
| 	TAssoc_array _values; | ||||
| 	TAssoc_array _types; | ||||
| 	TQuadro_IVA_mask * _mask; | ||||
| 	int _year; | ||||
| 
 | ||||
| protected: | ||||
| 	void add_value(const char *s, real value); | ||||
| //	void add_value(const TString &s, real value);
 | ||||
| 	virtual void load(const long year) pure; | ||||
| 	void set_bool(const char *s, bool on = false); | ||||
| 	virtual void load() pure; | ||||
| 	virtual const TVariant& get(const char* column_name) const; | ||||
| 	void clear() { _values.destroy(); _types.destroy(); } | ||||
|   const real evaluate_recordset(const int code, const int year, const char * field, const char * expr = NULL); | ||||
| 	const real evaluate_recordset_imponibile(const int code, const int year, const char * expr = NULL) { return evaluate_recordset(code, year, RMI_IMPONIBILE, expr); } | ||||
| 	const real evaluate_recordset_imposta(const int code, const int year, const char * expr = NULL) { return evaluate_recordset(code, year, RMI_IMPOSTA, expr); } | ||||
| 
 | ||||
| public: | ||||
| 	TQuadro_IVA_recordset(const char* use, const int year) : TISAM_recordset(use) { } | ||||
| 	TQuadro_IVA_recordset(TQuadro_IVA_mask * mask, const char* use, const int year) : TISAM_recordset(use), _mask(mask), _year(year) { } | ||||
| 	TQuadro_IVA_recordset(const TQuadro_IVA_recordset * recset); | ||||
| 	TQuadro_IVA_recordset(const TQuadro_IVA_recordset & recset); | ||||
| 	int year() { return _year; } | ||||
| 	virtual ~TQuadro_IVA_recordset() {} | ||||
| }; | ||||
| 
 | ||||
| @ -62,9 +77,11 @@ protected: | ||||
|   virtual bool create();  | ||||
|   virtual void print(); | ||||
|   virtual void main_loop(); | ||||
| 	virtual char last_quadro_report() const { return 'a';} | ||||
| 
 | ||||
| public: | ||||
| 	virtual TQuadro_IVA_recordset * app_recordset(const char* use, const int year) pure; | ||||
| 	virtual void load_sheet(TSheet_field & sf) {} | ||||
|   virtual bool firm_change_enabled() const { return false; } | ||||
| 	TQuadro_IVA_mask * mask() const { return _mask; } | ||||
| 
 | ||||
| @ -73,3 +90,4 @@ public: | ||||
| 	virtual ~TQuadro_IVA_app() {} | ||||
| }; | ||||
| 
 | ||||
| TQuadro_IVA_app & app(); | ||||
							
								
								
									
										
											BIN
										
									
								
								src/cg/cg7500a.pdf
									
									
									
									
									
										Normal file
									
								
							
							
						
						| @ -5,9 +5,9 @@ | ||||
| 
 | ||||
| #include "cg7401.h" | ||||
| #include "cgpim.h" | ||||
| 
 | ||||
| #include "cg7400a.h" | ||||
| #include "rmoviva.h" | ||||
| 
 | ||||
| #include "ivadiff.h" | ||||
| 
 | ||||
| #define	REP_EXPORT			1 | ||||
| #define	REP_INTRA  			2 | ||||
| @ -25,38 +25,18 @@ enum tipo_sospensione { nessuna, normale, vol_affari, liquidazione }; | ||||
| 
 | ||||
| class TQuadro_VE_recordset : public TQuadro_IVA_recordset | ||||
| { | ||||
| 	TQuadro_IVA_mask * _mask; | ||||
| 
 | ||||
| protected: | ||||
| 	const real TQuadro_VE_recordset::evaluate_recordset(const int code, const int year); | ||||
| 	virtual void load(const long year); | ||||
| 	virtual void load(); | ||||
| 
 | ||||
| public: | ||||
| 	TQuadro_VE_recordset(TQuadro_IVA_mask * mask, const char* use, const int year) : TQuadro_IVA_recordset(use, year), _mask(mask) {load(year);} | ||||
| 	TQuadro_VE_recordset(TQuadro_IVA_mask * mask, const char* use, const int year) : TQuadro_IVA_recordset(mask, use, year) { load(); } | ||||
| 	virtual ~TQuadro_VE_recordset() {} | ||||
| }; | ||||
| 
 | ||||
| const real TQuadro_VE_recordset::evaluate_recordset(const int code, const int year) | ||||
| void TQuadro_VE_recordset::load() | ||||
| { | ||||
| 	real	val; | ||||
| 	TProgram_report & rep = _mask->get_report(code - 1); | ||||
| 	TISAM_recordset * set = (TISAM_recordset *) rep.recordset(); | ||||
| 	clear(); | ||||
| 
 | ||||
| 	if (set != NULL) | ||||
| 	{ | ||||
| 		set->set_var("#ANNO", format("%d", year)); | ||||
| 
 | ||||
| 		if (set->items() > 0) | ||||
| 			for (set->move_first(); !set->eof(); set->move_next()) | ||||
| 				val += set->get(RMI_IMPONIBILE).as_real(); | ||||
| 		set->freeze(); | ||||
| 	} | ||||
| 	return val; | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| void TQuadro_VE_recordset::load(const long year) | ||||
| { | ||||
| 	TAssoc_array imponibile_agricolo; | ||||
| 	TAssoc_array imposta_agricola; | ||||
| 	TAssoc_array imponibile; | ||||
| @ -66,31 +46,37 @@ void TQuadro_VE_recordset::load(const long year) | ||||
| 	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_agricolo.add("7.30", TString8("V03.1")); | ||||
| 	imposta_agricola.add("7.30", TString8("VE03.2")); | ||||
| 	imponibile_agricolo.add("7.50", TString8("VE04.1")); | ||||
| 	imposta_agricola.add("7.50", TString8("VE04.2")); | ||||
| 	imponibile_agricolo.add("7.65", TString8("VE05.1")); | ||||
| 	imposta_agricola.add("7.65", TString8("VE05.2")); | ||||
| 	imponibile_agricolo.add("7.95", TString8("VE06.1")); | ||||
| 	imposta_agricola.add("7.65", TString8("VE06.2")); | ||||
| 	imponibile_agricolo.add("8.30", TString8("VE07.1")); | ||||
| 	imposta_agricola.add("8.30", TString8("VE07.2")); | ||||
| 	imponibile_agricolo.add("8,50", TString8("VE08.1")); | ||||
| 	imposta_agricola.add("8,50", TString8("VE08.2")); | ||||
| 	imponibile_agricolo.add("8.80", TString8("VE09.1")); | ||||
| 	imposta_agricola.add("8.80", TString8("VE09.2")); | ||||
| 	imponibile_agricolo.add("10.00", TString8("VE10.1")); | ||||
| 	imposta_agricola.add("10.00", TString8("VE10.2")); | ||||
| 	imponibile_agricolo.add("12.30", TString8("VE11.1")); | ||||
| 	imposta_agricola.add("12.30", TString8("VE11.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")); | ||||
| 	imponibile.add("5.00", TString8("VE21.1")); | ||||
| 	imposta.add("5.00", TString8("VE21.2")); | ||||
| 	imponibile.add("10.00",TString8("VE22.1")); | ||||
| 	imposta.add("10.00",TString8("VE22.2")); | ||||
| 	imponibile.add("22.00", TString8("VE23.1")); | ||||
| 	imposta.add("22.00", TString8("VE23.2")); | ||||
| 	 | ||||
| 	TString80 query("USE PIM\nFROM CODTAB="); | ||||
| 	TString256 query("USE PIM\nFROM CODTAB="); | ||||
| 
 | ||||
| 	query << year << "\nTO CODTAB=" << year; | ||||
| 	query << year() << "\nTO CODTAB=" << year(); | ||||
| 
 | ||||
| 	TISAM_recordset pim(query); | ||||
| 	bool good = false; | ||||
| @ -99,7 +85,7 @@ void TQuadro_VE_recordset::load(const long year) | ||||
| 	{ | ||||
| 		const TString80 codtab = pim.get("CODTAB").as_string(); | ||||
| 
 | ||||
| 		const TString8 codreg(format("%d%-3s",year, (const char*)codtab.mid(10,3))); | ||||
| 		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_int("I0") == 1; | ||||
| @ -107,7 +93,7 @@ void TQuadro_VE_recordset::load(const long year) | ||||
| 
 | ||||
| 		if (vendite && tipo != liquidazione && month == 13) | ||||
| 		{ | ||||
| 			const TRectype& pimr = cache().get("PIM", codtab); | ||||
| 			const TRectype & pimr = pim.cursor()->curr(); | ||||
| 			TString8 codiva(codtab.mid(16,4)); codiva.trim(); | ||||
| 			const TRectype & ivar = cache().get("%IVA", codiva); | ||||
| 			const TString8 aliquota = ivar.get("R0"); | ||||
| @ -247,43 +233,113 @@ void TQuadro_VE_recordset::load(const long year) | ||||
| 
 | ||||
| 	query = "USE LIM\n FROM CODTAB=="; | ||||
| 
 | ||||
| 	query << year << "13\nTO CODTAB==" << year << "13"; | ||||
| 	query << year() << "13\nTO CODTAB==" << year() << "13"; | ||||
| 
 | ||||
| 	TISAM_recordset lim(query); | ||||
| 	good |= lim.items() > 0; | ||||
| 
 | ||||
| 	for (lim.move_first(); !lim.eof(); lim.move_next()) | ||||
| 		add_value("VE24.2", lim.get("R17").as_real()); | ||||
| 	{ | ||||
| 		const real var_cred = lim.get("R17").as_real(); | ||||
| 
 | ||||
| 	real val = evaluate_recordset(REP_EXPORT, year); | ||||
| 		if (var_cred > ZERO) | ||||
| 			add_value("VF25.2", var_cred); | ||||
| 	} | ||||
| 
 | ||||
| 	real val = evaluate_recordset_imponibile(REP_EXPORT, year()); | ||||
| 	 | ||||
| 	add_value("VE30.2", val); | ||||
| 	val = evaluate_recordset(REP_INTRA, year); | ||||
| 	val = evaluate_recordset_imponibile(REP_INTRA, year()); | ||||
| 	add_value("VE30.3", val); | ||||
| 	val = evaluate_recordset(REP_SANMARINO, year); | ||||
| 	val = evaluate_recordset_imponibile(REP_SANMARINO, year()); | ||||
| 	add_value("VE30.4", val); | ||||
| 	val = evaluate_recordset(REP_OPASSIMIL, year); | ||||
| 	val = evaluate_recordset_imponibile(REP_OPASSIMIL, year()); | ||||
| 	add_value("VE30.5", val); | ||||
| 
 | ||||
| // VE37.1 2 iva sospensione 
 | ||||
| 
 | ||||
| 	val = evaluate_recordset(REP_PAART17, year); // liquidazione
 | ||||
| 	val = evaluate_recordset_imponibile(REP_PAART17, year()); // liquidazione
 | ||||
| 	add_value("VE38.1", val); | ||||
| 
 | ||||
| // VE39.1 iva sospensione incassata
 | ||||
| // if (!good)
 | ||||
| //     warning_box(FR("Risultati liquidazione non presenti o da ricalcolare per l'anno %d."), year);
 | ||||
| 	query.zap() << "USE IVADIFF KEY 2 SELECT (BETWEEN(DATAREG,#DAL,#AL))&&(BETWEEN(DATAREGP,0,#AL))" | ||||
|         << "\nFROM ANNOLIQ=" << year(); | ||||
|   | ||||
| 	TISAM_recordset id(query); | ||||
|   long cur_numreg = 0; | ||||
|   int cur_tipoiva = 0; | ||||
| 	int cur_tipodiff = 0; | ||||
| 
 | ||||
| 	id.set_var("#DAL", TDate(1,  1, year())); | ||||
|   id.set_var("#AL", TDate(31, 12, year()));  | ||||
| 
 | ||||
| 
 | ||||
| 	for (bool ok = id.move_first(); ok; ok = id.move_next()) | ||||
|   { | ||||
|     const long numreg = id.get(RMI_NUMREG).as_int(); | ||||
|     if (numreg != cur_numreg) | ||||
|     { | ||||
|       cur_numreg = numreg; | ||||
|       cur_tipoiva = id.get(ID_TIPOIVA).as_int(); | ||||
|       cur_tipodiff = id.get(ID_TIPODIFF).as_int(); | ||||
|     } | ||||
| 
 | ||||
|     const char sezione = id.get(ID_SEZIONE).as_string()[0]; | ||||
|     const int tipomov = id.get(ID_TIPOMOV).as_int(); | ||||
|     const real imp = id.get(RMI_IMPONIBILE).as_real(); | ||||
| 
 | ||||
|     if (!imp.is_zero() && cur_tipoiva == 1)  // Vendite
 | ||||
|     { | ||||
| 			switch (tipomov) | ||||
| 			{ | ||||
| 				case 1: | ||||
| 						add_value("VE37.1", (sezione == 'D') ? imp : -imp); // VE37.1 iva sospensione da incassare
 | ||||
| 						if (cur_tipodiff == 2) | ||||
| 							add_value("VE37.2", (sezione == 'D') ? imp : -imp); // VE37.2 iva per cassa da incassare
 | ||||
| 					break; | ||||
| 				case 2: | ||||
| 						add_value("VE37.1", (sezione == 'A') ? -imp : imp); // VE37.1 2 iva sospensione da incassare
 | ||||
| 						if (cur_tipodiff == 2) | ||||
| 							add_value("VE37.2", (sezione == 'A') ? -imp : imp); // VE37.2 iva per cassa da incassare
 | ||||
| 					break; | ||||
| 				case 3: | ||||
| 						add_value("VE37.1", (sezione == 'A') ? -imp : imp); // VE37.1 2 iva sospensione da incassare
 | ||||
| 						add_value("VE39.1", (sezione == 'A') ? imp : -imp); // VE39.1 iva sospensione incassata
 | ||||
| 						if (cur_tipodiff == 2) | ||||
| 							add_value("VE37.2", (sezione == 'A') ? -imp : imp); // VE37.2 iva per cassa da incassare
 | ||||
| 					break; | ||||
| 				default: | ||||
| 					break; | ||||
| 			} | ||||
|     } | ||||
|   } | ||||
| 
 | ||||
| }  | ||||
| 
 | ||||
| 
 | ||||
| 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(mask(), use, year); } | ||||
| 	virtual void load_sheet(TSheet_field & sf); | ||||
| 
 | ||||
| 	TQuadro_VE_app() : TQuadro_IVA_app("Stampa Quadro VE", "cg7600a") {} | ||||
| 	virtual ~TQuadro_VE_app() {} | ||||
| 
 | ||||
| }; | ||||
| 
 | ||||
| void TQuadro_VE_app::load_sheet(TSheet_field & sf) | ||||
| { | ||||
| 	TToken_string & row1 = sf.row(sf.items()); row1.add("|1|Stampa esportazioni|cg7600b"); | ||||
| 	TToken_string & row2 = sf.row(sf.items()); row2.add("|2|Stampa cessioni intracomunitarie|cg7600c"); | ||||
| 	TToken_string & row3 = sf.row(sf.items()); row3.add("|3|Stampa cessioni verso San Marino|cg7600d"); | ||||
| 	TToken_string & row4 = sf.row(sf.items()); row4.add("|4|Stampa operazioni assimilate|cg7600e"); | ||||
| 	TToken_string & row5 = sf.row(sf.items()); row5.add("|5|Stampa operazioni non imp. in seguito a dich. d'intenti|cg7600f"); | ||||
| 	TToken_string & row6 = sf.row(sf.items()); row6.add("|6|Stampa altre operazioni non imponibili|cg7600g"); | ||||
| 	TToken_string & row7 = sf.row(sf.items()); row7.add("|7|Stampa esenti art. 10|cg7600h"); | ||||
| 	TToken_string & row8 = sf.row(sf.items()); row8.add("|8|Stampa operazioni non sogg. ai sensi art.7 da uno a septies|cg7600i"); | ||||
| 	TToken_string & row9 = sf.row(sf.items()); row9.add("|9|Stampa operazioni reverse charge|cg7600l"); | ||||
| 	TToken_string & row10 = sf.row(sf.items()); row10.add("|10|Stampa operazioni terremotati|cg7600m"); | ||||
| 	TToken_string & row11 = sf.row(sf.items()); row11.add("|11|Stampa operazioni effettuate con PA ai sensi art.17|cg7600n"); | ||||
| } | ||||
| 
 | ||||
| int cg7600(int argc, char* argv[]) | ||||
| { | ||||
|   TQuadro_VE_app a; | ||||
|  | ||||
| Before Width: | Height: | Size: 183 KiB After Width: | Height: | Size: 147 KiB | 
| @ -20,182 +20,189 @@ | ||||
|   <field x="14" y="1" type="Stringa" align="right" width="6" id="100" pattern="1" text=" "> | ||||
|    <font face="Courier New" bold="1" size="10" /> | ||||
|   </field> | ||||
|   <field x="51" y="12.25" type="Numero" align="right" width="11" id="101" pattern="1" text="###.###.###"> | ||||
|   <field x="51.5" 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> | ||||
|   </field> | ||||
|   <field x="51" y="13.4" type="Numero" align="right" width="11" id="201" pattern="1" text="###.###.###"> | ||||
|   <field x="51.5" 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> | ||||
|    <source>VE2.2</source> | ||||
|   </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 x="51.5" y="14.4" type="Numero" align="right" width="11" id="301" pattern="1" text="###.###.###"> | ||||
|    <source>VE03.1</source> | ||||
|   </field> | ||||
|   <field x="65.5" y="14.4" type="Numero" align="right" width="11" id="302" pattern="1" text="###.###.###"> | ||||
|    <source>VE03.2</source> | ||||
|   </field> | ||||
|   <field x="51" y="15.4" type="Numero" align="right" width="11" id="401" pattern="1" text="###.###.###"> | ||||
|   <field x="51.5" 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> | ||||
|   </field> | ||||
|   <field x="51" y="16.5" type="Numero" align="right" width="11" id="501" pattern="1" text="###.###.###"> | ||||
|   <field x="51.5" 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> | ||||
|   </field> | ||||
|   <field x="51" y="17.5" type="Numero" align="right" width="11" id="601" pattern="1" text="###.###.###"> | ||||
|   <field x="51.5" 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> | ||||
|   </field> | ||||
|   <field x="51" y="18.5" type="Numero" align="right" width="11" id="701" pattern="1" text="###.###.###"> | ||||
|   <field x="51.5" 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> | ||||
|   </field> | ||||
|   <field x="51" y="19.5" type="Numero" align="right" width="11" id="801" pattern="1" text="###.###.###"> | ||||
|   <field x="51.5" 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> | ||||
|   </field> | ||||
|   <field x="51" y="20.5" type="Numero" align="right" width="11" id="901" pattern="1" text="###.###.###"> | ||||
|   <field x="51.5" 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> | ||||
|   </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 x="51.5" y="21.5" type="Numero" align="right" width="11" id="1001" pattern="1" text="###.###.###"> | ||||
|    <source>VE10.1</source> | ||||
|   </field> | ||||
|   <field x="65.5" y="22.5" type="Numero" align="right" width="11" id="2002" pattern="1" text="###.###.###"> | ||||
|   <field x="65.5" y="21.5" type="Numero" align="right" width="11" id="1002" pattern="1" text="###.###.###"> | ||||
|    <source>VE10.2</source> | ||||
|   </field> | ||||
|   <field x="51.5" y="22.5" type="Numero" align="right" width="11" id="1101" pattern="1" text="###.###.###"> | ||||
|    <source>VE11.1</source> | ||||
|   </field> | ||||
|   <field x="65.5" y="22.5" type="Numero" align="right" width="11" id="1102" pattern="1" text="###.###.###"> | ||||
|    <source>VE11.2</source> | ||||
|   </field> | ||||
|   <field x="51.5" y="24.5" type="Numero" align="right" width="11" id="2001" pattern="1" text="###.###.###"> | ||||
|    <source>VE20.1</source> | ||||
|   </field> | ||||
|   <field x="65.5" y="24.5" type="Numero" align="right" width="11" id="2002" pattern="1" text="###.###.###"> | ||||
|    <source>VE20.2</source> | ||||
|   </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="###.###.###"> | ||||
|   <field x="51.5" y="25.65" type="Numero" align="right" width="11" id="2101" pattern="1" text="###.###.###"> | ||||
|    <source>VE21.1</source> | ||||
|   </field> | ||||
|   <field x="51" y="24.6" type="Numero" align="right" width="11" id="2201" pattern="1" text="###.###.###"> | ||||
|   <field x="65.5" y="25.65" type="Numero" align="right" width="11" id="2102" pattern="1" text="###.###.###"> | ||||
|    <source>VE21.2</source> | ||||
|   </field> | ||||
|   <field x="51.5" y="26.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="###.###.###"> | ||||
|   <field x="65.5" y="26.6" type="Numero" align="right" width="11" id="2202" pattern="1" text="###.###.###"> | ||||
|    <source>VE22.2</source> | ||||
|    <prescript description="B1.2202 PRESCRIPT">MESSAGE ADD,#B1.2402</prescript> | ||||
|   </field> | ||||
|   <field x="51" y="25.75" type="Numero" align="right" width="11" id="2301" pattern="1" text="###.###.###"> | ||||
|    <source>#101+#201+#301+#401+#501+#601+#701+#801+#901+#2001+#2101+#2201</source> | ||||
|   <field x="51.5" y="27.5" type="Numero" align="right" width="11" id="2301" pattern="1" text="###.###.###"> | ||||
|    <source>VE23.1</source> | ||||
|   </field> | ||||
|   <field x="65.5" y="25.75" type="Numero" align="right" width="11" id="2302" pattern="1" text="###.###.###"> | ||||
|    <source>#102+#202+#302+#402+#502+#602+#702+#802+#902+#2002+#2102+#2202+#2302</source> | ||||
|   <field x="65.5" y="27.5" type="Numero" align="right" width="11" id="2302" pattern="1" text="###.###.###"> | ||||
|    <source>VE23.2</source> | ||||
|   </field> | ||||
|   <field x="65.5" y="26.75" type="Numero" align="right" width="11" id="2402" pattern="1" text="###.###.###"> | ||||
|    <source>VE24.2</source> | ||||
|   <field x="51.5" y="28.75" type="Numero" align="right" width="11" id="2401" pattern="1" text="###.###.###"> | ||||
|    <source>#101+#201+#301+#401+#501+#601+#701+#801+#901+#1001+#1101+#2001+#2101+#2201+#2301</source> | ||||
|   </field> | ||||
|   <field x="65.5" y="27.75" type="Numero" align="right" width="11" id="2502" pattern="1" text="###.###.###"> | ||||
|    <source>#2302+#2402</source> | ||||
|   <field x="65.5" y="28.75" type="Numero" align="right" width="11" id="2402" pattern="1" text="###.###.###"> | ||||
|    <source>#102+#202+#302+#402+#502+#602+#702+#802+#902+#1002+#1102+#2002+#2102+#2202+#2302</source> | ||||
|   </field> | ||||
|   <field x="19" y="30.75" type="Numero" align="right" width="11" id="3002" pattern="1" text="###.###.###"> | ||||
|   <field x="65.5" y="29.75" type="Numero" align="right" width="11" id="2502" pattern="1" text="###.###.###"> | ||||
|    <source>VE25.2</source> | ||||
|   </field> | ||||
|   <field x="65.5" y="30.7" type="Numero" align="right" width="11" id="2602" pattern="1" text="###.###.###"> | ||||
|    <source>#2402+#2502</source> | ||||
|   </field> | ||||
|   <field x="19" y="34" type="Numero" align="right" width="11" id="3002" pattern="1" text="###.###.###"> | ||||
|    <source>VE30.2</source> | ||||
|   </field> | ||||
|   <field x="37" y="30.75" type="Numero" align="right" width="11" id="3003" pattern="1" text="###.###.###"> | ||||
|   <field x="37" y="34" type="Numero" align="right" width="11" id="3003" pattern="1" text="###.###.###"> | ||||
|    <source>VE30.3</source> | ||||
|   </field> | ||||
|   <field x="19" y="32.75" type="Numero" align="right" width="11" id="3004" pattern="1" text="###.###.###"> | ||||
|   <field x="19" y="36" type="Numero" align="right" width="11" id="3004" pattern="1" text="###.###.###"> | ||||
|    <source>VE30.4</source> | ||||
|   </field> | ||||
|   <field x="37" y="32.75" type="Numero" align="right" width="11" id="3005" pattern="1" text="###.###.###"> | ||||
|   <field x="37" y="36" type="Numero" align="right" width="11" id="3005" pattern="1" text="###.###.###"> | ||||
|    <source>VE30.5</source> | ||||
|   </field> | ||||
|   <field x="51" y="28.75" type="Numero" align="right" width="11" id="3010" pattern="1" text="###.###.###"> | ||||
|   <field x="51.5" y="31.75" type="Numero" align="right" width="11" id="3010" pattern="1" text="###.###.###"> | ||||
|    <source>#3002+#3003+#3004+#3005</source> | ||||
|    <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="###.###.###"> | ||||
|   <field x="51" y="36.75" 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="###.###.###"> | ||||
|   <field x="51" y="37.75" 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="###.###.###"> | ||||
|   <field x="51" y="38.7" 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="###.###.###"> | ||||
|   <field x="51" y="39.7" 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="###.###.###"> | ||||
|   <field x="19" y="43" type="Numero" align="right" width="11" id="3502" pattern="1" text="###.###.###"> | ||||
|    <source>VE35.2</source> | ||||
|   </field> | ||||
|   <field x="37" y="40" type="Numero" align="right" width="11" id="3503" pattern="1" text="###.###.###"> | ||||
|   <field x="37" y="43" type="Numero" align="right" width="11" id="3503" pattern="1" text="###.###.###"> | ||||
|    <source>VE35.3</source> | ||||
|   </field> | ||||
|   <field x="19" y="42.1" type="Numero" align="right" width="11" id="3504" pattern="1" text="###.###.###"> | ||||
|   <field x="19" y="45.1" type="Numero" align="right" width="11" id="3504" pattern="1" text="###.###.###"> | ||||
|    <source>V35.4</source> | ||||
|   </field> | ||||
|   <field x="37" y="42.1" type="Numero" align="right" width="11" id="3505" pattern="1" text="###.###.###"> | ||||
|   <field x="37" y="45.1" type="Numero" align="right" width="11" id="3505" pattern="1" text="###.###.###"> | ||||
|    <source>VE35.5</source> | ||||
|   </field> | ||||
|   <field x="19" y="44.15" type="Numero" align="right" width="11" id="3506" pattern="1" text="###.###.###"> | ||||
|   <field x="19" y="47.15" type="Numero" align="right" width="11" id="3506" pattern="1" text="###.###.###"> | ||||
|    <source>V35.6</source> | ||||
|   </field> | ||||
|   <field x="37" y="44.15" type="Numero" align="right" width="11" id="3507" pattern="1" text="###.###.###"> | ||||
|   <field x="37" y="47.15" type="Numero" align="right" width="11" id="3507" pattern="1" text="###.###.###"> | ||||
|    <source>VE35.7</source> | ||||
|   </field> | ||||
|   <field x="19" y="46.15" type="Numero" align="right" width="11" id="3508" pattern="1" text="###.###.###"> | ||||
|   <field x="19" y="49.15" type="Numero" align="right" width="11" id="3508" pattern="1" text="###.###.###"> | ||||
|    <source>V35.8</source> | ||||
|   </field> | ||||
|   <field x="37" y="46.15" type="Numero" align="right" width="11" id="3509" pattern="1" text="###.###.###"> | ||||
|   <field x="37" y="49.15" type="Numero" align="right" width="11" id="3509" pattern="1" text="###.###.###"> | ||||
|    <source>VE35.9</source> | ||||
|   </field> | ||||
|   <field x="51" y="38" type="Numero" align="right" width="11" id="3510" pattern="1" text="###.###.###"> | ||||
|   <field x="51" y="40.75" type="Numero" align="right" width="11" id="3510" pattern="1" text="###.###.###"> | ||||
|    <source>#3502+#3503+#3504+#3505+#3506+#3507+#3508+#3509</source> | ||||
|    <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="###.###.###"> | ||||
|   <field x="51" y="50.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="###.###.###"> | ||||
|   <field x="51" y="51.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="###.###.###"> | ||||
|   <field x="37" y="53.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="###.###.###"> | ||||
|   <field x="51" y="54.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="###.###.###"> | ||||
|   <field x="51" y="55.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="###.###.###"> | ||||
|   <field x="51" y="56.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="###.###.###"> | ||||
|    <source>#2301+#3010+#3101+#3201+#3301+#3401+#3510+#3601+#3701+#3801-#3901-#4001</source> | ||||
|   <field x="51" y="57.5" type="Numero" align="right" width="11" id="5001" pattern="1" text="###.###.###"> | ||||
|    <source>#2401+#3010+#3101+#3201+#3301+#3401+#3510+#3601+#3701+#3801-#3901-#4001</source> | ||||
|    <postscript description="B1.5001 POSTSCRIPT">MESSAGE ADD,#B1.2301</postscript> | ||||
|   </field> | ||||
|  </section> | ||||
|  | ||||
							
								
								
									
										476
									
								
								src/cg/cg7700.cpp
									
									
									
									
									
										Normal file
									
								
							
							
						
						| @ -0,0 +1,476 @@ | ||||
| // Programma per la stampa del quadro VF
 | ||||
| #include <recarray.h> | ||||
| #include <tabutil.h> | ||||
| #include <utility.h> | ||||
| 
 | ||||
| #include "cg7401.h" | ||||
| #include "cgpim.h" | ||||
| 
 | ||||
| #include "cg7400a.h" | ||||
| #include <attiv.h> | ||||
| #include "ivadiff.h" | ||||
| 
 | ||||
| #define	REP_V12_V16				1 | ||||
| #define	REP_IMPORTAZIONI	2 | ||||
| #define	REP_INTRA					3 | ||||
| #define	REP_SANMARINO			4 | ||||
| #define	REP_RIPACQ				5 | ||||
| 
 | ||||
| enum tipo_sospensione { nessuna, normale, vol_affari, liquidazione }; | ||||
| 
 | ||||
| class TQuadro_VF_recordset : public TQuadro_IVA_recordset | ||||
| { | ||||
| 	TQuadro_IVA_mask * _mask; | ||||
| 
 | ||||
| protected: | ||||
| 	virtual void load(); | ||||
| 
 | ||||
| public: | ||||
| 	TQuadro_VF_recordset(TQuadro_IVA_mask * mask, const char* use, const int year) : TQuadro_IVA_recordset(mask, use, year) { load(); } | ||||
| 	virtual ~TQuadro_VF_recordset() {} | ||||
| }; | ||||
| 
 | ||||
| void TQuadro_VF_recordset::load() | ||||
| { | ||||
| 	clear(); | ||||
| 
 | ||||
| 	TAssoc_array imponibile; | ||||
| 	TAssoc_array imposta; | ||||
| 	TAssoc_array imponibile_agricolo; | ||||
| 	TAssoc_array imposta_agricola; | ||||
| 
 | ||||
| 	imponibile.add("2.00", TString8("VF01.1")); | ||||
| 	imposta.add("2.00", TString8("VF01.2")); | ||||
| 	imponibile.add("4.00", TString8("VF02.2")); | ||||
| 	imposta.add("4.00", TString8("VF02.2")); | ||||
| 	imponibile.add("5.00", TString8("VF03.1")); | ||||
| 	imposta.add("5.00", TString8("VF03.2")); | ||||
| 	imponibile.add("7.00", TString8("VF03.1")); | ||||
| 	imposta.add("7.00", TString8("VF03.2")); | ||||
| 	imponibile.add("7.30", TString8("VF04.1")); | ||||
| 	imposta.add("7.30", TString8("VF04.2")); | ||||
| 	imponibile.add("7.50", TString8("VF05.1")); | ||||
| 	imposta.add("7.50", TString8("VF05.2")); | ||||
| 	imponibile.add("7.65", TString8("VF06.1")); | ||||
| 	imposta.add("7.65", TString8("VF06.2")); | ||||
| 	imponibile.add("7.95", TString8("VF07.1")); | ||||
| 	imposta.add("7.95", TString8("VF07.2")); | ||||
| 	imponibile.add("8.30", TString8("VF08.1")); | ||||
| 	imposta.add("8.30", TString8("VF08.2")); | ||||
| 	imponibile.add("8,50", TString8("VF09.1")); | ||||
| 	imposta.add("8,50", TString8("VF09.2")); | ||||
| 	imponibile.add("8.80", TString8("VF09.1")); | ||||
| 	imposta.add("8.80", TString8("VF09.2")); | ||||
| 	imponibile.add("10.00",TString8("VF10.1")); | ||||
| 	imposta.add("10.00",TString8("VF10.2")); | ||||
| 	imponibile.add("12.30", TString8("VF12.1")); | ||||
| 	imposta.add("12.30", TString8("VF12.2")); | ||||
| 	imponibile.add("22.00", TString8("VF13.1")); | ||||
| 	imposta.add("22.00", TString8("VF13.2")); | ||||
| 	// VF30.1-8 METODO UTILIZZATO PER LA DETERMINAZIONE DELL’IVA AMMESSA IN DETRAZIONE
 | ||||
| 	TString query; query << "USE ATTIV\nFROM CODDITTA=#F\nTO CODDITTA=#F"; | ||||
|   | ||||
| 	TISAM_recordset at(query); | ||||
| 	bool agenziaviaggio = false; | ||||
| 	bool minori = false; | ||||
| 	bool agricolo_misto = false; | ||||
| 	bool agricolo = false; | ||||
| 	bool prorata = false; | ||||
| 	bool prorataprev = false; | ||||
| 	bool prorata100 = false; | ||||
| 
 | ||||
| 	at.set_var("#F", prefix().get_codditta()); | ||||
| 
 | ||||
| 	for (bool ok = at.move_first(); ok; ok = at.move_next()) | ||||
| 	{ | ||||
| 		agenziaviaggio |= at.get(ATT_REG74TER).as_bool(); | ||||
| 		minori |= at.get(ATT_ART74_4).as_bool(); | ||||
| 		if (!agricolo_misto) | ||||
| 		{ | ||||
| 			if (!agricolo) | ||||
| 				agricolo |= at.get(ATT_REGAGR).as_bool(); | ||||
| 			else | ||||
| 				if (at.get(ATT_REGAGR).as_bool()) | ||||
| 				{ | ||||
| 					agricolo = false; | ||||
| 					agricolo_misto = true; | ||||
| 				} | ||||
| 		} | ||||
| 
 | ||||
| 		const TString16 codatt = at.get(ATT_CODATT).as_string(); | ||||
| 		const int tipoatt = at.get(ATT_TIPOATT).as_int(); | ||||
| 
 | ||||
| 		for (int t = 1; t < 3; t++) | ||||
| 		{ | ||||
| 			const TString16 key = format("%4d%5s%1d13", year(), (const char *)codatt, t); | ||||
| 			const TRectype & plm = cache().get("PLM", key); | ||||
| 			   | ||||
| 			if (plm.full()) | ||||
| 			{ | ||||
| 				prorataprev |= plm.get_real("R2") > CINQUANTA; | ||||
| 				prorata |= plm.get_real("R2") > ZERO; | ||||
| 				prorata100 &= plm.get_real("R2") >= CENTO; | ||||
| 			} | ||||
| 		} | ||||
| 	} | ||||
| 
 | ||||
| 	set_bool("VF30.1", agenziaviaggio); | ||||
| 	set_bool("VF30.2"); | ||||
| 	set_bool("VF30.3", prorataprev); | ||||
| 	set_bool("VF30.4"); | ||||
| 	set_bool("VF30.5"); | ||||
| 	set_bool("VF30.6", minori); | ||||
| 	set_bool("VF30.7", agricolo_misto); | ||||
| 	set_bool("VF30.8", agricolo); | ||||
| 	 | ||||
| 	imponibile_agricolo.add("2.00", TString8("V39.1")); | ||||
| 	imposta_agricola.add("2.00", TString8("VF39.2")); | ||||
| 	imponibile_agricolo.add("4.00", TString8("VF40.2")); | ||||
| 	imposta_agricola.add("4.00", TString8("VF40.2")); | ||||
| 	imponibile_agricolo.add("7.30", TString8("VF41.1")); | ||||
| 	imposta_agricola.add("7.30", TString8("VF41.2")); | ||||
| 	imponibile_agricolo.add("7.50", TString8("VF42.1")); | ||||
| 	imposta_agricola.add("7.50", TString8("VF42.2")); | ||||
| 	imponibile_agricolo.add("7.65", TString8("VF43.1")); | ||||
| 	imposta_agricola.add("7.65", TString8("VF43.2")); | ||||
| 	imponibile_agricolo.add("7.95", TString8("VF44.1")); | ||||
| 	imposta_agricola.add("7.95", TString8("VF44.2")); | ||||
| 	imponibile_agricolo.add("8.30", TString8("VF45.1")); | ||||
| 	imposta_agricola.add("8.30", TString8("VF45.2")); | ||||
| 	imponibile_agricolo.add("8,50", TString8("VF46.1")); | ||||
| 	imposta_agricola.add("8,50", TString8("VF46.2")); | ||||
| 	imponibile_agricolo.add("8.80", TString8("VF47.1")); | ||||
| 	imposta_agricola.add("8.80", TString8("VF47.2")); | ||||
| 	imponibile_agricolo.add("10.00",TString8("VF48.1")); | ||||
| 	imposta_agricola.add("10.00",TString8("VF48.2")); | ||||
| 	imponibile_agricolo.add("12.30", TString8("VF49.1")); | ||||
| 	imposta_agricola.add("12.30", TString8("VF49.2")); | ||||
| 	 | ||||
| 	query = "USE PIM\nFROM CODTAB="; | ||||
| 	query << year() << "\nTO CODTAB=" << year(); | ||||
| 
 | ||||
| 	TISAM_recordset pim(query); | ||||
| 	bool good = false; | ||||
| 
 | ||||
| 	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 acquisti = reg.get_int("I0") == 2; | ||||
| 		const int month = atoi(codtab.mid(13,2)); | ||||
| 
 | ||||
| 		if (acquisti && tipo != liquidazione && month == 13) | ||||
| 		{ | ||||
| 			const TRectype & pimr = pim.cursor()->curr(); | ||||
| 			TString8 codiva(codtab.mid(16,4)); codiva.trim(); | ||||
| 			const TRectype & ivar = cache().get("%IVA", codiva); | ||||
| 			const TString8 aliquota = ivar.get("R0"); | ||||
| 			const int tipocr  = atoi(codtab.mid(15,1));     // tipo costo_ricavo
 | ||||
|   		tiporec tipo; | ||||
| 			real imp; | ||||
| 			real iva; | ||||
| 	 | ||||
| 			if (classify_pim(pimr, imp, iva, tipo, true)) | ||||
| 			{ | ||||
| 				good = true; | ||||
| 				switch (tipo) | ||||
| 				{ | ||||
| 					case acq_norm:   // acquisti normali
 | ||||
| 						if (prorata100) | ||||
| 						{ | ||||
| 							if (aliquota.full()) | ||||
| 								add_value("VF20.1", imp); | ||||
| 						}				 | ||||
| 						else | ||||
| 						{ | ||||
| 							if (aliquota.full()) | ||||
| 							{ | ||||
| 								const bool agricolo = ivar.get_int("I4") != 0; | ||||
| 
 | ||||
| 								if (agricolo) | ||||
| 								{ | ||||
| 									const TString * field = (TString *) imponibile_agricolo.objptr(aliquota); | ||||
| 
 | ||||
| 									if (field != NULL) add_value(*field, imp);	// VF39.1 VF48.1 Imprese agricole impobnibil e imposte
 | ||||
| 									field = (TString *) imposta_agricola.objptr(aliquota); | ||||
| 									if (field != NULL) add_value(*field, iva); 	// VF39.2 VF48.2 Imprese agricole impobnibil e imposte
 | ||||
| 
 | ||||
| 								} | ||||
| 								else | ||||
| 								{ | ||||
| 									add_value("VF38.1", imp);	// VF38.1 2 Riservato alle imprese agricole miste - Totale operazioni imponibili diverse
 | ||||
| 									add_value("VF38.2", iva); | ||||
| 								} | ||||
| 								const TString * field = (TString *) imponibile.objptr(aliquota); | ||||
| 
 | ||||
| 								if (field != NULL) add_value(*field, imp); | ||||
| 								field = (TString *) imposta.objptr(aliquota); | ||||
| 								if (field != NULL) add_value(*field, iva); | ||||
| 								if (prorataprev) | ||||
| 								{ | ||||
| 									add_value("VF31.1", imp); 	// VF31.1 Acquisti destinati alle operazioni imponibili occasionali
 | ||||
| 									add_value("VF31.2", iva); 	// VF31.1 Acquisti destinati alle operazioni imponibili occasionali
 | ||||
| 								} | ||||
| 							} | ||||
| 						} | ||||
| 						break; | ||||
| 					case vend_norm:   // Vendite normali
 | ||||
| 					case corr_norm: | ||||
| 						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 riVFndita
 | ||||
| 						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
 | ||||
| 						break; | ||||
|           case acq_ind_art_19:  // indetr. art. 19
 | ||||
| 						add_value("VF19.1", imp); | ||||
| 						break; | ||||
|           case cess_amm:  // cessioni amministrative
 | ||||
|           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
 | ||||
| 						add_value("VF20.1", imp); // *** verificare !!!!!
 | ||||
| 						break; | ||||
| 					default: | ||||
| 						break; | ||||
| 
 | ||||
|         }; | ||||
| 			} | ||||
| 			else | ||||
| 			{ | ||||
| 				const TString4 tipo_aliquota = ivar.get("S1"); | ||||
| 				const TString4 tipo_iva11_acq = ivar.get("S9"); | ||||
| 				const int int_tipo_iva11_acq = atoi(tipo_iva11_acq); | ||||
| 				const bool non_imponibile = (tipo_aliquota == "NI"); | ||||
| 				const bool esente = (tipo_aliquota == "ES"); | ||||
| 				const bool non_soggetto = (tipo_aliquota == "NS"); | ||||
| 				const bool terremotati = int_tipo_iva11_acq == 16; | ||||
| 				 | ||||
| 				if (non_imponibile) | ||||
| 				{ | ||||
| 					if (int_tipo_iva11_acq == 12) | ||||
| 					{ | ||||
| 						add_value("VF14.1", imp); | ||||
| 						add_value("VF35.2", iva); 	// VF35.1 IVA non assolta sugli acquisti e importazioni indicati al rigo VF14
 | ||||
| 					} | ||||
| 					else | ||||
| 						if (int_tipo_iva11_acq == 13) | ||||
| 							add_value("VF15.1", imp); | ||||
| 				} | ||||
| 				if (esente) | ||||
| 					if (int_tipo_iva11_acq == 14) | ||||
| 						add_value("VF16.1", imp); | ||||
| 				if (non_soggetto) | ||||
| 				{ | ||||
| 					if (tipo_iva11_acq == "15A" || int_tipo_iva11_acq == 15) | ||||
| 					{ | ||||
| 						if (tipo_iva11_acq == "15A") | ||||
| 							add_value("VF17.2", imp); | ||||
| 						add_value("VF17.1", imp); | ||||
| 					} | ||||
| 				} | ||||
| 				if (terremotati) | ||||
| 					add_value("VF18.1", imp); | ||||
| 
 | ||||
| 			}  | ||||
| 
 | ||||
| 			switch (tipocr) | ||||
| 			{ | ||||
| 			case 0: | ||||
| 				add_value("VF27.4", imp); | ||||
| 				break; | ||||
| 			case 1: | ||||
| 				add_value("VF27.3", imp); | ||||
| 				break; | ||||
| 			case 2: | ||||
| 				add_value("VF27.1", imp); | ||||
| 				break; | ||||
| 			case 3: | ||||
| 				add_value("VF27.4", imp); | ||||
| 				break; | ||||
| 			case 5: | ||||
| 				add_value("VF27.4", imp); | ||||
| 				break; | ||||
| 			case 8: | ||||
| 				add_value("VF27.2", imp); | ||||
| 				break; | ||||
| 			case 9: | ||||
| 				add_value("VF27.4", imp); | ||||
| 				break; | ||||
| 			case 17: | ||||
| 				add_value("VF27.4", imp); | ||||
| 				break; | ||||
| 			default: | ||||
| 				break; | ||||
| 			} | ||||
| 		} | ||||
| 	} | ||||
| 
 | ||||
| 	real val; | ||||
| 	real val1; | ||||
| 	real val2; | ||||
| 
 | ||||
| 	query.zap() << "USE IVADIFF KEY 2 SELECT (BETWEEN(DATAREG,#DAL,#AL))&&(BETWEEN(DATAREGP,0,#AL))" | ||||
|         << "\nFROM ANNOLIQ=" << year(); | ||||
|   | ||||
| 	TISAM_recordset id(query); | ||||
|   long cur_numreg = 0; | ||||
|   int cur_tipoiva = 0; | ||||
| 	int cur_tipodiff = 0; | ||||
| 
 | ||||
| 	id.set_var("#DAL", TDate(1,  1, year())); | ||||
|   id.set_var("#AL", TDate(31, 12, year()));  | ||||
| 
 | ||||
| 	for (bool ok = id.move_first(); ok; ok = id.move_next()) | ||||
|   { | ||||
|     const long numreg = id.get(RMI_NUMREG).as_int(); | ||||
|     if (numreg != cur_numreg) | ||||
|     { | ||||
|       cur_numreg = numreg; | ||||
|       cur_tipoiva = id.get(ID_TIPOIVA).as_int(); | ||||
|       cur_tipodiff = id.get(ID_TIPODIFF).as_int(); | ||||
|     } | ||||
|      | ||||
| 		const char sezione = id.get(ID_SEZIONE).as_string()[0]; | ||||
|     const int tipomov = id.get(ID_TIPOMOV).as_int(); | ||||
|     const real imp = id.get(RMI_IMPONIBILE).as_real(); | ||||
| 
 | ||||
| 		if (!imp.is_zero() && cur_tipoiva == 2) // Acquisti
 | ||||
|     { | ||||
| 			switch (tipomov) | ||||
| 			{ | ||||
| 				case 1: | ||||
| 						add_value("VF21.1", (sezione == 'A') ? imp : -imp);		// VF21.1 iva sospensione da pagare
 | ||||
| 						if (cur_tipodiff == 2) | ||||
| 							add_value("VF21.2", (sezione == 'A') ? imp : -imp);		// VF21.2 iva per cassa da pagare
 | ||||
| 					break; | ||||
| 				case 2: | ||||
| 						add_value("VF21.1", (sezione == 'D') ? -imp : imp);		// VF21.1 iva sospensione da pagare
 | ||||
| 						if (cur_tipodiff == 2) | ||||
| 							add_value("VF21.2", (sezione == 'D') ? -imp : imp);		// VF21.2 iva per cassa da pagare
 | ||||
| 					break; | ||||
| 				case 3: | ||||
| 						add_value("VF21.1", (sezione == 'D') ? -imp : imp);		// VF21.1 iva sospensione da pagare
 | ||||
| 						add_value("VF22.1", (sezione == 'D') ? imp : -imp);		// VF22.1 iva sospensione pagata
 | ||||
| 						if (cur_tipodiff == 2) | ||||
| 							add_value("VF21.2", (sezione == 'D') ? imp : -imp);		// VF21.2 iva per cassa da pagare
 | ||||
| 					break; | ||||
| 				default: | ||||
| 					break; | ||||
| 			} | ||||
|     } | ||||
|   } | ||||
| 	// VF21.1 iva sospensione da pagare
 | ||||
| 	add_value("VF21.1", val); | ||||
| 	// VF22.1 iva per cassa da pagare
 | ||||
| 	add_value("Vf21.2", val); | ||||
| 	// VF22.1 iva sospensione pagata
 | ||||
| 	add_value("VF22.1", val); | ||||
| 
 | ||||
| 	// V24.2 Variazioni e arrotondamenti d’imposta (indicare con il segno +/–)
 | ||||
| 	// V50.2 Variazioni e arrotondamenti d’imposta (indicare con il segno +/–)
 | ||||
| 	// VF70.2  TOTALE rettifiche (indicare con il segno +/–)
 | ||||
| 
 | ||||
| 	query = "USE LIM\n FROM CODTAB=="; | ||||
| 	query << year() << "13\nTO CODTAB==" << year() << "13"; | ||||
| 
 | ||||
| 	TISAM_recordset lim(query); | ||||
| 	good |= lim.items() > 0; | ||||
| 
 | ||||
| 	for (lim.move_first(); !lim.eof(); lim.move_next()) | ||||
| 	{ | ||||
| 		const real var_cred = lim.get("R17").as_real(); | ||||
| 
 | ||||
| 		if (var_cred < ZERO) // ???
 | ||||
| 		{ | ||||
| 			add_value("VF24.2", -var_cred); | ||||
| 			add_value("VF50.2", -var_cred); | ||||
| 		} | ||||
| 		add_value("VF70.2", var_cred); | ||||
| 	} | ||||
| 
 | ||||
| 	val = evaluate_recordset_imponibile(REP_INTRA, year()); // ???
 | ||||
| 	add_value("VF26.1", val); | ||||
| 	val = evaluate_recordset_imposta(REP_INTRA, year()); | ||||
| 	add_value("VF26.2", val); | ||||
| 	val = evaluate_recordset_imponibile(REP_IMPORTAZIONI, year()); | ||||
| 	add_value("VF26.3", val); | ||||
| 	val = evaluate_recordset_imposta(REP_IMPORTAZIONI, year()); | ||||
| 	add_value("VF26.4", val); | ||||
| 	val = evaluate_recordset_imponibile(REP_SANMARINO, year()); | ||||
| 	add_value("VF26.5", val); | ||||
| 	val = evaluate_recordset_imposta(REP_SANMARINO, year()); | ||||
| 	add_value("VF24.6", val); | ||||
| 
 | ||||
| 	// VF32.1 Se per l’anno 2016 sono state effettuate esclusivamente operazioni esenti barrare la casella
 | ||||
| 	set_bool("VF32.1", prorata100); | ||||
| 	// VF33.1 Se per l’anno 2016 ha avuto effetto l’opzione di cui all’art. 36-bis barrare la casella
 | ||||
| 	set_bool("VF33.1"); | ||||
| 	// VF34.1-9 Dati per il calcolo della percentuale di detrazione
 | ||||
| 
 | ||||
| 	// VF36.1 IVA detraibile per gli acquisti relativi all’oro effettuati dai soggetti diversi dai produttori e trasformatori ai sensi dell’art. 19, comma 5 bis
 | ||||
| 	// VF53.2 Importo detraibile per le cessioni, anche intracomunitarie, dei prodotti agricoli di cui all’art.34, primo comma, effettuate ai sensi degli articoli 8, primo comma, 38 quater e 72 ???
 | ||||
| 	// VF60.1 Se le operazioni esenti effettuate sono occasionali ovvero riguardano esclusivamente operazioni di cui ai nn. da 1 a 9 dell’art.10, non rientranti nell’attività propria dell’impresa o accessorie ad operazioni imponibili barrare la casella
 | ||||
| 	set_bool("VF60.1", prorata && !prorataprev); | ||||
| 	// VF60.2 Se le operazioni imponibili effettuate sono occasionali barrare la casella
 | ||||
| 	set_bool("VF60.2", prorataprev); | ||||
| 	// VF61.1 Se sono state effettuate cessioni occasionali di beni usati con l’applicazione del regime del margine (d.l. n. 41/1995) barrare la casella
 | ||||
| 	set_bool("VF61.1"); | ||||
| 	// VF62.1 2  Operazioni occasionali rientranti nel regime previsto dall’art. 34-bis per le attività agricole connesse
 | ||||
| }  | ||||
| 
 | ||||
| class TQuadro_VF_app : public TQuadro_IVA_app | ||||
| { | ||||
| 
 | ||||
| protected: | ||||
| 	virtual char last_quadro_report() const { return 'b';} | ||||
| 
 | ||||
| public: | ||||
| 	virtual TQuadro_IVA_recordset * app_recordset(const char* use, const int year) { return new TQuadro_VF_recordset(mask(), use, year); } | ||||
| 	virtual void load_sheet(TSheet_field & sf); | ||||
| 
 | ||||
| 	TQuadro_VF_app() : TQuadro_IVA_app("Stampa Quadro VF", "cg7700a") {} | ||||
| 	virtual ~TQuadro_VF_app() {} | ||||
| 
 | ||||
| }; | ||||
| 
 | ||||
| void TQuadro_VF_app::load_sheet(TSheet_field & sf) | ||||
| { | ||||
| 		TToken_string & row1 = sf.row(sf.items()); row1.add("|1|Dichiarazione IVA Quadro VF - VF12 - VF16|cg7700c"); | ||||
| 		TToken_string & row2 = sf.row(sf.items()); row2.add("|2|Stampa importazioni|cg7700d"); | ||||
| 		TToken_string & row3 = sf.row(sf.items()); row3.add("|3|Stampa acquisti intracomunitari|cg7700e"); | ||||
| 		TToken_string & row4 = sf.row(sf.items()); row4.add("|4|Stampa cessioni verso San Marino|cg7700f"); | ||||
| 		TToken_string & row5 = sf.row(sf.items()); row5.add("|5|Ripartizione acquisti|cg7700g"); | ||||
| } | ||||
| 
 | ||||
| int cg7700(int argc, char* argv[]) | ||||
| { | ||||
|   TQuadro_VF_app a; | ||||
|   a.run(argc, argv, TR("Quadro VF")); | ||||
|   return 0; | ||||
| } | ||||
| Before Width: | Height: | Size: 41 KiB After Width: | Height: | Size: 133 KiB | 
							
								
								
									
										183
									
								
								src/cg/cg7700a.rep
									
									
									
									
									
										Normal file
									
								
							
							
						
						| @ -0,0 +1,183 @@ | ||||
| <?xml version="1.0" encoding="UTF-8" ?> | ||||
| <report name="cg7700a" lpi="6"> | ||||
|  <description>Stampa quadro VF</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>"cg7700a.png"</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="Anno" /> | ||||
|   <field x="35.75" y="5" type="Stringa" width="48" pattern="1" text=" "> | ||||
|    <font face="Courier New" size="12" /> | ||||
|    <source>#SYSTEM.CFPI_SPACED</source> | ||||
|   </field> | ||||
|   <field x="63.75" y="9" type="Testo" width="4" pattern="1" text="0 1" /> | ||||
|   <field x="14" y="1" type="Stringa" align="right" width="6" id="100" pattern="1" text=" "> | ||||
|    <font face="Courier New" bold="1" size="10" /> | ||||
|   </field> | ||||
|   <field x="51" y="12.25" type="Numero" align="right" width="11" id="101" pattern="1" text="###.###.###"> | ||||
|    <source>VF01.1</source> | ||||
|   </field> | ||||
|   <field x="65.5" y="12.25" type="Numero" align="right" width="11" id="102" pattern="1" text="###.###.###"> | ||||
|    <source>VF01.2</source> | ||||
|   </field> | ||||
|   <field x="51" y="13.4" type="Numero" align="right" width="11" id="201" pattern="1" text="###.###.###"> | ||||
|    <source>VF02.1</source> | ||||
|   </field> | ||||
|   <field x="65.5" y="13.4" type="Numero" align="right" width="11" id="202" pattern="1" text="###.###.###"> | ||||
|    <source>VF01.2</source> | ||||
|   </field> | ||||
|   <field x="51" y="14.4" type="Numero" align="right" width="11" id="301" pattern="1" text="###.###.###"> | ||||
|    <source>V03.1</source> | ||||
|   </field> | ||||
|   <field x="65.5" y="14.4" type="Numero" align="right" width="11" id="302" pattern="1" text="###.###.###"> | ||||
|    <source>VF03.2</source> | ||||
|   </field> | ||||
|   <field x="51" y="15.4" type="Numero" align="right" width="11" id="401" pattern="1" text="###.###.###"> | ||||
|    <source>VF04.1</source> | ||||
|   </field> | ||||
|   <field x="65.5" y="15.4" type="Numero" align="right" width="11" id="402" pattern="1" text="###.###.###"> | ||||
|    <source>VF04.2</source> | ||||
|   </field> | ||||
|   <field x="51" y="16.5" type="Numero" align="right" width="11" id="501" pattern="1" text="###.###.###"> | ||||
|    <source>VF05.1</source> | ||||
|   </field> | ||||
|   <field x="65.5" y="16.5" type="Numero" align="right" width="11" id="502" pattern="1" text="###.###.###"> | ||||
|    <source>VF05.2</source> | ||||
|   </field> | ||||
|   <field x="51" y="17.5" type="Numero" align="right" width="11" id="601" pattern="1" text="###.###.###"> | ||||
|    <source>VF06.1</source> | ||||
|   </field> | ||||
|   <field x="65.5" y="17.5" type="Numero" align="right" width="11" id="602" pattern="1" text="###.###.###"> | ||||
|    <source>VF06.2</source> | ||||
|   </field> | ||||
|   <field x="51" y="18.5" type="Numero" align="right" width="11" id="701" pattern="1" text="###.###.###"> | ||||
|    <source>VF07.1</source> | ||||
|   </field> | ||||
|   <field x="65.5" y="18.5" type="Numero" align="right" width="11" id="702" pattern="1" text="###.###.###"> | ||||
|    <source>VF07.2</source> | ||||
|   </field> | ||||
|   <field x="51" y="19.5" type="Numero" align="right" width="11" id="801" pattern="1" text="###.###.###"> | ||||
|    <source>VF08.1</source> | ||||
|   </field> | ||||
|   <field x="65.5" y="19.5" type="Numero" align="right" width="11" id="802" pattern="1" text="###.###.###"> | ||||
|    <source>VF08.2</source> | ||||
|   </field> | ||||
|   <field x="51" y="20.5" type="Numero" align="right" width="11" id="901" pattern="1" text="###.###.###"> | ||||
|    <source>VF09.1</source> | ||||
|   </field> | ||||
|   <field x="65.5" y="20.5" type="Numero" align="right" width="11" id="902" pattern="1" text="###.###.###"> | ||||
|    <source>VF09.2</source> | ||||
|   </field> | ||||
|   <field x="51" y="21.5" type="Numero" align="right" width="11" id="1001" pattern="1" text="###.###.###"> | ||||
|    <source>VF10.1</source> | ||||
|   </field> | ||||
|   <field x="65.5" y="21.5" type="Numero" align="right" width="11" id="1002" pattern="1" text="###.###.###"> | ||||
|    <source>VF10.2</source> | ||||
|   </field> | ||||
|   <field x="51" y="22.5" type="Numero" align="right" width="11" id="1101" pattern="1" text="###.###.###"> | ||||
|    <source>VF11.1</source> | ||||
|   </field> | ||||
|   <field x="65.5" y="22.5" type="Numero" align="right" width="11" id="1102" pattern="1" text="###.###.###"> | ||||
|    <source>V11.2</source> | ||||
|   </field> | ||||
|   <field x="51" y="23.5" type="Numero" align="right" width="11" id="1201" pattern="1" text="###.###.###"> | ||||
|    <source>VF12.1</source> | ||||
|   </field> | ||||
|   <field x="65.5" y="23.5" type="Numero" align="right" width="11" id="1202" pattern="1" text="###.###.###"> | ||||
|    <source>VF12.2</source> | ||||
|   </field> | ||||
|   <field x="51" y="24.5" type="Numero" align="right" width="11" id="1301" pattern="1" text="###.###.###"> | ||||
|    <source>VF13.1</source> | ||||
|   </field> | ||||
|   <field x="65.5" y="24.5" type="Numero" align="right" width="11" id="1302" pattern="1" text="###.###.###"> | ||||
|    <source>VF13.2</source> | ||||
|   </field> | ||||
|   <field x="51" y="25.75" type="Numero" align="right" width="11" id="1401" pattern="1" text="###.###.###"> | ||||
|    <source>VF14.1</source> | ||||
|   </field> | ||||
|   <field x="51" y="26.75" type="Numero" align="right" width="11" id="1501" pattern="1" text="###.###.###"> | ||||
|    <source>VF15.1</source> | ||||
|   </field> | ||||
|   <field x="51" y="27.75" type="Numero" align="right" width="11" id="1601" pattern="1" text="###.###.###"> | ||||
|    <source>VF16.1</source> | ||||
|   </field> | ||||
|   <field x="51" y="28.75" type="Numero" align="right" width="11" id="1701" pattern="1" text="###.###.###"> | ||||
|    <source>VF17.1</source> | ||||
|   </field> | ||||
|   <field x="33" y="30.75" type="Numero" align="right" width="11" id="1702" pattern="1" text="###.###.###"> | ||||
|    <source>VF17.2</source> | ||||
|   </field> | ||||
|   <field x="51" y="31.75" type="Numero" align="right" width="11" id="1801" pattern="1" text="###.###.###"> | ||||
|    <source>VF18.1</source> | ||||
|   </field> | ||||
|   <field x="51" y="32.75" type="Numero" align="right" width="11" id="1901" pattern="1" text="###.###.###"> | ||||
|    <source>VF19.1</source> | ||||
|   </field> | ||||
|   <field x="51" y="34" type="Numero" align="right" width="11" id="2001" pattern="1" text="###.###.###"> | ||||
|    <source>VF20.1</source> | ||||
|   </field> | ||||
|   <field x="51" y="35" type="Numero" align="right" width="11" id="2101" pattern="1" text="###.###.###"> | ||||
|    <source>VF21.1</source> | ||||
|   </field> | ||||
|   <field x="33" y="37" type="Numero" align="right" width="11" id="2102" pattern="1" text="###.###.###"> | ||||
|    <source>VF21.2</source> | ||||
|   </field> | ||||
|   <field x="51" y="38" type="Numero" align="right" width="11" id="2201" pattern="1" text="###.###.###"> | ||||
|    <source>VF22.1</source> | ||||
|   </field> | ||||
|   <field x="51" y="39" type="Numero" align="right" width="11" id="2301" pattern="1" text="###.###.###"> | ||||
|    <source>#101+#201+#301+#401+#501+#601+#701+#801+#901+#1001+#1101+#1201+#1301+#1401+#1501+#1601+#1701+#1801+#1901+#2001+#2101+#2201</source> | ||||
|   </field> | ||||
|   <field x="65" y="39" type="Numero" align="right" width="11" id="2302" pattern="1" text="###.###.###"> | ||||
|    <source>#102+#202+#302+#402+#502+#602+#702+#802+#902+#1002+#1102+#1202+#1302</source> | ||||
|   </field> | ||||
|   <field x="65" y="40" type="Numero" align="right" width="11" id="2402" pattern="1" text="###.###.###"> | ||||
|    <source>VF24.2</source> | ||||
|   </field> | ||||
|   <field x="65" y="41" type="Numero" align="right" width="11" id="2502" pattern="1" text="###.###.###"> | ||||
|    <source>VF25</source> | ||||
|   </field> | ||||
|   <field x="41.5" y="43" type="Numero" align="right" width="11" id="2601" pattern="1" text="###.###.###"> | ||||
|    <source>VF26.1</source> | ||||
|   </field> | ||||
|   <field x="65.5" y="43" type="Numero" align="right" width="11" id="2602" pattern="1" text="###.###.###"> | ||||
|    <source>VF26.2</source> | ||||
|   </field> | ||||
|   <field x="41.5" y="45" type="Numero" align="right" width="11" id="2603" pattern="1" text="###.###.###"> | ||||
|    <source>VF26.3</source> | ||||
|   </field> | ||||
|   <field x="65.5" y="45" type="Numero" align="right" width="11" id="2604" pattern="1" text="###.###.###"> | ||||
|    <source>VF26.4</source> | ||||
|   </field> | ||||
|   <field x="41.5" y="47.25" type="Numero" align="right" width="11" id="2605" pattern="1" text="###.###.###"> | ||||
|    <source>VF26.5</source> | ||||
|   </field> | ||||
|   <field x="65.5" y="47" type="Numero" align="right" width="11" id="2606" pattern="1" text="###.###.###"> | ||||
|    <source>VF26.6</source> | ||||
|   </field> | ||||
|   <field x="20" y="50.25" type="Numero" align="right" width="11" id="2701" pattern="1" text="###.###.###"> | ||||
|    <source>VF27.1</source> | ||||
|   </field> | ||||
|   <field x="35.5" y="50.25" type="Numero" align="right" width="11" id="2702" pattern="1" text="###.###.###"> | ||||
|    <source>VF27.2</source> | ||||
|   </field> | ||||
|   <field x="50.5" y="50.25" type="Numero" align="right" width="11" id="2703" pattern="1" text="###.###.###"> | ||||
|    <source>VF27.3</source> | ||||
|   </field> | ||||
|   <field x="65.5" y="50.25" type="Numero" align="right" width="11" id="2704" pattern="1" text="###.###.###"> | ||||
|    <source>VF27.4</source> | ||||
|   </field> | ||||
|  </section> | ||||
|  <section type="Foot" pattern="1" /> | ||||
|  <section type="Foot" level="1" pattern="1" /> | ||||
|  <sql>USE NDITTE SELECT CODDITTA==#CODDITTA</sql> | ||||
|  <parameters> | ||||
|   <item name="ANNO"> </item> | ||||
|  </parameters> | ||||
| </report> | ||||
							
								
								
									
										
											BIN
										
									
								
								src/cg/cg7700b.pdf
									
									
									
									
									
										Normal file
									
								
							
							
						
						| Before Width: | Height: | Size: 46 KiB After Width: | Height: | Size: 144 KiB | 
							
								
								
									
										218
									
								
								src/cg/cg7700b.rep
									
									
									
									
									
										Normal file
									
								
							
							
						
						| @ -0,0 +1,218 @@ | ||||
| <?xml version="1.0" encoding="UTF-8" ?> | ||||
| <report name="cg7700b" lpi="6"> | ||||
|  <description>Stampa quadro VF</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>"cg7700b.png"</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="Anno" /> | ||||
|   <field x="47" y="2" type="Stringa" width="36" pattern="1" text=" "> | ||||
|    <font face="Courier New" size="12" /> | ||||
|    <source>#SYSTEM.CFPI_SPACED</source> | ||||
|   </field> | ||||
|   <field x="14" y="1" type="Stringa" align="right" width="6" id="100" pattern="1" text=" "> | ||||
|    <font face="Courier New" bold="1" size="10" /> | ||||
|   </field> | ||||
|   <field x="41" y="5.25" type="Booleano" align="center" width="2" id="3001" pattern="1" text="###.###.###"> | ||||
|    <source>VF30.1</source> | ||||
|   </field> | ||||
|   <field x="41" y="6.25" type="Booleano" align="center" width="2" id="3002" pattern="1" text="###.###.###"> | ||||
|    <source>VF30.2</source> | ||||
|   </field> | ||||
|   <field x="41" y="7.25" type="Booleano" align="center" width="2" id="3003" pattern="1" text="###.###.###"> | ||||
|    <source>VF30.3</source> | ||||
|   </field> | ||||
|   <field x="41" y="8.25" type="Booleano" align="center" width="2" id="3004" pattern="1" text="###.###.###"> | ||||
|    <source>VF30.4</source> | ||||
|   </field> | ||||
|   <field x="76" y="5.25" type="Booleano" align="center" width="2" id="3005" pattern="1" text="###.###.###"> | ||||
|    <source>VF30.5</source> | ||||
|   </field> | ||||
|   <field x="76" y="6.25" type="Booleano" align="center" width="2" id="3006" pattern="1" text="###.###.###"> | ||||
|    <source>VF30.6</source> | ||||
|   </field> | ||||
|   <field x="76" y="7.25" type="Booleano" align="center" width="2" id="3007" pattern="1" text="###.###.###"> | ||||
|    <source>VF30.7</source> | ||||
|   </field> | ||||
|   <field x="76" y="8.25" type="Booleano" align="center" width="2" id="3008" pattern="1" text="###.###.###"> | ||||
|    <source>VF30.8</source> | ||||
|   </field> | ||||
|   <field x="53" y="10.25" type="Numero" align="right" width="11" id="3101" pattern="1" text="###.###.###"> | ||||
|    <source>VF31.1</source> | ||||
|   </field> | ||||
|   <field x="65.5" y="10.25" type="Numero" align="right" width="11" id="3102" pattern="1" text="###.###.###"> | ||||
|    <source>VF31.2</source> | ||||
|   </field> | ||||
|   <field x="66" y="11.5" type="Booleano" align="center" width="2" id="3201" pattern="1" text="###.###.###"> | ||||
|    <source>VF32.1</source> | ||||
|   </field> | ||||
|   <field x="66" y="12.5" type="Booleano" align="center" width="2" id="3301" pattern="1" text="###.###.###"> | ||||
|    <source>VF33.1</source> | ||||
|   </field> | ||||
|   <field x="20" y="16.5" type="Numero" align="right" width="11" id="3401" pattern="1" text="###.###.###"> | ||||
|    <source>VF34.1</source> | ||||
|   </field> | ||||
|   <field x="35.5" y="16.5" type="Numero" align="right" width="11" id="3402" pattern="1" text="###.###.###"> | ||||
|    <source>VF34.2</source> | ||||
|   </field> | ||||
|   <field x="51.5" y="16.5" type="Numero" align="right" width="11" id="3403" pattern="1" text="###.###.###"> | ||||
|    <source>VF34.3</source> | ||||
|   </field> | ||||
|   <field x="66" y="16.5" type="Numero" align="right" width="11" id="3404" pattern="1" text="###.###.###"> | ||||
|    <source>V34.4</source> | ||||
|   </field> | ||||
|   <field x="20" y="19.5" type="Numero" align="right" width="11" id="3405" pattern="1" text="###.###.###"> | ||||
|    <source>VF34.5</source> | ||||
|   </field> | ||||
|   <field x="36" y="19.4" type="Numero" align="right" width="11" id="3406" pattern="1" text="###.###.###"> | ||||
|    <source>V34.6</source> | ||||
|   </field> | ||||
|   <field x="51" y="19.4" type="Numero" align="right" width="11" id="3407" pattern="1" text="###.###.###"> | ||||
|    <source>VF34.7</source> | ||||
|   </field> | ||||
|   <field x="65.5" y="19.5" type="Numero" align="right" width="11" id="3408" pattern="1" text="###.###.###"> | ||||
|    <source>V34.8</source> | ||||
|   </field> | ||||
|   <field x="66" y="23.75" type="Numero" align="right" width="11" id="3502" pattern="1" text="###.###.###"> | ||||
|    <source>VF35.2</source> | ||||
|   </field> | ||||
|   <field x="66" y="25.75" type="Numero" align="right" width="11" id="3602" pattern="1" text="###.###.###"> | ||||
|    <source>VF36.2</source> | ||||
|   </field> | ||||
|   <field x="66" y="26.75" type="Numero" align="right" width="11" id="3702" pattern="1" text="###.###.###"> | ||||
|    <source>VF37.2</source> | ||||
|   </field> | ||||
|   <field x="51.5" y="28.75" type="Numero" align="right" width="11" id="3801" pattern="1" text="###.###.###"> | ||||
|    <source>VF38.1</source> | ||||
|   </field> | ||||
|   <field x="66" y="28.75" type="Numero" align="right" width="11" id="3802" pattern="1" text="###.###.###"> | ||||
|    <source>VF38.2</source> | ||||
|   </field> | ||||
|   <field x="51.5" y="29.75" type="Numero" align="right" width="11" id="3901" pattern="1" text="###.###.###"> | ||||
|    <source>VF39.1</source> | ||||
|   </field> | ||||
|   <field x="66" y="29.75" type="Numero" align="right" width="11" id="3902" pattern="1" text="###.###.###"> | ||||
|    <source>VF39.2</source> | ||||
|   </field> | ||||
|   <field x="51.5" y="30.9" type="Numero" align="right" width="11" id="4001" pattern="1" text="###.###.###"> | ||||
|    <source>VF40.1</source> | ||||
|   </field> | ||||
|   <field x="66" y="30.9" type="Numero" align="right" width="11" id="4002" pattern="1" text="###.###.###"> | ||||
|    <source>VF40.2</source> | ||||
|   </field> | ||||
|   <field x="51.5" y="31.9" type="Numero" align="right" width="11" id="4101" pattern="1" text="###.###.###"> | ||||
|    <source>VF41.1</source> | ||||
|   </field> | ||||
|   <field x="66" y="31.9" type="Numero" align="right" width="11" id="4102" pattern="1" text="###.###.###"> | ||||
|    <source>VF41.2</source> | ||||
|   </field> | ||||
|   <field x="51.5" y="32.9" type="Numero" align="right" width="11" id="4201" pattern="1" text="###.###.###"> | ||||
|    <source>VF42.1</source> | ||||
|   </field> | ||||
|   <field x="66" y="32.9" type="Numero" align="right" width="11" id="4202" pattern="1" text="###.###.###"> | ||||
|    <source>VF42.2</source> | ||||
|   </field> | ||||
|   <field x="51.5" y="34" type="Numero" align="right" width="11" id="4301" pattern="1" text="###.###.###"> | ||||
|    <source>VF43.1</source> | ||||
|   </field> | ||||
|   <field x="66" y="34" type="Numero" align="right" width="11" id="4302" pattern="1" text="###.###.###"> | ||||
|    <source>VF43.2</source> | ||||
|   </field> | ||||
|   <field x="51.5" y="35" type="Numero" align="right" width="11" id="4401" pattern="1" text="###.###.###"> | ||||
|    <source>VF44.1</source> | ||||
|   </field> | ||||
|   <field x="66" y="35" type="Numero" align="right" width="11" id="4402" pattern="1" text="###.###.###"> | ||||
|    <source>VF44.2</source> | ||||
|   </field> | ||||
|   <field x="51.5" y="36" type="Numero" align="right" width="11" id="4501" pattern="1" text="###.###.###"> | ||||
|    <source>VF45.1</source> | ||||
|   </field> | ||||
|   <field x="66" y="36" type="Numero" align="right" width="11" id="4502" pattern="1" text="###.###.###"> | ||||
|    <source>VF45.2</source> | ||||
|   </field> | ||||
|   <field x="51.5" y="37" type="Numero" align="right" width="11" id="4601" pattern="1" text="###.###.###"> | ||||
|    <source>VF46.1</source> | ||||
|   </field> | ||||
|   <field x="66" y="37" type="Numero" align="right" width="11" id="4602" pattern="1" text="###.###.###"> | ||||
|    <source>VF46.2</source> | ||||
|   </field> | ||||
|   <field x="51.5" y="38" type="Numero" align="right" width="11" id="4701" pattern="1" text="###.###.###"> | ||||
|    <source>VF47.1</source> | ||||
|   </field> | ||||
|   <field x="66" y="38" type="Numero" align="right" width="11" id="4702" pattern="1" text="###.###.###"> | ||||
|    <source>VF47.2</source> | ||||
|   </field> | ||||
|   <field x="51.5" y="39" type="Numero" align="right" width="11" id="4801" pattern="1" text="###.###.###"> | ||||
|    <source>VF48.1</source> | ||||
|   </field> | ||||
|   <field x="66" y="39" type="Numero" align="right" width="11" id="4802" pattern="1" text="###.###.###"> | ||||
|    <source>VF48.2</source> | ||||
|   </field> | ||||
|   <field x="51.5" y="40" type="Numero" align="right" width="11" id="4901" pattern="1" text="###.###.###"> | ||||
|    <source>VF49.1</source> | ||||
|   </field> | ||||
|   <field x="66" y="40" type="Numero" align="right" width="11" id="4902" pattern="1" text="###.###.###"> | ||||
|    <source>VF49.2</source> | ||||
|   </field> | ||||
|   <field x="66" y="41" type="Numero" align="right" width="11" id="5002" pattern="1" text="###.###.###"> | ||||
|    <source>VF50.2</source> | ||||
|   </field> | ||||
|   <field x="51.5" y="42" type="Numero" align="right" width="11" id="5101" pattern="1" text="###.###.###"> | ||||
|    <source>#3901+#4001+#4101+#4201+#4301+#4401+#4501+#4601+#4701+#4801+#4901</source> | ||||
|   </field> | ||||
|   <field x="66" y="42" type="Numero" align="right" width="11" id="5102" pattern="1" text="###.###.###"> | ||||
|    <source>#3902+#4002+#4102+#4202+#4302+#4402+#4502+#4602+#4702+#4802+#4902</source> | ||||
|   </field> | ||||
|   <field x="66" y="43" type="Numero" align="right" width="11" id="5202" pattern="1" text="###.###.###"> | ||||
|    <source>#3802</source> | ||||
|   </field> | ||||
|   <field x="66" y="45.25" type="Numero" align="right" width="11" id="5302" pattern="1" text="###.###.###"> | ||||
|    <source>VF53.2</source> | ||||
|   </field> | ||||
|   <field x="66" y="46.25" type="Numero" align="right" width="11" id="5402" pattern="1" text="###.###.###"> | ||||
|    <source>#5101+#5201+#5301</source> | ||||
|   </field> | ||||
|   <field x="66" y="49" type="Booleano" align="center" width="2" id="6001" pattern="1" text="###.###.###"> | ||||
|    <source>VF60.1</source> | ||||
|   </field> | ||||
|   <field x="66" y="51" type="Booleano" align="center" width="2" id="6002" pattern="1" text="###.###.###"> | ||||
|    <source>VF60.2</source> | ||||
|   </field> | ||||
|   <field x="66" y="53" type="Booleano" align="center" width="2" id="6101" pattern="1" text="###.###.###"> | ||||
|    <source>VF61.1</source> | ||||
|   </field> | ||||
|   <field x="53" y="56.5" type="Numero" align="right" width="11" id="6201" pattern="1" text="###.###.###"> | ||||
|    <source>VF62.1</source> | ||||
|   </field> | ||||
|   <field x="66" y="56.5" type="Numero" align="right" width="11" id="6202" pattern="1" text="###.###.###"> | ||||
|    <source>VF62.2</source> | ||||
|   </field> | ||||
|   <field x="66" y="58.5" type="Numero" align="right" width="11" id="7002" pattern="1" text="###.###.###"> | ||||
|    <source>VF70.2</source> | ||||
|   </field> | ||||
|   <field x="80" y="58.5" type="Numero" align="right" width="11" id="7003" pattern="1" text="###.###.###"> | ||||
|    <source>NUM((#3003!="X")(#3004!="X")(#3005!="X")(#3006!="X")(#3007!="X")(#3008!="X"))*VF25.2</source> | ||||
|   </field> | ||||
|   <field x="92" y="58.5" type="Numero" align="right" width="11" id="7004" pattern="1" text="###.###.###"> | ||||
|    <source>NUM(#3003=="X")*VE37.2</source> | ||||
|   </field> | ||||
|   <field x="104" y="58.5" type="Numero" align="right" width="11" id="7005" pattern="1" text="###.###.###"> | ||||
|    <source>NUM((#3004=="X")(#3006=="X")(#3007=="X"))*VE26.2*0.5+NUM(#3005=="X")*VE26.2F;3+NUM(#3008=="X")*VE54.2</source> | ||||
|   </field> | ||||
|   <field x="66" y="59.5" type="Numero" align="right" width="11" id="7102" pattern="1" text="###.###.###"> | ||||
|    <source>NUM(#6001!="X"#6002!="X")*(#6202*0.5+#7002+#7003+#7004+#7005)</source> | ||||
|   </field> | ||||
|  </section> | ||||
|  <section type="Foot" pattern="1" /> | ||||
|  <section type="Foot" level="1" pattern="1" /> | ||||
|  <sql>USE NDITTE SELECT CODDITTA==#CODDITTA</sql> | ||||
|  <parameters> | ||||
|   <item name="ANNO"> </item> | ||||
|  </parameters> | ||||
| </report> | ||||
							
								
								
									
										148
									
								
								src/cg/cg7800.cpp
									
									
									
									
									
										Normal file
									
								
							
							
						
						| @ -0,0 +1,148 @@ | ||||
| // Programma per la stampa del quadro VE
 | ||||
| #include <recarray.h> | ||||
| #include <tabutil.h> | ||||
| #include <utility.h> | ||||
| 
 | ||||
| #include "cg7401.h" | ||||
| #include "cgpim.h" | ||||
| 
 | ||||
| #include "cg7400a.h" | ||||
| #include "rmoviva.h" | ||||
| 
 | ||||
| #define	REP_QUADRO			1 | ||||
| 
 | ||||
| enum tipo_sospensione { nessuna, normale, vol_affari, liquidazione }; | ||||
| 
 | ||||
| class TQuadro_VJ_recordset : public TQuadro_IVA_recordset | ||||
| { | ||||
| 	TQuadro_IVA_mask * _mask; | ||||
| 
 | ||||
| protected: | ||||
| 	virtual void load(); | ||||
| 
 | ||||
| public: | ||||
| 	TQuadro_VJ_recordset(TQuadro_IVA_mask * mask, const char* use, const int year) : TQuadro_IVA_recordset(mask, use, year) { load(); } | ||||
| 	virtual ~TQuadro_VJ_recordset() {} | ||||
| }; | ||||
| 
 | ||||
| void TQuadro_VJ_recordset::load() | ||||
| { | ||||
| 	clear(); | ||||
| 
 | ||||
| 	TISAM_recordset * recset = app().mask()->get_recset(REP_QUADRO); | ||||
| 
 | ||||
| 	recset->set_var("#ANNO", format("%d", year())); | ||||
| 	for (recset->move_first(); !recset->eof(); recset->move_next()) | ||||
| 	{ | ||||
| 		const int regspiva = recset->get("26.REGSPIVA").as_int(); | ||||
|     const real imp = recset->get(RMI_IMPONIBILE).as_real(); | ||||
|     const real iva = recset->get(RMI_IMPOSTA).as_real(); | ||||
| 
 | ||||
| 		switch (regspiva) | ||||
| 		{ | ||||
| 		case 1:	 | ||||
| 			add_value("VJ01.1", imp);	// VJ1.1 Acquisti di beni provenienti dallo Stato Città del Vaticano e dalla Repubblica di San Marino – art. 71, comma 2 – (inclusi acquisti di oro industriale,argento puro e beni di cui all’art. 74, commi 7 e 8)
 | ||||
| 			add_value("VJ01.2", iva);	// VJ1.2 Acquisti di beni provenienti dallo Stato Città del Vaticano e dalla Repubblica di San Marino – art. 71, comma 2 – (inclusi acquisti di oro industriale,argento puro e beni di cui all’art. 74, commi 7 e 8)
 | ||||
| 			break; | ||||
| 		case 2: | ||||
| 			add_value("VJ02.1", imp);	// VJ2.1 Estrazione di beni da depositi IVA (art. 50-bis, comma 6, d.l. n. 331/1993)
 | ||||
| 			add_value("VJ02.2", iva);		// VJ2.2 Estrazione di beni da depositi IVA (art. 50-bis, comma 6, d.l. n. 331/1993)
 | ||||
| 			break; | ||||
| 		case 3: | ||||
| 			add_value("VJ03.1", imp);	// VJ3.1 Acquisti di beni e servizi da soggettIi non residenti ai sensi dell’art. 17, comma 2   
 | ||||
| 			add_value("VJ03.2", iva);	// VJ3.2 Acquisti di beni e servizi da soggettIi non residenti ai sensi dell’art. 17, comma 2   
 | ||||
| 			break; | ||||
| 		case 4: | ||||
| 			add_value("VJ04.1", imp);	// VJ4.1 Operazioni di cui all’art. 74, comma 1, lett. e)
 | ||||
| 			add_value("VJ04.2", iva);	// VJ4.2 Operazioni di cui all’art. 74, comma 1, lett. e)
 | ||||
| 			break; | ||||
| 		case 5: | ||||
| 			add_value("VJ05.1", imp);	// VJ5.1 Provvigioni corrisposte dalle agenzie di viaggio ai loro intermediari
 | ||||
| 			add_value("VJ05.2", iva);	// VJ5.1 Provvigioni corrisposte dalle agenzie di viaggio ai loro intermediari
 | ||||
| 			break; | ||||
| 		case 6: | ||||
| 			add_value("VJ06.1", imp);	// VJ6.1 Acquisti all’interno di beni di cui all’art. 74, commi 7 e 8
 | ||||
| 			add_value("VJ6.2", iva);	// VJ6.2 Acquisti all’interno di beni di cui all’art. 74, commi 7 e 8
 | ||||
| 		case 7: | ||||
| 			add_value("VJ07.1", imp);	// VJ7.1 Acquisti all’interno di oro industriale e argento puro (art. 17, comma 5)
 | ||||
| 			add_value("VJ07.2", iva);	// VJ7.2 Acquisti all’interno di oro industriale e argento puro (art. 17, comma 5)
 | ||||
| 			break; | ||||
| 		case 8: | ||||
| 			add_value("VJ08.1", imp);	// VJ8.1 Acquisti di oro da investimento imponibile per opzione (art. 17, comma 5)
 | ||||
| 			add_value("VJ08.2", iva);	// VJ8.1 Acquisti di oro da investimento imponibile per opzione (art. 17, comma 5)
 | ||||
| 			break; | ||||
| 		case 9: | ||||
| 			add_value("VJ09.1", imp);	// VJ9.1 Acquisti intracomunitari di beni (inclusi acquisti di oro industriale, argento puro e beni di cui all’art. 74, commi 7 e 8)
 | ||||
| 			add_value("VJ09.2", iva);		// VJ9.2 Acquisti intracomunitari di beni (inclusi acquisti di oro industriale, argento puro e beni di cui all’art. 74, commi 7 e 8)
 | ||||
| 			break; | ||||
| 		case 10: | ||||
| 			add_value("VJ10.1", imp);	// VJ10.1 Importazioni di beni di cui all’art. 74, commi 7 e 8 senza pagamento dell’IVA in dogana (art. 70, comma 6)
 | ||||
| 			add_value("VJ10.2", iva);	// VJ10.2 Importazioni di beni di cui all’art. 74, commi 7 e 8 senza pagamento dell’IVA in dogana (art. 70, comma 6)
 | ||||
| 			add_value("VJ09.1", imp);	// VJ9.1 Acquisti intracomunitari di beni (inclusi acquisti di oro industriale, argento puro e beni di cui all’art. 74, commi 7 e 8)
 | ||||
| 			add_value("VJ09.2", iva);	// VJ9.2 Acquisti intracomunitari di beni (inclusi acquisti di oro industriale, argento puro e beni di cui all’art. 74, commi 7 e 8)
 | ||||
| 			break; | ||||
| 		case 12: | ||||
| 			add_value("VJ12.1", imp);	// VJ12.1 Acquisti di tartufi da rivenditori dilettanti ed occasionali non muniti di partita IVA (art. 1, comma 109, legge n. 311/2004)
 | ||||
| 			add_value("VJ12.2", iva);	// VJ12.2 Acquisti di tartufi da rivenditori dilettanti ed occasionali non muniti di partita IVA (art. 1, comma 109, legge n. 311/2004)
 | ||||
| 			break; | ||||
| 		case 13: | ||||
| 			add_value("VJ13.1", imp);	// VJ13.1 Acquisti di servizi resi da subappaltatori nel settore edile (art. 17, comma 6, lett. a)
 | ||||
| 			add_value("VJ13.2", iva);	// VJ13.2 Acquisti di servizi resi da subappaltatori nel settore edile (art. 17, comma 6, lett. a)
 | ||||
| 			break; | ||||
| 		case 14: | ||||
| 			add_value("VJ14.1", imp); // VJ14.1 Acquisti di fabbricati (art. 17, comma 6, lett. a-bis)
 | ||||
| 			add_value("VJ14.2", iva);	// VJ14.2 Acquisti di fabbricati (art. 17, comma 6, lett. a-bis)
 | ||||
| 			break; | ||||
| 		case 15: | ||||
| 			add_value("VJ15.1", imp); // VJ15.1 Acquisti di telefoni cellulari (art. 17, comma 6, lett. b)
 | ||||
| 			add_value("VJ15.2", iva); // VJ15 2 Acquisti di telefoni cellulari (art. 17, comma 6, lett. b)
 | ||||
| 			break; | ||||
| 		case 16: | ||||
| 			add_value("VJ16.1", imp);	// VJ16.1 Acquisti di prodotti elettronici (art. 17, comma 6, lett. c)
 | ||||
| 			add_value("VJ16.2", iva);	// VJ16.2 Acquisti di prodotti elettronici (art. 17, comma 6, lett. c)
 | ||||
| 			break; | ||||
| 		case 17: | ||||
| 			add_value("VJ17.1", imp);	// VJ17.1 Acquisti di servizi del comparto edile e settori connessi (art. 17, comma 6, lett. a-ter) 
 | ||||
| 			add_value("VJ17.2", iva);	// VJ17.2 Acquisti di servizi del comparto edile e settori connessi (art. 17, comma 6, lett. a-ter) 
 | ||||
| 			break; | ||||
| 		case 18: | ||||
| 			add_value("VJ18.1", imp);	// VJ18.1 Acquisti di beni e servizi del settore energetico (art. 17, comma 6, lett. d-bis, d-ter e d-quater)
 | ||||
| 			add_value("VJ18.2", iva);	// VJ18.2 Acquisti di beni e servizi del settore energetico (art. 17, comma 6, lett. d-bis, d-ter e d-quater)
 | ||||
| 			break; | ||||
| 		case 19:      | ||||
| 			add_value("VJ11.1", imp);	// VJ19.1 Acquisti delle pubbliche amministrazioni, titolari di partita IVA, ai sensi dell’art. 17-ter
 | ||||
| 			add_value("VJ11.2", iva);	// VJ19.2 Acquisti delle pubbliche amministrazioni, titolari di partita IVA, ai sensi dell’art. 17-ter
 | ||||
| 			add_value("VJ09.1", imp);	// VJ9.1 Acquisti intracomunitari di beni (inclusi acquisti di oro industriale, argento puro e beni di cui all’art. 74, commi 7 e 8)
 | ||||
| 			add_value("VJ09.2", iva);	// VJ9.2 Acquisti intracomunitari di beni (inclusi acquisti di oro industriale, argento puro e beni di cui all’art. 74, commi 7 e 8)
 | ||||
| 		default: | ||||
| 			break; | ||||
| 		} | ||||
| 	} | ||||
| }  | ||||
| 
 | ||||
| class TQuadro_VJ_app : public TQuadro_IVA_app | ||||
| { | ||||
| 
 | ||||
| protected: | ||||
| 	virtual void load_sheet(TSheet_field & sf); | ||||
| 
 | ||||
| public: | ||||
| 	virtual TQuadro_IVA_recordset * app_recordset(const char* use, const int year) { return new TQuadro_VJ_recordset(mask(), use, year); } | ||||
| 
 | ||||
| 	TQuadro_VJ_app() : TQuadro_IVA_app("Stampa Quadro VJ", "cg7800a") {} | ||||
| 	virtual ~TQuadro_VJ_app() {} | ||||
| 
 | ||||
| }; | ||||
| 
 | ||||
| void TQuadro_VJ_app::load_sheet(TSheet_field & sf) | ||||
| { | ||||
| 		TToken_string & row1 = sf.row(sf.items()); row1.add("|1|Quadro VJ - VJ1 - VJ16|cg7800b"); | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| int cg7800(int argc, char* argv[]) | ||||
| { | ||||
|   TQuadro_VJ_app a; | ||||
|   a.run(argc, argv, TR("Quadro VJ")); | ||||
|   return 0; | ||||
| } | ||||
| Before Width: | Height: | Size: 42 KiB After Width: | Height: | Size: 133 KiB | 
							
								
								
									
										149
									
								
								src/cg/cg7800a.rep
									
									
									
									
									
										Normal file
									
								
							
							
						
						| @ -0,0 +1,149 @@ | ||||
| <?xml version="1.0" encoding="UTF-8" ?> | ||||
| <report name="cg7800a" lpi="6"> | ||||
|  <description>Stampa quadro VJ</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>"cg7800a.png"</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="Anno" /> | ||||
|   <field x="35.75" y="5" type="Stringa" width="48" pattern="1" text=" "> | ||||
|    <font face="Courier New" size="12" /> | ||||
|    <source>#SYSTEM.CFPI_SPACED</source> | ||||
|   </field> | ||||
|   <field x="63.75" y="9" type="Testo" width="4" pattern="1" text="0 1" /> | ||||
|   <field x="14" y="1" type="Stringa" align="right" width="6" id="100" pattern="1" text=" "> | ||||
|    <font face="Courier New" bold="1" size="10" /> | ||||
|   </field> | ||||
|   <field x="51.5" y="13.5" type="Numero" align="right" width="11" id="101" pattern="1" text="###.###.###"> | ||||
|    <source>VJ01.1</source> | ||||
|   </field> | ||||
|   <field x="65.5" y="13.5" type="Numero" align="right" width="11" id="102" pattern="1" text="###.###.###"> | ||||
|    <source>VJ01.2</source> | ||||
|   </field> | ||||
|   <field x="51.5" y="14.65" type="Numero" align="right" width="11" id="201" pattern="1" text="###.###.###"> | ||||
|    <source>VJ02.1</source> | ||||
|   </field> | ||||
|   <field x="65.5" y="14.65" type="Numero" align="right" width="11" id="202" pattern="1" text="###.###.###"> | ||||
|    <source>VJ01.2</source> | ||||
|   </field> | ||||
|   <field x="51.5" y="15.65" type="Numero" align="right" width="11" id="301" pattern="1" text="###.###.###"> | ||||
|    <source>VJ01.3</source> | ||||
|   </field> | ||||
|   <field x="65.5" y="15.65" type="Numero" align="right" width="11" id="302" pattern="1" text="###.###.###"> | ||||
|    <source>VJ03.2</source> | ||||
|   </field> | ||||
|   <field x="51.5" y="16.65" type="Numero" align="right" width="11" id="401" pattern="1" text="###.###.###"> | ||||
|    <source>VJ04.1</source> | ||||
|   </field> | ||||
|   <field x="65.5" y="16.65" type="Numero" align="right" width="11" id="402" pattern="1" text="###.###.###"> | ||||
|    <source>VJ04.2</source> | ||||
|   </field> | ||||
|   <field x="51.5" y="18.5" type="Numero" align="right" width="11" id="501" pattern="1" text="###.###.###"> | ||||
|    <source>VJ05.1</source> | ||||
|   </field> | ||||
|   <field x="65.5" y="18.5" type="Numero" align="right" width="11" id="502" pattern="1" text="###.###.###"> | ||||
|    <source>VJ05.2</source> | ||||
|   </field> | ||||
|   <field x="51.5" y="19.5" type="Numero" align="right" width="11" id="601" pattern="1" text="###.###.###"> | ||||
|    <source>VJ06.1</source> | ||||
|   </field> | ||||
|   <field x="65.5" y="19.5" type="Numero" align="right" width="11" id="602" pattern="1" text="###.###.###"> | ||||
|    <source>VJ06.2</source> | ||||
|   </field> | ||||
|   <field x="51.5" y="20.5" type="Numero" align="right" width="11" id="701" pattern="1" text="###.###.###"> | ||||
|    <source>VJ07.1</source> | ||||
|   </field> | ||||
|   <field x="65.5" y="20.5" type="Numero" align="right" width="11" id="702" pattern="1" text="###.###.###"> | ||||
|    <source>VJ07.2</source> | ||||
|   </field> | ||||
|   <field x="51.5" y="21.5" type="Numero" align="right" width="11" id="801" pattern="1" text="###.###.###"> | ||||
|    <source>VJ08.1</source> | ||||
|   </field> | ||||
|   <field x="65.5" y="21.5" type="Numero" align="right" width="11" id="802" pattern="1" text="###.###.###"> | ||||
|    <source>VJ08.2</source> | ||||
|   </field> | ||||
|   <field x="51.5" y="23.5" type="Numero" align="right" width="11" id="901" pattern="1" text="###.###.###"> | ||||
|    <source>VJ09.1</source> | ||||
|   </field> | ||||
|   <field x="65.5" y="23.5" type="Numero" align="right" width="11" id="902" pattern="1" text="###.###.###"> | ||||
|    <source>VJ09.2</source> | ||||
|   </field> | ||||
|   <field x="51.5" y="25.5" type="Numero" align="right" width="11" id="1001" pattern="1" text="###.###.###"> | ||||
|    <source>VJ10.1</source> | ||||
|   </field> | ||||
|   <field x="65.5" y="25.5" type="Numero" align="right" width="11" id="1002" pattern="1" text="###.###.###"> | ||||
|    <source>VJ10.2</source> | ||||
|   </field> | ||||
|   <field x="51.5" y="27.75" type="Numero" align="right" width="11" id="1101" pattern="1" text="###.###.###"> | ||||
|    <source>VJ11.1</source> | ||||
|   </field> | ||||
|   <field x="65.5" y="27.75" type="Numero" align="right" width="11" id="1102" pattern="1" text="###.###.###"> | ||||
|    <source>VJ11.2</source> | ||||
|   </field> | ||||
|   <field x="51.5" y="29.75" type="Numero" align="right" width="11" id="1201" pattern="1" text="###.###.###"> | ||||
|    <source>VJ12.1</source> | ||||
|   </field> | ||||
|   <field x="65.5" y="29.5" type="Numero" align="right" width="11" id="1202" pattern="1" text="###.###.###"> | ||||
|    <source>VJ12.2</source> | ||||
|   </field> | ||||
|   <field x="51.5" y="30.75" type="Numero" align="right" width="11" id="1301" pattern="1" text="###.###.###"> | ||||
|    <source>VJ13.1</source> | ||||
|   </field> | ||||
|   <field x="65.5" y="30.75" type="Numero" align="right" width="11" id="1302" pattern="1" text="###.###.###"> | ||||
|    <source>VJ13.2</source> | ||||
|   </field> | ||||
|   <field x="51.5" y="31.75" type="Numero" align="right" width="11" id="1401" pattern="1" text="###.###.###"> | ||||
|    <source>VJ14.1</source> | ||||
|   </field> | ||||
|   <field x="65.5" y="31.75" type="Numero" align="right" width="11" id="1402" pattern="1" text="###.###.###"> | ||||
|    <source>VJ14.2</source> | ||||
|   </field> | ||||
|   <field x="51.5" y="32.75" type="Numero" align="right" width="11" id="1501" pattern="1" text="###.###.###"> | ||||
|    <source>VJ15.1</source> | ||||
|   </field> | ||||
|   <field x="65.5" y="32.75" type="Numero" align="right" width="11" id="1502" pattern="1" text="###.###.###"> | ||||
|    <source>VJ16.2</source> | ||||
|   </field> | ||||
|   <field x="51.5" y="34" type="Numero" align="right" width="11" id="1601" pattern="1" text="###.###.###"> | ||||
|    <source>VJ16.1</source> | ||||
|   </field> | ||||
|   <field x="65.5" y="34" type="Numero" align="right" width="11" id="1602" pattern="1" text="###.###.###"> | ||||
|    <source>VJ16.2</source> | ||||
|   </field> | ||||
|   <field x="51.5" y="35" type="Numero" align="right" width="11" id="1701" pattern="1" text="###.###.###"> | ||||
|    <source>VJ17.1</source> | ||||
|   </field> | ||||
|   <field x="65.5" y="35" type="Numero" align="right" width="11" id="1702" pattern="1" text="###.###.###"> | ||||
|    <source>VJ17.2</source> | ||||
|   </field> | ||||
|   <field x="51.5" y="37" type="Numero" align="right" width="11" id="1801" pattern="1" text="###.###.###"> | ||||
|    <source>VJ18.1</source> | ||||
|   </field> | ||||
|   <field x="65.5" y="37" type="Numero" align="right" width="11" id="1802" pattern="1" text="###.###.###"> | ||||
|    <source>VJ18.2</source> | ||||
|   </field> | ||||
|   <field x="51.5" y="38" type="Numero" align="right" width="11" id="1901" pattern="1" text="###.###.###"> | ||||
|    <source>VJ19.1</source> | ||||
|   </field> | ||||
|   <field x="65.5" y="38" type="Numero" align="right" width="11" id="1902" pattern="1" text="###.###.###"> | ||||
|    <source>VJ19.2</source> | ||||
|   </field> | ||||
|   <field x="65.5" y="39" type="Numero" align="right" width="11" id="2002" pattern="1" text="###.###.###"> | ||||
|    <source>#102+#202+#302+#402+#502+#602+#702+#802+#902+#1002+ #1102+#1202+#1302+#1402+#1502+#1602+#1702+#1802+#1902</source> | ||||
|   </field> | ||||
|   <field x="78" y="64.75" type="Numero" align="right" width="1" id="9999" pattern="1" text="###.###.###" /> | ||||
|  </section> | ||||
|  <section type="Foot" pattern="1" /> | ||||
|  <section type="Foot" level="1" pattern="1" /> | ||||
|  <sql>USE NDITTE SELECT CODDITTA==#CODDITTA</sql> | ||||
|  <parameters> | ||||
|   <item name="ANNO"> | ||||
|   </item> | ||||
|  </parameters> | ||||
| </report> | ||||
							
								
								
									
										213
									
								
								src/cg/cg7800b.rep
									
									
									
									
									
										Normal file
									
								
							
							
						
						| @ -0,0 +1,213 @@ | ||||
| <?xml version="1.0" encoding="UTF-8" ?> | ||||
| <report name="cg7800b" orientation="1" lpi="6"> | ||||
|  <description>Dichiarazione IVA Quadro VJ - VJ1 - VJ16</description> | ||||
|  <font face="Arial" size="8" /> | ||||
|  <section type="Head" pattern="1"> | ||||
|   <field x="88" type="Stringa" align="right" width="30" pattern="1"> | ||||
|    <source>"Pag. " +#PAGE</source> | ||||
|   </field> | ||||
|   <field x="2" y="0.75" type="Testo" align="right" width="7" pattern="1" text="Num.Reg" /> | ||||
|   <field x="10" y="0.75" type="Testo" hidden="1" width="3" pattern="1" text="N.R." /> | ||||
|   <field x="14" y="0.75" type="Testo" width="10" pattern="1" text="Data Reg." /> | ||||
|   <field x="25" y="0.75" type="Stringa" hidden="1" width="1" pattern="1"> | ||||
|    <source>RMOVIVA.INTRA</source> | ||||
|   </field> | ||||
|   <field x="27" y="0.75" type="Testo" width="10" pattern="1" text="Data Doc." /> | ||||
|   <field x="38" y="0.75" type="Testo" width="7" pattern="1" text="N. Doc." /> | ||||
|   <field x="46" y="0.75" type="Testo" width="4" pattern="1" text="Caus" /> | ||||
|   <field x="51" y="0.75" type="Testo" width="50" pattern="1" text="Fornitore Ragione Sociale" /> | ||||
|   <field x="92" y="0.75" type="Testo" align="right" width="13" pattern="1" text="Imponibile" /> | ||||
|   <field x="104.5" y="0.75" type="Testo" align="right" width="10" pattern="1" text="Imposta" /> | ||||
|   <field x="116" y="0.75" type="Testo" width="4" pattern="1" text="C.Iva" /> | ||||
|   <field border="2" x="2" y="1.75" type="Linea" width="117" 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="90" type="Stringa" align="right" width="30" pattern="1"> | ||||
|    <source>"Data di Stampa: " +#SYSTEM.DATE</source> | ||||
|   </field> | ||||
|   <field border="1" x="2" y="1" type="Stringa" align="center" width="117" pattern="1"> | ||||
|    <source>"ELENCO FATTURE ACQUISTO PARTICOLARI TIPOLOGIE DI OPERAZIONI - QUADRO  VJ  - " +#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="#D9FFD9" pattern="2"> | ||||
|   <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="40" id="40" pattern="1"> | ||||
|    <source>CLIFO.RAGSOC</source> | ||||
|   </field> | ||||
|   <field x="92" type="Valuta" align="right" width="13" id="100" pattern="1" text="###.###.###,@@"> | ||||
|    <source>RMOVIVA.IMPONIBILE</source> | ||||
|    <prescript description="B1.100 PRESCRIPT">MESSAGE ADD,F2.100</prescript> | ||||
|   </field> | ||||
|   <field x="105" type="Numero" align="right" width="10" id="101" pattern="1" text="###.###.###,@@"> | ||||
|    <source>RMOVIVA.IMPOSTA</source> | ||||
|    <prescript description="B1.101 PRESCRIPT">MESSAGE ADD,F2.101</prescript> | ||||
|   </field> | ||||
|   <field x="116" type="Stringa" width="4" id="105" pattern="1"> | ||||
|    <source>RMOVIVA.CODIVA</source> | ||||
|   </field> | ||||
|   <field x="121" type="Stringa" width="3" id="110" pattern="1"> | ||||
|    <source>26.REGSPIVA</source> | ||||
|    <prescript description="B1.110 PRESCRIPT">#100 @ | ||||
| "F1.1" | ||||
| #THIS @ | ||||
| + | ||||
| +!</prescript> | ||||
|   </field> | ||||
|   <field x="125" type="Stringa" width="3" id="111" pattern="1"> | ||||
|    <source>26.REGSPIVA</source> | ||||
|    <prescript description="B1.111 PRESCRIPT">#101 @ | ||||
| "F1.2" | ||||
| #THIS @ | ||||
| + | ||||
| +!</prescript> | ||||
|   </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="117" height="0" pattern="1" /> | ||||
|   <field x="35" y="1" type="Testo" align="right" width="50" pattern="1" text="TOTALE:" /> | ||||
|   <field x="87" y="2.75" type="Testo" align="right" width="18" pattern="1" text="Imponibile" /> | ||||
|   <field x="106" y="2.75" type="Testo" align="right" width="13" pattern="1" text="Imposta" /> | ||||
|   <field y="4" type="Testo" align="right" width="85" pattern="1" text="Acq. di beni provenienti dallo Stato Citt&#E0; del Vaticano e dalla Repubblica di San Marino ` art. 71, comma 2 ` VJ1:" /> | ||||
|   <field x="0.5" y="4.75" type="Testo" align="right" width="80" pattern="1" text="(inclusi acq di oro industriale,argento puro e beni di cui all\art. 74, commi 7 e 8)" /> | ||||
|   <field x="5" y="6" type="Testo" align="right" width="80" pattern="1" text="Estrazione di beni da depositi IVA (art. 50-bis, comma 6, d.l. n. 331F;1993)VJ2 - VJ2:" /> | ||||
|   <field x="5" y="8" type="Testo" align="right" width="80" pattern="1" text="Acquisti di beni e servizi da soggettIi non residenti ai sensi dell\art. 17, comma 2 - VJ3:" /> | ||||
|   <field x="5" y="10" type="Testo" align="right" width="80" pattern="1" text="Operazioni di cui all\art. 74, comma 1, lett. e) - VJ4:" /> | ||||
|   <field x="5" y="12" type="Testo" align="right" width="80" pattern="1" text="Provvigioni corrisposte dalle agenzie di viaggio ai loro intermediari (art. 74-ter, comma 8) - VJ5:" /> | ||||
|   <field x="5" y="14" type="Testo" align="right" width="80" pattern="1" text="Acquisti all\interno di beni di cui all\art. 74, commi 7 e 8) - VJ6:" /> | ||||
|   <field x="5" y="16" type="Testo" align="right" width="80" pattern="1" text="Acquisti all\interno di oro industriale e argento puro (art. 17, comma 5) - VJ7:" /> | ||||
|   <field x="5" y="18" type="Testo" align="right" width="80" pattern="1" text="Acquisti di oro da investimento imponibile per opzione (art. 17, comma 5) - VJ8:" /> | ||||
|   <field x="5" y="20" type="Testo" align="right" width="80" pattern="1" text="Acquisti intracomunitari di beni (inclusi acquisti di oro industriale, argento puro - VJ9:" /> | ||||
|   <field x="1" y="20.75" type="Testo" align="right" width="80" pattern="1" text="e beni di cui all\art. 74, commi 7 e 8)" /> | ||||
|   <field x="4.5" y="22" type="Testo" align="right" width="80" pattern="1" text="Importazioni di beni di cui all\art. 74, commi 7 e 8 senza pagamento - VJ10" /> | ||||
|   <field y="22.75" type="Testo" align="right" width="80" pattern="1" text="dell\IVA in dogana (art. 70, comma 6)" /> | ||||
|   <field x="5" y="24" type="Testo" align="right" width="80" pattern="1" text="Importazioni di oro industriale e argento puro senza pagamento  - VJ11:" /> | ||||
|   <field y="24.75" type="Testo" align="right" width="80" pattern="1" text="dell\IVA in dogana (art. 70, comma 5)" /> | ||||
|   <field y="26" type="Testo" align="right" width="85" pattern="1" text="Acquisti di tartufi da rivenditori dilettanti ed occasionali non muniti di - VJ12:" /> | ||||
|   <field x="2" y="26.75" type="Testo" align="right" width="78" pattern="1" text="partita IVA (art. 1, comma 109, legge n. 311F;2004)" /> | ||||
|   <field x="5" y="28" type="Testo" align="right" width="80" pattern="1" text="Acquisti di servizi resi da subappaltatori nel settore edile (art. 17, comma 6, lett. a) - VJ13:" /> | ||||
|   <field x="5" y="30" type="Testo" align="right" width="80" pattern="1" text="Acquisti di fabbricati (art. 17, comma 6, lett. a-bis) - VJ14:" /> | ||||
|   <field x="5" y="32" type="Testo" align="right" width="80" pattern="1" text="Acquisti di telefoni cellulari (art. 17, comma 6, lett. b) - VJ15:" /> | ||||
|   <field x="4.5" y="34" type="Testo" align="right" width="80" pattern="1" text="Acquisti di prodotti elettronici (art. 17, comma 6, lett. c) - VJ16:" /> | ||||
|   <field x="5" y="36" type="Testo" align="right" width="80" pattern="1" text="Acquisti di servizi del comparto edile e settori connessi (art. 17, comma 6, lett. a-ter) - VJ17:" /> | ||||
|   <field x="5" y="38" type="Testo" align="right" width="80" pattern="1" text="Acquisti di beni e servizi del settore energetico (art. 17, comma 6, lett. d-bis, d-ter e d-quater) - VJ18:" /> | ||||
|   <field x="5" y="40" type="Testo" align="right" width="80" pattern="1" text="Acquisti delle pubbliche amministrazioni, titolari di partita IVA, ai sensi dell\art. 17-ter - VJ19:" /> | ||||
|   <field x="87" y="4" type="Valuta" align="right" width="18" id="11" pattern="1" text="###.###.###,@@" /> | ||||
|   <field x="87" y="6" type="Valuta" align="right" width="18" id="12" pattern="1" text="###.###.###,@@" /> | ||||
|   <field x="87" y="8" type="Valuta" align="right" width="18" id="13" pattern="1" text="###.###.###,@@" /> | ||||
|   <field x="87" y="10" type="Valuta" align="right" width="18" id="14" pattern="1" text="###.###.###,@@" /> | ||||
|   <field x="87" y="12" type="Valuta" align="right" width="18" id="15" pattern="1" text="###.###.###,@@" /> | ||||
|   <field x="87" y="14" type="Valuta" align="right" width="18" id="16" pattern="1" text="###.###.###,@@" /> | ||||
|   <field x="87" y="16" type="Valuta" align="right" width="18" id="17" pattern="1" text="###.###.###,@@" /> | ||||
|   <field x="87" y="18" type="Valuta" align="right" width="18" id="18" pattern="1" text="###.###.###,@@" /> | ||||
|   <field x="87" y="20" type="Valuta" align="right" width="18" id="19" pattern="1" text="###.###.###,@@" /> | ||||
|   <field x="106" y="4" type="Valuta" align="right" width="13" id="21" pattern="1" text="###.###.###,@@" /> | ||||
|   <field x="106" y="6" type="Valuta" align="right" width="13" id="22" pattern="1" text="###.###.###,@@" /> | ||||
|   <field x="106" y="8" type="Valuta" align="right" width="13" id="23" pattern="1" text="###.###.###,@@" /> | ||||
|   <field x="106" y="10" type="Valuta" align="right" width="13" id="24" pattern="1" text="###.###.###,@@" /> | ||||
|   <field x="106" y="12" type="Valuta" align="right" width="13" id="25" pattern="1" text="###.###.###,@@" /> | ||||
|   <field x="106" y="14" type="Valuta" align="right" width="13" id="26" pattern="1" text="###.###.###,@@" /> | ||||
|   <field x="106" y="16" type="Valuta" align="right" width="13" id="27" pattern="1" text="###.###.###,@@" /> | ||||
|   <field x="106" y="18" type="Valuta" align="right" width="13" id="28" pattern="1" text="###.###.###,@@" /> | ||||
|   <field x="106" y="20" type="Valuta" align="right" width="13" id="29" pattern="1" text="###.###.###,@@" /> | ||||
|   <field x="87" y="1" type="Valuta" align="right" width="18" id="100" pattern="1" text="###.###.###,@@" /> | ||||
|   <field x="106" y="1" type="Valuta" align="right" width="13" id="101" pattern="1" text="###.###.###,@@" /> | ||||
|   <field x="87" y="22" type="Valuta" align="right" width="18" id="110" pattern="1" text="###.###.###,@@" /> | ||||
|   <field x="87" y="26" type="Valuta" align="right" width="18" id="112" pattern="1" text="###.###.###,@@" /> | ||||
|   <field x="87" y="28" type="Valuta" align="right" width="18" id="113" pattern="1" text="###.###.###,@@" /> | ||||
|   <field x="87" y="30" type="Valuta" align="right" width="18" id="114" pattern="1" text="###.###.###,@@" /> | ||||
|   <field x="87" y="32" type="Valuta" align="right" width="18" id="115" pattern="1" text="###.###.###,@@" /> | ||||
|   <field x="87" y="34" type="Valuta" align="right" width="18" id="116" pattern="1" text="###.###.###,@@" /> | ||||
|   <field x="87" y="36" type="Valuta" align="right" width="18" id="117" pattern="1" text="###.###.###,@@" /> | ||||
|   <field x="87" y="38" type="Valuta" align="right" width="18" id="118" pattern="1" text="###.###.###,@@" /> | ||||
|   <field x="87" y="40" type="Valuta" align="right" width="18" id="119" pattern="1" text="###.###.###,@@" /> | ||||
|   <field x="87" y="24" type="Valuta" align="right" width="18" id="150" pattern="1" text="###.###.###,@@" /> | ||||
|   <field x="106" y="22" type="Valuta" align="right" width="13" id="210" pattern="1" text="###.###.###,@@" /> | ||||
|   <field x="106" y="26" type="Valuta" align="right" width="13" id="212" pattern="1" text="###.###.###,@@" /> | ||||
|   <field x="106" y="28" type="Valuta" align="right" width="13" id="213" pattern="1" text="###.###.###,@@" /> | ||||
|   <field x="106" y="30" type="Valuta" align="right" width="13" id="214" pattern="1" text="###.###.###,@@" /> | ||||
|   <field x="106" y="32" type="Valuta" align="right" width="13" id="215" pattern="1" text="###.###.###,@@" /> | ||||
|   <field x="106" y="34" type="Valuta" align="right" width="13" id="216" pattern="1" text="###.###.###,@@" /> | ||||
|   <field x="106" y="36" type="Valuta" align="right" width="13" id="217" pattern="1" text="###.###.###,@@" /> | ||||
|   <field x="106" y="38" type="Valuta" align="right" width="13" id="218" pattern="1" text="###.###.###,@@" /> | ||||
|   <field x="106" y="40" type="Valuta" align="right" width="13" id="219" pattern="1" text="###.###.###,@@" /> | ||||
|   <field x="106" y="24" type="Valuta" align="right" width="13" id="250" 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="40" pattern="1"> | ||||
|    <source>#B1.40</source> | ||||
|   </field> | ||||
|   <field x="92" type="Valuta" align="right" width="13" id="100" pattern="1" text="###.###.###,@@"> | ||||
|    <prescript description="F2.100 PRESCRIPT">MESSAGE ADD,F1.100</prescript> | ||||
|   </field> | ||||
|   <field x="105" type="Valuta" align="right" width="10" id="101" pattern="1" hide_zero="1" text="###.###.###,@@"> | ||||
|    <prescript description="F2.101 PRESCRIPT">MESSAGE ADD,F1.101</prescript> | ||||
|   </field> | ||||
|   <field x="116" type="Stringa" width="4" id="105" pattern="1"> | ||||
|    <source>#B1.105</source> | ||||
|   </field> | ||||
|   <field x="121" type="Stringa" width="2" id="110" pattern="1"> | ||||
|    <source>#B1.110</source> | ||||
|   </field> | ||||
|  </section> | ||||
|  <sql>USE RMOVIVA SELECT (23.ANNOIVA=#ANNO)(23.TIPO="F")(26.REGSPIVAE;0) | ||||
| JOIN MOV INTO NUMREG==NUMREG | ||||
| JOIN 20 TO MOV INTO TIPOCF==TIPO CODCF==CODCF | ||||
| JOIN %IVA ALIAS 201 INTO CODTAB==CODIVA | ||||
| JOIN 26 TO MOV INTO CODCAUS==CODCAUS | ||||
| JOIN %STA TO CLIFO ALIAS 202 INTO CODTAB==STATOCF</sql> | ||||
| </report> | ||||
| Before Width: | Height: | Size: 35 KiB After Width: | Height: | Size: 126 KiB | 
| Before Width: | Height: | Size: 138 KiB After Width: | Height: | Size: 149 KiB | 
| Before Width: | Height: | Size: 85 KiB After Width: | Height: | Size: 96 KiB | 
| Before Width: | Height: | Size: 44 KiB After Width: | Height: | Size: 128 KiB | 
| Before Width: | Height: | Size: 51 KiB After Width: | Height: | Size: 116 KiB | 
							
								
								
									
										
											BIN
										
									
								
								src/cg/cg7g00a.pdf
									
									
									
									
									
										Normal file
									
								
							
							
						
						
							
								
								
									
										
											BIN
										
									
								
								src/cg/cg7g00a.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 160 KiB | 
| @ -7,7 +7,7 @@ | ||||
| 
 | ||||
| bool classify_pim(const TRectype& pimr, real& imp, real& iva, tiporec& t, bool tipost) | ||||
| { | ||||
|   static int last_checked = -1;      | ||||
|   int last_checked = 0;      | ||||
|    | ||||
|   // parse CODTAB of pim record
 | ||||
|   const TString80 ctab = pimr.get("CODTAB"); | ||||
| @ -25,11 +25,11 @@ bool classify_pim(const TRectype& pimr, real& imp, real& iva, tiporec& t, bool t | ||||
|    | ||||
|   // cominciamo cosi'                       
 | ||||
|   imp = ZERO; iva = ZERO;                        | ||||
|   bool found = false; | ||||
|    | ||||
|   for (int i = last_checked + 1; i <= MAX_TIPOREC+1; i++) | ||||
|   for (int i = 0; i <= stop_tiporec; i++) | ||||
|   { | ||||
|     tiporec tocheck = (tiporec)i; | ||||
|     bool found = FALSE; | ||||
|      | ||||
|     switch(tocheck) | ||||
|     {            | ||||
| @ -236,16 +236,12 @@ bool classify_pim(const TRectype& pimr, real& imp, real& iva, tiporec& t, bool t | ||||
|       } | ||||
|       break; | ||||
|     }  | ||||
|      | ||||
|     if (i == MAX_TIPOREC+1)  | ||||
|       last_checked = -1;         | ||||
|     else if (found) | ||||
|     if (found) | ||||
|     {       | ||||
|       t = tocheck; | ||||
|       last_checked = i; | ||||
|       break; | ||||
|     } | ||||
|   } | ||||
|    | ||||
|   return last_checked != -1; | ||||
|   return found; | ||||
| } | ||||
|  | ||||
| @ -32,14 +32,11 @@ enum tiporec { acq_norm = 0, vend_norm = 1,   // acquisti e vendite normali | ||||
|                cess_amm                 = 16, // cessioni amministrative
 | ||||
|                vend_rimborso            = 17, // vendite valide per rimborso
 | ||||
|                acq_rimborso             = 18, // acq. validi per rimborso                 
 | ||||
|                acq_bd_ind_art_19        = 19  // acq. con tipo documento BD e tipo detr 9
 | ||||
|                acq_bd_ind_art_19        = 19, // acq. con tipo documento BD e tipo detr 9
 | ||||
| 							 stop_tiporec 	    			= 20 | ||||
|                  // ACHTUNG: se si aggiunge, cambiare sotto!!!
 | ||||
|                }; | ||||
| 
 | ||||
| // questo serve nel cpp ma lo metto qua se no
 | ||||
| // non lo cambiero' mai quando serve                  
 | ||||
| const int MAX_TIPOREC = 19; | ||||
| 
 | ||||
| // --------------------------------------------------------------- 
 | ||||
| // "classifica" un record progressivo IVA passato per reference
 | ||||
| // mette l'imponibile in imp, l'imposta in iva, e in t mette 
 | ||||
|  | ||||