Patch level : 10.0 patch 810
Files correlati : ca0.exe Ricompilazione Demo : [ ] Commento Aggiunto un totale da ripartire sula tabelle di ripartizione che, se compilato, serve per aggiungere una eventuale differenza all'ultima riga della ripartizione (rif. Habilita) git-svn-id: svn://10.65.10.50/branches/R_10_00@20903 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
		
							parent
							
								
									f189d463f4
								
							
						
					
					
						commit
						ef3638b4df
					
				| @ -374,6 +374,8 @@ void TRiparti_app::spezza_campo(const TString& str, TToken_string& row, int firs | ||||
| 
 | ||||
| void TRiparti_app::write_rows() | ||||
| { | ||||
| 	real diff = _msk->get_real(F_TOTRIP); | ||||
| 	const bool has_tot = _msk->get_int(F_TIPORIP) == 2 &&diff != ZERO; | ||||
|   TRectype* key = new TRectype(LF_RRIP); | ||||
|   const char tipo = _msk->get(F_TIPO)[0]; | ||||
|   key->put("TIPO", tipo); | ||||
| @ -398,7 +400,18 @@ void TRiparti_app::write_rows() | ||||
|           mf.field()->write(row->get(idx), rec); | ||||
|       } | ||||
|     } | ||||
| 		if ( has_tot) | ||||
| 			diff -= rec.get_real(RRIP_RIPARTO); | ||||
|   } | ||||
| 	if (has_tot != ZERO) | ||||
| 		if (yesno_box(FR("Il totale da ripartire differisce di %s\ndal totale delle righe devo aggiungere la differenza"), abs(diff).stringa())) | ||||
| 			a[a.last_row()].add(RRIP_RIPARTO, diff); | ||||
| 		else | ||||
| 		{ | ||||
| 			const real newtot = _msk->get_real(F_TOTRIP) - diff; | ||||
| 			_msk->set (F_TOTRIP, newtot); | ||||
| 		} | ||||
| 
 | ||||
|   a.rewrite(); | ||||
| } | ||||
| 
 | ||||
| @ -453,18 +466,14 @@ bool TRiparti_app::get_next_key(TToken_string& key) | ||||
| 
 | ||||
| int TRiparti_app::write(const TMask& m) | ||||
| { | ||||
|   const int err = TRelation_application::write(m); | ||||
|   if (err == NOERR) | ||||
|   write_rows(); | ||||
|   return err; | ||||
|   return TRelation_application::write(m); | ||||
| } | ||||
| 
 | ||||
| int TRiparti_app::rewrite(const TMask& m) | ||||
| { | ||||
|   const int err = TRelation_application::rewrite(m); | ||||
|   if (err == NOERR) | ||||
|   write_rows(); | ||||
|   return err; | ||||
|   return TRelation_application::rewrite(m); | ||||
| } | ||||
| 
 | ||||
| int TRiparti_app::read(TMask& m) | ||||
|  | ||||
| @ -40,3 +40,4 @@ | ||||
| 
 | ||||
| #define F_SHEET      151 | ||||
| #define F_GENFASI    152 | ||||
| #define F_TOTRIP     153 | ||||
|  | ||||
| @ -191,6 +191,12 @@ BEGIN | ||||
|   GROUP 2 | ||||
| END | ||||
| 
 | ||||
| NUMBER F_TOTRIP 15 5 | ||||
| BEGIN | ||||
| 	PROMPT 2 10 "Totale riparto "   | ||||
| 	FIELD TOTRIP | ||||
| END  | ||||
| 
 | ||||
| ENDPAGE | ||||
| 
 | ||||
| PAGE "Righe" -1 -1 78 22 | ||||
| @ -208,7 +214,7 @@ END | ||||
| SPREADSHEET F_SHEET 80 -3 | ||||
| BEGIN | ||||
|   PROMPT 0 3 "" | ||||
|   ITEM "Ripartiz.@9F" | ||||
|   ITEM "Ripartiz.@15F" | ||||
|   ITEM "Cdc1" | ||||
|   ITEM "Cdc2" | ||||
|   ITEM "Cdc3" | ||||
| @ -238,7 +244,7 @@ ENDMASK | ||||
| 
 | ||||
| PAGE "Sheet" -1 -1 78 19 | ||||
| 
 | ||||
| NUMBER 101 6 2 | ||||
| NUMBER 101 15 5 | ||||
| BEGIN | ||||
|   PROMPT 1 0 "% Ripartizione " | ||||
|   FLAGS "U" | ||||
|  | ||||
| @ -1,3 +1,3 @@ | ||||
| 149 | ||||
| 0 | ||||
| $rip|||129|0|Archivio tabelle di ripartizione analitica||| | ||||
| $rip|||144|0|Archivio tabelle di ripartizione analitica||| | ||||
|  | ||||
| @ -1,5 +1,5 @@ | ||||
| 149 | ||||
| 13 | ||||
| 14 | ||||
| TIPO|1|1|0|Tipo Ripartizione (<I>nterattiva, <B>atch, <P>areggio) | ||||
| CODICE|1|8|0|Codice ripartizione | ||||
| GRUPPO|2|3|0|Gruppo | ||||
| @ -13,6 +13,7 @@ TIPORIP|1|1|0|Modalita' ripartizione (percentuale, quote, parti) | ||||
| ANNOES|9|4|0|Codice esercizio | ||||
| INDBIL|2|1|0|Indicatore bilancio conti di destinazione | ||||
| CLASSEMOV|2|1|0|Classe movimento (0=tutti,1=normali e temp.,2=preventivi e variaz.) | ||||
| TOTRIP|4|15|5|Totale di tutti i riparti | ||||
| 4 | ||||
| TIPO+CODICE|  | ||||
| TIPO+DESCRIZ|X | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user