Patch level : 12.0 726
Files correlati : fp Commento : - Migliorata nuova gestione TPaf_container: Aggiunto metodo set_keys_paf che pulisce e setta hfatt e bfatt - Tolte linee di codice ora inutili - Ottimizzate inizializzazioni - Aggiunta scrittura CONAI - Trasformati alcuni cast in C++ cast - Modificato FOR_EACH_ASSOC_OBJECT in un ciclo for normale perchè andava in loop
This commit is contained in:
		
							parent
							
								
									1f8100a976
								
							
						
					
					
						commit
						bbb87fd00f
					
				@ -66,6 +66,8 @@ public:
 | 
			
		||||
	void            set(const char* fld, bool            var);
 | 
			
		||||
	const TString   sq_get(const char* fld) const;
 | 
			
		||||
	bool						is_full() const { return _fields.items() > _key.items(); }
 | 
			
		||||
	const TString&	get_table() const { return _table; }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
	TString& insert_string();
 | 
			
		||||
	bool insert();
 | 
			
		||||
@ -94,6 +96,7 @@ class TPaf_container : public TObject
 | 
			
		||||
public:
 | 
			
		||||
	TPaf_record& get_paf(const char * paf);
 | 
			
		||||
	bool clean_and_erase_paf(const TString& hfatt, const TString& bfatt);
 | 
			
		||||
	static void set_keys_paf(TPaf_record& paf, const TString& hfatt, const TString& bfatt, const bool reset = true);
 | 
			
		||||
	TPaf_container();
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
@ -127,7 +130,8 @@ private:
 | 
			
		||||
	bool							_is_pa;
 | 
			
		||||
	bool							_has_bolla;
 | 
			
		||||
	TString						_codivadefault;
 | 
			
		||||
	long							_index_cassa_previdenziale;
 | 
			
		||||
	long							_idx_cassa_previdenziale;
 | 
			
		||||
	long							_idx_adg_doc_row; // Indice per la tabella altri dati gestionali della riga
 | 
			
		||||
	int								_num_linea;
 | 
			
		||||
	int								_counter;
 | 
			
		||||
	TPaf_container		_paf_container;
 | 
			
		||||
@ -157,6 +161,7 @@ private:
 | 
			
		||||
	int             find_ancestors(const TRiga_documento& rdoc, TArray& ancestors) const;
 | 
			
		||||
	bool						insert(TPaf_record& p);
 | 
			
		||||
	bool						remove(TPaf_record& p);
 | 
			
		||||
	void						reset(TPaf_record& p) const { TPaf_container::set_keys_paf(p, _hfatt, _bfatt); }
 | 
			
		||||
	bool						save_paf();
 | 
			
		||||
	
 | 
			
		||||
 | 
			
		||||
@ -202,10 +207,6 @@ protected:
 | 
			
		||||
	//void			set_rec_clifo(char tipocf, long codcf);
 | 
			
		||||
 | 
			
		||||
public:
 | 
			
		||||
	// Set Altri Dati Gestionali
 | 
			
		||||
	void set_ads(int r);
 | 
			
		||||
	// Get Altri Dati Gestionali
 | 
			
		||||
	void get_ads();
 | 
			
		||||
	bool doc_to_paf(TDocumentoEsteso& doc);
 | 
			
		||||
	bool doc_to_paf(const TRectype&   rec);
 | 
			
		||||
	bool doc_to_paf(const TDoc_key&   key);
 | 
			
		||||
 | 
			
		||||
