From 0662da438dfc3a89f2ea03631964443b70711437 Mon Sep 17 00:00:00 2001 From: cris Date: Thu, 14 Sep 2006 10:15:44 +0000 Subject: [PATCH] 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 --- crpa/crpa0.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/crpa/crpa0.cpp b/crpa/crpa0.cpp index 406538d29..f3778fcdd 100755 --- a/crpa/crpa0.cpp +++ b/crpa/crpa0.cpp @@ -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 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"); if (daricevere) tmpstr = "FR"; - else + else if (tipodoc == 2) // fattura { const int datipodoc = get_tipo_dadoc(*_doc); if (datipodoc == 1) @@ -699,7 +699,8 @@ void TIni2Sql::validate(const TString& elabfield, TString& str) if (_dadoc != NULL) { 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->anno() << '-';