Corretta generazione numero documento di riferimento su nac
git-svn-id: svn://10.65.10.50/branches/R_10_00@23031 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
7b9633eac8
commit
825bba7e77
@ -8,7 +8,6 @@
|
||||
|
||||
#include <doc.h>
|
||||
#include <rdoc.h>
|
||||
#include "../cg/cglib01.h"
|
||||
#include "../cg/cgsaldac.h"
|
||||
#include "../ef/ef0101.h"
|
||||
#include "../ve/velib.h"
|
||||
@ -140,11 +139,11 @@ void THardy_elab_docs::check_date(const TDate& datafine, TDate& dataini)
|
||||
int THardy_elab_docs::find_numerazioni(const TString& tipo_to_elab, TString_array& num_doc)
|
||||
{
|
||||
TISAM_recordset num_recset("USE %NUM");
|
||||
const TRectype& rec = num_recset.cursor()->curr();
|
||||
for (bool ok = num_recset.move_first(); ok; ok = num_recset.move_next()) //giro sui vari tipi numerazione
|
||||
{
|
||||
const TString4 codtab = num_recset.get("CODTAB").as_string();
|
||||
|
||||
const TCodice_numerazione numerazione(codtab);
|
||||
const TString4 codtab = rec.get("CODTAB");
|
||||
const TCodice_numerazione numerazione(rec);
|
||||
for (int t = numerazione.ntipi_doc() - 1; t >= 0; t--)
|
||||
{
|
||||
const TString& tipo_doc = numerazione.tipo_doc(t);
|
||||
@ -700,8 +699,12 @@ bool THardy_elab_docs::genera_nac(const TMask& mask, TArray& contratti_cliente,
|
||||
{
|
||||
// Skip fatkey->get(0) = PROVV
|
||||
nac.put(DOC_ANNORIF, fatkey->get(1));
|
||||
nac.put(DOC_CODNUMRIF, fatkey->get());
|
||||
nac.put(DOC_NUMDOCRIF, fatkey->get());
|
||||
const TString4 codnum = fatkey->get();
|
||||
nac.put(DOC_CODNUMRIF, codnum);
|
||||
const TCodice_numerazione& cn = cached_numerazione(codnum);
|
||||
TString80 numdoc;
|
||||
numdoc << cn.prefisso() << fatkey->get() << cn.postfisso();
|
||||
nac.put(DOC_NUMDOCRIF, numdoc);
|
||||
nac.put(DOC_DATADOCRIF, fatkey->get());
|
||||
}
|
||||
else
|
||||
|
Loading…
x
Reference in New Issue
Block a user