Patch level : 12.0 436
Files correlati : tf Commento : - Aggiunta nuovo programma cambio stato TF0100: - Tolta detraibilità - Tolti campi inutili dalla maschera - Spostata funzione checkRecord in tfutility - Aggiunti (disabilitati) a menù i nuovi programmi git-svn-id: svn://10.65.10.50/branches/R_10_00@24053 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
		
							parent
							
								
									b6fe090da8
								
							
						
					
					
						commit
						fe7c5f30df
					
				| @ -8,10 +8,10 @@ int main(int argc, char** argv) | ||||
| 
 | ||||
|   switch (r) | ||||
|   { | ||||
| 	 | ||||
|   case 1 : rt = tf0200(argc, argv); break;	// Comunicazione Liquidazioni Periodiche IVA
 | ||||
| 	case 3:  rt = tf0400(argc, argv); break;	// Controllo Spesometro
 | ||||
| 	case 4:  rt = tf0500(argc, argv); break;	// Invio IVA
 | ||||
| 	//case 2 : rt = tf0300(argc, argv); break;	// Cambio stato invio
 | ||||
| 	case 3 : rt = tf0400(argc, argv); break;	// Controllo Spesometro
 | ||||
| 	case 4 : rt = tf0500(argc, argv); break;	// Invio IVA
 | ||||
| 	default: rt = tf0100(argc, argv); break;	// Spesometro
 | ||||
|   } | ||||
|   return rt; | ||||
|  | ||||
| @ -3,6 +3,7 @@ | ||||
| 
 | ||||
| int tf0100(int argc, char* argv[]); | ||||
| int tf0200(int argc, char* argv[]); | ||||
| int tf0300(int argc, char* argv[]); | ||||
| int tf0400(int argc, char* argv[]); | ||||
| int tf0500(int argc, char* argv[]); | ||||
| 
 | ||||
|  | ||||
| @ -1325,17 +1325,21 @@ bool TTrFa_app::tff2200(TToken_string* strarr, int nriga) | ||||
| 	TRectype thisMov = cache().get(LF_MOV, strarr->get(_numero)); | ||||
| 	tff2200f.set("PL_ESIGIVA",				is_split_payment(thisMov) ? "S" : is_IVA_diff(thisMov) || is_IVAxCassa(thisMov) ? "D" : "I"); | ||||
| 	tff2200f.set("PL_NATURA",					strarr->get(_natura)); | ||||
| 	 | ||||
| 	/* Tutto disabilitato! *************************************
 | ||||
| 
 | ||||
| 	real det(strarr->get(_detraibile));  | ||||
| 	// Nella conversione la vigola viene persa e 100,00 diventa 10.000 quindi divido 
 | ||||
| 	det /= CENTO; | ||||
| 	if(det > ZERO) | ||||
| 	{ | ||||
| 		tff2200f.set("PL_DETRAIBILE",   det); | ||||
| 		tff2200f.set("PL_DETRAIBILE",   CENTO - det); | ||||
| 	} | ||||
| 	else if(false)	// Sempre disabilitato!
 | ||||
| 	{ | ||||
| 		tff2200f.set("PL_DEDUCIBILE",   "SI"); | ||||
| 	} | ||||
| 	*/ | ||||
| 
 | ||||
| 	tff2200f.set("PL_GESTIONE", "D"); | ||||
| 	return tff2200f.insert(); | ||||
|  | ||||
| @ -342,7 +342,6 @@ BEGIN | ||||
|   ITEM "N5|N5 - IVA in regime del margine" | ||||
|   ITEM "N6|N6 - IVA in reverse charge" | ||||
|   ITEM "N7|N7 - IVA assolta in altro stato U3" | ||||
|   FIELD S12 | ||||
| END | ||||
| 
 | ||||
| STRING A_ALIQUOTA 4 | ||||
| @ -375,26 +374,22 @@ END | ||||
| NUMBER A_IMPONIBILE 12 2 | ||||
| BEGIN | ||||
|   PROMPT 42 8 "Imponibile" | ||||
|   FIELD IMPORTO | ||||
|   CHEKTYPE REQUIRED | ||||
| END | ||||
| 
 | ||||
