Patch level :
Files correlati : Ricompilazione Demo : [ ] Commento : git-svn-id: svn://10.65.10.50/branches/R_10_00@22014 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
		
							parent
							
								
									f7e109f7a4
								
							
						
					
					
						commit
						db2c63af9a
					
				@ -261,11 +261,11 @@ TFatture_recordset::TFatture_recordset()
 | 
			
		||||
	add_field("PAT.DATASCAD",				DA,  8,   7);
 | 
			
		||||
	add_field("PAT.RIFTERMP",				AN,  3,  15, true, "5");
 | 
			
		||||
	add_field("PAT.RELTERMP",				AN,  3,  18);
 | 
			
		||||
	add_field("PAT.UNTEMP",				  AN,  3,  21);
 | 
			
		||||
	add_field("PAT.NUNTEMP",				NU,  3,  24);
 | 
			
		||||
	add_field("PAT.UNTEMP",				  AN,  3,  21, true, "D");
 | 
			
		||||
	add_field("PAT.NUNTEMP",				AN,  3,  24); // alfanumerico per non zerofillarlo
 | 
			
		||||
	add_field("PAT.IMPORTO",				NS, 16,  27);
 | 
			
		||||
	add_field("PAT.DIVISA",			  	AN,  3,  43);
 | 
			
		||||
	add_field("PAT.PERC",						NU,  7,  46);
 | 
			
		||||
	add_field("PAT.PERC",						AN,  7,  46); // alfa per non zerofilled
 | 
			
		||||
	add_field("PAT.DESCRIZ",				AN, 35,  53, true);
 | 
			
		||||
	add_field("PAT.BANCACOD",				AN, 35,  88);
 | 
			
		||||
	add_field("PAT.BANCADESC",			AN, 35, 123);
 | 
			
		||||
@ -288,17 +288,17 @@ TFatture_recordset::TFatture_recordset()
 | 
			
		||||
	add_field("DET.CODDISTU",				AN, 35, 127);
 | 
			
		||||
	add_field("DET.TIPQUANT",				AN,  3, 162);
 | 
			
		||||
	add_field("DET.QTACONS",				NS, 16, 165);
 | 
			
		||||
	add_field("DET.UDMQCONS",				AN,  3, 181);
 | 
			
		||||
	add_field("DET.UDMQCONS",				AN,  3, 181, true, "PCE");
 | 
			
		||||
	add_field("DET.QTAFATT",				NS, 16, 184);
 | 
			
		||||
	add_field("DET.UDMQFATT",				AN,  3, 200);
 | 
			
		||||
	add_field("DET.UDMQFATT",				AN,  3, 200, true, "PCE");
 | 
			
		||||
	add_field("DET.NRCUINTU",				NS, 16, 203, true);
 | 
			
		||||
	add_field("DET.UDMNRCUINTU",		AN,  3, 219, true, "PCE");
 | 
			
		||||
	add_field("DET.PRZUNI",					NS, 16, 222, true);
 | 
			
		||||
	add_field("DET.TIPORPZ",				AN,  3, 238, true, "AAA"); // prezzo netto
 | 
			
		||||
	add_field("DET.UDMPRZUN",				AN,  3, 241, true);
 | 
			
		||||
	add_field("DET.TIPORPZ",				AN,  3, 238, true, "AAB"); // prezzo lordo
 | 
			
		||||
	add_field("DET.UDMPRZUN",				AN,  3, 241, true, "PCE");
 | 
			
		||||
	add_field("DET.PRZUN2",					NS, 16, 244, true);
 | 
			
		||||
	add_field("DET.TIPOPRZ2",				AN,  3, 260, true, "AAB"); // prezzo lordo
 | 
			
		||||
	add_field("DET.UDMPRZUN2",			AN,  3, 263, true);
 | 
			
		||||
	add_field("DET.TIPOPRZ2",				AN,  3, 260, true, "AAA"); // prezzo netto
 | 
			
		||||
	add_field("DET.UDMPRZUN2",			AN,  3, 263, true, "PCE");
 | 
			
		||||
	add_field("DET.IMPORTO",				NS, 16, 266, true);
 | 
			
		||||
	add_field("DET.DIVRIGA",				AN,  3, 282);
 | 
			
		||||
	add_field("DET.IMPORTO2",				NS, 16, 285);
 | 
			
		||||
@ -307,7 +307,7 @@ TFatture_recordset::TFatture_recordset()
 | 
			
		||||
 | 
			
		||||
	// Record DES: descrizione articolo
 | 
			
		||||
	add_field("DES.TIPOREC",				AN,  3,   1, true, "DES");
 | 
			
		||||
	add_field("DES.DESCR",					AN,175,   3, true);
 | 
			
		||||
	add_field("DES.DESCR",					AN,175,   4, true);
 | 
			
		||||
	add_field("DES.FINERECORD",			AN,  2,   0, true, "\r\n");
 | 
			
		||||
 | 
			
		||||
	// Record RFN: riferimenti fatture (obbligatorio per note di credito e debito)
 | 
			
		||||