@ -474,20 +474,22 @@ bool TPaf_container::clean_and_erase_paf(const TString& hfatt, const TString& bf
 | 
			
		||||
	bool ok = true;
 | 
			
		||||
	for (auto i = _pafs.begin(); i != _pafs.end() && ok; ++i)
 | 
			
		||||
	{
 | 
			
		||||
		if (i->second.is_full())
 | 
			
		||||
		{
 | 
			
		||||
			if (strcmp(i->first, "PAF0200F") != 0)
 | 
			
		||||
				i->second.reset();
 | 
			
		||||
		}
 | 
			
		||||
		const char * prefix = paf_to_prefix(i->first);
 | 
			
		||||
 | 
			
		||||
		i->second.set(TString(prefix) << "_KEYHEADERFATT", hfatt);
 | 
			
		||||
		i->second.set(TString(prefix) << "_KEYBODYFATT", bfatt);
 | 
			
		||||
		set_keys_paf(i->second, hfatt, bfatt, strcmp(i->first, "PAF0200F") != 0);
 | 
			
		||||
		ok = i->second.remove();
 | 
			
		||||
	}
 | 
			
		||||
	return ok;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void TPaf_container::set_keys_paf(TPaf_record& paf, const TString& hfatt, const TString& bfatt, const bool reset)
 | 
			
		||||
{
 | 
			
		||||
	if (reset)
 | 
			
		||||
		paf.reset();
 | 
			
		||||
 | 
			
		||||
	const char * prefix = paf_to_prefix(paf.get_table());
 | 
			
		||||
	paf.set(TString(prefix) << "_KEYHEADERFATT", hfatt);
 | 
			
		||||
	paf.set(TString(prefix) << "_KEYBODYFATT", bfatt);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
const char* TPaf_container::paf_to_prefix(const char * paf)
 | 
			
		||||
{
 | 
			
		||||
	static TString paf_name;
 | 
			
		||||
@ -994,7 +996,7 @@ bool TDoc_fp::initialize(TDocumentoEsteso& doc)
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	// Azzero indici
 | 
			
		||||
	_index_cassa_previdenziale = 1;
 | 
			
		||||
	_idx_cassa_previdenziale = 1;
 | 
			
		||||
 | 
			
		||||
	if(check_initial(doc) || fp_settings().get_check_not_block())
 | 
			
		||||
	{
 | 
			
		||||
@ -1262,9 +1264,7 @@ void TDoc_fp::add_ritenuta(const TDocumentoEsteso& doc, const TSpesa_prest& sp,
 | 
			
		||||
bool TDoc_fp::add_riepilogo_iva(TPaf_record& paf2200f, const TCodiceIVA& cod_iva, const char* eiva, const real& imponibile,
 | 
			
		||||
	const real& imposta)
 | 
			
		||||
{
 | 
			
		||||
	paf2200f.reset();
 | 
			
		||||
	paf2200f.set("PL_KEYHEADERFATT", _hfatt);
 | 
			
		||||
	paf2200f.set("PL_KEYBODYFATT", _bfatt);
 | 
			
		||||
	reset(paf2200f);
 | 
			
		||||
	
 | 
			
		||||
	const real            aliquota = cod_iva.percentuale();
 | 
			
		||||
	const TString&				cod_aliquota = cod_iva.codice();
 | 
			
		||||
@ -1302,17 +1302,8 @@ bool TDoc_fp::add_riepilogo_iva(TPaf_record& paf2200f, const TCodiceIVA& cod_iva
 | 
			
		||||
bool TDoc_fp::add_cassa_previdenziale(TRiga_documento& rdoc)
 | 
			
		||||
{
 | 
			
		||||
	TPaf_record& paf0800f = _paf_container.get_paf("PAF0800F");
 | 
			
		||||
	paf0800f.reset();
 | 
			
		||||
	if (_index_cassa_previdenziale == 1)
 | 
			
		||||
	{
 | 
			
		||||
		paf0800f.set("P8_KEYHEADERFATT", _hfatt);
 | 
			
		||||
		paf0800f.set("P8_KEYBODYFATT", _bfatt);
 | 
			
		||||
		remove(paf0800f);
 | 
			
		||||
	}
 | 
			
		||||
	// Chiavi
 | 
			
		||||
	paf0800f.set("P8_KEYHEADERFATT", _hfatt);
 | 
			
		||||
	paf0800f.set("P8_KEYBODYFATT", _bfatt);
 | 
			
		||||
	paf0800f.set("P8_RIFNUMLINEA", _index_cassa_previdenziale++);
 | 
			
		||||
	reset(paf0800f);
 | 
			
		||||
	paf0800f.set("P8_RIFNUMLINEA", _idx_cassa_previdenziale++);
 | 
			
		||||
 | 
			
		||||
	// Resto
 | 
			
		||||
	const TSpesa_prest& sp = rdoc.spesa();
 | 
			
		||||
@ -1379,17 +1370,6 @@ bool TDoc_fp::export_paf3200f()
 | 
			
		||||
	return true;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void TDoc_fp::set_ads(int r)
 | 
			
		||||
{
 | 
			
		||||
	_num_linea = r;
 | 
			
		||||
	_counter = 0;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void TDoc_fp::get_ads()
 | 
			
		||||
{
 | 
			
		||||
	//static TPaf_record paf2000f;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
bool TDoc_fp::doc_to_paf(TDocumentoEsteso& doc)
 | 
			
		||||
{
 | 
			
		||||
	if (!initialize(doc))
 | 
			
		||||
@ -1643,43 +1623,37 @@ bool TDoc_fp::doc_to_paf(TDocumentoEsteso& doc)
 | 
			
		||||
		if (check_row(*rdoc) && !fp_settings().get_check_not_block())
 | 
			
		||||
			return false;
 | 
			
		||||
 | 
			
		||||
		set_ads(r);
 | 
			
		||||
		_idx_adg_doc_row = 1L;
 | 
			
		||||
 | 
			
		||||
		bool      skip_riga = false;
 | 
			
		||||
		paf1800f.reset();
 | 
			
		||||
		paf1800f.set("PI_KEYHEADERFATT", _hfatt);
 | 
			
		||||
		paf1800f.set("PI_KEYBODYFATT", _bfatt);
 | 
			
		||||
		
 | 
			
		||||
		reset(paf1800f);
 | 
			
		||||
		paf1800f.set("PI_NUMEROLINEA", riga);
 | 
			
		||||
		const TString& descrizione_riga = descrizione(*rdoc);
 | 
			
		||||
		if (descrizione_riga.empty())
 | 
			
		||||
			continue;
 | 
			
		||||
		paf3000f.reset();
 | 
			
		||||
		paf3000f.set("PT_KEYHEADERFATT", _hfatt);
 | 
			
		||||
		paf3000f.set("PT_KEYBODYFATT", _bfatt);
 | 
			
		||||
 | 
			
		||||
		reset(paf3000f);
 | 
			
		||||
		paf3000f.set("PT_RIFNUMLINEA", riga);
 | 
			
		||||
		paf3000f.set("PT_COMMENTO", descrizione_riga);
 | 
			
		||||
		// <CodiceArticolo>
 | 
			
		||||
		if (rdoc->is_articolo())
 | 
			
		||||
		{
 | 
			
		||||
			TString codartmag = rdoc->get(RDOC_CODARTMAG);
 | 
			
		||||
			TString codart = rdoc->get(RDOC_CODART);
 | 
			
		||||
			const TString& codartmag = rdoc->get(RDOC_CODARTMAG);
 | 
			
		||||
			const TString& codart = rdoc->get(RDOC_CODART);
 | 
			
		||||
			long riga_art = 0;
 | 
			
		||||
			if (codart.full())
 | 
			
		||||
			{
 | 
			
		||||
				if (codartmag.full())
 | 
			
		||||
				{
 | 
			
		||||
					paf1900f.reset();
 | 
			
		||||
					paf1900f.set("PY_KEYHEADERFATT", _hfatt);
 | 
			
		||||
					paf1900f.set("PY_KEYBODYFATT", _bfatt);
 | 
			
		||||
					reset(paf1900f);
 | 
			
		||||
					paf1900f.set("PY_KEYNLINEA", riga);
 | 
			
		||||
					ok &= add_row_art(riga_art, "Codice articolo interno", codartmag, paf1900f);
 | 
			
		||||
				}
 | 
			
		||||
				// Se il codice articolo del magazzino è diverso quello è del cliente
 | 
			
		||||
				if (codart.full() && codart != codartmag)
 | 
			
		||||
				{
 | 
			
		||||
					paf1900f.reset();
 | 
			
		||||
					paf1900f.set("PY_KEYHEADERFATT", _hfatt);
 | 
			
		||||
					paf1900f.set("PY_KEYBODYFATT", _bfatt);
 | 
			
		||||
					reset(paf1900f);
 | 
			
		||||
					paf1900f.set("PY_KEYNLINEA", riga);
 | 
			
		||||
					ok &= add_row_art(riga_art, "Codice articolo cliente", codart, paf1900f);
 | 
			
		||||
				}
 | 
			
		||||
@ -1689,7 +1663,16 @@ bool TDoc_fp::doc_to_paf(TDocumentoEsteso& doc)
 | 
			
		||||
					const TString conai_fld(conai_peso_name(cc, LF_RIGHEDOC));
 | 
			
		||||
					if(rdoc->get(conai_fld).full())
 | 
			
		||||
					{
 | 
			
		||||
						reset(paf2100f);
 | 
			
		||||
						paf2100f.set("PK_KEYNLINEA", static_cast<long>(r));
 | 
			
		||||
						paf2100f.set("PK_KEYNLINAR", _idx_adg_doc_row++);
 | 
			
		||||
						static TString msg_conai;
 | 
			
		||||
						msg_conai.cut(0) << "Contributo CONAI " << conai_material(cc) << " (KG)";
 | 
			
		||||
						paf2100f.set("PK_TIPODATO", "CONAI");
 | 
			
		||||
						paf2100f.set("PK_RIFDATO", msg_conai);
 | 
			
		||||
						paf2100f.set("PK_RIFNUMERO", rdoc->get_real(conai_fld).string());
 | 
			
		||||
 | 
			
		||||
						ok &= insert(paf2100f);
 | 
			
		||||
					}
 | 
			
		||||
				}
 | 
			
		||||
			}
 | 
			
		||||
@ -1731,14 +1714,12 @@ bool TDoc_fp::doc_to_paf(TDocumentoEsteso& doc)
 | 
			
		||||
			for (int i = ancestors.last(); i > 0; i = ancestors.pred(i))
 | 
			
		||||
			{
 | 
			
		||||
				_has_bolla |= true;
 | 
			
		||||
				const TAncestor& a = (const TAncestor&)ancestors[i];
 | 
			
		||||
				const TAncestor& a = dynamic_cast<const TAncestor&>(ancestors[i]);
 | 
			
		||||
				if (i == 1)
 | 
			
		||||
				{
 | 
			
		||||
						// <DatiDDT>
 | 
			
		||||
						paf1600f.reset();
 | 
			
		||||
						paf1600f.set("PF_KEYHEADERFATT", _hfatt);
 | 
			
		||||
						paf1600f.set("PF_KEYBODYFATT", _bfatt);
 | 
			
		||||
						paf1600f.set("PF_RIFNUMLINEA", (long)r);
 | 
			
		||||
						reset(paf1600f);
 | 
			
		||||
						paf1600f.set("PF_RIFNUMLINEA", static_cast<long>(r));
 | 
			
		||||
						paf1600f.set("PF_NUMDDDT", a._numdoc);
 | 
			
		||||
						paf1600f.set("PF_DATADDT", a._datadoc);
 | 
			
		||||
						paf1600f.set("PF_GESTIONE", "D");
 | 
			
		||||
@ -1750,7 +1731,7 @@ bool TDoc_fp::doc_to_paf(TDocumentoEsteso& doc)
 | 
			
		||||
						// <DatiOrdineAcquisto>
 | 
			
		||||
						paf1000f.set("P0_KEYHEADERFATT", _hfatt);
 | 
			
		||||
						paf1000f.set("P0_KEYBODYFATT", _bfatt);
 | 
			
		||||
						paf1000f.set("P0_RIFNUMLINEA", (long)r);
 | 
			
		||||
						paf1000f.set("P0_RIFNUMLINEA", static_cast<long>(r));
 | 
			
		||||
						paf1000f.set("P0_IDDOC", a._numdoc);
 | 
			
		||||
						paf1000f.set("P0_DATADOC", a._datadoc);
 | 
			
		||||
						paf1000f.set("P0_COMMESSACONV", com);
 | 
			
		||||
@ -1847,8 +1828,9 @@ bool TDoc_fp::doc_to_paf(TDocumentoEsteso& doc)
 | 
			
		||||
			set_qta_prezzo(paf1800f, rdoc);
 | 
			
		||||
			set_IVA(*rdoc, paf1800f);
 | 
			
		||||
 | 
			
		||||
			reset(paf2100f);
 | 
			
		||||
			paf2100f.set("PK_KEYNLINEA", static_cast<long>(r));
 | 
			
		||||
			paf2100f.set("PK_KEYNLINAR", 1L);
 | 
			
		||||
			paf2100f.set("PK_KEYNLINAR", _idx_adg_doc_row++);
 | 
			
		||||
			paf2100f.set("PK_TIPODATO", "AswTRiga");
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -1935,13 +1917,9 @@ bool TDoc_fp::doc_to_paf(TDocumentoEsteso& doc)
 | 
			
		||||
		if(doc.ha_riga_esenzione())
 | 
			
		||||
		{
 | 
			
		||||
			const TRiga_documento& riga_es = doc.get_riga_esenzione();
 | 
			
		||||
			paf1800f.reset();
 | 
			
		||||
			paf1800f.set("PI_KEYHEADERFATT", _hfatt);
 | 
			
		||||
			paf1800f.set("PI_KEYBODYFATT", _bfatt);
 | 
			
		||||
			reset(paf1800f);
 | 
			
		||||
			paf1800f.set("PI_NUMEROLINEA", riga);
 | 
			
		||||
			paf3000f.reset();
 | 
			
		||||
			paf3000f.set("PT_KEYHEADERFATT", _hfatt);
 | 
			
		||||
			paf3000f.set("PT_KEYBODYFATT", _bfatt);
 | 
			
		||||
			reset(paf3000f);
 | 
			
		||||
			paf3000f.set("PT_RIFNUMLINEA", riga);
 | 
			
		||||
			paf3000f.set("PT_COMMENTO", descrizione(riga_es));
 | 
			
		||||
			paf1800f.set("PI_QUANTITA", UNO);
 | 
			
		||||
@ -1949,18 +1927,15 @@ bool TDoc_fp::doc_to_paf(TDocumentoEsteso& doc)
 | 
			
		||||
			paf1800f.set("PI_PRZTOTALE", ZERO);
 | 
			
		||||
			set_IVA(_codivadefault, paf1800f);
 | 
			
		||||
			ok &= insert(paf1800f) && insert(paf3000f); 
 | 
			
		||||
			riga++;
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
	// Se il bollo va fatto pagare bisogna aggiungere una riga!
 | 
			
		||||
	if(doc.get_bool("ADDBOLLI") && doc.get_real("BOLLI") > ZERO)
 | 
			
		||||
	{
 | 
			
		||||
		paf1800f.reset();
 | 
			
		||||
		paf1800f.set("PI_KEYHEADERFATT", _hfatt);
 | 
			
		||||
		paf1800f.set("PI_KEYBODYFATT", _bfatt);
 | 
			
		||||
		reset(paf1800f);
 | 
			
		||||
		paf1800f.set("PI_NUMEROLINEA", riga);
 | 
			
		||||
		paf3000f.reset();
 | 
			
		||||
		paf3000f.set("PT_KEYHEADERFATT", _hfatt);
 | 
			
		||||
		paf3000f.set("PT_KEYBODYFATT", _bfatt);
 | 
			
		||||
		reset(paf3000f);
 | 
			
		||||
		paf3000f.set("PT_RIFNUMLINEA", riga);
 | 
			
		||||
		paf3000f.set("PT_COMMENTO", "Imposta di bollo assolta virtualmente ai sensi dell'art. 6 D.M. 17.6.2014");
 | 
			
		||||
		paf1800f.set("PI_QUANTITA", UNO);
 | 
			
		||||
@ -1968,18 +1943,15 @@ bool TDoc_fp::doc_to_paf(TDocumentoEsteso& doc)
 | 
			
		||||
		paf1800f.set("PI_PRZTOTALE", converti_prezzo(doc.get_real("BOLLI")));
 | 
			
		||||
		set_IVA(doc.codiva_bolli(), paf1800f);
 | 
			
		||||
		ok &= insert(paf1800f) && insert(paf3000f);
 | 
			
		||||
		riga++;
 | 
			
		||||
	}
 | 
			
		||||
	// OMAGGI????
 | 
			
		||||
	// Aggiungo le spese incasso
 | 
			
		||||
	if(doc.get_real("SPESINC") > ZERO)
 | 
			
		||||
	{
 | 
			
		||||
		paf1800f.reset();
 | 
			
		||||
		paf1800f.set("PI_KEYHEADERFATT", _hfatt);
 | 
			
		||||
		paf1800f.set("PI_KEYBODYFATT", _bfatt);
 | 
			
		||||
		reset(paf1800f);
 | 
			
		||||
		paf1800f.set("PI_NUMEROLINEA", riga);
 | 
			
		||||
		paf3000f.reset();
 | 
			
		||||
		paf3000f.set("PT_KEYHEADERFATT", _hfatt);
 | 
			
		||||
		paf3000f.set("PT_KEYBODYFATT", _bfatt);
 | 
			
		||||
		reset(paf3000f);
 | 
			
		||||
		paf3000f.set("PT_RIFNUMLINEA", riga);
 | 
			
		||||
		paf3000f.set("PT_COMMENTO", "Spese incasso");
 | 
			
		||||
		paf1800f.set("PI_QUANTITA", UNO);
 | 
			
		||||
@ -1989,17 +1961,14 @@ bool TDoc_fp::doc_to_paf(TDocumentoEsteso& doc)
 | 
			
		||||
		
 | 
			
		||||
		set_IVA(ini_get_string(CONFIG_DITTA, "ve", "SPINCODIVA"), paf1800f);
 | 
			
		||||
		ok &= insert(paf1800f) && insert(paf3000f);
 | 
			
		||||
		riga++;
 | 
			
		||||
	}
 | 
			
		||||
	// Conai assolto
 | 
			
		||||
	if(doc.clifor().vendite().get_bool("CONAIASS"))
 | 
			
		||||
	{
 | 
			
		||||
		paf1800f.reset();
 | 
			
		||||
		paf1800f.set("PI_KEYHEADERFATT", _hfatt);
 | 
			
		||||
		paf1800f.set("PI_KEYBODYFATT", _bfatt);
 | 
			
		||||
		reset(paf1800f);
 | 
			
		||||
		paf1800f.set("PI_NUMEROLINEA", riga);
 | 
			
		||||
		paf3000f.reset();
 | 
			
		||||
		paf3000f.set("PT_KEYHEADERFATT", _hfatt);
 | 
			
		||||
		paf3000f.set("PT_KEYBODYFATT", _bfatt);
 | 
			
		||||
		reset(paf3000f);
 | 
			
		||||
		paf3000f.set("PT_RIFNUMLINEA", riga);
 | 
			
		||||
		paf3000f.set("PT_COMMENTO", _conai_str);
 | 
			
		||||
		paf1800f.set("PI_QUANTITA", UNO);
 | 
			
		||||
@ -2007,6 +1976,7 @@ bool TDoc_fp::doc_to_paf(TDocumentoEsteso& doc)
 | 
			
		||||
		paf1800f.set("PI_PRZTOTALE", ZERO);
 | 
			
		||||
		set_IVA(_codivadefault, paf1800f);
 | 
			
		||||
		ok &= insert(paf1800f) && insert(paf3000f);
 | 
			
		||||
		riga++;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	// Riga sconto di testata
 | 
			
		||||
@ -2018,13 +1988,9 @@ bool TDoc_fp::doc_to_paf(TDocumentoEsteso& doc)
 | 
			
		||||
		{
 | 
			
		||||
			const TRiepilogo_iva& riva = *dynamic_cast<const TRiepilogo_iva*>(itm);
 | 
			
		||||
 | 
			
		||||
			paf1800f.reset();
 | 
			
		||||
			paf1800f.set("PI_KEYHEADERFATT", _hfatt);
 | 
			
		||||
			paf1800f.set("PI_KEYBODYFATT", _bfatt);
 | 
			
		||||
			reset(paf1800f);
 | 
			
		||||
			paf1800f.set("PI_NUMEROLINEA", riga);
 | 
			
		||||
			paf3000f.reset();
 | 
			
		||||
			paf3000f.set("PT_KEYHEADERFATT", _hfatt);
 | 
			
		||||
			paf3000f.set("PT_KEYBODYFATT", _bfatt);
 | 
			
		||||
			reset(paf3000f);
 | 
			
		||||
			paf3000f.set("PT_RIFNUMLINEA", riga);
 | 
			
		||||
			paf1800f.set("PI_TIPOCESSPREST", "AB");
 | 
			
		||||
			TString msg = "Riga sconto merci in testata "; 
 | 
			
		||||
@ -2038,6 +2004,7 @@ bool TDoc_fp::doc_to_paf(TDocumentoEsteso& doc)
 | 
			
		||||
			paf1800f.set("PI_PRZTOTALE", -abs(riva.sconto_perc()));
 | 
			
		||||
			set_IVA(riva.cod_iva().codice(), paf1800f);
 | 
			
		||||
			ok &= insert(paf1800f) && insert(paf3000f);
 | 
			
		||||
			riga++;
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
@ -2083,7 +2050,7 @@ bool TDoc_fp::doc_to_paf(TDocumentoEsteso& doc)
 | 
			
		||||
	const char* eiva = get_esigibilita_iva(doc);
 | 
			
		||||
	long          num_riep = 0;
 | 
			
		||||
	TAssoc_array& tiva = doc.tabella_iva(false);
 | 
			
		||||
	FOR_EACH_ASSOC_OBJECT(tiva, obj, key, itm)
 | 
			
		||||
	for(TObject* itm = tiva.first_item(); itm != nullptr; itm = tiva.succ_item())
 | 
			
		||||
	{
 | 
			
		||||
		const TRiepilogo_iva& riva = *dynamic_cast<const TRiepilogo_iva*>(itm);
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user