Patch level : 2.2
Files correlati : Ricompilazione Demo : [ ] Commento : Nuovi report contabilita' analitica git-svn-id: svn://10.65.10.50/trunk@13239 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
		
							parent
							
								
									5a2f33e99a
								
							
						
					
					
						commit
						bcc4c0c517
					
				| @ -20,7 +20,7 @@ class TPrint_bilancio_ca_mask : public TAutomask | |||||||
| { | { | ||||||
| protected: | protected: | ||||||
|   virtual bool on_field_event(TOperable_field& o, TField_event e, long jolly); |   virtual bool on_field_event(TOperable_field& o, TField_event e, long jolly); | ||||||
|   const TString& get_compatible_library() const;  |   const TString& get_report_class() const;  | ||||||
|   bool test_compatible_report(); |   bool test_compatible_report(); | ||||||
| 	 | 	 | ||||||
|   void create_sheet(); |   void create_sheet(); | ||||||
| @ -30,7 +30,7 @@ public: | |||||||
|   virtual ~TPrint_bilancio_ca_mask() {} |   virtual ~TPrint_bilancio_ca_mask() {} | ||||||
| }; | }; | ||||||
| 
 | 
 | ||||||
| const TString& TPrint_bilancio_ca_mask::get_compatible_library() const | const TString& TPrint_bilancio_ca_mask::get_report_class() const | ||||||
| { | { | ||||||
|   TString& lib = get_tmp_string(); |   TString& lib = get_tmp_string(); | ||||||
|   lib = "ca3300"; |   lib = "ca3300"; | ||||||
| @ -45,7 +45,7 @@ const TString& TPrint_bilancio_ca_mask::get_compatible_library() const | |||||||
| 
 | 
 | ||||||
| bool TPrint_bilancio_ca_mask::test_compatible_report() | bool TPrint_bilancio_ca_mask::test_compatible_report() | ||||||
| { | { | ||||||
|   TFilename lib = get_compatible_library(); |   const TString& cls = get_report_class(); | ||||||
|   const TString& name = get(F_REPORT); |   const TString& name = get(F_REPORT); | ||||||
|   bool ok = name.not_empty(); |   bool ok = name.not_empty(); | ||||||
|   if (ok) |   if (ok) | ||||||
| @ -54,15 +54,16 @@ bool TPrint_bilancio_ca_mask::test_compatible_report() | |||||||
|     ok = rep.load(name); |     ok = rep.load(name); | ||||||
|     if (ok) |     if (ok) | ||||||
|     { |     { | ||||||
|       TToken_string& libraries = rep.get_libraries(); |       const TString& classe = rep.get_class(); | ||||||
|       ok = libraries.get_pos(lib) >= 0; |       ok = classe == cls; | ||||||
|     } |     } | ||||||
|   } |   } | ||||||
|   if (!ok) |   if (!ok) | ||||||
|   { |   { | ||||||
|     set(F_REPORT, lib); |     set(F_REPORT, cls); | ||||||
|     lib.ext("rep"); |     TFilename path = cls; | ||||||
|     ok = lib.custom_path(); |     path.ext("rep"); | ||||||
|  |     ok = path.custom_path(); | ||||||
|   } |   } | ||||||
|   return ok; |   return ok; | ||||||
| } | } | ||||||
| @ -79,7 +80,7 @@ bool TPrint_bilancio_ca_mask::on_field_event(TOperable_field& o, TField_event e, | |||||||
|   case F_REPORT: |   case F_REPORT: | ||||||
|     if (e == fe_button) |     if (e == fe_button) | ||||||
|     { |     { | ||||||
|       const TString8 lib = get_compatible_library(); |       const TString8 lib = get_report_class(); | ||||||
|       TFilename path = o.get(); |       TFilename path = o.get(); | ||||||
|       if (select_custom_file(path, "rep", lib)) |       if (select_custom_file(path, "rep", lib)) | ||||||
|       { |       { | ||||||
|  | |||||||
							
								
								
									
										115
									
								
								ca/ca3300a.rep
									
									
									
									
									
								
							
							
						
						
									
										115
									
								
								ca/ca3300a.rep
									
									
									
									
									
								
							| @ -1,5 +1,5 @@ | |||||||
| 
 | 
 | ||||||
| <report libraries="ca3300a" name="ca3300a" orientation="2" lpi="8"> | <report name="ca3300a" orientation="2" lpi="8" command="ca3 -2" class="ca3300a"> | ||||||
|  <description>Bilancio di raffronto di verifica</description> |  <description>Bilancio di raffronto di verifica</description> | ||||||
|  <font face="Courier New" size="8" /> |  <font face="Courier New" size="8" /> | ||||||
|  <section type="Head"> |  <section type="Head"> | ||||||
| @ -57,19 +57,28 @@ | |||||||
|   <condition>CODCONTO:2!=""</condition> |   <condition>CODCONTO:2!=""</condition> | ||||||
|   <groupby>CODCONTO:1</groupby> |   <groupby>CODCONTO:1</groupby> | ||||||
|   <prescript description="H2 PRESCRIPT">"CODCONTO:1" @ |   <prescript description="H2 PRESCRIPT">"CODCONTO:1" @ | ||||||
| "F2.101" !</prescript> | "F2.101" ! | ||||||
|  | 
 | ||||||
|  | "F2" AZZERA_TOTALI | ||||||
|  | </prescript> | ||||||
|  </section> |  </section> | ||||||
|  <section type="Head" level="3"> |  <section type="Head" level="3"> | ||||||
|   <condition>CODCONTO:3!=""</condition> |   <condition>CODCONTO:3!=""</condition> | ||||||
|   <groupby>CODCONTO:2</groupby> |   <groupby>CODCONTO:2</groupby> | ||||||
|   <prescript description="H3 PRESCRIPT">"CODCONTO:2" @ |   <prescript description="H3 PRESCRIPT">"CODCONTO:2" @ | ||||||
| "F3.101" !</prescript> | "F3.101" ! | ||||||
|  | 
 | ||||||
|  | "F3" AZZERA_TOTALI | ||||||
|  | </prescript> | ||||||
|  </section> |  </section> | ||||||
|  <section type="Head" level="4"> |  <section type="Head" level="4"> | ||||||
|   <condition>CODCONTO:4 != ""</condition> |   <condition>CODCONTO:4 != ""</condition> | ||||||
|   <groupby>CODCONTO:3</groupby> |   <groupby>CODCONTO:3</groupby> | ||||||
|   <prescript description="H4 PRESCRIPT">"CODCONTO:3" @ |   <prescript description="H4 PRESCRIPT">"CODCONTO:3" @ | ||||||
| "F4.101" !</prescript> | "F4.101" ! | ||||||
|  | 
 | ||||||
|  | "F4" AZZERA_TOTALI | ||||||
|  | </prescript> | ||||||
|  </section> |  </section> | ||||||
|  <section type="Body" /> |  <section type="Body" /> | ||||||
|  <section type="Body" level="1" height="4"> |  <section type="Body" level="1" height="4"> | ||||||
| @ -118,45 +127,131 @@ | |||||||
|   </field> |   </field> | ||||||
|   <field x="78" y="2" type="Valuta" align="right" width="13" id="303" pattern="1" hide_zero="1" text="###.###.###,@@"> |   <field x="78" y="2" type="Valuta" align="right" width="13" id="303" pattern="1" hide_zero="1" text="###.###.###,@@"> | ||||||
|    <source>#103-#203</source> |    <source>#103-#203</source> | ||||||
|  |    <postscript description="B1.303 POSTSCRIPT">MESSAGE ADD,F4.103|ADD,F3.103|ADD,F2.103</postscript> | ||||||
|   </field> |   </field> | ||||||
|   <field x="92" y="2" type="Valuta" align="right" width="13" id="304" pattern="1" hide_zero="1" text="###.###.###,@@"> |   <field x="92" y="2" type="Valuta" align="right" width="13" id="304" pattern="1" hide_zero="1" text="###.###.###,@@"> | ||||||
|    <source>#104-#204</source> |    <source>#104-#204</source> | ||||||
|  |    <postscript description="B1.304 POSTSCRIPT">MESSAGE ADD,F4.104|ADD,F3.104|ADD,F2.104</postscript> | ||||||
|   </field> |   </field> | ||||||
|   <field x="109" y="2" type="Valuta" align="right" width="13" id="305" pattern="1" hide_zero="1" text="###.###.###,@@"> |   <field x="109" y="2" type="Valuta" align="right" width="13" id="305" pattern="1" hide_zero="1" text="###.###.###,@@"> | ||||||
|    <source>#105-#205</source> |    <source>#105-#205</source> | ||||||
|  |    <postscript description="B1.305 POSTSCRIPT">MESSAGE ADD,F4.105|ADD,F3.105|ADD,F2.105</postscript> | ||||||
|   </field> |   </field> | ||||||
|   <field x="123" y="2" type="Valuta" align="right" width="13" id="306" pattern="1" hide_zero="1" text="###.###.###,@@"> |   <field x="123" y="2" type="Valuta" align="right" width="13" id="306" pattern="1" hide_zero="1" text="###.###.###,@@"> | ||||||
|    <source>#106-#206</source> |    <source>#106-#206</source> | ||||||
|  |    <postscript description="B1.306 POSTSCRIPT">MESSAGE ADD,F4.106|ADD,F3.106|ADD,F2.106</postscript> | ||||||
|   </field> |   </field> | ||||||
|   <field x="141" y="2" type="Valuta" align="right" width="13" id="307" pattern="1" hide_zero="1" text="###.###.###,@@"> |   <field x="141" y="2" type="Valuta" align="right" width="13" id="307" pattern="1" hide_zero="1" text="###.###.###,@@"> | ||||||
|    <source>#107-#207</source> |    <source>#107-#207</source> | ||||||
|  |    <postscript description="B1.307 POSTSCRIPT">MESSAGE ADD,F4.107|ADD,F3.107|ADD,F2.107</postscript> | ||||||
|   </field> |   </field> | ||||||
|   <field x="155" y="2" type="Valuta" align="right" width="13" id="308" pattern="1" hide_zero="1" text="###.###.###,@@"> |   <field x="155" y="2" type="Valuta" align="right" width="13" id="308" pattern="1" hide_zero="1" text="###.###.###,@@"> | ||||||
|    <source>#108-#208</source> |    <source>#108-#208</source> | ||||||
|  |    <postscript description="B1.308 POSTSCRIPT">MESSAGE ADD,F4.108|ADD,F3.108|ADD,F2.108</postscript> | ||||||
|   </field> |   </field> | ||||||
|  </section> |  </section> | ||||||
|  <section type="Foot" /> |  <section type="Foot" /> | ||||||
|  <section type="Foot" level="1" /> |  <section type="Foot" level="1" /> | ||||||
|  <section type="Foot" level="2" height="2"> |  <section type="Foot" level="2"> | ||||||
|   <condition>#101 != ""</condition> |   <condition>#101 != ""</condition> | ||||||
|   <field type="Stringa" width="23" id="101" pattern="1"> |   <field type="Stringa" width="23" id="101" pattern="1"> | ||||||
|  |    <prescript>#THIS @ #102 ! | ||||||
|  | CA_FORMAT_CONTO</prescript> | ||||||
|  |   </field> | ||||||
|  |   <field x="25" type="Stringa" width="50" id="102" pattern="1"> | ||||||
|  |    <font face="Courier New" bold="1" size="8" /> | ||||||
|  |    <prescript description="F2.102 PRESCRIPT">MESSAGE ISAMREAD,PCONANA,CODCONTO=#102,DESCR</prescript> | ||||||
|  |   </field> | ||||||
|  |   <field x="78" type="Valuta" align="right" width="13" id="103" pattern="1" hide_zero="1" text="###.###.###,@@"> | ||||||
|  |    <prescript>103 DARE_AVERE</prescript> | ||||||
|  |   </field> | ||||||
|  |   <field x="92" type="Valuta" align="right" width="13" id="104" pattern="1" hide_zero="1" text="###.###.###,@@" /> | ||||||
|  |   <field x="109" type="Valuta" align="right" width="13" id="105" pattern="1" hide_zero="1" text="###.###.###,@@"> | ||||||
|  |    <font face="Courier New" bold="1" size="8" /> | ||||||
|  |   </field> | ||||||
|  |   <field x="123" type="Valuta" align="right" width="13" id="106" pattern="1" hide_zero="1" text="###.###.###,@@"> | ||||||
|  |    <font face="Courier New" bold="1" size="8" /> | ||||||
|  |   </field> | ||||||
|  |   <field x="141" type="Valuta" align="right" width="13" id="107" pattern="1" hide_zero="1" text="###.###.###,@@"> | ||||||
|  |    <font face="Courier New" bold="1" size="8" /> | ||||||
|  |    <prescript description="F2.107 PRESCRIPT">107 DARE_AVERE</prescript> | ||||||
|  |   </field> | ||||||
|  |   <field x="155" type="Valuta" align="right" width="13" id="108" pattern="1" hide_zero="1" text="###.###.###,@@"> | ||||||
|    <font face="Courier New" bold="1" size="8" /> |    <font face="Courier New" bold="1" size="8" /> | ||||||
|    <prescript description="F2.101 PRESCRIPT">CA_FORMAT_CONTO</prescript> |  | ||||||
|   </field> |   </field> | ||||||
|  </section> |  </section> | ||||||
|  <section type="Foot" level="3" height="2"> |  <section type="Foot" level="3"> | ||||||
|   <condition>#101 != ""</condition> |   <condition>#101 != ""</condition> | ||||||
|  |   <font face="Courier New" bold="1" size="8" /> | ||||||
|   <field type="Stringa" width="23" id="101" pattern="1"> |   <field type="Stringa" width="23" id="101" pattern="1"> | ||||||
|    <font face="Courier New" bold="1" size="8" /> |    <prescript>#THIS @ #102 ! | ||||||
|    <prescript description="F3.101 PRESCRIPT">CA_FORMAT_CONTO</prescript> | CA_FORMAT_CONTO</prescript> | ||||||
|   </field> |   </field> | ||||||
|  |   <field x="25" type="Stringa" width="50" id="102" pattern="1"> | ||||||
|  |    <prescript>MESSAGE ISAMREAD,PCONANA,CODCONTO=#102,DESCR</prescript> | ||||||
|  |   </field> | ||||||
|  |   <field x="78" type="Valuta" align="right" width="13" id="103" pattern="1" hide_zero="1" text="###.###.###,@@"> | ||||||
|  |    <prescript>103 DARE_AVERE</prescript> | ||||||
|  |   </field> | ||||||
|  |   <field x="92" type="Valuta" align="right" width="13" id="104" pattern="1" hide_zero="1" text="###.###.###,@@" /> | ||||||
|  |   <field x="109" type="Valuta" align="right" width="13" id="105" pattern="1" hide_zero="1" text="###.###.###,@@" /> | ||||||
|  |   <field x="123" type="Valuta" align="right" width="13" id="106" pattern="1" hide_zero="1" text="###.###.###,@@" /> | ||||||
|  |   <field x="141" type="Valuta" align="right" width="13" id="107" pattern="1" hide_zero="1" text="###.###.###,@@"> | ||||||
|  |    <prescript>107 DARE_AVERE</prescript> | ||||||
|  |   </field> | ||||||
|  |   <field x="155" type="Valuta" align="right" width="13" id="108" pattern="1" hide_zero="1" text="###.###.###,@@" /> | ||||||
|  </section> |  </section> | ||||||
|  <section type="Foot" level="4"> |  <section type="Foot" level="4"> | ||||||
|   <condition>#101 != ""</condition> |   <condition>#101 != ""</condition> | ||||||
|   <font face="Courier New" bold="1" size="8" /> |   <font face="Courier New" bold="1" size="8" /> | ||||||
|   <field type="Stringa" width="23" id="101" pattern="1"> |   <field type="Stringa" width="23" id="101" pattern="1"> | ||||||
|    <prescript description="F4.101 PRESCRIPT">CA_FORMAT_CONTO</prescript> |    <prescript>#THIS @ #102 ! | ||||||
|  | CA_FORMAT_CONTO</prescript> | ||||||
|   </field> |   </field> | ||||||
|  |   <field x="25" type="Stringa" width="50" id="102" pattern="1"> | ||||||
|  |    <prescript>MESSAGE ISAMREAD,PCONANA,CODCONTO=#102,DESCR</prescript> | ||||||
|  |   </field> | ||||||
|  |   <field x="78" type="Valuta" align="right" width="13" id="103" pattern="1" hide_zero="1" text="###.###.###,@@"> | ||||||
|  |    <prescript>103 DARE_AVERE</prescript> | ||||||
|  |   </field> | ||||||
|  |   <field x="92" type="Valuta" align="right" width="13" id="104" pattern="1" hide_zero="1" text="###.###.###,@@" /> | ||||||
|  |   <field x="109" type="Valuta" align="right" width="13" id="105" pattern="1" hide_zero="1" text="###.###.###,@@" /> | ||||||
|  |   <field x="123" type="Valuta" align="right" width="13" id="106" pattern="1" hide_zero="1" text="###.###.###,@@" /> | ||||||
|  |   <field x="141" type="Valuta" align="right" width="13" id="107" pattern="1" hide_zero="1" text="###.###.###,@@"> | ||||||
|  |    <prescript>107 DARE_AVERE</prescript> | ||||||
|  |   </field> | ||||||
|  |   <field x="155" type="Valuta" align="right" width="13" id="108" pattern="1" hide_zero="1" text="###.###.###,@@" /> | ||||||
|  </section> |  </section> | ||||||
|  <sql>USE PCONANA SELECT LEN(CODCONTO)=10</sql> |  <sql>USE PCONANA SELECT LEN(CODCONTO)=10</sql> | ||||||
|  |  <prescript description="PRESCRIPT">: AZZERA_TOTALI ( ID_SEC - ) | ||||||
|  | 109 103 DO | ||||||
|  |   DUP      \ Duplica codice sezione | ||||||
|  |   "." +    \ Aggiunge punto | ||||||
|  |   I +      \ Aggiunge codice campo  | ||||||
|  |   0 SWAP ! \ Lo azzera | ||||||
|  | LOOP | ||||||
|  | DROP | ||||||
|  | ; | ||||||
|  | 
 | ||||||
|  | : DARE_AVERE ( ID_DARE -- ) | ||||||
|  | VARIABLE _DARE | ||||||
|  | VARIABLE _AVERE | ||||||
|  | DUP | ||||||
|  | _DARE ! | ||||||
|  | 1 + _AVERE ! | ||||||
|  | 
 | ||||||
|  | _DARE @ @    \ DARE | ||||||
|  | _AVERE @ @   \ AVERE | ||||||
|  | -            \ DARE-AVERE | ||||||
|  | DUP | ||||||
|  | 0 C; IF       \ Se negativo | ||||||
|  |   -1 *       \ Cambia segno | ||||||
|  |   _AVERE @ !   \ Setta AVERE | ||||||
|  |   0 _DARE @ !  \ Azzera DARE | ||||||
|  | ELSE | ||||||
|  |   _DARE @ !    \ Setta DARE | ||||||
|  |   0 _AVERE @ ! \ Azzera AVERE | ||||||
|  | THEN | ||||||
|  | ; | ||||||
|  | </prescript> | ||||||
| </report> | </report> | ||||||
| @ -1,5 +1,5 @@ | |||||||
| 
 | 
 | ||||||
| <report libraries="ca3300b" name="ca3300b" orientation="2" lpi="8"> | <report name="ca3300b" orientation="2" lpi="8" command="ca3 -2" class="ca3300b"> | ||||||
|  <description>Bilancio normale di verifica</description> |  <description>Bilancio normale di verifica</description> | ||||||
|  <font face="Courier New" size="8" /> |  <font face="Courier New" size="8" /> | ||||||
|  <section type="Head"> |  <section type="Head"> | ||||||
| @ -180,7 +180,6 @@ CA_FORMAT_CONTO</prescript> | |||||||
|  </section> |  </section> | ||||||
|  <sql>USE PCONANA</sql> |  <sql>USE PCONANA</sql> | ||||||
|  <prescript description="PRESCRIPT">: AZZERA_TOTALI ( ID_SEC - ) |  <prescript description="PRESCRIPT">: AZZERA_TOTALI ( ID_SEC - ) | ||||||
| MON |  | ||||||
| 109 103 DO | 109 103 DO | ||||||
|   DUP      \ Duplica codice sezione |   DUP      \ Duplica codice sezione | ||||||
|   "." +    \ Aggiunge punto |   "." +    \ Aggiunge punto | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user