Patch level :
Files correlati : Ricompilazione Demo : [ ] Commento : git-svn-id: svn://10.65.10.50/branches/R_10_00@21966 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
1093d0f3b0
commit
fbe6a5c729
@ -5,6 +5,8 @@
|
|||||||
#include <recset.h>
|
#include <recset.h>
|
||||||
#include <tabutil.h>
|
#include <tabutil.h>
|
||||||
|
|
||||||
|
#include "halib.h"
|
||||||
|
|
||||||
#include "hatbatt.h"
|
#include "hatbatt.h"
|
||||||
#include "hatbcau.h"
|
#include "hatbcau.h"
|
||||||
#include "hatbcel.h"
|
#include "hatbcel.h"
|
||||||
@ -52,21 +54,13 @@ bool THA_table_app::get_next_key(TToken_string& key)
|
|||||||
const TString& codart = curr_mask().get(F_CODART);
|
const TString& codart = curr_mask().get(F_CODART);
|
||||||
if (codart.full())
|
if (codart.full())
|
||||||
{
|
{
|
||||||
TString query;
|
const TString& codtab = get_next_att_key(codart);
|
||||||
query << "USE &ATT";
|
|
||||||
query << "\nFROM CODTAB=#CODTAB";
|
|
||||||
query << "\nTO CODTAB=#CODTAB";
|
|
||||||
TISAM_recordset recset(query);
|
|
||||||
recset.set_var("#CODTAB", codart);
|
|
||||||
long last_prog = 0;
|
|
||||||
if (recset.move_last())
|
|
||||||
last_prog = recset.get("CODTAB[6,12]").as_int();
|
|
||||||
|
|
||||||
//riempie la token_string con i dati richiesti
|
//riempie la token_string con i dati richiesti
|
||||||
key.add(F_CODART);
|
key.add(F_CODART);
|
||||||
key.add(codart);
|
key.add(codart);
|
||||||
key.add(F_PROGRESSIVO);
|
key.add(F_PROGRESSIVO);
|
||||||
key.add(last_prog + 1);
|
key.add(codtab.mid(5));
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -9,6 +9,7 @@
|
|||||||
#include <rdoc.h>
|
#include <rdoc.h>
|
||||||
#include <../ve/velib.h>
|
#include <../ve/velib.h>
|
||||||
|
|
||||||
|
#include "halib.h"
|
||||||
#include "ha3800a.h"
|
#include "ha3800a.h"
|
||||||
|
|
||||||
//////////////////////////////////////////////
|
//////////////////////////////////////////////
|
||||||
@ -159,7 +160,7 @@ void TInserimento_storico::elabora(const TMask& mask)
|
|||||||
//..per quanto riguarda il progressivo)
|
//..per quanto riguarda il progressivo)
|
||||||
if (err != NOERR)
|
if (err != NOERR)
|
||||||
{
|
{
|
||||||
codtab.format("%-5s%07d", (const char*)codart, 1);
|
codtab = get_next_att_key(codart);
|
||||||
tab_att.put("CODTAB", codtab);
|
tab_att.put("CODTAB", codtab);
|
||||||
}
|
}
|
||||||
//comunque deve scrivere il cliente e la data perchè è un'apertura quindi la macchina è assegnata..
|
//comunque deve scrivere il cliente e la data perchè è un'apertura quindi la macchina è assegnata..
|
||||||
|
@ -129,6 +129,7 @@ BEGIN
|
|||||||
DISPLAY "Cliente" I0
|
DISPLAY "Cliente" I0
|
||||||
COPY OUTPUT F_PROGRESSIVO
|
COPY OUTPUT F_PROGRESSIVO
|
||||||
CHECKTYPE SEARCH
|
CHECKTYPE SEARCH
|
||||||
|
FIELD S1
|
||||||
END
|
END
|
||||||
|
|
||||||
|
|
||||||
@ -442,12 +443,13 @@ ENDPAGE
|
|||||||
ENDMASK
|
ENDMASK
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Mappa campi sul file TABMOD:
|
Mappa campi sul file TABMOD (tabella &HIS):
|
||||||
----------------------------
|
-------------------------------------------
|
||||||
CODTAB[1,5] = codart (A)
|
CODTAB[1,5] = codart (A)
|
||||||
CODTAB[6,12] = progressivo (N z)
|
CODTAB[6,12] = progressivo (N z)
|
||||||
CODTAB[13,17] = numero riga (N z)
|
CODTAB[13,17] = numero riga (N z)
|
||||||
S0 = descrizione
|
S0 = descrizione
|
||||||
|
S1[1,10] = cpdice cespite (A)
|
||||||
S3[1,5] = codart collegato
|
S3[1,5] = codart collegato
|
||||||
S4[1,4] = anno doc. apertura (N)
|
S4[1,4] = anno doc. apertura (N)
|
||||||
S4[5,8] = numerazione doc. apertura (A)
|
S4[5,8] = numerazione doc. apertura (A)
|
||||||
@ -458,7 +460,7 @@ S5[9,15] = numero doc. chiusura (N)
|
|||||||
S6[1,2] = umqta
|
S6[1,2] = umqta
|
||||||
S7[1,1] = tipo
|
S7[1,1] = tipo
|
||||||
S7[2,4] = codmag
|
S7[2,4] = codmag
|
||||||
I0 = codice cliente (N)
|
I0 = codice cliente
|
||||||
R0 = quantita
|
R0 = quantita
|
||||||
R1 = importo
|
R1 = importo
|
||||||
D0 = data intervento
|
D0 = data intervento
|
||||||
|
24
ha/halib.cpp
24
ha/halib.cpp
@ -494,3 +494,27 @@ void hd_key2conto(const TString& key, int& gr, int& co, long& so)
|
|||||||
co = atoi(key.mid(3,2));
|
co = atoi(key.mid(3,2));
|
||||||
so = atoi(key.mid(5,3));
|
so = atoi(key.mid(5,3));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const TString& get_next_att_key(const TString& codart)
|
||||||
|
{
|
||||||
|
if (codart.full())
|
||||||
|
{
|
||||||
|
CHECKS(codart.len() <= 5, "Ma che cavolo di codice articolo mi stai passando Willis?", (const char*)codart);
|
||||||
|
TString query;
|
||||||
|
query << "USE &ATT";
|
||||||
|
query << "\nFROM CODTAB=#CODTAB";
|
||||||
|
query << "\nTO CODTAB=#CODTAB";
|
||||||
|
TISAM_recordset recset(query);
|
||||||
|
recset.set_var("#CODTAB", codart);
|
||||||
|
long last_prog = 0;
|
||||||
|
if (recset.move_last())
|
||||||
|
last_prog = recset.get("CODTAB[6,12]").as_int();
|
||||||
|
|
||||||
|
TString& codtab = get_tmp_string();
|
||||||
|
codtab.format("%-5s%07d", (const char*)codart, last_prog + 1);
|
||||||
|
return codtab;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
return EMPTY_STRING;
|
||||||
|
}
|
@ -236,3 +236,4 @@ const TDate upload_format_date6(const TString& str_data);
|
|||||||
long hd_key2cli(const TString& key);
|
long hd_key2cli(const TString& key);
|
||||||
long hd_key2forn(const TString& key);
|
long hd_key2forn(const TString& key);
|
||||||
void hd_key2conto(const TString& key, int& gr, int& co, long& so);
|
void hd_key2conto(const TString& key, int& gr, int& co, long& so);
|
||||||
|
const TString& get_next_att_key(const TString& codart);
|
||||||
|
@ -162,4 +162,17 @@ END
|
|||||||
|
|
||||||
ENDPAGE
|
ENDPAGE
|
||||||
|
|
||||||
ENDMASK
|
ENDMASK
|
||||||
|
|
||||||
|
/*
|
||||||
|
Mappa campi sul file TABMOD (tabella &ATT):
|
||||||
|
-------------------------------------------
|
||||||
|
CODTAB[1,5] = codart (A)
|
||||||
|
CODTAB[6,12] = progressivo (N z)
|
||||||
|
S0[1,5] = codart per matricola (A)
|
||||||
|
S0[6,20] = matricola (A)
|
||||||
|
S1[1,10] = codice cespite (A)
|
||||||
|
I0 = codice cliente
|
||||||
|
D0 = data assegnamento
|
||||||
|
D1 = data fabbricazione
|
||||||
|
*/
|
Loading…
x
Reference in New Issue
Block a user