Patch level : 10.0 604
Files correlati : tc1.exe Ricompilazione Demo : [ ] Commento : Invio a Zucchetti git-svn-id: svn://10.65.10.50/trunk@20053 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
		
							parent
							
								
									a0d2afefee
								
							
						
					
					
						commit
						cf6f425d2b
					
				| @ -208,17 +208,17 @@ const TString& TInvio_file::bill2ricl(const char t, int gr, int co, long so) | ||||
| 
 | ||||
| 	if (gr > 0&& co >0 && so > 0) | ||||
| 	{ | ||||
| 		if (t > ' ' || !app().trcon()) | ||||
| 		if (!app().trcon()) | ||||
| 			codricl.format("%d",so); | ||||
| 		else | ||||
| 		{ | ||||
| 			TToken_string cod("ZUCONTI"); | ||||
| 			cod.add(gr); | ||||
| 			cod.add(co); | ||||
| 			cod.add(so); | ||||
| 			cod.add(t <= ' ' ? so : 0); | ||||
| 
 | ||||
| 			// Provo il sottoconto ma se non riesco provo con conto e poi anche gruppo
 | ||||
| 			for (int c = 3; c > 0 && codricl.blank(); c--) | ||||
| 			for (int c = t == ' ' ? 3 : 2; c > 0 && codricl.blank(); c--) | ||||
| 			{ | ||||
| 				const TRectype & rec = app().conti().get(cod); | ||||
| 
 | ||||
| @ -276,7 +276,7 @@ void TInvio_file::validate(TCursor& cur,TRecord_text &rec, TToken_string &s, TSt | ||||
| 		{ | ||||
| 			const int gr = rmov.get_int(RMV_GRUPPO); | ||||
| 			const int co = rmov.get_int(RMV_CONTO); | ||||
| 			const long so = rmov.get_int(RMV_SOTTOCONTO); | ||||
| 			const long so = rmov.get_long(RMV_SOTTOCONTO); | ||||
| 			const char t = rmov.get_char(RMV_TIPOC); | ||||
| 			valore = bill2ricl(t, gr, co, so); | ||||
| 		} | ||||
| @ -454,7 +454,7 @@ void TInvio_file::validate(TCursor& cur,TRecord_text &rec, TToken_string &s, TSt | ||||
| 		{ | ||||
| 			const int gr = rec.get_int(CLI_GRUPPORIC); | ||||
| 			const int co = rec.get_int(CLI_CONTORIC); | ||||
| 			const long so = rec.get_int(CLI_SOTTOCRIC); | ||||
| 			const long so = rec.get_long(CLI_SOTTOCRIC); | ||||
| 		 | ||||
| 			valore = bill2ricl(t, gr, co, so); | ||||
| 		} | ||||
| @ -462,12 +462,53 @@ void TInvio_file::validate(TCursor& cur,TRecord_text &rec, TToken_string &s, TSt | ||||
| 		{ | ||||
| 			const int gr = rec.get_int("GRUPPO"); | ||||
| 			const int co = rec.get_int("CONTO"); | ||||
| 			const long so = rec.get_int("SOTTOCONTO"); | ||||
| 			const long so = rec.get_long("SOTTOCONTO"); | ||||
| 
 | ||||
| 			valore = bill2ricl(t, gr, co, so); | ||||
| 		} | ||||
| 
 | ||||
| 	} | ||||
|   else if (code == "_CFPI") | ||||
|   { | ||||
| 		const TRectype & rmov = cur.curr(LF_RMOV); | ||||
| 		const char sezione = s.get()[0];  	 | ||||
| 		const int fldcod = atoi(s.get()); | ||||
| 		const char sezriga = rmov.get_char(RMV_SEZIONE);		 | ||||
| 
 | ||||
| 		valore = ""; | ||||
| 		if (sezione == sezriga) | ||||
| 		{ | ||||
| 			const TString & t = rmov.get(RMV_TIPOC); | ||||
| 
 | ||||
| 			if (t.full()) | ||||
| 			{ | ||||
| 				TToken_string key(t); | ||||
| 
 | ||||
| 				key.add(rmov.get_long(RMV_SOTTOCONTO)); | ||||
| 
 | ||||
| 				const TRectype & clifo = cache().get(LF_CLIFO, key); | ||||
| 
 | ||||
| 				valore = clifo.get(CLI_COFI); | ||||
| 				if (valore.blank()) | ||||
| 					valore = clifo.get(CLI_PAIV); | ||||
| 			} | ||||
| 		} | ||||
| 		add_field(rec, fldcod, valore.len() == 16 ? "F" : (valore.len() == 0 ? "" : "P")); | ||||
|   } | ||||
|   else if (code == "_CFPIT") | ||||
|   { | ||||
| 		const TRectype & mov = cur.curr(LF_MOV); | ||||
| 		TToken_string key(mov.get(MOV_TIPO)); | ||||
| 		const int fldcod = atoi(s.get()); | ||||
| 
 | ||||
| 		key.add(mov.get_long(MOV_CODCF)); | ||||
| 		const TRectype & clifo = cache().get(LF_CLIFO, key); | ||||
| 
 | ||||
| 		valore = clifo.get(CLI_COFI); | ||||
| 		if (valore.blank()) | ||||
| 			valore = clifo.get(CLI_PAIV); | ||||
| 		add_field(rec, fldcod, valore.len() == 16 ? "F" : (valore.len() == 0 ? "" : "P")); | ||||
| 	} | ||||
|   else NFCHECK("Macro non definita: %s", (const char *)code); | ||||
|   str = valore; | ||||
| } | ||||
|  | ||||
| @ -551,6 +551,7 @@ NAME(23) = CODICE CODIFICA PARTITA IVA | ||||
| TYPE(23) = STRINGA | ||||
| POSITION(23) = 95 | ||||
| LENGTH(23) = 16 | ||||
| MESSAGE(23) = _CFPIT,22 | ||||
| 
 | ||||
| NAME(24) = DESCRIZIONE ALTERNATIVA | ||||
| TYPE(24) = STRINGA | ||||
| @ -675,7 +676,6 @@ NAME(9) = CONTROPARTITA | ||||
| TYPE(9) = NUMERO | ||||
| POSITION(9) = 35 | ||||
| LENGTH(9) = 6 | ||||
| // FIELD(9) = 25->SOTTOCONTO | ||||
| MESSAGE(9)= _CONTO,25,TIPOC | ||||
| 
 | ||||
| NAME(10) = IMPORTO TOTALE EURO | ||||
| @ -790,6 +790,7 @@ NAME(12) = PARTITA IVA DARE | ||||
| TYPE(12) = NUMERO | ||||
| POSITION(12) = 78 | ||||
| LENGTH(12) = 16 | ||||
| MESSAGE(12) = _CFPI,D,11 | ||||
| 
 | ||||
| NAME(13) = TIPO CODIFICA AVERE | ||||
| TYPE(13) = STRINGA | ||||
| @ -800,6 +801,7 @@ NAME(14) = PARTITA IVA AVERE | ||||
| TYPE(14) = NUMERO | ||||
| POSITION(14) = 95 | ||||
| LENGTH(14) = 16 | ||||
| MESSAGE(14) = _CFPI,A,13 | ||||
| 
 | ||||
| NAME(15) = FLAG DIVERSI | ||||
| TYPE(15) = STRINGA | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user