Corretta marea di errori
git-svn-id: svn://10.65.10.50/trunk@2601 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
		
							parent
							
								
									31a1299c6b
								
							
						
					
					
						commit
						acf4461c69
					
				| @ -583,18 +583,22 @@ void TPrimanota_application::init_insert_mode(TMask& m) | |||||||
|     m.set(F_DATA74TER, m.get(F_DATAREG));               |     m.set(F_DATA74TER, m.get(F_DATAREG));               | ||||||
|    |    | ||||||
|   if (iva() != nessuna_iva) |   if (iva() != nessuna_iva) | ||||||
|  |   { | ||||||
|     occas_mask().reset(); |     occas_mask().reset(); | ||||||
|  |     m.hide(F_OCCASEDIT); | ||||||
|  |   } | ||||||
|    |    | ||||||
|   partite().destroy(); |   partite().destroy(); | ||||||
|   if (is_fattura()) |   if (is_fattura()) | ||||||
|   {  |   {  | ||||||
|  |     activate_numrif(FALSE); | ||||||
|     const TString16 dt(m.get(F_DATADOC)); |     const TString16 dt(m.get(F_DATADOC)); | ||||||
|     set_pagamento(NULL,dt);   |     set_pagamento(NULL,dt);   | ||||||
|     set_scadenze(m); |     set_scadenze(m); | ||||||
|   }   |   }   | ||||||
|   else |   else | ||||||
|   {                    |   {                    | ||||||
|     set_pagamento(NULL,NULL);         // Annulla pagamento
 |     set_pagamento(NULL,NULL);         // Annulla gestione rate
 | ||||||
|   }   |   }   | ||||||
| 
 | 
 | ||||||
|   _saldi.reset();                       // Inizializza saldi
 |   _saldi.reset();                       // Inizializza saldi
 | ||||||
| @ -631,6 +635,7 @@ int TPrimanota_application::read(TMask& m) | |||||||
|   {  |   {  | ||||||
|     ivas().reset();   // Azzera tutte le righe iva
 |     ivas().reset();   // Azzera tutte le righe iva
 | ||||||
|      |      | ||||||
|  |     occas_mask().reset(); | ||||||
|     const TString16 occode(_rel->lfile().get("OCFPI")); |     const TString16 occode(_rel->lfile().get("OCFPI")); | ||||||
|     occas_mask().set(O_CODICE, occode); |     occas_mask().set(O_CODICE, occode); | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -184,8 +184,6 @@ BEGIN | |||||||
|   DISPLAY "Nome@50" S0 |   DISPLAY "Nome@50" S0 | ||||||
|   OUTPUT SK_VALUTA CODTAB |   OUTPUT SK_VALUTA CODTAB | ||||||
|   CHECKTYPE NORMAL |   CHECKTYPE NORMAL | ||||||
|   MESSAGE EMPTY CLEAR,SK_CAMBIO|CLEAR,SK_TOTDOCVAL |  | ||||||
|   MESSAGE ENABLE,SK_CAMBIO|ENABLE,SK_TOTDOCVAL|DIRTY,SK_DATACAMBIO|K_TAB,SK_DATACAMBIO |  | ||||||
| END | END | ||||||
| 
 | 
 | ||||||
| DATE SK_DATACAMBIO | DATE SK_DATACAMBIO | ||||||
|  | |||||||
| @ -242,7 +242,7 @@ BEGIN | |||||||
|   DISPLAY "Descrizione@50" S0 |   DISPLAY "Descrizione@50" S0 | ||||||
|   DISPLAY "Codice" CODTAB |   DISPLAY "Codice" CODTAB | ||||||
|   COPY OUTPUT S_CODDESC |   COPY OUTPUT S_CODDESC | ||||||
|   FIELD LF_PARTITE->DESCAGG |   FIELD LF_PARTITE->DESCR | ||||||
| END | END | ||||||
| 
 | 
 | ||||||
| NUMBER S_VSABI 5 | NUMBER S_VSABI 5 | ||||||
|  | |||||||
| @ -63,7 +63,7 @@ real TPrimanota_application::scorpora(real& imponibile, const real& percent) | |||||||
| }   | }   | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| // Calcola il totale del documento tenenod conto del segno della prima riga e di quella delle
 | // Calcola il totale del documento tenendo conto del segno della prima riga e di quella delle
 | ||||||
| // ritenute sociali sulla causale                        
 | // ritenute sociali sulla causale                        
 | ||||||
