Merge branch 'R_10_00' of http://10.65.20.33/sirio/CAMPO/campo into R_10_00
This commit is contained in:
		
						commit
						f10451fa98
					
				
							
								
								
									
										16
									
								
								cd/test/cg0726.txt
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										16
									
								
								cd/test/cg0726.txt
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,16 @@
 | 
			
		||||
cg0800a.msk
 | 
			
		||||
cg0800a.rep
 | 
			
		||||
cg3.exe
 | 
			
		||||
cg3200a.msk
 | 
			
		||||
cg4b00a.msk
 | 
			
		||||
cg4b00a.rep
 | 
			
		||||
cg3600a.msk
 | 
			
		||||
cg3600b.msk
 | 
			
		||||
cg4.exe
 | 
			
		||||
cg0.exe
 | 
			
		||||
cgmenu.men
 | 
			
		||||
 | 
			
		||||
Sistemata esposizione pro rata
 | 
			
		||||
Modificate le stampe progressivi IVA
 | 
			
		||||
Aggiunta indicazione indeducibili sul prospetto progressivi IVA dal periodo successivo
 | 
			
		||||
Tolto il calcolo interessi in 13 per i trimestrali
 | 
			
		||||
							
								
								
									
										112
									
								
								cd/test/cg0726a.ini
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										112
									
								
								cd/test/cg0726a.ini
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,112 @@
 | 
			
		||||
[Main]
 | 
			
		||||
Demo=0
 | 
			
		||||
 | 
			
		||||
[cg1]
 | 
			
		||||
Edit_23 = cg2 -0
 | 
			
		||||
File(8) = cg0800a.msk|X
 | 
			
		||||
File(9) = cg0800a.rep|X
 | 
			
		||||
File(23) = cg3.exe|X
 | 
			
		||||
File(26) = cg3200a.msk|X
 | 
			
		||||
File(34) = cg3600a.msk|X
 | 
			
		||||
File(35) = cg3600b.msk|X
 | 
			
		||||
File(41) = cg4.exe|X
 | 
			
		||||
File(62) = cg4b00a.msk|X
 | 
			
		||||
File(63) = cg4b00a.rep|X
 | 
			
		||||
Patch = 0726
 | 
			
		||||
Versione = 21511200
 | 
			
		||||
 | 
			
		||||
[cg9]
 | 
			
		||||
Edit_19 = cg0 -0
 | 
			
		||||
Edit_20 = cg0 -1
 | 
			
		||||
Edit_26 = cg0 -4
 | 
			
		||||
Edit_5 = cg0 -5
 | 
			
		||||
File(131) = cg0.exe|X
 | 
			
		||||
File(177) = cgmenu.men|X
 | 
			
		||||
Patch = 0726
 | 
			
		||||
Versione = 21511200
 | 
			
		||||
 | 
			
		||||
[cg99]
 | 
			
		||||
Kill(0) = bastreg.rep|x
 | 
			
		||||
Kill(1) = batbpdb.msk|x
 | 
			
		||||
Kill(2) = bastleg.msk|x
 | 
			
		||||
Kill(3) = bastmsp.rep|x
 | 
			
		||||
Kill(4) = bastpor.rep|x
 | 
			
		||||
Kill(5) = batbesc.msk|x
 | 
			
		||||
Kill(6) = bastscc.rep|x
 | 
			
		||||
Kill(7) = batbdpn.msk|x
 | 
			
		||||
Kill(8) = batbins.msk|x
 | 
			
		||||
Kill(9) = bastivd.msk|x
 | 
			
		||||
Kill(10) = bastntb.rep|x
 | 
			
		||||
Kill(11) = bastmsp.msk|x
 | 
			
		||||
Kill(12) = batbtit.msk|x
 | 
			
		||||
Kill(13) = bastcco.msk|x
 | 
			
		||||
Kill(14) = bastcco.rep|x
 | 
			
		||||
Kill(15) = batbcam.msk|x
 | 
			
		||||
Kill(16) = batbleg.msk|x
 | 
			
		||||
Kill(17) = bastnot.msk|x
 | 
			
		||||
Kill(18) = batbndo.msk|x
 | 
			
		||||
Kill(19) = batbcve.msk|x
 | 
			
		||||
Kill(20) = batbind.msk|x
 | 
			
		||||
Kill(21) = bastpor.msk|x
 | 
			
		||||
Kill(22) = batbcco.msk|x
 | 
			
		||||
Kill(23) = batbivd.msk|x
 | 
			
		||||
Kill(24) = bastver.msk|x
 | 
			
		||||
Kill(25) = bastzon.rep|x
 | 
			
		||||
Kill(26) = bastleg.rep|x
 | 
			
		||||
Kill(27) = batbpor.msk|x
 | 
			
		||||
Kill(28) = bastcfi.msk|x
 | 
			
		||||
Kill(29) = batblia.msk|x
 | 
			
		||||
Kill(30) = bastcfi.rep|x
 | 
			
		||||
Kill(31) = batbtra.msk|x
 | 
			
		||||
Kill(32) = batbver.msk|x
 | 
			
		||||
Kill(33) = bastcam.rep|x
 | 
			
		||||
Kill(34) = batbinl.msk|x
 | 
			
		||||
Kill(35) = batbcfi.msk|x
 | 
			
		||||
Kill(36) = bastnot.rep|x
 | 
			
		||||
Kill(37) = batbscc.msk|x
 | 
			
		||||
Kill(38) = batbdel.msk|x
 | 
			
		||||
Kill(39) = bastntb.msk|x
 | 
			
		||||
Kill(40) = bastarb.msk|x
 | 
			
		||||
Kill(41) = bastesc.rep|x
 | 
			
		||||
