Patch level : 2.1 nopatch
Files correlati : ef0.exe Ricompilazione Demo : [ ] Commento : Corretta generazione effetti da EC, allineandolo alle richieste Cover a 16 bit git-svn-id: svn://10.65.10.50/trunk@11870 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
d5386bd82b
commit
e9d96eefd8
@ -249,7 +249,7 @@ void TEmissione::floppy()
|
|||||||
ribaini.overwrite("0", 2); // Elimino tipo pagamaneto
|
ribaini.overwrite("0", 2); // Elimino tipo pagamaneto
|
||||||
if (!ribaini.exist()) // se non esiste
|
if (!ribaini.exist()) // se non esiste
|
||||||
ribaini = "riba.ini"; // utilizzo quello generico
|
ribaini = "riba.ini"; // utilizzo quello generico
|
||||||
if (!ribaini.custom_path()) // se non esiste ancora!
|
if (!ribaini.custom_path()) // se non esiste ancora!
|
||||||
{
|
{
|
||||||
error_box(FR("Impossibile leggere il file %s"), (const char*)ribaini);
|
error_box(FR("Impossibile leggere il file %s"), (const char*)ribaini);
|
||||||
return;
|
return;
|
||||||
|
@ -31,11 +31,12 @@ protected:
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
bool calc_residual(const TRiga_scadenze& scad, real& impres, real& imppag,
|
bool calc_residual(const TRiga_scadenze& scad, real& impres, real& imppag,
|
||||||
char& accsal, int& rdist, int& reff, bool& partially_unassigned, int& tipopag) const;
|
char& accsal, int& rdist, int& reff,
|
||||||
bool fill_row(const TRiga_scadenze& rs, TToken_string& row, bool& partially_unassigned, bool force = FALSE);
|
bool& partially_unassigned, int& tipopag, bool is_old = false) const;
|
||||||
|
bool fill_row(const TRiga_scadenze& rs, TToken_string& row, bool& partially_unassigned, bool force, bool is_new);
|
||||||
bool fill_rate();
|
bool fill_rate();
|
||||||
int insert_row(const TToken_string& row);
|
int insert_row(const TToken_string& row);
|
||||||
bool fill_distinta(bool clear_all = FALSE);
|
bool fill_distinta(bool clear_all = false);
|
||||||
void sort_sheet();
|
void sort_sheet();
|
||||||
void update_total();
|
void update_total();
|
||||||
|
|
||||||
@ -54,7 +55,8 @@ public:
|
|||||||
bool TPE_mask::calc_residual(const TRiga_scadenze& scad,
|
bool TPE_mask::calc_residual(const TRiga_scadenze& scad,
|
||||||
real& impres, real& imppag,
|
real& impres, real& imppag,
|
||||||
char& accsal, int& rdist, int& reff,
|
char& accsal, int& rdist, int& reff,
|
||||||
bool& partially_unassigned, int& tipopag) const
|
bool& partially_unassigned, int& tipopag,
|
||||||
|
bool is_old) const
|
||||||
{
|
{
|
||||||
tipopag = scad.get_int(SCAD_TIPOPAG);
|
tipopag = scad.get_int(SCAD_TIPOPAG);
|
||||||
const bool valuta = scad.in_valuta();
|
const bool valuta = scad.in_valuta();
|
||||||
@ -126,10 +128,11 @@ bool TPE_mask::calc_residual(const TRiga_scadenze& scad,
|
|||||||
cur.freeze();
|
cur.freeze();
|
||||||
const TRectype& riga = cur.curr();
|
const TRectype& riga = cur.curr();
|
||||||
const TRectype& effe = cur.curr(LF_EFFETTI);
|
const TRectype& effe = cur.curr(LF_EFFETTI);
|
||||||
|
TString8 key = get(F_TIPODIST); key << get(F_DIST);
|
||||||
for (cur = 0L; cur.pos() < items; ++cur)
|
for (cur = 0L; cur.pos() < items; ++cur)
|
||||||
{
|
{
|
||||||
if (effe.get(EFF_TIPODIST) == get(F_TIPODIST) &&
|
TString8 effkey = effe.get(EFF_TIPODIST); effkey << effe.get(EFF_NDIST);
|
||||||
effe.get(EFF_NDIST) == get(F_DIST))
|
if (effkey == key)
|
||||||
{
|
{
|
||||||
rdist = effe.get_int(EFF_NRIGADIST);
|
rdist = effe.get_int(EFF_NRIGADIST);
|
||||||
reff = riga.get_int(REFF_NRIGATR);
|
reff = riga.get_int(REFF_NRIGATR);
|
||||||
@ -142,6 +145,8 @@ bool TPE_mask::calc_residual(const TRiga_scadenze& scad,
|
|||||||
if (riga.get_char(REFF_ACCSAL) == 'S')
|
if (riga.get_char(REFF_ACCSAL) == 'S')
|
||||||
{
|
{
|
||||||
impres = ZERO;
|
impres = ZERO;
|
||||||
|
if (is_old)
|
||||||
|
return true; // Devo farla vedere
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
impres -= riga.get_real(valuta ? REFF_IMPORTOVAL : REFF_IMPORTO);
|
impres -= riga.get_real(valuta ? REFF_IMPORTOVAL : REFF_IMPORTO);
|
||||||
@ -167,15 +172,16 @@ void TPE_mask::update_total()
|
|||||||
enable(DLG_SAVEREC);
|
enable(DLG_SAVEREC);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool TPE_mask::fill_row(const TRiga_scadenze& rs, TToken_string& row, bool& partially_unassigned, bool force)
|
bool TPE_mask::fill_row(const TRiga_scadenze& rs, TToken_string& row, bool& partially_unassigned, bool force, bool is_old)
|
||||||
{
|
{
|
||||||
const int tipopageff = get_int(F_TIPOPAGEFF);
|
const int tipopageff = get_int(F_TIPOPAGEFF);
|
||||||
int tipopag;
|
int tipopag;
|
||||||
real impres, imppag;
|
real impres, imppag;
|
||||||
char accsal; int rigadist, rigaeff;
|
char accsal; int rigadist, rigaeff;
|
||||||
row.cut(0);
|
row.cut(0);
|
||||||
bool ok = calc_residual(rs, impres, imppag, accsal, rigadist, rigaeff, partially_unassigned, tipopag) || force;
|
bool ok = calc_residual(rs, impres, imppag, accsal, rigadist, rigaeff, partially_unassigned, tipopag, is_old) || force;
|
||||||
ok = (ok && (tipopag == tipopageff || tipopageff == 0));
|
if (ok)
|
||||||
|
ok = tipopag == tipopageff || tipopageff == 0;
|
||||||
if (ok)
|
if (ok)
|
||||||
{
|
{
|
||||||
row.add(imppag.string());
|
row.add(imppag.string());
|
||||||
@ -193,15 +199,15 @@ bool TPE_mask::fill_row(const TRiga_scadenze& rs, TToken_string& row, bool& part
|
|||||||
row.add(rigaeff);
|
row.add(rigaeff);
|
||||||
switch (tipopag)
|
switch (tipopag)
|
||||||
{
|
{
|
||||||
case 1:row.add("Rimessa Diretta"); break;
|
case 1:row.add(TR("Rimessa Diretta")); break;
|
||||||
case 2:row.add("Tratta"); break;
|
case 2:row.add(TR("Tratta")); break;
|
||||||
case 3:row.add("Ricevuta Bancaria"); break;
|
case 3:row.add(TR("Ricevuta Bancaria")); break;
|
||||||
case 4:row.add("Cessione"); break;
|
case 4:row.add(TR("Cessione")); break;
|
||||||
case 5:row.add("Pagherò"); break;
|
case 5:row.add(TR("Pagherò")); break;
|
||||||
case 6:row.add("Lettera di credito"); break;
|
case 6:row.add(TR("Lettera di credito")); break;
|
||||||
case 7:row.add("Tratta accettata"); break;
|
case 7:row.add(TR("Tratta accettata")); break;
|
||||||
case 8:row.add("Rapporti interbancari diretti"); break;
|
case 8:row.add(TR("Rapporti interbancari diretti")); break;
|
||||||
case 9:row.add("Bonifico"); break;
|
case 9:row.add(TR("Bonifico")); break;
|
||||||
default: break;
|
default: break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -363,7 +369,7 @@ bool TPE_mask::fill_rate()
|
|||||||
if (data >= dadata && (!adata.ok() || data <= adata))
|
if (data >= dadata && (!adata.ok() || data <= adata))
|
||||||
{
|
{
|
||||||
bool partially_unassigned;
|
bool partially_unassigned;
|
||||||
if (fill_row(rs, row, partially_unassigned))
|
if (fill_row(rs, row, partially_unassigned, false, false))
|
||||||
{
|
{
|
||||||
const int numrow = sheet.items();
|
const int numrow = sheet.items();
|
||||||
sheet.row(numrow) = row;
|
sheet.row(numrow) = row;
|
||||||
@ -377,7 +383,7 @@ bool TPE_mask::fill_rate()
|
|||||||
} // for ogni fattura
|
} // for ogni fattura
|
||||||
} // for ogni partita
|
} // for ogni partita
|
||||||
} // if ci sono partite
|
} // if ci sono partite
|
||||||
return fill_distinta(FALSE);
|
return fill_distinta(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool TPE_mask::fill_distinta(bool clear_all)
|
bool TPE_mask::fill_distinta(bool clear_all)
|
||||||
@ -411,7 +417,7 @@ bool TPE_mask::fill_distinta(bool clear_all)
|
|||||||
{
|
{
|
||||||
TRiga_scadenze& rs = game.rata(nriga, nrata);
|
TRiga_scadenze& rs = game.rata(nriga, nrata);
|
||||||
bool partially_unassigned;
|
bool partially_unassigned;
|
||||||
if (fill_row(rs, row, partially_unassigned, dist_cont))
|
if (fill_row(rs, row, partially_unassigned, dist_cont, clear_all))
|
||||||
{
|
{
|
||||||
const int numrow = insert_row(row);
|
const int numrow = insert_row(row);
|
||||||
if (partially_unassigned)
|
if (partially_unassigned)
|
||||||
@ -786,7 +792,7 @@ bool TPE_mask::on_field_event(TOperable_field& o, TField_event e, long jolly)
|
|||||||
"per cui non è possibile modificarla", (const char*)ef.get());
|
"per cui non è possibile modificarla", (const char*)ef.get());
|
||||||
show(F_UNCONTABIL);
|
show(F_UNCONTABIL);
|
||||||
}
|
}
|
||||||
ok = fill_distinta(TRUE);
|
ok = fill_distinta(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
_is_new = !ok; // Memorizza se è una distinta nuova
|
_is_new = !ok; // Memorizza se è una distinta nuova
|
||||||
@ -915,7 +921,7 @@ bool TPE_mask::on_field_event(TOperable_field& o, TField_event e, long jolly)
|
|||||||
if (check_fields())
|
if (check_fields())
|
||||||
{
|
{
|
||||||
save_rate();
|
save_rate();
|
||||||
fill_distinta(TRUE);
|
fill_distinta(true);
|
||||||
disable(F_TIPOPAG);
|
disable(F_TIPOPAG);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user