| NUMBER A_IMPOSTA 12 2 | ||||
| BEGIN | ||||
|  PROMPT 42 9 "Imposta   " | ||||
|   FIELD IMPOSTA | ||||
| END | ||||
| 
 | ||||
| BOOLEAN A_REVERSE | ||||
| BEGIN | ||||
|   PROMPT 1 9 "Reverse charge" | ||||
|   FIELD REVERSE | ||||
| END | ||||
| 
 | ||||
| BOOLEAN A_AUTOFATT | ||||
| BEGIN | ||||
|  PROMPT 25 9 "Autofattura" | ||||
|   FIELD AUTOFATT | ||||
|   FLAGS "D" | ||||
| END | ||||
| 
 | ||||
|  | ||||
| @ -44,7 +44,6 @@ enum filter_fatt | ||||
| 	disabled	// Disabilitate
 | ||||
| }; | ||||
| 
 | ||||
| #define MOV_CUSTOM 10000000 | ||||
| #define SHEET_GAP 101 | ||||
| #define DTE_PROVV "DTE0000001" | ||||
| #define DTR_PROVV "DTR0000001" | ||||
| @ -172,7 +171,6 @@ class TTrFa_cursors : TObject | ||||
| 
 | ||||
| 	TRectype _next(return_code& code, TString& tipocf, TString& codcf, TString& ocfpi);		// Si sposta avanti di un elemento
 | ||||
| 	TRectype _nextCust(return_code& code, TString& tipocf, TString& codcf, TString& ocfpi);		// Si sposta avanti di un elemento tra quelli custom
 | ||||
| 	bool checkRecord(TISAM_recordset* rec); | ||||
| public: | ||||
| 	//TTrFa_cursors();
 | ||||
| 	~TTrFa_cursors(); | ||||
|  | ||||
| @ -152,29 +152,6 @@ TRectype TTrFa_cursors::_nextCust(return_code& code, TString& tipocf, TString& c | ||||
| 	return c_trasfatt->cursor()->curr(); | ||||
| } | ||||
| 
 | ||||
| /* Utilizzo questa funzione per filtrare al meglio i record, tutti i casi che devo omettere verranno rilevati e ritorneranno false
 | ||||
|  * Nota bene: viene sfruttato un puntatore di TISA_Recordset per non creare nuovi oggetti e velocizzare la chiamata | ||||
|  * a questo punto il programma non ha ancora creato un record di $trasfatt con i dati che mi interessano | ||||
|  */ | ||||
| bool TTrFa_cursors::checkRecord(TISAM_recordset* rec) | ||||
| { | ||||
| 
 | ||||
| 	TString keyClifo; keyClifo << rec->get("23.TIPO").as_string() << "|" << rec->get("23.CODCF").as_string(); | ||||
| 	// Salto le schede carburanti
 | ||||
| 	if(cache().get(LF_CLIFO, keyClifo, "ALLEG") == "C") | ||||
| 		return false; | ||||
| 
 | ||||
| 	// Clienti
 | ||||
| 	if(rec->get("23.TIPO").as_string() == "C") | ||||
| 	{ | ||||
| 		// Tolgo tutti i movimenti di sola IVA e in reverse charge o di tipo 3 (Acquisto di beni e servizi di soggetti non residenti)
 | ||||
| 		TCausale caus(rec->get("23.CODCAUS").as_string()); | ||||
| 		if(caus.soloiva() && (caus.reverse_charge() || caus.regime_speciale() == 3)) | ||||
| 			return false; | ||||
| 	} | ||||
| 
 | ||||
| 	return true; | ||||
| } | ||||
| 
 | ||||
