Correzzioni varie a causalki lista movimenti, mastrini e stampa causali
git-svn-id: svn://10.65.10.50/trunk@100 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
		
							parent
							
								
									11ce8c230c
								
							
						
					
					
						commit
						e00b2a76f8
					
				
							
								
								
									
										972
									
								
								cg/cg0500.cpp
									
									
									
									
									
								
							
							
						
						
									
										972
									
								
								cg/cg0500.cpp
									
									
									
									
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							| @ -60,8 +60,8 @@ BEGIN | ||||
|   OUTPUT F_TIPO_DOC CODTAB | ||||
|   HELP "Tipo documento" | ||||
|   CHECKTYPE NORMAL | ||||
|   MESSAGE HIDE, F_TIPO_MOV_2 | SHOW, 2@ | ||||
|   MESSAGE EMPTY HIDE, 2@ | SHOW, F_TIPO_MOV_2 | ||||
|   MESSAGE SHOW, 2@ | ||||
|   MESSAGE EMPTY HIDE, 2@ | ||||
|   FLAGS "U" | ||||
| END | ||||
| 
 | ||||
| @ -86,6 +86,7 @@ BEGIN | ||||
|   FLAGS "D" | ||||
| END | ||||
| 
 | ||||
| // Questo rimane sempre nascosto | ||||
| STRING F_TIPO_MOV 2 | ||||
| BEGIN | ||||
|   PROMPT 68 4 "" | ||||
| @ -93,6 +94,7 @@ BEGIN | ||||
|   FLAGS "H" | ||||
| END | ||||
| 
 | ||||
| // Viene mostrato questo se TPD non vuoto e diverso da IN AN PG | ||||
| LISTBOX F_TIPO_MOV_1 1 20 | ||||
| BEGIN | ||||
|   PROMPT 44 4 "Tipo mov. " | ||||
| @ -101,9 +103,10 @@ BEGIN | ||||
|   ITEM " |Nessuno"   MESSAGE COPY,F_TIPO_MOV | ||||
|   ITEM "1|Fattura"  MESSAGE COPY,F_TIPO_MOV | ||||
|   ITEM "2|Nota credito"  MESSAGE COPY,F_TIPO_MOV | ||||
|   GROUP 2 | ||||
| //  GROUP 2 | ||||
| END | ||||
| 
 | ||||
| // Viene mostrato questo se TPD vuoto o uguale a IN AN PG | ||||
| LISTBOX F_TIPO_MOV_2 1 20 | ||||
| BEGIN | ||||
|   PROMPT 44 4 "Tipo mov. " | ||||
| @ -238,7 +241,7 @@ BEGIN | ||||
|   FLAGS "D" | ||||
| END | ||||
| 
 | ||||
| LISTBOX F_OP_FINE_ANNO 1 13 | ||||
| LISTBOX F_OP_FINE_ANNO 1 10 | ||||
| BEGIN | ||||
|   PROMPT 2 12 "Operazioni di fine anno " | ||||
|   ITEM " | " | ||||
|  | ||||
| @ -18,8 +18,9 @@ BEGIN | ||||
| 	MESSAGE SHOW,205|HIDE,105|HIDE,305 | ||||
| 	ITEM "F|Fornitore" | ||||
| 	MESSAGE SHOW,305|HIDE,105|HIDE,205 | ||||
| 	FLAGS "U" | ||||
| //  FLAGS "DG" | ||||
| 	FLAGS "DG" | ||||
| 	GROUP 1 | ||||
| //  FLAGS "U" | ||||
| END | ||||
| 
 | ||||
| NUMBER 103 3 | ||||
| @ -34,10 +35,12 @@ BEGIN | ||||
|   CHECKTYPE NORMAL | ||||
|   OUTPUT 103 GRUPPO | ||||
|   OUTPUT 107 DESCR      | ||||
|   OUTPUT 102 TMCF      | ||||
|   WARNING "Conto inesistente o mancante" | ||||
| //  OUTPUT 102 TMCF      | ||||
|   WARNING "Gruppo inesistente o mancante" | ||||
| //  CHECKTYPE REQUIRED | ||||
|   CHECKTYPE NORMAL | ||||
|   GROUP 1 | ||||
|   ADD RUN CG1 -0 | ||||
|   ADD RUN CG0 -1 | ||||
| END | ||||
| 
 | ||||
| NUMBER 104 3 | ||||
| @ -57,7 +60,7 @@ BEGIN | ||||
|   OUTPUT 103 GRUPPO | ||||
|   OUTPUT 107 DESCR      | ||||
|   WARNING "Conto inesistente o mancante" | ||||
|   ADD RUN CG1 -0 | ||||
|   ADD RUN CG0 -1 | ||||
|   GROUP 1 | ||||
| END | ||||
| 
 | ||||
