Patch level : 10.0 67

Files correlati     :
Ricompilazione Demo : [ ]
Commento           :

RIportata la verione 3.2 1167


git-svn-id: svn://10.65.10.50/trunk@16735 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
alex 2008-06-11 15:28:02 +00:00
parent 3d7dab8e40
commit 9dde3973a1
6 changed files with 26 additions and 39 deletions

View File

@ -11,6 +11,7 @@
#include "veuml.h" #include "veuml.h"
#include "veuml1.h" #include "veuml1.h"
#include "verig.h" #include "verig.h"
#include "velib04.h"
#include "sconti.h" #include "sconti.h"
#include "../mg/anamag.h" #include "../mg/anamag.h"
@ -368,8 +369,9 @@ bool TMotore_application::menu(MENU_TAG mt)
int TMotore_application::write( const TMask& m ) // C 90 int TMotore_application::write( const TMask& m ) // C 90
{ {
TDocumento_mask& mask = (TDocumento_mask&) m;
TDocumento& d = (TDocumento&)_rel->curr(); TDocumento& d = (TDocumento&)_rel->curr();
d = ((TDocumento_mask&)m).doc(); // Trasferisce il documento da maschera a record d = mask.doc(); // Trasferisce il documento da maschera a record
// Se ho attivato la creazione automatica delle righe allora cancello quelle vuote finali // Se ho attivato la creazione automatica delle righe allora cancello quelle vuote finali
if (d.tipo().auto_add()) if (d.tipo().auto_add())

View File

@ -1075,7 +1075,6 @@ void TRiga_documento::autosave(TSheet_field& f)
// Salvo i campi con un FIELD manuale // Salvo i campi con un FIELD manuale
const int last_pos = f.cid2index(FR_CODAGG2); const int last_pos = f.cid2index(FR_CODAGG2);
f.select(num); // Seleziono la riga giusta in modo da avere la maschera giusta f.select(num); // Seleziono la riga giusta in modo da avere la maschera giusta
const TMask& m = f.sheet_mask();
for (int i = last_pos+1; ; i++) for (int i = last_pos+1; ; i++)
{ {
const char* val = row.get(i); const char* val = row.get(i);
@ -1159,7 +1158,7 @@ void TRiga_documento::autoload(TSheet_field & f)
row.add( get( RDOC_CODAGG2) , f.cid2index(FR_CODAGG2)); row.add( get( RDOC_CODAGG2) , f.cid2index(FR_CODAGG2));
f.select(num); // Seleziona la riga in modo da selezionare la maschera di riga giusta f.select(num); // Seleziona la riga in modo da selezionare la maschera di riga giusta
TMask& m = f.sheet_mask(); const TMask& m = f.sheet_mask();
for (short cdcid = FR_CDC1; cdcid <= FR_CDC12; cdcid++) for (short cdcid = FR_CDC1; cdcid <= FR_CDC12; cdcid++)
{ {
const int pos = m.id2pos(cdcid); const int pos = m.id2pos(cdcid);
@ -1178,7 +1177,6 @@ void TRiga_documento::autoload(TSheet_field & f)
// Leggo i campi con un FIELD manuale // Leggo i campi con un FIELD manuale
const int last_pos = f.cid2index(FR_CODAGG2); const int last_pos = f.cid2index(FR_CODAGG2);
f.select(num); // Seleziono la riga giusta in modo da avere la maschera giusta f.select(num); // Seleziono la riga giusta in modo da avere la maschera giusta
const TMask& m = f.sheet_mask();
FOR_EACH_MASK_FIELD(m, i, c) FOR_EACH_MASK_FIELD(m, i, c)
{ {
const TFieldref* fld = c->field(); const TFieldref* fld = c->field();

View File

@ -573,21 +573,6 @@ public:
virtual ~TConsuntivazione_produzione() { } virtual ~TConsuntivazione_produzione() { }
}; };
class TLista_elaborazioni : public TObject // velib04
{
TAssoc_array * _elab;
protected:
void read();
public:
TElaborazione & operator [](const char * key) const;
int select(TString_array & result, const char * tipo_iniziale = NULL, const char * stato_iniziale = NULL, const char * tipo_finale = NULL, const char * stato_finale = NULL);
void update();
TLista_elaborazioni() : _elab(NULL) {}
virtual ~TLista_elaborazioni();
};
class TCache_causali; // Internal use only class TCache_causali; // Internal use only
class TContabilizzazione_analitica : public TElaborazione // velib04f class TContabilizzazione_analitica : public TElaborazione // velib04f

View File

@ -2313,7 +2313,7 @@ bool TElabora_mask::on_field_event(TOperable_field& o, TField_event e, long joll
} }
} }
else else
if (e == fe_select) if (e == fe_button)
{ {
if (_tree.multiple_selection()) if (_tree.multiple_selection())
{ {
@ -3403,6 +3403,8 @@ void TDocumento_mask::save_father_rows()
bool TDocumento_mask::confirm_handler( TMask_field& f, KEY key ) bool TDocumento_mask::confirm_handler( TMask_field& f, KEY key )
{ {
bool ok = true;
if (key == K_SPACE) if (key == K_SPACE)
{ {
TMask m("ve0100d"); TMask m("ve0100d");

View File

@ -54,17 +54,17 @@ void TMateriali_base_recordset::requery()
TDistinta_tree distinta; TDistinta_tree distinta;
_boom.destroy(); _boom.destroy();
int pos1 = query().find("SCALARE"); int pos1 = query_text().find("SCALARE");
if (pos1 > 0) if (pos1 > 0)
{ {
pos1 += 7; pos1 += 7;
_reverse = query()[pos1] == '-'; _reverse = query_text()[pos1] == '-';
if (_reverse) if (_reverse)
pos1++; pos1++;
int pos = query().find("==", pos1); int pos = query_text().find("==", pos1);
if (pos > 0) if (pos > 0)
{ {
TString val(query().mid(pos + 2)); TString val(query_text().mid(pos + 2));
if (val.starts_with("\"") || val.starts_with("'")) if (val.starts_with("\"") || val.starts_with("'"))
{ {
@ -119,17 +119,17 @@ void TScalare_recordset::requery()
TDistinta_tree distinta; TDistinta_tree distinta;
boom().destroy(); boom().destroy();
int pos1 = query().find("SCALARE"); int pos1 = query_text().find("SCALARE");
if (pos1 > 0) if (pos1 > 0)
{ {
pos1 += 7; pos1 += 7;
reverse() = query()[pos1] == '-'; reverse() = query_text()[pos1] == '-';
if (reverse()) if (reverse())
pos1++; pos1++;
int pos = query().find("==", pos1); int pos = query_text().find("==", pos1);
if (pos > 0) if (pos > 0)
{ {
TString val(query().mid(pos + 2)); TString val(query_text().mid(pos + 2));
if (val.starts_with("\"") || val.starts_with("'")) if (val.starts_with("\"") || val.starts_with("'"))
{ {
@ -146,18 +146,18 @@ void TScalare_recordset::requery()
if (distinta.set_root(art)) if (distinta.set_root(art))
{ {
while (isspace(query()[pos1])) while (isspace(query_text()[pos1]))
pos1++; pos1++;
const int level = atoi(query().mid(pos1)); const int level = atoi(query_text().mid(pos1));
if (level > 0 || query()[pos1] =='0') if (level > 0 || query_text()[pos1] =='0')
while (isdigit(query()[pos1])) while (isdigit(query_text()[pos1]))
pos1++; pos1++;
while (isspace(query()[pos1])) while (isspace(query_text()[pos1]))
pos1++; pos1++;
TString8 filter; TString8 filter;
if (query()[pos1] != 'S') if (query_text()[pos1] != 'S')
while (isalpha(query()[pos1])) while (isalpha(query_text()[pos1]))
filter << query()[pos1++]; filter << query_text()[pos1++];
distinta.explode(boom(), false, RAGGR_EXP_NONE, level, filter); distinta.explode(boom(), false, RAGGR_EXP_NONE, level, filter);
} }
} }
@ -205,7 +205,7 @@ TDocument_cache:: ~TDocument_cache()
// TDocument_recordset // TDocument_recordset
/////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////
const TVariant& TDocument_recordset::get_field(int num, const char* field) const const TVariant& TDocument_recordset::get(int num, const char* field) const
{ {
if (*field != '#') if (*field != '#')
{ {

View File

@ -29,7 +29,7 @@ class TMateriali_base_recordset : public TRecordset
protected: protected:
const TString & query() const { return _query; } const TString & query_text() const { return _query; }
TArray & boom() { return _boom; } TArray & boom() { return _boom; }
const TArray & boom() const { return _boom; } const TArray & boom() const { return _boom; }
bool & reverse() { return _reverse;} bool & reverse() { return _reverse;}
@ -91,7 +91,7 @@ class TDocument_recordset : public TISAM_recordset
TDocument_cache _cache; TDocument_cache _cache;
protected: protected:
virtual const TVariant& get(int logic, const char* field) const; virtual const TVariant& get(int num, const char* field) const;
public: public:
const TDocumento & doc(const TRectype& rec) { return _cache.doc(rec);} const TDocumento & doc(const TRectype& rec) { return _cache.doc(rec);}