Patch level : 10.0
Files correlati : ve1.exe Ricompilazione Demo : [ ] Commento : Corretta interpretazione formule di riga documento git-svn-id: svn://10.65.10.50/trunk@17583 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
3e23894419
commit
376b8008d3
@ -11,7 +11,6 @@
|
|||||||
#include "vetbrss.h"
|
#include "vetbrss.h"
|
||||||
#include "vetbatr.h"
|
#include "vetbatr.h"
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////
|
||||||
// TVendite_mask
|
// TVendite_mask
|
||||||
///////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////
|
||||||
@ -56,7 +55,7 @@ bool TVendite_mask::get_printer_name(TString& name) const
|
|||||||
|
|
||||||
void TVendite_mask::reset_printer_config() const
|
void TVendite_mask::reset_printer_config() const
|
||||||
{
|
{
|
||||||
TString16 config; get_printer_config(config);
|
TString config; get_printer_config(config);
|
||||||
TConfig ini(CONFIG_STAMPE, config);
|
TConfig ini(CONFIG_STAMPE, config);
|
||||||
ini.remove_all();
|
ini.remove_all();
|
||||||
}
|
}
|
||||||
@ -70,7 +69,7 @@ bool TVendite_mask::on_field_event(TOperable_field& o, TField_event e, long joll
|
|||||||
{
|
{
|
||||||
if (is_table("NUM"))
|
if (is_table("NUM"))
|
||||||
return on_num_event(o, e, jolly);
|
return on_num_event(o, e, jolly);
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
TVendite_mask::TVendite_mask(const char* name) : TAutomask(name)
|
TVendite_mask::TVendite_mask(const char* name) : TAutomask(name)
|
||||||
@ -99,7 +98,6 @@ protected:
|
|||||||
virtual int write(const TMask& m);
|
virtual int write(const TMask& m);
|
||||||
virtual int rewrite(const TMask& m);
|
virtual int rewrite(const TMask& m);
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -295,6 +293,6 @@ int TVendite_tabapp::rewrite(const TMask& m)
|
|||||||
int ve0400(int argc, char* argv[])
|
int ve0400(int argc, char* argv[])
|
||||||
{
|
{
|
||||||
TVendite_tabapp vta;
|
TVendite_tabapp vta;
|
||||||
vta.run(argc, argv, "Tabella Vendite");
|
vta.run(argc, argv, TR("Tabella Vendite"));
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -574,7 +574,7 @@ real TDocumento::bolli(real & imp, int ndec, TTipo_importo t) const
|
|||||||
|
|
||||||
if (in_valuta())
|
if (in_valuta())
|
||||||
{
|
{
|
||||||
const real cambio = get_real("CAMBIO");
|
const real cambio = get_real(DOC_CAMBIO);
|
||||||
const exchange_type ce = get_bool(DOC_CONTROEURO) ? _exchange_contro : _exchange_base;
|
const exchange_type ce = get_bool(DOC_CONTROEURO) ? _exchange_contro : _exchange_base;
|
||||||
tot_bolli = change_currency(tot_bolli, "", ZERO, _exchange_undefined,
|
tot_bolli = change_currency(tot_bolli, "", ZERO, _exchange_undefined,
|
||||||
get(DOC_CODVAL), cambio, ce, -1);
|
get(DOC_CODVAL), cambio, ce, -1);
|
||||||
|
@ -1,26 +1,27 @@
|
|||||||
#include "velib07.h"
|
#include "velib07.h"
|
||||||
|
|
||||||
|
#include "../db/dblib.h"
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////
|
||||||
// TMateriali_base_recordset
|
// TMateriali_base_recordset
|
||||||
///////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////
|
||||||
|
|
||||||
const TVariant& TMateriali_base_recordset::get(const char* column_name) const
|
const TVariant& TMateriali_base_recordset::get(const char* column_name) const
|
||||||
{
|
{
|
||||||
const TString name(column_name);
|
if (column_name[0] != '#')
|
||||||
|
|
||||||
if (name[0] != '#')
|
|
||||||
{
|
{
|
||||||
TVariant& var = get_tmp_var();
|
TVariant& var = get_tmp_var();
|
||||||
int rownum = current_row();
|
int rownum = current_row();
|
||||||
|
|
||||||
if (_reverse)
|
if (reverse())
|
||||||
rownum = items() - 1 - rownum;
|
rownum = items() - 1 - rownum;
|
||||||
|
|
||||||
const TRiga_esplosione * row = (const TRiga_esplosione *)boom().objptr(rownum);
|
const TRiga_esplosione* row = (const TRiga_esplosione*)boom().objptr(rownum);
|
||||||
|
|
||||||
if (row != NULL)
|
if (row != NULL)
|
||||||
{
|
{
|
||||||
if (name == "LASTQTA")
|
const TFixed_string name(column_name);
|
||||||
|
if (name == "LASTQTA")
|
||||||
var = row->last_qta();
|
var = row->last_qta();
|
||||||
else
|
else
|
||||||
if (name == "TOTQTA")
|
if (name == "TOTQTA")
|
||||||
@ -58,21 +59,18 @@ const TVariant& TMateriali_base_recordset::get(const char* column_name) const
|
|||||||
const TVariant& TMateriali_base_recordset::get(unsigned int column) const
|
const TVariant& TMateriali_base_recordset::get(unsigned int column) const
|
||||||
{
|
{
|
||||||
const TRecordset_column_info & ci = column_info(column);
|
const TRecordset_column_info & ci = column_info(column);
|
||||||
|
|
||||||
return get(ci._name);
|
return get(ci._name);
|
||||||
}
|
}
|
||||||
|
|
||||||
void TMateriali_base_recordset::requery()
|
void TMateriali_base_recordset::requery()
|
||||||
{
|
{
|
||||||
TDistinta_tree distinta;
|
|
||||||
|
|
||||||
_boom.destroy();
|
_boom.destroy();
|
||||||
int pos1 = query_text().find("MATBASE");
|
int pos1 = query_text().find("MATBASE");
|
||||||
if (pos1 > 0)
|
if (pos1 > 0)
|
||||||
{
|
{
|
||||||
pos1 += 7;
|
pos1 += 7;
|
||||||
_reverse = query_text()[pos1] == '-';
|
set_reverse(query_text()[pos1] == '-');
|
||||||
if (_reverse)
|
if (reverse())
|
||||||
pos1++;
|
pos1++;
|
||||||
int pos = query_text().find("==", pos1);
|
int pos = query_text().find("==", pos1);
|
||||||
int pos2 = -1;
|
int pos2 = -1;
|
||||||
@ -95,8 +93,8 @@ void TMateriali_base_recordset::requery()
|
|||||||
val = var.as_string();
|
val = var.as_string();
|
||||||
}
|
}
|
||||||
|
|
||||||
TCodice_articolo art(val);
|
const TCodice_articolo art(val);
|
||||||
|
TDistinta_tree distinta;
|
||||||
if (distinta.set_root(art))
|
if (distinta.set_root(art))
|
||||||
{
|
{
|
||||||
while (isspace(query_text()[pos1]))
|
while (isspace(query_text()[pos1]))
|
||||||
@ -174,14 +172,12 @@ TMateriali_base_recordset::TMateriali_base_recordset(const char* use) : _query(u
|
|||||||
|
|
||||||
void TScalare_recordset::requery()
|
void TScalare_recordset::requery()
|
||||||
{
|
{
|
||||||
TDistinta_tree distinta;
|
|
||||||
|
|
||||||
boom().destroy();
|
boom().destroy();
|
||||||
int pos1 = query_text().find("SCALARE");
|
int pos1 = query_text().find("SCALARE");
|
||||||
if (pos1 > 0)
|
if (pos1 > 0)
|
||||||
{
|
{
|
||||||
pos1 += 7;
|
pos1 += 7;
|
||||||
reverse() = query_text()[pos1] == '-';
|
set_reverse(query_text()[pos1] == '-');
|
||||||
if (reverse())
|
if (reverse())
|
||||||
pos1++;
|
pos1++;
|
||||||
int pos = query_text().find("==", pos1);
|
int pos = query_text().find("==", pos1);
|
||||||
@ -200,8 +196,8 @@ void TScalare_recordset::requery()
|
|||||||
val = var.as_string();
|
val = var.as_string();
|
||||||
}
|
}
|
||||||
|
|
||||||
TCodice_articolo art(val);
|
const TCodice_articolo art(val);
|
||||||
|
TDistinta_tree distinta;
|
||||||
if (distinta.set_root(art))
|
if (distinta.set_root(art))
|
||||||
{
|
{
|
||||||
while (isspace(query_text()[pos1]))
|
while (isspace(query_text()[pos1]))
|
||||||
@ -291,7 +287,7 @@ TDocument_cache:: ~TDocument_cache()
|
|||||||
// TDocument_recordset
|
// TDocument_recordset
|
||||||
///////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////
|
||||||
|
|
||||||
const TVariant& TDocument_recordset::get(int num, const char* field) const
|
const TVariant& TDocument_recordset::get_field(int num, const char* field) const
|
||||||
{
|
{
|
||||||
if (*field != '#')
|
if (*field != '#')
|
||||||
{
|
{
|
||||||
@ -571,15 +567,10 @@ size_t TDocument_report::get_usr_words(TString_array& words) const
|
|||||||
{
|
{
|
||||||
TReport::get_usr_words(words);
|
TReport::get_usr_words(words);
|
||||||
|
|
||||||
const char* const name[] =
|
const char* const name[] = { "DOC_PARENT_DOC", "DOC_PARENT_ROW", NULL };
|
||||||
{
|
|
||||||
"DOC_PARENT_DOC", "DOC_PARENT_ROW",
|
|
||||||
NULL
|
|
||||||
};
|
|
||||||
|
|
||||||
((TDocument_report*)this)->_first_msg = words.items(); // Calcola il primo numero disponibile
|
((TDocument_report*)this)->_first_msg = words.items(); // Calcola il primo numero disponibile
|
||||||
size_t i;
|
for (size_t i = 0; name[i] != NULL; i++)
|
||||||
for (i = 0; name[i] != NULL; i++)
|
|
||||||
words.add(name[i]);
|
words.add(name[i]);
|
||||||
|
|
||||||
return words.items();
|
return words.items();
|
||||||
|
24
ve/velib07.h
24
ve/velib07.h
@ -5,16 +5,10 @@
|
|||||||
#include "velib.h"
|
#include "velib.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef __ASSOC_H
|
#ifndef __REPORT_H
|
||||||
#include <assoc.h>
|
#include <report.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef __REPRINT_H
|
|
||||||
#include <reprint.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "../db/dblib.h"
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////
|
||||||
// TMateriali_base_recordset
|
// TMateriali_base_recordset
|
||||||
///////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////
|
||||||
@ -30,14 +24,14 @@ class TMateriali_base_recordset : public TRecordset
|
|||||||
TRectype * _rdist;
|
TRectype * _rdist;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
const TString& query_text() const { return _query; }
|
||||||
|
TArray& boom() { return _boom; }
|
||||||
|
const TArray& boom() const { return _boom; }
|
||||||
|
|
||||||
const TString & query_text() const { return _query; }
|
void set_reverse(bool r) { _reverse = r; }
|
||||||
TArray & boom() { return _boom; }
|
bool reverse() const { return _reverse;}
|
||||||
const TArray & boom() const { return _boom; }
|
|
||||||
bool & reverse() { return _reverse;}
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
virtual TRecnotype items() const { return _boom.items(); }
|
virtual TRecnotype items() const { return _boom.items(); }
|
||||||
virtual bool move_to(TRecnotype pos) { _pos = pos; _lastrow = -1; return pos < items();}
|
virtual bool move_to(TRecnotype pos) { _pos = pos; _lastrow = -1; return pos < items();}
|
||||||
virtual TRecnotype current_row() const { return _pos; }
|
virtual TRecnotype current_row() const { return _pos; }
|
||||||
@ -93,10 +87,10 @@ class TDocument_recordset : public TISAM_recordset
|
|||||||
TDocument_cache _cache;
|
TDocument_cache _cache;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual const TVariant& get(int num, const char* field) const;
|
virtual const TVariant& get_field(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);}
|
||||||
|
|
||||||
TDocument_recordset(const char* use) : TISAM_recordset(use) { }
|
TDocument_recordset(const char* use) : TISAM_recordset(use) { }
|
||||||
virtual ~TDocument_recordset() { }
|
virtual ~TDocument_recordset() { }
|
||||||
|
Loading…
x
Reference in New Issue
Block a user