Patch level : 12.0 928

Files correlati     : ve0.exe ve1.exe ve5.exe ve6.exe
Commento            :

- Aggiunte funzioni sulle righe documento :

  QTACONAI(<categoria> [ <tipo calcolo (0=netto, 1=esente, 2=lordo)])
  VALCONAI(<categoria> [ <tipo calcolo (0=netto, 1=esente, 2=lordo)])
This commit is contained in:
Alessandro Bonazzi 2020-01-22 12:21:22 +01:00
parent e05c633c7b
commit 0f36fc6225

View File

@ -1129,20 +1129,22 @@ void TExpr_documento::evaluate_user_func(int index, int nparms, TEval_stack & st
{
const TString8 sottocat = _row->get(conai_sottocat_name(i));
if (sottocat.full() && sottocat_found.find(sottocat) < 0)
if (sottocat.full() && sottocat.starts_with(cat))
{
sottocat_found.add(sottocat);
stack.push(sottocat);
stack.push(tipo_calcolo);
evaluate_user_func(_qtaconai, 2, stack, type);
real valqta = stack.pop_real();
if (_doc)
if (sottocat.full() && sottocat_found.find(sottocat) < 0)
{
int rows = _doc->physical_rows();
const TRectype & scc = cache().get("&VESCC", sottocat);
TString conai_codart(scc.get("S1"));
sottocat_found.add(sottocat);
stack.push(sottocat);
stack.push(tipo_calcolo);
evaluate_user_func(_qtaconai, 2, stack, type);
real valqta = stack.pop_real();
if (_doc)
{
int rows = _doc->physical_rows();
const TRectype & scc = cache().get("&VESCC", sottocat);
TString conai_codart(scc.get("S1"));
for (int i = rows; i >= 1; i--)
{
@ -1158,9 +1160,10 @@ void TExpr_documento::evaluate_user_func(int index, int nparms, TEval_stack & st
}
}
}
else
val = ZERO;
}
else
val = ZERO;
}
}
}