diff --git a/ca/ca3300.cpp b/ca/ca3300.cpp index ca3911d29..3c739850c 100755 --- a/ca/ca3300.cpp +++ b/ca/ca3300.cpp @@ -20,7 +20,7 @@ class TPrint_bilancio_ca_mask : public TAutomask { protected: 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(); void create_sheet(); @@ -30,7 +30,7 @@ public: 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(); lib = "ca3300"; @@ -45,7 +45,7 @@ const TString& TPrint_bilancio_ca_mask::get_compatible_library() const 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); bool ok = name.not_empty(); if (ok) @@ -54,15 +54,16 @@ bool TPrint_bilancio_ca_mask::test_compatible_report() ok = rep.load(name); if (ok) { - TToken_string& libraries = rep.get_libraries(); - ok = libraries.get_pos(lib) >= 0; + const TString& classe = rep.get_class(); + ok = classe == cls; } } if (!ok) { - set(F_REPORT, lib); - lib.ext("rep"); - ok = lib.custom_path(); + set(F_REPORT, cls); + TFilename path = cls; + path.ext("rep"); + ok = path.custom_path(); } return ok; } @@ -79,7 +80,7 @@ bool TPrint_bilancio_ca_mask::on_field_event(TOperable_field& o, TField_event e, case F_REPORT: if (e == fe_button) { - const TString8 lib = get_compatible_library(); + const TString8 lib = get_report_class(); TFilename path = o.get(); if (select_custom_file(path, "rep", lib)) { diff --git a/ca/ca3300a.rep b/ca/ca3300a.rep index db9653e7a..77bfe89a7 100755 --- a/ca/ca3300a.rep +++ b/ca/ca3300a.rep @@ -1,5 +1,5 @@ - + Bilancio di raffronto di verifica
@@ -57,19 +57,28 @@ CODCONTO:2!="" CODCONTO:1 "CODCONTO:1" @ -"F2.101" ! +"F2.101" ! + +"F2" AZZERA_TOTALI +
CODCONTO:3!="" CODCONTO:2 "CODCONTO:2" @ -"F3.101" ! +"F3.101" ! + +"F3" AZZERA_TOTALI +
CODCONTO:4 != "" CODCONTO:3 "CODCONTO:3" @ -"F4.101" ! +"F4.101" ! + +"F4" AZZERA_TOTALI +
@@ -118,45 +127,131 @@ #103-#203 + MESSAGE ADD,F4.103|ADD,F3.103|ADD,F2.103 #104-#204 + MESSAGE ADD,F4.104|ADD,F3.104|ADD,F2.104 #105-#205 + MESSAGE ADD,F4.105|ADD,F3.105|ADD,F2.105 #106-#206 + MESSAGE ADD,F4.106|ADD,F3.106|ADD,F2.106 #107-#207 + MESSAGE ADD,F4.107|ADD,F3.107|ADD,F2.107 #108-#208 + MESSAGE ADD,F4.108|ADD,F3.108|ADD,F2.108
-
+
#101 != "" + #THIS @ #102 ! +CA_FORMAT_CONTO + + + + MESSAGE ISAMREAD,PCONANA,CODCONTO=#102,DESCR + + + 103 DARE_AVERE + + + + + + + + + + + 107 DARE_AVERE + + - CA_FORMAT_CONTO
-
+
#101 != "" + - - CA_FORMAT_CONTO + #THIS @ #102 ! +CA_FORMAT_CONTO + + MESSAGE ISAMREAD,PCONANA,CODCONTO=#102,DESCR + + + 103 DARE_AVERE + + + + + + 107 DARE_AVERE + +
#101 != "" - CA_FORMAT_CONTO + #THIS @ #102 ! +CA_FORMAT_CONTO + + MESSAGE ISAMREAD,PCONANA,CODCONTO=#102,DESCR + + + 103 DARE_AVERE + + + + + + 107 DARE_AVERE + +
USE PCONANA SELECT LEN(CODCONTO)=10 + : 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 +; + \ No newline at end of file diff --git a/ca/ca3300b.rep b/ca/ca3300b.rep index c2b622cb3..7e97e712c 100755 --- a/ca/ca3300b.rep +++ b/ca/ca3300b.rep @@ -1,5 +1,5 @@ - + Bilancio normale di verifica
@@ -180,7 +180,6 @@ CA_FORMAT_CONTO
USE PCONANA : AZZERA_TOTALI ( ID_SEC - ) -MON 109 103 DO DUP \ Duplica codice sezione "." + \ Aggiunge punto