cglib02.h Aggiunta classe base e distruttore all'oggetto TSaldo
cglib04.cpp Corretto trasferimento righe iva da PC cgprassi.men Aggiunta eliminazione zoppi MI3692 cgsaldac.cpp Implementato metodo TPartita::elimina_pagamento cgsaldac.h Aggiunto metodo TPartita::elimina_pagamento git-svn-id: svn://10.65.10.50/trunk@6365 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
69a6fa10f6
commit
11285fc803
@ -62,7 +62,7 @@ public:
|
|||||||
enum tipobil { DataLimite=1, UltimaImmissione };
|
enum tipobil { DataLimite=1, UltimaImmissione };
|
||||||
enum tiposal { normale, apertura, chiusura };
|
enum tiposal { normale, apertura, chiusura };
|
||||||
|
|
||||||
class TSaldo
|
class TSaldo : public TObject
|
||||||
{
|
{
|
||||||
TLocalisamfile _saldi;
|
TLocalisamfile _saldi;
|
||||||
|
|
||||||
@ -127,6 +127,7 @@ public:
|
|||||||
// bool prg_mov_eliminati(int i,TConto& c,int d, real& p1, real& p2);
|
// bool prg_mov_eliminati(int i,TConto& c,int d, real& p1, real& p2);
|
||||||
|
|
||||||
TSaldo();
|
TSaldo();
|
||||||
|
virtual ~TSaldo() { }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -509,9 +509,8 @@ bool TTransfer_file::read_control_rec()
|
|||||||
|
|
||||||
_control_rec->cut(sizeH);
|
_control_rec->cut(sizeH);
|
||||||
|
|
||||||
#ifdef DBG
|
if (_control_rec->len() > sizeH)
|
||||||
if (_control_rec->len() > sizeH) error_box("Non e' possibile allocare una stringa di %d in una stringa fissa di %d caratteri", _control_rec->len(),sizeH);
|
NFCHECK("Non e' possibile allocare una stringa di %d in una stringa fissa di %d caratteri", _control_rec->len(),sizeH);
|
||||||
#endif
|
|
||||||
|
|
||||||
_tiporec = _control_rec->sub(0,2);
|
_tiporec = _control_rec->sub(0,2);
|
||||||
|
|
||||||
@ -1305,7 +1304,7 @@ void TTransfer_file::write_tmp_tabelle(TString& record, bool create)
|
|||||||
//Quando ricevo la IV direttiva del piano dei conti per evitare che nell'archivio,
|
//Quando ricevo la IV direttiva del piano dei conti per evitare che nell'archivio,
|
||||||
//in caso di numero romano vuoto, venga memorizzato la stringa letta sul trasfer ("000"),
|
//in caso di numero romano vuoto, venga memorizzato la stringa letta sul trasfer ("000"),
|
||||||
//vuoto la stringa prima di fare la put.
|
//vuoto la stringa prima di fare la put.
|
||||||
if (sigla == "P2" || sigla == "P3" || sigla == "P1")
|
if (sigla == "P1" || sigla == "P2" || sigla == "P3")
|
||||||
{
|
{
|
||||||
if (fname == "GRUPPO")
|
if (fname == "GRUPPO")
|
||||||
{
|
{
|
||||||
@ -1344,6 +1343,11 @@ void TTransfer_file::write_tmp_tabelle(TString& record, bool create)
|
|||||||
if (field == " ")
|
if (field == " ")
|
||||||
field = "0";
|
field = "0";
|
||||||
}
|
}
|
||||||
|
if (fname == "IVACOMP") // MI3695
|
||||||
|
{
|
||||||
|
if (field == "00")
|
||||||
|
field = "";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
dep->put(fname, (const char*)field);
|
dep->put(fname, (const char*)field);
|
||||||
@ -3373,6 +3377,7 @@ void TTransfer_file::scrivi_clifo(long nrec)
|
|||||||
delete _prog;
|
delete _prog;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Scrive piano dei conti da SISTEMA
|
||||||
void TTransfer_file::scrivi_pcon(long nrec)
|
void TTransfer_file::scrivi_pcon(long nrec)
|
||||||
{
|
{
|
||||||
const word size = 256;
|
const word size = 256;
|
||||||
@ -4457,6 +4462,7 @@ void TTransfer_file::write_righe_contabili(TString& record)
|
|||||||
_prog->addstatus(1);
|
_prog->addstatus(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Scrive righe iva per ricezione PC
|
||||||
void TTransfer_file::write_righe_IVA(TString& record)
|
void TTransfer_file::write_righe_IVA(TString& record)
|
||||||
{
|
{
|
||||||
TString sigla,key;
|
TString sigla,key;
|
||||||
@ -4464,24 +4470,25 @@ void TTransfer_file::write_righe_IVA(TString& record)
|
|||||||
TMappa_trc& trc = mappa();
|
TMappa_trc& trc = mappa();
|
||||||
int gruppo;
|
int gruppo;
|
||||||
|
|
||||||
sigla = record.mid(0,2);
|
long nreg = 0;
|
||||||
key.format("%2s%d", (const char*)sigla,numfield);
|
int nriga = 1;
|
||||||
|
|
||||||
_depriva->zero();
|
_depriva->zero();
|
||||||
|
|
||||||
if (trc.is_key((const char *) key))
|
sigla = record.mid(0,2);
|
||||||
{
|
key.format("%2s%d", (const char*)sigla,numfield);
|
||||||
do
|
|
||||||
|
while (trc.is_key(key))
|
||||||
{
|
{
|
||||||
int from = trc.from(key);
|
int from = trc.from(key);
|
||||||
int to = trc.to(key);
|
int to = trc.to(key);
|
||||||
|
int logic = trc.logicnum(key);
|
||||||
TString fname = trc.field_name(key);
|
TString fname = trc.field_name(key);
|
||||||
TString field = record.sub(from-1,to);
|
TString field = record.sub(from-1,to);
|
||||||
int flag = trc.flag(key);
|
int flag = trc.flag(key);
|
||||||
int dec = trc.flag_bis(key);
|
int dec = trc.flag_bis(key);
|
||||||
|
|
||||||
TRecfield campo (*_depriva,fname);
|
if (logic == LF_RMOVIVA && _depriva->type(fname) == _realfld)
|
||||||
if (campo.type() == _realfld)
|
|
||||||
{
|
{
|
||||||
TString sign,importo;
|
TString sign,importo;
|
||||||
|
|
||||||
@ -4520,7 +4527,7 @@ void TTransfer_file::write_righe_IVA(TString& record)
|
|||||||
}
|
}
|
||||||
if (fname == RMI_NUMRIG)
|
if (fname == RMI_NUMRIG)
|
||||||
{
|
{
|
||||||
int nriga = atoi(field);
|
nriga = atoi(field);
|
||||||
field.format("%3d", nriga);
|
field.format("%3d", nriga);
|
||||||
}
|
}
|
||||||
if (fname == RMI_GRUPPO)
|
if (fname == RMI_GRUPPO)
|
||||||
@ -4546,19 +4553,31 @@ void TTransfer_file::write_righe_IVA(TString& record)
|
|||||||
|
|
||||||
if (fname == RMI_NUMREG)
|
if (fname == RMI_NUMREG)
|
||||||
{
|
{
|
||||||
long nreg = atol(field);
|
nreg = atol(field);
|
||||||
field.format("%7ld", nreg);
|
field.format("%7ld", nreg);
|
||||||
_depriva->put(RMI_ANNOES, _annoes);
|
_depriva->put(RMI_ANNOES, _annoes);
|
||||||
_depriva->put(RMI_NUMREG, field);
|
_depriva->put(RMI_NUMREG, field);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
|
if (logic == LF_RMOVIVA)
|
||||||
_depriva->put(fname, field);
|
_depriva->put(fname, field);
|
||||||
|
|
||||||
|
// Devo trasferire un campo che in realta' e in testata
|
||||||
|
if (logic == LF_RMOV && nriga == 1 && field.not_empty())
|
||||||
|
{
|
||||||
|
_tmov->put(MOV_NUMREG, nreg);
|
||||||
|
if (_tmov->read() == NOERR)
|
||||||
|
{
|
||||||
|
_tmov->put(fname, field);
|
||||||
|
_tmov->rewrite();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
numfield++;
|
numfield++;
|
||||||
key.format("%2s%d", (const char*) sigla,numfield);
|
key.format("%2s%d", (const char*) sigla,numfield);
|
||||||
}
|
}
|
||||||
while (trc.is_key((const char*) key));
|
|
||||||
}
|
|
||||||
|
|
||||||
_triva->zero();
|
_triva->zero();
|
||||||
_triva->curr() = *_depriva;
|
_triva->curr() = *_depriva;
|
||||||
|
@ -169,10 +169,11 @@ Item_02 = "Ripristino stampa registri", "cg5 -4", "F"
|
|||||||
Item_03 = "Aggiornamento Tipo Conto", "cg1 -2 T", "FP"
|
Item_03 = "Aggiornamento Tipo Conto", "cg1 -2 T", "FP"
|
||||||
Item_04 = "Aggiornamento Tipo Att. su mov.IVA", "cg1 -2 A", "FP"
|
Item_04 = "Aggiornamento Tipo Att. su mov.IVA", "cg1 -2 A", "FP"
|
||||||
Item_05 = "Aggiornamento flag op.Intrac.", "cg1 -2 I", "FP"
|
Item_05 = "Aggiornamento flag op.Intrac.", "cg1 -2 I", "FP"
|
||||||
Item_06 = "Rinumerazione n° Protocollo", "cg1 -2 P", "FP"
|
Item_06 = "Rinumerazione n. Protocollo", "cg1 -2 P", "FP"
|
||||||
Item_07 = "Aggiornamento Codice Attivita'", "cg1 -2 C", "FP"
|
Item_07 = "Aggiornamento Codice Attivita'", "cg1 -2 C", "FP"
|
||||||
Item_08 = "Riorganizzazione codici esercizio", "cg1 -2 E", "FP"
|
Item_08 = "Riorganizzazione codici esercizio", "cg1 -2 E", "FP"
|
||||||
Item_09 = "Collegamento bilanci", [PRASSICG_025]
|
Item_09 = "Ricerca righe prima nota errate", "cg1 -2 Z", "FP"
|
||||||
|
Item_10 = "Collegamento bilanci", [PRASSICG_025]
|
||||||
|
|
||||||
[PRASSICG_019]
|
[PRASSICG_019]
|
||||||
Caption = "Invio"
|
Caption = "Invio"
|
||||||
|
@ -1245,6 +1245,30 @@ bool TPartita::esiste(int nriga, int nrata, int nrigp) const
|
|||||||
return scad.exist(nrigp); // Cerca pagamento vero e proprio
|
return scad.exist(nrigp); // Cerca pagamento vero e proprio
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool TPartita::elimina_pagamento(int nriga, int nrata, int nrigp)
|
||||||
|
{
|
||||||
|
const bool ok = esiste(nriga, nrata, nrigp);
|
||||||
|
if (ok)
|
||||||
|
{
|
||||||
|
if (nriga == UNASSIGNED)
|
||||||
|
{
|
||||||
|
TRectype old_pag(_unassigned.row(nrigp));
|
||||||
|
old_pag.put(PAGSCA_ACCSAL, "A");
|
||||||
|
old_pag.zero(PAGSCA_IMPORTO);
|
||||||
|
old_pag.zero(PAGSCA_IMPORTOVAL);
|
||||||
|
old_pag.zero(PAGSCA_RITENUTE);
|
||||||
|
const TValuta val;
|
||||||
|
modifica_pagamento(old_pag, val, TRUE);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
TRiga_scadenze& scad = rata(nriga, nrata);
|
||||||
|
scad.elimina_pagamento(nrigp);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
// Ritorna l'importo in lire speso su di una riga contabile
|
// Ritorna l'importo in lire speso su di una riga contabile
|
||||||
TImporto TPartita::importo_speso(long nreg, int numrig, bool valuta, int mode) const
|
TImporto TPartita::importo_speso(long nreg, int numrig, bool valuta, int mode) const
|
||||||
{
|
{
|
||||||
@ -1769,7 +1793,6 @@ void TPartita::sposta_riga(int from_row, TPartita& part, int to_row)
|
|||||||
void TPartita::scollega_pagamenti(int r, int s)
|
void TPartita::scollega_pagamenti(int r, int s)
|
||||||
{
|
{
|
||||||
CHECKD(s > 0, "Impossibile scollegare la rata ", s);
|
CHECKD(s > 0, "Impossibile scollegare la rata ", s);
|
||||||
|
|
||||||
const TRiga_partite& row = riga(r);
|
const TRiga_partite& row = riga(r);
|
||||||
for (int i = row.rate(); i >= s; i--)
|
for (int i = row.rate(); i >= s; i--)
|
||||||
{
|
{
|
||||||
|
@ -287,6 +287,7 @@ public:
|
|||||||
char& new_ap, TImporto& new_abb, TImporto& new_diffcam,
|
char& new_ap, TImporto& new_abb, TImporto& new_diffcam,
|
||||||
bool update);
|
bool update);
|
||||||
bool modifica_pagamento(const TRectype& new_pag, const TValuta& valuta, bool update);
|
bool modifica_pagamento(const TRectype& new_pag, const TValuta& valuta, bool update);
|
||||||
|
bool elimina_pagamento(int nriga, int nrata, int nrigp);
|
||||||
|
|
||||||
static void carica_allineamento();
|
static void carica_allineamento();
|
||||||
static char allineamento_richiesto(char tipocf);
|
static char allineamento_richiesto(char tipocf);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user