MOdifiche per compilare!
git-svn-id: svn://10.65.10.50/trunk@768 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
		
							parent
							
								
									7c679272a6
								
							
						
					
					
						commit
						12bd1870ca
					
				| @ -4,6 +4,7 @@ | |||||||
| #include <utility.h> | #include <utility.h> | ||||||
| #include <urldefid.h> | #include <urldefid.h> | ||||||
| 
 | 
 | ||||||
|  | 
 | ||||||
| class TEdit_form : public TApplication | class TEdit_form : public TApplication | ||||||
| { | { | ||||||
|   const char* _name; |   const char* _name; | ||||||
| @ -46,10 +47,15 @@ bool TEdit_form::menu(MENU_TAG tag) | |||||||
|   int sec = 1; |   int sec = 1; | ||||||
|   switch(tag) |   switch(tag) | ||||||
|   { |   { | ||||||
|   case MENU_ITEM(1): sec = 0; break; |   case MENU_ITEM(1):  | ||||||
|                    case MENU_ITEM(3): sec = 2; break; |     sec = 0; break; | ||||||
|                      default          : sec = 1; break; |   case MENU_ITEM(2):  | ||||||
|                    } |     sec = 1; break; | ||||||
|  |   case MENU_ITEM(3):  | ||||||
|  |     sec = 2; break; | ||||||
|  |   default:  | ||||||
|  |     break; | ||||||
|  |   } | ||||||
|   _form->edit(_mode, sec); |   _form->edit(_mode, sec); | ||||||
|   return TRUE; |   return TRUE; | ||||||
| } | } | ||||||
| @ -92,8 +98,8 @@ int cg1300(int argc, char* argv[]) | |||||||
|   } |   } | ||||||
| 
 | 
 | ||||||
|   TEdit_form a(form, (mode == 'I') ? MODE_INS : MODE_MOD); |   TEdit_form a(form, (mode == 'I') ? MODE_INS : MODE_MOD); | ||||||
|   TString title(40); |   TString80 title; | ||||||
|   title << "Modifica modello: " << a.name(); |   title << "Modifica: " << a.name(); | ||||||
|   a.run(argc, argv, title); |   a.run(argc, argv, title); | ||||||
| 
 | 
 | ||||||
|   return 0; |   return 0; | ||||||
|  | |||||||
							
								
								
									
										114
									
								
								cg/cg3200.cpp
									
									
									
									
									
								
							
							
						
						
									
										114
									
								
								cg/cg3200.cpp
									
									
									
									
									
								
							| @ -376,12 +376,12 @@ bool TMastrini_application::almeno_un_record() | |||||||
|       long numreg = rmov.get_long(RMV_NUMREG); |       long numreg = rmov.get_long(RMV_NUMREG); | ||||||
| 
 | 
 | ||||||
|       _mov->setkey(1); |       _mov->setkey(1); | ||||||
|       _mov->curr().zero(); |       _mov->zero(); | ||||||
|       _mov->curr().put(MOV_NUMREG,numreg); |       _mov->put(MOV_NUMREG,numreg); | ||||||
|       _mov->read(); |       _mov->read(); | ||||||
|       if (_mov->bad()) |       if (_mov->bad()) | ||||||
|         _mov->zero(); |         _mov->zero(); | ||||||
|       datacomp = (_mov->curr().get(MOV_DATACOMP)); |       datacomp = (_mov->get(MOV_DATACOMP)); | ||||||
| 
 | 
 | ||||||
