Nuovo invio telematico 770 2013
git-svn-id: svn://10.65.10.50/branches/R_10_00@22886 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
49e713ff12
commit
68f38a695b
@ -327,6 +327,10 @@ void TSchedaPercipienti::agg_pagamenti(const TRectype& sch, const TDate& pag_dal
|
|||||||
|
|
||||||
if (numreg > 0)
|
if (numreg > 0)
|
||||||
{
|
{
|
||||||
|
#ifdef DBG
|
||||||
|
if (numreg == 31723)
|
||||||
|
int cazzone = 1;
|
||||||
|
#endif
|
||||||
TPartite_array partarr;
|
TPartite_array partarr;
|
||||||
|
|
||||||
partarr.add_numreg(numreg);
|
partarr.add_numreg(numreg);
|
||||||
@ -363,7 +367,7 @@ void TSchedaPercipienti::agg_pagamenti(const TRectype& sch, const TDate& pag_dal
|
|||||||
if (row >= 0)
|
if (row >= 0)
|
||||||
{
|
{
|
||||||
TRiga_partite & rigapart = p->riga(row);
|
TRiga_partite & rigapart = p->riga(row);
|
||||||
int nrate = rigapart.rate();
|
const int nrate = rigapart.rate();
|
||||||
TDate datapag;
|
TDate datapag;
|
||||||
|
|
||||||
for (int r = 1; r <= nrate; r++)
|
for (int r = 1; r <= nrate; r++)
|
||||||
@ -377,12 +381,15 @@ void TSchedaPercipienti::agg_pagamenti(const TRectype& sch, const TDate& pag_dal
|
|||||||
|
|
||||||
for (int rowp = ratapart.last(); rowp > 0; rowp = ratapart.pred(rowp))
|
for (int rowp = ratapart.last(); rowp > 0; rowp = ratapart.pred(rowp))
|
||||||
{
|
{
|
||||||
const TRectype& pag = ratapart.row(rowp); // Riga pagamento
|
const TRectype& pag = ratapart.row(rowp); // Riga pagamento
|
||||||
|
|
||||||
const TRiga_partite& sum = p->riga(rowp); // Riga partite
|
const TRiga_partite& sum = p->riga(rowp); // Riga partite
|
||||||
const TDate sum_datapag = pag.get(PART_DATAPAG);
|
|
||||||
if (sum_datapag < pag_dal)
|
if (pag_dal.ok()) // Filtro opzionale su data pagamento
|
||||||
continue;
|
{
|
||||||
|
const TDate sum_datapag = sum.get(PART_DATAPAG);
|
||||||
|
if (sum_datapag < pag_dal)
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
const char sez = sum.sezione();
|
const char sez = sum.sezione();
|
||||||
TImporto imppag(sez, pag.get_real(PAGSCA_IMPORTO));
|
TImporto imppag(sez, pag.get_real(PAGSCA_IMPORTO));
|
||||||
|
@ -1170,8 +1170,11 @@ bool TRecord770::np_get_real(int pos, TString& key, real& val) const
|
|||||||
{
|
{
|
||||||
TString16 str;
|
TString16 str;
|
||||||
const bool ok = np_get(pos, key, str);
|
const bool ok = np_get(pos, key, str);
|
||||||
if (ok && !real::is_null(str))
|
if (ok && str.full())
|
||||||
|
{
|
||||||
|
str.replace(',', '.');
|
||||||
val = real(str);
|
val = real(str);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
val = ZERO;
|
val = ZERO;
|
||||||
return ok;
|
return ok;
|
||||||
@ -1463,6 +1466,17 @@ bool TTrasferimento770::riepiloga_ss(const TRecord770& rec, TArray& riep_ss) con
|
|||||||
riep_ss.add(r, idx);
|
riep_ss.add(r, idx);
|
||||||
}
|
}
|
||||||
*r += val;
|
*r += val;
|
||||||
|
} else
|
||||||
|
if (num >= 43 && num <= 48)
|
||||||
|
{
|
||||||
|
const int idx = num-43;
|
||||||
|
real* r = (real*)riep_ss.objptr(idx);
|
||||||
|
if (r == NULL)
|
||||||
|
{
|
||||||
|
r = new real;
|
||||||
|
riep_ss.add(r, idx);
|
||||||
|
}
|
||||||
|
*r -= val;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return !riep_ss.empty();
|
return !riep_ss.empty();
|
||||||
@ -1621,7 +1635,7 @@ bool TTrasferimento770::split(const char* path)
|
|||||||
if (val != NULL)
|
if (val != NULL)
|
||||||
{
|
{
|
||||||
TString8 code;
|
TString8 code;
|
||||||
code.format("SS003%03d", i+1); // i=0 -> SS0003001 -> AUXXX025
|
code.format("SS003%03d", i+1); // i=0 -> SS0003001 -> AUXXX026-AUXXX043
|
||||||
rec.np_put(code, *val);
|
rec.np_put(code, *val);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user