Patch level :

Files correlati     :
Ricompilazione Demo : [ ]
Commento            :


git-svn-id: svn://10.65.10.50/trunk@13209 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
luca 2005-06-21 11:46:08 +00:00
parent fcd92287ba
commit c5b0b3d510
6 changed files with 397 additions and 466 deletions

View File

@ -2,6 +2,7 @@
#include <execp.h>
#include <reprint.h>
#include "movana.h"
#include "rmovana.h"
#include "ca3.h"
@ -83,9 +84,34 @@ bool TPrint_movimenti_ca_mask::on_field_event(TOperable_field& o, TField_event e
if (e == fe_close)
{
if (!test_compatible_report())
return error_box("Impossibile trovare un report compatibile");
return error_box(TR("Impossibile trovare un report compatibile"));
}
break;
case F_DATAINI:
case F_DATAFIN:
if (e == fe_close)
{
const TString& anno = get(F_ANNO);
if (anno.not_empty()) //se l'anno esercizio esiste...
{
const TRectype& esc = cache().get("ESC", anno);
const TDate datainiesc = esc.get("D0");
const TDate datafinesc = esc.get("D1");
if (o.empty())
{
const TDate dataesc = o.dlg() == F_DATAINI ? datainiesc : datafinesc;
o.set(dataesc.string());
}
else
{
const TDate d = o.get();
if (d < datainiesc || d > datafinesc)
return error_box(TR("La data deve essere compresa nell'esercizio selezionato"));
}
}
}
break;
default: break;
}
return true;
@ -209,6 +235,117 @@ TPrint_movimenti_ca_mask::TPrint_movimenti_ca_mask()
}
///////////////////////////////////////////////////////////
// RECORDSET
///////////////////////////////////////////////////////////
class TPrint_movimenti_ca_recordset : public TISAM_recordset
{
int _anno;
TDate _dadata, _adata;
char _tipomov;
long _danumreg, _anumreg;
TString4 _dacaus, _acaus;
TString _codcosto, _codcms, _codfas;
protected:
static bool mov_filter(const TRelation* rel);
bool valid_record(const TRelation& rel) const;
virtual void set_custom_filter(TCursor& cur) const;
public:
void set_filter(const TPrint_movimenti_ca_mask& msk, int cms_row);
TPrint_movimenti_ca_recordset(const TString& sql) : TISAM_recordset(sql) { }
};
static const TPrint_movimenti_ca_recordset* myself = NULL;
//metodo per riconoscere se il record corrente soddisfa i filtri della maschera...strafighissimo!
bool TPrint_movimenti_ca_recordset::valid_record(const TRelation& rel) const
{
//prima controlla la testata...
const TRectype& mov = rel.curr(LF_MOVANA);
const char* datefld = _anno > 0 ? MOVANA_DATACOMP : MOVANA_DATAREG;
const TDate data = mov.get(datefld);
if (data < _dadata || (_adata.ok() && data > _adata))
return false;
const TString& codcaus = mov.get(MOVANA_CODCAUS);
if (codcaus < _dacaus || (_acaus.not_empty() && codcaus > _acaus))
return false;
if (_tipomov > ' ')
{
const char tipomov = mov.get_char(MOVANA_TIPOMOV);
if (tipomov != _tipomov)
return false;
}
//..poi le righe (devono comparire solo le righe con cdc/cms/fsc che appaiono nello sheet)
const TRectype& rmov = rel.curr(LF_RMOVANA);
if (_codcosto.not_empty())
{
const TString& cos = rmov.get(RMOVANA_CODCCOSTO);
if (cos != _codcosto)
return false;
}
if (_codcms.not_empty())
{
const TString& cms = rmov.get(RMOVANA_CODCMS);
if (cms != _codcms)
return false;
}
if (_codfas.not_empty())
{
const TString& fas = rmov.get(RMOVANA_CODFASE);
if (fas != _codfas)
return false;
}
return true;
}
bool TPrint_movimenti_ca_recordset::mov_filter(const TRelation* rel)
{
return myself->valid_record(*rel);
}
void TPrint_movimenti_ca_recordset::set_custom_filter(TCursor& cur) const
{
myself = this;
cur.set_filterfunction(mov_filter, true);
}
//metodo per caricare i valori nel recordset dalla maschera...fighissimo!!
void TPrint_movimenti_ca_recordset::set_filter(const TPrint_movimenti_ca_mask& msk, int cms_row)
{
_codcosto = _codcms = _codfas = "";
if (cms_row >= 0)
{
TSheet_field& sf = msk.sfield(F_RIGHE);
TMask& sm = sf.sheet_mask();
sf.update_mask(cms_row);
TRelation rel(LF_RMOVANA);
sm.autosave(rel);
_codcosto = rel.curr().get(RMOVANA_CODCCOSTO);
_codcms = rel.curr().get(RMOVANA_CODCMS);
_codfas = rel.curr().get(RMOVANA_CODFASE);
}
_dadata = msk.get_date(F_DATAINI);
_adata = msk.get_date(F_DATAFIN);
_dacaus = msk.get(F_CAUSALEINI);
_acaus = msk.get(F_CAUSALEFIN);
_tipomov = msk.get(F_TIPOMOV)[0];
}
////////////////////////////////////////////////////////
// REPORT
////////////////////////////////////////////////////////
@ -217,10 +354,11 @@ class TPrint_movimenti_ca_rep : public TAnal_report
int _anno;
protected:
virtual bool set_recordset(const TString& sql);
virtual bool get_usr_val(const TString& name, TVariant& var) const;
public:
void set_anno(int a) {_anno = a;}
void set_filter(const TPrint_movimenti_ca_mask& msk, int cms_row);
};
bool TPrint_movimenti_ca_rep::get_usr_val(const TString& name, TVariant& var) const
@ -233,6 +371,20 @@ bool TPrint_movimenti_ca_rep::get_usr_val(const TString& name, TVariant& var) co
return TAnal_report::get_usr_val(name, var);
}
bool TPrint_movimenti_ca_rep::set_recordset(const TString& sql)
{
TPrint_movimenti_ca_recordset* rs = new TPrint_movimenti_ca_recordset(sql);
return TReport::set_recordset(rs);
}
void TPrint_movimenti_ca_rep::set_filter(const TPrint_movimenti_ca_mask& msk, int cms_row)
{
_anno = msk.get_int(F_ANNO);
TPrint_movimenti_ca_recordset* rs = (TPrint_movimenti_ca_recordset*)recordset();
rs->set_filter(msk, cms_row);
}
////////////////////////////////////////////////////////
// APPLICAZIONE
////////////////////////////////////////////////////////
@ -276,12 +428,10 @@ void TPrint_movimenti_ca::main_loop()
TPrint_movimenti_ca_rep rep;
rep.load(_mask->get(F_REPORT));
int anno = _mask->get_int(F_ANNO);
rep.set_anno(anno);
FOR_EACH_SHEET_ROW(sheet, r, row)
{
rep.mask2report(*_mask);
rep.set_filter(*_mask, r);
book.add(rep);
}