Kill(42) = batbnot.msk|x
 | 
			
		||||
Kill(43) = bastarb.rep|x
 | 
			
		||||
Kill(44) = batbzon.msk|x
 | 
			
		||||
Kill(45) = cgtbcon.msk|x
 | 
			
		||||
Kill(46) = bastreg.msk|x
 | 
			
		||||
Kill(47) = bastpdb.rep|x
 | 
			
		||||
Kill(48) = bastpdb.msk|x
 | 
			
		||||
Kill(49) = batbmsp.msk|x
 | 
			
		||||
Kill(50) = bastcam.msk|x
 | 
			
		||||
Kill(51) = bastvet.rep|x
 | 
			
		||||
Kill(52) = bastdpn.rep|x
 | 
			
		||||
Kill(53) = bastver.rep|x
 | 
			
		||||
Kill(54) = bastcve.rep|x
 | 
			
		||||
Kill(55) = bastivd.rep|x
 | 
			
		||||
Kill(56) = bastdpn.msk|x
 | 
			
		||||
Kill(57) = batbreg.msk|x
 | 
			
		||||
Kill(58) = batbarb.msk|x
 | 
			
		||||
Kill(59) = batblia.msk|x
 | 
			
		||||
Kill(60) = batbvet.msk|x
 | 
			
		||||
Kill(61) = bastndo.rep|x
 | 
			
		||||
Kill(62) = batblbu.msk|x
 | 
			
		||||
Kill(63) = bastndo.msk|x
 | 
			
		||||
Kill(64) = bastvet.msk|x
 | 
			
		||||
Kill(65) = bastscc.msk|x
 | 
			
		||||
Kill(66) = bastesc.msk|x
 | 
			
		||||
Kill(67) = bastzon.msk|x
 | 
			
		||||
Kill(68) = batbntb.msk|x
 | 
			
		||||
Kill(69) = bastcve.msk|x
 | 
			
		||||
 | 
			
		||||
[cg]
 | 
			
		||||
Data = 20-02-2019
 | 
			
		||||
Descrizione = Contabilita' Generale
 | 
			
		||||
Dischi = 1
 | 
			
		||||
Moduli = ba
 | 
			
		||||
OEM = 
 | 
			
		||||
Patch = 726
 | 
			
		||||
PostProcess = bainst -0 CG
 | 
			
		||||
PreProcess = 
 | 
			
		||||
Prezzo(1) = 
 | 
			
		||||
Prezzo(2) = 
 | 
			
		||||
Versione = 21511200
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										
											BIN
										
									
								
								cd/test/cg0726a1.zip
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								cd/test/cg0726a1.zip
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										4
									
								
								cd/test/cg0728.txt
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								cd/test/cg0728.txt
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,4 @@
 | 
			
		||||
cg5100a.msk
 | 
			
		||||
cg5200a.msk
 | 
			
		||||
 | 
			
		||||
Aggiunta maschere mancanti
 | 
			
		||||
							
								
								
									
										95
									
								
								cd/test/cg0728a.ini
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										95
									
								
								cd/test/cg0728a.ini
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,95 @@
 | 
			
		||||
[Main]
 | 
			
		||||
Demo=0
 | 
			
		||||
 | 
			
		||||
[cg1]
 | 
			
		||||
Edit_23 = cg2 -0
 | 
			
		||||
File(66) = cg5100a.msk|X
 | 
			
		||||
File(67) = cg5200a.msk|X
 | 
			
		||||
Patch = 728
 | 
			
		||||
Versione = 21511200
 | 
			
		||||
 | 
			
		||||
[cg99]
 | 
			
		||||
Kill(0) = batbcve.msk|x
 | 
			
		||||
Kill(1) = bastzon.rep|x
 | 
			
		||||
Kill(2) = batbtra.msk|x
 | 
			
		||||
Kill(3) = batbndo.msk|x
 | 
			
		||||
Kill(4) = bastver.msk|x
 | 
			
		||||
Kill(5) = bastcfi.rep|x
 | 
			
		||||
Kill(6) = batbpor.msk|x
 | 
			
		||||
Kill(7) = bastcam.rep|x
 | 
			
		||||
Kill(8) = bastleg.rep|x
 | 
			
		||||
Kill(9) = batbver.msk|x
 | 
			
		||||
Kill(10) = batbcam.msk|x
 | 
			
		||||
Kill(11) = bastpor.msk|x
 | 
			
		||||
Kill(12) = bastcco.rep|x
 | 
			
		||||
Kill(13) = batbind.msk|x
 | 
			
		||||
Kill(14) = bastnot.msk|x
 | 
			
		||||
Kill(15) = batbivd.msk|x
 | 
			
		||||
Kill(16) = batbleg.msk|x
 | 
			
		||||
Kill(17) = batbcco.msk|x
 | 
			
		||||
Kill(18) = bastmsp.msk|x
 | 
			
		||||
Kill(19) = bastntb.rep|x
 | 
			
		||||
Kill(20) = bastcco.msk|x
 | 
			
		||||
Kill(21) = batbtit.msk|x
 | 
			
		||||
Kill(22) = batblia.msk|x
 | 
			
		||||
Kill(23) = bastscc.msk|x
 | 
			
		||||
Kill(24) = batbarb.msk|x
 | 
			
		||||
Kill(25) = bastvet.msk|x
 | 
			
		||||
Kill(26) = bastzon.msk|x
 | 
			
		||||
Kill(27) = bastesc.msk|x
 | 
			
		||||
Kill(28) = batbmsp.msk|x
 | 
			
		||||
Kill(29) = bastivd.rep|x
 | 
			
		||||
Kill(30) = bastndo.rep|x
 | 
			
		||||
