Patch level : 4.0 crpa

Files correlati     : crpa0.exe
Ricompilazione Demo : [ ]
Commento            : corretto trasferimento fatture da ricevere che non sono piu' fatture ma altro!


git-svn-id: svn://10.65.10.50/trunk@14323 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
cris 2006-09-14 10:15:44 +00:00
parent 22086d4674
commit 0662da438d

View File

@ -669,12 +669,12 @@ void TIni2Sql::validate(const TString& elabfield, TString& str)
const int datipodoc = get_tipo_dadoc(*_doc); // si assume che sia il tipo documento di origine per tutto il documento const int datipodoc = get_tipo_dadoc(*_doc); // si assume che sia il tipo documento di origine per tutto il documento
tmpstr = (datipodoc == 3) ? "BO" : "B"; tmpstr = (datipodoc == 3) ? "BO" : "B";
} }
else if (tipodoc == 2) // fattura else if (tipodoc == 2 || tipodoc == 0) // fattura o altro da ricevere
{ {
const bool daricevere = cache().get("%NUM", _doc->numerazione()).get_bool("B3"); const bool daricevere = cache().get("%NUM", _doc->numerazione()).get_bool("B3");
if (daricevere) if (daricevere)
tmpstr = "FR"; tmpstr = "FR";
else else if (tipodoc == 2) // fattura
{ {
const int datipodoc = get_tipo_dadoc(*_doc); const int datipodoc = get_tipo_dadoc(*_doc);
if (datipodoc == 1) if (datipodoc == 1)
@ -699,7 +699,8 @@ void TIni2Sql::validate(const TString& elabfield, TString& str)
if (_dadoc != NULL) if (_dadoc != NULL)
{ {
const int ord_bol = atoi(cache().get("%NUM", _dadoc->numerazione(), "I1")); const int ord_bol = atoi(cache().get("%NUM", _dadoc->numerazione(), "I1"));
if (((ord_bol == 3) && (code == "_RIFORD")) || ((ord_bol == 1) && (code == "_RIFBOL"))) const bool daricevere = cache().get("%NUM", _dadoc->numerazione()).get_bool("B3");
if (((ord_bol == 3 || daricevere) && (code == "_RIFORD")) || ((ord_bol == 1) && (code == "_RIFBOL")))
{ {
str << _dadoc->numerazione() << '-'; str << _dadoc->numerazione() << '-';
str << _dadoc->anno() << '-'; str << _dadoc->anno() << '-';