cg0100.cpp Corretto errore MI2363 sul salvataggio di PCN_CODCBL
cg2103.cpp Aggiunto commeto sulla determinazione dei corrispettivi git-svn-id: svn://10.65.10.50/trunk@5604 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
730df08899
commit
95759ab986
@ -63,14 +63,16 @@ int CG0100_application::read(TMask& m)
|
|||||||
}
|
}
|
||||||
|
|
||||||
int CG0100_application::rewrite(const TMask& m)
|
int CG0100_application::rewrite(const TMask& m)
|
||||||
|
|
||||||
{
|
{
|
||||||
TRelation *r = get_relation();
|
|
||||||
|
|
||||||
m.autosave(*r);
|
|
||||||
int sezivd = m.get_int(FLD_CM1_SEZIVD);
|
|
||||||
TString16 sez;
|
TString16 sez;
|
||||||
|
|
||||||
|
TRelation *r = get_relation();
|
||||||
|
m.autosave(*r);
|
||||||
|
|
||||||
|
if (!m.field(FLD_CM1_CODTABANALISI).enabled())
|
||||||
|
r->curr().zero(PCN_CODCBL);
|
||||||
|
|
||||||
|
int sezivd = m.get_int(FLD_CM1_SEZIVD);
|
||||||
if (sezivd == 6 || sezivd == 7)
|
if (sezivd == 6 || sezivd == 7)
|
||||||
{
|
{
|
||||||
sez.format("%d", sezivd - 5);
|
sez.format("%d", sezivd - 5);
|
||||||
@ -83,6 +85,8 @@ int CG0100_application::rewrite(const TMask& m)
|
|||||||
r->lfile().put(PCN_SEZIVDOPP, sez);
|
r->lfile().put(PCN_SEZIVDOPP, sez);
|
||||||
}
|
}
|
||||||
const int err = r->rewrite();
|
const int err = r->rewrite();
|
||||||
|
|
||||||
|
/* Lasciamo stare i sottoconti che ci pensano da soli ad azzerare PCN_CODCBL
|
||||||
if (err == NOERR)
|
if (err == NOERR)
|
||||||
{
|
{
|
||||||
const long sottoconto = m.get_long(FLD_CM1_SOTTOCONTO);
|
const long sottoconto = m.get_long(FLD_CM1_SOTTOCONTO);
|
||||||
@ -112,18 +116,21 @@ int CG0100_application::rewrite(const TMask& m)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
int CG0100_application::write(const TMask& m)
|
int CG0100_application::write(const TMask& m)
|
||||||
|
|
||||||
{
|
{
|
||||||
TRelation *r = get_relation();
|
|
||||||
TString16 sez;
|
TString16 sez;
|
||||||
|
|
||||||
|
TRelation *r = get_relation();
|
||||||
m.autosave(*r);
|
m.autosave(*r);
|
||||||
|
|
||||||
|
if (!m.field(FLD_CM1_CODTABANALISI).enabled())
|
||||||
|
r->curr().zero(PCN_CODCBL);
|
||||||
|
|
||||||
int sezivd = m.get_int(FLD_CM1_SEZIVD);
|
int sezivd = m.get_int(FLD_CM1_SEZIVD);
|
||||||
|
|
||||||
if (sezivd == 6 || sezivd == 7)
|
if (sezivd == 6 || sezivd == 7)
|
||||||
{
|
{
|
||||||
sez.format("%d", sezivd - 5);
|
sez.format("%d", sezivd - 5);
|
||||||
@ -135,6 +142,7 @@ int CG0100_application::write(const TMask& m)
|
|||||||
sez.format("%d", sezivd - 5);
|
sez.format("%d", sezivd - 5);
|
||||||
r->lfile().put(PCN_SEZIVDOPP, sez);
|
r->lfile().put(PCN_SEZIVDOPP, sez);
|
||||||
}
|
}
|
||||||
|
|
||||||
return r->write();
|
return r->write();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -220,9 +228,7 @@ HIDDEN bool tmcf_handler(TMask_field& f, KEY key)
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void CG0100_application::init_insert_mode(TMask& m)
|
void CG0100_application::init_insert_mode(TMask& m)
|
||||||
|
|
||||||
{
|
{
|
||||||
const int gruppo = atoi(m.get(FLD_CM1_GRUPPO));
|
const int gruppo = atoi(m.get(FLD_CM1_GRUPPO));
|
||||||
const int conto = atoi(m.get(FLD_CM1_CONTO));
|
const int conto = atoi(m.get(FLD_CM1_CONTO));
|
||||||
@ -300,7 +306,6 @@ void CG0100_application::init_insert_mode(TMask& m)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
||||||
m.enable(FLD_CM1_CODTABANALISI);
|
m.enable(FLD_CM1_CODTABANALISI);
|
||||||
m.enable(FLD_CM1_DESCRANALISI);
|
m.enable(FLD_CM1_DESCRANALISI);
|
||||||
}
|
}
|
||||||
|
@ -218,7 +218,7 @@ void TCausale::calcIVA()
|
|||||||
error_box("Tipo documento '%s' incompatibile con tipo registro", (const char*)td);
|
error_box("Tipo documento '%s' incompatibile con tipo registro", (const char*)td);
|
||||||
i = iva_errata;
|
i = iva_errata;
|
||||||
}
|
}
|
||||||
c = tpd.get_bool("B0");
|
c = tpd.get_bool("B0"); // B0 flag corrispettivi
|
||||||
}
|
}
|
||||||
else error_box("Tipo documento sconosciuto: '%s'", (const char*)td);
|
else error_box("Tipo documento sconosciuto: '%s'", (const char*)td);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user