Patch level : 12.0 978
Files correlati : f90.exe Commento : - Corretta associazione MovimentoInErrore-FPPRO rimuovendo correttamente il record anche alla riapertura e corretto il reset del filtro date. - Rimossi flag non utilizzati dalla maschera di configurazione. - Corretta prima registrazione delle categorie doc. continuava a dare errore che erano incomplete.
This commit is contained in:
parent
8a2c4f4148
commit
26130002ad
@ -368,26 +368,12 @@ bool TMonitor_mask::save_conf_handler(TMask_field& f, KEY key)
|
||||
F9CONF.set_ambiente (config_mask.get(CF_CODSOC));
|
||||
F9CONF.set_addr_doc (config_mask.get(CF_ADDRDOC));
|
||||
F9CONF.set_has_cartexp (config_mask.get_bool(CF_CARTEXP));
|
||||
F9CONF.set_has_checkvend(config_mask.get_bool(CF_CHECKVEND));
|
||||
F9CONF.set_viewmov (config_mask.get_bool(CF_VIEWMOVPRE));
|
||||
|
||||
config_mask.close();
|
||||
f9_app().edit_wa(old_codsoc);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool TMonitor_mask::open_mov_handler(TMask_field& f, KEY key)
|
||||
{
|
||||
if(key == K_SPACE)
|
||||
{
|
||||
TMask& sf = f.mask();
|
||||
TRectype mov(LF_MOV);
|
||||
mov.put(MOV_NUMREG, sf.get(F_NUMREG));
|
||||
return open_mov(mov);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void TMonitor_mask::controllo_errori() const
|
||||
{
|
||||
TString id_estr, stato;
|
||||
@ -618,17 +604,13 @@ void TMonitor_mask::open_win_conf()
|
||||
m->add_groupbox (CF_ADDRGROUP, 0, "Indicare percorso documenti cartacei:", 1, 3, 69, 3, "");
|
||||
m->add_string (CF_ADDRDOC, 0, "Percorso", 2, 4, 256, "", 40);
|
||||
m->add_groupbox (CF_ESTRGROUP, 0, "Opzioni estrazione", 1, 6, 69, 5, "");
|
||||
m->add_boolean (CF_CHECKVEND, 0, "Abilita controllo movimenti di vendita: esiste il documento elettronico inviato.", 2, 7, "D");
|
||||
m->add_boolean (CF_CARTEXP, 0, "Estrai anche documenti cartacei", 2, 8);
|
||||
m->add_boolean (CF_VIEWMOVPRE, 0, "Visualizza movimenti preparati prima di lanciare l'estrazione", 2, 9, "D");
|
||||
|
||||
m->set_handler(DLG_OK, save_conf_handler);
|
||||
|
||||
m->set(CF_CODSOC, F9CONF.get_ambiente());
|
||||
m->set(CF_ADDRDOC, F9CONF.get_addr_doc());
|
||||
m->set(CF_CHECKVEND, "");//F9CONF.get_has_checkvend() ? "X" : "";
|
||||
m->set(CF_CARTEXP, F9CONF.get_has_cartexp());
|
||||
m->set(CF_VIEWMOVPRE, F9CONF.get_viewmov());
|
||||
}
|
||||
m->run();
|
||||
}
|
||||
@ -683,9 +665,9 @@ void TControllo_mask::associa() // todo: levare gli ultimi residui del vecchio
|
||||
if (ok)
|
||||
{
|
||||
// Tolgo il flag di in errore sul vettore in modo da rifare la fill e non venir piu' contato come da controllare
|
||||
auto it = _movs.begin();
|
||||
int count = -1;
|
||||
while (count < _selected_mov && it != _movs.end())
|
||||
auto it = _controllo_mov.begin();
|
||||
int count = -1;
|
||||
while (count < _selected_mov && it != _controllo_mov.end())
|
||||
{
|
||||
if (it->get(0)[0] == 'X') // Devo saltare tutti quelli che non hanno il flag e contare solo quelli che ce l'hanno
|
||||
count++;
|
||||
@ -753,25 +735,17 @@ void TControllo_mask::fill()
|
||||
TSheet_field& sf = sfield(S_CONTROLLO);
|
||||
sf.hide();
|
||||
sf.destroy();
|
||||
_movs = !_is_escluso ? import_error_list() : f9_app()._esclusi; // Prendo da _esclusi se sto aprendo il controllo dalla maschera degli esclusi
|
||||
_datada = EOTIME;
|
||||
_dataa = 0L;
|
||||
for (auto it = _movs.begin(); it != _movs.end(); ++it)
|
||||
if (!_is_escluso)
|
||||
import_error_list();
|
||||
else
|
||||
_controllo_mov = f9_app()._esclusi;
|
||||
for (auto it = _controllo_mov.begin(); it != _controllo_mov.end(); ++it)
|
||||
{
|
||||
TToken_string& row = sf.row(-1);
|
||||
if (*it->get(0) == 'X')
|
||||
{
|
||||
row = *it;
|
||||
row[0] = (char&)" ";
|
||||
TDate d = row.get(3);
|
||||
if (d < _datada)
|
||||
_datada = d;
|
||||
if (d > _dataa)
|
||||
_dataa = d;
|
||||
/*if (!_is_escluso && _tipo_doc_err == 'A' || _is_escluso && f9_app().get_tipoiva_escl() == iva_acquisti)
|
||||
row.add("", cid2index(F_CESCLUDI));
|
||||
else
|
||||
row.add("X", cid2index(F_CESCLUDI));*/
|
||||
row = *it;
|
||||
row[0] = (char&)" ";
|
||||
}
|
||||
}
|
||||
sf.force_update();
|
||||
@ -927,7 +901,7 @@ bool TControllo_mask::on_field_event(TOperable_field& o, TField_event e, long jo
|
||||
{
|
||||
TSheet_field& sf = sfield(S_CONTROLLO);
|
||||
TToken_string& row = sf.row(sf.selected());
|
||||
TRectype mov(LF_MOV);
|
||||
TRectype mov(LF_MOV);
|
||||
mov.put(MOV_NUMREG, row.get(sf.cid2index(F_NUMREG)));
|
||||
if (open_mov(mov))
|
||||
fill();
|
||||
@ -990,7 +964,7 @@ bool TControllo_mask::on_field_event(TOperable_field& o, TField_event e, long jo
|
||||
return true;
|
||||
}
|
||||
|
||||
TControllo_mask::TControllo_mask(const char* codsoc, const char* id_estr, bool esclusi)
|
||||
TControllo_mask::TControllo_mask(const char* codsoc, const char* id_estr, const bool esclusi)
|
||||
: TAutomask("f90100b"), _ordin('D'), _verso('A'), _selected_mov(0), _sel_esclusi(false)
|
||||
{
|
||||
_cod_soc = codsoc;
|
||||
@ -1001,6 +975,23 @@ TControllo_mask::TControllo_mask(const char* codsoc, const char* id_estr, bool e
|
||||
_is_escluso = esclusi;
|
||||
|
||||
// Fill controllo sheet
|
||||
if (!_is_escluso)
|
||||
import_error_list();
|
||||
else
|
||||
_controllo_mov = f9_app()._esclusi;
|
||||
_datada = EOTIME;
|
||||
_dataa = 0L;
|
||||
for (auto it = _controllo_mov.begin(); it != _controllo_mov.end(); ++it)
|
||||
{
|
||||
if (*it->get(0) == 'X')
|
||||
{
|
||||
TDate d = it->get(3);
|
||||
if (d < _datada)
|
||||
_datada = d;
|
||||
if (d > _dataa)
|
||||
_dataa = d;
|
||||
}
|
||||
}
|
||||
fill();
|
||||
}
|
||||
|
||||
@ -1210,7 +1201,7 @@ void TApri_estr_msk::set_from_row_estrazione(TToken_string& row_estrazione)
|
||||
set(F_IIDESTR, _idestr.cut(0) << row_estrazione.get(cid2index(F_IDESTR)));
|
||||
set(F_IDATA, _dataestr = row_estrazione.get(cid2index(F_DATAESTR)));
|
||||
set(F_IPROV, _provv = *row_estrazione.get(cid2index(F_PROV_B)) == 'X');
|
||||
set(F_ITIPOD, _tipodoc = *row_estrazione.get(cid2index(F_TIPODOC)));
|
||||
set(F_ITIPOD, (_tipodoc = *row_estrazione.get(cid2index(F_TIPODOC))) == 'V' ? "Vendite" : "Acquisti");
|
||||
(_statoestr.cut(0) << row_estrazione.get(cid2index(F_STATESTR))).cut(2);
|
||||
set(F_ISTATOESTR, TString(_statoestr) << " - " << TF9_app::traduci_stato(_statoestr));
|
||||
set(F_IDAL, _datadal = row_estrazione.get(cid2index(F_DATADAL)));
|
||||
@ -1531,7 +1522,15 @@ bool TF9_app::segna_estratti(const bool escluso, const int numreg)
|
||||
|
||||
vector<movimento_t> escl;
|
||||
if (escluso)
|
||||
escl.insert(escl.begin(), movimento_t{ false, numreg }); // todo: datareg?
|
||||
{
|
||||
TLocalisamfile mov(LF_MOV);
|
||||
mov.put(MOV_NUMREG, numreg);
|
||||
mov.read();
|
||||
TLocalisamfile clifo(LF_CLIFO); clifo.put(CLI_TIPOCF, mov.get(MOV_TIPO)); clifo.read();
|
||||
const movimento_t m{ false, numreg, mov.get_date(MOV_DATAREG), mov.get_date(MOV_DATADOC), mov.get(MOV_CODCAUS), mov.get_int(MOV_MESELIQ), !mov.get(MOV_NUMDOCEXT).empty() ? mov.get(MOV_NUMDOCEXT) : mov.get(MOV_NUMDOC),
|
||||
mov.get_real(MOV_TOTDOC), mov.get_int(MOV_CODCF), clifo.get(CLI_RAGSOC), mov.get(MOV_REG), mov.get(MOV_DESCR) };
|
||||
escl.insert(escl.begin(), m); // todo: datareg?
|
||||
}
|
||||
vector<movimento_t>& movs_v = escluso ? escl : _movs;
|
||||
|
||||
TLocalisamfile mov(LF_MOV);
|
||||
|
@ -142,9 +142,7 @@ class TMonitor_mask : public TAutomask
|
||||
|
||||
// Configurazione mask
|
||||
static bool save_conf_handler(TMask_field& f, KEY key);
|
||||
// Apri Estr. mask
|
||||
static bool open_mov_handler(TMask_field& f, KEY key);
|
||||
|
||||
|
||||
// Metodi per la maschera 'Apri Estr.'
|
||||
|
||||
void open_apri_estr_win();
|
||||
@ -177,7 +175,6 @@ class TControllo_mask : public TAutomask
|
||||
TString _cod_soc;
|
||||
TString _id_estr;
|
||||
char _tipo_doc_err{};
|
||||
vector<TToken_string> _movs;
|
||||
TDate _datada;
|
||||
TDate _dataa;
|
||||
|
||||
|
@ -50,9 +50,7 @@
|
||||
#define CF_ADDRGROUP 503
|
||||
#define CF_ADDRDOC 504
|
||||
#define CF_ESTRGROUP 505
|
||||
#define CF_CHECKVEND 506
|
||||
#define CF_CARTEXP 507
|
||||
#define CF_VIEWMOVPRE 508
|
||||
#define CF_CARTEXP 506
|
||||
|
||||
// Campi maschera descrizione estrazione
|
||||
#define DES_TEXT 501
|
||||
|
@ -162,7 +162,7 @@ void TF9_categorie_doc_msk::check_duplicate_tipodoc() const
|
||||
}
|
||||
if (!dup.empty() && !_mod_precaricate)
|
||||
warning_box("Ci sono molteplici categorie con lo stesso tipo documento.\nPer una corretta assegnazione della categoria doc. si consiglia\ndi specificare il tipo di causale o rimuovere i duplicati.");
|
||||
if (_mod_precaricate)
|
||||
if (!dup.empty() && _mod_precaricate)
|
||||
message_box("Si prega di completare la tabella per la riga di fattura acquisti\nreverse charge andando a inserire il corrispondente codice causale.");
|
||||
}
|
||||
|
||||
|
@ -192,7 +192,7 @@ void TF9_test_app::main_loop()
|
||||
if(categorie_doc().get_ann("INTREVC", annesso))
|
||||
TEstrazione::make_prosp_int_revc(153480, annesso);
|
||||
|
||||
TString s = TEstrai_mask::get_numdoc_campo_fp(105396);
|
||||
TString s = TEstrai_mask::get_numdoc_exp_fp(105396);
|
||||
|
||||
message_box("TESTS COMPLETELY SUCCESSFUL");
|
||||
}
|
||||
|
@ -97,8 +97,6 @@ class TF9_config
|
||||
TString _ambiente; // Codice ambiente (codsoc)
|
||||
TString _addr_doc; // Indirizzo documenti cartacei WebApp
|
||||
bool _cartexp;
|
||||
bool _checkvend;
|
||||
bool _viewmovpre;
|
||||
|
||||
// Config in f90300:
|
||||
|
||||
@ -106,14 +104,12 @@ class TF9_config
|
||||
TString _estensioni; // Estensioni valide per il caricamenti dei doc. cart.
|
||||
|
||||
public:
|
||||
const TString& get_ambiente() const { return _ambiente; }
|
||||
const TString& get_addr_doc() const { return _addr_doc; }
|
||||
bool get_has_cartexp() const { return _cartexp; }
|
||||
bool get_has_checkvend() const { return _checkvend; }
|
||||
bool get_viewmov() const { return _viewmovpre; }
|
||||
const TString& get_ambiente() const { return _ambiente; }
|
||||
const TString& get_addr_doc() const { return _addr_doc; }
|
||||
bool get_has_cartexp() const { return _cartexp; }
|
||||
|
||||
const TString& get_addr_cart() const { return _addr_cart; }
|
||||
const TString& get_estensioni() const { return _estensioni; }
|
||||
const TString& get_addr_cart() const { return _addr_cart; }
|
||||
const TString& get_estensioni() const { return _estensioni; }
|
||||
|
||||
void set_ambiente(const TString& cod_amb);
|
||||
void set_addr_doc(const TString& path);
|
||||
@ -258,13 +254,13 @@ struct movimento_t
|
||||
TString reg_protiva;
|
||||
TString descr;
|
||||
state_fppro state{ null_state };
|
||||
TString descr_err; // Messaggio di errore visibile dal controllo estrazione.
|
||||
TString descr_err{}; // Messaggio di errore visibile dal controllo estrazione.
|
||||
bool estratto{ true };
|
||||
err_mov descr_estr{ no_err }; // Messaggio di informazioni visibile dal 'Apri Estr.'
|
||||
std::shared_ptr<TCategorie_doc::classe_doc> catdoc;
|
||||
std::shared_ptr<TCategorie_doc::classe_doc> catdoc{ nullptr };
|
||||
bool cartaceo{ false };
|
||||
TFilename nomefilecart;
|
||||
vector<annesso_t> annessi;
|
||||
TFilename nomefilecart{};
|
||||
vector<annesso_t> annessi{};
|
||||
|
||||
static const char* err_mov2name(const err_mov descr_estr)
|
||||
{
|
||||
@ -456,7 +452,7 @@ public:
|
||||
void add(long num);
|
||||
void add() { add_str("NULL"); }
|
||||
bool send();
|
||||
static void del_err(const TString& codsoc, const TString& id_estr, int numreg);
|
||||
static bool del_err(const TString& codsoc, const TString& id_estr, int numreg);
|
||||
static char get_errori(const TString& codsoc, const TString& id_estr, vector<TToken_string>& controllo_mov);
|
||||
TF9_dberr();
|
||||
};
|
||||
|
@ -247,7 +247,7 @@ bool TEstrazione::is_doc_xml(const TLocalisamfile& mov)
|
||||
const TString& codcf = mov.get(MOV_CODCF);
|
||||
TLocalisamfile clifo(LF_CLIFO);
|
||||
clifo.put(CLI_TIPOCF, tipocf);
|
||||
clifo.put(CLI_CODCF, codcf);
|
||||
clifo.put(CLI_CODCF, codcf);
|
||||
clifo.read();
|
||||
return (clifo.get(CLI_STATOPAIV).empty() || clifo.get(CLI_STATOPAIV) == "IT")
|
||||
&& clifo.get(CLI_COMCF) != "B513"; // Campione d'Italia
|
||||
@ -1173,13 +1173,13 @@ bool TF9_dberr::send()
|
||||
return ok;
|
||||
}
|
||||
|
||||
void TF9_dberr::del_err(const TString& codsoc, const TString& id_estr, const int numreg)
|
||||
bool TF9_dberr::del_err(const TString& codsoc, const TString& id_estr, const int numreg)
|
||||
{
|
||||
TString query;
|
||||
query << "DELETE FROM " F9_ERR
|
||||
"\nWHERE " ERR_CODSOC " = '" << codsoc << "'"
|
||||
"\nAND " ERR_IDESTR " = '" << id_estr << "' AND " ERR_NUMREG " = '" << numreg << "';";
|
||||
fp_db().sq_set_exec(query);
|
||||
return fp_db().sq_set_exec(query) && fp_db().sq_commit();
|
||||
}
|
||||
|
||||
char TF9_dberr::get_errori(const TString& codsoc, const TString& id_estr, vector<TToken_string>& controllo_mov)
|
||||
|
@ -40,18 +40,6 @@ void TF9_config::set_has_cartexp(const bool flag)
|
||||
_cartexp = flag;
|
||||
}
|
||||
|
||||
void TF9_config::set_has_checkvend(const bool flag)
|
||||
{
|
||||
ini_set_bool(CONFIG_DITTA, "F9", CHECKVEND_F9, false);
|
||||
_checkvend = flag;
|
||||
}
|
||||
|
||||
void TF9_config::set_viewmov(const bool flag)
|
||||
{
|
||||
ini_set_bool(CONFIG_DITTA, "F9", VIEWMOV_F9, flag);
|
||||
_viewmovpre = flag;
|
||||
}
|
||||
|
||||
void TF9_config::set_addr_cart(const TString& path)
|
||||
{
|
||||
ini_set_string(CONFIG_DITTA, "F9", ADDRCART_F9, path);
|
||||
@ -70,9 +58,7 @@ TF9_config::TF9_config()
|
||||
_addr_cart = ini_get_string(CONFIG_DITTA, "F9", ADDRCART_F9);
|
||||
_addr_doc = ini_get_string(CONFIG_DITTA, "F9", ADDRDOC_F9);
|
||||
_cartexp = ini_get_bool (CONFIG_DITTA, "F9", CARTEXP_F9);
|
||||
_checkvend = ini_get_bool (CONFIG_DITTA, "F9", CHECKVEND_F9, true);
|
||||
_estensioni = ini_get_string(CONFIG_DITTA, "F9", ESTENSIONI_F9);
|
||||
_viewmovpre = ini_get_bool (CONFIG_DITTA, "F9", VIEWMOV_F9);
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
Loading…
x
Reference in New Issue
Block a user