View File

@ -1,16 +1,22 @@
#include "ca3100a.h"
#include "ca3100.h"
TOOLBAR "" 0 -2 0 2
TOOLBAR "" 0 -3 0 3
BUTTON DLG_PRINT 18 2
STRING DLG_PROFILE 50
BEGIN
PROMPT -13 -11 "~Stampa"
PROMPT 9 0 "Profilo "
PSELECT
END
BUTTON DLG_PRINT 10 2
BEGIN
PROMPT -15 -11 "~Stampa"
MESSAGE EXIT,K_ENTER
END
BUTTON DLG_QUIT 18 2
BUTTON DLG_QUIT 10 2
BEGIN
PROMPT -33 -11 ""
PROMPT -55 -11 ""
END
ENDPAGE
@ -77,6 +83,8 @@ END
DATE F_DATAFIN
BEGIN
PROMPT 52 5 "alla data "
VALIDATE DATE_CMP_FUNC >= F_DATAINI
WARNING "La data finale deve essere maggiore di quella iniziale"
GROUP 3
END
@ -147,7 +155,7 @@ BEGIN
CHECKTYPE REQUIRED
END
SPREADSHEET F_RIGHE -1 -2
SPREADSHEET F_RIGHE -1 -1
BEGIN
PROMPT 1 12 "Selezione su CdC / Commesse / Fasi"
ITEM "Cdc1"

View File

