Patch level :2.2 172
Files correlati :stampa rendiconto Ricompilazione Demo : [ ] Commento : Aggiornate le maschere di tutti i programmi sfruttando i metodi in calib02. Sistemato report rendiconto secondo nuove adolfiche richieste. sistemata stampa mastrini: adesso stampa più di una commessa ed i casi particolari (ancora da aggiornare il caso dei soli movimentati). git-svn-id: svn://10.65.10.50/trunk@13334 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
78395f3bca
commit
0ffb4993aa
111
ca/ca3100.cpp
111
ca/ca3100.cpp
@ -9,11 +9,12 @@
|
||||
#include "ca3100.h"
|
||||
#include "calib01.h"
|
||||
#include "calib02.h"
|
||||
#include "camask.h"
|
||||
|
||||
////////////////////////////////////////////////////////
|
||||
// MASCHERA
|
||||
////////////////////////////////////////////////////////
|
||||
class TPrint_movimenti_ca_mask : public TAutomask
|
||||
class TPrint_movimenti_ca_mask : public TAnal_report_mask
|
||||
{
|
||||
protected:
|
||||
bool on_field_event(TOperable_field& o, TField_event e, long jolly);
|
||||
@ -117,113 +118,9 @@ bool TPrint_movimenti_ca_mask::on_field_event(TOperable_field& o, TField_event e
|
||||
return true;
|
||||
}
|
||||
|
||||
int TPrint_movimenti_ca_mask::create_page2_sheet(int lf, int& y, short& dlg, bool required)
|
||||
{
|
||||
TSheet_field& sf = sfield(F_RIGHE);
|
||||
TMask& sm = sf.sheet_mask();
|
||||
|
||||
const int h = ca_create_fields(sm, 0, lf, 1, y, dlg, dlg+50);
|
||||
|
||||
for (int i = 0; i < h; i++)
|
||||
{
|
||||
TEdit_field& fld = sm.efield(dlg+i);
|
||||
int logic = lf;
|
||||
if (logic == LF_FASI)
|
||||
{
|
||||
const TMultilevel_code_info& fasinfo = ca_multilevel_code_info(LF_FASI);
|
||||
if (fasinfo.parent() != 0)
|
||||
{
|
||||
const TMultilevel_code_info& parinfo = ca_multilevel_code_info(fasinfo.parent());
|
||||
if (i < parinfo.levels())
|
||||
logic = fasinfo.parent();
|
||||
}
|
||||
}
|
||||
|
||||
const char* fieldname = NULL;
|
||||
switch(logic)
|
||||
{
|
||||
case LF_CDC : fieldname = RMOVANA_CODCCOSTO; break;
|
||||
case LF_COMMESSE: fieldname = RMOVANA_CODCMS; break;
|
||||
case LF_FASI : fieldname = RMOVANA_CODFASE; break;
|
||||
default : fieldname = RMOVANA_CODCONTO; break;
|
||||
}
|
||||
TFieldref* f = (TFieldref*)fld.field();
|
||||
f->set_name(fieldname);
|
||||
|
||||
fld.check_type(required ? CHECK_REQUIRED : CHECK_NORMAL);
|
||||
|
||||
TEdit_field& dfld = sm.efield(dlg+50+i);
|
||||
dfld.set_field(EMPTY_STRING); // Toglie campi che fan saltare gli output!
|
||||
}
|
||||
|
||||
y += h+1;
|
||||
dlg += h;
|
||||
|
||||
return h;
|
||||
}
|
||||
|
||||
void TPrint_movimenti_ca_mask::create_page2()
|
||||
{
|
||||
TSheet_field& sf = sfield(F_RIGHE);
|
||||
TMask& sm = sf.sheet_mask();
|
||||
sm.hide(-1);
|
||||
|
||||
const TMultilevel_code_info& fasinfo = ca_multilevel_code_info(LF_FASI);
|
||||
|
||||
TConfig_anal ini;
|
||||
const bool fsc_req = ini.get_bool("FscRequired");
|
||||
|
||||
int y = 1;
|
||||
short dlg = S_CDC1 + 100; // id del primo campo da generare
|
||||
|
||||
for (int i = 0; i < 2; i++)
|
||||
{
|
||||
const TString& level = ini.get("Level", NULL, i+1); // Legge il livello 1 o 2
|
||||
if (level == "CDC") // Crea centro di costo
|
||||
{
|
||||
if (fasinfo.parent() == LF_CDC)
|
||||
create_page2_sheet(LF_FASI, y, dlg, fsc_req);
|
||||
else
|
||||
{
|
||||
const bool cdc_req = ini.get_bool("CdcRequired");
|
||||
create_page2_sheet(LF_CDC, y, dlg, cdc_req);
|
||||
}
|
||||
} else
|
||||
if (level == "CMS") // Crea commessa
|
||||
{
|
||||
if (fasinfo.parent() == LF_COMMESSE)
|
||||
create_page2_sheet(LF_FASI, y, dlg, fsc_req);
|
||||
else
|
||||
{
|
||||
const bool cms_req = ini.get_bool("CmsRequired");
|
||||
create_page2_sheet(LF_COMMESSE, y, dlg, cms_req);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (fasinfo.levels() > 0 && fasinfo.parent() <= 0)
|
||||
create_page2_sheet(LF_FASI, y, dlg, fsc_req);
|
||||
|
||||
for (short id = S_CDC12+100; id >= S_CDC1+100; id--)
|
||||
{
|
||||
const int pos = sm.id2pos(id);
|
||||
if (pos >= 0)
|
||||
{
|
||||
TMask_field& f = sm.fld(pos);
|
||||
const int size = f.size();
|
||||
const TString& prompt = f.prompt();
|
||||
sf.set_column_header(id, prompt);
|
||||
sf.set_column_justify(id, f.is_kind_of(CLASS_REAL_FIELD));
|
||||
sf.set_column_width(id, (max(3+size, prompt.len()+1)) * CHARX);
|
||||
}
|
||||
else
|
||||
sf.delete_column(id);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
TPrint_movimenti_ca_mask::TPrint_movimenti_ca_mask()
|
||||
:TAutomask("ca3100")
|
||||
:TAnal_report_mask("ca3100")
|
||||
{
|
||||
TConfig_anal cfg;
|
||||
const bool use_pdcc = cfg.get_bool("UsePdcc");
|
||||
@ -231,7 +128,7 @@ TPrint_movimenti_ca_mask::TPrint_movimenti_ca_mask()
|
||||
const int logicnum = use_pdcc ? LF_PCON : LF_PCONANA;
|
||||
|
||||
// creazione dei campi della seconda pagina della maschera
|
||||
create_page2();
|
||||
create_sheet(F_RIGHE);
|
||||
}
|
||||
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
#include "ca3100.h"
|
||||
#include "camask.h"
|
||||
|
||||
TOOLBAR "" 0 -3 0 3
|
||||
|
||||
|
286
ca/ca3200.cpp
286
ca/ca3200.cpp
@ -13,18 +13,18 @@
|
||||
#include "ca3200.h"
|
||||
#include "calib01.h"
|
||||
#include "calib02.h"
|
||||
#include "camask.h"
|
||||
|
||||
////////////////////////////////////////////////////////
|
||||
// MASCHERA
|
||||
////////////////////////////////////////////////////////
|
||||
class TPrint_mastrini_ca_mask : public TAutomask
|
||||
class TPrint_mastrini_ca_mask : public TAnal_report_mask
|
||||
{
|
||||
protected:
|
||||
bool on_field_event(TOperable_field& o, TField_event e, long jolly);
|
||||
const TString& get_report_class() const;
|
||||
bool test_compatible_report();
|
||||
void create_page2();
|
||||
int create_page2_sheet(int lf, int& y, short& dlg, bool required);
|
||||
|
||||
public:
|
||||
TPrint_mastrini_ca_mask();
|
||||
virtual ~TPrint_mastrini_ca_mask() {}
|
||||
@ -115,120 +115,16 @@ bool TPrint_mastrini_ca_mask::on_field_event(TOperable_field& o, TField_event e,
|
||||
return true;
|
||||
}
|
||||
|
||||
int TPrint_mastrini_ca_mask::create_page2_sheet(int lf, int& y, short& dlg, bool required)
|
||||
{
|
||||
TSheet_field& sf = sfield(F_RIGHE);
|
||||
TMask& sm = sf.sheet_mask();
|
||||
|
||||
const int h = ca_create_fields(sm, 0, lf, 1, y, dlg, dlg+50);
|
||||
|
||||
for (int i = 0; i < h; i++)
|
||||
{
|
||||
TEdit_field& fld = sm.efield(dlg+i);
|
||||
int logic = lf;
|
||||
if (logic == LF_FASI)
|
||||
{
|
||||
const TMultilevel_code_info& fasinfo = ca_multilevel_code_info(LF_FASI);
|
||||
if (fasinfo.parent() != 0)
|
||||
{
|
||||
const TMultilevel_code_info& parinfo = ca_multilevel_code_info(fasinfo.parent());
|
||||
if (i < parinfo.levels())
|
||||
logic = fasinfo.parent();
|
||||
}
|
||||
}
|
||||
|
||||
const char* fieldname = NULL;
|
||||
switch(logic)
|
||||
{
|
||||
case LF_CDC : fieldname = RMOVANA_CODCCOSTO; break;
|
||||
case LF_COMMESSE: fieldname = RMOVANA_CODCMS; break;
|
||||
case LF_FASI : fieldname = RMOVANA_CODFASE; break;
|
||||
default : fieldname = RMOVANA_CODCONTO; break;
|
||||
}
|
||||
TFieldref* f = (TFieldref*)fld.field();
|
||||
f->set_name(fieldname);
|
||||
|
||||
fld.check_type(required ? CHECK_REQUIRED : CHECK_NORMAL);
|
||||
|
||||
TEdit_field& dfld = sm.efield(dlg+50+i);
|
||||
dfld.set_field(EMPTY_STRING); // Toglie campi che fan saltare gli output!
|
||||
}
|
||||
|
||||
y += h+1;
|
||||
dlg += h;
|
||||
|
||||
return h;
|
||||
}
|
||||
|
||||
void TPrint_mastrini_ca_mask::create_page2()
|
||||
{
|
||||
TSheet_field& sf = sfield(F_RIGHE);
|
||||
TMask& sm = sf.sheet_mask();
|
||||
sm.hide(-1);
|
||||
|
||||
const TMultilevel_code_info& fasinfo = ca_multilevel_code_info(LF_FASI);
|
||||
|
||||
TConfig_anal ini;
|
||||
const bool fsc_req = ini.get_bool("FscRequired");
|
||||
|
||||
int y = 1;
|
||||
short dlg = S_CDC1 + 100; // id del primo campo da generare
|
||||
|
||||
for (int i = 0; i < 2; i++)
|
||||
{
|
||||
const TString& level = ini.get("Level", NULL, i+1); // Legge il livello 1 o 2
|
||||
if (level == "CDC") // Crea centro di costo
|
||||
{
|
||||
if (fasinfo.parent() == LF_CDC)
|
||||
create_page2_sheet(LF_FASI, y, dlg, fsc_req);
|
||||
else
|
||||
{
|
||||
const bool cdc_req = ini.get_bool("CdcRequired");
|
||||
create_page2_sheet(LF_CDC, y, dlg, cdc_req);
|
||||
}
|
||||
} else
|
||||
if (level == "CMS") // Crea commessa
|
||||
{
|
||||
if (fasinfo.parent() == LF_COMMESSE)
|
||||
create_page2_sheet(LF_FASI, y, dlg, fsc_req);
|
||||
else
|
||||
{
|
||||
const bool cms_req = ini.get_bool("CmsRequired");
|
||||
create_page2_sheet(LF_COMMESSE, y, dlg, cms_req);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (fasinfo.levels() > 0 && fasinfo.parent() <= 0)
|
||||
create_page2_sheet(LF_FASI, y, dlg, fsc_req);
|
||||
|
||||
for (short id = S_CDC12+100; id >= S_CDC1+100; id--)
|
||||
{
|
||||
const int pos = sm.id2pos(id);
|
||||
if (pos >= 0)
|
||||
{
|
||||
TMask_field& f = sm.fld(pos);
|
||||
const int size = f.size();
|
||||
const TString& prompt = f.prompt();
|
||||
sf.set_column_header(id, prompt);
|
||||
sf.set_column_justify(id, f.is_kind_of(CLASS_REAL_FIELD));
|
||||
sf.set_column_width(id, (max(3+size, prompt.len()+1)) * CHARX);
|
||||
}
|
||||
else
|
||||
sf.delete_column(id);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
TPrint_mastrini_ca_mask::TPrint_mastrini_ca_mask()
|
||||
:TAutomask("ca3200")
|
||||
:TAnal_report_mask("ca3200")
|
||||
{
|
||||
TConfig_anal cfg;
|
||||
const bool use_pdcc = cfg.get_bool("UsePdcc");
|
||||
|
||||
const int logicnum = use_pdcc ? LF_PCON : LF_PCONANA;
|
||||
const int nfields = ca_create_fields(*this, 0, logicnum, 2, 4, F_CDC1_INI, F_DES1_INI, 0x0, "#DACONTO");
|
||||
ca_create_fields(*this, 0, logicnum, 2, 10, F_CDC1_FIN, F_DES1_FIN, 0x0, "#ACONTO");
|
||||
const int nfields = ca_create_fields(*this, 1, logicnum, 2, 4, F_CDC1_INI, F_DES1_INI, 0x0, "#DACONTO");
|
||||
ca_create_fields(*this, 1, logicnum, 2, 10, F_CDC1_FIN, F_DES1_FIN, 0x0, "#ACONTO");
|
||||
|
||||
for (int i = 0; i < nfields; i++)
|
||||
{
|
||||
@ -240,7 +136,7 @@ TPrint_mastrini_ca_mask::TPrint_mastrini_ca_mask()
|
||||
aconto.check_type(CHECK_NORMAL);
|
||||
}
|
||||
// creazione dei campi della seconda pagina della maschera
|
||||
create_page2();
|
||||
create_sheet(F_RIGHE);
|
||||
}
|
||||
|
||||
|
||||
@ -325,10 +221,17 @@ void TPrint_mastrini_ca_recordset::set_custom_filter(TCursor& cur) const
|
||||
{
|
||||
//filtro sui conti selezionati sulla maschera
|
||||
TRectype darec(cur.curr()), arec(cur.curr()); //record corrente (rmovana (solo movimentati))
|
||||
darec.put(RMOVANA_CODCONTO, _daconto);
|
||||
darec.put(RMOVANA_DATACOMP, _dadata);
|
||||
arec.put(RMOVANA_CODCONTO, _aconto);
|
||||
arec.put(RMOVANA_DATACOMP, _adata);
|
||||
|
||||
if (_daconto.not_empty())
|
||||
darec.put(RMOVANA_CODCONTO, _daconto);
|
||||
if (_dadata.ok())
|
||||
darec.put(RMOVANA_DATACOMP, _dadata);
|
||||
|
||||
if (_aconto.not_empty())
|
||||
arec.put(RMOVANA_CODCONTO, _aconto);
|
||||
if (_adata.ok())
|
||||
arec.put(RMOVANA_DATACOMP, _adata);
|
||||
|
||||
cur.setregion(darec, arec);
|
||||
|
||||
myself = this;
|
||||
@ -496,106 +399,83 @@ void TPrint_mastrini_ca_alternative_recordset::set_filter(const TPrint_mastrini_
|
||||
_tipoconti = msk.get_int(F_TIPOCONTI);
|
||||
|
||||
//scandisce il piano dei conti analitico creando un cursore con i conti nell'intervallo scelto sulla maschera
|
||||
TRelation rel_pconana(LF_PCONANA);
|
||||
TPconana_recordset pconana;
|
||||
|
||||
pconana.set_filter(' ', _daconto, _aconto, _codcosto, _codcms, _codfas,
|
||||
_dadata, _adata, _tipimov, _tipoconti==1, _tipoconti==2);
|
||||
|
||||
TRectype daconto(LF_PCONANA);
|
||||
daconto.put(PCONANA_CODCONTO, _daconto);
|
||||
TRectype aconto(LF_PCONANA);
|
||||
aconto.put(PCONANA_CODCONTO, _aconto);
|
||||
|
||||
//solo i gr/co/sottoc completi interessano!!!
|
||||
int contolen = 0;
|
||||
const TMultilevel_code_info& info = ca_multilevel_code_info(LF_PCONANA);
|
||||
for (int l = info.levels()-1; l >= 0; l--)
|
||||
contolen += info.len(l);
|
||||
|
||||
TString filtro;
|
||||
filtro << "LEN(CODCONTO)==" << contolen;
|
||||
|
||||
TCursor cur_pconana(&rel_pconana, filtro, 1, &daconto, &aconto);
|
||||
const long pconana_items = cur_pconana.items();
|
||||
cur_pconana.freeze();
|
||||
const long pconana_items = pconana.items();
|
||||
TProgind pi(pconana_items, "Scansione conti...");
|
||||
|
||||
TRelation rel_rmovana(LF_RMOVANA);
|
||||
rel_rmovana.add(LF_MOVANA, "NUMREG==NUMREG"); //aggiunge le testate x avere i tipi mov.
|
||||
|
||||
TRectype da_rmovana(LF_RMOVANA);
|
||||
da_rmovana.put(RMOVANA_DATACOMP, _dadata);
|
||||
TRectype a_rmovana(LF_RMOVANA);
|
||||
a_rmovana.put(RMOVANA_DATACOMP, _adata);
|
||||
|
||||
TString filtro;
|
||||
if (_codcosto.not_empty())
|
||||
filtro << "(" << RMOVANA_CODCCOSTO << "==\"" << _codcosto << "\")";
|
||||
if (_codcms.not_empty())
|
||||
{
|
||||
if (filtro.not_empty())
|
||||
filtro << "&&";
|
||||
filtro << "(" << RMOVANA_CODCMS << "==\"" << _codcms << "\")";
|
||||
}
|
||||
if (_codfas.not_empty())
|
||||
{
|
||||
if (filtro.not_empty())
|
||||
filtro << "&&";
|
||||
filtro << "(" << RMOVANA_CODFASE << "==\"" << _codfas << "\")";
|
||||
}
|
||||
|
||||
//scandisce il piano dei conti..
|
||||
for (cur_pconana = 0; cur_pconana.pos() < pconana_items; ++cur_pconana)
|
||||
for (TRecnotype j = 0; pconana.move_to(j); j++)
|
||||
{
|
||||
pi.addstatus(1);
|
||||
TRectype& current_pconana_rec = cur_pconana.curr();
|
||||
const TString conto = current_pconana_rec.get(PCONANA_CODCONTO);
|
||||
const TString& conto = pconana.get(PCONANA_CODCONTO).as_string();
|
||||
|
||||
bool aggiungi = true;
|
||||
if (_tipoconti == 2) //se si è scelto di stampare solo quelli con saldo != 0...
|
||||
//..crea un cursore su rmovana per vedere se i conti selezionati hanno veri movimenti che soddisfano
|
||||
//i parametri del filtro sulla maschera
|
||||
da_rmovana.put(RMOVANA_CODCONTO, conto);
|
||||
a_rmovana.put(RMOVANA_CODCONTO, conto);
|
||||
|
||||
TCursor cur_rmovana(&rel_rmovana, filtro, 2, &da_rmovana, &a_rmovana);
|
||||
const long rmovana_items = cur_rmovana.items();
|
||||
cur_rmovana.freeze();
|
||||
bool almeno_uno_aggiunto = false;
|
||||
if (rmovana_items > 0)
|
||||
{
|
||||
const TImporto& saldo_fin = saldo_finale(conto);
|
||||
aggiungi = !saldo_fin.is_zero();
|
||||
}
|
||||
if (aggiungi) //se il conto va aggiunto (casi: conti con saldo !=0 trovato, tutti i conti comunque)..
|
||||
{
|
||||
TRelation rel_rmovana(LF_RMOVANA);
|
||||
rel_rmovana.add(LF_MOVANA, "NUMREG==NUMREG"); //aggiunge le testate x avere i tipi mov.
|
||||
|
||||
//..crea un cursore su rmovana per vedere se i conti selezionati hanno veri movimenti che soddisfano
|
||||
//i parametri del filtro sulla maschera
|
||||
TRectype da_rmovana(LF_RMOVANA);
|
||||
da_rmovana.put(RMOVANA_CODCONTO, conto);
|
||||
da_rmovana.put(RMOVANA_DATACOMP, _dadata);
|
||||
TRectype a_rmovana(LF_RMOVANA);
|
||||
a_rmovana.put(RMOVANA_CODCONTO, conto);
|
||||
a_rmovana.put(RMOVANA_DATACOMP, _adata);
|
||||
|
||||
TString filtro;
|
||||
if (_codcosto.not_empty())
|
||||
filtro << "(" << RMOVANA_CODCCOSTO << "==\"" << _codcosto << "\")";
|
||||
if (_codcms.not_empty())
|
||||
for (cur_rmovana = 0; cur_rmovana.pos() < rmovana_items; ++cur_rmovana)
|
||||
{
|
||||
if (filtro.not_empty())
|
||||
filtro << "&&";
|
||||
filtro << "(" << RMOVANA_CODCMS << "==\"" << _codcms << "\")";
|
||||
}
|
||||
if (_codfas.not_empty())
|
||||
{
|
||||
if (filtro.not_empty())
|
||||
filtro << "&&";
|
||||
filtro << "(" << RMOVANA_CODFASE << "==\"" << _codfas << "\")";
|
||||
}
|
||||
|
||||
TCursor cur_rmovana(&rel_rmovana, filtro, 2, &da_rmovana, &a_rmovana);
|
||||
const long rmovana_items = cur_rmovana.items();
|
||||
cur_rmovana.freeze();
|
||||
bool almeno_uno_aggiunto = false;
|
||||
if (rmovana_items > 0)
|
||||
{
|
||||
for (cur_rmovana = 0; cur_rmovana.pos() < rmovana_items; ++cur_rmovana)
|
||||
//deve coincidere anche il tipomov! sarebbe stato troppo semplice...
|
||||
const char tipomov = rel_rmovana.curr(LF_MOVANA).get_char(MOVANA_TIPOMOV);
|
||||
int tipomov_int = 0;
|
||||
switch (tipomov)
|
||||
{
|
||||
//deve coincidere anche il tipomov! sarebbe stato troppo semplice...
|
||||
const char tipomov = rel_rmovana.curr(LF_MOVANA).get_char(MOVANA_TIPOMOV);
|
||||
int tipomov_int = 0;
|
||||
switch (tipomov)
|
||||
{
|
||||
case 'P': tipomov_int = 2; break;
|
||||
case 'V': tipomov_int = 4; break;
|
||||
default: tipomov_int = 1; break;
|
||||
}
|
||||
if ((_tipimov & tipomov_int) != 0)
|
||||
{
|
||||
_tmp_rmovana->write(cur_rmovana.curr()); // aggiunge i record al file temporaneo
|
||||
almeno_uno_aggiunto = true;
|
||||
}
|
||||
case 'P': tipomov_int = 2; break;
|
||||
case 'V': tipomov_int = 4; break;
|
||||
default: tipomov_int = 1; break;
|
||||
}
|
||||
if ((_tipimov & tipomov_int) != 0)
|
||||
{
|
||||
_tmp_rmovana->write(cur_rmovana.curr()); // aggiunge i record al file temporaneo
|
||||
almeno_uno_aggiunto = true;
|
||||
}
|
||||
}
|
||||
//se non ha aggiunto nemmeno un record valido..
|
||||
//crea un record di rmovana con il solo conto,datacomp e lo aggiunge al file temporaneo
|
||||
if (!almeno_uno_aggiunto)
|
||||
{
|
||||
TRectype fake_rmovana_rec(LF_RMOVANA);
|
||||
fake_rmovana_rec.put(RMOVANA_CODCONTO, conto);
|
||||
fake_rmovana_rec.put(RMOVANA_DATACOMP, _dadata);
|
||||
_tmp_rmovana->write(fake_rmovana_rec);
|
||||
}
|
||||
}
|
||||
//se non ha aggiunto nemmeno un record valido..
|
||||
//crea un record di rmovana con il solo conto,datacomp e lo aggiunge al file temporaneo
|
||||
if (!almeno_uno_aggiunto)
|
||||
{
|
||||
TRectype fake_rmovana_rec(LF_RMOVANA);
|
||||
fake_rmovana_rec.put(RMOVANA_CODCONTO, conto);
|
||||
fake_rmovana_rec.put(RMOVANA_DATACOMP, _dadata);
|
||||
_tmp_rmovana->write(fake_rmovana_rec);
|
||||
}
|
||||
|
||||
} //end if aggiungi
|
||||
|
||||
} //end for su pconana_items
|
||||
|
||||
}
|
||||
@ -621,6 +501,8 @@ 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)
|
||||
{
|
||||
TReport::set_recordset(NULL); //forza azzeramento file anal.dbf prima di ricostruirlo
|
||||
|
||||
const int tipoconti = msk.get_int(F_TIPOCONTI);
|
||||
|
||||
TPrint_mastrini_ca_recordset* recset = NULL;
|
||||
|
@ -1,4 +1,5 @@
|
||||
#include "ca3200.h"
|
||||
#include "camask.h"
|
||||
|
||||
TOOLBAR "" 0 -3 0 3
|
||||
|
||||
@ -21,6 +22,27 @@ END
|
||||
|
||||
ENDPAGE
|
||||
|
||||
PAGE "Selezioni" -1 -1 78 20
|
||||
|
||||
SPREADSHEET F_RIGHE -1 -2
|
||||
BEGIN
|
||||
PROMPT 0 2 ""
|
||||
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
|
||||
|
||||
PAGE "Parametri stampa" -1 -1 78 20
|
||||
|
||||
NUMBER F_CODDITTA 5
|
||||
@ -123,27 +145,6 @@ END
|
||||
|
||||
ENDPAGE
|
||||
|
||||
PAGE "Selezioni" -1 -1 78 20
|
||||
|
||||
SPREADSHEET F_RIGHE -1 -2
|
||||
BEGIN
|
||||
PROMPT 0 2 ""
|
||||
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
|
||||
|
@ -318,7 +318,6 @@ void TPrint_rendiconto_ca_recordset::set_custom_filter(TCursor& cur) const
|
||||
cur.setfilter(filtro);
|
||||
|
||||
myself = (TPrint_rendiconto_ca_recordset*)this;
|
||||
//cur.set_filterfunction(mov_filter, true);
|
||||
}
|
||||
|
||||
//metodo per il calcolo del budget PREVENTIVO o VARIAZIONE (sezione di raggruppamento sul report)
|
||||
@ -537,14 +536,14 @@ void TPrint_rendiconto_ca_recordset::scrive_riga(const TRectype& rmovana, const
|
||||
codnum_desc = movana.get(MOVANA_DCODNUM); //serve anche in fondo al metodo
|
||||
tmpcurr.put("CODNUM", codnum_desc); //codnum del documento che origina il movana
|
||||
tmpcurr.put("ANNO", movana.get(MOVANA_DANNO)); //anno del doc di origine
|
||||
tmpcurr.put("NUMRD", movana.get(MOVANA_DNDOC)); //
|
||||
tmpcurr.put("NUMRD", movana.get(MOVANA_DNDOC)); //numero del doc che origina movana
|
||||
tmpcurr.put("DATA", newdoc->get(DOC_DATADOC)); //data del documento che genera movana..
|
||||
} //..non esiste il campo in movana
|
||||
else //movimento normale (senza documento)
|
||||
{
|
||||
tmpcurr.put("CODNUM", movana.get(MOVANA_CODCAUS)); //mette la causale del movimento
|
||||
tmpcurr.put("ANNO", movana.get(MOVANA_ANNOES)); //anno del movimento
|
||||
tmpcurr.put("NUMRD", movana.get(MOVANA_NUMREG)); //numreg del movana
|
||||
tmpcurr.put("NUMRD", movana.get(MOVANA_NUMREGCG)); //numregcg del movana
|
||||
tmpcurr.put("DATA", movana.get(MOVANA_DATACOMP)); //data del movana
|
||||
}
|
||||
|
||||
@ -619,7 +618,7 @@ F=IMF*/
|
||||
selettore = FATTURATO;
|
||||
selettore |= MATURATO;
|
||||
selettore |= IMPEGNATO;
|
||||
}
|
||||
} //if(newdoc != NULL)
|
||||
|
||||
//****modificare il metodo per accelerare
|
||||
const char sezione = rmovana.get_char(RMOVANA_SEZIONE);
|
||||
@ -636,7 +635,12 @@ F=IMF*/
|
||||
if (tipoiva == iva_acquisti)
|
||||
sezione_normale = 'D';
|
||||
else
|
||||
sezione_normale = 'D'; //questo in preparazione di casi futuri
|
||||
{
|
||||
if (caus.sezione_clifo() == 'D')
|
||||
sezione_normale = 'A';
|
||||
else
|
||||
sezione_normale = 'D';
|
||||
}
|
||||
|
||||
imp.normalize(sezione_normale);
|
||||
|
||||
@ -656,6 +660,8 @@ F=IMF*/
|
||||
descr.ltrim(pos+1);
|
||||
descr.trim();
|
||||
}
|
||||
|
||||
tmpcurr.put("NUMREG", rmovana.get(RMOVANA_NUMREG));
|
||||
tmpcurr.put("DESC", descr); //descrizione movana
|
||||
tmpcurr.put("NRIGA", rmovana.get(RMOVANA_NUMRIG)); //numero riga
|
||||
tmpcurr.put("DESCRIGA", rmovana.get(RMOVANA_DESCR)); //descrizione rmovana
|
||||
@ -892,12 +898,13 @@ void TPrint_rendiconto_ca_recordset::crea_trr(const TFilename& trr) const
|
||||
{
|
||||
ofstream of(trr);
|
||||
of << 1000 << endl;
|
||||
of << 15 << endl;
|
||||
of << 16 << endl;
|
||||
of << "CONTO|1|20|0|Conto analitico" << endl;
|
||||
of << "CODNUM|1|4|0|Numerazione documento" << endl;
|
||||
of << "DATA|5|8|0|Data movimento o documento" << endl;
|
||||
of << "NUMRD|3|7|0|Numero registrazione o documento" << endl;
|
||||
of << "NUMRD|3|7|0|Numero registrazione contabile o numero documento di origine" << endl;
|
||||
of << "NRIGA|2|3|0|Riga movimento o documento" << endl;
|
||||
of << "NUMREG|3|7|0|Numero registrazione del movimento analitico" << endl;
|
||||
of << "ANNO|9|4|0|Anno" << endl;
|
||||
of << "NUMDOCRIF|1|7|0|Numero documento riferimento" << endl;
|
||||
of << "DATADOCRIF|5|8|0|Data documento riferimento" << endl;
|
||||
|
16
ca/ca3700.h
16
ca/ca3700.h
@ -2,13 +2,13 @@
|
||||
#define __CA3700_H
|
||||
|
||||
//pagina 1
|
||||
#define F_CODDITTA 251
|
||||
#define F_RAGSOC 252
|
||||
#define F_DATASTAMPA 253
|
||||
#define F_ANNO 254
|
||||
#define F_REPORT 255
|
||||
#define F_DATAINI 256
|
||||
#define F_DATAFIN 257
|
||||
#define F_CODDITTA 251
|
||||
#define F_RAGSOC 252
|
||||
#define F_DATASTAMPA 253
|
||||
#define F_ANNO 254
|
||||
#define F_REPORT 255
|
||||
#define F_DATAINI 256
|
||||
#define F_DATAFIN 257
|
||||
|
||||
//campi generati dai piani dei conti
|
||||
#define F_PIANO 319
|
||||
@ -45,7 +45,7 @@
|
||||
#define F_PANDES4_FIN 368
|
||||
|
||||
//sheet di pagina 2
|
||||
#define F_RIGHE 260
|
||||
#define F_RIGHE 260
|
||||
|
||||
#endif // __CA3700_H
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
#include "ca3700.h"
|
||||
#include "camask.h"
|
||||
|
||||
TOOLBAR "" 0 -3 0 3
|
||||
|
||||
|
@ -15,21 +15,22 @@
|
||||
<source>#REPORT.PAGE</source>
|
||||
</field>
|
||||
<field border="2" x="1" y="2" type="Linea" width="169" height="0" pattern="1" />
|
||||
<field x="31" y="2.5" type="Testo" width="23" pattern="1" text="Doc. clienteF;fornitore" />
|
||||
<field x="109" y="2.5" type="Testo" align="center" width="12" pattern="1" text="Riferimento" />
|
||||
<field x="39" y="2.5" type="Testo" width="23" pattern="1" text="Doc. clienteF;fornitore" />
|
||||
<field x="117" y="2.5" type="Testo" align="center" width="12" pattern="1" text="Riferimento" />
|
||||
<field x="141" y="2.5" type="Testo" width="25" pattern="1" text="Avanzamento costiF;ricavi" />
|
||||
<field x="20" y="3.5" type="Testo" align="center" width="11" pattern="1" text="Data" />
|
||||
<field x="31" y="3.5" type="Testo" align="center" width="6" pattern="1" text="Numero" />
|
||||
<field x="41" y="3.5" type="Testo" align="center" width="10" pattern="1" text="Data" />
|
||||
<field x="51" y="3.5" type="Testo" width="25" pattern="1" text="Descrizione testata" />
|
||||
<field x="77" y="3.5" type="Testo" width="4" pattern="1" text="Riga" />
|
||||
<field x="82" y="3.5" type="Testo" width="15" pattern="1" text="Descrizione riga" />
|
||||
<field x="109" y="3.5" type="Testo" align="center" width="12" pattern="1" text="OrdineF;Bolla" />
|
||||
<field x="123" y="3.5" type="Testo" align="right" width="15" pattern="1" text="Fatturato" />
|
||||
<field x="139" y="3.5" type="Testo" align="right" width="15" pattern="1" text="Maturato" />
|
||||
<field x="155" y="3.5" type="Testo" align="right" width="15" pattern="1" text="Impegnato" />
|
||||
<field x="18.5" y="3.5" type="Testo" width="7" pattern="1" text="N. Reg." />
|
||||
<field x="27" y="3.5" type="Testo" align="center" width="11" pattern="1" text="Data" />
|
||||
<field x="38" y="3.5" type="Testo" align="center" width="6" pattern="1" text="Numero" />
|
||||
<field x="47" y="3.5" type="Testo" align="center" width="10" pattern="1" text="Data" />
|
||||
<field x="59" y="3.5" type="Testo" width="25" pattern="1" text="Descrizione testata" />
|
||||
<field x="85" y="3.5" type="Testo" width="4" pattern="1" text="Riga" />
|
||||
<field x="90" y="3.5" type="Testo" width="15" pattern="1" text="Descrizione riga" />
|
||||
<field x="117" y="3.5" type="Testo" align="center" width="12" pattern="1" text="OrdineF;Bolla" />
|
||||
<field x="132" y="3.5" type="Testo" align="right" width="12" pattern="1" text="Fatturato" />
|
||||
<field x="145" y="3.5" type="Testo" align="right" width="12" pattern="1" text="Maturato" />
|
||||
<field x="158" y="3.5" type="Testo" align="right" width="12" pattern="1" text="Impegnato" />
|
||||
<field border="1" x="1" y="4.5" type="Linea" width="169" height="0" pattern="1" />
|
||||
<field x="1" y="3.5" type="Testo" width="20" id="121" pattern="1" text="Riferimento Contabile" />
|
||||
<field x="1" y="3.5" type="Testo" width="15" id="121" pattern="1" text="Rif. Contabile" />
|
||||
</section>
|
||||
<section type="Head" level="1" height="11">
|
||||
<prescript description="H1 PRESCRIPT">MESSAGE RESET,F1.101
|
||||
@ -174,36 +175,39 @@ MESSAGE RESET,F2.103</prescript>
|
||||
</section>
|
||||
<section type="Body" />
|
||||
<section type="Body" level="1">
|
||||
<field x="20" type="Data" width="10" pattern="1">
|
||||
<field x="19" type="Stringa" width="7" pattern="1">
|
||||
<source>NUMREG</source>
|
||||
</field>
|
||||
<field x="28" type="Data" width="10" pattern="1">
|
||||
<source>DATA</source>
|
||||
</field>
|
||||
<field x="31" type="Stringa" width="7" pattern="1">
|
||||
<field x="39" type="Stringa" width="7" pattern="1">
|
||||
<source>NUMDOCRIF</source>
|
||||
</field>
|
||||
<field x="40" type="Data" width="10" pattern="1">
|
||||
<field x="48" type="Data" width="10" pattern="1">
|
||||
<source>DATADOCRIF</source>
|
||||
</field>
|
||||
<field x="51" type="Stringa" dynamic_height="1" width="25" height="2" pattern="1">
|
||||
<field x="59" type="Stringa" dynamic_height="1" width="25" height="2" pattern="1">
|
||||
<source>DESC</source>
|
||||
</field>
|
||||
<field x="78" type="Numero" align="right" width="3" pattern="1">
|
||||
<field x="86" type="Numero" align="right" width="3" pattern="1">
|
||||
<source>NRIGA</source>
|
||||
</field>
|
||||
<field x="82" type="Stringa" dynamic_height="1" width="25" height="2" pattern="1">
|
||||
<field x="90" type="Stringa" dynamic_height="1" width="25" height="2" pattern="1">
|
||||
<source>DESCRIGA</source>
|
||||
</field>
|
||||
<field x="108" type="Stringa" align="right" dynamic_height="1" width="14" height="2" pattern="1">
|
||||
<field x="116" type="Stringa" align="right" dynamic_height="1" width="14" height="2" pattern="1">
|
||||
<source>DOCORIG</source>
|
||||
</field>
|
||||
<field x="123" type="Valuta" align="right" width="15" pattern="1" text="###.###.###,@@">
|
||||
<field x="132" type="Valuta" align="right" width="12" pattern="1" text="###.###.###,@@">
|
||||
<source>FATTURATO</source>
|
||||
<postscript description="B1.0 POSTSCRIPT">MESSAGE ADD,F2.101</postscript>
|
||||
</field>
|
||||
<field x="139" type="Valuta" align="right" width="15" pattern="1" text="###.###.###,@@">
|
||||
<field x="145" type="Valuta" align="right" width="12" pattern="1" text="###.###.###,@@">
|
||||
<source>MATURATO</source>
|
||||
<postscript description="B1.0 POSTSCRIPT">MESSAGE ADD,F2.102</postscript>
|
||||
</field>
|
||||
<field x="155" type="Valuta" align="right" width="15" pattern="1" text="###.###.###,@@">
|
||||
<field x="158" type="Valuta" align="right" width="12" pattern="1" text="###.###.###,@@">
|
||||
<source>IMPEGNATO</source>
|
||||
<postscript description="B1.0 POSTSCRIPT">MESSAGE ADD,F2.103</postscript>
|
||||
</field>
|
||||
@ -243,37 +247,36 @@ MESSAGE RESET,F2.103</prescript>
|
||||
<section type="Foot" level="1" />
|
||||
<section type="Foot" level="2" height="4">
|
||||
<field border="1" x="1" y="0.5" type="Linea" width="169" height="0" pattern="1" />
|
||||
<field x="81" y="1" type="Testo" width="42" pattern="1" text="Totale fatturato, maturato, impegnato E;E;E;">
|
||||
<field x="90" y="1" type="Testo" width="42" pattern="1" text="Totale fatturato, maturato, impegnato E;E;E;">
|
||||
<font face="Courier New" bold="1" size="8" />
|
||||
</field>
|
||||
<field x="81" y="2.5" type="Testo" width="42" pattern="1" text="Da fatturare, maturare, impegnare E;E;E;">
|
||||
<field x="90" y="2.5" type="Testo" width="42" pattern="1" text="Da fatturare, maturare, impegnare E;E;E;">
|
||||
<font face="Courier New" bold="1" size="8" />
|
||||
</field>
|
||||
<field x="123" y="1" type="Valuta" align="right" width="15" id="101" pattern="1" text="###.###.###,@@">
|
||||
<field x="132" y="1" type="Valuta" align="right" width="12" id="101" pattern="1" text="###.###.###,@@">
|
||||
<font face="Courier New" bold="1" size="8" />
|
||||
</field>
|
||||
<field x="139" y="1" type="Valuta" align="right" width="15" id="102" pattern="1" text="###.###.###,@@">
|
||||
<field x="145" y="1" type="Valuta" align="right" width="12" id="102" pattern="1" text="###.###.###,@@">
|
||||
<font face="Courier New" bold="1" size="8" />
|
||||
</field>
|
||||
<field x="155" y="1" type="Valuta" align="right" width="15" id="103" pattern="1" text="###.###.###,@@">
|
||||
<field x="158" y="1" type="Valuta" align="right" width="12" id="103" pattern="1" text="###.###.###,@@">
|
||||
<font face="Courier New" bold="1" size="8" />
|
||||
</field>
|
||||
<field x="123" y="2.5" type="Valuta" align="right" width="15" id="201" pattern="1" text="###.###.###,@@">
|
||||
<field x="132" y="2.5" type="Valuta" align="right" width="12" id="201" pattern="1" text="###.###.###,@@">
|
||||
<font face="Courier New" bold="1" size="8" />
|
||||
<source>#103-#101</source>
|
||||
</field>
|
||||
<field x="139" y="2.5" type="Valuta" align="right" width="15" id="202" pattern="1" text="###.###.###,@@">
|
||||
<field x="145" y="2.5" type="Valuta" align="right" width="12" id="202" pattern="1" text="###.###.###,@@">
|
||||
<font face="Courier New" bold="1" size="8" />
|
||||
<source>#103-#102</source>
|
||||
</field>
|
||||
<field x="155" y="2.5" type="Valuta" align="right" width="15" id="203" pattern="1" text="###.###.###,@@">
|
||||
<field x="158" y="2.5" type="Valuta" align="right" width="12" id="203" pattern="1" text="###.###.###,@@">
|
||||
<font face="Courier New" bold="1" size="8" />
|
||||
<source>#H2.103-#103</source>
|
||||
</field>
|
||||
</section>
|
||||
<section type="Foot" level="3">
|
||||
<prescript description="F3 PRESCRIPT">0
|
||||
#B1.100 !</prescript>
|
||||
<prescript description="F3 PRESCRIPT">0 #B1.100 !</prescript>
|
||||
</section>
|
||||
<sql>USE 1000</sql>
|
||||
</report>
|
@ -2,6 +2,7 @@
|
||||
|
||||
#include "calib01.h"
|
||||
#include "calib02.h"
|
||||
#include "camask.h"
|
||||
|
||||
#include "../cg/cglib01.h"
|
||||
|
||||
|
15
ca/calib02.h
15
ca/calib02.h
@ -132,21 +132,6 @@ public: // meglio pubic?
|
||||
// TAnal_rapport_mask
|
||||
///////////////////////////////////////////////////////////
|
||||
|
||||
//elementi dello sheet di selezione CdC/Cms/Fas
|
||||
#define S_CDC1 101
|
||||
#define S_CDC2 102
|
||||
#define S_CDC3 103
|
||||
#define S_CDC4 104
|
||||
#define S_CDC5 105
|
||||
#define S_CDC6 106
|
||||
#define S_CDC7 107
|
||||
#define S_CDC8 108
|
||||
#define S_CDC9 109
|
||||
#define S_CDC10 110
|
||||
#define S_CDC11 111
|
||||
#define S_CDC12 112
|
||||
|
||||
|
||||
class TAnal_report_mask : public TAutomask
|
||||
{
|
||||
protected:
|
||||
|
13
ca/camask.h
Executable file
13
ca/camask.h
Executable file
@ -0,0 +1,13 @@
|
||||
//elementi dello sheet di selezione CdC/Cms/Fas
|
||||
#define S_CDC1 101
|
||||
#define S_CDC2 102
|
||||
#define S_CDC3 103
|
||||
#define S_CDC4 104
|
||||
#define S_CDC5 105
|
||||
#define S_CDC6 106
|
||||
#define S_CDC7 107
|
||||
#define S_CDC8 108
|
||||
#define S_CDC9 109
|
||||
#define S_CDC10 110
|
||||
#define S_CDC11 111
|
||||
#define S_CDC12 112
|
Loading…
x
Reference in New Issue
Block a user