| int TTrFa_cursors::updateFilters(const char tipocf, const long codcf, TDate dal, TDate al, int cod) | ||||
| { | ||||
|  | ||||
| @ -3,7 +3,9 @@ Caption = "Trasferimento Fatture" | ||||
| Picture = <cg01> | ||||
| Module  = tf | ||||
| Flags   = "" | ||||
| Item_01 = "Trasferimento Fatture", "tf0 -0", "" | ||||
| Item_02 = "Controllo Spesometro", "tf0 -3", "" | ||||
| Item_03 = "Liquidazione IVA Periodica", "tf0 -1", "" | ||||
| Item_04 = "Invio Liquidazione IVA Periodica", "tf0 -4", "" | ||||
| Item_01 = "Trasferimento Fatture", "tf0 -0", ""+ | ||||
| //Item_02 = "Cambio stato Spesometro", "tf0 -2", "" | ||||
| //Item_03 = "Controllo Spesometro", "tf0 -3", "" | ||||
| Item_04 = "Report Spesometro", "ba8 -4 totiva_aliq.rep", "" | ||||
| Item_05 = "Liquidazione IVA Periodica", "tf0 -1", "" | ||||
| Item_06 = "Invio Liquidazione IVA Periodica", "tf0 -4", "" | ||||
|  | ||||
| @ -75,4 +75,33 @@ TString getRFSO(TString codrfso) | ||||
| { | ||||
| 	TString key; key << codrfso[0] << "|" << codrfso.mid(1); | ||||
| 	return cache().get(LF_ANAG, key, "RAGSOC"); | ||||
| } | ||||
| 
 | ||||
| /* Utilizzo questa funzione per filtrare al meglio i record, tutti i casi che devo omettere verranno rilevati e ritorneranno false
 | ||||
|  * Nota bene: viene sfruttato un puntatore di TISA_Recordset per non creare nuovi oggetti e velocizzare la chiamata | ||||
|  * a questo punto il programma non ha ancora creato un record di $trasfatt con i dati che mi interessano | ||||
|  */ | ||||
| bool checkRecord(TISAM_recordset* rec) | ||||
| { | ||||
| 
 | ||||
| 	TString keyClifo; keyClifo << rec->get("23.TIPO").as_string() << "|" << rec->get("23.CODCF").as_string(); | ||||
| 	TRectype rclifo = cache().get(LF_CLIFO, keyClifo); | ||||
| 	// Salto le schede carburanti
 | ||||
| 	if(rclifo.get("ALLEG") == "C") | ||||
| 		return false; | ||||
| 
 | ||||
| 	// Clienti
 | ||||
| 	if(rec->get("23.TIPO").as_string() == "C") | ||||
| 	{ | ||||
| 		// Tolgo tutti i movimenti di sola IVA e in reverse charge o di tipo 3 (Acquisto di beni e servizi di soggetti non residenti)
 | ||||
| 		TCausale caus(rec->get("23.CODCAUS").as_string()); | ||||
| 		if(caus.soloiva() && (caus.reverse_charge() || caus.regime_speciale() == 3)) | ||||
| 			return false; | ||||
| 	} else if(rclifo.get("PAIV")[0] != '0' && rclifo.get("PAIV")[0] != '1' && rclifo.get("COFI")[0] >= '8') | ||||
| 		// Salto tutti i fornitori con cod cf che inizia per 8 o 9 e con p.iva non valida
 | ||||
| 	{ | ||||
| 		return false; | ||||
| 	} | ||||
| 
 | ||||
| 	return true; | ||||
| } | ||||
| @ -1,7 +1,9 @@ | ||||
| #include <strings.h> | ||||
| #include <recset.h> | ||||
| 
 | ||||
| // Funzioni comode per più programmi
 | ||||
| // Funzioni/Costanti comode per più programmi
 | ||||
| 
 | ||||
| #define MOV_CUSTOM 10000000 | ||||
| 
 | ||||
| // Ritorna il record custom
 | ||||
| TRectype getTrasFatt(TString reg, TString codiva); | ||||
| @ -18,4 +20,6 @@ TString findDetraib(TString tipodet); | ||||
| // Ritorna "X" se ha il reverse charge
 | ||||
| TString revCharge(TString numreg); | ||||
| // Ritorna la ragione sociale del RFSO
 | ||||
| TString getRFSO(TString codrfso); | ||||
| TString getRFSO(TString codrfso); | ||||
| // Controllo che sia un record che mi interessa
 | ||||
| bool checkRecord(TISAM_recordset* rec); | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user