Patch level : 12.0 1032
Files correlati : 770.exe 773100a.msk 771mod.exe 777.exe Commento : Certificazione Unica 2021 Aggiunto parametro di studio per leggere nella generazione la causale quadro dalla causale e non dalla scheda percipiente. Nella generazione separate le schede per causale oltre che per causale quadro. La certificazione mette anche gli importi con tipo 12 e 13 nella altre somme non soggette.
This commit is contained in:
		
							parent
							
								
									8773bc65e4
								
							
						
					
					
						commit
						15d020a2cb
					
				@ -787,6 +787,13 @@ void TSchedaPercipienti::init_modify_mode(TMask& m)
 | 
				
			|||||||
  
 | 
					  
 | 
				
			||||||
  // inizilizza maschera
 | 
					  // inizilizza maschera
 | 
				
			||||||
  init_mask(m, false);
 | 
					  init_mask(m, false);
 | 
				
			||||||
 | 
					  if (ini_get_bool(CONFIG_STUDIO, "77", "CauQFCau"))
 | 
				
			||||||
 | 
					  {
 | 
				
			||||||
 | 
					    const TRectype& caus = cache().get("%CA7", m.get(F_CODCAUS));
 | 
				
			||||||
 | 
					    
 | 
				
			||||||
 | 
					    build_causqua_items(m, caus.get("S1"));
 | 
				
			||||||
 | 
					    m.set(F_CAUSQUA, caus.get("S2"));
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
  
 | 
					  
 | 
				
			||||||
void TSchedaPercipienti::init_insert_mode(TMask& m)
 | 
					void TSchedaPercipienti::init_insert_mode(TMask& m)
 | 
				
			||||||
@ -796,6 +803,7 @@ void TSchedaPercipienti::init_insert_mode(TMask& m)
 | 
				
			|||||||
  // La proposta causale è valida con e senza collegamneto da prima nota
 | 
					  // La proposta causale è valida con e senza collegamneto da prima nota
 | 
				
			||||||
  TToken_string key; key.format("%c|%ld", m.get(F_TIPOA)[0], m.get_long(F_CODANAGR));
 | 
					  TToken_string key; key.format("%c|%ld", m.get(F_TIPOA)[0], m.get_long(F_CODANAGR));
 | 
				
			||||||
  TString4 codcaus = cache().get(LF_ANAG, key, "CAUSQUA");
 | 
					  TString4 codcaus = cache().get(LF_ANAG, key, "CAUSQUA");
 | 
				
			||||||
 | 
					  
 | 
				
			||||||
  if (codcaus.blank())
 | 
					  if (codcaus.blank())
 | 
				
			||||||
  {
 | 
					  {
 | 
				
			||||||
    key.format("%ld|%c|%ld|%d", 
 | 
					    key.format("%ld|%c|%ld|%d", 
 | 
				
			||||||
 | 
				
			|||||||
@ -6,7 +6,7 @@
 | 
				
			|||||||
void TSchedaPercipienti::init_mask(TMask& m, bool inserimento)
 | 
					void TSchedaPercipienti::init_mask(TMask& m, bool inserimento)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
  update_lasts(m);
 | 
					  update_lasts(m);
 | 
				
			||||||
  
 | 
					  m.enable(F_CAUSQUA, !ini_get_bool(CONFIG_STUDIO, "77", "CauQFCau"));
 | 
				
			||||||
  // se collegamento 
 | 
					  // se collegamento 
 | 
				
			||||||
  if (tipo_coll() != nessuno)
 | 
					  if (tipo_coll() != nessuno)
 | 
				
			||||||
  {
 | 
					  {
 | 
				
			||||||
@ -747,6 +747,7 @@ bool TSchedaPercipienti::check_causale(TMask_field& f, KEY k)
 | 
				
			|||||||
    {
 | 
					    {
 | 
				
			||||||
      // forzo causale quadro con il valore in tabella
 | 
					      // forzo causale quadro con il valore in tabella
 | 
				
			||||||
      TEdit_field& f_causqua = m.efield(F_CAUSQUA);
 | 
					      TEdit_field& f_causqua = m.efield(F_CAUSQUA);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      f_causqua.reset();
 | 
					      f_causqua.reset();
 | 
				
			||||||
      if (cod_qua == "LA")
 | 
					      if (cod_qua == "LA")
 | 
				
			||||||
        f_causqua.set(m.get(F_TABCAUSQUASC));
 | 
					        f_causqua.set(m.get(F_TABCAUSQUASC));
 | 
				
			||||||
 | 
				
			|||||||
@ -99,6 +99,7 @@ void TRighe_riepilogo::genera_la(TRectype& quadro, const TRectype& riga, const T
 | 
				
			|||||||
  quadro.put(QUD_CODCAUS, codcaus);
 | 
					  quadro.put(QUD_CODCAUS, codcaus);
 | 
				
			||||||
      
 | 
					      
 | 
				
			||||||
  real somme = compenso;
 | 
					  real somme = compenso;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  somme -= imponibile;
 | 
					  somme -= imponibile;
 | 
				
			||||||
  somme += riga.get_real(PAG_SPESA);
 | 
					  somme += riga.get_real(PAG_SPESA);
 | 
				
			||||||
  somme -= riga.get_real(PAG_IMPCPA);
 | 
					  somme -= riga.get_real(PAG_IMPCPA);
 | 
				
			||||||
@ -108,10 +109,9 @@ void TRighe_riepilogo::genera_la(TRectype& quadro, const TRectype& riga, const T
 | 
				
			|||||||
	// 26/01/17: Spostato qua questo blocco per aggiungere somme e tenere un filo logico di tutto insieme
 | 
						// 26/01/17: Spostato qua questo blocco per aggiungere somme e tenere un filo logico di tutto insieme
 | 
				
			||||||
	real ammlordo = imponibile;           
 | 
						real ammlordo = imponibile;           
 | 
				
			||||||
	real snsar = riga.get_real(PAG_SOMNSRIT);
 | 
						real snsar = riga.get_real(PAG_SOMNSRIT);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (snsar > -0.02 && snsar < 0.02)
 | 
						if (snsar > -0.02 && snsar < 0.02)
 | 
				
			||||||
	{
 | 
					 | 
				
			||||||
		snsar = ZERO;
 | 
							snsar = ZERO;
 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
  ammlordo += snsar;
 | 
					  ammlordo += snsar;
 | 
				
			||||||
  ammlordo += riga.get_real(PAG_CONTROBB);
 | 
					  ammlordo += riga.get_real(PAG_CONTROBB);
 | 
				
			||||||
  ammlordo += riga.get_real(PAG_SOMREGCONV);
 | 
					  ammlordo += riga.get_real(PAG_SOMREGCONV);
 | 
				
			||||||
@ -142,6 +142,7 @@ void TRighe_riepilogo::genera_la(TRectype& quadro, const TRectype& riga, const T
 | 
				
			|||||||
  if (somme.is_zero() && quadro.get(QUD_TOTALE) == quadro.get(QUD_IMPONIBILE))
 | 
					  if (somme.is_zero() && quadro.get(QUD_TOTALE) == quadro.get(QUD_IMPONIBILE))
 | 
				
			||||||
  {
 | 
					  {
 | 
				
			||||||
    const TRectype& ca7 = cache().get("%CA7", codcaus);
 | 
					    const TRectype& ca7 = cache().get("%CA7", codcaus);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if (ca7.get_int("I1") == 3)
 | 
					    if (ca7.get_int("I1") == 3)
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
      quadro.put(QUD_SOMME, quadro.get(QUD_IMPONIBILE));
 | 
					      quadro.put(QUD_SOMME, quadro.get(QUD_IMPONIBILE));
 | 
				
			||||||
@ -153,14 +154,20 @@ void TRighe_riepilogo::genera_la(TRectype& quadro, const TRectype& riga, const T
 | 
				
			|||||||
bool TRighe_riepilogo::add_riga_pag(const TRectype& riga, const TRectype& scheda)
 | 
					bool TRighe_riepilogo::add_riga_pag(const TRectype& riga, const TRectype& scheda)
 | 
				
			||||||
{ 
 | 
					{ 
 | 
				
			||||||
  const TString8 codcaus = scheda.get(SPR_CODCAUS);
 | 
					  const TString8 codcaus = scheda.get(SPR_CODCAUS);
 | 
				
			||||||
  const TString8 causqua = scheda.get(SPR_CAUSQUA);
 | 
					  TString8 causqua = scheda.get(SPR_CAUSQUA);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  if (ini_get_bool(CONFIG_STUDIO, "77", "CauQFCau"))
 | 
				
			||||||
 | 
					    causqua = cache().get("%CA7", codcaus, "S2");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  // cerca riga compatibile
 | 
					  // cerca riga compatibile
 | 
				
			||||||
  int i = 0;
 | 
					  int i = 0;
 | 
				
			||||||
  for (i = last(); i >= 0; i--)
 | 
					  for (i = last(); i >= 0; i--)
 | 
				
			||||||
  {
 | 
					  {
 | 
				
			||||||
    const TRectype* rr = (const TRectype*)objptr(i);
 | 
					    const TRectype* rr = (const TRectype*)objptr(i);
 | 
				
			||||||
    if (rr->get("CAUSALE") == causqua)
 | 
					
 | 
				
			||||||
 | 
					    if (rr->get("CAUSALE") == causqua &&
 | 
				
			||||||
 | 
					        rr->get(QUD_CODCAUS) == codcaus)
 | 
				
			||||||
      break;
 | 
					      break;
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
  if (i < 0)
 | 
					  if (i < 0)
 | 
				
			||||||
 | 
				
			|||||||
@ -2,5 +2,6 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
#define F_CODCAU1015  101
 | 
					#define F_CODCAU1015  101
 | 
				
			||||||
#define F_FSTAMPAQL   102
 | 
					#define F_FSTAMPAQL   102
 | 
				
			||||||
#define F_FSTAMPAQCQD 103   
 | 
					#define F_QUAFROMCAUS 103
 | 
				
			||||||
#define F_ANNO        104
 | 
					#define F_FSTAMPAQCQD 104   
 | 
				
			||||||
 | 
					#define F_ANNO        105
 | 
				
			||||||
@ -31,9 +31,15 @@ BEGIN
 | 
				
			|||||||
  ADD RUN 773mod -3 %ca7
 | 
					  ADD RUN 773mod -3 %ca7
 | 
				
			||||||
END
 | 
					END
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					BOOLEAN F_QUAFROMCAUS 
 | 
				
			||||||
 | 
					BEGIN
 | 
				
			||||||
 | 
					    PROMPT 3 6 "Nella generazione leggi la causale quadro dalla causale 770"
 | 
				
			||||||
 | 
					    FIELD CauQFCau 
 | 
				
			||||||
 | 
					END
 | 
				
			||||||
 | 
					
 | 
				
			||||||
LIST F_FSTAMPAQL 35
 | 
					LIST F_FSTAMPAQL 35
 | 
				
			||||||
BEGIN
 | 
					BEGIN
 | 
				
			||||||
    PROMPT 3 6 "Flag per stampa quadro L      "
 | 
					    PROMPT 3 8 "Flag per stampa quadro L      "
 | 
				
			||||||
    ITEM "1|Ordine primario data versamento"
 | 
					    ITEM "1|Ordine primario data versamento"
 | 
				
			||||||
    ITEM "2|Ordine primario periodo riferimento"
 | 
					    ITEM "2|Ordine primario periodo riferimento"
 | 
				
			||||||
    FIELD FlStQl
 | 
					    FIELD FlStQl
 | 
				
			||||||
@ -42,7 +48,7 @@ END
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
LIST F_FSTAMPAQCQD 29
 | 
					LIST F_FSTAMPAQCQD 29
 | 
				
			||||||
BEGIN
 | 
					BEGIN
 | 
				
			||||||
    PROMPT 3 8 "Flag per stampa quadri C/D/D1 "
 | 
					    PROMPT 3 10 "Flag per stampa quadri C/D/D1 "
 | 
				
			||||||
    ITEM "1|Per codice causale e aliquota"
 | 
					    ITEM "1|Per codice causale e aliquota"
 | 
				
			||||||
    ITEM "2|Per codice tributo e aliquota"
 | 
					    ITEM "2|Per codice tributo e aliquota"
 | 
				
			||||||
    FIELD FlStQcQd  
 | 
					    FIELD FlStQcQd  
 | 
				
			||||||
 | 
				
			|||||||
@ -816,9 +816,8 @@ bool TTrasferimentoCU::append_record_h(const TRectype& qla, int modulo, TLog_rep
 | 
				
			|||||||
  if (perc.estero())
 | 
					  if (perc.estero())
 | 
				
			||||||
    rec.np_put("AU001005", qla.get_real("SOMREGCONV"));
 | 
					    rec.np_put("AU001005", qla.get_real("SOMREGCONV"));
 | 
				
			||||||
  
 | 
					  
 | 
				
			||||||
	real imponibile = qla.get_real("IMPONIBILE");
 | 
						real imponibile = qla.get_real(QUD_IMPONIBILE);
 | 
				
			||||||
 | 
					  const TString4 codcaus = qla.get(QUD_CODCAUS);
 | 
				
			||||||
  const TString4 codcaus = qla.get("CODCAUS");
 | 
					 | 
				
			||||||
  long codice = atol(cache().get("%CA7", codcaus, "I1")); // 1, 2, 5, 6, 7 // EDIT 2020: aggiunti 8, 9, 10, 11 // Edit 2021 aggiunti 12,13
 | 
					  long codice = atol(cache().get("%CA7", codcaus, "I1")); // 1, 2, 5, 6, 7 // EDIT 2020: aggiunti 8, 9, 10, 11 // Edit 2021 aggiunti 12,13
 | 
				
			||||||
	
 | 
						
 | 
				
			||||||
	real altre_somme = qla.get_real("SOMME");
 | 
						real altre_somme = qla.get_real("SOMME");
 | 
				
			||||||
@ -826,7 +825,8 @@ bool TTrasferimentoCU::append_record_h(const TRectype& qla, int modulo, TLog_rep
 | 
				
			|||||||
	{
 | 
						{
 | 
				
			||||||
		altre_somme = ZERO;
 | 
							altre_somme = ZERO;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
  if (altre_somme.is_zero() && codice == 7)
 | 
					  if (altre_somme.is_zero() && 
 | 
				
			||||||
 | 
					      ((codice == 7) || (codice == 12) || (codice == 13)))
 | 
				
			||||||
  {
 | 
					  {
 | 
				
			||||||
    altre_somme = imponibile;
 | 
					    altre_somme = imponibile;
 | 
				
			||||||
    imponibile = ZERO;
 | 
					    imponibile = ZERO;
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user