Patch level : 12.0 384
Files correlati : tf Commento : Spostato numero di invio in %LIA.I14 git-svn-id: svn://10.65.10.50/branches/R_10_00@23777 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
		
							parent
							
								
									28f385b562
								
							
						
					
					
						commit
						a82d6780fc
					
				@ -32,6 +32,7 @@ const TRectype getLim(int anno, int mese)
 | 
				
			|||||||
	return cache().get("LIM", key);
 | 
						return cache().get("LIM", key);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Ritorna il record richiesto di ivaliq
 | 
				
			||||||
const TRectype getLiq(int anno, int mese)
 | 
					const TRectype getLiq(int anno, int mese)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	TString key; key << anno << "|";
 | 
						TString key; key << anno << "|";
 | 
				
			||||||
@ -41,6 +42,13 @@ const TRectype getLiq(int anno, int mese)
 | 
				
			|||||||
	return cache().get(LF_IVALIQ, key);
 | 
						return cache().get(LF_IVALIQ, key);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Ritorna il record richiesto di tabcom.LIA
 | 
				
			||||||
 | 
					const TRectype getLia(int anno)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						TString key; key << format("%05d", prefix().firm().codice()) << anno;	// %05d Crea un numero di 5 cifre partendo dal codice e mettendoci 0 davanti
 | 
				
			||||||
 | 
						return cache().get("%LIA", key);
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
TString formatCurrency(TString value)
 | 
					TString formatCurrency(TString value)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	real app(value);
 | 
						real app(value);
 | 
				
			||||||
@ -170,10 +178,10 @@ bool TIvaSend_app::generate(TIvaSend_msk& msk)
 | 
				
			|||||||
	ofstream file;
 | 
						ofstream file;
 | 
				
			||||||
	TFilename path(msk.get(F_PATH));
 | 
						TFilename path(msk.get(F_PATH));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	TRectype rowLim = getLim(msk.get_int(F_ANNO), msk.isMese() ? msk.get_int(F_DAMESE) : (((msk.get_int(F_DATRIMESTRE) - 1) * 3) + 1));
 | 
						TRectype rowLia = getLia(msk.get_int(F_ANNO));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	// Decido di utilizzare I10 come numero progressivo di trasmissione
 | 
						// Decido di utilizzare I10 come numero progressivo di trasmissione
 | 
				
			||||||
	int prog = rowLim.get_int("I14"); prog++;
 | 
						int prog = rowLia.get_int("I14"); prog++;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	TString nomeFile; nomeFile << "IT" << getAnagDitta().get("PAIV") << TIPO_FILE << prog << ".csv";
 | 
						TString nomeFile; nomeFile << "IT" << getAnagDitta().get("PAIV") << TIPO_FILE << prog << ".csv";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -189,7 +197,7 @@ bool TIvaSend_app::generate(TIvaSend_msk& msk)
 | 
				
			|||||||
	int end		= msk.isMese() ? msk.get_int(F_AMESE)	 : (((msk.get_int(F_ATRIMESTRE) - 1) * 3) + 1);
 | 
						int end		= msk.isMese() ? msk.get_int(F_AMESE)	 : (((msk.get_int(F_ATRIMESTRE) - 1) * 3) + 1);
 | 
				
			||||||
	for(; start <= end; start++)
 | 
						for(; start <= end; start++)
 | 
				
			||||||
	{
 | 
						{
 | 
				
			||||||
		rowLim = getLim(msk.get_int(F_ANNO), start);					// rowLim viene già usata sopra
 | 
							TRectype rowLim = getLim(msk.get_int(F_ANNO), start);					// rowLim viene già usata sopra
 | 
				
			||||||
		TRectype rowLiq = getLiq(msk.get_int(F_ANNO), start);
 | 
							TRectype rowLiq = getLiq(msk.get_int(F_ANNO), start);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		TToken_string riga(testata);
 | 
							TToken_string riga(testata);
 | 
				
			||||||
@ -237,8 +245,8 @@ bool TIvaSend_app::generate(TIvaSend_msk& msk)
 | 
				
			|||||||
	file.close();
 | 
						file.close();
 | 
				
			||||||
	// Aggiorno l'univoco
 | 
						// Aggiorno l'univoco
 | 
				
			||||||
	
 | 
						
 | 
				
			||||||
	rowLim.put("I14", prog);
 | 
						rowLia.put("I14", prog);
 | 
				
			||||||
	if(rowLim.rewrite(TLocalisamfile(LF_TAB)) != NOERR)
 | 
						if(rowLia.rewrite(TLocalisamfile(LF_TABCOM)) != NOERR)
 | 
				
			||||||
	{
 | 
						{
 | 
				
			||||||
		error_box("Errore aggiornamento progressivo");
 | 
							error_box("Errore aggiornamento progressivo");
 | 
				
			||||||
		return false;
 | 
							return false;
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user