| @ -74,11 +77,11 @@ BEGIN | ||||
|   DISPLAY "Conto" CONTO | ||||
|   DISPLAY "Sottoconto" SOTTOCONTO | ||||
|   DISPLAY "Descrizione@50" DESCR | ||||
|   OUTPUT 105 SOTTOCONTO | ||||
|   OUTPUT 103 GRUPPO | ||||
|   OUTPUT 104 CONTO | ||||
|   OUTPUT 105 SOTTOCONTO | ||||
|   OUTPUT 107 DESCR | ||||
|   ADD RUN CG1 -0 | ||||
|   ADD RUN CG0 -1 | ||||
|   CHECKTYPE NORMAL | ||||
|   GROUP 1 | ||||
| END | ||||
| @ -97,9 +100,6 @@ BEGIN | ||||
|   DISPLAY "Sottoconto" CODCF | ||||
|   DISPLAY "Ragione sociale@50" RAGSOC | ||||
|   DISPLAY "Tipo C/F" TIPOCF | ||||
|   OUTPUT 102 TIPOCF | ||||
|   OUTPUT 103 GRUPPO | ||||
|   OUTPUT 104 CONTO   | ||||
|   OUTPUT 205 CODCF | ||||
|   OUTPUT 107 RAGSOC      | ||||
|   CHECKTYPE NORMAL | ||||
| @ -122,9 +122,6 @@ BEGIN | ||||
|   DISPLAY "Sottoconto" CODCF | ||||
|   DISPLAY "Ragione sociale@50" RAGSOC | ||||
|   DISPLAY "Tipo C/F" TIPOCF | ||||
|   OUTPUT 102 TIPOCF | ||||
|   OUTPUT 103 GRUPPO | ||||
|   OUTPUT 104 CONTO   | ||||
|   OUTPUT 305 CODCF | ||||
|   OUTPUT 107 RAGSOC      | ||||
|   CHECKTYPE NORMAL | ||||
|  | ||||
| @ -200,7 +200,7 @@ TLibro_giornale::TLibro_giornale(int y) | ||||
| ///////////////////////////////////////////////////////////
 | ||||
| 
 | ||||
| TCausale::TCausale(const char* cod, int year)  | ||||
|         : TArray(12), _rec(LF_CAUSALI), _iva(iva_errata) | ||||
| : TArray(12), _rec(LF_CAUSALI), _iva(iva_errata) | ||||
| { | ||||
|   if (*cod) read(cod, year); | ||||
| } | ||||
|  | ||||
| @ -28,13 +28,13 @@ class CG1700_application : public TPrintapp | ||||
|   TDate _data; | ||||
|   TString _cofi, _cap, _paiva, _ragsoc, _comunefis, _provfis, _viafis; | ||||
| 
 | ||||
|   protected: | ||||
| protected: | ||||
|   virtual void preprocess_header(); | ||||
|   virtual bool preprocess_print(int,int); | ||||
|   virtual bool preprocess_page(int,int); | ||||
|   virtual bool set_print(int); | ||||
| 
 | ||||
|   public: | ||||
| public: | ||||
|   void user_create() ; | ||||
|   void user_destroy(); | ||||
|   void get_dati_ditta(); | ||||
| @ -114,7 +114,7 @@ int CG1700_application::stampa_intestazione_ditta() | ||||
|   get_dati_ditta(); | ||||
|   codice_ditta << get_firm();  | ||||
| 
 | ||||
|   set_header (r, "Ditta %s %s Via %s %s %s %s", (const char*)codice_ditta, | ||||
|   set_header (r, "Ditta %s %s %s %s %s %s", (const char*)codice_ditta, | ||||
|               (const char*)_ragsoc, (const char*)_viafis, | ||||
|               (const char*)_cap, (const char*)_comunefis, | ||||
|               (const char*)_provfis); | ||||
| @ -244,8 +244,6 @@ bool CG1700_application::set_print(int) | ||||
|   if (tasto == K_ENTER) | ||||
|   {  | ||||
|     _data = _msk->get(F_DATASTAMPA); | ||||
|     add_file(LF_CAUSALI); | ||||
|     add_file(LF_RCAUSALI,LF_CAUSALI); | ||||
|     return TRUE; | ||||
|   } | ||||
|   return FALSE; | ||||
| @ -271,6 +269,8 @@ void CG1700_application::user_create() | ||||
| 
 | ||||
|   _descr_conto   = new TParagraph_string ("",23); | ||||
|   _descr_causale = new TParagraph_string ("",23); | ||||
|   add_file(LF_CAUSALI); | ||||
|   add_file(LF_RCAUSALI,LF_CAUSALI); | ||||
| } | ||||
| 
 | ||||
| void CG1700_application::user_destroy()  | ||||
|  | ||||
| @ -32,13 +32,12 @@ BEGIN | ||||
| 	PROMPT 2 3 "Anno esercizio    " | ||||
| 	//HELP "Se non indicato nessun anno esercizio significa che si richiede la stampa come specificato nei campi: dalla data, alla data" | ||||
| 	USE ESC | ||||
| 	CHECKTYPE REQUIRED | ||||
| 	CHECKTYPE NORMAL | ||||
| 	INPUT CODTAB F_ANNO | ||||
| 	DISPLAY "Anno" CODTAB | ||||
| 	DISPLAY "Data inizio esercizio" D0 | ||||
| 	DISPLAY "Data fine esercizio" D1 | ||||
| 	OUTPUT F_ANNO CODTAB | ||||
|         FLAGS "A" | ||||
| END | ||||
| 
 | ||||
