Patch level : 10.0 426 (no eudora)
Files correlati : sc2.exe sc3.exe Ricompilazione Demo : [ ] Commento Stampa dei codici di analitica sugli estratti conto e solleciti git-svn-id: svn://10.65.10.50/trunk@19357 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
2158702d51
commit
cb700e75f9
@ -1310,6 +1310,93 @@ bool TAnal_app::user_destroy()
|
|||||||
// TAnal_mov
|
// TAnal_mov
|
||||||
///////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
const char * TAnal_mov::row_anal_code(int logicnum, int row) const
|
||||||
|
{
|
||||||
|
const TMultilevel_code_info & c = ca_multilevel_code_info(logicnum);
|
||||||
|
const int levels = c.levels();
|
||||||
|
TString & code = get_tmp_string();
|
||||||
|
|
||||||
|
for (int i = 0; i < levels; i++)
|
||||||
|
{
|
||||||
|
TFieldref fr = c.fieldref(i);
|
||||||
|
|
||||||
|
if (fr.name() == "CODCOSTO")
|
||||||
|
fr.set_name(RMOVANA_CODCCOSTO);
|
||||||
|
if (logicnum == LF_FASI && fr.name() == "CODCMSFAS")
|
||||||
|
continue;
|
||||||
|
|
||||||
|
const TString & s = fr.read(body()[row]);
|
||||||
|
|
||||||
|
if (s.full())
|
||||||
|
{
|
||||||
|
if (code.full())
|
||||||
|
code << " ";
|
||||||
|
code << s;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return code;
|
||||||
|
}
|
||||||
|
|
||||||
|
const char * TAnal_mov::row_code(int row) const
|
||||||
|
{
|
||||||
|
const TMultilevel_code_info & fasi = ca_multilevel_code_info(LF_FASI);
|
||||||
|
TConfig& cfg = ca_config();
|
||||||
|
bool fase_added = false;
|
||||||
|
const TString16 codfase(row_anal_code(LF_FASI, row));
|
||||||
|
bool fase_to_add = codfase.full();
|
||||||
|
TString code;
|
||||||
|
|
||||||
|
for (int i = 0; i < 2; i++)
|
||||||
|
{
|
||||||
|
const TString& level = cfg.get("Level", NULL, i+1); // Legge il livello 1 o 2
|
||||||
|
|
||||||
|
if (level == "CDC") // Crea centro di costo
|
||||||
|
{
|
||||||
|
const TString & codcdc = row_anal_code(LF_CDC, row);
|
||||||
|
|
||||||
|
if (codcdc.full())
|
||||||
|
{
|
||||||
|
if (code.full())
|
||||||
|
code << " ";
|
||||||
|
code << codcdc;
|
||||||
|
}
|
||||||
|
if (fase_to_add && fasi.parent() == LF_CDC)
|
||||||
|
{
|
||||||
|
if (code.full())
|
||||||
|
code << " ";
|
||||||
|
code << codfase;
|
||||||
|
fase_to_add = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
if (level == "CMS") // Crea centro di costo
|
||||||
|
{
|
||||||
|
const TString & codcms = row_anal_code(LF_COMMESSE, row);
|
||||||
|
|
||||||
|
if (codcms.full())
|
||||||
|
{
|
||||||
|
if (code.full())
|
||||||
|
code << " ";
|
||||||
|
code << codcms;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (fase_to_add && fasi.parent() == LF_COMMESSE)
|
||||||
|
{
|
||||||
|
if (code.full())
|
||||||
|
code << " ";
|
||||||
|
code << codfase;
|
||||||
|
fase_to_add = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (fase_to_add)
|
||||||
|
{
|
||||||
|
if (code.full())
|
||||||
|
code << " ";
|
||||||
|
code << codfase;
|
||||||
|
}
|
||||||
|
return get_tmp_string() = code;
|
||||||
|
}
|
||||||
void TAnal_mov::saldo_set_reset(const TRectype& row, bool reset)
|
void TAnal_mov::saldo_set_reset(const TRectype& row, bool reset)
|
||||||
{
|
{
|
||||||
const int dec = TCurrency::get_firm_dec();
|
const int dec = TCurrency::get_firm_dec();
|
||||||
|
@ -158,7 +158,10 @@ public:
|
|||||||
public:
|
public:
|
||||||
int read(long numreg, word lockop = _nolock); // Funzione read di comodo
|
int read(long numreg, word lockop = _nolock); // Funzione read di comodo
|
||||||
void update_totdoc();
|
void update_totdoc();
|
||||||
TAnal_mov(long numreg = 0);
|
const char * row_anal_code(int logicnum, int i) const;
|
||||||
|
const char * row_code(int i) const;
|
||||||
|
|
||||||
|
TAnal_mov(long numreg = 0);
|
||||||
TAnal_mov(const TRectype& rec); //accetta LF_MOVANA,LF_RMOVANA,LF_MOV
|
TAnal_mov(const TRectype& rec); //accetta LF_MOVANA,LF_RMOVANA,LF_MOV
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user