Kill(31) = bastpdb.msk|x
 | 
			
		||||
Kill(32) = bastcve.rep|x
 | 
			
		||||
Kill(33) = batbvet.msk|x
 | 
			
		||||
Kill(34) = batbreg.msk|x
 | 
			
		||||
Kill(35) = bastndo.msk|x
 | 
			
		||||
Kill(36) = bastdpn.msk|x
 | 
			
		||||
Kill(37) = batblbu.msk|x
 | 
			
		||||
Kill(38) = bastntb.msk|x
 | 
			
		||||
Kill(39) = cgtbcon.msk|x
 | 
			
		||||
Kill(40) = bastvet.rep|x
 | 
			
		||||
Kill(41) = batbdel.msk|x
 | 
			
		||||
Kill(42) = batbzon.msk|x
 | 
			
		||||
Kill(43) = bastcam.msk|x
 | 
			
		||||
Kill(44) = bastpdb.rep|x
 | 
			
		||||
Kill(45) = bastver.rep|x
 | 
			
		||||
Kill(46) = bastreg.msk|x
 | 
			
		||||
Kill(47) = bastdpn.rep|x
 | 
			
		||||
Kill(48) = batblia.msk|x
 | 
			
		||||
Kill(49) = batbcfi.msk|x
 | 
			
		||||
Kill(50) = bastesc.rep|x
 | 
			
		||||
Kill(51) = bastcfi.msk|x
 | 
			
		||||
Kill(52) = batbinl.msk|x
 | 
			
		||||
Kill(53) = bastarb.msk|x
 | 
			
		||||
Kill(54) = batbscc.msk|x
 | 
			
		||||
Kill(55) = bastarb.rep|x
 | 
			
		||||
Kill(56) = bastnot.rep|x
 | 
			
		||||
Kill(57) = batbnot.msk|x
 | 
			
		||||
Kill(58) = bastcve.msk|x
 | 
			
		||||
Kill(59) = batbntb.msk|x
 | 
			
		||||
Kill(60) = bastivd.msk|x
 | 
			
		||||
Kill(61) = batbins.msk|x
 | 
			
		||||
Kill(62) = batbpdb.msk|x
 | 
			
		||||
Kill(63) = bastreg.rep|x
 | 
			
		||||
Kill(64) = batbesc.msk|x
 | 
			
		||||
Kill(65) = bastpor.rep|x
 | 
			
		||||
Kill(66) = bastmsp.rep|x
 | 
			
		||||
Kill(67) = bastleg.msk|x
 | 
			
		||||
Kill(68) = batbdpn.msk|x
 | 
			
		||||
Kill(69) = bastscc.rep|x
 | 
			
		||||
 | 
			
		||||
[cg]
 | 
			
		||||
Data = 14-03-2019
 | 
			
		||||
Descrizione = Contabilita' Generale
 | 
			
		||||
Dischi = 1
 | 
			
		||||
Moduli = ba
 | 
			
		||||
OEM = 
 | 
			
		||||
Patch = 728
 | 
			
		||||
PostProcess = bainst -0 CG
 | 
			
		||||
PreProcess = 
 | 
			
		||||
Prezzo(1) = 
 | 
			
		||||
Prezzo(2) = 
 | 
			
		||||