| RADIOBUTTON F_MOVIMENTI 38 | ||||
| @ -55,7 +54,7 @@ END | ||||
| LIST F_CONTROLLO 23 | ||||
| BEGIN | ||||
| 	PROMPT 2 7 "Controllo movimenti errati " | ||||
| 	HELP "La scelta 1 stampa solo le registrazioni errate; la scelta 2 permette di listare tutte le registrazioni inserite, segnalando quelle errate; la scelta 2 stampa solo le registrazioni non errate" | ||||
| 	HELP "La scelta 1 stampa solo le registrazioni errate; la scelta 2 permette di listare tutte le registrazioni inserite, segnalando quelle errate; la scelta 3 stampa solo le registrazioni non errate" | ||||
| 	ITEM "1|Stampa movimenti errati" MESSAGE SHOW,1@ | ||||
| 	ITEM "2|Si"                      MESSAGE SHOW,1@ | ||||
| 	ITEM "3|No"                      MESSAGE HIDE,1@ | ||||
| @ -104,6 +103,12 @@ END | ||||
| NUMBER F_NUMEROINI 7 | ||||
| BEGIN | ||||
| 	PROMPT 19 12 "Stampa mov. dal numero " | ||||
|         USE LF_MOV KEY 1 | ||||
|         INPUT NUMREG F_NUMEROINI | ||||
|         DISPLAY "Numero registrazione" NUMREG | ||||
|         DISPLAY "Descrizione@50" DESCR | ||||
|         OUTPUT F_NUMEROINI NUMREG | ||||
|         CHECKTYPE NORMAL  | ||||
| 	FLAGS "R" | ||||
| 	GROUP 2 | ||||
| END | ||||
| @ -111,6 +116,11 @@ END | ||||
| NUMBER F_NUMEROFIN 7 | ||||
| BEGIN | ||||
| 	PROMPT 55 12 "al numero " | ||||
|         COPY USE F_NUMEROINI | ||||
|         INPUT NUMREG F_NUMEROFIN | ||||
|         COPY DISPLAY F_NUMEROINI | ||||
|         OUTPUT F_NUMEROFIN NUMREG | ||||
|         CHECKTYPE NORMAL | ||||
|         FLAGS "R" | ||||
| 	GROUP 2 | ||||
| END | ||||
| @ -189,7 +199,7 @@ BEGIN | ||||
| 	PROMPT -12 -1 "" | ||||
| END | ||||
| 
 | ||||
| BUTTON DLG_CANCEL 9 2 | ||||
| BUTTON DLG_QUIT 9 2 | ||||
| BEGIN | ||||
| 	PROMPT -22 -1 "" | ||||
| END | ||||
|  | ||||
| @ -1,11 +1,11 @@ | ||||
| #include "cg3100.h" | ||||
| 
 | ||||
| PAGE "" -1 -1 76 19 | ||||
| PAGE "" -1 -1 73 16 | ||||
| 
 | ||||
| 
 | ||||
| NUMBER F_CODDITTA 5 | ||||
| BEGIN | ||||
| 	PROMPT 3 2 "Ditta             " | ||||
| 	PROMPT 2 1 "Ditta             " | ||||
|         FLAGS "FRD" | ||||
|         USE LF_NDITTE KEY 1   | ||||
|         CHECKTYPE REQUIRED | ||||
| @ -18,43 +18,43 @@ END | ||||
| 
 | ||||
| STRING F_RAGSOC 50 | ||||
| BEGIN | ||||
|   PROMPT 3 3 "Ragione sociale   " | ||||
|   PROMPT 2 2 "Ragione sociale   " | ||||
|   FLAGS "D" | ||||
| END | ||||
| 
 | ||||
| DATE F_DATASTAMPA  | ||||
| BEGIN | ||||
|   PROMPT 48 1 "Data stampa " | ||||
|   FLAGS "A" | ||||
| END | ||||
| 
 | ||||
| NUMBER F_ANNO 4 | ||||
| BEGIN | ||||
|   PROMPT 3 5 "Anno esercizio    " | ||||
|   PROMPT 2 4 "Anno esercizio    " | ||||
|   //HELP "Se non indicato nessun anno esercizio significa che si richiede la stampa come specificato nei campi: dalla data, alla data" | ||||
|   USE ESC KEY 1 | ||||
|   CHECKTYPE REQUIRED | ||||
|   CHECKTYPE NORMAL | ||||
|   INPUT CODTAB F_ANNO | ||||
|   DISPLAY "Anno esercizio@50" CODTAB | ||||
|   DISPLAY "Anno" CODTAB | ||||
|   DISPLAY "Data inizio esercizio" D0 | ||||
|   DISPLAY "Data fine esercizio" D1 | ||||
|   OUTPUT F_ANNO CODTAB | ||||
| END | ||||
| 
 | ||||
| DATE F_DATASTAMPA  | ||||
| BEGIN | ||||
|   PROMPT 3 6 "Data stampa       " | ||||
|   FLAGS "A" | ||||
| END | ||||
| 
 | ||||
| DATE F_DATAINI | ||||
| BEGIN | ||||
|   PROMPT 3 8 "Stampa movimenti dalla data " | ||||
|   PROMPT 2 6 "Stampa movimenti dalla data " | ||||
|   HELP "Se non indicato nessun valore viene effettuata una stampa completa in ordine di data" | ||||
| END | ||||
| 
 | ||||
| DATE F_DATAFIN | ||||
| BEGIN | ||||
|   PROMPT 46 8 "alla data " | ||||
|   PROMPT 45 6 "alla data " | ||||
| END    | ||||
| 
 | ||||
| LIST F_TIPOELENCO 8 | ||||
| BEGIN | ||||
|   PROMPT 3 9 "Tipo elenco                 " | ||||
|   PROMPT 2 7 "Tipo elenco                 " | ||||
|   //HELP "Se si desidera l'elenco per clienti e fornitori, specificare prima il codice del cliente da cui iniziare la stampa e poi quello del fornitore"   | ||||
|   ITEM "C|Clienti" | ||||
|   MESSAGE HIDE,2@|SHOW,1@|RESET,1@ | ||||
| @ -66,7 +66,7 @@ END | ||||
| 
 | ||||