@ -1,169 +1,204 @@
<report libraries="ca3100a" name="ca3100a" lpi="8">
<report libraries="ca3100b,ve1300" name="ca3100a" lpi="8">
<description>Movimenti CA per numero registrazione</description>
<font face="Courier New" size="8" />
<section type="Head">
<font italic="1" face="Courier New" size="8" />
<prescript description="H0 PRESCRIPT">#ESERCIZIO @
0 &#3E;
IF
121 122 SCAMBIA_CAMPI
THEN
;</prescript>
<field x="1" type="Stringa" width="50" pattern="1">
<font italic="1" face="Courier New" bold="1" size="10" />
<source>#SYSTEM.RAGSOC</source>
</field>
<field x="100" type="Data" width="10" pattern="1">
<field x="76" type="Data" width="10" pattern="1">
<source>#SYSTEM.DATE</source>
</field>
<field x="152" type="Numero" align="right" width="3" pattern="1">
<field x="157" type="Numero" align="right" width="3" pattern="1">
<source>#REPORT.PAGE</source>
</field>
<field border="2" x="1" y="2.5" type="Linea" width="154" height="0" pattern="1" />
<field x="2" y="2.5" type="Testo" width="6" pattern="1" text="N.Reg.">
<font italic="1" face="Courier New" bold="1" size="10" />
</field>
<field x="9" y="2.5" type="Testo" align="center" width="10" pattern="1" text="Data Reg." />
<field x="21" y="2.5" type="Testo" align="center" width="10" pattern="1" text="Data Comp." />
<field x="33" y="2.5" type="Testo" align="center" width="10" pattern="1" text="Data Doc." />
<field x="44" y="2.5" type="Testo" align="center" width="8" pattern="1" text="N.Reg.CG" />
<field x="56" y="2.5" type="Testo" align="center" width="6" pattern="1" text="N.Doc." />
<field x="64" y="2.5" type="Testo" align="center" width="7" pattern="1" text="Tp.Doc." />
<field x="73" y="2.5" type="Testo" align="center" width="11" pattern="1" text="Descrizione" />
<field x="99.5" y="2.5" type="Testo" align="center" width="8" pattern="1" text="Cod.Cau." />
<field x="110.5" y="2.5" type="Testo" align="center" width="7" pattern="1" text="Tp.Mov." />
<field x="125" y="2.5" type="Testo" align="center" width="15" pattern="1" text="Totale Dare" />
<field x="140" y="2.5" type="Testo" align="center" width="15" pattern="1" text="Totale Avere" />
<field border="2" x="1" y="4" type="Linea" width="154" height="0" pattern="1" />
<field border="2" x="1" y="2.5" type="Linea" width="161" height="0" pattern="1" />
<field x="1.5" y="3" type="Testo" align="center" width="7" pattern="1" text="N.Reg." />
<field x="33.5" y="3" type="Testo" align="center" width="10" pattern="1" text="Data Doc." />
<field x="45.5" y="3" type="Testo" align="center" width="8" pattern="1" text="N.Reg.CG" />
<field x="55" y="3" type="Testo" align="center" width="6" pattern="1" text="N.Doc." />
<field x="62" y="3" type="Testo" align="center" width="7" pattern="1" text="Tp.Doc." />
<field x="69" y="3" type="Testo" align="center" width="11" pattern="1" text="Descrizione" />
<field x="95" y="3" type="Testo" align="center" width="7" pattern="1" text="Causale" />
<field x="125" y="3" type="Testo" align="center" width="7" pattern="1" text="Tp.Mov." />
<field x="133" y="3" type="Testo" align="center" width="15" pattern="1" text="Totale Dare" />
<field x="147" y="3" type="Testo" align="center" width="15" pattern="1" text="Totale Avere" />
<field border="2" x="1" y="4" type="Linea" width="161" height="0" pattern="1" />
<field x="10" y="3" type="Testo" align="center" width="10" id="121" pattern="1" text="Data Reg." />
<field x="22" y="3" type="Testo" width="10" id="122" pattern="1" text="Data Comp." />
</section>
<section type="Head" level="1" height="3">
<prescript description="H1 PRESCRIPT">MESSAGE RESET,F1.101
MESSAGE RESET,F1.102</prescript>
<field border="1" radius="100" x="1" type="Testo" valign="center" align="center" shade_offset="25" width="154" height="2.5" text="MOVIMENTI DI CONTABILITA' ANALITICA">
<field border="1" radius="100" x="1" type="Testo" valign="center" align="center" shade_offset="25" width="161" height="2.5" text="MOVIMENTI DI CONTABILITA' ANALITICA">
<font face="Courier New" bold="1" size="16" />
</field>
</section>
<section type="Body" />
<section type="Body" level="1">
<section type="Head" level="2">
<groupby>NUMREG</groupby>
<field x="1" y="1" type="Numero" align="right" width="7" pattern="1">
<font face="Courier New" bold="1" size="10" />
<source>NUMREG</source>
<source>MOVANA.NUMREG</source>
</field>
<field x="9" y="1" type="Data" width="10" pattern="1">
<source>DATAREG</source>
<field x="34" y="1" type="Data" width="10" pattern="1">
<source>MOVANA.DATADOC</source>
</field>
<field x="21" y="1" type="Data" width="10" pattern="1">
<source>DATACOMP</source>
<field x="47" y="1" type="Numero" align="right" width="7" pattern="1" hide_zero="1">
<source>MOVANA.NUMREGCG</source>
</field>
<field x="33" y="1" type="Data" width="10" pattern="1">
<source>DATADOC</source>
</field>
<field x="45" y="1" type="Numero" align="right" width="7" pattern="1" hide_zero="1">
<source>NUMREGCG</source>
</field>
<field x="54" y="1" type="Stringa" width="7" pattern="1">
<source>NUMDOC</source>
<field x="56" y="1" type="Stringa" width="7" pattern="1">
<source>MOVANA.NUMDOC</source>
</field>
<field x="64" y="1" type="Stringa" width="4" pattern="1">
<source>TIPODOC</source>
<source>MOVANA.TIPODOC</source>
</field>
<field x="73" y="1" type="Stringa" dynamic_height="1" width="25" height="2" pattern="1">
<source>DESCR</source>
<field x="69" y="1" type="Stringa" dynamic_height="1" width="25" height="2" pattern="1">
<source>MOVANA.DESCR</source>
</field>
<field x="101" y="1" type="Stringa" width="3" pattern="1">
<source>CODCAUS</source>
<field x="95" y="1" type="Stringa" width="3" pattern="1">
<source>MOVANA.CODCAUS</source>
</field>
<field x="112" y="1" type="Stringa" width="1" pattern="1">
<source>TIPOMOV</source>
<field x="99" y="1" type="Stringa" dynamic_height="1" width="25" height="2" pattern="1">
<prescript description="H2.0 PRESCRIPT">MESSAGE ISAMREAD,CAUS,CODCAUS=MOVANA.CODCAUS,DESCR</prescript>
</field>
<field x="125" y="1" type="Valuta" align="right" width="15" pattern="1" hide_zero="1" text="###.###.###,@@">
<source>TOTDOC</source>
<prescript description="B1.0 PRESCRIPT">"MOVANA.SEZIONE" @
<field x="127" y="1" type="Stringa" width="1" pattern="1">
<source>MOVANA.TIPOMOV</source>
</field>
<field x="131" y="1" type="Valuta" align="right" width="15" pattern="1" hide_zero="1" text="###.###.###,@@">
<source>MOVANA.TOTDOC</source>
<prescript description="H2.0 PRESCRIPT">"MOVANA.SEZIONE" @
"A" =
IF
0 #THIS !
THEN
</prescript>
</field>
<field x="140" y="1" type="Valuta" align="right" width="15" pattern="1" hide_zero="1" text="###.###.###,@@">
<source>TOTDOC</source>
<prescript description="B1.0 PRESCRIPT">"MOVANA.SEZIONE" @
<field x="146" y="1" type="Valuta" align="right" width="15" pattern="1" hide_zero="1" text="###.###.###,@@">
<source>MOVANA.TOTDOC</source>
<prescript description="H2.0 PRESCRIPT">"MOVANA.SEZIONE" @
"D" =
IF
0 #THIS !
THEN
</prescript>
</field>
<field x="8" y="3" type="Testo" align="center" width="4" pattern="1" text="Riga" />
<field x="13" y="3" type="Testo" width="23" pattern="1" text="Centro di Costo" />
<field x="37" y="3" type="Testo" width="23" pattern="1" text="Commessa" />
<field x="61" y="3" type="Testo" width="13" pattern="1" text="Fase" />
<field x="75" y="3" type="Testo" width="23" pattern="1" text="Conto" />
<field x="99" y="3" type="Testo" width="25" pattern="1" text="Descrizione" />
<field x="131.18" y="3" type="Testo" align="center" width="15" pattern="1" text="Dare" />
<field x="146.18" y="3" type="Testo" align="center" width="15" pattern="1" text="Avere" />
<field border="1" x="8.18" y="4" type="Linea" width="154" height="0" pattern="1" />
<field x="-9.88" y="1" type="Data" width="10" id="121" pattern="1">
<source>DATAREG</source>
</field>
<field x="10" y="1" type="Data" width="10" id="121" pattern="1">
<source>MOVANA.DATAREG</source>
</field>
<field x="22" y="1" type="Data" align="right" width="10" id="122" pattern="1">
<source>MOVANA.DATACOMP</source>
</field>
</section>
<section type="Head" level="11">
<font italic="1" face="Courier New" size="8" />
<field x="8.21" type="Testo" align="center" width="4" pattern="1" text="Riga" />
<field x="13.21" type="Testo" width="23" pattern="1" text="Centro di Costo" />
<field x="37.21" type="Testo" width="23" pattern="1" text="Commessa" />
<field x="61.21" type="Testo" width="13" pattern="1" text="Fase" />
<field x="75.21" type="Testo" width="23" pattern="1" text="Conto" />
<field x="99.21" type="Testo" width="25" pattern="1" text="Descrizione" />
<field x="128" type="Testo" align="center" width="15" pattern="1" text="Dare" />
<field x="143" type="Testo" align="center" width="15" pattern="1" text="Avere" />
<field border="1" x="8" y="1" type="Linea" width="147" height="0" pattern="1" />
</section>
<section type="Body" level="11">
<sql>USE RMOVANA
FROM NUMREG=#PARENT.NUMREG
TO NUMREG=#PARENT.NUMREG
</sql>
<section type="Body" />
<section type="Body" level="1">
<prescript description="B1 PRESCRIPT">#ESERCIZIO @
0 &#3E;
IF
121 122 SCAMBIA_CAMPI
THEN
;</prescript>
<field x="9" type="Numero" align="right" width="3" pattern="1">
<source>NUMRIG</source>
</field>
<field x="13" type="Stringa" width="23" pattern="1">
<source>CODCCOSTO</source>
<prescript description="B11.0 PRESCRIPT">CA_FORMAT_COSTO</prescript>
<prescript description="B1.0 PRESCRIPT">CA_FORMAT_COSTO</prescript>
</field>
<field x="37" type="Stringa" width="23" pattern="1">
<source>CODCMS</source>
<prescript description="B11.0 PRESCRIPT">CA_FORMAT_COMMESSA</prescript>
<prescript description="B1.0 PRESCRIPT">CA_FORMAT_COMMESSA</prescript>
</field>
<field x="61" type="Stringa" width="13" pattern="1">
<source>CODFASE</source>
<prescript description="B11.0 PRESCRIPT">CA_FORMAT_FASE</prescript>
<prescript description="B1.0 PRESCRIPT">CA_FORMAT_FASE</prescript>
</field>
<field x="75" type="Stringa" width="23" pattern="1">
<source>CODCONTO</source>
<prescript description="B11.0 PRESCRIPT">CA_FORMAT_CONTO</prescript>
<prescript description="B1.0 PRESCRIPT">CA_FORMAT_CONTO</prescript>
</field>
<field x="99" type="Stringa" dynamic_height="1" width="25" height="2" pattern="1">
<source>DESCR</source>
</field>
<field x="125" type="Valuta" align="right" width="15" id="101" pattern="1" hide_zero="1" text="###.###.###,@@">
<field x="131" type="Valuta" align="right" width="15" id="101" pattern="1" hide_zero="1" text="###.###.###,@@">
<source>IMPORTO</source>
<prescript description="B11.101 PRESCRIPT">"RMOVANA.SEZIONE" @
<prescript description="B1.101 PRESCRIPT">"RMOVANA.SEZIONE" @
"A" =
IF
0 #THIS !
THEN
</prescript>
<postscript description="B11.101 POSTSCRIPT">MESSAGE ADD,F1.101</postscript>
<postscript description="B1.101 POSTSCRIPT">MESSAGE ADD,F1.101</postscript>
</field>
<field x="140" type="Valuta" align="right" width="15" id="102" pattern="1" hide_zero="1" text="###.###.###,@@">
<field x="146" type="Valuta" align="right" width="15" id="102" pattern="1" hide_zero="1" text="###.###.###,@@">
<source>IMPORTO</source>
<prescript description="B11.102 PRESCRIPT">"RMOVANA.SEZIONE" @
<prescript description="B1.102 PRESCRIPT">"RMOVANA.SEZIONE" @
"D" =
IF
0 #THIS !
THEN
</prescript>
<postscript description="B11.102 POSTSCRIPT">MESSAGE ADD,F1.102</postscript>
<postscript description="B1.102 POSTSCRIPT">MESSAGE ADD,F1.102</postscript>
</field>
</section>
<section type="Foot" level="11" />
<section type="Foot" height="1" />
<section type="Foot" level="1">
<field border="2" x="1" y="1" type="Linea" width="154" height="0" pattern="1" />
<field x="96" y="1.5" type="Testo" width="30" pattern="1" text="Totale generale per sezione:">
<field border="2" x="1" y="1" type="Linea" width="161" height="0" pattern="1" />
<field x="101" y="1.5" type="Testo" width="30" pattern="1" text="Totale generale per sezione:">
<font face="Courier New" bold="1" size="8" />
</field>
<field x="125" y="1.5" type="Valuta" align="right" width="15" id="101" pattern="1" text="###.###.###,@@">
<field x="131" y="1.5" type="Valuta" align="right" width="15" id="101" pattern="1" text="###.###.###,@@">
<font face="Courier New" bold="1" size="8" />
</field>
<field x="140" y="1.5" type="Valuta" align="right" width="15" id="102" pattern="1" text="###.###.###,@@">
<field x="146" y="1.5" type="Valuta" align="right" width="15" id="102" pattern="1" text="###.###.###,@@">
<font face="Courier New" bold="1" size="8" />
</field>
</section>
<sql>USE MOVANA
</sql>
<section type="Foot" level="2" />
<sql>USE RMOVANA
JOIN MOVANA INTO NUMREG==NUMREG</sql>
<prescript description="PRESCRIPT">: SCAMBIA_CAMPI ( F1 F2 -- )
VARIABLE _X1 \ coordinate del campo F1
VARIABLE _Y1
VARIABLE _X2 \ coordinate del campo F2
VARIABLE _Y2
2DUP \ duplica i campi F1 F2 sullo stack
GET_POS \ prende le coordinate del campo F2
_Y2 ! \ e le mette in _Y2 e _X2
_X2 !
GET_POS \ prende le coordinate del campo F1
_Y1 ! \ e le mette in _Y1 e _X1
_X1 !
_X1 @ \ legge le coordinate di F1
_Y1 @
ROT
SET_POS \ mette le coord in F2
_X2 @
_Y2 @
ROT
SET_POS
;
</prescript>
</report>

