Patch level : 10.1030

Files correlati     :  ve0.exe ve2.exe mg1.exe mg3.exe mg4.exe db0.exe
Ricompilazione Demo : [ ]
Commento            :

Bug 	0001879: 208494 - richiamo distinta effetti passivi

in caso richiamo distinta effetti passivi: il tipo distinta riporta attivo; se si seleziona per aggiornare la distinta le righe della distinta già selezionate vengono visualizzate doppie e l'importo totale in fondo cambia di conseguenza.

Il cliente presscolor inoltre chiede che la stampa richiamata dal bottone stampa sia quella per esempio per distinta e non quella dell'emissione effetti/distinte.
il bottone stampa e uno solo penso sia meglio che chiami l'emissione piuttosto che una stampa di controllo


git-svn-id: svn://10.65.10.50/branches/R_10_00@22283 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
alex 2011-06-17 14:26:55 +00:00
parent 3daa9722f9
commit 43a5648aec

View File

@ -36,8 +36,8 @@ protected:
public:
bool calc_residual(const TRiga_scadenze& scad, real& impres, real& imppag, TDate & datapag, bool & valben,
char& accsal, int& rdist, int& reff,
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& partially_unassigned, int& tipopag, bool is_old = false, int ndist = 0) const;
bool fill_row(const TRiga_scadenze& rs, TToken_string& row, bool& partially_unassigned, bool force, bool is_new, int ndist = 0);
bool fill_rate();
int insert_row(const TToken_string& row);
bool fill_distinta(bool clear_all = false);
@ -85,7 +85,7 @@ bool TPE_mask::calc_residual(const TRiga_scadenze& scad,
real& impres, real& imppag, TDate & datapag, bool & valben,
char& accsal, int& rdist, int& reff,
bool& partially_unassigned, int& tipopag,
bool is_old) const
bool is_old, int ndist) const
{
tipopag = scad.get_int(SCAD_TIPOPAG);
const bool valuta = scad.in_valuta();
@ -161,7 +161,7 @@ bool TPE_mask::calc_residual(const TRiga_scadenze& scad,
for (cur = 0L; cur.pos() < items; ++cur)
{
TString8 effkey = effe.get(EFF_TIPODIST); effkey << effe.get(EFF_NDIST);
if (effkey == key)
if (effkey == key && (ndist == 0 || ndist != effe.get_int(EFF_NDIST)))
{
rdist = effe.get_int(EFF_NRIGADIST);
datapag = effe.get_date(EFF_DATASCAD);
@ -200,7 +200,7 @@ void TPE_mask::update_total()
enable(DLG_SAVEREC, !tot.is_zero());
}
bool TPE_mask::fill_row(const TRiga_scadenze& rs, TToken_string& row, bool& partially_unassigned, bool force, bool is_old)
bool TPE_mask::fill_row(const TRiga_scadenze& rs, TToken_string& row, bool& partially_unassigned, bool force, bool is_old, int ndist)
{
const int tipopageff = get_int(F_TIPOPAGEFF);
int tipopag = 0;
@ -211,7 +211,7 @@ bool TPE_mask::fill_row(const TRiga_scadenze& rs, TToken_string& row, bool& part
const bool attivo = get(F_TIPOCF) == "C";
row.cut(0);
bool ok = calc_residual(rs, impres, imppag, datapag, valben, accsal, rigadist, rigaeff, partially_unassigned, tipopag, is_old) || force;
bool ok = calc_residual(rs, impres, imppag, datapag, valben, accsal, rigadist, rigaeff, partially_unassigned, tipopag, is_old, ndist) || force;
if (ok)
ok = tipopageff == 0 || tipopag == tipopageff; // Eventuale filtro sul tipo pagamento
if (ok)
@ -443,9 +443,10 @@ bool TPE_mask::fill_rate()
{
const TDate data = rs.get(SCAD_DATASCAD);
if (data >= dadata && (!adata.ok() || data <= adata))
{
{
bool partially_unassigned;
if (fill_row(rs, row, partially_unassigned, false, false))
if (fill_row(rs, row, partially_unassigned, false, false, ndist))
{
const int numrow = sheet.items();
sheet.row(numrow) = row;
@ -952,7 +953,11 @@ bool TPE_mask::on_field_event(TOperable_field& o, TField_event e, long jolly)
_is_new = !ok; // Memorizza se è una distinta nuova
enable(-3, _is_new); // Abilita tipo, cliente, valuta, ecc., solo se nuova
enable(F_TIPOPAG, _is_new);
disable(F_AGGIORNA);
if (!_is_new)
{
set(F_TIPOEFF, get(F_TIPOCF));
disable(F_TIPOEFF);
}
}
break;
case F_CODVAL:
@ -1101,15 +1106,6 @@ bool TPE_mask::on_field_event(TOperable_field& o, TField_event e, long jolly)
}
}
break;
case F_CLIFO:
case F_DA_DATA:
case F_A_DATA:
if (e == fe_modify)
{
if (get(F_CLIFO).not_empty() || get(F_DA_DATA).not_empty() || get(F_A_DATA).not_empty())
enable(F_AGGIORNA);
}
break;
case F_DATAPAG:
if (e == fe_close)
{