| NUMBER F_CODICEINI 6 | ||||
| BEGIN | ||||
|   PROMPT 3 10 "Stampa dal codice           " | ||||
|   PROMPT 2 8 "Stampa dal codice           " | ||||
|   HELP "Se si desidera l'elenco per clienti e fornitori, specificare prima il codice del cliente da cui iniziare la stampa e poi quello del fornitore" | ||||
|   GROUP 1 | ||||
|   USE LF_CLIFO | ||||
| @ -80,7 +80,7 @@ END | ||||
| 
 | ||||
| NUMBER F_CODICEFIN 6 | ||||
| BEGIN | ||||
|   PROMPT 46 10 "al codice " | ||||
|   PROMPT 45 8 "al codice " | ||||
|   GROUP 1 | ||||
|   COPY USE F_CODICEINI | ||||
|   INPUT TIPOCF F_TIPOELENCO SELECT | ||||
| @ -93,7 +93,7 @@ END | ||||
| 
 | ||||
| NUMBER F_CODICEINI1 6 | ||||
| BEGIN | ||||
|   PROMPT 3 10 "Stampa dal codice           " | ||||
|   PROMPT 2 8 "Stampa dal codice           " | ||||
|   GROUP 2 | ||||
|   COPY USE F_CODICEINI | ||||
|   INPUT TIPOCF F_CODICEINI1 | ||||
| @ -106,7 +106,7 @@ END | ||||
| 
 | ||||
| NUMBER F_CODICEFIN1 6 | ||||
| BEGIN | ||||
|   PROMPT 46 10 "al codice " | ||||
|   PROMPT 45 8 "al codice " | ||||
|   GROUP 2 | ||||
|   COPY USE F_CODICEINI | ||||
|   INPUT TIPOCF F_CODICEFIN1 | ||||
| @ -119,12 +119,12 @@ END | ||||
| 
 | ||||
| BOOLEAN F_CAMBIO | ||||
| BEGIN | ||||
|   PROMPT 3 12 "Cambio pagina per cliente/fornitore " | ||||
|   PROMPT 2 10 "Cambio pagina per cliente/fornitore " | ||||
| END | ||||
| 
 | ||||
| BOOLEAN F_STAMPAMOVP | ||||
| BEGIN | ||||
|   PROMPT 3 13 "Stampa movimenti provvisori " | ||||
|   PROMPT 2 11 "Stampa movimenti provvisori " | ||||
| END | ||||
| 
 | ||||