Versione = 21511200
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										
											BIN
										
									
								
								cd/test/cg0728a1.zip
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								cd/test/cg0728a1.zip
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							@ -1539,6 +1539,8 @@ void TLiquidazione_app::recalc_att(int month, const char* codatt, TAssoc_array &
 | 
			
		||||
			real incdiff_iva;							 // Liquidazione differita incassate imposta
 | 
			
		||||
			real impon_ind;								 // Imponibile indetraibile
 | 
			
		||||
			real impos_ind;								 // Imposta indetraibile
 | 
			
		||||
			real impon_ind_succ;					 // Imponibile indetraibile da periodo successivo
 | 
			
		||||
			real impos_ind_succ;					 // Imposta indetraibile da periodo successivo
 | 
			
		||||
			real impon_det;								 // Imponibile detraibile
 | 
			
		||||
			real impos_det;								 // Imposta detraibile
 | 
			
		||||
			char sezfat;
 | 
			
		||||
@ -1940,82 +1942,6 @@ void TLiquidazione_app::recalc_att(int month, const char* codatt, TAssoc_array &
 | 
			
		||||
            }
 | 
			
		||||
					}
 | 
			
		||||
				}
 | 
			
		||||
 | 
			
		||||
        /* Calcoli sprecati: dal 2016 calcolimao la comuncazione annuale direttamente in cg5
 | 
			
		||||
        const TString& iva_vpn = _iva->get(tipomov == vendita ? "S10" : "S11");
 | 
			
		||||
 | 
			
		||||
        // Aggiunto "&& is_detraibile==0" al test altrimenti somma due volte imponibile_orig (22/01/2015)
 | 
			
		||||
        if (!bIsMovDiff && iva_vpn.full() && _mov->get_int(MOV_ANNOIVA) == year_int && is_detraibile == 0)  
 | 
			
		||||
        {
 | 
			
		||||
          switch (tipomov)
 | 
			
		||||
          {
 | 
			
		||||
          case vendita: // CD1 - 1 2 3 4
 | 
			
		||||
						{
 | 
			
		||||
              // bool is_valid = !corrisp && tipodoc != "AF" && (cau_intra || !cau_valintra) &&
 | 
			
		||||
							//	                sosp_imp != normale && sosp_imp != liquidazione;
 | 
			
		||||
              bool is_valid = tipodoc != "AF" && sosp_imp != normale && sosp_imp != liquidazione;
 | 
			
		||||
							if (is_valid)
 | 
			
		||||
							{
 | 
			
		||||
  							cessioni_cd1_1 += imponibile_orig;
 | 
			
		||||
								if (iva_vpn.starts_with("CD1"))
 | 
			
		||||
								{
 | 
			
		||||
									if (tipocr == 4)
 | 
			
		||||
										cessioni_cd1_5 += imponibile_orig;
 | 
			
		||||
								}
 | 
			
		||||
								if (!cau_intra)
 | 
			
		||||
								{
 | 
			
		||||
									if (iva_vpn == "CD12")
 | 
			
		||||
										cessioni_cd1_2 += imponibile_orig; else
 | 
			
		||||
									if (iva_vpn == "CD13")
 | 
			
		||||
										cessioni_cd1_3 += imponibile_orig;
 | 
			
		||||
								}
 | 
			
		||||
								else
 | 
			
		||||
								{
 | 
			
		||||
									if (iva_vpn == "CD14")
 | 
			
		||||
										cessioni_cd1_4 += imponibile_orig;
 | 
			
		||||
								}
 | 
			
		||||
							}
 | 
			
		||||
 | 
			
		||||
						}
 | 
			
		||||
          break;
 | 
			
		||||
          case acquisto: // CD2 - 1 2 3 4 
 | 
			
		||||
						{		
 | 
			
		||||
							acquisti_cd2_1 += imponibile_orig;
 | 
			
		||||
							if (iva_vpn.starts_with("CD2"))
 | 
			
		||||
							{
 | 
			
		||||
								if (tipocr == 2 || tipocr == 3 || tipocr == 8)
 | 
			
		||||
									acquisti_cd2_5 += imponibile_orig;
 | 
			
		||||
							}
 | 
			
		||||
							if (!cau_intra)
 | 
			
		||||
							{
 | 
			
		||||
								if (iva_vpn == "CD22")
 | 
			
		||||
									acquisti_cd2_2 += imponibile_orig;
 | 
			
		||||
								else
 | 
			
		||||
									if (iva_vpn == "CD23")
 | 
			
		||||
										acquisti_cd2_3 += imponibile_orig;
 | 
			
		||||
							}
 | 
			
		||||
							else
 | 
			
		||||
							{
 | 
			
		||||
								if (iva_vpn == "CD24")
 | 
			
		||||
									acquisti_cd2_4 += imponibile_orig;
 | 
			
		||||
							}
 | 
			
		||||
							if (iva_vpn == "CD31")
 | 
			
		||||
							{
 | 
			
		||||
								oroargento_cd3_1 += imponibile_orig;
 | 
			
		||||
								oroargento_cd3_2 += imposta_orig;
 | 
			
		||||
							}
 | 
			
		||||
							if (iva_vpn == "CD33")
 | 
			
		||||
							{
 | 
			
		||||
								rottami_cd3_3 += imponibile_orig;
 | 
			
		||||
								rottami_cd3_4 += imposta_orig;
 | 
			
		||||
							}
 | 
			
		||||
						}
 | 
			
		||||
          break;
 | 
			
		||||
          default:
 | 
			
		||||
          break;
 | 
			
		||||
          }
 | 
			
		||||
        }
 | 
			
		||||
        */
 | 
			
		||||
      } 
 | 
			
		||||
 | 
			
		||||
			bool bMovDiffToAdd = true;
 | 
			
		||||
@ -2043,6 +1969,12 @@ void TLiquidazione_app::recalc_att(int month, const char* codatt, TAssoc_array &
 | 
			
		||||
					imposta = ZERO;
 | 
			
		||||
				}
 | 
			
		||||
      
 | 
			
		||||
 | 
			
		||||
				if (tipoind > 0 && _mov->get_int(MOV_MESELIQ) > 0)
 | 
			
		||||
				{
 | 
			
		||||
					impon_ind_succ += imponibile;
 | 
			
		||||
					impos_ind_succ += imposta;
 | 
			
		||||
				}
 | 
			
		||||
        /* Riga imponibile > 9 = ritenute; non si considerano (Scudler 1994) */          
 | 
			
		||||
 | 
			
		||||
      
 | 
			
		||||
@ -2698,6 +2630,11 @@ void TLiquidazione_app::recalc_att(int month, const char* codatt, TAssoc_array &
 | 
			
		||||
            curr.add("R13", fci);         
 | 
			
		||||
            curr.add("R14", fcv);       
 | 
			
		||||
          }            
 | 
			
		||||
					if (i == 1)
 | 
			
		||||
					{
 | 
			
		||||
						curr.add("R15", impon_ind_succ);
 | 
			
		||||
						curr.add("R16", impos_ind_succ);
 | 
			
		||||
					}
 | 
			
		||||
          // questi servono per i ricalcoli altrui (classify_pim) o 
 | 
			
		||||
          // per trucchetti di ricalcolo successivi
 | 
			
		||||
          curr.add("R11",fsi);         
 | 
			
		||||