|       if (_annomsk == 0) |       if (_annomsk == 0) | ||||||
|         datareg = rmov.get_date(RMV_DATAREG); |         datareg = rmov.get_date(RMV_DATAREG); | ||||||
| @ -742,14 +742,14 @@ bool TMastrini_application::preprocess_page(int file, int counter) | |||||||
|       _importo = current_cursor()->curr(LF_RMOV).get_real(RMV_IMPORTO); |       _importo = current_cursor()->curr(LF_RMOV).get_real(RMV_IMPORTO); | ||||||
|       _importo_str = _importo.string("###############"); |       _importo_str = _importo.string("###############"); | ||||||
|       _mov->setkey(1); |       _mov->setkey(1); | ||||||
|       _mov->curr().zero(); |       _mov->zero(); | ||||||
|       _mov->curr().put(MOV_NUMREG,_numreg); |       _mov->put(MOV_NUMREG,_numreg); | ||||||
|       _mov->read(); |       _mov->read(); | ||||||
|       if (_mov->bad()) |       if (_mov->bad()) | ||||||
|         _mov->zero(); |         _mov->zero(); | ||||||
|       _annoes  = _mov->get_int(MOV_ANNOES); |       _annoes  = _mov->get_int(MOV_ANNOES); | ||||||
|       _regiva  = _mov->curr().get(MOV_REG);    |       _regiva  = _mov->get(MOV_REG);    | ||||||
|       _annoiva = _mov->curr().get_int(MOV_ANNOIVA); |       _annoiva = _mov->get_int(MOV_ANNOIVA); | ||||||
| 
 | 
 | ||||||
|       // Controlla se saldo e' diverso da 0
 |       // Controlla se saldo e' diverso da 0
 | ||||||
| 
 | 
 | ||||||
| @ -759,17 +759,17 @@ bool TMastrini_application::preprocess_page(int file, int counter) | |||||||
| 
 | 
 | ||||||
|         if (_annomsk == 0) |         if (_annomsk == 0) | ||||||
|         { |         { | ||||||
|           _datareg = (_mov->curr().get(MOV_DATAREG)); |           _datareg = (_mov->get(MOV_DATAREG)); | ||||||
|           _datareg_stampa = _datareg; |           _datareg_stampa = _datareg; | ||||||
|         } |         } | ||||||
|         else |         else | ||||||
|           if (_annomsk != 0) |           if (_annomsk != 0) | ||||||
|           { |           { | ||||||
|             _datareg = _mov->curr().get(MOV_DATACOMP); |             _datareg = _mov->get(MOV_DATACOMP); | ||||||
|             _datareg_stampa = _mov->curr().get(MOV_DATAREG); |             _datareg_stampa = _mov->get(MOV_DATAREG); | ||||||
|           } |           } | ||||||
| 
 | 
 | ||||||
|         provvis  =  _mov->curr().get(MOV_PROVVIS); |         provvis  =  _mov->get(MOV_PROVVIS); | ||||||
|    |    | ||||||
|         _dataregs = _datareg_stampa.string(); |         _dataregs = _datareg_stampa.string(); | ||||||
| 
 | 
 | ||||||
| @ -787,8 +787,8 @@ bool TMastrini_application::preprocess_page(int file, int counter) | |||||||
|               if (_numcarat == 2) |               if (_numcarat == 2) | ||||||
|                 set_row (1, "@197g*"); |                 set_row (1, "@197g*"); | ||||||
|                  |                  | ||||||
|           _codcaus = _mov->curr().get(MOV_CODCAUS); |           _codcaus = _mov->get(MOV_CODCAUS); | ||||||
|           _tipodoc = _mov->curr().get(MOV_TIPODOC); |           _tipodoc = _mov->get(MOV_TIPODOC); | ||||||
|           if (_stampatotiva && (_tmcf == 'C' || _tmcf == 'F')) |           if (_stampatotiva && (_tmcf == 'C' || _tmcf == 'F')) | ||||||
|           {   |           {   | ||||||
|             if (_tipodoc != "") |             if (_tipodoc != "") | ||||||
| @ -797,12 +797,12 @@ bool TMastrini_application::preprocess_page(int file, int counter) | |||||||
|               _b.add_riga(_descrdociva,_importo, _natdoc);      |               _b.add_riga(_descrdociva,_importo, _natdoc);      | ||||||
|             } |             } | ||||||
|           } |           } | ||||||
|           _datadoc = (_mov->curr().get(MOV_DATADOC)); |           _datadoc = (_mov->get(MOV_DATADOC)); | ||||||
|           _datadocs = _datadoc.string(); |           _datadocs = _datadoc.string(); | ||||||
|           _numdoc = _mov->curr().get(MOV_NUMDOC); |           _numdoc = _mov->get(MOV_NUMDOC); | ||||||
|           descrizione_causale(); |           descrizione_causale(); | ||||||
|           _descrizionemov = _mov->curr().get(MOV_DESCR); |           _descrizionemov = _mov->get(MOV_DESCR); | ||||||
|           _numgio = atol(_mov->curr().get(MOV_NUMGIO)); |           _numgio = atol(_mov->get(MOV_NUMGIO)); | ||||||
|           _descrizione = current_cursor()->curr(LF_RMOV).get(RMV_DESCR); |           _descrizione = current_cursor()->curr(LF_RMOV).get(RMV_DESCR); | ||||||
| 
 | 
 | ||||||