| /* | ||||
| @ -139,7 +139,7 @@ BEGIN | ||||
|   PROMPT -12 -1 "" | ||||
| END | ||||
| 
 | ||||
| BUTTON DLG_CANCEL 9 2 | ||||
| BUTTON DLG_QUIT 9 2 | ||||
| BEGIN | ||||
|   PROMPT -22 -1 "" | ||||
| END | ||||
|  | ||||
| @ -89,7 +89,7 @@ BEGIN | ||||
|   PROMPT -12 -1 "" | ||||
| END | ||||
| 
 | ||||
| BUTTON DLG_CANCEL 9 2 | ||||
| BUTTON DLG_QUIT 9 2 | ||||
| BEGIN | ||||
|   PROMPT -22 -1 "" | ||||
| END | ||||
|  | ||||
							
								
								
									
										164
									
								
								cg/cg3200.cpp
									
									
									
									
									
								
							
							
						
						
									
										164
									
								
								cg/cg3200.cpp
									
									
									
									
									
								
							| @ -45,21 +45,22 @@ class CG3200_application : public TPrintapp | ||||
|   TDate _data_ini,_data_fine,_data_finese,_data_finesesucc,_ultima_data_reg; | ||||
|   TDate _datareg,_datadoc,_data_inizioese; | ||||
|   int _cur1,_cur2,_cur3,_gruppo,_conto,_numcarat,_stampanum,_numivd; | ||||
|   int _numrig,_gruppocontr,_contocontr,_natdoc,_tipo,_tipostampa; | ||||
|   int _numrig,_natdoc,_tipo,_tipostampa; | ||||
|   real _progredare,_progreavere,_totprogre_dare_al,_totprogre_avere_al; | ||||
|   real _totprogre_dare,_totprogre_avere,_importo; | ||||
|   real _riporto_dare,_riporto_avere,_riporto_parziale_dare,_riporto_parziale_avere; | ||||
|   real _totale_periodo_dare,_totale_periodo_avere,_totale_prima_dare,_totale_prima_avere; | ||||
|   real _saldo_periodo,_saldo_progre,_saldo_progre_al,_saldo_progre_prec; | ||||
|   real _saldo_movimenti,_saldo_progressivi,_totale_saldo; | ||||
|   TString _codice_ditta,_ragsoc,_indulc,_civulc,_capulc,_com,_prov,_comulc; | ||||
|   TString _ragsoc,_indulc,_civulc,_capulc,_com,_prov,_comulc; | ||||
|   long _codice_ditta; | ||||
|   TString _sezivd,_lettivd,_tipodoc,_codcaus,_descrcaus,_descrdociva,_regiva; | ||||
|   TString _descrizione,_sezione,_numdoc,_descrizionemov,_numrivd; | ||||
|   TString _dataregs, _datadocs; | ||||
|   TString _dataregs, _datadocs,_gruppocontr,_contocontr,_sottocontocontr; | ||||
| 
 | ||||
|   bool _stampaprogre,_stampatotiva,_stampatot,_prima_volta,_stampa_mov_prov; | ||||
|    | ||||
|   long _annomsk,_annoesmsk,_sottoc,_numreg,_annoes,_sottocontocontr; | ||||
|   long _annomsk,_annoesmsk,_sottoc,_numreg,_annoes; | ||||
|   long _annomsksucc,_numgio,_protiva; | ||||
|   bool _stampa_progressivi_si,_competenza,_inizio_stampa,_puoi_stampare; | ||||
|   int _tipocf; | ||||
| @ -107,6 +108,7 @@ public: | ||||
|   const char* descrizione_gruppo_clifo(); | ||||
|   const char* descrizione_conto_clifo(); | ||||
|   bool almeno_un_record(); | ||||
|   void ricerca_dati_ditta(); | ||||
|    | ||||
|   CG3200_application(); | ||||
| }; | ||||
| @ -218,33 +220,30 @@ void CG3200_application::saldi_zero() | ||||
| void CG3200_application::fai_stampa132() | ||||
| { | ||||
|   set_row (1,"@0g#t",  &_dataregs); | ||||
|   set_row (1,"@11g#t", &_datadocs); | ||||
|   set_row (1,"@22g#7t", &_numdoc); | ||||
|   set_row (1,"@30g#3t", &_codcaus); | ||||
|   set_row (1,"@34g#.18t", &_descrcaus); | ||||
|   _descrizione = current_cursor()->curr(LF_RMOV).get(RMV_DESCR); | ||||
|   if (_descrizione == "") | ||||
|     set_row (1,"@53g%.23s", (const char*) _descrizionemov); | ||||
|   else | ||||
|     set_row (1,"@53g%.23s", (const char*) _descrizione); | ||||
|   _sezione = current_cursor()->curr(LF_RMOV).get(RMV_SEZIONE);      | ||||
|   if (_sezione == "D") | ||||
|     set_row (1,"@77g#t", &_importo_str); | ||||
|   else if (_sezione == "A") | ||||
|     set_row (1,"@93g#t", &_importo_str); | ||||
| 
 | ||||
|   if (_numrig != 0) | ||||
|   { | ||||
|     set_row (1,"@109g#3d", &_gruppocontr); | ||||
|     set_row (1,"@112g#3d", &_contocontr); | ||||
|     set_row (1,"@115g#6d", &_sottocontocontr); | ||||
|   }  | ||||
|   if (_stampanum == 1) | ||||
|     set_row (1,"@125g$[r]#7d", &_numreg); | ||||
|     set_row (1,"@11g#7d", &_numreg); | ||||
|   else if (_stampanum == 2) | ||||
|   { | ||||
|     set_row (1,"@125g#7d", &_numgio); | ||||
|     set_row (1,"@11g#7d", &_numgio); | ||||
|   } | ||||
|   set_row (1,"@19g#t", &_datadocs); | ||||
|   set_row (1,"@30g#7t", &_numdoc); | ||||
|   set_row (1,"@38g#3t", &_codcaus); | ||||
|   set_row (1,"@42g#.18t", &_descrcaus); | ||||
|   _descrizione = current_cursor()->curr(LF_RMOV).get(RMV_DESCR); | ||||
|   if (_descrizione == "") | ||||
|     set_row (1,"@61g%.23s", (const char*) _descrizionemov); | ||||
|   else | ||||
|     set_row (1,"@61g%.23s", (const char*) _descrizione); | ||||
|   _sezione = current_cursor()->curr(LF_RMOV).get(RMV_SEZIONE);      | ||||
|   if (_sezione == "D") | ||||
|     set_row (1,"@85g#t", &_importo_str); | ||||
|   else if (_sezione == "A") | ||||
|     set_row (1,"@101g#t", &_importo_str); | ||||
| 
 | ||||
|   set_row (1,"@117g#3t", &_gruppocontr); | ||||
|   set_row (1,"@120g#3t", &_contocontr); | ||||
|   set_row (1,"@123g#6t", &_sottocontocontr); | ||||
| } | ||||
| 
 | ||||
| void CG3200_application::fai_stampa198() | ||||
| @ -278,13 +277,12 @@ void CG3200_application::fai_stampa198() | ||||
|     set_row (1,"@119g#t", &_importo_str); | ||||
| 
 | ||||
|   // Stampa saldo movimenti
 | ||||
| 
 | ||||
|   set_row (1,"@153g#t", &_saldo_movimenti_str); | ||||
|   if (_numrig != 0) | ||||
|   { | ||||
|     set_row (1,"@169g#3d", &_gruppocontr); | ||||
|     set_row (1,"@172g#3d", &_contocontr); | ||||
|     set_row (1,"@175g#6d", &_sottocontocontr); | ||||
|   } | ||||
| 
 | ||||
|   set_row (1,"@169g#3t", &_gruppocontr); | ||||
|   set_row (1,"@172g#3t", &_contocontr); | ||||
|   set_row (1,"@175g#6t", &_sottocontocontr); | ||||
| 
 | ||||
|   if (_tipo < 3) | ||||
|     set_row (1,"@185g#t" , &_regiva);    | ||||
| @ -321,17 +319,17 @@ void CG3200_application::stampa_totali132() | ||||
|   _saldo_periodo = _totale_periodo_dare - _totale_periodo_avere; | ||||
|   _saldo_progre = _totprogre_dare - _totprogre_avere; | ||||
|   _saldo_progre_al = _totprogre_dare_al - _totprogre_avere_al; | ||||
|   set_row (3,"@32gTOTALI PERIODO@61g%15.0r", &_saldo_periodo); | ||||
|   set_row (3,"@77g%15.0r", &_totale_periodo_dare); | ||||
|   set_row (3,"@93g%15.0r", &_totale_periodo_avere); | ||||
|   set_row (4,"@32gTOTALI PROGRESSIVI@61g%15.0r", &_saldo_progre); | ||||
|   set_row (4,"@77g%15.0r", &_totprogre_dare); | ||||
|   set_row (4,"@93g%15.0r", &_totprogre_avere); | ||||
|   set_row (3,"@32gTOTALI PERIODO@69g%15.0r", &_saldo_periodo); | ||||
|   set_row (3,"@85g%15.0r", &_totale_periodo_dare); | ||||
|   set_row (3,"@101g%15.0r", &_totale_periodo_avere); | ||||
|   set_row (4,"@32gTOTALI PROGRESSIVI@69g%15.0r", &_saldo_progre); | ||||
|   set_row (4,"@85g%15.0r", &_totprogre_dare); | ||||
|   set_row (4,"@101g%15.0r", &_totprogre_avere); | ||||
|   if (_stampaprogre)                         //Progressivi attuali
 | ||||
|   { | ||||
|     set_row(5,"@32gTOTALI PROGRESSIVI AL@55g%s",(const char*)_ultima_data_reg.string()); | ||||
|     set_row (5,"@77g%15.0r", &_saldo_progre_al); | ||||
|     set_row (5,"@93g%15.0r", &_totprogre_dare_al); | ||||
|     set_row (5,"@32gTOTALI PROGRESSIVI AL@55g%s",(const char*)_ultima_data_reg.string()); | ||||
|     set_row (5,"@69g%15.0r", &_saldo_progre_al); | ||||
|     set_row (5,"@85g%15.0r", &_totprogre_dare_al); | ||||
|     set_row (5,"@101g%r", &_totprogre_avere_al); | ||||
|   } | ||||
| } | ||||
| @ -417,17 +415,17 @@ bool CG3200_application::preprocess_pconti(int file, int counter) | ||||
|     int rcontr = atoi(current_cursor()->curr(LF_RMOV).get(RMV_RCONTR)); | ||||
|     rmov = current_cursor()->file(LF_RMOV); | ||||
|     record = rmov->recno(); | ||||
|     rmov->setkey(1); | ||||
|     rmov->curr().zero(); | ||||
|     rmov->curr().put(RMV_NUMREG,_numreg); | ||||
|     rmov->curr().put(RMV_NUMRIG,rcontr); | ||||
|     rmov->read(); | ||||
|     _numrig = atoi(rmov->curr().get(RMV_NUMRIG)); | ||||
|     if (_numrig != 0) | ||||
|     { | ||||
|       _gruppocontr = atoi(rmov->curr().get(RMV_GRUPPO)); | ||||
|       _contocontr = atoi(rmov->curr().get(RMV_CONTO)); | ||||
|       _sottocontocontr = atol(rmov->curr().get(RMV_SOTTOCONTO)); | ||||
|     } | ||||
|     if (rmov->bad()) | ||||
|       rmov->curr().zero(); | ||||
|     _gruppocontr     = rmov->curr().get(RMV_GRUPPO); | ||||
|     _contocontr      = rmov->curr().get(RMV_CONTO); | ||||
|     _sottocontocontr = rmov->curr().get(RMV_SOTTOCONTO); | ||||
|     rmov->setkey(2); | ||||
|     rmov->readat(record); | ||||
| 
 | ||||
|     // Stampa solo quelli che hanno anno esercizio uguale a quello specificato
 | ||||
| @ -570,19 +568,20 @@ bool CG3200_application::preprocess_clifo(int file, int counter) | ||||
|     int rcontr = atoi(current_cursor()->curr(LF_RMOV).get(RMV_RCONTR)); | ||||
|     rmov = current_cursor()->file(LF_RMOV); | ||||
|     record = rmov->recno(); | ||||
|     rmov->setkey(1); | ||||
|     rmov->curr().zero(); | ||||
|     rmov->curr().put(RMV_NUMREG,_numreg); | ||||
|     rmov->curr().put(RMV_NUMRIG,rcontr); | ||||
|     rmov->read(); | ||||
|     _numrig = atoi(rmov->curr().get(RMV_NUMRIG)); | ||||
|     if (_numrig != 0) | ||||
|     { | ||||
|       _gruppocontr = atoi(rmov->curr().get(RMV_GRUPPO)); | ||||
|       _contocontr = atoi(rmov->curr().get(RMV_CONTO)); | ||||
|       _sottocontocontr = atol(rmov->curr().get(RMV_SOTTOCONTO)); | ||||
|     } | ||||
|     if (rmov->bad()) | ||||
|       rmov->curr().zero(); | ||||
|     _gruppocontr     = rmov->curr().get(RMV_GRUPPO); | ||||
|     _contocontr      = rmov->curr().get(RMV_CONTO); | ||||
|     _sottocontocontr = rmov->curr().get(RMV_SOTTOCONTO); | ||||
|     rmov->setkey(2); | ||||
|     rmov->readat(record); | ||||
| 
 | ||||
| 
 | ||||
|     // Stampa solo quelli che hanno anno esercizio uguale a quello specificato
 | ||||
|     // nella maschera. Se non viene specificato li stampa tutti
 | ||||
| 
 | ||||
| @ -787,6 +786,7 @@ print_action CG3200_application::postprocess_page(int file, int counter) | ||||
|       _prima_volta = TRUE; | ||||
|       return REPEAT_PAGE; | ||||
|     case LF_RMOV: | ||||
|       force_setpage(); | ||||
|       break; | ||||
|     default: | ||||
|       break; | ||||
| @ -963,6 +963,9 @@ bool CG3200_application::set_print(int) | ||||
|     int formato = atoi(_msk->get(F_FORMATO)); | ||||
|     int nummast = atoi(_msk->get(F_NUMMAST)); | ||||
|     _ricerca = _msk->get(F_RICERCA)[0]; | ||||
|     _codice_ditta = get_firm(); | ||||
| 
 | ||||
|     ricerca_dati_ditta(); | ||||
| 
 | ||||
|     // Scelta del formato e del numero di mastrini per pagina 1 o 2
 | ||||
|      | ||||
| @ -996,7 +999,7 @@ bool CG3200_application::set_print(int) | ||||
|       a.put(PCN_CONTO,contofine); | ||||
|       a.put(PCN_SOTTOCONTO,sottocontofine); | ||||
| 
 | ||||
|       current_cursor()->setregion(da, a); | ||||
|       current_cursor()->setregion(&da, &a); | ||||
|     } | ||||
|   else | ||||
|   { | ||||
| @ -1026,7 +1029,7 @@ bool CG3200_application::set_print(int) | ||||
|     a.put(CLI_CONTO,contofine); | ||||
|     a.put(CLI_CODCF,sottocontofine); | ||||
|      | ||||
|     current_cursor()->setregion(da, a); | ||||
|     current_cursor()->setregion(&da, &a); | ||||
|   } | ||||
| 
 | ||||
|     if (_stampatotiva)    | ||||
| @ -1106,19 +1109,17 @@ void CG3200_application::preprocess_header() | ||||
|    | ||||
| } | ||||
| 
 | ||||
| // Crea l'intestazione per la stampa a 132 e a 198 caratteri
 | ||||
| void CG3200_application::crea_intestazione() | ||||
| { | ||||
|   TString sep(132),sep1(198), app(8); | ||||
| 
 | ||||
|   reset_header(); | ||||
| void CG3200_application::ricerca_dati_ditta() | ||||
| { | ||||
|   long app; | ||||
| 
 | ||||
|   _nditte->setkey(1); | ||||
|   _codice_ditta << get_firm(); | ||||
|   //  _codice_ditta << get_firm();
 | ||||
|   _nditte->curr().zero(); | ||||
|   _nditte->curr().put(NDT_CODDITTA,_codice_ditta); | ||||
|   _nditte->read(); | ||||
|   app=_nditte->curr().get(NDT_CODDITTA); | ||||
|   app=_nditte->curr().get_long(NDT_CODDITTA); | ||||
|   _ragsoc=_nditte->curr().get(NDT_RAGSOC); | ||||
|    | ||||
|   _unloc->setkey(1); | ||||
| @ -1138,6 +1139,15 @@ void CG3200_application::crea_intestazione() | ||||
|   _com=_comuni->curr().get(COM_DENCOM); | ||||
|   _prov=_comuni->curr().get(COM_PROVCOM); | ||||
| 
 | ||||
| } | ||||
| 
 | ||||
| // Crea l'intestazione per la stampa a 132 e a 198 caratteri
 | ||||
| void CG3200_application::crea_intestazione() | ||||
| { | ||||
|   TString sep(132),sep1(198);  | ||||
| 
 | ||||
|   reset_header(); | ||||
| 
 | ||||
|   if (_numcarat == 1) | ||||
|   { | ||||
|     sep << "Pag. @#"; | ||||
| @ -1155,7 +1165,7 @@ void CG3200_application::crea_intestazione() | ||||
|     set_header(2,"@1g%s",(const char*) sep1); | ||||
|   } | ||||
|    | ||||
|   set_header (1, "@0gDITTA@6g%-5s", (const char*) _codice_ditta); | ||||
|   set_header (1, "@0gDITTA@6g%5d", _codice_ditta); | ||||
|   set_header (1, "@12g%-45s", (const char*) _ragsoc); | ||||
|   set_header (1, "@59g%-25s", (const char*) _indulc); | ||||
|   set_header (1, "@86g%-9s", (const char*) _civulc); | ||||
| @ -1189,8 +1199,8 @@ void CG3200_application::crea_intestazione() | ||||
|   { | ||||
|     sep.fill('-');                            //Stampa 132 - (sep(132))      
 | ||||
|     set_header (6, (const char *) sep); | ||||
|     set_header (7,"Data@11gDocumento@109gContro@122gAn@125gNumero"); | ||||
|     set_header (8,"Registr.@11gData@22gNumero@30gCod.Causale@53gDescrizione@82gDare@98gAvere@109gPartita@122gCo@125gregistr"); | ||||
|     set_header (7,"Data@11gNumero@19gDocumento@117gContro@130gAn"); | ||||
|     set_header (8,"Registr.@11gregistr@19gData@30gNumero@38gCod.Causale@61gDescrizione@90gDare@106gAvere@117gPartita@130gCo"); | ||||
|     sep.fill('-'); | ||||
|     set_header (9, (const char *) sep); | ||||
|   } | ||||
| @ -1217,9 +1227,9 @@ void CG3200_application::crea_intestazione() | ||||
|     if (_numcarat == 1) | ||||
|     { | ||||
|       TString string = _riporto_dare.string("###############"); | ||||
|       set_header (10,"@32gA RIPORTO@77g%15s",(const char*) string); | ||||
|       set_header (10,"@32gA RIPORTO@85g%15s",(const char*) string); | ||||
|       string = _riporto_avere.string("###############"); | ||||
|       set_header (10,"@93g%15s",(const char*) string); | ||||
|       set_header (10,"@101g%15s",(const char*) string); | ||||
|     } | ||||
|     if (_numcarat == 2) | ||||
|     { | ||||
| @ -1316,7 +1326,7 @@ void CG3200_application::calcola_progressivi() | ||||
|       pconti.put(PCN_CONTO , _conto); | ||||
|       pconti.read(); | ||||
|       if (pconti.good()) | ||||
|         indbil = pconti.get_int(PCN_INDBIL); | ||||
|         indbil = atoi (pconti.get(PCN_INDBIL)); | ||||
|       else | ||||
|         indbil = 0; | ||||
|     } | ||||
| @ -1412,11 +1422,11 @@ void CG3200_application::calcola_progressivi() | ||||
|   if (_numcarat == 1) | ||||
|   {  | ||||
|     TString string = _saldo_progre_prec.string("###############"); | ||||
|     set_header (10,"@32gPROGRESSIVI PRECEDENTI@61g%15s",(const char*) string); | ||||
|     set_header (10,"@32gPROGRESSIVI PRECEDENTI@69g%15s",(const char*) string); | ||||
|     string = _progredare.string("###############"); | ||||
|     set_header (10,"@77g%15s",(const char*) string); | ||||
|     set_header (10,"@85g%15s",(const char*) string); | ||||
|     string = _progreavere.string("###############"); | ||||
|     set_header (10,"@93g%15s",(const char*) string); | ||||
|     set_header (10,"@101g%15s",(const char*) string); | ||||
|   } | ||||
|    | ||||
|   if (_numcarat == 2) | ||||
| @ -1507,8 +1517,11 @@ void CG3200_application::ricerca_clifo() | ||||
|    | ||||
|   dataini = _data_ini.string();    | ||||
|   set_header (5, "@1gPeriodo@10g%s", (const char*) dataini); | ||||
|   if (_data_fine != eotime) | ||||
|   { | ||||
|     datafine = _data_fine.string(); | ||||
|     set_header (5, "@22g%s", (const char*) datafine); | ||||
|   } | ||||
|   set_header (5, "@34g%-11s",(const char*) paiv); | ||||
|   set_header (5, "@46g%-16s",(const char*) cofi); | ||||
|   set_header (5, "@63g%-25s",(const char*) indcf); | ||||
| @ -1565,8 +1578,11 @@ void CG3200_application::ricerca_gruppo() | ||||
|    | ||||
|   dataini = _data_ini.string(); | ||||
|   set_header (5, "@0gPeriodo@12g%s", (const char*) dataini); | ||||
|   if (_data_fine != eotime) | ||||
|   { | ||||
|     datafine = _data_fine.string(); | ||||
|     set_header (5, "@24g%s", (const char*) datafine); | ||||
|   } | ||||
| } | ||||
| 
 | ||||
| //Ricerca la descrizione relativa al gruppo da stampare
 | ||||
|  | ||||
| @ -28,7 +28,7 @@ BEGIN | ||||
|   HELP "Inserire un anno esercizio presente nella tabella oppure niente: in quest'ultimo caso non e' possibile fare il controllo competenza esercizio" | ||||
|   USE ESC | ||||
|   INPUT CODTAB F_ANNO | ||||
|   DISPLAY "Anno Esercizio" CODTAB | ||||
|   DISPLAY "Anno Esercizio@50" CODTAB | ||||
|   OUTPUT F_ANNO CODTAB | ||||
|   CHECKTYPE NORMAL | ||||
| END | ||||
| @ -500,22 +500,17 @@ END | ||||
| 
 | ||||
| BOOLEAN F_MEMORIZZA | ||||
| BEGIN | ||||
|   PROMPT 4 18 "Memorizza scelte" | ||||
|   PROMPT 4 17 "Memorizza scelte" | ||||
| END | ||||
| 
 | ||||
| BUTTON DLG_OK | ||||
| BUTTON DLG_OK 9 2 | ||||
| BEGIN | ||||
|   PROMPT 39 18 "" | ||||
| 	PROMPT -12 -1  "" | ||||
| END | ||||
| 
 | ||||
| BUTTON DLG_CANCEL | ||||
| BUTTON DLG_QUIT 9 2 | ||||
| BEGIN | ||||
|   PROMPT 51 18 "" | ||||
| END | ||||
| 
 | ||||
| BUTTON DLG_PGDN | ||||
| BEGIN | ||||
|   PROMPT 63 18 "" | ||||
| 	PROMPT -22 -1 "" | ||||
| END | ||||
| 
 | ||||
| ENDPAGE | ||||
| @ -543,14 +538,14 @@ BEGIN | ||||
|   ITEM "2|Due" | ||||
| END | ||||
| 
 | ||||
| BUTTON DLG_OK | ||||
| BUTTON DLG_OK 9 2 | ||||
| BEGIN | ||||
|   PROMPT 33 8 "" | ||||
| 	PROMPT -12 -1 "" | ||||
| END | ||||
| 
 | ||||
| BUTTON DLG_CANCEL | ||||
| BUTTON DLG_QUIT 9 2 | ||||
| BEGIN | ||||
|   PROMPT 45 8 "" | ||||
| 	PROMPT -22 -1 "" | ||||
| END | ||||
| 
 | ||||
| 
 | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user