Patch level : 10 ha
Files correlati : Ricompilazione Demo : [ ] Commento : programmi di conversione hardy git-svn-id: svn://10.65.10.50/branches/R_10_00@21022 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
d7b150ce6a
commit
ad6626fa43
15
ha/hacnv.cpp
Executable file
15
ha/hacnv.cpp
Executable file
@ -0,0 +1,15 @@
|
|||||||
|
#include <xvt.h>
|
||||||
|
#include "hacnv.h"
|
||||||
|
|
||||||
|
int main(int argc, char** argv)
|
||||||
|
{
|
||||||
|
const int n = argc > 1 ? argv[1][1]-'0' : 0;
|
||||||
|
switch (n)
|
||||||
|
{
|
||||||
|
case 0:
|
||||||
|
default:
|
||||||
|
hacnv100(argc, argv); //importazione Hardy
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
1
ha/hacnv.h
Executable file
1
ha/hacnv.h
Executable file
@ -0,0 +1 @@
|
|||||||
|
int hacnv100(int argc, char* argv[]);
|
801
ha/hacnv100.cpp
Executable file
801
ha/hacnv100.cpp
Executable file
@ -0,0 +1,801 @@
|
|||||||
|
#include "hacnv100.h"
|
||||||
|
#include "hacnv100a.h"
|
||||||
|
|
||||||
|
#include <applicat.h>
|
||||||
|
#include <automask.h>
|
||||||
|
#include <defmask.h>
|
||||||
|
#include <progind.h>
|
||||||
|
#include <reprint.h>
|
||||||
|
#include <reputils.h>
|
||||||
|
#include <tabutil.h>
|
||||||
|
|
||||||
|
const char* const APPNAME = TR("Importazione anagrafiche HARDY");
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////
|
||||||
|
// THardy_log
|
||||||
|
///////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
class THardy_log : public TLog_report
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
THardy_log() : TLog_report(APPNAME) {}
|
||||||
|
};
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////
|
||||||
|
// THardy_iterator
|
||||||
|
///////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
bool THardy_iterator::cancelled() const
|
||||||
|
{
|
||||||
|
return _pi != NULL && _pi->iscancelled();
|
||||||
|
}
|
||||||
|
|
||||||
|
bool THardy_iterator::ok() const
|
||||||
|
{
|
||||||
|
if (cancelled())
|
||||||
|
return _ht->log_cancelled();
|
||||||
|
return _rec >= 0 && _rec < _ht->recordset().items();
|
||||||
|
}
|
||||||
|
|
||||||
|
THardy_iterator& THardy_iterator::operator=(TRecnotype n)
|
||||||
|
{
|
||||||
|
if (_pi != NULL)
|
||||||
|
_pi->setstatus(n+1);
|
||||||
|
_ht->recordset().move_to(_rec = n);
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
|
||||||
|
THardy_iterator& THardy_iterator::operator++()
|
||||||
|
{
|
||||||
|
return *this = ++_rec;
|
||||||
|
}
|
||||||
|
|
||||||
|
THardy_iterator::THardy_iterator(THardy_transfer* ht) : _ht(ht), _pi(NULL)
|
||||||
|
{
|
||||||
|
const TRecnotype tot = _ht->recordset().items();
|
||||||
|
TString title;
|
||||||
|
title << _ht->title() << ": " << tot << ' ' << TR("righe");
|
||||||
|
if (tot > 1)
|
||||||
|
_pi = new TProgind(tot, title, true, true);
|
||||||
|
else
|
||||||
|
::begin_wait();
|
||||||
|
|
||||||
|
if (tot > 0)
|
||||||
|
_ht->log(title);
|
||||||
|
|
||||||
|
_rec = -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
THardy_iterator::~THardy_iterator()
|
||||||
|
{
|
||||||
|
if (_pi != NULL)
|
||||||
|
delete _pi;
|
||||||
|
else
|
||||||
|
::end_wait();
|
||||||
|
}
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////
|
||||||
|
// Cache tabelle
|
||||||
|
///////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
class TCache_tab : public TCache_th
|
||||||
|
{
|
||||||
|
protected:
|
||||||
|
virtual TObject* key2obj(const char* key);
|
||||||
|
|
||||||
|
public:
|
||||||
|
virtual const TString& decode(const TToken_string& cod_codtab);
|
||||||
|
TCache_tab(THardy_transfer* ht) : TCache_th(ht) {}
|
||||||
|
};
|
||||||
|
|
||||||
|
const TString& TCache_tab::decode(const TToken_string& cod_codtab)
|
||||||
|
{
|
||||||
|
TString4 cod; cod_codtab.get(0, cod);
|
||||||
|
if (cod.full())
|
||||||
|
{
|
||||||
|
const TRectype& rec = *(const TRectype*)objptr(cod_codtab);
|
||||||
|
if (!rec.empty())
|
||||||
|
{
|
||||||
|
const char* field = "CODTAB";
|
||||||
|
if (cod == "%TPM" || cod == "%TPP" || cod == "%TPI") // Tipo trasporto e porto
|
||||||
|
field = "S6";
|
||||||
|
return rec.get(field);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return EMPTY_STRING;
|
||||||
|
}
|
||||||
|
|
||||||
|
TObject* TCache_tab::key2obj(const char* key)
|
||||||
|
{
|
||||||
|
TToken_string tok(key);
|
||||||
|
TString4 tab = tok.get(); tab.upper();
|
||||||
|
TString80 cod = tok.get(); cod.upper();
|
||||||
|
|
||||||
|
if (tab == "%IVA")
|
||||||
|
{
|
||||||
|
// Campo non digerisce i codici IVA numerici di un solo carattere
|
||||||
|
if (cod.len() < 2 && isdigit(cod[0]))
|
||||||
|
cod.right_just(2, '0'); // per cui aggiungo uno 0 iniziale
|
||||||
|
}
|
||||||
|
|
||||||
|
TTable table(tab);
|
||||||
|
table.put("CODTAB", cod);
|
||||||
|
if (table.read() != NOERR)
|
||||||
|
{
|
||||||
|
table.zero();
|
||||||
|
table.put("CODTAB", cod);
|
||||||
|
table.put("S0", cod);
|
||||||
|
test_write(table);
|
||||||
|
}
|
||||||
|
return table.curr().dup();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////
|
||||||
|
// THardy_transfer
|
||||||
|
///////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void THardy_transfer::init(const char* title, const char* qry_hdr, THardy_log& log)
|
||||||
|
{
|
||||||
|
_log = &log;
|
||||||
|
_log->reset();
|
||||||
|
_log->set_title(title);
|
||||||
|
_query_header = qry_hdr;
|
||||||
|
_write_enabled = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
const TString& THardy_transfer::title() const
|
||||||
|
{ return _log->title(); }
|
||||||
|
|
||||||
|
void THardy_transfer::log(const char* msg, int sev) const
|
||||||
|
{
|
||||||
|
_log->log(sev, msg);
|
||||||
|
}
|
||||||
|
|
||||||
|
TRecordset& THardy_transfer::create_recordset(const char* query)
|
||||||
|
{
|
||||||
|
if (_recset != NULL)
|
||||||
|
{
|
||||||
|
delete _recset;
|
||||||
|
_recset = NULL;
|
||||||
|
}
|
||||||
|
if (_outset != NULL)
|
||||||
|
{
|
||||||
|
_outset->exec("COMMIT TRANS");
|
||||||
|
delete _outset;
|
||||||
|
_outset = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
TString qry = query;
|
||||||
|
if (!qry.starts_with("US") && !qry.starts_with("ODBC"))
|
||||||
|
qry.insert(query_header());
|
||||||
|
_recset = ::create_recordset(qry);
|
||||||
|
return *_recset;
|
||||||
|
}
|
||||||
|
|
||||||
|
const TRecordset& THardy_transfer::recordset() const
|
||||||
|
{
|
||||||
|
CHECK(_recset != NULL, "NULL recordset");
|
||||||
|
return *_recset;
|
||||||
|
}
|
||||||
|
|
||||||
|
TRecordset& THardy_transfer::recordset()
|
||||||
|
{
|
||||||
|
CHECK(_recset != NULL, "NULL recordset");
|
||||||
|
return *_recset;
|
||||||
|
}
|
||||||
|
|
||||||
|
long THardy_transfer::odbc_exec(const char* cmd)
|
||||||
|
{
|
||||||
|
long err = 0;
|
||||||
|
if (_write_enabled)
|
||||||
|
{
|
||||||
|
if (_outset == NULL)
|
||||||
|
{
|
||||||
|
_outset = new TODBC_recordset(query_header());
|
||||||
|
err = _outset->exec("BEGIN TRANS");
|
||||||
|
}
|
||||||
|
if (err >= 0)
|
||||||
|
{
|
||||||
|
err = _outset->exec(cmd);
|
||||||
|
if (err < 0)
|
||||||
|
{
|
||||||
|
log("", 0); // Salto una riga
|
||||||
|
TParagraph_string msg(cmd, 100);
|
||||||
|
FOR_EACH_TOKEN(msg, str)
|
||||||
|
log(str, 0); // Riporto tutta la query
|
||||||
|
log_error(TR("ERRORE in esecuzione della query."));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
TString msg;
|
||||||
|
msg << TR("ERRORE di connessione a ") << _outset->dsn() << " : BEGIN TRANS";
|
||||||
|
log_error(msg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return err;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool THardy_transfer::log_error(const char* msg)
|
||||||
|
{
|
||||||
|
log(msg, 2);
|
||||||
|
if (_write_enabled)
|
||||||
|
{
|
||||||
|
_write_enabled = false;
|
||||||
|
log("");
|
||||||
|
log(TR("LA SCRITTURA SUGLI ARCHIVI VIENE DISABILITATA DA QUESTO MOMENTO IN POI"), 2);
|
||||||
|
log("");
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool THardy_transfer::log_cancelled()
|
||||||
|
{
|
||||||
|
return log_error(TR("Procedura interrotta dall'utente"));
|
||||||
|
}
|
||||||
|
|
||||||
|
bool THardy_transfer::test_write(TBaseisamfile& file)
|
||||||
|
{
|
||||||
|
int err = NOERR;
|
||||||
|
if (_write_enabled)
|
||||||
|
{
|
||||||
|
err = file.write_rewrite();
|
||||||
|
if (err != NOERR)
|
||||||
|
{
|
||||||
|
TString msg;
|
||||||
|
TString80 code, desc;
|
||||||
|
const int logic = file.num();
|
||||||
|
if (logic == LF_TAB || logic == LF_TABCOM || logic == LF_TABMOD)
|
||||||
|
{
|
||||||
|
code = file.get("CODTAB");
|
||||||
|
desc = file.get("S0");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
code = file.curr().build_key(1);
|
||||||
|
desc = file.curr().build_key(2);
|
||||||
|
}
|
||||||
|
msg.format(FR("Errore %d durante la scrittura sul file %d: %s - %s"),
|
||||||
|
err, logic, (const char*)code, (const char*)desc);
|
||||||
|
log_error(msg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return err == NOERR;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
const TString& THardy_transfer::get_str(const char* field) const
|
||||||
|
{
|
||||||
|
return recordset().get(field).as_string();
|
||||||
|
}
|
||||||
|
|
||||||
|
const TString& THardy_transfer::get_real_str(const char* campo) const
|
||||||
|
{
|
||||||
|
const TVariant& var = recordset().get(campo);
|
||||||
|
if (var.is_zero())
|
||||||
|
return EMPTY_STRING;
|
||||||
|
return var.as_string();
|
||||||
|
}
|
||||||
|
|
||||||
|
long THardy_transfer::get_long(const char* field) const
|
||||||
|
{
|
||||||
|
return recordset().get(field).as_int();
|
||||||
|
}
|
||||||
|
|
||||||
|
const TString& THardy_transfer::decode_value(const char* tab, const TString& cod)
|
||||||
|
{
|
||||||
|
if (cod.full())
|
||||||
|
{
|
||||||
|
if (_tab == NULL)
|
||||||
|
_tab = new TCache_tab(this);
|
||||||
|
TToken_string tok; tok.add(tab); tok.add(cod);
|
||||||
|
return _tab->decode(tok);
|
||||||
|
}
|
||||||
|
return EMPTY_STRING;
|
||||||
|
}
|
||||||
|
|
||||||
|
const TString& THardy_transfer::decode_field(const char* tab, const char* field)
|
||||||
|
{
|
||||||
|
const TString& cod = get_str(field);
|
||||||
|
return decode_value(tab, cod);
|
||||||
|
}
|
||||||
|
|
||||||
|
const TString& THardy_transfer::build_insert_query(const char* table, const char* f, const char* v) const
|
||||||
|
{
|
||||||
|
TString qry(255);
|
||||||
|
|
||||||
|
qry << "INSERT INTO " << table;
|
||||||
|
|
||||||
|
TAuto_token_string fields(f);
|
||||||
|
TToken_string values(v);
|
||||||
|
if (fields.items() > 0)
|
||||||
|
{
|
||||||
|
qry << " (";
|
||||||
|
FOR_EACH_TOKEN(fields, tok)
|
||||||
|
qry << tok << ',';
|
||||||
|
qry.rtrim(1);
|
||||||
|
qry << ')';
|
||||||
|
}
|
||||||
|
qry << " VALUES (";
|
||||||
|
|
||||||
|
TString tmp;
|
||||||
|
FOR_EACH_TOKEN(values, tok)
|
||||||
|
{
|
||||||
|
tmp = tok;
|
||||||
|
if (tmp.full() && !tmp.starts_with("0") && real::is_natural(tmp))
|
||||||
|
qry << tok;
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (tmp[0] != '\'')
|
||||||
|
{
|
||||||
|
for (int i = tmp.len()-1; i >= 0; i--)
|
||||||
|
{
|
||||||
|
if (tmp[i] == '\'')
|
||||||
|
tmp.insert("'", i);
|
||||||
|
}
|
||||||
|
qry << '\'' << tmp << '\'';
|
||||||
|
}
|
||||||
|
else
|
||||||
|
qry << tmp;
|
||||||
|
}
|
||||||
|
qry << ',';
|
||||||
|
}
|
||||||
|
qry.rtrim(1);
|
||||||
|
qry << ')';
|
||||||
|
|
||||||
|
return get_tmp_string() = qry;
|
||||||
|
}
|
||||||
|
|
||||||
|
THardy_transfer::THardy_transfer()
|
||||||
|
: _log(NULL), _config("hacnv100a.ini"), _recset(NULL), _outset(NULL), _tab(NULL)
|
||||||
|
{}
|
||||||
|
|
||||||
|
THardy_transfer::~THardy_transfer()
|
||||||
|
{
|
||||||
|
if (_tab != NULL)
|
||||||
|
delete _tab;
|
||||||
|
if (_outset != NULL)
|
||||||
|
{
|
||||||
|
_outset->exec("COMMIT TRANS");
|
||||||
|
delete _outset;
|
||||||
|
}
|
||||||
|
if (_recset != NULL)
|
||||||
|
delete _recset;
|
||||||
|
}
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////
|
||||||
|
// THardy_pag
|
||||||
|
///////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void THardy_pag::aggiorna_record(TRectype& rec, const TString_array& lista_campi)
|
||||||
|
{
|
||||||
|
TString campo_dest, campo_orig, valore, str;
|
||||||
|
|
||||||
|
FOR_EACH_ARRAY_ROW(lista_campi,i,row)
|
||||||
|
{
|
||||||
|
row->get(0, campo_dest);
|
||||||
|
row->get(1, campo_orig);
|
||||||
|
if (campo_orig.full())
|
||||||
|
{
|
||||||
|
valore = get_str(campo_orig);
|
||||||
|
rec.put(campo_dest, valore);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
bool THardy_pag::trasferisci()
|
||||||
|
{
|
||||||
|
TString query =
|
||||||
|
"SELECT * "
|
||||||
|
"FROM dbo.Pagamenti ";
|
||||||
|
|
||||||
|
TRecordset& recset = create_recordset(query);
|
||||||
|
|
||||||
|
TString str;
|
||||||
|
|
||||||
|
TConfig& ini = config();
|
||||||
|
TString_array lista_campi;
|
||||||
|
ini.list_variables(lista_campi, true, "CPG", true);
|
||||||
|
|
||||||
|
TTable table("%CPG");
|
||||||
|
TRectype& rec = table.curr();
|
||||||
|
|
||||||
|
THardy_iterator hi(this);
|
||||||
|
while (++hi)
|
||||||
|
{
|
||||||
|
const TString& codtab = get_str("IdPagamento");
|
||||||
|
rec.zero();
|
||||||
|
rec.put("CODTAB", codtab);
|
||||||
|
aggiorna_record(rec, lista_campi);
|
||||||
|
|
||||||
|
test_write(table);
|
||||||
|
}
|
||||||
|
return write_enabled();
|
||||||
|
}
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////
|
||||||
|
// THardy_iva
|
||||||
|
///////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void THardy_iva::aggiorna_record(TRectype& rec, const TString_array& lista_campi)
|
||||||
|
{
|
||||||
|
TString campo_dest, campo_orig, valore, str;
|
||||||
|
|
||||||
|
FOR_EACH_ARRAY_ROW(lista_campi,i,row)
|
||||||
|
{
|
||||||
|
row->get(0, campo_dest);
|
||||||
|
row->get(1, campo_orig);
|
||||||
|
if (campo_orig.full())
|
||||||
|
{
|
||||||
|
valore = get_str(campo_orig);
|
||||||
|
rec.put(campo_dest, valore);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
bool THardy_iva::trasferisci()
|
||||||
|
{
|
||||||
|
TString query =
|
||||||
|
"SELECT * "
|
||||||
|
"FROM dbo.AliquoteIVA ";
|
||||||
|
|
||||||
|
TRecordset& recset = create_recordset(query);
|
||||||
|
|
||||||
|
TString str;
|
||||||
|
|
||||||
|
TConfig& ini = config();
|
||||||
|
TString_array lista_campi;
|
||||||
|
ini.list_variables(lista_campi, true, "IVA", true);
|
||||||
|
|
||||||
|
TTable table("%IVA");
|
||||||
|
TRectype& rec = table.curr();
|
||||||
|
|
||||||
|
THardy_iterator hi(this);
|
||||||
|
while (++hi)
|
||||||
|
{
|
||||||
|
const TString& codtab = get_str("IdIva");
|
||||||
|
rec.zero();
|
||||||
|
rec.put("CODTAB", codtab);
|
||||||
|
aggiorna_record(rec, lista_campi);
|
||||||
|
test_write(table);
|
||||||
|
}
|
||||||
|
return write_enabled();
|
||||||
|
}
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////
|
||||||
|
// THardy_catmerc
|
||||||
|
///////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void THardy_catmerc::aggiorna_record(TRectype& rec, const TString_array& lista_campi)
|
||||||
|
{
|
||||||
|
TString campo_dest, campo_orig, valore, str;
|
||||||
|
|
||||||
|
FOR_EACH_ARRAY_ROW(lista_campi,i,row)
|
||||||
|
{
|
||||||
|
row->get(0, campo_dest);
|
||||||
|
row->get(1, campo_orig);
|
||||||
|
if (campo_orig.full())
|
||||||
|
{
|
||||||
|
valore = get_str(campo_orig);
|
||||||
|
rec.put(campo_dest, valore);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
bool THardy_catmerc::trasferisci()
|
||||||
|
{
|
||||||
|
TString query =
|
||||||
|
"SELECT * "
|
||||||
|
"FROM dbo.CategorieMerc ";
|
||||||
|
|
||||||
|
TRecordset& recset = create_recordset(query);
|
||||||
|
|
||||||
|
TString str;
|
||||||
|
|
||||||
|
TConfig& ini = config();
|
||||||
|
TString_array lista_campi;
|
||||||
|
ini.list_variables(lista_campi, true, "GMC", true);
|
||||||
|
|
||||||
|
TTable table("%GMC");
|
||||||
|
TRectype& rec = table.curr();
|
||||||
|
|
||||||
|
THardy_iterator hi(this);
|
||||||
|
while (++hi)
|
||||||
|
{
|
||||||
|
const TString& codtab = get_str("IdCategoria");
|
||||||
|
rec.zero();
|
||||||
|
rec.put("CODTAB", codtab);
|
||||||
|
aggiorna_record(rec, lista_campi);
|
||||||
|
test_write(table);
|
||||||
|
}
|
||||||
|
return write_enabled();
|
||||||
|
}
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////
|
||||||
|
// THardy_catfisc
|
||||||
|
///////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void THardy_catfisc::aggiorna_record(TRectype& rec, const TString_array& lista_campi)
|
||||||
|
{
|
||||||
|
TString campo_dest, campo_orig, valore, str;
|
||||||
|
|
||||||
|
FOR_EACH_ARRAY_ROW(lista_campi,i,row)
|
||||||
|
{
|
||||||
|
row->get(0, campo_dest);
|
||||||
|
row->get(1, campo_orig);
|
||||||
|
if (campo_orig.full())
|
||||||
|
{
|
||||||
|
valore = get_str(campo_orig);
|
||||||
|
rec.put(campo_dest, valore);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
bool THardy_catfisc::trasferisci()
|
||||||
|
{
|
||||||
|
TString query =
|
||||||
|
"SELECT * "
|
||||||
|
"FROM dbo.CategorieFisc ";
|
||||||
|
|
||||||
|
TRecordset& recset = create_recordset(query);
|
||||||
|
|
||||||
|
TString str;
|
||||||
|
|
||||||
|
TConfig& ini = config();
|
||||||
|
TString_array lista_campi;
|
||||||
|
ini.list_variables(lista_campi, true, "ASF", true);
|
||||||
|
|
||||||
|
TTable table("%ASF");
|
||||||
|
TRectype& rec = table.curr();
|
||||||
|
|
||||||
|
THardy_iterator hi(this);
|
||||||
|
while (++hi)
|
||||||
|
{
|
||||||
|
const TString& codtab = get_str("IdCategoria");
|
||||||
|
rec.zero();
|
||||||
|
rec.put("CODTAB", codtab);
|
||||||
|
aggiorna_record(rec, lista_campi);
|
||||||
|
test_write(table);
|
||||||
|
}
|
||||||
|
return write_enabled();
|
||||||
|
}
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////
|
||||||
|
// THardy_ban
|
||||||
|
///////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void THardy_ban::aggiorna_record(TRectype& rec, const TString_array& lista_campi)
|
||||||
|
{
|
||||||
|
TString campo_dest, campo_orig, valore, str;
|
||||||
|
|
||||||
|
FOR_EACH_ARRAY_ROW(lista_campi,i,row)
|
||||||
|
{
|
||||||
|
row->get(0, campo_dest);
|
||||||
|
row->get(1, campo_orig);
|
||||||
|
if (campo_orig.full())
|
||||||
|
{
|
||||||
|
valore = get_str(campo_orig);
|
||||||
|
rec.put(campo_dest, valore);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
bool THardy_ban::trasferisci()
|
||||||
|
{
|
||||||
|
bool ok = trasferisci_abi();
|
||||||
|
if (ok)
|
||||||
|
ok = trasferisci_cab();
|
||||||
|
return ok;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool THardy_ban::trasferisci_abi()
|
||||||
|
{
|
||||||
|
TString query =
|
||||||
|
"SELECT * "
|
||||||
|
"FROM dbo.Banche ";
|
||||||
|
|
||||||
|
TRecordset& recset = create_recordset(query);
|
||||||
|
|
||||||
|
TString str;
|
||||||
|
|
||||||
|
TConfig& ini = config();
|
||||||
|
TString_array lista_campi;
|
||||||
|
ini.list_variables(lista_campi, true, "ABI", true);
|
||||||
|
|
||||||
|
TSystemisamfile table(LF_TABCOM);
|
||||||
|
table.open(_lock);
|
||||||
|
|
||||||
|
TRectype& rec = table.curr();
|
||||||
|
|
||||||
|
THardy_iterator hi(this);
|
||||||
|
while (++hi)
|
||||||
|
{
|
||||||
|
TString16 codtab = get_str("IdBanca");
|
||||||
|
codtab.lpad(5,'0');
|
||||||
|
rec.zero();
|
||||||
|
rec.put("CODTAB", codtab);
|
||||||
|
aggiorna_record(rec, lista_campi);
|
||||||
|
test_write(table);
|
||||||
|
}
|
||||||
|
table.close();
|
||||||
|
return write_enabled();
|
||||||
|
}
|
||||||
|
|
||||||
|
bool THardy_ban::trasferisci_cab()
|
||||||
|
{
|
||||||
|
TString query =
|
||||||
|
"SELECT * "
|
||||||
|
"FROM dbo.Agenzie ";
|
||||||
|
|
||||||
|
TRecordset& recset = create_recordset(query);
|
||||||
|
|
||||||
|
TString str;
|
||||||
|
|
||||||
|
TConfig& ini = config();
|
||||||
|
TString_array lista_campi;
|
||||||
|
ini.list_variables(lista_campi, true, "CAB", true);
|
||||||
|
|
||||||
|
TSystemisamfile table(LF_TABCOM);
|
||||||
|
table.open(_lock);
|
||||||
|
|
||||||
|
TRectype& rec = table.curr();
|
||||||
|
|
||||||
|
THardy_iterator hi(this);
|
||||||
|
while (++hi)
|
||||||
|
{
|
||||||
|
TString16 codtab = get_str("IdBanca");
|
||||||
|
codtab.lpad(5,'0');
|
||||||
|
codtab << get_str("Cab");
|
||||||
|
rec.zero();
|
||||||
|
rec.put("COD", "BAN");
|
||||||
|
rec.put("CODTAB", codtab);
|
||||||
|
aggiorna_record(rec, lista_campi);
|
||||||
|
test_write(table);
|
||||||
|
}
|
||||||
|
table.close();
|
||||||
|
return write_enabled();
|
||||||
|
}
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////
|
||||||
|
// TImportazioneHardy_mask
|
||||||
|
///////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
class TImportazioneHardy_mask : public TAutomask
|
||||||
|
{
|
||||||
|
protected:
|
||||||
|
virtual bool on_field_event(TOperable_field& o, TField_event e, long jolly);
|
||||||
|
void serialize(bool bSave);
|
||||||
|
|
||||||
|
public:
|
||||||
|
void trasferisci();
|
||||||
|
|
||||||
|
TImportazioneHardy_mask();
|
||||||
|
virtual ~TImportazioneHardy_mask();
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
// Funzione di tarsferimento dati da/verso file .ini con lo stesso nome della maschera
|
||||||
|
// Andrebbe messo in libreria
|
||||||
|
void TImportazioneHardy_mask::serialize(bool bSave)
|
||||||
|
{
|
||||||
|
TFilename n = source_file(); n.ext("ini"); // Construisce il nome del .ini in base al .msk
|
||||||
|
TConfig cfg(n, "Main"); // Crea il file di configurazione
|
||||||
|
TString4 id;
|
||||||
|
for (int i = fields()-1; i >= 0; i--) // Scandisce tutti i campi della maschera ...
|
||||||
|
{
|
||||||
|
TMask_field& f = fld(i);
|
||||||
|
if (f.active() && f.is_loadable()) // ... selezionando solo quelli editabili
|
||||||
|
{
|
||||||
|
id.format("%d", f.dlg());
|
||||||
|
if (bSave) // A seconda del flag di scrittura ...
|
||||||
|
cfg.set(id, f.get()); // ... o scrive sul .ini
|
||||||
|
else
|
||||||
|
f.set(cfg.get(id)); // ... o legge dal .ini
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void TImportazioneHardy_mask::trasferisci()
|
||||||
|
{
|
||||||
|
TString query_header;
|
||||||
|
query_header << "ODBC(" << get(F_DSN) << ',' << get(F_USR) << ',' << get(F_PWD) << ")\n";
|
||||||
|
|
||||||
|
TReport_book book;
|
||||||
|
THardy_log log;
|
||||||
|
|
||||||
|
bool rep_to_print = false;
|
||||||
|
bool go_on = true;
|
||||||
|
|
||||||
|
if (go_on && get_bool(F_PAG))
|
||||||
|
{
|
||||||
|
THardy_pag pc;
|
||||||
|
pc.init(TR("Condizioni di pagamento"), query_header, log);
|
||||||
|
go_on = pc.trasferisci();
|
||||||
|
book.add(log);
|
||||||
|
rep_to_print = true;
|
||||||
|
}
|
||||||
|
if (go_on && get_bool(F_IVA))
|
||||||
|
{
|
||||||
|
THardy_iva pc;
|
||||||
|
pc.init(TR("Aliquote IVA"), query_header, log);
|
||||||
|
go_on = pc.trasferisci();
|
||||||
|
book.add(log);
|
||||||
|
rep_to_print = true;
|
||||||
|
}
|
||||||
|
if (go_on && get_bool(F_CATMERC))
|
||||||
|
{
|
||||||
|
THardy_catmerc pc;
|
||||||
|
pc.init(TR("Categorie merceologiche"), query_header, log);
|
||||||
|
go_on = pc.trasferisci();
|
||||||
|
book.add(log);
|
||||||
|
rep_to_print = true;
|
||||||
|
}
|
||||||
|
if (go_on && get_bool(F_CATFISC))
|
||||||
|
{
|
||||||
|
THardy_catfisc pc;
|
||||||
|
pc.init(TR("Categorie fiscali"), query_header, log);
|
||||||
|
go_on = pc.trasferisci();
|
||||||
|
book.add(log);
|
||||||
|
rep_to_print = true;
|
||||||
|
}
|
||||||
|
if (go_on && get_bool(F_BAN))
|
||||||
|
{
|
||||||
|
THardy_ban pc;
|
||||||
|
pc.init(TR("Banche"), query_header, log);
|
||||||
|
go_on = pc.trasferisci();
|
||||||
|
book.add(log);
|
||||||
|
rep_to_print = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (rep_to_print && book.pages() > 0)
|
||||||
|
book.preview();
|
||||||
|
}
|
||||||
|
|
||||||
|
bool TImportazioneHardy_mask::on_field_event(TOperable_field& o, TField_event e, long jolly)
|
||||||
|
{
|
||||||
|
switch (o.dlg())
|
||||||
|
{
|
||||||
|
case DLG_OK:
|
||||||
|
if (e == fe_button)
|
||||||
|
serialize(true);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
TImportazioneHardy_mask::TImportazioneHardy_mask() : TAutomask("hacnv100a")
|
||||||
|
{
|
||||||
|
serialize(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
TImportazioneHardy_mask::~TImportazioneHardy_mask()
|
||||||
|
{ }
|
||||||
|
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////
|
||||||
|
// TImportazioneHardy
|
||||||
|
///////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
class TImportazioneHardy : public TSkeleton_application
|
||||||
|
{
|
||||||
|
protected:
|
||||||
|
virtual void main_loop();
|
||||||
|
};
|
||||||
|
|
||||||
|
void TImportazioneHardy::main_loop()
|
||||||
|
{
|
||||||
|
TImportazioneHardy_mask mask;
|
||||||
|
while (mask.run() == K_ENTER)
|
||||||
|
mask.trasferisci();
|
||||||
|
}
|
||||||
|
|
||||||
|
int hacnv100(int argc, char* argv[])
|
||||||
|
{
|
||||||
|
TImportazioneHardy ih;
|
||||||
|
ih.run(argc, argv, APPNAME);
|
||||||
|
return 0;
|
||||||
|
}
|
236
ha/hacnv100.h
Executable file
236
ha/hacnv100.h
Executable file
@ -0,0 +1,236 @@
|
|||||||
|
#ifndef __HACNV100_H
|
||||||
|
#define __HACNV100_H
|
||||||
|
|
||||||
|
#ifndef __CONFIG_H
|
||||||
|
#include <config.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef __DICTION_H
|
||||||
|
#include <diction.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef __ISAM_H
|
||||||
|
#include <isam.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef __ODBCRECSET_H
|
||||||
|
#include <odbcrset.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef __PROGIND_H
|
||||||
|
class TProgind;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef __MODAUT_H
|
||||||
|
#include <modaut.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef __CLIFOR_H
|
||||||
|
#include "../ve/clifor.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include "../ve/velib.h"
|
||||||
|
|
||||||
|
class THardy_log;
|
||||||
|
class TCache_th;
|
||||||
|
|
||||||
|
class THardy_transfer : public TObject
|
||||||
|
{
|
||||||
|
TString _query_header;
|
||||||
|
THardy_log* _log;
|
||||||
|
TConfig _config;
|
||||||
|
|
||||||
|
TRecordset* _recset;
|
||||||
|
bool _write_enabled;
|
||||||
|
TODBC_recordset* _outset;
|
||||||
|
TCache_th* _tab;
|
||||||
|
|
||||||
|
protected:
|
||||||
|
const TString& build_insert_query(const char* table, const char* f, const char* v) const;
|
||||||
|
|
||||||
|
TRecordset& create_recordset(const char* query);
|
||||||
|
long odbc_exec(const char* command);
|
||||||
|
|
||||||
|
const TString& decode_value(const char* tab, const TString& field_value);
|
||||||
|
const TString& decode_field(const char* tab, const char* recset_field);
|
||||||
|
|
||||||
|
THardy_transfer();
|
||||||
|
virtual bool trasferisci() pure;
|
||||||
|
|
||||||
|
public:
|
||||||
|
void init(const char* rh, const char* qh, THardy_log& log);
|
||||||
|
const TString& title() const;
|
||||||
|
TConfig& config() { return _config; }
|
||||||
|
const TString& query_header() const { return _query_header; }
|
||||||
|
|
||||||
|
void log(const char* msg, int sev = 0) const;
|
||||||
|
bool log_error(const char* msg);
|
||||||
|
bool log_cancelled();
|
||||||
|
const TRecordset& recordset() const;
|
||||||
|
TRecordset& recordset();
|
||||||
|
|
||||||
|
const TString& get_str(const char* campo) const; // Get string from current recordset
|
||||||
|
const TString& get_real_str(const char* campo) const; // Get eventually empty string from numeric field
|
||||||
|
long get_long(const char* campo) const;
|
||||||
|
|
||||||
|
bool write_enabled() const { return _write_enabled; }
|
||||||
|
|
||||||
|
bool test_write(TBaseisamfile& file);
|
||||||
|
|
||||||
|
virtual ~THardy_transfer();
|
||||||
|
};
|
||||||
|
|
||||||
|
class THardy_iterator
|
||||||
|
{
|
||||||
|
THardy_transfer* _ht;
|
||||||
|
TProgind* _pi;
|
||||||
|
TRecnotype _rec;
|
||||||
|
|
||||||
|
public:
|
||||||
|
bool ok() const;
|
||||||
|
bool cancelled() const;
|
||||||
|
THardy_iterator& operator=(TRecnotype n);
|
||||||
|
THardy_iterator& operator++();
|
||||||
|
operator int() const { return ok(); }
|
||||||
|
|
||||||
|
THardy_iterator(THardy_transfer* ht);
|
||||||
|
~THardy_iterator();
|
||||||
|
};
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////
|
||||||
|
// Cache generica per il trasferimento
|
||||||
|
///////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
class TCache_th : public TCache
|
||||||
|
{
|
||||||
|
THardy_transfer* _ht;
|
||||||
|
|
||||||
|
protected:
|
||||||
|
void log(const char* msg, int sev) const { _ht->log(msg, sev); }
|
||||||
|
bool test_write(TBaseisamfile& file) const { return _ht->test_write(file); }
|
||||||
|
const TRecordset& recordset() const { return _ht->recordset(); }
|
||||||
|
TConfig& config() const { return _ht->config(); }
|
||||||
|
const TString& query_header() const { return _ht->query_header(); }
|
||||||
|
|
||||||
|
public:
|
||||||
|
const TString& get_str(const char* campo) const { return _ht->get_str(campo); }
|
||||||
|
const TString& get_real_str(const char* campo) const { return _ht->get_real_str(campo); }
|
||||||
|
long get_long(const char* campo) const { return _ht->get_long(campo); }
|
||||||
|
virtual const TString& decode(const TToken_string& tokens) pure;
|
||||||
|
|
||||||
|
TCache_th(THardy_transfer* ht) : _ht(ht) {}
|
||||||
|
};
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////
|
||||||
|
// Trasferimenti veri e propri
|
||||||
|
///////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
class THardy_conti : public THardy_transfer
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
virtual bool trasferisci();
|
||||||
|
};
|
||||||
|
|
||||||
|
class THardy_pag : public THardy_transfer
|
||||||
|
{
|
||||||
|
protected:
|
||||||
|
void aggiorna_record(TRectype& rec, const TString_array& lista_campi);
|
||||||
|
|
||||||
|
public:
|
||||||
|
virtual bool trasferisci();
|
||||||
|
};
|
||||||
|
|
||||||
|
class THardy_iva : public THardy_transfer
|
||||||
|
{
|
||||||
|
protected:
|
||||||
|
void aggiorna_record(TRectype& rec, const TString_array& lista_campi);
|
||||||
|
|
||||||
|
public:
|
||||||
|
virtual bool trasferisci();
|
||||||
|
};
|
||||||
|
|
||||||
|
class THardy_catmerc : public THardy_transfer
|
||||||
|
{
|
||||||
|
protected:
|
||||||
|
void aggiorna_record(TRectype& rec, const TString_array& lista_campi);
|
||||||
|
|
||||||
|
public:
|
||||||
|
virtual bool trasferisci();
|
||||||
|
};
|
||||||
|
|
||||||
|
class THardy_catfisc : public THardy_transfer
|
||||||
|
{
|
||||||
|
protected:
|
||||||
|
void aggiorna_record(TRectype& rec, const TString_array& lista_campi);
|
||||||
|
|
||||||
|
public:
|
||||||
|
virtual bool trasferisci();
|
||||||
|
};
|
||||||
|
|
||||||
|
class THardy_ban : public THardy_transfer
|
||||||
|
{
|
||||||
|
protected:
|
||||||
|
void aggiorna_record(TRectype& rec, const TString_array& lista_campi);
|
||||||
|
bool trasferisci_abi();
|
||||||
|
bool trasferisci_cab();
|
||||||
|
|
||||||
|
public:
|
||||||
|
virtual bool trasferisci();
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
class THardy_clifo : public THardy_transfer
|
||||||
|
{
|
||||||
|
TCache_th* _agenti;
|
||||||
|
TCache_th* _banche;
|
||||||
|
bool _only_agenti;
|
||||||
|
|
||||||
|
protected:
|
||||||
|
int cancella_clifo(TLocalisamfile& clifo) const;
|
||||||
|
long get_next_key(const char tipocf) const;
|
||||||
|
void update_statusflag_codcontab(const TString& custsuppcode, const int statusflag, const TString& codcontab);
|
||||||
|
void aggiorna_record(TRectype& rec, const TString_array& lista_campi);
|
||||||
|
void aggiorna_banca();
|
||||||
|
void trasferisci_conai(TRectype& rec);
|
||||||
|
const TString& decode_agente(const long codforn);
|
||||||
|
const TString& get_agente();
|
||||||
|
|
||||||
|
public:
|
||||||
|
virtual bool trasferisci();
|
||||||
|
THardy_clifo(bool only_agenti);
|
||||||
|
~THardy_clifo();
|
||||||
|
};
|
||||||
|
*/
|
||||||
|
|
||||||
|
class TCache_art;
|
||||||
|
class TCache_umart;
|
||||||
|
class TDocumento;
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////
|
||||||
|
// Cache articoli
|
||||||
|
///////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
class TArticolo_hardy : public TRectype
|
||||||
|
{
|
||||||
|
TString _cust_code, _paper_comp;
|
||||||
|
|
||||||
|
TString4 _conai_scat[CONAI_CLASSES];
|
||||||
|
real _conai_peso[CONAI_CLASSES];
|
||||||
|
|
||||||
|
public:
|
||||||
|
void set_customer_code(const TString& cc) { _cust_code = cc; }
|
||||||
|
const TString& customer_code() const { return _cust_code; }
|
||||||
|
|
||||||
|
void set_paper_composition(const TString& pc) { _paper_comp = pc; }
|
||||||
|
const TString& paper_composition() const { return _paper_comp; }
|
||||||
|
|
||||||
|
const TString& conai_subclass(TCONAI_class cc) const { CHECK_CONAI(cc); return _conai_scat[cc]; }
|
||||||
|
const real& conai_weight(TCONAI_class cc) const { CHECK_CONAI(cc); return _conai_peso[cc]; }
|
||||||
|
bool set_conai(TCONAI_class cc, const TString& scat, const real& weight);
|
||||||
|
|
||||||
|
TArticolo_hardy(const TRectype& anamag);
|
||||||
|
TArticolo_hardy();
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
20
ha/hacnv100a.h
Executable file
20
ha/hacnv100a.h
Executable file
@ -0,0 +1,20 @@
|
|||||||
|
#ifndef __HACNV100A_H
|
||||||
|
#define __HACNV100A_H
|
||||||
|
|
||||||
|
#define F_FIRM 101
|
||||||
|
#define F_RAGSOC 102
|
||||||
|
|
||||||
|
#define F_PAG 111
|
||||||
|
#define F_IVA 112
|
||||||
|
#define F_CATMERC 113
|
||||||
|
#define F_CATFISC 114
|
||||||
|
#define F_BAN 115
|
||||||
|
#define F_CAUCONT 116
|
||||||
|
#define F_CAUMAG 117
|
||||||
|
#define F_CAUCESP 118
|
||||||
|
|
||||||
|
#define F_DSN 201
|
||||||
|
#define F_USR 202
|
||||||
|
#define F_PWD 203
|
||||||
|
|
||||||
|
#endif
|
262
ha/hacnv100a.ini
Executable file
262
ha/hacnv100a.ini
Executable file
@ -0,0 +1,262 @@
|
|||||||
|
// tabella condizioni di pagamento = Pagamenti
|
||||||
|
[CPG]
|
||||||
|
S0=DsPagamento
|
||||||
|
S1=
|
||||||
|
S3=
|
||||||
|
S4=IdTipoMovimento
|
||||||
|
S5=
|
||||||
|
I0=
|
||||||
|
I1=
|
||||||
|
I2=
|
||||||
|
I3=
|
||||||
|
B0=
|
||||||
|
B1=
|
||||||
|
|
||||||
|
[IdTipoMovimento]
|
||||||
|
BO=9
|
||||||
|
RB=3
|
||||||
|
RD=1
|
||||||
|
RI=8
|
||||||
|
|
||||||
|
// tabella codici IVA = AliquoteIVA
|
||||||
|
[IVA]
|
||||||
|
S0=DsIvaEstesa
|
||||||
|
S1=
|
||||||
|
S2=
|
||||||
|
S3=
|
||||||
|
S5=
|
||||||
|
S6=
|
||||||
|
S7=
|
||||||
|
S8=
|
||||||
|
S9=
|
||||||
|
S10=
|
||||||
|
S11=
|
||||||
|
I0=
|
||||||
|
I1=
|
||||||
|
R0=Aliquota
|
||||||
|
B0=
|
||||||
|
B1=
|
||||||
|
B2=
|
||||||
|
B3=
|
||||||
|
B4=
|
||||||
|
|
||||||
|
[RComunicazioneIvaVen]
|
||||||
|
1=CD11
|
||||||
|
2=CD12
|
||||||
|
3=CD13
|
||||||
|
4=CD14
|
||||||
|
|
||||||
|
[RComunicazioneIvaAcq]
|
||||||
|
1=CD21
|
||||||
|
2=CD22
|
||||||
|
3=CD23
|
||||||
|
4=CD24
|
||||||
|
|
||||||
|
// tabella gruppi merceologici = CategorieMerc
|
||||||
|
[GMC]
|
||||||
|
S0=DsCategoria
|
||||||
|
|
||||||
|
// tabella classi fiscali = CategorieFisc
|
||||||
|
[ASF]
|
||||||
|
S0=DsCategoria
|
||||||
|
|
||||||
|
// tabella Banche ABI = Banche
|
||||||
|
[ABI]
|
||||||
|
S0=DsBanca
|
||||||
|
// tabella Banche CAB = Agenzie
|
||||||
|
[CAB]
|
||||||
|
S0=DsDocumento
|
||||||
|
|
||||||
|
[CAUCONT]
|
||||||
|
S0=DsCausaleEstesa
|
||||||
|
|
||||||
|
[CLIFO]
|
||||||
|
RAGSOC = _STREXPR,LEFT(TradeName1+" "+TradeName2; 50)
|
||||||
|
INDCF = Address
|
||||||
|
CIVCF =
|
||||||
|
LOCALITACF =
|
||||||
|
STATOCF = _TAB,%TPS,State,S6
|
||||||
|
COMCF =
|
||||||
|
CAPCF = ZipCode
|
||||||
|
COFI = CodiceFiscale
|
||||||
|
STATOPAIV =
|
||||||
|
PAIV = PartitaIVA
|
||||||
|
TIPOPERS =
|
||||||
|
ALLEG =
|
||||||
|
CODALLEG =
|
||||||
|
GRUPPO =
|
||||||
|
CONTO =
|
||||||
|
GRUPPORIC =
|
||||||
|
CONTORIC =
|
||||||
|
SOTTOCRIC =
|
||||||
|
TIPOAPER =
|
||||||
|
CODANAGPER =
|
||||||
|
PTEL =
|
||||||
|
TEL = TelNumber
|
||||||
|
PTEL2 =
|
||||||
|
TEL2 =
|
||||||
|
PTEL3 =
|
||||||
|
TEL3 =
|
||||||
|
PFAX =
|
||||||
|
FAX = FaxNumber
|
||||||
|
PTELEX =
|
||||||
|
TELEX =
|
||||||
|
MAIL = EMailAddress
|
||||||
|
DATANASC =
|
||||||
|
STATONASC =
|
||||||
|
COMNASC =
|
||||||
|
CODSTAT =
|
||||||
|
CODABI = ABICode
|
||||||
|
CODCAB = CABCode
|
||||||
|
NUMCC = CC
|
||||||
|
IBAN =
|
||||||
|
OCCAS =
|
||||||
|
STATO =
|
||||||
|
CODVAL =
|
||||||
|
CODLIN =
|
||||||
|
FIDO =
|
||||||
|
CODPAG = PaymentCode
|
||||||
|
RICALT =
|
||||||
|
OGGETTI =
|
||||||
|
SOSPESO =
|
||||||
|
DIRTY =
|
||||||
|
REFERENTE = Reference
|
||||||
|
VALINTRA =
|
||||||
|
|
||||||
|
[CFVEN]
|
||||||
|
CODINDDOC =
|
||||||
|
CODNOTE =
|
||||||
|
CODLEG =
|
||||||
|
CODCATC = _TAB,TPC,CategoryCode,S6
|
||||||
|
CODZONA = _TAB,TPZ,ZoneCode,S6
|
||||||
|
CODAG =
|
||||||
|
PERCPROVV =
|
||||||
|
CAPZON =
|
||||||
|
LIQPAG =
|
||||||
|
CODPRCF =
|
||||||
|
CODINDSP =
|
||||||
|
CODNOTESP1 =
|
||||||
|
CODNOTESP2 =
|
||||||
|
CODSPMEZZO = _TAB,%TPM,TransportCode,S6
|
||||||
|
CODPORTO = _TAB,%TPP,PortCode,S6
|
||||||
|
CODVETT1 =
|
||||||
|
CODVETT2 =
|
||||||
|
CODVETT3 =
|
||||||
|
RAGGDOC =
|
||||||
|
CODCFASS =
|
||||||
|
ASSFIS = _TABCOM,%TPI,CodIvaNI,S6
|
||||||
|
FATTSOSP =
|
||||||
|
VSNRPROT = ExportOrigNum
|
||||||
|
VSDATAREG = ExportOrigDate
|
||||||
|
NSNPROT = ExportProtNum
|
||||||
|
NSDATAREG = ExportProtDate
|
||||||
|
CATFIN =
|
||||||
|
CODABIPR =
|
||||||
|
CODCABPR =
|
||||||
|
CODINDEFF =
|
||||||
|
EMEFFRICH =
|
||||||
|
RAGGEFF =
|
||||||
|
IMPMINEFF =
|
||||||
|
NONACCEFF =
|
||||||
|
NONSCADEFF =
|
||||||
|
ADDBOLLI =
|
||||||
|
PERCSPINC =
|
||||||
|
IVARID =
|
||||||
|
CATVEN =
|
||||||
|
GESTCONTR =
|
||||||
|
CODLIST =
|
||||||
|
CODSCC =
|
||||||
|
CODMAG =
|
||||||
|
CODDEP =
|
||||||
|
CODSP1 =
|
||||||
|
CODSP2 =
|
||||||
|
CODSP3 =
|
||||||
|
CODSP4 =
|
||||||
|
PROFSOLL =
|
||||||
|
MAXSOLL =
|
||||||
|
DATAESC =
|
||||||
|
NUMESC =
|
||||||
|
DATASOLL =
|
||||||
|
SCONTO = Discount
|
||||||
|
TITOLO =
|
||||||
|
RAGGOR =
|
||||||
|
MINORD =
|
||||||
|
MAXORD =
|
||||||
|
PREVORD =
|
||||||
|
TIPOEVORD =
|
||||||
|
ESACC =
|
||||||
|
ESALL =
|
||||||
|
ESCAR =
|
||||||
|
ESPLA =
|
||||||
|
ESLEG =
|
||||||
|
ESVET =
|
||||||
|
CONAIASS =
|
||||||
|
TIPODOCFAT =
|
||||||
|
CODCAUS =
|
||||||
|
|
||||||
|
[AGENTI]
|
||||||
|
RAGSOC = TradeName1
|
||||||
|
TIPO = _FISSO,A
|
||||||
|
CODCAPO =
|
||||||
|
PERCAPO =
|
||||||
|
PERCFATT =
|
||||||
|
CAMPOPROVV =
|
||||||
|
PERCPROVV = ProvvAgent
|
||||||
|
SEQRIC =
|
||||||
|
CODRICPR1 =
|
||||||
|
CODRICPR2 =
|
||||||
|
CODRICPR3 =
|
||||||
|
CODRICPR4 =
|
||||||
|
SEQALT =
|
||||||
|
CODALTRPR1 =
|
||||||
|
CODALTRPR2 =
|
||||||
|
CODALTRPR3 =
|
||||||
|
CODALTRPR4 =
|
||||||
|
CODFISC =
|
||||||
|
MATRICOLA =
|
||||||
|
PLURIMAND =
|
||||||
|
DATACESS =
|
||||||
|
|
||||||
|
[INDSPED]
|
||||||
|
RAGSOC = TradeName1
|
||||||
|
INDIR = Address
|
||||||
|
CIV =
|
||||||
|
LOCALITA =
|
||||||
|
CAP = ZipCode
|
||||||
|
STATO = _TAB,%TPS,State,S6
|
||||||
|
COM =
|
||||||
|
PTEL =
|
||||||
|
TEL = TelNumber
|
||||||
|
PFAX =
|
||||||
|
FAX = FaxNumber
|
||||||
|
IVARID =
|
||||||
|
|
||||||
|
[CONAI]
|
||||||
|
AC = CONACC
|
||||||
|
AL = CONALL
|
||||||
|
CA = CONCAR
|
||||||
|
LE = CONLEG
|
||||||
|
PL = CONPLA
|
||||||
|
VE = CONVET
|
||||||
|
|
||||||
|
[CFV_CONAI]
|
||||||
|
AC = ESACC
|
||||||
|
AL = ESALL
|
||||||
|
CA = ESCAR
|
||||||
|
LE = ESLEG
|
||||||
|
PL = ESPLA
|
||||||
|
VE = ESVET
|
||||||
|
|
||||||
|
[STANDARD]
|
||||||
|
RAGGDOC=X
|
||||||
|
RAGGEFF=X
|
||||||
|
ADDBOLLI=
|
||||||
|
PERCSPINC=
|
||||||
|
|
||||||
|
[CODNUM]
|
||||||
|
1 = B01
|
||||||
|
2 = B01
|
||||||
|
|
||||||
|
[TIPODOC]
|
||||||
|
20 = B01
|
||||||
|
DDT C/RIP = BOF
|
105
ha/hacnv100a.uml
Executable file
105
ha/hacnv100a.uml
Executable file
@ -0,0 +1,105 @@
|
|||||||
|
#include "hacnv100a.h"
|
||||||
|
|
||||||
|
TOOLBAR "topbar" 0 0 0 2
|
||||||
|
|
||||||
|
#include <elabar.h>
|
||||||
|
|
||||||
|
ENDPAGE
|
||||||
|
|
||||||
|
PAGE "Trasferimenti" 0 2 0 0
|
||||||
|
|
||||||
|
GROUPBOX DLG_NULL 78 3
|
||||||
|
BEGIN
|
||||||
|
PROMPT 1 1 "@bDitta"
|
||||||
|
END
|
||||||
|
|
||||||
|
NUMBER F_FIRM 5
|
||||||
|
BEGIN
|
||||||
|
PROMPT 2 2 ""
|
||||||
|
USE LF_NDITTE
|
||||||
|
INPUT CODDITTA F_FIRM
|
||||||
|
OUTPUT F_RAGSOC RAGSOC
|
||||||
|
CHECKTYPE REQUIRED
|
||||||
|
FLAGS "DF"
|
||||||
|
END
|
||||||
|
|
||||||
|
STRING F_RAGSOC 60
|
||||||
|
BEGIN
|
||||||
|
PROMPT 17 2 ""
|
||||||
|
FLAGS "D"
|
||||||
|
END
|
||||||
|
|
||||||
|
GROUPBOX DLG_NULL 78 6
|
||||||
|
BEGIN
|
||||||
|
PROMPT 1 4 "@bTabelle"
|
||||||
|
END
|
||||||
|
|
||||||
|
BOOLEAN F_PAG
|
||||||
|
BEGIN
|
||||||
|
PROMPT 2 5 "Condizioni di pagamento"
|
||||||
|
END
|
||||||
|
|
||||||
|
BOOLEAN F_IVA
|
||||||
|
BEGIN
|
||||||
|
PROMPT 2 6 "Aliquote IVA"
|
||||||
|
END
|
||||||
|
|
||||||
|
BOOLEAN F_CATMERC
|
||||||
|
BEGIN
|
||||||
|
PROMPT 2 7 "Cat. merceologiche"
|
||||||
|
END
|
||||||
|
|
||||||
|
BOOLEAN F_CATFISC
|
||||||
|
BEGIN
|
||||||
|
PROMPT 2 8 "Cat. fiscali"
|
||||||
|
END
|
||||||
|
|
||||||
|
BOOLEAN F_BAN
|
||||||
|
BEGIN
|
||||||
|
PROMPT 32 5 "Banche"
|
||||||
|
END
|
||||||
|
|
||||||
|
BOOLEAN F_CAUCONT
|
||||||
|
BEGIN
|
||||||
|
PROMPT 32 6 "Causali contabili"
|
||||||
|
END
|
||||||
|
|
||||||
|
BOOLEAN F_CAUMAG
|
||||||
|
BEGIN
|
||||||
|
PROMPT 32 7 "Causali magazzino"
|
||||||
|
END
|
||||||
|
|
||||||
|
BOOLEAN F_CAUCESP
|
||||||
|
BEGIN
|
||||||
|
PROMPT 32 8 "Causali cespiti"
|
||||||
|
END
|
||||||
|
|
||||||
|
ENDPAGE
|
||||||
|
|
||||||
|
PAGE "Configurazione" -1 -1 78 18
|
||||||
|
|
||||||
|
GROUPBOX DLG_NULL 78 5
|
||||||
|
BEGIN
|
||||||
|
PROMPT 1 1 "@bDatabase"
|
||||||
|
END
|
||||||
|
|
||||||
|
STRING F_DSN 30
|
||||||
|
BEGIN
|
||||||
|
PROMPT 2 2 "DSN "
|
||||||
|
CHECKTYPE REQUIRED
|
||||||
|
END
|
||||||
|
|
||||||
|
STRING F_USR 16
|
||||||
|
BEGIN
|
||||||
|
PROMPT 2 3 "User "
|
||||||
|
END
|
||||||
|
|
||||||
|
STRING F_PWD 16
|
||||||
|
BEGIN
|
||||||
|
PROMPT 2 4 "Password "
|
||||||
|
FLAGS "*"
|
||||||
|
END
|
||||||
|
|
||||||
|
ENDPAGE
|
||||||
|
|
||||||
|
ENDMASK
|
Loading…
x
Reference in New Issue
Block a user