Patch level :2.2 140
Files correlati : Ricompilazione Demo : [ ] Commento :stampa mastrini in corso d'opera...adesso stampa un primo tentativo di saldo. Corretta gestione movimenti (RMOVANA_DATACOMP sostituisce RMOVANA_DATAREG) git-svn-id: svn://10.65.10.50/trunk@13219 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
39302b50e0
commit
d4aefd10a0
@ -373,7 +373,7 @@ bool TMovanal_msk::row2rec(int r, TRectype& rec) const
|
||||
|
||||
TToken_string& row = sheet.row(r);
|
||||
rec.put(RMOVANA_ANNOES, get(F_ANNOES));
|
||||
rec.put(RMOVANA_DATAREG, get(F_DATAREG));
|
||||
rec.put(RMOVANA_DATACOMP, get(F_DATACOMP));
|
||||
|
||||
const real dare = row.get(sheet.cid2index(S_DARE)), avere = row.get();
|
||||
if (dare.is_zero())
|
||||
|
@ -78,6 +78,7 @@ DATE F_DATACOMP
|
||||
BEGIN
|
||||
PROMPT 2 7 "Data di competenza "
|
||||
FIELD DATACOMP
|
||||
CHECKTYPE REQUIRED
|
||||
WARNING "La data di competenza non appartiene ad un esercizio valido"
|
||||
END
|
||||
|
||||
|
@ -229,15 +229,19 @@ class TPrint_mastrini_ca_recordset : public TISAM_recordset
|
||||
{
|
||||
int _anno;
|
||||
int _tipoconti;
|
||||
int _tipimov;
|
||||
TDate _dadata, _adata;
|
||||
long _danumreg, _anumreg;
|
||||
TString _daconto, _aconto, _codcosto, _codcms, _codfas;
|
||||
|
||||
protected: //da libreria
|
||||
virtual const TVariant& get(const char* column_name) const;
|
||||
|
||||
protected:
|
||||
static bool mov_filter(const TRelation* rel);
|
||||
bool valid_record(const TRelation& rel) const;
|
||||
|
||||
virtual void set_custom_filter(TCursor& cur) const;
|
||||
const TImporto& saldo_iniziale(const char* conto) const;
|
||||
|
||||
public:
|
||||
void set_filter(const TPrint_mastrini_ca_mask& msk, int cms_row);
|
||||
@ -256,12 +260,16 @@ bool TPrint_mastrini_ca_recordset::valid_record(const TRelation& rel) const
|
||||
if (data < _dadata || (_adata.ok() && data > _adata))
|
||||
return false;
|
||||
|
||||
/* if (_tipoconti > ' ')
|
||||
const char tipomov = mov.get_char(MOVANA_TIPOMOV);
|
||||
int tipomov_int = 0;
|
||||
switch (tipomov)
|
||||
{
|
||||
const int tipoconti = mov.get_int();
|
||||
if (tipoconti != _tipoconti)
|
||||
return false;
|
||||
}*/
|
||||
case 'P': tipomov_int = 2; break;
|
||||
case 'V': tipomov_int = 4; break;
|
||||
default: tipomov_int = 1; break;
|
||||
}
|
||||
if ((_tipimov & tipomov_int) == 0)
|
||||
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);
|
||||
@ -305,6 +313,50 @@ void TPrint_mastrini_ca_recordset::set_custom_filter(TCursor& cur) const
|
||||
cur.set_filterfunction(mov_filter, true);
|
||||
}
|
||||
|
||||
const TImporto& TPrint_mastrini_ca_recordset::saldo_iniziale(const char* conto) const
|
||||
{
|
||||
const TSaldanal& saldo = ca_saldo(conto, _codcosto, _codcms, _codfas, _dadata, _adata, _tipimov);
|
||||
return saldo._ini;
|
||||
}
|
||||
|
||||
|
||||
const TVariant& TPrint_mastrini_ca_recordset::get(const char* column_name) const
|
||||
{
|
||||
if (strncmp(column_name, "SALDOINI:", 9) == 0)
|
||||
{
|
||||
const TString16 sub_field = column_name+9;
|
||||
const TString& conto = get(RMOVANA_CODCONTO).as_string();
|
||||
const TImporto& saldo_ini = saldo_iniziale(conto);
|
||||
|
||||
TVariant& var = get_tmp_var();
|
||||
if (sub_field == "DARE")
|
||||
var = saldo_ini.sezione() == 'D' ? saldo_ini.valore() : ZERO;
|
||||
else
|
||||
var = saldo_ini.sezione() == 'A' ? saldo_ini.valore() : ZERO;
|
||||
return var;
|
||||
}
|
||||
|
||||
if (strcmp(column_name, "#COSTO") == 0)
|
||||
{
|
||||
TVariant& var = get_tmp_var();
|
||||
var = _codcosto;
|
||||
return var;
|
||||
}
|
||||
if (strcmp(column_name, "#COMMESSA") == 0)
|
||||
{
|
||||
TVariant& var = get_tmp_var();
|
||||
var = _codcms;
|
||||
return var;
|
||||
}
|
||||
if (strcmp(column_name, "#FASE") == 0)
|
||||
{
|
||||
TVariant& var = get_tmp_var();
|
||||
var = _codfas;
|
||||
return var;
|
||||
}
|
||||
return TISAM_recordset::get(column_name);
|
||||
}
|
||||
|
||||
//metodo per caricare i valori nel recordset dalla maschera...fighissimo!!
|
||||
void TPrint_mastrini_ca_recordset::set_filter(const TPrint_mastrini_ca_mask& msk, int cms_row)
|
||||
{
|
||||
@ -330,6 +382,13 @@ void TPrint_mastrini_ca_recordset::set_filter(const TPrint_mastrini_ca_mask& msk
|
||||
_dadata = msk.get_date(F_DATAINI);
|
||||
_adata = msk.get_date(F_DATAFIN);
|
||||
|
||||
_tipimov = 0;
|
||||
switch (msk.get(F_TIPIMOV)[0])
|
||||
{
|
||||
case 'N': _tipimov = 1; break;
|
||||
case 'P': _tipimov = 6; break;
|
||||
default: _tipimov = 7; break;
|
||||
}
|
||||
_tipoconti = msk.get(F_TIPOCONTI)[0];
|
||||
|
||||
}
|
||||
@ -352,11 +411,6 @@ public:
|
||||
|
||||
bool TPrint_mastrini_ca_rep::get_usr_val(const TString& name, TVariant& var) const
|
||||
{
|
||||
if (name == "#ESERCIZIO")
|
||||
{
|
||||
var.set(_anno);
|
||||
return true;
|
||||
}
|
||||
return TAnal_report::get_usr_val(name, var);
|
||||
}
|
||||
|
||||
@ -368,7 +422,6 @@ bool TPrint_mastrini_ca_rep::set_recordset(const TString& sql)
|
||||
|
||||
void TPrint_mastrini_ca_rep::set_filter(const TPrint_mastrini_ca_mask& msk, int cms_row)
|
||||
{
|
||||
_anno = msk.get_int(F_ANNO);
|
||||
TPrint_mastrini_ca_recordset* rs = (TPrint_mastrini_ca_recordset*)recordset();
|
||||
rs->set_filter(msk, cms_row);
|
||||
}
|
||||
|
@ -25,8 +25,7 @@
|
||||
#define F_STAMPA_SALDI_PROG 293
|
||||
#define F_STAMPA_SALDI_SCAL 294
|
||||
#define F_TIPOCONTI 295
|
||||
|
||||
#define F_MEMORIZZA 296
|
||||
#define F_TIPIMOV 296
|
||||
|
||||
//sheet di pagina 2
|
||||
#define F_RIGHE 300
|
||||
|
@ -127,12 +127,20 @@ END
|
||||
|
||||
LIST F_TIPOCONTI 24
|
||||
BEGIN
|
||||
PROMPT 2 19 "Selezione conti "
|
||||
PROMPT 2 19 "Selezione conti "
|
||||
ITEM "1|Movimentati nel periodo"
|
||||
ITEM "2|Con saldo diverso da 0"
|
||||
ITEM "3|Tutti"
|
||||
END
|
||||
|
||||
LIST F_TIPIMOV 24
|
||||
BEGIN
|
||||
PROMPT 2 20 "Selezione movimenti "
|
||||
ITEM " |Qualsiasi"
|
||||
ITEM "N|Normale"
|
||||
ITEM "P|Preventivo e variazione"
|
||||
END
|
||||
|
||||
STRING F_REPORT 256 64
|
||||
BEGIN
|
||||
PROMPT 2 21 "Report "
|
||||
|
118
ca/ca3200a.rep
118
ca/ca3200a.rep
@ -47,9 +47,14 @@ MESSAGE RESET,F1.102</prescript>
|
||||
<font face="Courier New" bold="1" size="16" />
|
||||
</field>
|
||||
</section>
|
||||
<section repeat="1" type="Head" level="2" height="3">
|
||||
<section repeat="1" type="Head" level="2" height="4.5">
|
||||
<groupby>CODCONTO</groupby>
|
||||
<font italic="1" face="Courier New" size="8" />
|
||||
<prescript description="H2 PRESCRIPT">MESSAGE RESET,F2.101
|
||||
MESSAGE RESET,F2.102
|
||||
MESSAGE RESET,F2.103
|
||||
MESSAGE RESET,F2.104
|
||||
MESSAGE RESET,F2.105</prescript>
|
||||
<field type="Testo" width="6" pattern="1" text="Conto:">
|
||||
<font italic="1" face="Courier New" bold="1" size="8" />
|
||||
</field>
|
||||
@ -62,47 +67,51 @@ MESSAGE RESET,F1.102</prescript>
|
||||
<font italic="1" face="Courier New" bold="1" size="8" />
|
||||
<prescript description="H2.0 PRESCRIPT">MESSAGE ISAMREAD,PCONANA,CODCONTO=CODCONTO,DESCR</prescript>
|
||||
</field>
|
||||
<field x="12" y="1.5" type="Testo" align="center" width="11" pattern="1" text="N.Reg.F;Riga" />
|
||||
<field x="24" y="1.5" type="Testo" width="11" pattern="1" text="Descrizione" />
|
||||
<field x="43" y="1.5" type="Testo" width="10" pattern="1" text="Data Doc." />
|
||||
<field x="54" y="1.5" type="Testo" width="6" pattern="1" text="N.Doc." />
|
||||
<field x="63" y="1.5" type="Testo" width="7" pattern="1" text="Causale" />
|
||||
<field x="97" y="1.5" type="Testo" align="right" width="4" pattern="1" text="Dare" />
|
||||
<field x="112" y="1.5" type="Testo" align="right" width="5" pattern="1" text="Avere" />
|
||||
<field x="121" y="1.5" type="Testo" align="right" width="12" pattern="1" text="Saldo progr." />
|
||||
<field x="136" y="1.5" type="Testo" align="right" width="12" pattern="1" text="Saldo movim." />
|
||||
<field x="152" y="1.5" type="Testo" align="right" width="12" pattern="1" text="Altro saldo" />
|
||||
<field x="13" y="1.5" type="Testo" align="center" width="11" pattern="1" text="N.Reg.F;Riga" />
|
||||
<field x="25" y="1.5" type="Testo" width="11" pattern="1" text="Descrizione" />
|
||||
<field x="52" y="1.5" type="Testo" width="10" pattern="1" text="Data Doc." />
|
||||
<field x="64" y="1.5" type="Testo" width="6" pattern="1" text="N.Doc." />
|
||||
<field x="73" y="1.5" type="Testo" width="7" pattern="1" text="Causale" />
|
||||
<field x="115" y="1.5" type="Testo" align="right" width="4" pattern="1" text="Dare" />
|
||||
<field x="130" y="1.5" type="Testo" align="right" width="5" pattern="1" text="Avere" />
|
||||
<field x="139" y="1.5" type="Testo" align="right" width="14" pattern="1" text="Saldo scalare" />
|
||||
<field border="1" x="1" y="2.5" type="Linea" width="168" height="0" pattern="1" />
|
||||
<field x="95" y="3" type="Testo" width="25" pattern="1" text="Progressivo precedente" />
|
||||
<field x="132" y="3" type="Valuta" align="right" width="15" pattern="1" hide_zero="1" text="###.###.###,@@" />
|
||||
<field x="1" y="1.5" type="Testo" align="center" width="10" id="121" pattern="1" text="Data" />
|
||||
</section>
|
||||
<section type="Head" level="3">
|
||||
<groupby>DATACOMP</groupby>
|
||||
</section>
|
||||
<section type="Body" />
|
||||
<section type="Body" level="1">
|
||||
<field x="1" type="Data" width="10" pattern="1">
|
||||
<source>MOVANA.DATACOMP</source>
|
||||
<field x="1" type="Data" width="11" pattern="1">
|
||||
<source>DATACOMP</source>
|
||||
<postscript description="B1.0 POSTSCRIPT">MESSAGE COPY,F3.131</postscript>
|
||||
</field>
|
||||
<field x="12" type="Numero" align="right" width="7" pattern="1">
|
||||
<field x="13" type="Numero" align="right" width="7" pattern="1">
|
||||
<source>NUMREG</source>
|
||||
</field>
|
||||
<field x="19" type="Testo" width="1" pattern="1" text="F;" />
|
||||
<field x="20" type="Numero" align="right" width="3" pattern="1">
|
||||
<field x="20" type="Testo" width="1" pattern="1" text="F;" />
|
||||
<field x="21" type="Numero" align="right" width="3" pattern="1">
|
||||
<source>NUMRIG</source>
|
||||
</field>
|
||||
<field x="24" type="Stringa" dynamic_height="1" width="17" height="3" pattern="1">
|
||||
<field x="25" type="Stringa" dynamic_height="1" width="25" height="2" pattern="1">
|
||||
<source>DESCR</source>
|
||||
</field>
|
||||
<field x="43" type="Data" width="10" pattern="1">
|
||||
<field x="52" type="Data" width="11" pattern="1">
|
||||
<source>MOVANA.DATADOC</source>
|
||||
</field>
|
||||
<field x="54" type="Stringa" width="7" pattern="1">
|
||||
<field x="64" type="Stringa" width="7" pattern="1">
|
||||
<source>MOVANA.NUMDOC</source>
|
||||
</field>
|
||||
<field x="63" type="Stringa" width="3" pattern="1">
|
||||
<field x="73" type="Stringa" width="3" pattern="1">
|
||||
<source>MOVANA.CODCAUS</source>
|
||||
</field>
|
||||
<field x="67" type="Stringa" dynamic_height="1" width="17" height="3" pattern="1">
|
||||
<field x="77" type="Stringa" dynamic_height="1" width="25" height="2" pattern="1">
|
||||
<prescript description="B1.0 PRESCRIPT">MESSAGE ISAMREAD,CAUS,CODCAUS=MOVANA.CODCAUS,DESCR</prescript>
|
||||
</field>
|
||||
<field x="86" type="Valuta" align="right" width="15" id="101" pattern="1" hide_zero="1" text="###.###.###,@@">
|
||||
<field x="104" type="Valuta" align="right" width="15" id="101" pattern="1" hide_zero="1" text="###.###.###,@@">
|
||||
<source>IMPORTO</source>
|
||||
<prescript description="B1.101 PRESCRIPT">"RMOVANA.SEZIONE" @
|
||||
"A" =
|
||||
@ -110,10 +119,9 @@ IF
|
||||
0 #THIS !
|
||||
THEN
|
||||
</prescript>
|
||||
<postscript description="B1.101 POSTSCRIPT">MESSAGE ADD,F1.101
|
||||
MESSAGE ADD,F2.131</postscript>
|
||||
<postscript description="B1.101 POSTSCRIPT">MESSAGE ADD,F2.101</postscript>
|
||||
</field>
|
||||
<field x="102" type="Valuta" align="right" width="15" id="102" pattern="1" hide_zero="1" text="###.###.###,@@">
|
||||
<field x="120" type="Valuta" align="right" width="15" id="102" pattern="1" hide_zero="1" text="###.###.###,@@">
|
||||
<source>IMPORTO</source>
|
||||
<prescript description="B1.102 PRESCRIPT">"RMOVANA.SEZIONE" @
|
||||
"D" =
|
||||
@ -121,65 +129,43 @@ IF
|
||||
0 #THIS !
|
||||
THEN
|
||||
</prescript>
|
||||
<postscript description="B1.102 POSTSCRIPT">MESSAGE ADD,F1.102
|
||||
MESSAGE ADD,F2.132</postscript>
|
||||
<postscript description="B1.102 POSTSCRIPT">MESSAGE ADD,F2.102
|
||||
</postscript>
|
||||
</field>
|
||||
<field x="118" type="Valuta" align="right" width="15" id="103" pattern="1" hide_zero="1" text="###.###.###,@@">
|
||||
<field x="136" type="Valuta" align="right" width="15" id="103" pattern="1" hide_zero="1" text="###.###.###,@@">
|
||||
<prescript description="B1.103 PRESCRIPT">"RMOVANA.SEZIONE" @
|
||||
"D" =
|
||||
IF
|
||||
0 #THIS !
|
||||
THEN
|
||||
</prescript>
|
||||
<postscript description="B1.103 POSTSCRIPT">MESSAGE ADD,F1.102
|
||||
MESSAGE ADD,F2.132</postscript>
|
||||
</field>
|
||||
<field x="134" type="Valuta" align="right" width="15" id="104" pattern="1" hide_zero="1" text="###.###.###,@@">
|
||||
<prescript description="B1.104 PRESCRIPT">"RMOVANA.SEZIONE" @
|
||||
"D" =
|
||||
IF
|
||||
0 #THIS !
|
||||
THEN
|
||||
</prescript>
|
||||
<postscript description="B1.104 POSTSCRIPT">MESSAGE ADD,F1.102
|
||||
MESSAGE ADD,F2.132</postscript>
|
||||
</field>
|
||||
<field x="150" type="Valuta" align="right" width="15" id="105" pattern="1" hide_zero="1" text="###.###.###,@@">
|
||||
<prescript description="B1.105 PRESCRIPT">"RMOVANA.SEZIONE" @
|
||||
"D" =
|
||||
IF
|
||||
0 #THIS !
|
||||
THEN
|
||||
</prescript>
|
||||
<postscript description="B1.105 POSTSCRIPT">MESSAGE ADD,F1.102
|
||||
MESSAGE ADD,F2.132</postscript>
|
||||
<postscript description="B1.103 POSTSCRIPT">MESSAGE ADD,F2.103</postscript>
|
||||
</field>
|
||||
</section>
|
||||
<section type="Foot" height="1" />
|
||||
<section type="Foot" level="1">
|
||||
<field border="2" x="1" y="1" type="Linea" width="168" height="0" pattern="1" />
|
||||
<field x="85" y="2" type="Testo" width="17" pattern="1" text="Totali periodo:">
|
||||
<section type="Foot" />
|
||||
<section type="Foot" level="1" />
|
||||
<section type="Foot" level="2" height="3">
|
||||
<field border="1" x="1" y="0.5" type="Linea" width="168" height="0" pattern="1" />
|
||||
<field x="84" y="1" type="Testo" width="17" pattern="1" text="Totali periodo:">
|
||||
<font face="Courier New" bold="1" size="8" />
|
||||
</field>
|
||||
<field x="85" y="3.25" type="Testo" width="20" pattern="1" text="Totali progressivi:">
|
||||
<field x="104" y="1" type="Valuta" align="right" width="15" id="101" pattern="1" text="###.###.###,@@">
|
||||
<font face="Courier New" bold="1" size="8" />
|
||||
</field>
|
||||
<field x="105" y="2" type="Valuta" align="right" width="15" id="101" pattern="1" text="###.###.###,@@">
|
||||
<field x="120" y="1" type="Valuta" align="right" width="15" id="102" pattern="1" text="###.###.###,@@">
|
||||
<font face="Courier New" bold="1" size="8" />
|
||||
</field>
|
||||
<field x="121" y="2" type="Valuta" align="right" width="15" id="102" pattern="1" text="###.###.###,@@">
|
||||
<font face="Courier New" bold="1" size="8" />
|
||||
</field>
|
||||
<field x="137" y="2" type="Valuta" align="right" width="15" id="103" pattern="1" text="###.###.###,@@">
|
||||
<font face="Courier New" bold="1" size="8" />
|
||||
</field>
|
||||
<field x="153" y="2" type="Valuta" align="right" width="15" id="104" pattern="1" text="###.###.###,@@">
|
||||
<field x="138" y="1" type="Valuta" align="right" width="15" id="103" pattern="1" text="###.###.###,@@">
|
||||
<font face="Courier New" bold="1" size="8" />
|
||||
</field>
|
||||
</section>
|
||||
<section type="Foot" level="2" height="1" />
|
||||
<sql>USE RMOVANA
|
||||
BY CODCONTO NUMREG NUMRIG
|
||||
<section type="Foot" level="3" height="2">
|
||||
<font italic="1" face="Courier New" size="8" />
|
||||
<field x="110" y="0.5" type="Testo" width="9" pattern="1" text="Saldo al" />
|
||||
<field x="132" y="0.5" type="Valuta" align="right" width="15" pattern="1" hide_zero="1" text="###.###.###,@@" />
|
||||
<field x="120" y="0.5" type="Data" width="11" id="131" pattern="1" />
|
||||
</section>
|
||||
<sql>USE RMOVANA KEY 2
|
||||
JOIN MOVANA INTO NUMREG==NUMREG</sql>
|
||||
<prescript description="PRESCRIPT">: SCAMBIA_CAMPI ( F1 F2 -- )
|
||||
VARIABLE _X1 \ coordinate del campo F1
|
||||
|
Loading…
x
Reference in New Issue
Block a user