| real TPrimanota_application::totale_documento() | real TPrimanota_application::totale_documento() | ||||||
| { | { | ||||||
| @ -492,10 +492,11 @@ real TPrimanota_application::calcola_saldo() const | |||||||
|    |    | ||||||
|   if (pag) |   if (pag) | ||||||
|   {  |   {  | ||||||
|     const char s(causale().sezione(2)); |     const char s(causale().sezione(2));    // Conto della cassa
 | ||||||
|     const real t(m.get(F_TOTALE)); |     const real t(m.get(F_TOTALE)); | ||||||
|     TImporto totdoc(s, t); |     TImporto totdoc(s, t); | ||||||
|     totdoc += saldaconto; |     totdoc += saldaconto; | ||||||
|  |     totdoc.normalize(s); | ||||||
|     m.set(K_RESIDUO, totdoc.valore().string()); |     m.set(K_RESIDUO, totdoc.valore().string()); | ||||||
|   } |   } | ||||||
|    |    | ||||||
| @ -505,7 +506,8 @@ real TPrimanota_application::calcola_saldo() const | |||||||
| HIDDEN bool imptot_error(const TImporto& imptot, const TImporto& impsal, bool val) | HIDDEN bool imptot_error(const TImporto& imptot, const TImporto& impsal, bool val) | ||||||
| {    | {    | ||||||
|   bool ok = TRUE; |   bool ok = TRUE; | ||||||
|   TImporto residuo(imptot); residuo += impsal; residuo.normalize(); |   TImporto cassa(impsal); cassa.swap_section(); | ||||||
|  |   TImporto residuo(imptot); residuo -= cassa; residuo.normalize(imptot.sezione()); | ||||||
|    |    | ||||||
|   if (!residuo.is_zero()) |   if (!residuo.is_zero()) | ||||||
|   {                                          |   {                                          | ||||||
| @ -521,7 +523,7 @@ HIDDEN bool imptot_error(const TImporto& imptot, const TImporto& impsal, bool va | |||||||
|       msg << "inserito"; |       msg << "inserito"; | ||||||
|     msg << " e' " << imptot.valore().string(pic) << ' ' << imptot.sezione() << ",\n"; |     msg << " e' " << imptot.valore().string(pic) << ' ' << imptot.sezione() << ",\n"; | ||||||
|     msg << "i pagamenti e le spese ammontano a "  |     msg << "i pagamenti e le spese ammontano a "  | ||||||
|         << impsal.valore().string(pic) << ' ' << impsal.sezione() << ",\n"; |         << cassa.valore().string(pic) << ' ' << cassa.sezione() << ",\n"; | ||||||
|     msg << "per cui il residuo e' " << residuo.valore().string(pic) << '.';               |     msg << "per cui il residuo e' " << residuo.valore().string(pic) << '.';               | ||||||
|      |      | ||||||
|     if (m.edit_mode() && impsal.is_zero()) |     if (m.edit_mode() && impsal.is_zero()) | ||||||
| @ -607,7 +609,7 @@ bool TPrimanota_application::cg_handler(TMask_field& f, KEY k) | |||||||
|           { |           { | ||||||
|             saldaconto += importo;   |             saldaconto += importo;   | ||||||
|             if (in_valuta) |             if (in_valuta) | ||||||
|               saldaconto_val += a.partite().importo_speso(numreg, i+1, TRUE); |               saldaconto_val += a.partite().importo_speso(numreg, i+1, TRUE, 0x1); | ||||||
|           }   |           }   | ||||||
|         }   |         }   | ||||||
|       } |       } | ||||||
| @ -1825,12 +1827,13 @@ bool TPrimanota_application::occas_code_handler(TMask_field& f, KEY key) | |||||||
|     if (*code) |     if (*code) | ||||||
|     { |     { | ||||||
|       TRelation occas(LF_OCCAS); |       TRelation occas(LF_OCCAS); | ||||||
|       occas.lfile().put("CFPI", code); |       occas.curr().put("CFPI", code); | ||||||
|       if (occas.read(_isequal) == NOERR) |       if (occas.read(_isequal) == NOERR) | ||||||
|       {                      |       {                      | ||||||
|         f.mask().autoload(&occas); |         TMask& m = f.mask(); | ||||||
|         f.mask().send_key(K_TAB, O_COMUNE);         // Forza decodifica comuni
 |         m.autoload(&occas); | ||||||
|         f.mask().send_key(K_TAB, O_COMUNENAS); |         m.send_key(K_TAB, O_COMUNE);         // Forza decodifica comuni
 | ||||||
|  |         m.send_key(K_TAB, O_COMUNENAS); | ||||||
|       }   |       }   | ||||||
|     } |     } | ||||||
|   }  |   }  | ||||||
| @ -2371,7 +2374,15 @@ bool TPrimanota_application::activate_numrif(bool init_pag) | |||||||
|   { |   { | ||||||
|     m.show(F_ANNORIF, shown); |     m.show(F_ANNORIF, shown); | ||||||
|     m.show(F_NUMRIF,  shown);  |     m.show(F_NUMRIF,  shown);  | ||||||
|     if (!shown) |     if (shown) | ||||||
|  |     {   | ||||||
|  |       if (m.get(F_ANNORIF).empty()) | ||||||
|  |       { | ||||||
|  |         m.set(F_ANNORIF, m.get(F_DATADOC).right(4)); | ||||||
|  |         m.set(F_NUMRIF, m.get(_npart_is_prot ? F_PROTIVA : F_NUMDOC)); | ||||||
|  |       }   | ||||||
|  |     } | ||||||
|  |     else | ||||||
|     { |     { | ||||||
|       m.reset(F_ANNORIF); |       m.reset(F_ANNORIF); | ||||||
|       m.reset(F_NUMRIF); |       m.reset(F_NUMRIF); | ||||||
| @ -2419,7 +2430,7 @@ bool TPrimanota_application::solaiva_handler(TMask_field& f, KEY key) | |||||||
|         if (game != NULL) |         if (game != NULL) | ||||||
|         { |         { | ||||||
|           m.set(F_ANNORIF, game->anno()); |           m.set(F_ANNORIF, game->anno()); | ||||||
|           m.set(F_NUMRIF, game->numero(), TRUE); |           m.set(F_NUMRIF, game->numero()); | ||||||
|         } |         } | ||||||
|       } |       } | ||||||
|       else |       else | ||||||
|  | |||||||
| @ -316,8 +316,7 @@ bool TPrimanota_application::codpag_handler(TMask_field& f, KEY key) | |||||||
|   const bool set_scad = a.is_fattura() && m.page_enabled(2);   // E' attiva pagina 3
 |   const bool set_scad = a.is_fattura() && m.page_enabled(2);   // E' attiva pagina 3
 | ||||||
|   if (key == K_ENTER) |   if (key == K_ENTER) | ||||||
|   {   |   {   | ||||||
|     const bool required = a.is_fattura() && (m.insert_mode() || set_scad); |     if (set_scad && f.get().empty()) | ||||||
|     if (required && f.get().empty()) |  | ||||||
|     { |     { | ||||||
|       f.error_box("Il codice di pagamento e' obbligatorio!\n" |       f.error_box("Il codice di pagamento e' obbligatorio!\n" | ||||||
|                   "Se possibile esso verra' proposto, ma potra'\n" |                   "Se possibile esso verra' proposto, ma potra'\n" | ||||||
| @ -375,14 +374,12 @@ bool TPrimanota_application::numrif_handler(TMask_field& f, KEY key) | |||||||
|     TPrimanota_application& a = app(); |     TPrimanota_application& a = app(); | ||||||
|     TMask& m = f.mask(); |     TMask& m = f.mask(); | ||||||
|      |      | ||||||
|     const bool required = m.insert_mode() && a.is_fattura() &&  |     bool required = m.insert_mode() && a.is_fattura(); | ||||||
|                           (key == K_ENTER || f.focusdirty()) && |     required     &= key == K_ENTER || f.focusdirty(); | ||||||
|                           !(m.get_bool(F_SOLAIVA) || m.field(F_OCCASEDIT).enabled()); |     required     &= !(m.get_bool(F_SOLAIVA) || m.field(F_OCCASEDIT).active()); | ||||||
| 
 | 
 | ||||||
|     if (required && f.get().blank()) |     if (required && f.get().blank()) | ||||||
|     {                                                                 |     {                                                                 | ||||||
|       f.set(m.get(a._npart_is_prot ? F_PROTIVA : F_NUMDOC)); |  | ||||||
|        |  | ||||||
|       if (m.get(F_CODPAG).empty()) |       if (m.get(F_CODPAG).empty()) | ||||||
|       { |       { | ||||||
|         TMask_field& clifo = m.field(a.iva() == iva_vendite ? F_CLIENTE : F_FORNITORE); |         TMask_field& clifo = m.field(a.iva() == iva_vendite ? F_CLIENTE : F_FORNITORE); | ||||||
| @ -391,13 +388,13 @@ bool TPrimanota_application::numrif_handler(TMask_field& f, KEY key) | |||||||
|       } |       } | ||||||
| 
 | 
 | ||||||
|       TMask_field& anno = m.field(F_ANNORIF); |       TMask_field& anno = m.field(F_ANNORIF); | ||||||
|       if (anno.get().empty()) |       if (m.get(F_ANNORIF).empty()) | ||||||
|       {        |         m.set(F_ANNORIF, m.get(F_DATADOC).right(4)); | ||||||
|         anno.set_dirty(); |  | ||||||
|         anno.on_hit(); |  | ||||||
|       } |  | ||||||
| 
 | 
 | ||||||
|       ok = error_box("Il numero di riferimento partita e' obbligatorio!\n" |       f.set(m.get(a._npart_is_prot ? F_PROTIVA : F_NUMDOC)); | ||||||
|  |       key = K_TAB; // Forza la successiva activate_numrif
 | ||||||
|  |        | ||||||
|  |       ok = f.error_box("Il numero di riferimento partita e' obbligatorio!\n" | ||||||
|                        "Se possibile esso verra' proposto, ma potra'\n" |                        "Se possibile esso verra' proposto, ma potra'\n" | ||||||
|                        "essere modificato prima di registrare il movimento."); |                        "essere modificato prima di registrare il movimento."); | ||||||
|     } |     } | ||||||
| @ -861,7 +858,7 @@ void TPrimanota_application::write_scadenze(const TMask& m) | |||||||
|    |    | ||||||
|   int nuova_riga = 0; |   int nuova_riga = 0; | ||||||
| 
 | 
 | ||||||
|   if (anno > 0 && !numpart.blank()) |   if (m.page_enabled(2)) | ||||||
|   { |   { | ||||||
|     const int tmov = causale().tipomov(); |     const int tmov = causale().tipomov(); | ||||||
|     const TString desc(m.get(F_DESCR)); |     const TString desc(m.get(F_DESCR)); | ||||||
| @ -976,7 +973,10 @@ void TPrimanota_application::write_scadenze(const TMask& m) | |||||||
|   }  |   }  | ||||||
|    |    | ||||||
|   if (newgame != NULL)           // Se non ho cancellato il numero partita ...
 |   if (newgame != NULL)           // Se non ho cancellato il numero partita ...
 | ||||||
|  |   { | ||||||
|     newgame->write();            // Salva nuova partita
 |     newgame->write();            // Salva nuova partita
 | ||||||
|  |     delete newgame; | ||||||
|  |   }   | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| @ -991,7 +991,8 @@ bool TPrimanota_application::showpartite_handler(TMask_field& f, KEY k) | |||||||
|   TPrimanota_application& a = app(); |   TPrimanota_application& a = app(); | ||||||
|    |    | ||||||
|   const char tipo = m.get(CG_ROWTYPE)[0];                       |   const char tipo = m.get(CG_ROWTYPE)[0];                       | ||||||
|   if (tipo == 'K' || (tipo == 'T' && a.causale().tipomov() == 2)) |   const bool is_nota = tipo == 'T' && a.causale().tipomov() == 2 && m.field(F_NUMRIF).active(); | ||||||
|  |   if (tipo == 'K' || is_nota) | ||||||
|   { |   { | ||||||
|     TSheet_field& s = *m.get_sheet();    |     TSheet_field& s = *m.get_sheet();    | ||||||
|     const int riga = s.selected(); |     const int riga = s.selected(); | ||||||
|  | |||||||
							
								
								
									
										319
									
								
								cg/cg2105.cpp
									
									
									
									
									
								
							
							
						
						
									
										319
									
								
								cg/cg2105.cpp
									
									
									
									
									
								
							| @ -62,7 +62,7 @@ protected: | |||||||
|   int nuovo_pagamento(TPartita& partita, int nriga, int rata, tipo_movimento tm) const; |   int nuovo_pagamento(TPartita& partita, int nriga, int rata, tipo_movimento tm) const; | ||||||
|   bool edit_pagamento(TPartita& p, int nriga, int nrata, int nrigp) const; |   bool edit_pagamento(TPartita& p, int nriga, int nrata, int nrigp) const; | ||||||
| 
 | 
 | ||||||
|   char calcola_sezione() const; |   char calcola_sezione(tipo_movimento tm = tm_pagamento) const; | ||||||
|   long number_distance(const char* key, const char* num) const; |   long number_distance(const char* key, const char* num) const; | ||||||
|   bool same_number(const char* key, const char* num) const; |   bool same_number(const char* key, const char* num) const; | ||||||
|   void append_conto(TString& s) const; |   void append_conto(TString& s) const; | ||||||
| @ -107,23 +107,56 @@ protected: | |||||||
|   static bool importo_handler(TMask_field& f, KEY k); |   static bool importo_handler(TMask_field& f, KEY k); | ||||||
|   static bool importolire_handler(TMask_field& f, KEY k); |   static bool importolire_handler(TMask_field& f, KEY k); | ||||||
|   static bool saldo_handler(TMask_field& f, KEY k); |   static bool saldo_handler(TMask_field& f, KEY k); | ||||||
|   static bool cambio_handler(TMask_field& f, KEY k); |  | ||||||
|   static bool datapag_handler(TMask_field& f, KEY k); |   static bool datapag_handler(TMask_field& f, KEY k); | ||||||
|   static bool conto_handler(TMask_field& f, KEY k); |   static bool conto_handler(TMask_field& f, KEY k); | ||||||
|  |   static bool descr_handler(TMask_field& f, KEY k); | ||||||
|   void gioca_cambi(int force = 0x0); |   void gioca_cambi(int force = 0x0); | ||||||
| 
 | 
 | ||||||
| public: | public: | ||||||
|   void set_pag(const TRectype& oldpag, const TRiga_scadenze& scad, const TImporto& importo); |   void set_pag(const TRectype& oldpag, const TRiga_scadenze& scad, const TImporto& importo); | ||||||
|   void get_pag(TRectype& oldpag) const; |   void get_pag(TRectype& oldpag, TRectype& somma) const; | ||||||
| 
 | 
 | ||||||
|   TPay_mask(const TGame_mask& parent); |   TPay_mask(const TGame_mask& parent, int mode); | ||||||
|   virtual ~TPay_mask() {} |   virtual ~TPay_mask() {} | ||||||
| }; | }; | ||||||
| 
 | 
 | ||||||
| TPay_mask::TPay_mask(const TGame_mask& parent)  | #ifdef __EXTRA__          | ||||||
|          : TMask("cg2100s"), _parent(parent),  | const char* const PAYMASK = "sc0100b"; | ||||||
|  | #else | ||||||
|  | const char* const PAYMASK = "cg2100s"; | ||||||
|  | #endif            | ||||||
|  | 
 | ||||||
|  | TPay_mask::TPay_mask(const TGame_mask& parent, int mod)  | ||||||
|  |          : TMask(PAYMASK), _parent(parent),  | ||||||
|            _causale(LF_CAUSALI, CAU_CODCAUS, CAU_DESCR) |            _causale(LF_CAUSALI, CAU_CODCAUS, CAU_DESCR) | ||||||
| {  | {  | ||||||
|  |   set_mode(mod); | ||||||
|  |   enable(DLG_DELREC, edit_mode()); | ||||||
|  |    | ||||||
|  | #ifdef __EXTRA__ | ||||||
|  |   enable(E_SEZIONE, insert_mode()); | ||||||
|  | 
 | ||||||
|  |   set_handler(E_TOTALE, TSaldaconto_app::totale_handler); | ||||||
|  |   if (app().gestione_valuta()) | ||||||
|  |   { | ||||||
|  |     disable(E_VALUTA);        // Non posso cambiare codice valuta!
 | ||||||
|  |     set_handler(E_TOTDOCVAL,  TSaldaconto_app::totval_handler); | ||||||
|  |     set_handler(E_VALUTA,     TSaldaconto_app::valuta_handler); | ||||||
|  |     set_handler(E_DATACAMBIO, TSaldaconto_app::datacambio_handler); | ||||||
|  |     set_handler(E_CAMBIO,     TSaldaconto_app::cambio_handler); | ||||||
|  |   } | ||||||
|  |   else | ||||||
|  |     hide(-3);   | ||||||
|  | 
 | ||||||
|  |   hide(S_RESIDUOPAG); | ||||||
|  |   hide(-2); // I campi relativi alla contropartita non vengono gestiti
 | ||||||
|  |                                                                        | ||||||
|  |   set_handler(E_DESCR, descr_handler); | ||||||
|  |   set_handler(S_DESCAGG, descr_handler); | ||||||
|  |                                                                        | ||||||
|  |   disable(E_ANNORIF); | ||||||
|  |   disable(E_NUMRIF); | ||||||
|  | #endif | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void TPay_mask::set_pag(const TRectype& oldpag, const TRiga_scadenze& scad,  | void TPay_mask::set_pag(const TRectype& oldpag, const TRiga_scadenze& scad,  | ||||||
| @ -132,11 +165,11 @@ void TPay_mask::set_pag(const TRectype& oldpag, const TRiga_scadenze& scad, | |||||||
|   const TPartita& p = scad.partita(); |   const TPartita& p = scad.partita(); | ||||||
|   const int nrigp = oldpag.get_int(PAGSCA_NRIGP); |   const int nrigp = oldpag.get_int(PAGSCA_NRIGP); | ||||||
|   const TRiga_partite& sum = p.riga(nrigp); |   const TRiga_partite& sum = p.riga(nrigp); | ||||||
|   const TRiga_partite& fatt = scad.riga(); |  | ||||||
|   const bool assigned = oldpag.get_int(PAGSCA_NRIGA) != TPartita::UNASSIGNED; |   const bool assigned = oldpag.get_int(PAGSCA_NRIGA) != TPartita::UNASSIGNED; | ||||||
|  |   const TRiga_partite& fatt = assigned ? scad.riga() : sum; | ||||||
| 
 | 
 | ||||||
|   TRelation rel(LF_PAGSCA);                // Working relation
 |   TRelation rel(LF_PAGSCA);                // Working relation
 | ||||||
|   rel.add(LF_PARTITE, "ANNO=ANNO|NUMERO=NUMERO"); |   rel.add(LF_PARTITE, "ANNO=ANNO|NUMPART=NUMPART"); | ||||||
|   rel.curr() = oldpag; |   rel.curr() = oldpag; | ||||||
|   rel.curr(LF_PARTITE) = sum; |   rel.curr(LF_PARTITE) = sum; | ||||||
|   autoload(&rel);                          // Load current record on mask
 |   autoload(&rel);                          // Load current record on mask
 | ||||||
| @ -149,9 +182,9 @@ void TPay_mask::set_pag(const TRectype& oldpag, const TRiga_scadenze& scad, | |||||||
|   { |   { | ||||||
|   case 'C': prompt << "Cliente"; break; |   case 'C': prompt << "Cliente"; break; | ||||||
|   case 'F': prompt << "Fornitore"; break; |   case 'F': prompt << "Fornitore"; break; | ||||||
|   default : prompt << "Conto"; break; |   default : prompt << "Conto " << k.gruppo() << ' ' << k.conto(); break; | ||||||
|   } |   } | ||||||
|   prompt << ' ' << k.gruppo() << ' ' << k.conto() << ' ' << k.sottoconto() << ' '; |   prompt << ' ' << k.sottoconto() << ' '; | ||||||
|   prompt << "Partita:" << p.anno() << ' ' << p.numero() |   prompt << "Partita:" << p.anno() << ' ' << p.numero() | ||||||
|          << " Riga:" << oldpag.get_int(PAGSCA_NRIGA)  |          << " Riga:" << oldpag.get_int(PAGSCA_NRIGA)  | ||||||
|          << " Rata:" << oldpag.get_int(PAGSCA_NRATA) |          << " Rata:" << oldpag.get_int(PAGSCA_NRATA) | ||||||
| @ -176,24 +209,25 @@ void TPay_mask::set_pag(const TRectype& oldpag, const TRiga_scadenze& scad, | |||||||
| 
 | 
 | ||||||
|   const bool in_valuta = fatt.in_valuta(); |   const bool in_valuta = fatt.in_valuta(); | ||||||
| 
 | 
 | ||||||
|  |   set(S_SEZIONE_SCAD, fatt.sezione() == 'A' ? "A" : "D"); // Sezione della riga
 | ||||||
|   if (assigned) |   if (assigned) | ||||||
|   { |   { | ||||||
|     set(S_SEZIONE_SCAD, fatt.sezione() == 'A' ? "A" : "D"); // Sezione della riga
 |  | ||||||
|     set(S_IMPORTO_SCAD, scad.get(SCAD_IMPORTO));         // Importo della rata
 |     set(S_IMPORTO_SCAD, scad.get(SCAD_IMPORTO));         // Importo della rata
 | ||||||
|     if (in_valuta) |     if (in_valuta) | ||||||
|       set(S_IMPORTOVAL_SCAD, scad.get(SCAD_IMPORTOVAL)); // Importo in valuta 
 |       set(S_IMPORTOVAL_SCAD, scad.get(SCAD_IMPORTOVAL)); // Importo in valuta 
 | ||||||
|     _da_pagare = scad.residuo(in_valuta).valore();       // Calcola residuo in valuta
 |     _da_pagare = scad.residuo(in_valuta).valore();       // Calcola residuo in valuta
 | ||||||
|   } |  | ||||||
|   else |  | ||||||
|   { |  | ||||||
|     set(S_SEZIONE_SCAD, sum.sezione());                  // Sezione della riga
 |  | ||||||
|     _da_pagare = ZERO; |  | ||||||
|   } |  | ||||||
| 
 | 
 | ||||||
|     TReal_field& res = (TReal_field&)field(S_RESIDUORATA); |     TReal_field& res = (TReal_field&)field(S_RESIDUORATA); | ||||||
|     res.set_decimals(in_valuta ? 3 : 0); |     res.set_decimals(in_valuta ? 3 : 0); | ||||||
|     if (get(S_SALDOACC)[0] != 'S') |     if (get(S_SALDOACC)[0] != 'S') | ||||||
|       res.set(_da_pagare.string()); |       res.set(_da_pagare.string()); | ||||||
|  |   } | ||||||
|  |   else                 | ||||||
|  |   { | ||||||
|  |     hide(S_RESIDUORATA);        // Se non assegnato nascondi residuo rata
 | ||||||
|  |     _da_pagare = ZERO; | ||||||
|  |   } | ||||||
|  | 
 | ||||||
| 
 | 
 | ||||||
|   if (in_valuta) |   if (in_valuta) | ||||||
|   { |   { | ||||||
| @ -211,12 +245,10 @@ void TPay_mask::set_pag(const TRectype& oldpag, const TRiga_scadenze& scad, | |||||||
|   // Ricorda l'importo da pagare
 |   // Ricorda l'importo da pagare
 | ||||||
|   _da_pagare += oldimp; |   _da_pagare += oldimp; | ||||||
|    |    | ||||||
|   const TValuta val(sum); | //  const long numreg = sum.get_long(PART_NREG);
 | ||||||
|   val.set(*this, S_VALUTA, S_DATACAMBIO, S_CAMBIO); | //  const int numrig = sum.get_int(PART_NUMRIG);
 | ||||||
|    |  | ||||||
|   const long numreg = sum.get_long(PART_NREG); |  | ||||||
|   const int numrig = sum.get_int(PART_NUMRIG); |  | ||||||
| 
 | 
 | ||||||
|  | #ifndef __EXTRA__ | ||||||
|   _pagabile = _parent.residuo(in_valuta).valore(); |   _pagabile = _parent.residuo(in_valuta).valore(); | ||||||
| 
 | 
 | ||||||
|   TReal_field& resp = (TReal_field&)field(S_RESIDUOPAG); |   TReal_field& resp = (TReal_field&)field(S_RESIDUOPAG); | ||||||
| @ -224,10 +256,11 @@ void TPay_mask::set_pag(const TRectype& oldpag, const TRiga_scadenze& scad, | |||||||
|   resp.set(_pagabile.string()); |   resp.set(_pagabile.string()); | ||||||
|    |    | ||||||
|   _pagabile += oldimp; |   _pagabile += oldimp; | ||||||
|  | #endif | ||||||
|    |    | ||||||
|   // Il flag di saldo/acconto e' attivo solo se non ci sono acconti, cioe':
 |   // Il flag di saldo/acconto e' attivo solo se non ci sono acconti, cioe':
 | ||||||
|   // pagamento non assegnato o con data documento antecedente quella della fattura
 |   // pagamento non assegnato o con data documento antecedente quella della fattura
 | ||||||
|   _can_solder = oldpag.get_int(PAGSCA_NRIGA) != TPartita::UNASSIGNED; |   _can_solder = assigned; | ||||||
|   if (_can_solder) |   if (_can_solder) | ||||||
|   {                             |   {                             | ||||||
|     const tipo_movimento tm = sum.tipo(); |     const tipo_movimento tm = sum.tipo(); | ||||||
| @ -239,42 +272,39 @@ void TPay_mask::set_pag(const TRectype& oldpag, const TRiga_scadenze& scad, | |||||||
|       _can_solder = datapag >= datasca; |       _can_solder = datapag >= datasca; | ||||||
|     }   |     }   | ||||||
|   } |   } | ||||||
|   else                 | 
 | ||||||
|   { |  | ||||||
|     hide(S_RESIDUORATA);        // Se non assegnato nascondi residuo rata
 |  | ||||||
|   }   |  | ||||||
|   // Mostra saldo solo se non e' ne' un acconto, ne' una nota di credito
 |   // Mostra saldo solo se non e' ne' un acconto, ne' una nota di credito
 | ||||||
|   enable(S_SALDOACC, _can_solder);   |   enable(S_SALDOACC, _can_solder);   | ||||||
| 
 |  | ||||||
|   show(-3, in_valuta);          // Attiva campi relativi alla valuta
 |   show(-3, in_valuta);          // Attiva campi relativi alla valuta
 | ||||||
|   show(-4, in_valuta);          // Attiva campi relativi al cambio
 |  | ||||||
| 
 | 
 | ||||||
| #ifdef __EXTRA__                           | #ifdef __EXTRA__                           | ||||||
|   set_handler(S_CAMBIO, cambio_handler); |   // La valuta puo' essere cambiata solo su partite nuove
 | ||||||
|   hide(S_RESIDUOPAG); |   const bool on = p.first() == p.last(); | ||||||
|   const bool mostra_conto = FALSE; |   enable(E_VALUTA, on); | ||||||
| #else | #else | ||||||
|   disable(-4);           |  | ||||||
|    |  | ||||||
|   _datadoc = sum.get_date(PART_DATADOC); |  | ||||||
|   set_handler(S_DATAPAG, datapag_handler);  |  | ||||||
|   set_handler(S_GRUPPO, conto_handler); |   set_handler(S_GRUPPO, conto_handler); | ||||||
|   set_handler(S_CONTO, conto_handler); |   set_handler(S_CONTO, conto_handler); | ||||||
| 
 |  | ||||||
|   const bool mostra_conto = !sum.is_nota_credito();           |   const bool mostra_conto = !sum.is_nota_credito();           | ||||||
| #endif   |  | ||||||
|   show(-2, mostra_conto);       // mostra/nasconde conto contropartita
 |   show(-2, mostra_conto);       // mostra/nasconde conto contropartita
 | ||||||
|  | #endif   | ||||||
|  | 
 | ||||||
|  | // Gestione data-pagamento: non puo' precedere la data del documento
 | ||||||
|  |   _datadoc = sum.get_date(PART_DATADOC); | ||||||
|  |   set_handler(S_DATAPAG, datapag_handler);  | ||||||
| 
 | 
 | ||||||
|   const bool mostra_ritenute = !(sum.is_nota_credito() || in_valuta); |   const bool mostra_ritenute = !(sum.is_nota_credito() || in_valuta); | ||||||
|   show(S_RITENUTE, mostra_ritenute);       // mostra/nasconde ritenute
 |   show(S_RITENUTE, mostra_ritenute);       // mostra/nasconde ritenute
 | ||||||
| }  | }  | ||||||
| 
 | 
 | ||||||
| void TPay_mask::get_pag(TRectype& newpag) const | void TPay_mask::get_pag(TRectype& newpag, TRectype& sum) const | ||||||
| { | { | ||||||
|   TRelation rel(LF_PAGSCA);                // Working relation
 |   TRelation rel(LF_PAGSCA);                // Working relation
 | ||||||
|  |   rel.add(LF_PARTITE, "ANNO=ANNO|NUMPART=NUMPART"); | ||||||
|   rel.curr() = newpag;        |   rel.curr() = newpag;        | ||||||
|  |   rel.curr(LF_PARTITE) = sum; | ||||||
|   autosave(&rel);                          // Load current record from mask
 |   autosave(&rel);                          // Load current record from mask
 | ||||||
|   newpag = rel.curr(); |   newpag = rel.curr(); | ||||||
|  |   sum = rel.curr(LF_PARTITE); | ||||||
| }      | }      | ||||||
| 
 | 
 | ||||||
| // Riempie i campi valuta a zero in base agli altri
 | // Riempie i campi valuta a zero in base agli altri
 | ||||||
| @ -282,11 +312,13 @@ void TPay_mask::gioca_cambi(int force) | |||||||
| {                | {                | ||||||
|   const real totale = get(S_IMPORTO); |   const real totale = get(S_IMPORTO); | ||||||
|   const real totval = get(S_IMPORTOVAL); |   const real totval = get(S_IMPORTOVAL); | ||||||
|  | 
 | ||||||
| #ifdef __EXTRA__ | #ifdef __EXTRA__ | ||||||
|   const TValuta cambio(*this, E_VALUTA, E_DATACAMBIO, E_CAMBIO); |   const TValuta cambio(*this, E_VALUTA, E_DATACAMBIO, E_CAMBIO); | ||||||
| #else   | #else   | ||||||
|   const TValuta cambio(_parent, P_VALUTA, P_DATACAMBIO, P_CAMBIO); |   const TValuta cambio(_parent, P_VALUTA, P_DATACAMBIO, P_CAMBIO); | ||||||
| #endif   | #endif   | ||||||
|  | 
 | ||||||
|   if ( (force == 0x1 || totale.is_zero()) && !(totval.is_zero() || cambio.in_lire()) ) |   if ( (force == 0x1 || totale.is_zero()) && !(totval.is_zero() || cambio.in_lire()) ) | ||||||
|   { |   { | ||||||
|     const real new_totale = cambio.val2lit(totval); |     const real new_totale = cambio.val2lit(totval); | ||||||
| @ -301,12 +333,14 @@ void TPay_mask::gioca_cambi(int force) | |||||||
|       set(S_IMPORTOVAL, new_totval, TRUE); |       set(S_IMPORTOVAL, new_totval, TRUE); | ||||||
|   }  |   }  | ||||||
| 
 | 
 | ||||||
|  | #ifdef __EXTRA__   | ||||||
|   if ( (force == 0x4 || cambio.in_lire()) && !(totale.is_zero() || totval.is_zero())) |   if ( (force == 0x4 || cambio.in_lire()) && !(totale.is_zero() || totval.is_zero())) | ||||||
|   { |   { | ||||||
|     real new_cambio = totale / totval; new_cambio.round(5); |     real new_cambio = totale / totval; new_cambio.round(5); | ||||||
|     if (new_cambio != cambio.cambio()) |     if (new_cambio != cambio.cambio()) | ||||||
|       set(S_CAMBIO, new_cambio, TRUE); |       set(E_CAMBIO, new_cambio, TRUE); | ||||||
|   }  |   }  | ||||||
|  | #endif   | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| @ -391,17 +425,6 @@ bool TPay_mask::saldo_handler(TMask_field& f, KEY k) | |||||||
|   return TRUE; |   return TRUE; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| 
 |  | ||||||
| bool TPay_mask::cambio_handler(TMask_field& f, KEY k) |  | ||||||
| {              |  | ||||||
|   if (k == K_TAB && f.focusdirty()) |  | ||||||
|   { |  | ||||||
|     TPay_mask& m = (TPay_mask&)f.mask();          |  | ||||||
|     m.gioca_cambi(); |  | ||||||
|   } |  | ||||||
|   return TRUE; |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| bool TPay_mask::datapag_handler(TMask_field& f, KEY k) | bool TPay_mask::datapag_handler(TMask_field& f, KEY k) | ||||||
| {    | {    | ||||||
|   if (f.to_check(k))            |   if (f.to_check(k))            | ||||||
| @ -435,24 +458,45 @@ bool TPay_mask::conto_handler(TMask_field& f, KEY k) | |||||||
| 
 | 
 | ||||||
| class TNew_mask : public TMask | class TNew_mask : public TMask | ||||||
| {         | {         | ||||||
|  |   bool _allow_fatt; | ||||||
|  | 
 | ||||||
|  | protected: | ||||||
|  |   static bool tipomov_handler(TMask_field& f, KEY k); | ||||||
|  |                | ||||||
| public: | public: | ||||||
|   TNew_mask(char tipocf, bool fatt, bool edit); |   TNew_mask(char tipocf, bool fatt, bool edit); | ||||||
|   virtual ~TNew_mask() {} |   virtual ~TNew_mask() {} | ||||||
| };                                                          | };                                                          | ||||||
| 
 | 
 | ||||||
| TNew_mask::TNew_mask(char tipocf, bool fatt, bool edit) | bool TNew_mask::tipomov_handler(TMask_field& f, KEY k) | ||||||
|          : TMask(fatt ? "cg2100n" : "sc0100n") |  | ||||||
| { | { | ||||||
|  |   if (k == K_ENTER) | ||||||
|  |   { | ||||||
|  |     TNew_mask& m = (TNew_mask&)f.mask(); | ||||||
|  |     if (!m._allow_fatt && f.get() == "1") | ||||||
|  |       return f.error_box("Non e' possibile utilizzare una fattura per un pagamento"); | ||||||
|  |   } | ||||||
|  |    | ||||||
|  |   return TRUE; | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | TNew_mask::TNew_mask(char tipocf, bool fatt, bool edit) | ||||||
|  |          : TMask("cg2100n"), _allow_fatt(fatt) | ||||||
|  | {    | ||||||
|  |   TMask_field& tipomov = field(P_NUOVO); | ||||||
| #ifdef __EXTRA__ | #ifdef __EXTRA__ | ||||||
|   enable(P_NUOVO); |   tipomov.set_handler(tipomov_handler); | ||||||
|  |   tipomov.enable(); | ||||||
|  |   tipomov.set(_allow_fatt ? "1" : "3"); | ||||||
|  |   if (!_allow_fatt) | ||||||
|  |     set_caption("Nuovo pagamento"); | ||||||
| #else   | #else   | ||||||
|   disable(P_NUOVO); |   tipomov.disable(); | ||||||
| #endif   | #endif   | ||||||
| 
 | 
 | ||||||
|   enable(P_ANNO,   edit); |   enable(P_ANNO,   edit); | ||||||
|   enable(P_NUMERO, edit); |   enable(P_NUMERO, edit); | ||||||
|   if (edit)        |   if (edit) first_focus(P_NUMERO); | ||||||
|     first_focus(P_NUMERO); |  | ||||||
|    |    | ||||||
|   const char a = TPartita::allineamento_richiesto(tipocf); |   const char a = TPartita::allineamento_richiesto(tipocf); | ||||||
|   field(P_NUMERO).set_justify(a == 'R'); |   field(P_NUMERO).set_justify(a == 'R'); | ||||||
| @ -485,13 +529,16 @@ TGame_mask::TGame_mask(const TBill& bill, long numreg, int riga) | |||||||
|   descr << ' ' << ((TBill&)_conto).descrizione(); |   descr << ' ' << ((TBill&)_conto).descrizione(); | ||||||
|   set(P_DESCR, descr); |   set(P_DESCR, descr); | ||||||
|                |                | ||||||
|  | #ifdef __EXTRA__   | ||||||
|  |   disable(-3);     // Disabilita gestione valuta
 | ||||||
|  |   hide(P_RESIDUO); | ||||||
|  |   hide(P_RESIDUOVAL); | ||||||
|  | #else | ||||||
|   TValuta val; |   TValuta val; | ||||||
| #ifndef __EXTRA__   |  | ||||||
|   const TRiga_partite* row = cerca_prima_riga(); |   const TRiga_partite* row = cerca_prima_riga(); | ||||||
|   if (row != NULL) |   if (row != NULL) | ||||||
|   {                                    |   {                                    | ||||||
|     val.get(*row);                               // Legge valuta standard dalla partita
 |     val.get(*row);                               // Legge valuta standard dalla partita
 | ||||||
|    |  | ||||||
|     set(P_ANNO, row->get(PART_ANNO));            // Propone anno e partita
 |     set(P_ANNO, row->get(PART_ANNO));            // Propone anno e partita
 | ||||||
|     set(P_NUMERO, row->get(PART_NUMPART)); |     set(P_NUMERO, row->get(PART_NUMPART)); | ||||||
|   } |   } | ||||||
| @ -507,9 +554,8 @@ TGame_mask::TGame_mask(const TBill& bill, long numreg, int riga) | |||||||
|     }   |     }   | ||||||
|   } |   } | ||||||
|   val.set(*this, P_VALUTA, P_DATACAMBIO, P_CAMBIO); |   val.set(*this, P_VALUTA, P_DATACAMBIO, P_CAMBIO); | ||||||
| #endif   |  | ||||||
| 
 |  | ||||||
|   enable(-3, val.in_valuta()); |   enable(-3, val.in_valuta()); | ||||||
|  | #endif   | ||||||
|    |    | ||||||
|   set_handler(P_ANNO,    annopart_handler); |   set_handler(P_ANNO,    annopart_handler); | ||||||
|   set_handler(P_NUMERO,  numpart_handler); |   set_handler(P_NUMERO,  numpart_handler); | ||||||
| @ -625,10 +671,10 @@ void TGame_mask::aggiorna_residuo() | |||||||
|   {                                                                          |   {                                                                          | ||||||
|     // Importo della riga contabile senza differenza cambi
 |     // Importo della riga contabile senza differenza cambi
 | ||||||
|     _resval = _importo; |     _resval = _importo; | ||||||
|     const TImporto diffcam = giochi.importo_speso(_numreg, _numrig, FALSE, 0x4); |     const TImporto abb_diff = giochi.importo_speso(_numreg, _numrig, FALSE, 0x6); | ||||||
|     _resval -= diffcam; |     _resval -= abb_diff; | ||||||
|     cambio.lit2val(_resval); |     cambio.lit2val(_resval); | ||||||
|     const TImporto spesoval = giochi.importo_speso(_numreg, _numrig, TRUE); |     const TImporto spesoval = giochi.importo_speso(_numreg, _numrig, TRUE, 0x1); | ||||||
|     _resval -= spesoval;                                       // Residuo della riga
 |     _resval -= spesoval;                                       // Residuo della riga
 | ||||||
|     _resval.normalize(sez); |     _resval.normalize(sez); | ||||||
|     set(P_RESIDUOVAL, _resval.valore()); |     set(P_RESIDUOVAL, _resval.valore()); | ||||||
| @ -678,6 +724,7 @@ void TGame_mask::aggiorna_valuta(const TValuta& val) | |||||||
|   fill_partite();  |   fill_partite();  | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | /*
 | ||||||
| void TGame_mask::aggiorna_sorelle(const TRiga_partite& part) const | void TGame_mask::aggiorna_sorelle(const TRiga_partite& part) const | ||||||
| {      | {      | ||||||
|   TPartite_array& pa = app().partite(); |   TPartite_array& pa = app().partite(); | ||||||
| @ -695,6 +742,7 @@ void TGame_mask::aggiorna_sorelle(const TRiga_partite& part) const | |||||||
|     } |     } | ||||||
|   }   |   }   | ||||||
| }  | }  | ||||||
|  | */ | ||||||
| 
 | 
 | ||||||
| bool TGame_mask::partite_notify(TSheet_field& partite, int r, KEY k) | bool TGame_mask::partite_notify(TSheet_field& partite, int r, KEY k) | ||||||
| { | { | ||||||
| @ -720,7 +768,7 @@ bool TGame_mask::partite_notify(TSheet_field& partite, int r, KEY k) | |||||||
|     gm.set(P_ANNO, anno);                                   // Aggiorna campi di ricerca
 |     gm.set(P_ANNO, anno);                                   // Aggiorna campi di ricerca
 | ||||||
|     gm.set(P_NUMERO, num); |     gm.set(P_NUMERO, num); | ||||||
|      |      | ||||||
|     TString prima_valuta;                                   // Codice prima valuta
 |     TValuta prima_valuta;                                   // Codice prima valuta
 | ||||||
|        |        | ||||||
|     if (anno > 0) |     if (anno > 0) | ||||||
|     { |     { | ||||||
| @ -736,10 +784,9 @@ bool TGame_mask::partite_notify(TSheet_field& partite, int r, KEY k) | |||||||
|        |        | ||||||
|       const int lastrow = game->last(); |       const int lastrow = game->last(); | ||||||
|        |        | ||||||
|       if (lastrow > 0 && prima_valuta.empty()) |       if (lastrow > 0 && prima_valuta.in_lire()) | ||||||
|         prima_valuta = game->riga(lastrow).get(PART_CODVAL); |         prima_valuta.get(game->riga(lastrow)); | ||||||
| 
 |       const bool in_valuta = prima_valuta.in_valuta(); | ||||||
|       const bool in_valuta = prima_valuta.not_empty(); |  | ||||||
|        |        | ||||||
|       for (int ri = game->first(); ri <= lastrow; ri = game->succ(ri)) |       for (int ri = game->first(); ri <= lastrow; ri = game->succ(ri)) | ||||||
|       { |       { | ||||||
| @ -914,9 +961,11 @@ bool TGame_mask::partite_notify(TSheet_field& partite, int r, KEY k) | |||||||
|       {         |       {         | ||||||
|         TToken_string& sp = scadenze.row(scadenze.add("")); |         TToken_string& sp = scadenze.row(scadenze.add("")); | ||||||
|         sp.add("Saldo partita", 4); |         sp.add("Saldo partita", 4); | ||||||
|         if (prima_valuta.not_empty()) |         if (prima_valuta.in_valuta()) | ||||||
|           sp << ' ' << prima_valuta; |           sp << ' ' << prima_valuta.codice(); | ||||||
|          | #ifdef __EXTRA__ | ||||||
|  |         prima_valuta.set(gm, P_VALUTA, P_DATACAMBIO, P_CAMBIO); | ||||||
|  | #endif          | ||||||
|         gm.add_importo(sp, tot_lit); |         gm.add_importo(sp, tot_lit); | ||||||
|         gm.add_importo(sp, tot_val, TRUE); |         gm.add_importo(sp, tot_val, TRUE); | ||||||
|       } |       } | ||||||
| @ -925,10 +974,10 @@ bool TGame_mask::partite_notify(TSheet_field& partite, int r, KEY k) | |||||||
|         delete game; |         delete game; | ||||||
|     } |     } | ||||||
|      |      | ||||||
|     if (prima_valuta.not_empty() != gm._valfirst) |     if (prima_valuta.in_valuta() != gm._valfirst) | ||||||
|     {  |     {  | ||||||
|       sheet.swap_columns(106, 107); // Scambia le colonne dell'importo in lire e in valuta
 |       sheet.swap_columns(106, 107); // Scambia le colonne dell'importo in lire e in valuta
 | ||||||
|       gm._valfirst = prima_valuta.not_empty(); |       gm._valfirst = !gm._valfirst; | ||||||
|     } |     } | ||||||
|      |      | ||||||
|     if (sheet.items() > 0) |     if (sheet.items() > 0) | ||||||
| @ -961,16 +1010,17 @@ bool TGame_mask::scadenze_notify(TSheet_field& scadenze, int r, KEY k) | |||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| // Complesso algoritmo per calcolare la sezione di una nuova riga partita
 | // Complesso algoritmo per calcolare la sezione di una nuova riga partita
 | ||||||
| char TGame_mask::calcola_sezione() const | char TGame_mask::calcola_sezione(tipo_movimento tm) const | ||||||
| {  | {  | ||||||
|   char sezione = ' '; |   char sezione = ' '; | ||||||
|  |   const char tipoc = conto().tipo(); | ||||||
| 
 | 
 | ||||||
| #ifndef __EXTRA__  | #ifndef __EXTRA__  | ||||||
|   const TCausale& causale = app().causale(); |   const TCausale& causale = app().causale(); | ||||||
|   const tipo_movimento tm = (tipo_movimento)causale.tipomov(); |   tm = (tipo_movimento)causale.tipomov(); | ||||||
|   const char tipoc = conto().tipo(); |  | ||||||
| 
 |  | ||||||
|   sezione = causale.sezione(1);                     // Usa la sezione della causale
 |   sezione = causale.sezione(1);                     // Usa la sezione della causale
 | ||||||
|  | #endif | ||||||
|  |    | ||||||
|   if (sezione <= ' ')                               // Se non c'e' la sezione bell'e' ch'e' pronta
 |   if (sezione <= ' ')                               // Se non c'e' la sezione bell'e' ch'e' pronta
 | ||||||
|   { |   { | ||||||
|     if (tm == tm_fattura || tm == tm_insoluto)      // calcola in base al tipo movimento e
 |     if (tm == tm_fattura || tm == tm_insoluto)      // calcola in base al tipo movimento e
 | ||||||
| @ -978,6 +1028,9 @@ char TGame_mask::calcola_sezione() const | |||||||
|     else   |     else   | ||||||
|       sezione = (tipoc == 'C') ? 'A' : 'D'; |       sezione = (tipoc == 'C') ? 'A' : 'D'; | ||||||
|   } |   } | ||||||
|  | 
 | ||||||
|  | #ifndef __EXTRA__  | ||||||
|  |   // Gestione compensazioni
 | ||||||
|   if (tipoc > ' ')                                  // Se il tipo e' C o F
 |   if (tipoc > ' ')                                  // Se il tipo e' C o F
 | ||||||
|   { |   { | ||||||
|     TBill bill; causale.bill(1, bill);              // Legge primo conto causale
 |     TBill bill; causale.bill(1, bill);              // Legge primo conto causale
 | ||||||
| @ -992,8 +1045,10 @@ char TGame_mask::calcola_sezione() const | |||||||
| 
 | 
 | ||||||
| int TGame_mask::nuova_riga(TPartita& partita, tipo_movimento tm) const | int TGame_mask::nuova_riga(TPartita& partita, tipo_movimento tm) const | ||||||
| {  | {  | ||||||
|  |   const int prima_riga = partita.first();           // Memorizza prima riga 
 | ||||||
|  | 
 | ||||||
|   TRiga_partite& part = partita.new_row();          // Creazione nuova riga vuota
 |   TRiga_partite& part = partita.new_row();          // Creazione nuova riga vuota
 | ||||||
|   const int nriga = part.get_int(PART_NRIGA); |   const int nriga = part.get_int(PART_NRIGA);       // Nuova riga
 | ||||||
|    |    | ||||||
|   // Copia dati movimento corrente
 |   // Copia dati movimento corrente
 | ||||||
|   part.put(PART_NREG,   _numreg);                   // Numero operazione
 |   part.put(PART_NREG,   _numreg);                   // Numero operazione
 | ||||||
| @ -1003,13 +1058,26 @@ int TGame_mask::nuova_riga(TPartita& partita, tipo_movimento tm) const | |||||||
|   part.put(PART_GRUPPOCL, conto().gruppo()); |   part.put(PART_GRUPPOCL, conto().gruppo()); | ||||||
|   part.put(PART_CONTOCL,  conto().conto()); |   part.put(PART_CONTOCL,  conto().conto()); | ||||||
|    |    | ||||||
|  |   part.put(PART_TIPOMOV, (int)tm);        | ||||||
|  |    | ||||||
|  |   if (prima_riga > 0) | ||||||
|  |   { | ||||||
|  |     const char* valuta = partita.riga(prima_riga).get(PART_CODVAL); | ||||||
|  |     part.put(PART_CODVAL, valuta); | ||||||
|  |   } | ||||||
|  | 
 | ||||||
|  | #ifdef __EXTRA__     | ||||||
|  |   const TDate oggi(TODAY); | ||||||
|  |   const char* s = oggi.string(); | ||||||
|  |   part.put(PART_DATADOC, s); | ||||||
|  |   part.put(PART_DATAREG, s); | ||||||
|  |   if (tm != tm_fattura) | ||||||
|  |     part.put(PART_DATAPAG, s); | ||||||
|  | #else | ||||||
|   // Setta il cambio corrente
 |   // Setta il cambio corrente
 | ||||||
|   const TValuta valuta(*this, P_VALUTA, P_DATACAMBIO, P_CAMBIO); |   const TValuta valuta(*this, P_VALUTA, P_DATACAMBIO, P_CAMBIO); | ||||||
|   valuta.put(part); |   valuta.put(part); | ||||||
| 
 | 
 | ||||||
|   part.put(PART_TIPOMOV, (int)tm);        |  | ||||||
| 
 |  | ||||||
| #ifndef __EXTRA__     |  | ||||||
|   TMask& cm = app().curr_mask(); |   TMask& cm = app().curr_mask(); | ||||||
|   const TCausale& causale = app().causale(); |   const TCausale& causale = app().causale(); | ||||||
|   part.put(PART_NUMDOC,  cm.get(F_NUMDOC)); |   part.put(PART_NUMDOC,  cm.get(F_NUMDOC)); | ||||||
| @ -1034,14 +1102,14 @@ int TGame_mask::nuova_riga(TPartita& partita, tipo_movimento tm) const | |||||||
|     part.put(PART_REG,     cm.get(F_CODREG)); |     part.put(PART_REG,     cm.get(F_CODREG)); | ||||||
|     part.put(PART_PROTIVA, cm.get(F_PROTIVA)); |     part.put(PART_PROTIVA, cm.get(F_PROTIVA)); | ||||||
|   }    |   }    | ||||||
|  | #endif     | ||||||
| 
 | 
 | ||||||
|   const char sezione = calcola_sezione(); |   const char sezione = calcola_sezione(tm); | ||||||
|    |    | ||||||
|   // Memorizza solo la sezione (importi nulli)  
 |   // Memorizza solo la sezione (importi nulli)  
 | ||||||
|   part.put(PART_SEZ,       sezione); |   part.put(PART_SEZ,       sezione); | ||||||
|   part.put(PART_SEZABB,    sezione);  |   part.put(PART_SEZABB,    sezione);  | ||||||
|   part.put(PART_SEZDIFCAM, sezione); |   part.put(PART_SEZDIFCAM, sezione); | ||||||
| #endif     |  | ||||||
|    |    | ||||||
|   return nriga; |   return nriga; | ||||||
| } | } | ||||||
| @ -1142,7 +1210,6 @@ bool TGame_mask::edit_scadenza_handler(TMask_field& f, KEY k) | |||||||
|       nm->set(P_ANNO, game.anno()); |       nm->set(P_ANNO, game.anno()); | ||||||
|       nm->set(P_NUMERO, game.numero()); |       nm->set(P_NUMERO, game.numero()); | ||||||
|       const KEY k = nm->run(); |       const KEY k = nm->run(); | ||||||
|       delete nm;    |  | ||||||
|        |        | ||||||
|       if (k == K_ENTER) |       if (k == K_ENTER) | ||||||
|         tm = (tipo_movimento)nm->get_int(P_NUOVO); |         tm = (tipo_movimento)nm->get_int(P_NUOVO); | ||||||
| @ -1151,6 +1218,7 @@ bool TGame_mask::edit_scadenza_handler(TMask_field& f, KEY k) | |||||||
|         if (was == NULL) giochi.destroy(game); |         if (was == NULL) giochi.destroy(game); | ||||||
|         return FALSE; |         return FALSE; | ||||||
|       }   |       }   | ||||||
|  |       delete nm;    | ||||||
| #else         | #else         | ||||||
|       tm = (tipo_movimento)app().causale().tipomov(); |       tm = (tipo_movimento)app().causale().tipomov(); | ||||||
| #endif     | #endif     | ||||||
| @ -1205,36 +1273,10 @@ bool TGame_mask::edit_scadenza_handler(TMask_field& f, KEY k) | |||||||
|      |      | ||||||
|     if (cambiato) |     if (cambiato) | ||||||
|     {                  |     {                  | ||||||
|       TToken_string& cur_game = gm.partite().row(gm._riga_partite); |  | ||||||
|       const int cur_year = cur_game.get_int(0); |  | ||||||
|       const char* cur_num = cur_game.get(); |  | ||||||
|       const bool on_sheet = game.anno() == cur_year && game.numero() == cur_num; |  | ||||||
|        |  | ||||||
|       TSheet_field& ss = gm.scadenze(); |       TSheet_field& ss = gm.scadenze(); | ||||||
|       const int rs = ss.selected();     // Memorizza la riga corrente
 |       const int rs = ss.selected();     // Memorizza la riga corrente
 | ||||||
|        |  | ||||||
|       if (game.ok()) |  | ||||||
|       {     |  | ||||||
|         if (on_sheet) |  | ||||||
|         { |  | ||||||
|           gm.update_partita(game, gm._riga_partite); |  | ||||||
|           const int rp = gm._riga_partite; |  | ||||||
|           gm._riga_partite = -1;                    // Forza aggiornamento sheet
 |  | ||||||
|           partite_notify(gm.partite(), rp, K_TAB); |  | ||||||
|         }   |  | ||||||
|       } |  | ||||||
|       else |  | ||||||
|       {  |  | ||||||
|         // Se la partita e' presente anche su file non posso cancellarla:
 |  | ||||||
|         // altrimenti non verra' rimossa alla registrazione!                    
 |  | ||||||
|         if (!game.is_on_file())       |  | ||||||
|           giochi.destroy(game);   |  | ||||||
|         if (on_sheet)   |  | ||||||
|       gm.fill_partite(); |       gm.fill_partite(); | ||||||
|       }   |  | ||||||
|       if (rs < ss.items()) |  | ||||||
|       ss.select(rs);                    // Riporta la selezione sulla riga corrente
 |       ss.select(rs);                    // Riporta la selezione sulla riga corrente
 | ||||||
| 
 |  | ||||||
|       gm._changed = TRUE; |       gm._changed = TRUE; | ||||||
|     }   |     }   | ||||||
|   } |   } | ||||||
| @ -1249,7 +1291,12 @@ bool TGame_mask::nuovo_handler(TMask_field& f, KEY k) | |||||||
|     int anno; |     int anno; | ||||||
|     TString numero; |     TString numero; | ||||||
| 
 | 
 | ||||||
|     TMask* new_game = new TNew_mask(gm.conto().tipo(), TRUE, TRUE);      | #ifdef __EXTRA__ | ||||||
|  |     const bool allow_fatt = TRUE; | ||||||
|  | #else | ||||||
|  |     const bool allow_fatt = FALSE; | ||||||
|  | #endif     | ||||||
|  |     TMask* new_game = new TNew_mask(gm.conto().tipo(), allow_fatt, TRUE);      | ||||||
|      |      | ||||||
|     tipo_movimento tm; |     tipo_movimento tm; | ||||||
| 
 | 
 | ||||||
| @ -1265,24 +1312,21 @@ bool TGame_mask::nuovo_handler(TMask_field& f, KEY k) | |||||||
| #endif              | #endif              | ||||||
| 
 | 
 | ||||||
|     k = new_game->run(); |     k = new_game->run(); | ||||||
|  |     tm = (tipo_movimento)new_game->get_int(P_NUOVO); | ||||||
|     anno   = new_game->get_int(P_ANNO); |     anno   = new_game->get_int(P_ANNO); | ||||||
|     numero = new_game->get(P_NUMERO); |     numero = new_game->get(P_NUMERO); | ||||||
|      |      | ||||||
|     tm = (tipo_movimento)new_game->get_int(P_NUOVO); |     // Distruzione maschera di richiesta
 | ||||||
|      |  | ||||||
|     delete new_game; new_game = NULL; |     delete new_game; new_game = NULL; | ||||||
|      |      | ||||||
|     if (k == K_ENTER) |     if (k == K_ENTER) | ||||||
|     {              |     {              | ||||||
|  |       // Creazione nuova partita         
 | ||||||
|       TPartita& game = app().partite().partita(gm.conto(), anno, numero); |       TPartita& game = app().partite().partita(gm.conto(), anno, numero); | ||||||
|        |        | ||||||
|  |       // N.B. Le fatture non possone essere editate in modo contabile
 | ||||||
|       if (tm != tm_fattura)      |       if (tm != tm_fattura)      | ||||||
|       {                               |       {                               | ||||||
| #ifndef __EXTRA__       |  | ||||||
|         if (game.ok()) |  | ||||||
|           return error_box("La partita %d '%s' esiste gia'.", anno, (const char*)game.numero()); |  | ||||||
| #endif |  | ||||||
| 
 |  | ||||||
|         const int nriga = TPartita::UNASSIGNED; |         const int nriga = TPartita::UNASSIGNED; | ||||||
|         const int nrata = TPartita::UNASSIGNED; |         const int nrata = TPartita::UNASSIGNED; | ||||||
|         const int nrigp = gm.nuovo_pagamento(game, nriga, nrata, tm); |         const int nrigp = gm.nuovo_pagamento(game, nriga, nrata, tm); | ||||||
| @ -1516,6 +1560,11 @@ void TGame_mask::fill_partite() | |||||||
|       if (u) |       if (u) | ||||||
|         update_partita(*gioco, -1);              |         update_partita(*gioco, -1);              | ||||||
|     }   |     }   | ||||||
|  |     else | ||||||
|  |     {                               // Se la partita e' vuota ...
 | ||||||
|  |       if (!gioco->is_on_file())     // ... e non esiste su file
 | ||||||
|  |         giochi.destroy(*gioco);     // posso eliminarla tranquillamente
 | ||||||
|  |     } | ||||||
|   } |   } | ||||||
|    |    | ||||||
|   TLocalisamfile partita(LF_PARTITE); |   TLocalisamfile partita(LF_PARTITE); | ||||||
| @ -1574,7 +1623,12 @@ bool TGame_mask::edit_pagamento(TPartita& p, int nriga, int nrata, int nrigp) co | |||||||
|   TRectype oldpag = p.pagamento(nriga, nrata, nrigp); |   TRectype oldpag = p.pagamento(nriga, nrata, nrigp); | ||||||
|   TRiga_partite& somma  = p.riga(nrigp); |   TRiga_partite& somma  = p.riga(nrigp); | ||||||
| 
 | 
 | ||||||
|   TPay_mask* pm = new TPay_mask(*this);              // We must create masks on the heap
 |   const bool nuovo = oldpag.get(PAGSCA_ACCSAL) != "S" &&  | ||||||
|  |                      oldpag.get_real(PAGSCA_IMPORTO).is_zero() && | ||||||
|  |                      oldpag.get_real(PAGSCA_RITENUTE).is_zero(); | ||||||
|  |    | ||||||
|  |   // We must create masks on the heap
 | ||||||
|  |   TPay_mask* pm = new TPay_mask(*this, nuovo ? MODE_INS : MODE_MOD);               | ||||||
|   TPay_mask& m = *pm; |   TPay_mask& m = *pm; | ||||||
| 
 | 
 | ||||||
|   if (nriga == TPartita::UNASSIGNED) |   if (nriga == TPartita::UNASSIGNED) | ||||||
| @ -1590,10 +1644,6 @@ bool TGame_mask::edit_pagamento(TPartita& p, int nriga, int nrata, int nrigp) co | |||||||
|     m.set_pag(oldpag, scaden, _residuo); |     m.set_pag(oldpag, scaden, _residuo); | ||||||
|   } |   } | ||||||
|    |    | ||||||
|   const bool nuovo = oldpag.get(PAGSCA_ACCSAL) != "S" &&  |  | ||||||
|                      oldpag.get_real(PAGSCA_IMPORTO).is_zero() && |  | ||||||
|                      oldpag.get_real(PAGSCA_RITENUTE).is_zero(); |  | ||||||
| 
 |  | ||||||
|   KEY key = m.run(); |   KEY key = m.run(); | ||||||
| 
 | 
 | ||||||
|   if (key == K_ESC && nuovo) |   if (key == K_ESC && nuovo) | ||||||
| @ -1612,15 +1662,12 @@ bool TGame_mask::edit_pagamento(TPartita& p, int nriga, int nrata, int nrigp) co | |||||||
|     } |     } | ||||||
|     else |     else | ||||||
|     { |     { | ||||||
|       m.get_pag(newpag);    |       m.get_pag(newpag, somma);    | ||||||
|       somma.put(PART_DESCR,   m.get(S_DESCAGG));    // Aggiorna descrizione    (comune alla riga)
 |  | ||||||
|       somma.put(PART_DATAPAG, m.get(S_DATAPAG));    // Aggiorna data pagamento (comune alla riga)
 |  | ||||||
|       somma.put(PART_TIPOPAG, m.get(S_TIPOPAG));    // Aggiorna tipo pagamento (comune alla riga)
 |  | ||||||
|     } |     } | ||||||
|      |      | ||||||
|     TValuta val;                               |     const TValuta val(somma);                               | ||||||
| #ifdef __EXTRA__ | #ifdef __EXTRA__ | ||||||
|     val.get(m, S_VALUTA, S_DATACAMBIO, S_CAMBIO); | //    val.get(m, E_VALUTA, E_DATACAMBIO, E_CAMBIO);
 | ||||||
|     p.modifica_pagamento(newpag, val, TRUE); |     p.modifica_pagamento(newpag, val, TRUE); | ||||||
| #else   | #else   | ||||||
|     if (somma.is_nota_credito())       |     if (somma.is_nota_credito())       | ||||||
| @ -1643,14 +1690,18 @@ bool TGame_mask::edit_pagamento(TPartita& p, int nriga, int nrata, int nrigp) co | |||||||
| 
 | 
 | ||||||
| bool TPrimanota_application::edit_partite(const TMask& m, int riga) | bool TPrimanota_application::edit_partite(const TMask& m, int riga) | ||||||
| {                            | {                            | ||||||
|   const char tipo = m.get(103)[0]; |   const char tipo = m.get(CG_TIPO)[0]; | ||||||
|   const int gruppo = m.get_int(104); |   const int gruppo = m.get_int(CG_GRUPPO); | ||||||
|   const int conto = m.get_int(105); |   const int conto = m.get_int(CG_CONTO); | ||||||
|   const long sottoconto = m.get_int(106); |   const long sottoconto = m.get_int(CG_SOTTOCONTO); | ||||||
|   const TBill b(gruppo, conto, sottoconto, tipo);  // Legge il conto della riga selezionata
 |   const TBill b(gruppo, conto, sottoconto, tipo);  // Legge il conto della riga selezionata
 | ||||||
|   if (!b.ok())  |   if (!b.ok())  | ||||||
|     return FALSE;                         // Esci se il conto della riga cliente non e' valido
 |     return FALSE;                         // Esci se il conto della riga cliente non e' valido
 | ||||||
|      |      | ||||||
|  |   const char rt = m.get(CG_ROWTYPE)[0]; | ||||||
|  |   if (rt == 'T' && tipo <= ' ') | ||||||
|  |     return FALSE; | ||||||
|  |    | ||||||
|   TMovimentoPN* pn = (TMovimentoPN*)get_relation(); |   TMovimentoPN* pn = (TMovimentoPN*)get_relation(); | ||||||
|   curr_mask().autosave(pn);   // Aggiorna i dati della testata sulle partite
 |   curr_mask().autosave(pn);   // Aggiorna i dati della testata sulle partite
 | ||||||
|   partite().update_reg(pn->curr()); |   partite().update_reg(pn->curr()); | ||||||
|  | |||||||
| @ -640,8 +640,11 @@ int TRiga_partite::ultima_ratapagata() const | |||||||
| // Certified 100%
 | // Certified 100%
 | ||||||
| tipo_movimento TRiga_partite::tipo() const  | tipo_movimento TRiga_partite::tipo() const  | ||||||
| {  | {  | ||||||
|   const tipo_movimento tm = (tipo_movimento)get_int(PART_TIPOMOV);  |   const tipo_movimento tm = (tipo_movimento)(get_char(PART_TIPOMOV)-'0');  | ||||||
|   CHECKD(tm != tm_nessuno, "Riga partite con un tipo losco ", tm); | #ifdef DBG   | ||||||
|  |   if (tm == tm_nessuno && get_int(PART_NRIGA) != TPartita::UNASSIGNED) | ||||||
|  |     fatal_box("Riga partite con un tipo losco."); | ||||||
|  | #endif   | ||||||
|   return tm; |   return tm; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| @ -763,21 +766,26 @@ TImporto TRiga_partite::importo(bool valuta, int mode) const | |||||||
|     i.set(sezione(), get_real(field)); |     i.set(sezione(), get_real(field)); | ||||||
|   } |   } | ||||||
| 
 | 
 | ||||||
|   if (!is_fattura()) |   if (!is_fattura() && (mode & 0x6))   // Esistono abbuoni o differenze cambio?
 | ||||||
|  |   {  | ||||||
|  |     if (valuta)                        // Desidero gli abbuoni in valuta
 | ||||||
|  |     { | ||||||
|  |       if (mode & 0x2) | ||||||
|       { |       { | ||||||
|         TImporto abbuoni(get_char(PART_SEZABB), get_real(PART_ABBUONI)); |         TImporto abbuoni(get_char(PART_SEZABB), get_real(PART_ABBUONI)); | ||||||
|     if (valuta) |  | ||||||
|     { |  | ||||||
|         i += abbuoni; |         i += abbuoni; | ||||||
|       }                                 |       }                                 | ||||||
|     else |       // In valuta ignoro completamente le differenze cambio
 | ||||||
|  |     } | ||||||
|  |     else                               // Desidero gli abbuoni in lire
 | ||||||
|     { |     { | ||||||
|       if (in_lire && (mode & 0x8)) |       if (in_lire && (mode & 0x8)) | ||||||
|         i.valore() += get_real(PART_RITENUTE); |         i.valore() += get_real(PART_RITENUTE); | ||||||
|        |        | ||||||
|       if ((mode & 0x2) && !abbuoni.is_zero()) |       if (mode & 0x2) | ||||||
|       { |       { | ||||||
|         if (!in_lire) |         TImporto abbuoni(get_char(PART_SEZABB), get_real(PART_ABBUONI)); | ||||||
|  |         if (!in_lire)  // Converto in lire gli abbuoni che sono memorizzati in valuta 
 | ||||||
|         { |         { | ||||||
|           const real cambio(get(PART_CAMBIO)); |           const real cambio(get(PART_CAMBIO)); | ||||||
|           abbuoni.valore() *= cambio;  |           abbuoni.valore() *= cambio;  | ||||||
| @ -786,7 +794,7 @@ TImporto TRiga_partite::importo(bool valuta, int mode) const | |||||||
|         i += abbuoni; |         i += abbuoni; | ||||||
|       } |       } | ||||||
|        |        | ||||||
|       if (!in_lire && (mode & 0x4)) |       if (!in_lire && (mode & 0x4))  // Se ci sono e desidero le differenze cambio
 | ||||||
|       { |       { | ||||||
|         const TImporto diffcam(get_char(PART_SEZDIFCAM), get_real(PART_DIFFCAM)); |         const TImporto diffcam(get_char(PART_SEZDIFCAM), get_real(PART_DIFFCAM)); | ||||||
|         i += diffcam; |         i += diffcam; | ||||||
| @ -1727,6 +1735,15 @@ TPartita& TPartite_array::partita(const TRectype& r) | |||||||
|   return *game; |   return *game; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | bool TPartite_array::insert(TPartita* p) | ||||||
|  | { | ||||||
|  |   const TString& k = key(p->conto(), p->anno(), p->numero()); | ||||||
|  |   TPartita* old = (TPartita*)objptr(k); | ||||||
|  |   if (old != NULL) remove(k); | ||||||
|  |   add(k, p); | ||||||
|  |   return old != NULL; | ||||||
|  | } | ||||||
|  | 
 | ||||||
| bool TPartite_array::destroy(const TBill& clifo, int anno, const char* num) | bool TPartite_array::destroy(const TBill& clifo, int anno, const char* num) | ||||||
| { | { | ||||||
|   const TString& k = key(clifo, anno, num); |   const TString& k = key(clifo, anno, num); | ||||||
|  | |||||||
| @ -336,6 +336,8 @@ public: | |||||||
|   TPartita* exist(const TRectype& part) const |   TPartita* exist(const TRectype& part) const | ||||||
|   { return ((TPartite_array*)this)->find(part, FALSE); } |   { return ((TPartite_array*)this)->find(part, FALSE); } | ||||||
|    |    | ||||||
|  |   bool insert(TPartita* p); | ||||||
|  |    | ||||||
|   bool destroy(const TBill& clifo, int anno, const char* num); |   bool destroy(const TBill& clifo, int anno, const char* num); | ||||||
|   bool destroy(TPartita& game); |   bool destroy(TPartita& game); | ||||||
|    |    | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user