Patch level : 12.0 1072
Files correlati : batbtpe.msk f154.dir f154.trr li0400a.msk li0.exe Commento : Aggiunta la possibilità di definire diversi tipi di esenzione da esportare nelle fatture elettroniche con le modificehe consguenti sull fatturazione e la fatturazione elettronica Interno : aggiunta una nuov tabella da indicare nella letera di intento con tipo dato, descrizione per l'invio fatture e flag di stampa sulle fatture della dicitura di esenzione.
This commit is contained in:
		
							parent
							
								
									3e8d4d1bec
								
							
						
					
					
						commit
						2a9d663c09
					
				@ -1753,11 +1753,11 @@ bool TDoc_fp::doc_to_paf(TDocumentoEsteso& doc)
 | 
				
			|||||||
	{
 | 
						{
 | 
				
			||||||
			char tcon = doc.get_char(DOC_MODPAG);
 | 
								char tcon = doc.get_char(DOC_MODPAG);
 | 
				
			||||||
			if (tcon < 'C') tcon = 'C';
 | 
								if (tcon < 'C') tcon = 'C';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			TDate datadoc; // Data contratto non obbligatoria
 | 
								TDate datadoc; // Data contratto non obbligatoria
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			if (con.full())
 | 
								if (con.full())
 | 
				
			||||||
			{
 | 
					 | 
				
			||||||
					datadoc = cco(doc).get_date("D0");
 | 
										datadoc = cco(doc).get_date("D0");
 | 
				
			||||||
			}
 | 
					 | 
				
			||||||
			else
 | 
								else
 | 
				
			||||||
			{
 | 
								{
 | 
				
			||||||
					// IdDocumento obbligatorio
 | 
										// IdDocumento obbligatorio
 | 
				
			||||||
@ -1776,28 +1776,29 @@ bool TDoc_fp::doc_to_paf(TDocumentoEsteso& doc)
 | 
				
			|||||||
					paf1000f.set("P0_GESTIONE", "D");
 | 
										paf1000f.set("P0_GESTIONE", "D");
 | 
				
			||||||
					ok &= insert(paf1000f);
 | 
										ok &= insert(paf1000f);
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
			else if (tcon == 'C')
 | 
					 | 
				
			||||||
			{
 | 
					 | 
				
			||||||
					paf1100f.set("PA_RIFNUMLINEA", 0L);
 | 
					 | 
				
			||||||
					paf1100f.set("PA_IDDOC", con);
 | 
					 | 
				
			||||||
					paf1100f.set("PA_DATADOCU", datadoc);
 | 
					 | 
				
			||||||
					paf1100f.set("PA_COMMCONVENZ", com);
 | 
					 | 
				
			||||||
					paf1100f.set("PA_CODCUP", cup);
 | 
					 | 
				
			||||||
					paf1100f.set("PA_CODCIG", cig);
 | 
					 | 
				
			||||||
					paf1100f.set("PA_GESTIONE", "D");
 | 
					 | 
				
			||||||
					ok &= insert(paf1100f);
 | 
					 | 
				
			||||||
			}
 | 
					 | 
				
			||||||
			else
 | 
								else
 | 
				
			||||||
			{
 | 
					        if (tcon == 'C')
 | 
				
			||||||
					paf1200f.set("PB_RIFNUMLINEA", 0L);
 | 
								  {
 | 
				
			||||||
					paf1200f.set("PB_IDDOC", con);
 | 
										  paf1100f.set("PA_RIFNUMLINEA", 0L);
 | 
				
			||||||
					paf1200f.set("PB_DATADOCO", datadoc);
 | 
										  paf1100f.set("PA_IDDOC", con);
 | 
				
			||||||
					paf1200f.set("PB_COMMCONVENZ", com);
 | 
										  paf1100f.set("PA_DATADOCU", datadoc);
 | 
				
			||||||
					paf1200f.set("PB_CODCUP", cup);
 | 
										  paf1100f.set("PA_COMMCONVENZ", com);
 | 
				
			||||||
					paf1200f.set("PB_CODCIG", cig);
 | 
										  paf1100f.set("PA_CODCUP", cup);
 | 
				
			||||||
					paf1200f.set("PB_GESTIONE", "D");
 | 
										  paf1100f.set("PA_CODCIG", cig);
 | 
				
			||||||
					ok &= insert(paf1200f);
 | 
										  paf1100f.set("PA_GESTIONE", "D");
 | 
				
			||||||
			}
 | 
										  ok &= insert(paf1100f);
 | 
				
			||||||
 | 
								  }
 | 
				
			||||||
 | 
								  else
 | 
				
			||||||
 | 
								  {
 | 
				
			||||||
 | 
										  paf1200f.set("PB_RIFNUMLINEA", 0L);
 | 
				
			||||||
 | 
										  paf1200f.set("PB_IDDOC", con);
 | 
				
			||||||
 | 
										  paf1200f.set("PB_DATADOCO", datadoc);
 | 
				
			||||||
 | 
										  paf1200f.set("PB_COMMCONVENZ", com);
 | 
				
			||||||
 | 
										  paf1200f.set("PB_CODCUP", cup);
 | 
				
			||||||
 | 
										  paf1200f.set("PB_CODCIG", cig);
 | 
				
			||||||
 | 
										  paf1200f.set("PB_GESTIONE", "D");
 | 
				
			||||||
 | 
										  ok &= insert(paf1200f);
 | 
				
			||||||
 | 
								  }
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	if (_is_pa && cup.blank() && cig.blank())
 | 
						if (_is_pa && cup.blank() && cig.blank())
 | 
				
			||||||
			log(1, "CIG e CUP assenti");
 | 
								log(1, "CIG e CUP assenti");
 | 
				
			||||||
@ -2159,22 +2160,30 @@ bool TDoc_fp::doc_to_paf(TDocumentoEsteso& doc)
 | 
				
			|||||||
			paf1800f.set("PI_QUANTITA", UNO);
 | 
								paf1800f.set("PI_QUANTITA", UNO);
 | 
				
			||||||
			paf1800f.set("PI_PREZZOUNIT", ZERO);
 | 
								paf1800f.set("PI_PREZZOUNIT", ZERO);
 | 
				
			||||||
			paf1800f.set("PI_PRZTOTALE", ZERO);
 | 
								paf1800f.set("PI_PRZTOTALE", ZERO);
 | 
				
			||||||
      //descrizione(riga_es);
 | 
					 | 
				
			||||||
			set_IVA(_codivadefault, paf1800f);
 | 
								set_IVA(_codivadefault, paf1800f);
 | 
				
			||||||
      TString dichiar;
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
      ok &= insert(paf1800f) && insert(paf3000f);
 | 
					      ok &= insert(paf1800f) && insert(paf3000f);
 | 
				
			||||||
      TToken_string le_plafs(doc.get("PLAFOND"), ',');
 | 
					      TToken_string le_plafs(doc.get("PLAFOND"), ',');
 | 
				
			||||||
      for (int i = 0; i < le_plafs.items(); i++)
 | 
					      const TLi_manager &  plaf = doc.plafond();
 | 
				
			||||||
 | 
					      TString protinf;
 | 
				
			||||||
 | 
					      TString protins;
 | 
				
			||||||
 | 
					      TDate dataprot;
 | 
				
			||||||
 | 
					      TString rif;
 | 
				
			||||||
 | 
					      TString descr;
 | 
				
			||||||
 | 
					      bool to_print;
 | 
				
			||||||
 | 
					      real utilizzo;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      for (int i = plaf.get_plafond_row(doc, protinf, protins, dataprot, utilizzo, rif, descr, to_print); i >= 0; i = plaf.get_plafond_row(doc, protinf, protins, dataprot, utilizzo, rif, descr, to_print, i))
 | 
				
			||||||
      {
 | 
					      {
 | 
				
			||||||
        static TToken_string this_plaf; this_plaf.cut(0) << le_plafs.get(i);
 | 
					        TString dichiar(descr); 
 | 
				
			||||||
        static TString key; key.cut(0) << this_plaf.get(0) << "|" << this_plaf.get(1);
 | 
					        
 | 
				
			||||||
        TRectype plaf = cache().get(LF_LETINT, key);
 | 
					        dichiar << " : " << protinf; 
 | 
				
			||||||
        dichiar.cut(0) << "N. di protocollo di invio: " << plaf.get(LETINT_PROTINTF) << "-" << plaf.get(LETINT_PROTINTS);
 | 
					        if (protins.full())
 | 
				
			||||||
 | 
					          dichiar << "-" << protins;
 | 
				
			||||||
        reset(paf2100f);
 | 
					        reset(paf2100f);
 | 
				
			||||||
        paf2100f.set("PK_KEYNLINEA", static_cast<long>(riga));
 | 
					        paf2100f.set("PK_KEYNLINEA", static_cast<long>(riga));
 | 
				
			||||||
        paf2100f.set("PK_KEYNLINAR", _idx_adg_doc_row++);
 | 
					        paf2100f.set("PK_KEYNLINAR", _idx_adg_doc_row++);
 | 
				
			||||||
        paf2100f.set("PK_TIPODATO", "Dich.Inten");
 | 
					        paf2100f.set("PK_TIPODATO", rif);
 | 
				
			||||||
        paf2100f.set("PK_RIFDATO", dichiar);
 | 
					        paf2100f.set("PK_RIFDATO", dichiar);
 | 
				
			||||||
        ok &= paf2100f.insert();
 | 
					        ok &= paf2100f.insert();
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
@ -2501,6 +2510,7 @@ bool TDoc_fp::doc_to_paf(TDocumentoEsteso& doc)
 | 
				
			|||||||
	ok &= insert(pafw300f);
 | 
						ok &= insert(pafw300f);
 | 
				
			||||||
	return _to_commit = (ok && save_paf());
 | 
						return _to_commit = (ok && save_paf());
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
bool TDoc_fp::doc_to_paf(const TRectype& rec)
 | 
					bool TDoc_fp::doc_to_paf(const TRectype& rec)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
		TDocumentoEsteso doc;
 | 
							TDocumentoEsteso doc;
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user