Patch level : 12.0 486
Files correlati : li Commento : - Aggiunto stato documento allo sheet - Corretta query git-svn-id: svn://10.65.10.50/branches/R_10_00@24231 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
88b9c4d8d3
commit
f2677bcbc5
@ -142,13 +142,24 @@ void TVisLI_mask::load_sheet()
|
||||
}
|
||||
// Campi solo filtrabili con SELECT **************************
|
||||
// TIPODOC+STATO
|
||||
if(get(F_TIPODOC).full())
|
||||
query << "SELECT TIPODOC==#TIPODOC";
|
||||
if(get(F_STATO).full())
|
||||
query << "SELECT STATO==#STATO";
|
||||
TString querySel;
|
||||
bool tipo = get(F_TIPODOC).full();
|
||||
bool stato = get(F_STATO).full();
|
||||
querySel << ((tipo || stato) ? "\nSELECT " : "") << (tipo ? "TIPODOC==#TIPODOC&&" : "") << (stato ? "STR(STATO==#STATO)" : "");
|
||||
/*
|
||||
if(tipo || stato)
|
||||
querySel = "\nSELECT ";
|
||||
if(tipo)
|
||||
querySel << "TIPODOC==#TIPODOC&&";
|
||||
if(stato)
|
||||
querySel << "STATO==#STATO";
|
||||
else
|
||||
*/
|
||||
if(tipo && !stato)
|
||||
querySel.cut(querySel.len()-2);
|
||||
|
||||
// Unisco query
|
||||
query << "FROM " << queryFrom << "\nTO " << queryTo << "\n";
|
||||
query << querySel << "\nFROM " << queryFrom << "\nTO " << queryTo << "\n";
|
||||
|
||||
// Creo recordset
|
||||
TISAM_recordset rec(query);
|
||||
@ -231,6 +242,8 @@ void TVisLI_mask::addRow(TSheet_field& sheet, TISAM_recordset& rec)
|
||||
row.add(rec.get("CODNUM").as_string(), sheet.cid2index(A_CODNUM));
|
||||
// Tipo documento
|
||||
row.add(rec.get("TIPODOC").as_string(), sheet.cid2index(A_TIPODOC));
|
||||
// Stato documento
|
||||
row.add(rec.get("STATO").as_string(), sheet.cid2index(A_STATODOC));
|
||||
// Tipo cliente
|
||||
row.add("C", sheet.cid2index(A_TIPOCF));
|
||||
// Codice cliente
|
||||
|
@ -28,32 +28,33 @@
|
||||
#define A_NUMDOC 103
|
||||
#define A_CODNUM 104
|
||||
#define A_TIPODOC 105
|
||||
#define A_TIPOCF 106
|
||||
#define A_CODCF 107
|
||||
#define A_RAGSOC 108
|
||||
#define A_TOTDOC 109
|
||||
#define A_STATODOC 106
|
||||
#define A_TIPOCF 107
|
||||
#define A_CODCF 108
|
||||
#define A_RAGSOC 109
|
||||
#define A_TOTDOC 110
|
||||
// Campi lettere intento
|
||||
#define START_PLA 110
|
||||
#define START_PLA 111
|
||||
|
||||
#define PLA1_NUMPROT 110
|
||||
#define PLA1_QTA 111
|
||||
#define PLA2_NUMPROT 112
|
||||
#define PLA2_QTA 113
|
||||
#define PLA3_NUMPROT 114
|
||||
#define PLA3_QTA 115
|
||||
#define PLA4_NUMPROT 116
|
||||
#define PLA4_QTA 117
|
||||
#define PLA5_NUMPROT 118
|
||||
#define PLA5_QTA 119
|
||||
#define PLA6_NUMPROT 120
|
||||
#define PLA6_QTA 121
|
||||
#define PLA7_NUMPROT 122
|
||||
#define PLA7_QTA 123
|
||||
#define PLA8_NUMPROT 124
|
||||
#define PLA8_QTA 125
|
||||
#define PLA9_NUMPROT 126
|
||||
#define PLA9_QTA 127
|
||||
#define PLA10_NUMPROT 128
|
||||
#define PLA10_QTA 129
|
||||
#define PLA1_NUMPROT 111
|
||||
#define PLA1_QTA 112
|
||||
#define PLA2_NUMPROT 113
|
||||
#define PLA2_QTA 114
|
||||
#define PLA3_NUMPROT 115
|
||||
#define PLA3_QTA 116
|
||||
#define PLA4_NUMPROT 117
|
||||
#define PLA4_QTA 118
|
||||
#define PLA5_NUMPROT 119
|
||||
#define PLA5_QTA 120
|
||||
#define PLA6_NUMPROT 121
|
||||
#define PLA6_QTA 122
|
||||
#define PLA7_NUMPROT 123
|
||||
#define PLA7_QTA 124
|
||||
#define PLA8_NUMPROT 125
|
||||
#define PLA8_QTA 126
|
||||
#define PLA9_NUMPROT 127
|
||||
#define PLA9_QTA 128
|
||||
#define PLA10_NUMPROT 129
|
||||
#define PLA10_QTA 130
|
||||
|
||||
#define END_SHEET 109
|
||||
#define END_SHEET 130
|
@ -231,6 +231,7 @@ BEGIN
|
||||
ITEM "Numero\nDocum.@5F"
|
||||
ITEM "Cod.\nNum.@8F"
|
||||
ITEM "Tipo\nDoc.@4F"
|
||||
ITEM "Stato\nDoc.@5F"
|
||||
ITEM "C/F@2"
|
||||
ITEM "Codice@6"
|
||||
ITEM "Ragione Sociale@35"
|
||||
@ -293,6 +294,12 @@ BEGIN
|
||||
FLAGS "D"
|
||||
END
|
||||
|
||||
STRING A_STATODOC 1
|
||||
BEGIN
|
||||
PROMPT 1 0 "Stato documento"
|
||||
FLAGS "D"
|
||||
END
|
||||
|
||||
STRING A_TIPOCF 1
|
||||
BEGIN
|
||||
PROMPT 1 1 "Tipo C/F "
|
||||
|
Loading…
x
Reference in New Issue
Block a user