Patch level :2.2 nopatch
Files correlati :crpa0.exe Ricompilazione Demo : [ ] Commento :modifica per il crpa; da riportare su 2.1 git-svn-id: svn://10.65.10.50/trunk@12675 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
216f303467
commit
244e8674a8
@ -59,6 +59,7 @@ protected:
|
||||
void build_paragraph(const TString& paragrafo, TString& outputstr);
|
||||
int build_nriga(const TString& paragrafo);
|
||||
int get_tipo_dadoc(const TDocumento& doc) const;
|
||||
bool get_fdaric_dadoc(const TDocumento& doc) const;
|
||||
long get_protiva(const TDocumento& doc) const;
|
||||
bool search_costo_ricavo(TBill& conto, const TRiga_documento& r);
|
||||
bool test_swap() const;
|
||||
@ -478,6 +479,22 @@ int TIni2Sql::get_tipo_dadoc(const TDocumento& doc) const
|
||||
return datipo;
|
||||
}
|
||||
|
||||
bool TIni2Sql::get_fdaric_dadoc(const TDocumento& doc) const
|
||||
{
|
||||
bool daric = FALSE;
|
||||
for (int r = 1; r <= doc.rows(); r++)
|
||||
{
|
||||
const TRiga_documento& rdoc = doc[r];
|
||||
const TString8 dacodnum = rdoc.get(RDOC_DACODNUM);
|
||||
if (dacodnum.not_empty())
|
||||
{
|
||||
daric = cache().get("%NUM", dacodnum).get_bool("B3");
|
||||
break;
|
||||
}
|
||||
}
|
||||
return daric;
|
||||
}
|
||||
|
||||
// esegue l'elaborazione indicata
|
||||
void TIni2Sql::validate(const TString& elabfield, TString& str)
|
||||
{
|
||||
@ -630,13 +647,25 @@ void TIni2Sql::validate(const TString& elabfield, TString& str)
|
||||
}
|
||||
else if (tipodoc == 2) // fattura
|
||||
{
|
||||
const int datipodoc = get_tipo_dadoc(*_doc);
|
||||
if (datipodoc == 1)
|
||||
tmpstr = "FB";
|
||||
else if (datipodoc == 3)
|
||||
tmpstr = "FO";
|
||||
else
|
||||
tmpstr = "F";
|
||||
const bool daricevere = cache().get("%NUM", _doc->numerazione()).get_bool("B3");
|
||||
if (daricevere)
|
||||
tmpstr = "FR";
|
||||
else
|
||||
{
|
||||
const int datipodoc = get_tipo_dadoc(*_doc);
|
||||
if (datipodoc == 1)
|
||||
tmpstr = "FB";
|
||||
else if (datipodoc == 3)
|
||||
tmpstr = "FO";
|
||||
else
|
||||
{
|
||||
const bool daric = get_fdaric_dadoc(*_doc);
|
||||
if (daric)
|
||||
tmpstr = "FF";
|
||||
else
|
||||
tmpstr = "F";
|
||||
}
|
||||
}
|
||||
}
|
||||
str = _configfile->get(tmpstr, "Tipo documento");
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user