@ -4247,7 +4184,7 @@ void TLiquidazione_app::write_liq(int month, const char* codatts)
 | 
			
		||||
        const real ris = vf1 + vf2;  // gia' esclusi: NS, B3, cess. amm
 | 
			
		||||
        
 | 
			
		||||
        // calcola nuovo prorata dal 1998 per ogni attivita' (miste: 1+2)
 | 
			
		||||
        const real rsa = ris - (es_c1a-es_c1a_am) - (es_c3-es_c3_am) - ven_rev;
 | 
			
		||||
        const real rsa = ris - (es_c1a-es_c1a_am) - (es_c3-es_c3_am);
 | 
			
		||||
        const real rsn = rsa - es_c1;
 | 
			
		||||
        if (!rsa.is_zero())
 | 
			
		||||
        {
 | 
			
		||||
@ -4402,7 +4339,7 @@ void TLiquidazione_app::write_liq(int month, const char* codatts)
 | 
			
		||||
	 //  if (_isintr && ( true_trim || (month == 12 && _isbenzinaro && _gest4)
 | 
			
		||||
	 //      || (month == 13 && !(_isbenzinaro && _gest4)) ))  // cambiato 2019
 | 
			
		||||
	
 | 
			
		||||
  if (_isintr && (month == 3 || month == 6 || month == 9 || month == 12 || month ==13))
 | 
			
		||||
  if (_isintr && (month == 3 || month == 6 || month == 9 || month == 12)) // non più in 13 || month ==13))
 | 
			
		||||
	{
 | 
			
		||||
    const real interesse = interesse_trimestrale(_month);
 | 
			
		||||
    const real r = risultato - imposta_non_versata;           // CM 26-09-2000
 | 
			
		||||
@ -4411,6 +4348,12 @@ void TLiquidazione_app::write_liq(int month, const char* codatts)
 | 
			
		||||
		lim.put("R14", ivi);
 | 
			
		||||
		lim.put("R10", interesse_trimestrale(_month));
 | 
			
		||||
	}
 | 
			
		||||
	else
 | 
			
		||||
	{
 | 
			
		||||
		lim.zero("R14");
 | 
			
		||||
		lim.zero("R10");
 | 
			
		||||
 | 
			
		||||
	}
 | 
			
		||||
  
 | 
			
		||||
  //questo serve anche per la visualizzazione e per l'estrazione deleghe  
 | 
			
		||||
//  if (_isintr && ( true_trim || (month == 12 && _isbenzinaro && _gest4)
 | 
			
		||||
 | 
			
		||||
@ -507,7 +507,7 @@ void TLiquidazione_app::describe_pims(int month, const char* codatt, const bool
 | 
			
		||||
  const TString8 ref(atts.items() == 1 ? codatt : "ALL");
 | 
			
		||||
  int last      = _descr_arr.last();
 | 
			
		||||
  bool issosp = false;
 | 
			
		||||
  real t0, t1, t2, t3, t4, t5, t26, t27, t28, t29, t30, t31, t32, t33;
 | 
			
		||||
  real t0, t1, t2, t3, t4, t5, t15, t16, t26, t27, t28, t29, t30, t31, t32, t33;
 | 
			
		||||
  real rt0, rt1, rt2, rt3, rt4, rt5;
 | 
			
		||||
  real autodafe, autodafe_iva, art40, art40_iva;
 | 
			
		||||
	real diffimp, diffiva, diffincimp, diffinciva;
 | 
			
		||||
@ -615,8 +615,6 @@ void TLiquidazione_app::describe_pims(int month, const char* codatt, const bool
 | 
			
		||||
        continue;
 | 
			
		||||
 | 
			
		||||
      // questi non vanno in liquidazione, i totali sono gia' calcolati altrove
 | 
			
		||||
      if ((tipodet == 1 || tipodet == 3 || tipodet == 9) && !is_rit)
 | 
			
		||||
        continue;
 | 
			
		||||
      
 | 
			
		||||
      // se ha tutti gli importi nulli viene da un annullamento di
 | 
			
		||||
      // progressivi esistenti (achtung fatture con scontrino)
 | 
			
		||||
@ -675,7 +673,17 @@ void TLiquidazione_app::describe_pims(int month, const char* codatt, const bool
 | 
			
		||||
          d->_s1 = codiva;
 | 
			
		||||
					_descr_arr.insert(d, i); 
 | 
			
		||||
        }
 | 
			
		||||
        
 | 
			
		||||
				if ((tipodet == 1 || tipodet == 3 || tipodet == 9) && !is_rit)
 | 
			
		||||
				{
 | 
			
		||||
					if (PIM_PIS == PIS_ROW)
 | 
			
		||||
					{
 | 
			
		||||
						d->_r15 += tab->get_real("R0");
 | 
			
		||||
						d->_r16 += tab->get_real("R1");
 | 
			
		||||
						t15 += tab->get_real("R0");
 | 
			
		||||
						t16 += tab->get_real("R1");
 | 
			
		||||
					}
 | 
			
		||||
					continue;
 | 
			
		||||
				}
 | 
			
		||||
        if (tipomov == acquisto)
 | 
			
		||||
        {
 | 
			
		||||
          // Ci sono anche le fatture in ritardo (solo in annuale)! Con tipo detraibilita' 1,3,9
 | 
			
		||||
@ -979,6 +987,7 @@ void TLiquidazione_app::describe_pims(int month, const char* codatt, const bool
 | 
			
		||||
		tot->_r0 = t0; tot->_r1 = t1;
 | 
			
		||||
		tot->_r2 = t2; tot->_r3 = t3;
 | 
			
		||||
		tot->_r4 = t4; tot->_r5 = t5;
 | 
			
		||||
		tot->_r15 = t15; tot->_r16 = t16;
 | 
			
		||||
	}
 | 
			
		||||
	if (totd != NULL)
 | 
			
		||||
	{
 | 
			
		||||
@ -1158,7 +1167,7 @@ void TLiquidazione_app::describe_pims(int month, const char* codatt, const bool
 | 
			
		||||
        
 | 
			
		||||
        // calcola nuovo prorata per ogni attivita' (miste: 1+2)
 | 
			
		||||
        real pr; 
 | 
			
		||||
        const real rsa = ris - (e3-e5) - (e4-e6) - vrc;
 | 
			
		||||
        const real rsa = ris - (e3-e5) - (e4-e6);
 | 
			
		||||
				const real rsn = rsa - e1;
 | 
			
		||||
				
 | 
			
		||||
				if (!rsa.is_zero())
 | 
			
		||||
@ -1771,18 +1780,23 @@ void TLiquidazione_app::set_pim_head(_DescrItem& d)
 | 
			
		||||
  }
 | 
			
		||||
  else
 | 
			
		||||
  {
 | 
			
		||||
		if (d._flags == PIM_HEAD || d._flags == PIS_HEAD)
 | 
			
		||||
		if (d._flags == PIM_HEAD)
 | 
			
		||||
		{
 | 
			
		||||
			set_row(r++, FR(" Cod.@41gVENDITE@71gCORRISPETTIVI@106gACQUISTI"));
 | 
			
		||||
			set_row(r++,FR(" IVA Descrizione@30gImponibile@49gImposta@63gImponibile"
 | 
			
		||||
							"@82gImposta@96gImponibile@115gImposta"));
 | 
			
		||||
			set_row(r++, FR(" IVA Descrizione@30gImponibile@49gImposta@63gImponibile@82gImposta@96gImponibile@115gImposta"));
 | 
			
		||||
			set_row(r, "");
 | 
			
		||||
		}
 | 
			
		||||
/*		else
 | 
			
		||||
		else
 | 
			
		||||
		{
 | 
			
		||||
			set_row(r++,FR(" Cod.@41gVENDITE"));
 | 
			
		||||
			set_row(r++,FR(" IVA Descrizione@30gImponibile@49gImposta"));
 | 
			
		||||
		} */
 | 
			
		||||
			if (d._flags == PIS_HEAD)
 | 
			
		||||
			{
 | 
			
		||||
				set_row(r++, FR(" Cod.@41gVENDITE@71gCORRISPETTIVI@106gACQUISTI"));
 | 
			
		||||
				set_row(r++, FR(" @99gACQUISTI INDETRAIBILI"));
 | 
			
		||||
				set_row(r++, FR(" IVA Descrizione@30gImponibile@49gImposta@63gImponibile@82gImposta@96gImponibile@115gImposta"));
 | 
			
		||||
//				set_row(r++, FR(" @96gImponibile@115gImposta"));
 | 
			
		||||
				set_row(r, "");
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@ -1814,12 +1828,19 @@ void TLiquidazione_app::set_pim(_DescrItem& d)
 | 
			
		||||
    if (d._s2.len() > 19) d._s2.cut(19);
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  if (d._flags == PIM_ROW || d._flags == PIS_ROW)
 | 
			
		||||
	if (d._flags == PIM_ROW)
 | 
			
		||||
	{
 | 
			
		||||
		set_row(rw++,"%-4s %s@25g%r@41g%r@58g%r@74g%r@91g%r@107g%r",
 | 
			
		||||
						(const char*)d._s1, (const char*)d._s2,
 | 
			
		||||
		set_row(rw++, "%-4s %s@25g%r@41g%r@58g%r@74g%r@91g%r@107g%r", (const char*)d._s1, (const char*)d._s2,
 | 
			
		||||
			&(d._r0), &(d._r1), &(d._r2), &(d._r3), &(d._r4), &(d._r5));
 | 
			
		||||
	}
 | 
			
		||||
	else
 | 
			
		||||
		if (d._flags == PIS_ROW)
 | 
			
		||||
		{
 | 
			
		||||
			set_row(rw++, "%-4s %s@25g%r@41g%r@58g%r@74g%r@91g%r@107g%r", (const char*)d._s1, (const char*)d._s2,
 | 
			
		||||
				&(d._r0), &(d._r1), &(d._r2), &(d._r3), &(d._r4), &(d._r5));
 | 
			
		||||
			if (d._r15 != ZERO)
 | 
			
		||||
				set_row(rw++, "@91g%r@107g%r", &(d._r15), &(d._r16));
 | 
			
		||||
		}
 | 
			
		||||
		else
 | 
			
		||||
			if (d._flags == PIM_ROW_D || d._flags == PIS_ROW_D)
 | 
			
		||||
			{
 | 
			
		||||
@ -1868,6 +1889,8 @@ void TLiquidazione_app::set_plm(_DescrItem& d)
 | 
			
		||||
    set_row(rw++,""); set_row(rw++,"");
 | 
			
		||||
    set_row(rw++,FR("Totale@25g%r@41g%r@58g%r@74g%r@91g%r@107g%r"),
 | 
			
		||||
            &(d._r0), &(d._r1), &(d._r2), &(d._r3), &(d._r4), &(d._r5));
 | 
			
		||||
		if(d._r15 != ZERO)
 | 
			
		||||
			set_row(rw++, FR("@91g%r@107g%r"), &(d._r15), &(d._r16));
 | 
			
		||||
		set_row(rw++,"");
 | 
			
		||||
  }
 | 
			
		||||
  if (!(d._r7.is_zero() && d._r8.is_zero()))
 | 
			
		||||
@ -2830,15 +2853,16 @@ bool TLiquidazione_app::set_annual(_DescrItem& d)
 | 
			
		||||
			set_row(row++, FR("%% PRO-RATA (%s%%)"), (const char*)s1);
 | 
			
		||||
		set_row(row++, FR("Numeratore pro-rata                                        @69g%r"), &(d._ra1));
 | 
			
		||||
		set_row(row++, FR("Denominatore                                               @69g%r"), &(d._ra0));
 | 
			
		||||
//    set_row(row++,FR("C1  - Operazioni esenti escluse da nr. 1 a 9 e 11 art. 10  @69g%r"), &(d._r1));
 | 
			
		||||
//    set_row(row++,FR("C2  - Operazioni esenti di cui nr. 11 art. 10              @69g%r"), &(d._r4));
 | 
			
		||||
//    set_row(row++,FR("C3  - Operazioni esenti da nr. 1 a 9 art. 10               @69g%r"), &(d._r5));
 | 
			
		||||
//    set_row(row++,FR("@6gdi cui cessione beni ammortizzabili                     @69g%r"), &(d._r8));
 | 
			
		||||
//    set_row(row++,FR("C1A - Operazioni esenti di cui all'art.10 n. 27 quinquies  @69g%r"), &(d._r7));
 | 
			
		||||
//    set_row(row++,FR("@6gdi cui cessione beni ammortizzabili                     @69g%r"), &(d._r9));
 | 
			
		||||
		set_row(row++,FR("Detraibilità                                               @69g%r%%"), &perc_det);
 | 
			
		||||
		row++;
 | 
			
		||||
    set_row(row++,FR("C1  - Operazioni esenti escluse da nr. 1 a 9 e 11 art. 10  @69g%r"), &(d._r1));
 | 
			
		||||
    set_row(row++,FR("C2  - Operazioni esenti di cui nr. 11 art. 10              @69g%r"), &(d._r4));
 | 
			
		||||
    set_row(row++,FR("C3  - Operazioni esenti da nr. 1 a 9 art. 10               @69g%r"), &(d._r5));
 | 
			
		||||
    set_row(row++,FR("@6gdi cui cessione beni ammortizzabili                     @69g%r"), &(d._r8));
 | 
			
		||||
    set_row(row++,FR("C1A - Operazioni esenti di cui all'art.10 n. 27 quinquies  @69g%r"), &(d._r7));
 | 
			
		||||
    set_row(row++,FR("@6gdi cui cessione beni ammortizzabili                     @69g%r"), &(d._r9));
 | 
			
		||||
		//		set_row(row++, FR("Volume d'affari                                           @69g%r"), &vol_aff);
 | 
			
		||||
		//		set_row(row++, FR("Totale vendite al fine del calcolo del pro-rata           @69g%r"), &vol_aff);
 | 
			
		||||
		set_row(row++,FR("Detraibilità                                               @69g%r%%"), &perc_det);
 | 
			
		||||
 | 
			
		||||
    set_print_zero(false);
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
@ -45,6 +45,7 @@ void TParametri_mask::save_all() const
 | 
			
		||||
	fp_settings().set_allega_fat(get_bool(F_ESPORTADOC));
 | 
			
		||||
	fp_settings().set_f8(get_bool(F_F8));
 | 
			
		||||
	fp_settings().set_check_not_block(get_bool(F_CHECK_NOT_BLOCK));
 | 
			
		||||
	fp_settings().set_no_sconti_fatt(get_bool(F_CHECK_NO_SCONTI));
 | 
			
		||||
	TFP_righe_custom().save_sheet(sfield(F_FORMPERS));
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@ -61,6 +62,7 @@ void TParametri_mask::load_all()
 | 
			
		||||
	set(F_ESPORTADOC, fp_settings().get_allega_fat());
 | 
			
		||||
	set(F_F8, fp_settings().is_f8());
 | 
			
		||||
	set(F_CHECK_NOT_BLOCK, fp_settings().get_check_not_block());
 | 
			
		||||
	set(F_CHECK_NO_SCONTI, fp_settings().get_no_sconti_fatt());
 | 
			
		||||
	TFP_righe_custom().load_sheet(sfield(F_FORMPERS));
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -9,6 +9,7 @@
 | 
			
		||||
#define F_ESPORTADOC				209
 | 
			
		||||
#define F_F8								210
 | 
			
		||||
#define F_CHECK_NOT_BLOCK		211
 | 
			
		||||
#define F_CHECK_NO_SCONTI		212
 | 
			
		||||
 | 
			
		||||
#define F_SETPATCH					301
 | 
			
		||||
#define F_ENPTYTABLE				302
 | 
			
		||||
 | 
			
		||||
@ -112,6 +112,15 @@ BEGIN
 | 
			
		||||
  PROMPT 2 9 "Rendi controlli XML non bloccanti"
 | 
			
		||||
END
 | 
			
		||||
 | 
			
		||||
GROUPBOX DLG_NULL 78 3
 | 
			
		||||
BEGIN
 | 
			
		||||
  PROMPT 1 11 "@BPersonalizzazioni documento"
 | 
			
		||||
END
 | 
			
		||||
 | 
			
		||||
BOOLEAN F_CHECK_NO_SCONTI
 | 
			
		||||
BEGIN
 | 
			
		||||
  PROMPT 2 12 "Non esporre sconti in fattura"
 | 
			
		||||
END
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
ENDPAGE
 | 
			
		||||
 | 
			
		||||
@ -136,6 +136,7 @@ private:
 | 
			
		||||
	int								_counter;
 | 
			
		||||
	TPaf_container		_paf_container;
 | 
			
		||||
	int								_count_r_conai;
 | 
			
		||||
	bool							_nascondi_sconti_righe_fatt;
 | 
			
		||||
 | 
			
		||||
	// Classe interna per gestire righe aggiuntive in riepilogo
 | 
			
		||||
	class TRiepilogo_agg
 | 
			
		||||
@ -245,6 +246,7 @@ public:
 | 
			
		||||
	const bool is_f8() const;
 | 
			
		||||
	const bool get_check_not_block() const;
 | 
			
		||||
	const TString& get_body_mail(int idx = -1) const;
 | 
			
		||||
	const bool get_no_sconti_fatt() const;
 | 
			
		||||
 | 
			
		||||
	// Setters
 | 
			
		||||
	void set_db_indirizzo(const TString& ind) const;
 | 
			
		||||
@ -262,6 +264,7 @@ public:
 | 
			
		||||
	void set_f8(bool f8) const;
 | 
			
		||||
	void set_check_not_block(bool not_block) const;
 | 
			
		||||
	void set_body_mail(const char* msg, int idx = -1) const;
 | 
			
		||||
	void set_no_sconti_fatt(const bool no_sconti_fatt) const;
 | 
			
		||||
 | 
			
		||||
	void remove_para_ini(int idx);
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
@ -1191,7 +1191,7 @@ void TDoc_fp::set_qta_prezzo(TPaf_record& paf1800f, TRiga_documento* rdoc) const
 | 
			
		||||
		}
 | 
			
		||||
		else
 | 
			
		||||
		{
 | 
			
		||||
			prezzo_unit = rdoc->prezzo(false, false, 8);
 | 
			
		||||
			prezzo_unit = rdoc->prezzo(_nascondi_sconti_righe_fatt, false, 5);
 | 
			
		||||
			prezzo_tot = rdoc->importo(true, false);
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
@ -1207,7 +1207,7 @@ void TDoc_fp::set_qta_prezzo(TPaf_record& paf1800f, TRiga_documento* rdoc) const
 | 
			
		||||
		}
 | 
			
		||||
		else
 | 
			
		||||
		{
 | 
			
		||||
			prezzo_unit = -abs(rdoc->prezzo(false, false, 8));
 | 
			
		||||
			prezzo_unit = -abs(rdoc->prezzo(_nascondi_sconti_righe_fatt, false, 5));
 | 
			
		||||
			prezzo_tot = -abs(rdoc->importo(true, false));
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
@ -1786,7 +1786,7 @@ bool TDoc_fp::doc_to_paf(TDocumentoEsteso& doc)
 | 
			
		||||
				real prz = imp;
 | 
			
		||||
				if (qta != UNO)
 | 
			
		||||
				{
 | 
			
		||||
					prz = rdoc->prezzo(true, false, 8);
 | 
			
		||||
					prz = rdoc->prezzo(_nascondi_sconti_righe_fatt, false, 8);
 | 
			
		||||
					if (prz.is_zero() && !imp.is_zero())
 | 
			
		||||
					{
 | 
			
		||||
						const TPrice price(imp / qta);
 | 
			
		||||
@ -1881,7 +1881,7 @@ bool TDoc_fp::doc_to_paf(TDocumentoEsteso& doc)
 | 
			
		||||
		// <ScontoMaggiorazione>
 | 
			
		||||
		TString80 sconto_expr = rdoc->get(RDOC_SCONTO);
 | 
			
		||||
		TToken_string sconti;
 | 
			
		||||
		if (parse_sconto(sconto_expr, sconti))
 | 
			
		||||
		if (!_nascondi_sconti_righe_fatt && parse_sconto(sconto_expr, sconti))
 | 
			
		||||
		{
 | 
			
		||||
			long nlin_sconto = 0;
 | 
			
		||||
			FOR_EACH_TOKEN(sconti, str)
 | 
			
		||||
@ -2298,7 +2298,10 @@ TDoc_fp::TDoc_fp() : _doc_rec(nullptr), _log(nullptr), _cache_insert(false), _re
 | 
			
		||||
	_conai_str = ini_get_string(CONFIG_DITTA, "ve", "DESCCONAIASS");
 | 
			
		||||
	if (_conai_str.empty())
 | 
			
		||||
		_conai_str = "Contributo CONAI assolto ove dovuto";
 | 
			
		||||
 | 
			
		||||
	_nascondi_sconti_righe_fatt = fp_settings().get_no_sconti_fatt();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
TDoc_fp::~TDoc_fp()
 | 
			
		||||
{
 | 
			
		||||
	commit();
 | 
			
		||||
 | 
			
		||||
@ -21,6 +21,7 @@
 | 
			
		||||
#define FP_F8										"f8"
 | 
			
		||||
#define FP_CHECK_NOT_BLOCK			"checknotblock"
 | 
			
		||||
#define FP_MAIL									"mail"
 | 
			
		||||
#define FP_CHECK_NO_SCONTI_FATT "noscontifatt"
 | 
			
		||||
 | 
			
		||||
// Sheet fp0300
 | 
			
		||||
#define FP_SLD_COD					"SLD"
 | 
			
		||||
@ -124,6 +125,11 @@ const TString& TFP_settings::get_body_mail(int idx) const
 | 
			
		||||
	return ini_get_string(FILE_CONFIG, FILE_SECTION, FP_MAIL, "STOpsTOP", idx);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
const bool TFP_settings::get_no_sconti_fatt() const
 | 
			
		||||
{
 | 
			
		||||
	return ini_get_bool(FILE_CONFIG, FILE_SECTION, FP_CHECK_NO_SCONTI_FATT, false);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void TFP_settings::set_db_indirizzo(const TString& ind) const
 | 
			
		||||
{
 | 
			
		||||
	ini_set_string(FILE_CONFIG, FILE_SECTION, FP_IP, ind);
 | 
			
		||||
@ -199,6 +205,11 @@ void TFP_settings::set_body_mail(const char* msg, int idx) const
 | 
			
		||||
	ini_set_string(FILE_CONFIG, FILE_SECTION, FP_MAIL, msg, idx);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void TFP_settings::set_no_sconti_fatt(const bool no_sconti_fatt) const
 | 
			
		||||
{
 | 
			
		||||
	ini_set_bool(FILE_CONFIG, FILE_SECTION, FP_CHECK_NO_SCONTI_FATT, no_sconti_fatt);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void TFP_settings::remove_para_ini(int idx)
 | 
			
		||||
{
 | 
			
		||||
	ini_remove(FILE_CONFIG, FILE_SECTION, FP_MAIL, idx);
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user