| 	  const bool st132 = _numcarat == 1; | 	  const bool st132 = _numcarat == 1; | ||||||
| @ -867,7 +867,7 @@ bool TMastrini_application::preprocess_page(int file, int counter) | |||||||
|           if (_numcarat == 2) |           if (_numcarat == 2) | ||||||
|           { |           { | ||||||
|              ricerca_regiva(); |              ricerca_regiva(); | ||||||
|             _protiva = atol(_mov->curr().get(MOV_PROTIVA)); |             _protiva = atol(_mov->get(MOV_PROTIVA)); | ||||||
|             if (_protiva != 0)    |             if (_protiva != 0)    | ||||||
|               set_row (1,"@191g%5d", _protiva); |               set_row (1,"@191g%5d", _protiva); | ||||||
|            |            | ||||||
| @ -1007,12 +1007,12 @@ void TMastrini_application::stampa_totaliiva() | |||||||
| void TMastrini_application::descrizione_causale() | void TMastrini_application::descrizione_causale() | ||||||
| { | { | ||||||
|   _caus->setkey(1); |   _caus->setkey(1); | ||||||
|   _caus->curr().zero(); |   _caus->zero(); | ||||||
|   _caus->curr().put(CAU_CODCAUS, _codcaus); |   _caus->put(CAU_CODCAUS, _codcaus); | ||||||
|   _caus->read(); |   _caus->read(); | ||||||
|   if (_caus->bad()) |   if (_caus->bad()) | ||||||
|     _caus->zero(); |     _caus->zero(); | ||||||
|   _descrcaus = _caus->curr().get(CAU_DESCR); |   _descrcaus = _caus->get(CAU_DESCR); | ||||||
| }        | }        | ||||||
| 
 | 
 | ||||||
| // Ricerca sulla tabella dei tipi documento, la descrizione e la natura del
 | // Ricerca sulla tabella dei tipi documento, la descrizione e la natura del
 | ||||||
| @ -1022,22 +1022,22 @@ void TMastrini_application::documenti_iva() | |||||||
| { | { | ||||||
|   TString dep; |   TString dep; | ||||||
|   |   | ||||||
|   _tabtpd->curr().zero(); |   _tabtpd->zero(); | ||||||
|   dep << format ("%2s",(const char*) _tipodoc); |   dep << format ("%2s",(const char*) _tipodoc); | ||||||
|   _tabtpd->curr().put("CODTAB", (const char*) dep); |   _tabtpd->put("CODTAB", (const char*) dep); | ||||||
|   _tabtpd->read(); |   _tabtpd->read(); | ||||||
|   _descrdociva = _tabtpd->curr().get("S0"); |   _descrdociva = _tabtpd->get("S0"); | ||||||
|   _natdoc = atoi(_tabtpd->curr().get("I0")); |   _natdoc = atoi(_tabtpd->get("I0")); | ||||||
| }      | }      | ||||||
| 
 | 
 | ||||||
| void TMastrini_application::ricerca_regiva() | void TMastrini_application::ricerca_regiva() | ||||||
| { | { | ||||||
|   TString16 dep; |   TString16 dep; | ||||||
| 
 | 
 | ||||||
|   _tabreg->curr().zero(); |   _tabreg->zero(); | ||||||
|   dep << format("%04d", _annoiva);  |   dep << format("%04d", _annoiva);  | ||||||
|   dep << format("%3s" , (const char*) _regiva); |   dep << format("%3s" , (const char*) _regiva); | ||||||
|   _tabreg->curr().put("CODTAB", (const char*) dep); |   _tabreg->put("CODTAB", (const char*) dep); | ||||||
|   _tabreg->read(); |   _tabreg->read(); | ||||||
|   _tipo = _tabreg->get_int("I0"); |   _tipo = _tabreg->get_int("I0"); | ||||||
| }     | }     | ||||||
| @ -1181,12 +1181,12 @@ void TMastrini_application::data_fine_esercizio(int anno) | |||||||
| { | { | ||||||
|   TString16 dep; |   TString16 dep; | ||||||
| 
 | 
 | ||||||
|   _tabesc->curr().zero(); |   _tabesc->zero(); | ||||||
|   dep << format ("%04d", anno); |   dep << format ("%04d", anno); | ||||||
|   _tabesc->curr().put("CODTAB", (const char*) dep); |   _tabesc->put("CODTAB", (const char*) dep); | ||||||
|   _tabesc->read(); |   _tabesc->read(); | ||||||
|   _data_finese = _tabesc->curr().get("D1"); |   _data_finese = _tabesc->get("D1"); | ||||||
|   _data_inizioese = _tabesc->curr().get("D0"); |   _data_inizioese = _tabesc->get("D0"); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void TMastrini_application::preprocess_header() | void TMastrini_application::preprocess_header() | ||||||
| @ -1230,29 +1230,29 @@ void TMastrini_application::ricerca_dati_ditta() | |||||||
|   long app; |   long app; | ||||||
| 
 | 
 | ||||||
|   _nditte->setkey(1); |   _nditte->setkey(1); | ||||||
|   _nditte->curr().zero(); |   _nditte->zero(); | ||||||
|   _nditte->curr().put(NDT_CODDITTA,_codice_ditta); |   _nditte->put(NDT_CODDITTA,_codice_ditta); | ||||||
|   _nditte->read(); |   _nditte->read(); | ||||||
|   app=_nditte->curr().get_long(NDT_CODDITTA); |   app=_nditte->get_long(NDT_CODDITTA); | ||||||
|   _ragsoc=_nditte->curr().get(NDT_RAGSOC); |   _ragsoc=_nditte->get(NDT_RAGSOC); | ||||||
|   |   | ||||||
|   _unloc->setkey(1); |   _unloc->setkey(1); | ||||||
|   _unloc->curr().zero(); |   _unloc->zero(); | ||||||
|   _unloc->curr().put(ULC_CODDITTA,app); |   _unloc->put(ULC_CODDITTA,app); | ||||||
|   _unloc->curr().put(ULC_CODULC,"1"); |   _unloc->put(ULC_CODULC,"1"); | ||||||
|   _unloc->read(); |   _unloc->read(); | ||||||
|   _indulc=_unloc->curr().get(ULC_INDULC); |   _indulc=_unloc->get(ULC_INDULC); | ||||||
|   _civulc=_unloc->curr().get(ULC_CIVULC); |   _civulc=_unloc->get(ULC_CIVULC); | ||||||
|   _capulc=_unloc->curr().get(ULC_CAPULC); |   _capulc=_unloc->get(ULC_CAPULC); | ||||||
|   _comulc=_unloc->curr().get(ULC_COMULC); |   _comulc=_unloc->get(ULC_COMULC); | ||||||
|   |   | ||||||
|   _comuni->setkey(1); |   _comuni->setkey(1); | ||||||
|   _comuni->curr().zero(); |   _comuni->zero(); | ||||||
|   _comuni->curr().put(COM_COM,_comulc); |   _comuni->put(COM_COM,_comulc); | ||||||
|   if (_comuni->read() != NOERR) |   if (_comuni->read() != NOERR) | ||||||
|     _comuni.zero(); |     _comuni->zero(); | ||||||
|   _com=_comuni->curr().get(COM_DENCOM); |   _com=_comuni->get(COM_DENCOM); | ||||||
|   _prov=_comuni->curr().get(COM_PROVCOM); |   _prov=_comuni->get(COM_PROVCOM); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| // Crea l'intestazione per la stampa a 132 e a 198 caratteri
 | // Crea l'intestazione per la stampa a 132 e a 198 caratteri
 | ||||||
| @ -1404,12 +1404,12 @@ void TMastrini_application::calcola_progressivi_al() | |||||||
|       long numreg = rmov.get_long(RMV_NUMREG); |       long numreg = rmov.get_long(RMV_NUMREG); | ||||||
| 
 | 
 | ||||||
|       _mov->setkey(1); |       _mov->setkey(1); | ||||||
|       _mov->curr().zero(); |       _mov->zero(); | ||||||
|       _mov->curr().put(MOV_NUMREG,numreg); |       _mov->put(MOV_NUMREG,numreg); | ||||||
|       _mov->read(); |       _mov->read(); | ||||||
|       if (_mov->bad()) |       if (_mov->bad()) | ||||||
|         _mov->zero(); |         _mov->zero(); | ||||||
|       datacomp = (_mov->curr().get(MOV_DATACOMP)); |       datacomp = (_mov->get(MOV_DATACOMP)); | ||||||
| 
 | 
 | ||||||
|       if (_annomsk == 0) |       if (_annomsk == 0) | ||||||
|       { |       { | ||||||
| @ -1634,20 +1634,20 @@ void TMastrini_application::ricerca_clifo() | |||||||
|   comcf   = clifo.get(CLI_COMCF); |   comcf   = clifo.get(CLI_COMCF); | ||||||
| 
 | 
 | ||||||
|   _comuni->setkey(1); |   _comuni->setkey(1); | ||||||
|   _comuni->curr().zero(); |   _comuni->zero(); | ||||||
|   _comuni->curr().put(COM_STATO, statocf); |   _comuni->put(COM_STATO, statocf); | ||||||
|   _comuni->curr().put(COM_COM, comcf); |   _comuni->put(COM_COM, comcf); | ||||||
|   if (_comuni->read() != NOERR) |   if (_comuni->read() != NOERR) | ||||||
|     _comuni.zero(); |     _comuni->zero(); | ||||||
|   dencom = _comuni->curr().get(COM_DENCOM); |   dencom = _comuni->get(COM_DENCOM); | ||||||
|   provcom = _comuni->curr().get(COM_PROVCOM); |   provcom = _comuni->get(COM_PROVCOM); | ||||||
| 
 | 
 | ||||||
|   pconti.setkey(1); |   pconti.setkey(1); | ||||||
|   pconti.zero(); |   pconti.zero(); | ||||||
|   pconti.put(PCN_GRUPPO,     _gruppo); |   pconti.put(PCN_GRUPPO,     _gruppo); | ||||||
|   pconti.put(PCN_CONTO,      _conto); |   pconti.put(PCN_CONTO,      _conto); | ||||||
|   if (pconti.read() == NOERR) |   if (pconti.read() == NOERR) | ||||||
|     _pconti.zero(); |     pconti.zero(); | ||||||
|   _sezivd  = pconti.get_char(PCN_SEZIVD); |   _sezivd  = pconti.get_char(PCN_SEZIVD); | ||||||
|   _lettivd = pconti.get_char(PCN_LETTIVD); |   _lettivd = pconti.get_char(PCN_LETTIVD); | ||||||
|   numrivd  = pconti.get_int(PCN_NUMRIVD);  |   numrivd  = pconti.get_int(PCN_NUMRIVD);  | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user