@ -493,6 +493,7 @@ void THardy_esselunga_fat::add_rec_testata(TFatture_recordset& fat, TDocumento&
 | 
			
		||||
	fat.new_rec("PAT");
 | 
			
		||||
	fat.set("PAT.DESCRIZ", doc.pagamento().name());
 | 
			
		||||
	fat.set("PAT.DATASCAD", doc.pagamento().data_rata(0));
 | 
			
		||||
	fat.set("PAT.IMPORTO", doc.pagamento().importo_rata(0));
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void THardy_esselunga_fat::add_rec_sommario(TFatture_recordset& fat, TDocumento& doc)
 | 
			
		||||
@ -515,6 +516,18 @@ void THardy_esselunga_fat::add_rec_sommario(TFatture_recordset& fat, TDocumento&
 | 
			
		||||
	{
 | 
			
		||||
		fat.new_rec("IVA");
 | 
			
		||||
		fat.set("IVA.DESCRIZ", ri->cod_iva().descrizione());
 | 
			
		||||
		const TString4& tipo = ri->cod_iva().tipo();
 | 
			
		||||
		TString4 tipo_hardy = "S";
 | 
			
		||||
		if (tipo == "ES")
 | 
			
		||||
			tipo_hardy = "X";
 | 
			
		||||
		else 
 | 
			
		||||
			if (tipo == "NI")
 | 
			
		||||
				tipo_hardy = "G";
 | 
			
		||||
			else 
 | 
			
		||||
				if (tipo == "NS")
 | 
			
		||||
					tipo_hardy = "E";
 | 
			
		||||
		fat.set("IVA.CATIMP", tipo_hardy);
 | 
			
		||||
 | 
			
		||||
		fat.set("IVA.ALIQIVA", ri->cod_iva().percentuale());
 | 
			
		||||
		fat.set("IVA.SIMPONIB", ri->imponibile());
 | 
			
		||||
		fat.set("IVA.SIMPORTO", ri->imposta());
 | 
			
		||||
@ -534,10 +547,15 @@ void THardy_esselunga_fat::add_recs_dettaglio(TFatture_recordset& fat, TDocument
 | 
			
		||||
	{		
 | 
			
		||||
		const TString80& codart_esselunga = cache_ca.decode(rigadoc->get(RDOC_CODART));	
 | 
			
		||||
		fat.new_rec("DET");
 | 
			
		||||
		fat.set("DET.NUMRIGA", real(r));
 | 
			
		||||
		long rl(r);
 | 
			
		||||
		fat.set("DET.NUMRIGA", TVariant(rl));
 | 
			
		||||
		fat.set("DET.CODEANCU", codart_esselunga);
 | 
			
		||||
		fat.set("DET.CODDISTU", codart_esselunga);
 | 
			
		||||
		fat.set("DET.TIPQUANT", "L01"); // vendita (sentire da robbi)
 | 
			
		||||
		fat.set("DET.QTACONS", rigadoc->quantita());
 | 
			
		||||
		fat.set("DET.QTAFATT", rigadoc->quantita());
 | 
			
		||||
		fat.set("DET.PRZUNI", rigadoc->prezzo(false, true));
 | 
			
		||||
		fat.set("DET.PRZUN2", rigadoc->prezzo(false, false));
 | 
			
		||||
		fat.set("DET.IMPORTO", rigadoc->importo(false, false));
 | 
			
		||||
 | 
			
		||||
		fat.new_rec("DES");
 | 
			
		||||
@ -564,7 +582,30 @@ void THardy_esselunga_fat::add_recs_dettaglio(TFatture_recordset& fat, TDocument
 | 
			
		||||
 | 
			
		||||
		//fat.new_rec("ALD");
 | 
			
		||||
		fat.new_rec("NAD");
 | 
			
		||||
 | 
			
		||||
		const long codcf = doc.codcf();
 | 
			
		||||
		const long codcf_esselunga = check_cliente(codcf);
 | 
			
		||||
	  TToken_string key;
 | 
			
		||||
		key.add("C"); key.add(codcf);
 | 
			
		||||
		const TRectype& rec_cli = cache().get(LF_CLIFO, key);
 | 
			
		||||
		TString4 stato = rec_cli.get(CLI_STATOCF);
 | 
			
		||||
		TString4 comune = rec_cli.get(CLI_COMCF);
 | 
			
		||||
		key.cut(0);
 | 
			
		||||
		key.add(stato); key.add(comune);
 | 
			
		||||
		const TRectype& com = cache().get(LF_COMUNI, key);
 | 
			
		||||
		fat.set("NAD.CODCONS", codcf_esselunga);
 | 
			
		||||
		fat.set("NAD.RAGSOCD", rec_cli.get(CLI_RAGSOC));	
 | 
			
		||||
		TString80 str;
 | 
			
		||||
		str.cut(0);
 | 
			
		||||
		str << rec_cli.get(CLI_INDCF) << ", " << rec_cli.get(CLI_CIVCF);
 | 
			
		||||
		fat.set("NAD.INDIRD", str);
 | 
			
		||||
		fat.set("NAD.CITTAD", com.get(COM_DENCOM));
 | 
			
		||||
		fat.set("NAD.PROVD", com.get(COM_DENCOM));
 | 
			
		||||
		fat.set("NAD.CAPD", rec_cli.get(CLI_CAPCF));
 | 
			
		||||
		if (stato.empty())
 | 
			
		||||
			stato = "IT";
 | 
			
		||||
		fat.set("NAD.NAZIOD", stato);
 | 
			
		||||
		fat.set("NAD.NUMBOLLA", doc.get(DOC_NUMDOCRIF));
 | 
			
		||||
		fat.set("NAD.DATABOLLA", doc.get(DOC_DATADOCRIF));
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user