View File

@ -1,275 +0,0 @@
#include "ca3100a.h"
TOOLBAR "" 0 -2 0 2
BUTTON DLG_PRINT 18 2
BEGIN
PROMPT -13 -11 "~Stampa"
MESSAGE EXIT,K_ENTER
END
BUTTON DLG_QUIT 18 2
BEGIN
PROMPT -33 -11 ""
END
ENDPAGE
PAGE "Parametri stampa" -1 -1 78 20
NUMBER F_CODDITTA 5
BEGIN
PROMPT 1 1 "Ditta "
FLAGS "FRD"
USE LF_NDITTE KEY 1
CHECKTYPE REQUIRED
INPUT CODDITTA F_CODDITTA
DISPLAY "Codice" CODDITTA
DISPLAY "Ragione sociale @50" RAGSOC
OUTPUT F_CODDITTA CODDITTA
OUTPUT F_RAGSOC RAGSOC
END
STRING F_RAGSOC 50
BEGIN
PROMPT 15 1 ""
FLAGS "D"
END
DATE F_DATASTAMPA
BEGIN
PROMPT 1 2 "Data di stampa "
FLAGS "A"
END
NUMBER F_ANNO 4
BEGIN
PROMPT 49 2 "Esercizio "
USE ESC
INPUT CODTAB F_ANNO
DISPLAY "Codice Esercizio" CODTAB
DISPLAY "Data inizio esercizio" D0
DISPLAY "Data fine esercizio " D1
OUTPUT F_ANNO CODTAB
CHECKTYPE NORMAL
CHECKTYPE NORMAL
FLAGS "RZ"
ADD NONE
END
BOOLEAN F_COMPETENZA
BEGIN
PROMPT 1 3 "Stampa i soli movimenti con competenza nell'esercizio precedente"
END
RADIOBUTTON F_TIPOSTAMPA 12
BEGIN
PROMPT 1 4 "Stampa "
ITEM "2|data" MESSAGE CLEAR,2@|ENABLE,3@
ITEM "1|numero" MESSAGE CLEAR,3@|ENABLE,2@
END
DATE F_DATAINI
BEGIN
PROMPT 16 5 "Stampa mov. dalla data "
GROUP 3
END
DATE F_DATAFIN
BEGIN
PROMPT 52 5 "alla data "
GROUP 3
END
NUMBER F_NUMEROINI 7
BEGIN
PROMPT 16 6 "Stampa mov. dal numero "
USE LF_MOV KEY 1
INPUT NUMREG F_NUMEROINI
DISPLAY "Numero@7" NUMREG
DISPLAY "Data@10" DATAREG
DISPLAY "Causale" CODCAUS
DISPLAY "Documento" NUMDOC
DISPLAY "Descrizione@50" DESCR
OUTPUT F_NUMEROINI NUMREG
GROUP 2
END
NUMBER F_NUMEROFIN 7
BEGIN
PROMPT 52 6 "al numero "
COPY USE F_NUMEROINI
INPUT NUMREG F_NUMEROFIN
COPY DISPLAY F_NUMEROINI
FLAGS "R"
NUM_EXPR {(#F_NUMEROFIN==0)||(#F_NUMEROFIN>=#F_NUMEROINI)}
WARNING "Limite superiore errato"
GROUP 2
END
STRING F_CAUSALEINI 3
BEGIN
PROMPT 1 8 "Stampa dalla causale "
USE LF_CAUSALI KEY 1
INPUT CODCAUS F_CAUSALEINI
DISPLAY "Codice causale" CODCAUS
DISPLAY "Descrizione@50" DESCR
OUTPUT F_CAUSALEINI CODCAUS
FLAGS "U"
VALIDATE ZEROFILL_FUNC 3
END
STRING F_CAUSALEFIN 3
BEGIN
PROMPT 40 8 "alla causale "
COPY USE F_CAUSALEINI
INPUT CODCAUS F_CAUSALEFIN
DISPLAY "Codice causale" CODCAUS
DISPLAY "Descrizione@50" DESCR
OUTPUT F_CAUSALEFIN CODCAUS
FLAGS "U"
VALIDATE ZEROFILL_FUNC 3
END
STRING F_REPORT 256 64
BEGIN
PROMPT 1 9 "Report "
END
SPREADSHEET F_RIGHE -1 -2
BEGIN
PROMPT 1 11 "Selezione su CdC / Commesse / Fasi"
ITEM "Cdc1"
ITEM "Cdc2"
ITEM "Cdc3"
ITEM "Cdc4"
ITEM "Cdc5"
ITEM "Cdc6"
ITEM "Cdc7"
ITEM "Cdc8"
ITEM "Cdc9"
ITEM "Cdc10"
ITEM "Cdc11"
ITEM "Cdc12"
END
ENDPAGE
ENDMASK
PAGE "Riga" -1 -1 78 19
STRING S_CDC1 20
BEGIN
PROMPT 1 2 "Cdc1"
FLAGS "B"
CHECKTYPE NORMAL
GROUP 1
END
STRING S_CDC2 20
BEGIN
PROMPT 21 2 "Cdc2"
FLAGS "B"
CHECKTYPE NORMAL
GROUP 1
END
STRING S_CDC3 20
BEGIN
PROMPT 41 2 "Cdc3"
FLAGS "B"
CHECKTYPE NORMAL
GROUP 1
END
STRING S_CDC4 20
BEGIN
PROMPT 61 2 "Cdc4"
FLAGS "B"
CHECKTYPE NORMAL
GROUP 1
END
STRING S_CDC5 20
BEGIN
PROMPT 1 3 "Cdc5"
FLAGS "B"
CHECKTYPE NORMAL
GROUP 1
END
STRING S_CDC6 20
BEGIN
PROMPT 21 3 "Cdc6"
FLAGS "B"
CHECKTYPE NORMAL
GROUP 1
END
STRING S_CDC7 20
BEGIN
PROMPT 41 3 "Cdc7"
FLAGS "B"
CHECKTYPE NORMAL
GROUP 1
END
STRING S_CDC8 20
BEGIN
PROMPT 61 3 "Cdc8"
FLAGS "B"
CHECKTYPE NORMAL
GROUP 1
END
STRING S_CDC9 20
BEGIN
PROMPT 1 4 "Cdc9"
FLAGS "B"
CHECKTYPE NORMAL
GROUP 1
END
STRING S_CDC10 20
BEGIN
PROMPT 21 4 "Cdc10"
FLAGS "B"
CHECKTYPE NORMAL
GROUP 1
END
STRING S_CDC11 20
BEGIN
PROMPT 41 4 "Cdc11"
FLAGS "B"
CHECKTYPE NORMAL
GROUP 1
END
STRING S_CDC12 20
BEGIN
PROMPT 61 4 "Cdc12"
FLAGS "B"
CHECKTYPE NORMAL
GROUP 1
END
BUTTON DLG_OK 10 2
BEGIN
PROMPT -13 -1 ""
END
BUTTON DLG_DELREC 10 2
BEGIN
PROMPT -23 -1 ""
END
BUTTON DLG_CANCEL 10 2
BEGIN
PROMPT -33 -1 ""
END
ENDPAGE
ENDMASK

View File

@ -1,5 +1,5 @@
<report libraries="ca3100b" name="ca3100b" lpi="8">
<report libraries="ca3100b,ve1300" name="ca3100b" lpi="8">
<description>Movimenti CA per data</description>
<font face="Courier New" size="8" />
<section type="Head">
@ -14,34 +14,105 @@ THEN
<font italic="1" face="Courier New" bold="1" size="10" />
<source>#SYSTEM.RAGSOC</source>
</field>
<field x="100" type="Data" width="10" pattern="1">
<field x="76" type="Data" width="10" pattern="1">
<source>#SYSTEM.DATE</source>
</field>
<field x="152" type="Numero" align="right" width="3" pattern="1">
<field x="157" type="Numero" align="right" width="3" pattern="1">
<source>#REPORT.PAGE</source>
</field>
<field border="2" x="1" y="2.5" type="Linea" width="154" height="0" pattern="1" />
<field border="2" x="1" y="2.5" type="Linea" width="161" height="0" pattern="1" />
<field x="13" y="3" type="Testo" align="center" width="7" pattern="1" text="N.Reg." />
<field x="33.5" y="3" type="Testo" align="center" width="10" pattern="1" text="Data Doc." />
<field x="45.5" y="3" type="Testo" align="center" width="8" pattern="1" text="N.Reg.CG" />
<field x="55.5" y="3" type="Testo" align="center" width="6" pattern="1" text="N.Doc." />
<field x="64" y="3" type="Testo" align="center" width="7" pattern="1" text="Tp.Doc." />
<field x="73" y="3" type="Testo" align="center" width="11" pattern="1" text="Descrizione" />
<field x="99.5" y="3" type="Testo" align="center" width="8" pattern="1" text="Cod.Cau." />
<field x="110.5" y="3" type="Testo" align="center" width="7" pattern="1" text="Tp.Mov." />
<field x="125" y="3" type="Testo" align="center" width="15" pattern="1" text="Totale Dare" />
<field x="140" y="3" type="Testo" align="center" width="15" pattern="1" text="Totale Avere" />
<field border="2" x="1" y="4" type="Linea" width="154" height="0" pattern="1" />
<field x="55" y="3" type="Testo" align="center" width="6" pattern="1" text="N.Doc." />
<field x="62" y="3" type="Testo" align="center" width="7" pattern="1" text="Tp.Doc." />
<field x="69" y="3" type="Testo" align="center" width="11" pattern="1" text="Descrizione" />
<field x="95" y="3" type="Testo" align="center" width="7" pattern="1" text="Causale" />
<field x="124" y="3" type="Testo" align="center" width="7" pattern="1" text="Tp.Mov." />
<field x="131" y="3" type="Testo" align="center" width="15" pattern="1" text="Totale Dare" />
<field x="146" y="3" type="Testo" align="center" width="15" pattern="1" text="Totale Avere" />
<field border="2" x="1" y="4" type="Linea" width="161" height="0" pattern="1" />
<field x="1" y="3" type="Testo" align="center" width="10" id="121" pattern="1" text="Data Reg." />
<field x="22" y="3" type="Testo" width="10" id="122" pattern="1" text="Data Comp." />
</section>
<section type="Head" level="1" height="3">
<prescript description="H1 PRESCRIPT">MESSAGE RESET,F1.101
MESSAGE RESET,F1.102</prescript>
<field border="1" radius="100" x="1" type="Testo" valign="center" align="center" shade_offset="25" width="154" height="2.5" text="MOVIMENTI DI CONTABILITA' ANALITICA">
<field border="1" radius="100" x="1" type="Testo" valign="center" align="center" shade_offset="25" width="161" height="2.5" text="MOVIMENTI DI CONTABILITA' ANALITICA">
<font face="Courier New" bold="1" size="16" />
</field>
</section>
<section type="Head" level="2">
<groupby>IF (#ANNO &#3E; 0,MOVANA.DATACOMP,MOVANA.DATAREG)</groupby>
<prescript description="H2 PRESCRIPT">MESSAGE RESET,F2.131
MESSAGE RESET,F2.132</prescript>
</section>
<section type="Head" level="3">
<groupby>NUMREG</groupby>
<field x="13" y="1" type="Numero" align="right" width="7" pattern="1">
<source>MOVANA.NUMREG</source>
</field>
<field x="34" y="1" type="Data" width="10" pattern="1">
<source>MOVANA.DATADOC</source>
</field>
<field x="47" y="1" type="Numero" align="right" width="7" pattern="1" hide_zero="1">
<source>MOVANA.NUMREGCG</source>
</field>
<field x="56" y="1" type="Stringa" width="7" pattern="1">
<source>MOVANA.NUMDOC</source>
</field>
<field x="64" y="1" type="Stringa" width="4" pattern="1">
<source>MOVANA.TIPODOC</source>
</field>
<field x="69" y="1" type="Stringa" dynamic_height="1" width="25" height="2" pattern="1">
<source>MOVANA.DESCR</source>
</field>
<field x="95" y="1" type="Stringa" width="3" pattern="1">
<source>MOVANA.CODCAUS</source>
</field>
<field x="99" y="1" type="Stringa" dynamic_height="1" width="25" height="2" pattern="1">
<prescript description="H3.0 PRESCRIPT">MESSAGE ISAMREAD,CAUS,CODCAUS=MOVANA.CODCAUS,DESCR</prescript>
</field>
<field x="127" y="1" type="Stringa" width="1" pattern="1">
<source>MOVANA.TIPOMOV</source>
</field>
<field x="131" y="1" type="Valuta" align="right" width="15" pattern="1" hide_zero="1" text="###.###.###,@@">
<source>MOVANA.TOTDOC</source>
<prescript description="H2.0 PRESCRIPT">"MOVANA.SEZIONE" @
"A" =
IF
0 #THIS !
THEN
</prescript>
</field>
<field x="146" y="1" type="Valuta" align="right" width="15" pattern="1" hide_zero="1" text="###.###.###,@@">
<source>MOVANA.TOTDOC</source>
<prescript description="H2.0 PRESCRIPT">"MOVANA.SEZIONE" @
"D" =
IF
0 #THIS !
THEN
</prescript>
</field>
<field x="8" y="3" type="Testo" align="center" width="4" pattern="1" text="Riga" />
<field x="13" y="3" type="Testo" width="23" pattern="1" text="Centro di Costo" />
<field x="37" y="3" type="Testo" width="23" pattern="1" text="Commessa" />
<field x="61" y="3" type="Testo" width="13" pattern="1" text="Fase" />
<field x="75" y="3" type="Testo" width="23" pattern="1" text="Conto" />
<field x="99" y="3" type="Testo" width="25" pattern="1" text="Descrizione" />
<field x="131.18" y="3" type="Testo" align="center" width="15" pattern="1" text="Dare" />
<field x="146.18" y="3" type="Testo" align="center" width="15" pattern="1" text="Avere" />
<field border="1" x="8.18" y="4" type="Linea" width="154" height="0" pattern="1" />
<field x="-9.88" y="1" type="Data" width="10" id="121" pattern="1">
<source>DATAREG</source>
</field>
<field x="1" y="1" type="Data" width="10" id="121" pattern="1">
<source>MOVANA.DATAREG</source>
</field>
<field x="22" y="1" type="Data" align="right" width="10" id="122" pattern="1">
<source>MOVANA.DATACOMP</source>
</field>
</section>
<section type="Body" />
<section type="Body" level="1">
<prescript description="B1 PRESCRIPT">#ESERCIZIO @
@ -50,131 +121,73 @@ IF
121 122 SCAMBIA_CAMPI
THEN
;</prescript>
<field x="12" y="1" type="Numero" align="right" width="7" pattern="1">
<source>NUMREG</source>
</field>
<field x="33" y="1" type="Data" width="10" pattern="1">
<source>DATADOC</source>
</field>
<field x="46" y="1" type="Numero" align="right" width="7" pattern="1" hide_zero="1">
<source>NUMREGCG</source>
</field>
<field x="55.5" y="1" type="Stringa" width="7" pattern="1">
<source>NUMDOC</source>
</field>
<field x="64" y="1" type="Stringa" width="4" pattern="1">
<source>TIPODOC</source>
</field>
<field x="73" y="1" type="Stringa" dynamic_height="1" width="25" height="2" pattern="1">
<source>DESCR</source>
</field>
<field x="101" y="1" type="Stringa" width="3" pattern="1">
<source>CODCAUS</source>
</field>
<field x="112" y="1" type="Stringa" width="1" pattern="1">
<source>TIPOMOV</source>
</field>
<field x="125" y="1" type="Valuta" align="right" width="15" pattern="1" hide_zero="1" text="###.###.###,@@">
<source>TOTDOC</source>
<prescript description="B1.0 PRESCRIPT">"MOVANA.SEZIONE" @
"A" =
IF
0 #THIS !
THEN
</prescript>
</field>
<field x="140" y="1" type="Valuta" align="right" width="15" pattern="1" hide_zero="1" text="###.###.###,@@">
<source>TOTDOC</source>
<prescript description="B1.0 PRESCRIPT">"MOVANA.SEZIONE" @
"D" =
IF
0 #THIS !
THEN
</prescript>
</field>
<field x="1" y="1" type="Data" width="10" id="121" pattern="1">
<source>DATAREG</source>
</field>
<field x="21" y="1" type="Data" align="right" width="10" id="122" pattern="1">
<source>DATACOMP</source>
</field>
</section>
<section type="Head" level="11">
<font italic="1" face="Courier New" size="8" />
<field x="8.21" type="Testo" align="center" width="4" pattern="1" text="Riga" />
<field x="13.21" type="Testo" width="23" pattern="1" text="Centro di Costo" />
<field x="37.21" type="Testo" width="23" pattern="1" text="Commessa" />
<field x="61.21" type="Testo" width="13" pattern="1" text="Fase" />
<field x="75.21" type="Testo" width="23" pattern="1" text="Conto" />
<field x="99.21" type="Testo" width="25" pattern="1" text="Descrizione" />
<field x="128" type="Testo" align="center" width="15" pattern="1" text="Dare" />
<field x="143" type="Testo" align="center" width="15" pattern="1" text="Avere" />
<field border="1" x="8" y="1" type="Linea" width="147" height="0" pattern="1" />
</section>
<section type="Body" level="11">
<sql>USE RMOVANA
FROM NUMREG=#PARENT.NUMREG
TO NUMREG=#PARENT.NUMREG
</sql>
<field x="9" type="Numero" align="right" width="3" pattern="1">
<source>NUMRIG</source>
</field>
<field x="13" type="Stringa" width="23" pattern="1">
<source>CODCCOSTO</source>
<prescript description="B11.0 PRESCRIPT">CA_FORMAT_COSTO</prescript>
<prescript description="B1.0 PRESCRIPT">CA_FORMAT_COSTO</prescript>
</field>
<field x="37" type="Stringa" width="23" pattern="1">
<source>CODCMS</source>
<prescript description="B11.0 PRESCRIPT">CA_FORMAT_COMMESSA</prescript>
<prescript description="B1.0 PRESCRIPT">CA_FORMAT_COMMESSA</prescript>
</field>
<field x="61" type="Stringa" width="13" pattern="1">
<source>CODFASE</source>
<prescript description="B11.0 PRESCRIPT">CA_FORMAT_FASE</prescript>
<prescript description="B1.0 PRESCRIPT">CA_FORMAT_FASE</prescript>
</field>
<field x="75" type="Stringa" width="23" pattern="1">
<source>CODCONTO</source>
<prescript description="B11.0 PRESCRIPT">CA_FORMAT_CONTO</prescript>
<prescript description="B1.0 PRESCRIPT">CA_FORMAT_CONTO</prescript>
</field>
<field x="99" type="Stringa" dynamic_height="1" width="25" height="2" pattern="1">
<source>DESCR</source>
</field>
<field x="125" type="Valuta" align="right" width="15" id="101" pattern="1" hide_zero="1" text="###.###.###,@@">
<field x="131" type="Valuta" align="right" width="15" id="101" pattern="1" hide_zero="1" text="###.###.###,@@">
<source>IMPORTO</source>
<prescript description="B11.101 PRESCRIPT">"RMOVANA.SEZIONE" @
<prescript description="B1.101 PRESCRIPT">"RMOVANA.SEZIONE" @
"A" =
IF
0 #THIS !
THEN
</prescript>
<postscript description="B11.101 POSTSCRIPT">MESSAGE ADD,F1.101</postscript>
<postscript description="B1.101 POSTSCRIPT">MESSAGE ADD,F1.101
MESSAGE ADD,F2.131</postscript>
</field>
<field x="140" type="Valuta" align="right" width="15" id="102" pattern="1" hide_zero="1" text="###.###.###,@@">
<field x="146" type="Valuta" align="right" width="15" id="102" pattern="1" hide_zero="1" text="###.###.###,@@">
<source>IMPORTO</source>
<prescript description="B11.102 PRESCRIPT">"RMOVANA.SEZIONE" @
<prescript description="B1.102 PRESCRIPT">"RMOVANA.SEZIONE" @
"D" =
IF
0 #THIS !
THEN
</prescript>
<postscript description="B11.102 POSTSCRIPT">MESSAGE ADD,F1.102</postscript>
<postscript description="B1.102 POSTSCRIPT">MESSAGE ADD,F1.102
MESSAGE ADD,F2.132</postscript>
</field>
</section>
<section type="Foot" level="11" />
<section type="Foot" height="1" />
<section type="Foot" level="1">
<field border="2" x="1" y="1" type="Linea" width="154" height="0" pattern="1" />
<field x="96" y="1.5" type="Testo" width="30" pattern="1" text="Totale generale per sezione:">
<field border="2" x="1" y="1" type="Linea" width="161" height="0" pattern="1" />
<field x="101" y="1.5" type="Testo" width="30" pattern="1" text="Totale generale per sezione:">
<font face="Courier New" bold="1" size="8" />
</field>
<field x="125" y="1.5" type="Valuta" align="right" width="15" id="101" pattern="1" text="###.###.###,@@">
<field x="131" y="1.5" type="Valuta" align="right" width="15" id="101" pattern="1" text="###.###.###,@@">
<font face="Courier New" bold="1" size="8" />
</field>
<field x="140" y="1.5" type="Valuta" align="right" width="15" id="102" pattern="1" text="###.###.###,@@">
<field x="146" y="1.5" type="Valuta" align="right" width="15" id="102" pattern="1" text="###.###.###,@@">
<font face="Courier New" bold="1" size="8" />
</field>
</section>
<sql>USE MOVANA
</sql>
<section type="Foot" level="2">
<field border="1" x="2" y="1" type="Linea" width="160" height="0" pattern="1" />
<field x="110" y="1.5" type="Testo" width="20" pattern="1" text="Totale giornaliero:" />
<field x="131" y="1.25" type="Valuta" align="right" width="15" id="131" pattern="1" hide_zero="1" text="###.###.###,@@" />
<field x="146" y="1.25" type="Valuta" align="right" width="15" id="132" pattern="1" hide_zero="1" text="###.###.###,@@" />
</section>
<section type="Foot" level="3" />
<sql>USE RMOVANA
JOIN MOVANA INTO NUMREG==NUMREG</sql>
<prescript description="PRESCRIPT">: SCAMBIA_CAMPI ( F1 F2 -- )
VARIABLE _X1 \ coordinate del campo F1
VARIABLE _Y1