Patch level : 10.0
Files correlati : cg2.exe Ricompilazione Demo : [ ] Commento : Corretta gestione transazioni con movimenti di reverse charge git-svn-id: svn://10.65.10.50/trunk@19325 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
4436cb7970
commit
8cecac19cb
@ -214,7 +214,23 @@ bool TPrimanota_application::user_create()
|
|||||||
|
|
||||||
bool TPrimanota_application::save_and_new() const
|
bool TPrimanota_application::save_and_new() const
|
||||||
{
|
{
|
||||||
return _savenew || _automatico->_step == 1;
|
return _savenew || _automatico->_step == 1; // Rimane in inserimento del reverse charge
|
||||||
|
}
|
||||||
|
|
||||||
|
bool TPrimanota_application::save_and_quit() const
|
||||||
|
{
|
||||||
|
bool quit = TRelation_application::save_and_quit();
|
||||||
|
if (quit && _automatico->_step == 1)
|
||||||
|
quit = false; // Impedisce di uscire durante il reverse charge
|
||||||
|
return quit;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool TPrimanota_application::is_transaction() const
|
||||||
|
{
|
||||||
|
bool trans = TRelation_application::is_transaction();
|
||||||
|
if (trans && _automatico->_step > 0)
|
||||||
|
trans = false; // Non devo considerare come facenti parte della transazione i movimenti automatici
|
||||||
|
return trans;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool TPrimanota_application::user_destroy()
|
bool TPrimanota_application::user_destroy()
|
||||||
@ -762,11 +778,8 @@ void TPrimanota_application::init_insert_mode(TMask& m)
|
|||||||
|
|
||||||
tmp.fremove();
|
tmp.fremove();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void TPrimanota_application::init_modify_mode(TMask& m)
|
void TPrimanota_application::init_modify_mode(TMask& m)
|
||||||
{
|
{
|
||||||
init_mask(m); // Inizializzazione standard
|
init_mask(m); // Inizializzazione standard
|
||||||
@ -1633,7 +1646,9 @@ HIDDEN void ini2bill(TConfig& ini, TBill& bil, bool contro)
|
|||||||
|
|
||||||
HIDDEN bool set_not_empty(TMask& msk, int id, TConfig& ini, const char* var)
|
HIDDEN bool set_not_empty(TMask& msk, int id, TConfig& ini, const char* var)
|
||||||
{
|
{
|
||||||
const TString& val = ini.get(var);
|
TString val = ini.get(var);
|
||||||
|
if (val.starts_with("\""))
|
||||||
|
val.strip("\"");
|
||||||
bool ok = val.full();
|
bool ok = val.full();
|
||||||
if (ok)
|
if (ok)
|
||||||
msk.set(id, val);
|
msk.set(id, val);
|
||||||
@ -1642,7 +1657,9 @@ HIDDEN bool set_not_empty(TMask& msk, int id, TConfig& ini, const char* var)
|
|||||||
|
|
||||||
HIDDEN bool add_not_empty(TToken_string& str, int pos, TConfig& ini, const char* var)
|
HIDDEN bool add_not_empty(TToken_string& str, int pos, TConfig& ini, const char* var)
|
||||||
{
|
{
|
||||||
const TString& val = ini.get(var);
|
TString val = ini.get(var);
|
||||||
|
if (val.starts_with("\""))
|
||||||
|
val.strip("\"");
|
||||||
bool ok = val.full();
|
bool ok = val.full();
|
||||||
if (ok)
|
if (ok)
|
||||||
str.add(val, pos);
|
str.add(val, pos);
|
||||||
|
@ -180,6 +180,8 @@ protected: // TRelation_application
|
|||||||
virtual void init_insert_mode(TMask& m);
|
virtual void init_insert_mode(TMask& m);
|
||||||
virtual void init_modify_mode(TMask& m);
|
virtual void init_modify_mode(TMask& m);
|
||||||
virtual bool save_and_new() const;
|
virtual bool save_and_new() const;
|
||||||
|
virtual bool save_and_quit() const;
|
||||||
|
virtual bool is_transaction() const;
|
||||||
virtual bool get_next_key(TToken_string& key);
|
virtual bool get_next_key(TToken_string& key);
|
||||||
virtual int read(TMask& m);
|
virtual int read(TMask& m);
|
||||||
virtual int write(const TMask& m);
|
virtual int write(const TMask& m);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user