Patch level : 12.0 1066
Files correlati : ef0.exe Commento : Il programma di disposizionii e pagamenti dava un errore quando doveva creare un effetto dallo scadenziario
This commit is contained in:
		
							parent
							
								
									0675301082
								
							
						
					
					
						commit
						a1288069f8
					
				| @ -92,14 +92,14 @@ bool TPE_mask::calc_residual(const TRiga_scadenze& scad, | |||||||
|   const bool valuta = scad.in_valuta(); |   const bool valuta = scad.in_valuta(); | ||||||
|   const char tipocf = scad.get_char(SCAD_TIPOCF); |   const char tipocf = scad.get_char(SCAD_TIPOCF); | ||||||
| 
 | 
 | ||||||
|   TImporto importo = scad.residuo(TRUE); |   TImporto importo = scad.residuo(true); | ||||||
|   importo.normalize(tipocf == 'C' ? 'D' : 'A'); |   importo.normalize(tipocf == 'C' ? 'D' : 'A'); | ||||||
| 
 | 
 | ||||||
|   impres = importo.valore(); |   impres = importo.valore(); | ||||||
|   imppag = ZERO; |   imppag = ZERO; | ||||||
|   accsal = 'A';  |   accsal = 'A';  | ||||||
|   rdist = reff = 0; |   rdist = reff = 0; | ||||||
|   partially_unassigned = FALSE;   |   partially_unassigned = false;   | ||||||
|    |    | ||||||
|   // Contolla se ci sono pagamenti non assegnati da gestire
 |   // Contolla se ci sono pagamenti non assegnati da gestire
 | ||||||
|   const TRiga_partite& fattura = scad.riga(); |   const TRiga_partite& fattura = scad.riga(); | ||||||
| @ -120,7 +120,7 @@ bool TPE_mask::calc_residual(const TRiga_scadenze& scad, | |||||||
|     {                                                |     {                                                | ||||||
|       if (!fattura.rata(r).chiusa())    |       if (!fattura.rata(r).chiusa())    | ||||||
|       { |       { | ||||||
|         TImporto res = fattura.rata(r).residuo(TRUE); |         TImporto res = fattura.rata(r).residuo(true); | ||||||
|         tot_unassigned -= res.valore(); |         tot_unassigned -= res.valore(); | ||||||
|         if (tot_unassigned <= ZERO) |         if (tot_unassigned <= ZERO) | ||||||
|           break; |           break; | ||||||
| @ -133,7 +133,7 @@ bool TPE_mask::calc_residual(const TRiga_scadenze& scad, | |||||||
|         impres = ZERO; |         impres = ZERO; | ||||||
|       else |       else | ||||||
|         impres -= tot_unassigned; |         impres -= tot_unassigned; | ||||||
|       partially_unassigned = TRUE;   |       partially_unassigned = true;   | ||||||
|     } |     } | ||||||
|   } |   } | ||||||
|    |    | ||||||
| @ -151,7 +151,7 @@ bool TPE_mask::calc_residual(const TRiga_scadenze& scad, | |||||||
|     expr << '(' << LF_EFFETTI << "->" << EFF_EFFCONT << "!=\"X\")&&"; |     expr << '(' << LF_EFFETTI << "->" << EFF_EFFCONT << "!=\"X\")&&"; | ||||||
|     expr << '(' << LF_EFFETTI << "->" << EFF_TIPOCF << "==\"" << tipocf << "\")&&"; |     expr << '(' << LF_EFFETTI << "->" << EFF_TIPOCF << "==\"" << tipocf << "\")&&"; | ||||||
|     expr << '(' << LF_EFFETTI << "->" << EFF_CODCF << "==\"" << codcf << "\")"; |     expr << '(' << LF_EFFETTI << "->" << EFF_CODCF << "==\"" << codcf << "\")"; | ||||||
|     cur.setfilter(expr, TRUE); |     cur.setfilter(expr, true); | ||||||
|     const long items = cur.items(); |     const long items = cur.items(); | ||||||
|     if (items > 0L) |     if (items > 0L) | ||||||
|     { |     { | ||||||
| @ -407,7 +407,7 @@ bool TPE_mask::fill_rate() | |||||||
|   { |   { | ||||||
|     TRectype& partita = partite.curr(); |     TRectype& partita = partite.curr(); | ||||||
|    |    | ||||||
|     TProgind pi(items, "Caricamento partite aperte", TRUE, TRUE); |     TProgind pi(items, "Caricamento partite aperte", true, true); | ||||||
|    |    | ||||||
|     long last_cf = 0; |     long last_cf = 0; | ||||||
|     int last_year = 0; |     int last_year = 0; | ||||||
| @ -599,12 +599,13 @@ bool TPE_mask::fill_distinta(bool clear_all) | |||||||
| } | } | ||||||
| 
 | 
 | ||||||
| TRectype& TPE_mask::new_row_effetto(TDistinta& dist, char tipocf, long codcf, const TString & cup, const TString & cig, const TString & contsep, | TRectype& TPE_mask::new_row_effetto(TDistinta& dist, char tipocf, long codcf, const TString & cup, const TString & cig, const TString & contsep, | ||||||
| 																		const TDate & datapag, int& rigadist, int& rigaeff ) const | 																		const TDate & datapag, int& rigadist, int& rigaeff) const | ||||||
| { | { | ||||||
|   TString16 codice; codice << tipocf << '|' << codcf; |   TString16 codice; codice << tipocf << '|' << codcf; | ||||||
|   const bool ragg = !cache().get(LF_CFVEN, codice, CFV_RAGGEFF).blank(); |   const bool ragg = !cache().get(LF_CFVEN, codice, CFV_RAGGEFF).blank(); | ||||||
| 
 | 
 | ||||||
|   TEffetto* neweff = NULL; |   TEffetto* neweff = nullptr; | ||||||
|  | 
 | ||||||
|   if (ragg) |   if (ragg) | ||||||
|   { |   { | ||||||
|     for (int i = 0; i < dist.items(); i++) |     for (int i = 0; i < dist.items(); i++) | ||||||
| @ -633,7 +634,7 @@ TRectype& TPE_mask::new_row_effetto(TDistinta& dist, char tipocf, long codcf, co | |||||||
|       } |       } | ||||||
|     } |     } | ||||||
|   } |   } | ||||||
|   if (neweff == NULL) |   if (neweff == nullptr) | ||||||
|   { |   { | ||||||
|     neweff = new TEffetto; |     neweff = new TEffetto; | ||||||
|     dist.righe().add(neweff); |     dist.righe().add(neweff); | ||||||
| @ -648,7 +649,7 @@ TRectype& TPE_mask::new_row_effetto(TDistinta& dist, char tipocf, long codcf, co | |||||||
|     neweff->put(EFF_CONTSEP, contsep); |     neweff->put(EFF_CONTSEP, contsep); | ||||||
|   } |   } | ||||||
|   rigaeff = neweff->rows_r()+1; |   rigaeff = neweff->rows_r()+1; | ||||||
|   return neweff->row_r(rigaeff, TRUE); |   return neweff->row_r(rigaeff, true); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| bool TPE_mask::check_bank(TEffetto& effetto, TLog_report& log) const | bool TPE_mask::check_bank(TEffetto& effetto, TLog_report& log) const | ||||||
| @ -782,12 +783,12 @@ void TPE_mask::save_rate() | |||||||
|       const TRectype& mov = cache().get(LF_MOV, part.get(PART_NREG)); |       const TRectype& mov = cache().get(LF_MOV, part.get(PART_NREG)); | ||||||
| 			const TString cig = row->get(cid2index(F_CIG)); | 			const TString cig = row->get(cid2index(F_CIG)); | ||||||
|       const TString16 contsep = mov.get(MOV_CONTSEP); |       const TString16 contsep = mov.get(MOV_CONTSEP); | ||||||
|       TEffetto& eff = distinta[rigadist - 1]; |  | ||||||
| 
 | 
 | ||||||
|       if (rigaeff <= 0) |       if (rigaeff <= 0) | ||||||
|       { |       { | ||||||
|         const char tipocf = get(F_TIPOCF)[0]; |         const char tipocf = get(F_TIPOCF)[0]; | ||||||
|         const long codcf = row->get_long(cid2index(F_CODCF)); |         const long codcf = row->get_long(cid2index(F_CODCF)); | ||||||
|  | 
 | ||||||
|         TRectype& reff = new_row_effetto(distinta, tipocf, codcf, cup, cig, contsep, datapag, rigadist, rigaeff); |         TRectype& reff = new_row_effetto(distinta, tipocf, codcf, cup, cig, contsep, datapag, rigadist, rigaeff); | ||||||
| 
 | 
 | ||||||
|         reff.put(REFF_ANNO,    row->get(cid2index(F_ANNO))); |         reff.put(REFF_ANNO,    row->get(cid2index(F_ANNO))); | ||||||
| @ -799,9 +800,14 @@ void TPE_mask::save_rate() | |||||||
|         reff.put(REFF_DATAFATT, part.get(PART_DATADOC)); |         reff.put(REFF_DATAFATT, part.get(PART_DATADOC)); | ||||||
|         reff.put(REFF_IMPFATT,  part.get(PART_IMPORTO)); |         reff.put(REFF_IMPFATT,  part.get(PART_IMPORTO)); | ||||||
| 
 | 
 | ||||||
| 				eff.put(EFF_DSCVAL, row->get(sheet.cid2index(F_VALBEN))); |         TEffetto& eff = distinta[rigadist - 1]; | ||||||
|  |          | ||||||
|  |         eff.put(EFF_DSCVAL, row->get(sheet.cid2index(F_VALBEN))); | ||||||
|         eff.put(EFF_TIPOPAG, tipopag); |         eff.put(EFF_TIPOPAG, tipopag); | ||||||
|       } |       } | ||||||
|  | 
 | ||||||
|  |       TEffetto& eff = distinta[rigadist - 1]; | ||||||
|  | 
 | ||||||
|       if (sheet.cell_enabled(r, cid2index(F_IBANAPP))) |       if (sheet.cell_enabled(r, cid2index(F_IBANAPP))) | ||||||
|       { |       { | ||||||
|         eff.put(EFF_CODABI, row->get(cid2index(F_ABIAPP))); |         eff.put(EFF_CODABI, row->get(cid2index(F_ABIAPP))); | ||||||
| @ -994,7 +1000,7 @@ bool TPE_mask::on_field_event(TOperable_field& o, TField_event e, long jolly) | |||||||
|       disable(F_DIST); |       disable(F_DIST); | ||||||
|       disable(DLG_NEWREC); |       disable(DLG_NEWREC); | ||||||
|       set_focus_field(F_ABI); |       set_focus_field(F_ABI); | ||||||
|       _is_new = TRUE; |       _is_new = true; | ||||||
|       _spork = false; |       _spork = false; | ||||||
|     } |     } | ||||||
|     break; |     break; | ||||||
| @ -1187,7 +1193,7 @@ bool TPE_mask::on_field_event(TOperable_field& o, TField_event e, long jolly) | |||||||
|     if (e == fe_button) |     if (e == fe_button) | ||||||
|     { |     { | ||||||
|       print(); |       print(); | ||||||
|       return FALSE; |       return false; | ||||||
|     } |     } | ||||||
|     break; |     break; | ||||||
|   case F_SORT: |   case F_SORT: | ||||||
| @ -1218,7 +1224,7 @@ bool TPE_mask::on_field_event(TOperable_field& o, TField_event e, long jolly) | |||||||
|       return on_sheet_event(o, e, jolly); |       return on_sheet_event(o, e, jolly); | ||||||
|     break; |     break; | ||||||
|   } |   } | ||||||
|   return TRUE; |   return true; | ||||||
| }  | }  | ||||||
| 
 | 
 | ||||||
| TPE_mask::TPE_mask() : TAutomask("ef0a00a") | TPE_mask::TPE_mask() : TAutomask("ef0a00a") | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user