Patch level : 12.0 946
Files correlati : sc0.exe Commento : Aggiunta la possibiltà di pareggiare anche note di credito parzialmente pagate
This commit is contained in:
parent
721523e796
commit
1eaa83d9c6
@ -27,7 +27,6 @@ protected:
|
|||||||
public:
|
public:
|
||||||
bool init(const TBill& bill, const TString& valuta, bool nc, int stato); // Stato: 1=aperte; 2=chiuse; 0 o 3 = tutte
|
bool init(const TBill& bill, const TString& valuta, bool nc, int stato); // Stato: 1=aperte; 2=chiuse; 0 o 3 = tutte
|
||||||
TPartita& partita(const TRectype& rec) const;
|
TPartita& partita(const TRectype& rec) const;
|
||||||
bool is_lonely_pag(const TRectype& rec) const;
|
|
||||||
const TRectype* node2rec(const TString& id);
|
const TRectype* node2rec(const TString& id);
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -36,24 +35,6 @@ TPartita& TPareggio_tree::partita(const TRectype& rec) const
|
|||||||
return ((TPartite_array&)_games).partita(rec);
|
return ((TPartite_array&)_games).partita(rec);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Controlla se rec è una riga di tipo nota credito non associata a nessuna scadenza in una partita a sè stante
|
|
||||||
bool TPareggio_tree::is_lonely_pag(const TRectype& rec) const
|
|
||||||
{
|
|
||||||
const tipo_movimento tm = (tipo_movimento)rec.get_int(PART_TIPOMOV);
|
|
||||||
if (tm == tm_fattura)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
const TPartita& part = partita(rec);
|
|
||||||
for (int r = part.last(); r > 0; r = part.pred(r))
|
|
||||||
{
|
|
||||||
const tipo_movimento tm = part.riga(r).tipo();
|
|
||||||
if (tm <= tm_fattura || tm >= tm_insoluto)
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
const TRectype* TPareggio_tree::node2rec(const TString& id)
|
const TRectype* TPareggio_tree::node2rec(const TString& id)
|
||||||
{
|
{
|
||||||
const TRectype* rec = NULL;
|
const TRectype* rec = NULL;
|
||||||
@ -285,7 +266,7 @@ bool TPareggio_tree::init(const TBill& bill, const TString& valuta, bool nc, int
|
|||||||
{
|
{
|
||||||
const int nriga = rec.get_int(PART_NRIGA);
|
const int nriga = rec.get_int(PART_NRIGA);
|
||||||
const TPartita& game = partita(rec);
|
const TPartita& game = partita(rec);
|
||||||
add_riga = ((TPartita&)game).unassigned().exist(nriga) && is_lonely_pag(rec);
|
add_riga = ((TPartita&)game).unassigned().exist(nriga);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user