Patch level : 10.0
Files correlati : fe0.exe Ricompilazione Demo : [ ] Commento : Corretta associazione indebita di note di variazione a fatture senza numero git-svn-id: svn://10.65.10.50/branches/R_10_00@22553 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
4bc5536405
commit
dd9ebf7152
@ -254,7 +254,7 @@ bool TContratto::init(const TRectype& rec)
|
||||
real importo = _rec.get("R0");
|
||||
if (importo <= ZERO)
|
||||
{
|
||||
importo = primo_anno > 2010 ? 3000 : 25000;
|
||||
importo = importo_limite(primo_anno);
|
||||
_rec.put("R0", importo);
|
||||
}
|
||||
}
|
||||
@ -396,7 +396,9 @@ TExclusion_mode TDati_rilevanti_array::add(const TRectype& alleg, bool send_all,
|
||||
new_mode = (imp < importo_limite(anno)) ? em_importo_limite : em_incluso;
|
||||
}
|
||||
if (ignora != new_mode)
|
||||
{
|
||||
((TRectype&)alleg).put(ALL_IGNORA, ignora = new_mode);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -552,6 +554,7 @@ TExclusion_mode TDati_rilevanti_msk::segnala_movimento(const TRectype& mov, TExc
|
||||
msg.format(FR("Mov. %7ld %s %s: "), numreg,
|
||||
tipocf=='F' ? TR("For.") : TR("Cli."), (const char*)a.ragione_sociale());
|
||||
msg << mode2string(motivo);
|
||||
msg.strip_double_spaces();
|
||||
_log->log(1, msg);
|
||||
}
|
||||
}
|
||||
@ -775,12 +778,14 @@ bool TDati_rilevanti_msk::controlla_mov(TRectype& mrec) const
|
||||
{
|
||||
msg.format(FR("Nota n. %ld di %s associata al doc. %s del %s"),
|
||||
numreg, (const char*)a.ragione_sociale(), (const char*)numrett, datarett.string());
|
||||
msg.strip_double_spaces();
|
||||
_log->log(0, msg);
|
||||
}
|
||||
else
|
||||
{
|
||||
msg.format(FR("Nota n. %ld di %s non associata ad una fattura"),
|
||||
numreg, (const char*)a.ragione_sociale());
|
||||
msg.strip_double_spaces();
|
||||
_log->log(1, msg);
|
||||
}
|
||||
}
|
||||
@ -797,6 +802,15 @@ bool TDati_rilevanti_msk::controlla_mov(TRectype& mrec) const
|
||||
mrec.zero(MOV_NUMRETT);
|
||||
update = true; // Peccato veniale
|
||||
}
|
||||
|
||||
if (mrec.get(MOV_NUMDOC).blank() || mrec.get(MOV_DATADOC).blank())
|
||||
{
|
||||
const TAnagrafica a(mrec);
|
||||
TString msg;
|
||||
msg.format(FR("Movimento n. %ld di %s privo di numero o data documento"),
|
||||
numreg, (const char*)a.ragione_sociale());
|
||||
_log->log(1, msg);
|
||||
}
|
||||
}
|
||||
if (old_modpag != new_modpag)
|
||||
{
|
||||
@ -806,6 +820,7 @@ bool TDati_rilevanti_msk::controlla_mov(TRectype& mrec) const
|
||||
TString msg;
|
||||
msg.format(FR("Movimento n. %ld di %s con modalità di pagamento incongruente: %d->%d"),
|
||||
numreg, (const char*)a.ragione_sociale(), old_modpag, new_modpag);
|
||||
msg.strip_double_spaces();
|
||||
_log->log(0, msg);
|
||||
}
|
||||
mrec.put(MOV_MODPAG, new_modpag);
|
||||
@ -1001,8 +1016,8 @@ void TDati_rilevanti_msk::collega_variazioni() const
|
||||
{
|
||||
const int anno = get_int(F_ANNO);
|
||||
TString query;
|
||||
query << "USE ALLEG KEY 2 SELECT IGNORA<=" << int(em_importo_limite);
|
||||
query << "\nJOIN ALLEG KEY 3 ALIAS 220 INTO ANNO=ANNO TIPOCF=TIPOCF CODCF==CODCF NUMRETT=NUMDOC";
|
||||
query << "USE ALLEG KEY 2 SELECT (STR(IGNORA<=" << int(em_importo_limite) << "))&&(NUMDOC!=\"\")";
|
||||
query << "\nJOIN ALLEG KEY 3 ALIAS 220 INTO ANNO=ANNO TIPOCF=TIPOCF CODCF==CODCF NUMRETT==NUMDOC";
|
||||
query << "\nFROM ANNO=" << anno << "\nTO ANNO=" << anno;
|
||||
TISAM_recordset fatture(query);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user