Patch level : 12.0 726
Files correlati : tf0100 Commento : Sistemati filtri e implementato bottone cambio stato invio
This commit is contained in:
parent
bf6e86df15
commit
865e004f7b
@ -41,13 +41,13 @@ enum return_code
|
||||
// Su DB: X o ''->Da inviare, F->Forzato, I->Inviato, N->Non inviare
|
||||
enum filter_fatt
|
||||
{
|
||||
to_send, // "", "X", "F", "E"
|
||||
sent, // "I"
|
||||
untouched, // "", "X"
|
||||
forced, // "F"
|
||||
disabled, // "N"
|
||||
err, // "E"
|
||||
all // Nessun controllo
|
||||
to_send = 0, // "", "X", "F", "E"
|
||||
sent = 1, // "I"
|
||||
untouched = 2, // "", "X"
|
||||
forced = 3, // "F"
|
||||
disabled = 5, // "N"
|
||||
err = 4, // "E"
|
||||
all = 6 // Nessun controllo
|
||||
};
|
||||
|
||||
#define SHEET_GAP 101
|
||||
@ -227,6 +227,8 @@ protected:
|
||||
void next_page(int p) override;
|
||||
static TRecnotype nuovo_progr();
|
||||
void change_invio(const TString& tipocf, const TString& codcf, const TString& numdoc, const TString& invio) const;
|
||||
void update_stato(const TString& da_stato, const TString& a_stato);
|
||||
|
||||
bool on_field_event(TOperable_field& o, TField_event e, long jolly) override;
|
||||
void open_java();
|
||||
|
||||
|
@ -2,6 +2,7 @@
|
||||
|
||||
#include "tf0100b.h"
|
||||
#include <utility.h>
|
||||
#include "urldefid.h"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////
|
||||
// TTrFa_mask
|
||||
@ -55,8 +56,15 @@ bool TTrFa_mask::on_field_event(TOperable_field& o, TField_event e, long jolly)
|
||||
break;
|
||||
case DLG_PDF:
|
||||
{
|
||||
TMask cs_mask("Cambiamento stato movimenti", 1, 20, 10);
|
||||
|
||||
TMask cs_mask("Cambiamento stato movimenti", 1, 30, 5);
|
||||
cs_mask.add_button_tool(DLG_OK, "~Conferma", TOOL_OK);
|
||||
cs_mask.add_button_tool(DLG_CANCEL, "Annulla", TOOL_CANCEL);
|
||||
cs_mask.add_list(101, 0, "Da stato", 0, 0, 15, "", "X|I|N|F|E", "Da Inviare|Inviato|Disabilitato|Forzato|Errato");
|
||||
cs_mask.add_list(102, 0, "A stato", 0, 2, 15, "", "X|I|N|F|E", "Da Inviare|Inviato|Disabilitato|Forzato|Errato");
|
||||
if (cs_mask.run() == K_ENTER)
|
||||
{
|
||||
update_stato(cs_mask.get(101), cs_mask.get(102));
|
||||
}
|
||||
}
|
||||
break;
|
||||
case F_RIGHE:
|
||||
@ -626,6 +634,19 @@ void TTrFa_mask::change_invio(const TString& tipocf, const TString& codcf, const
|
||||
}
|
||||
}
|
||||
|
||||
void TTrFa_mask::update_stato(const TString& da_stato, const TString& a_stato)
|
||||
{
|
||||
TSheet_field& sf = sfield(F_RIGHE);
|
||||
sf.hide();
|
||||
FOR_EACH_SHEET_ROW(sf, r, row)
|
||||
{
|
||||
if (*row->get(sf.cid2index(A_INVIO)) == *da_stato)
|
||||
row->add(a_stato, sf.cid2index(A_INVIO));
|
||||
}
|
||||
sf.force_update();
|
||||
sf.show();
|
||||
}
|
||||
|
||||
void TTrFa_mask::load_sheet()
|
||||
{
|
||||
const char tipo = get(F_TIPOCF)[0];
|
||||
|
@ -80,6 +80,7 @@ TRectype TTrFa_cursors::_next(return_code& code, TString& tipocf, TString& codcf
|
||||
tipo_doc == -1 || !msk().get_bool(tipo_doc))
|
||||
{
|
||||
static TString codiva;
|
||||
TString n_simo;
|
||||
do
|
||||
{
|
||||
// Se ritorna false ho finito i records
|
||||
@ -91,7 +92,9 @@ TRectype TTrFa_cursors::_next(return_code& code, TString& tipocf, TString& codcf
|
||||
else
|
||||
{
|
||||
// Controllo se ho cambiato movimento
|
||||
_new_mov = num_mov != _c_rmoviva->get("23.NUMREG").as_string();
|
||||
_new_mov = num_mov != (n_simo = _c_rmoviva->get("23.NUMREG").as_string());
|
||||
if (n_simo == "44583")
|
||||
bool simo = true;
|
||||
codiva.cut(0) << _c_rmoviva->get("25.CODIVA").as_string();
|
||||
}
|
||||
} // Ciclo finchè non trovo un nuovo movimento o trovo cod IVA già presi da cust
|
||||
@ -114,7 +117,7 @@ TRectype TTrFa_cursors::_next(return_code& code, TString& tipocf, TString& codcf
|
||||
bool tolla = true;
|
||||
#endif
|
||||
|
||||
// Controllo dell'esistenza di un record custom in tasfatt
|
||||
// Controllo dell'esistenza di un record custom in trasfatt
|
||||
ret_rec = getTrasFatt(_c_rmoviva->get("23.NUMREG").as_string(), _c_rmoviva->get("25.CODIVA").as_string());
|
||||
if(ret_rec.empty())
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user