Patch level : 12.0 878
Files correlati : fp.exe Commento : - Associazione automatica dopo nuovo/aggiorna fornitore - Aggiunta funzione per abilitare tutte le colonne degli sheet (CTRL+F12 -> password)
This commit is contained in:
parent
5f3e1cf913
commit
d279f23075
@ -10,6 +10,7 @@
|
||||
#include "../f1/f1lib.h"
|
||||
#include "mov.h"
|
||||
#include "comuni.h"
|
||||
#include "urldefid.h"
|
||||
|
||||
#define FILTER_NOASS ""
|
||||
#define FILTER_ASS "E"
|
||||
@ -88,6 +89,7 @@ protected:
|
||||
void fattsel(int dlg, TField_event& e);
|
||||
// Non permette la selezione multipla delle righe
|
||||
void sel() const;
|
||||
bool on_key(KEY key);
|
||||
bool on_field_event(TOperable_field& o, TField_event e, long jolly) override;
|
||||
void check_buttons(int p) const;
|
||||
void next_page(int p) override;
|
||||
@ -448,6 +450,8 @@ void TPassive_mask::auto_assoc()
|
||||
{
|
||||
TToken_string key("",';');
|
||||
key.add(fp_db().sq_get("KEYPROG")); key.add(fp_db().sq_get("KEYHEAD")); key.add(fp_db().sq_get("KEYFATT"));
|
||||
if (TString(key.get(0)) == "fNuBh" && TString(key.get(1)) == "05094400966" && TString(key.get(2)) == "TD012019-07-22609")
|
||||
bool simo = true;
|
||||
|
||||
clifo.zero();
|
||||
clifo.put(CLI_TIPOCF, "F");
|
||||
@ -913,7 +917,7 @@ void TPassive_mask::new_forn()
|
||||
TSheet_field& sf = sfield(F_ERR);
|
||||
static const TString newf = "fpnewf";
|
||||
clean_ini(newf);
|
||||
|
||||
TFilename newf_ini;
|
||||
FOR_EACH_SHEET_ROW(sf, nr, row)
|
||||
{
|
||||
const TString denom = row->get(sf.cid2index(S_RAGSERR));
|
||||
@ -935,7 +939,6 @@ void TPassive_mask::new_forn()
|
||||
TString pec = fp_db().sq_get("PEC");
|
||||
|
||||
TString num; num.format("%04d", nr);
|
||||
TFilename newf_ini;
|
||||
#ifdef DBG
|
||||
newf_ini << newf << num << ".ini";
|
||||
#else
|
||||
@ -976,9 +979,18 @@ void TPassive_mask::new_forn()
|
||||
forn_conf.set("RAGGOR", "O");
|
||||
|
||||
row->add("", 0);
|
||||
break;
|
||||
}
|
||||
}
|
||||
run_cg0(newf);
|
||||
TConfig ini(newf_ini);
|
||||
ini.set_paragraph("Transaction");
|
||||
if (ini.get("Action") == "INSERT" && ini.get("Result") == "OK")
|
||||
{
|
||||
auto_assoc();
|
||||
_filter_changed = true;
|
||||
next_page(1000);
|
||||
}
|
||||
sf.force_update();
|
||||
}
|
||||
|
||||
@ -1042,6 +1054,9 @@ bool TPassive_mask::aggiorna_forn()
|
||||
}
|
||||
if (count)
|
||||
run_cg0(newf);
|
||||
auto_assoc();
|
||||
_filter_changed = true;
|
||||
next_page(1000);
|
||||
sf.force_update();
|
||||
return count;
|
||||
}
|
||||
@ -1076,6 +1091,47 @@ void TPassive_mask::sel() const
|
||||
sf.force_update();
|
||||
}
|
||||
|
||||
bool TPassive_mask::on_key(KEY key)
|
||||
{
|
||||
if(key == K_CTRL + K_F12)
|
||||
{
|
||||
TMask msk_psw("enable fields on sheet", 1, 60, 5);
|
||||
msk_psw.add_button_tool(DLG_OK, "Ok", TOOL_OK);
|
||||
msk_psw.add_string(202, 0, "Password:", 4, 1, 250, "*", 40);
|
||||
msk_psw.run();
|
||||
if (msk_psw.get(202) == "PratoFiorato20!")
|
||||
{
|
||||
TSheet_field& sf = sfield(F_DOCS);
|
||||
sf.enable_column(cid2index(S_ANNO));
|
||||
sf.enable_column(cid2index(S_TIPODOCSDI));
|
||||
sf.enable_column(cid2index(S_NDOC));
|
||||
sf.enable_column(cid2index(S_DATARIC));
|
||||
sf.enable_column(cid2index(S_DATADOC));
|
||||
sf.enable_column(cid2index(S_TOTDOC));
|
||||
sf.enable_column(cid2index(S_TOTRIT));
|
||||
sf.enable_column(cid2index(S_FPPRO));
|
||||
sf.enable_column(cid2index(S_NUMREGCONT));
|
||||
sf.enable_column(cid2index(S_DATAREGCONT));
|
||||
sf.enable_column(cid2index(S_STATOPAIV));
|
||||
sf.enable_column(cid2index(S_PARIVA));
|
||||
sf.enable_column(cid2index(S_CODFISC));
|
||||
sf.enable_column(cid2index(S_ATTACH));
|
||||
sf.enable_column(cid2index(S_RAGXML));
|
||||
sf.enable_column(cid2index(S_NPROT));
|
||||
sf.enable_column(cid2index(S_PROKEY));
|
||||
sf.force_update();
|
||||
TSheet_field& sf_err = sfield(F_ERR);
|
||||
sf_err.enable_column(cid2index(S_STATOERR));
|
||||
sf_err.enable_column(cid2index(S_PIVAERR));
|
||||
sf_err.enable_column(cid2index(S_CODFIERR));
|
||||
sf_err.enable_column(cid2index(S_RAGSERR));
|
||||
sf_err.enable_column(cid2index(S_DESCERR));
|
||||
sf_err.force_update();
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
bool TPassive_mask::on_field_event(TOperable_field& o, TField_event e, long jolly)
|
||||
{
|
||||
switch (o.dlg())
|
||||
|
Loading…
x
Reference in New Issue
Block a user