Patch level : 2.0 450
Files correlati : sc2.exe Ricompilazione Demo : [ ] Commento : CM701063 Nella stampa degli estratti conto con la selezione per agente fare in modo che vengano considerati anche i pagamenti non assegnati. git-svn-id: svn://10.65.10.50/trunk@10996 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
b629eb591e
commit
15af75c823
@ -1249,12 +1249,13 @@ protected: // TSkeleton_application
|
|||||||
virtual void on_firm_change();
|
virtual void on_firm_change();
|
||||||
virtual void on_config_change();
|
virtual void on_config_change();
|
||||||
|
|
||||||
|
void find_agents_scads(TAssoc_array& agents);
|
||||||
|
void find_agents_unassigned_pags(TAssoc_array& agents);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static TStampaEC_application& app() { return (TStampaEC_application&)main_app(); }
|
static TStampaEC_application& app() { return (TStampaEC_application&)main_app(); }
|
||||||
|
|
||||||
long find_agents_games(TAssoc_array& agents);
|
long find_agents_games(TAssoc_array& agents);
|
||||||
|
|
||||||
public:
|
|
||||||
TEC_mask& mask() { return *_msk; }
|
TEC_mask& mask() { return *_msk; }
|
||||||
TCursor_sheet& sheet() { return _msk->cur_sheet(); }
|
TCursor_sheet& sheet() { return _msk->cur_sheet(); }
|
||||||
TEC_form& form() { return *_form; }
|
TEC_form& form() { return *_form; }
|
||||||
@ -1321,7 +1322,7 @@ bool TStampaEC_application::print_selected()
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
long TStampaEC_application::find_agents_games(TAssoc_array& agents)
|
void TStampaEC_application::find_agents_scads(TAssoc_array& agents)
|
||||||
{
|
{
|
||||||
const TString& fromage = mask().get(F_FROM_AGENT);
|
const TString& fromage = mask().get(F_FROM_AGENT);
|
||||||
const TString& toage = mask().get(F_TO_AGENT);
|
const TString& toage = mask().get(F_TO_AGENT);
|
||||||
@ -1368,7 +1369,52 @@ long TStampaEC_application::find_agents_games(TAssoc_array& agents)
|
|||||||
}
|
}
|
||||||
games->add_game(curr);
|
games->add_game(curr);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void TStampaEC_application::find_agents_unassigned_pags(TAssoc_array& agents)
|
||||||
|
{
|
||||||
|
const TString& fromage = mask().get(F_FROM_AGENT);
|
||||||
|
const TString& toage = mask().get(F_TO_AGENT);
|
||||||
|
|
||||||
|
TRelation rel(LF_PAGSCA);
|
||||||
|
TRectype& curr = rel.curr();
|
||||||
|
|
||||||
|
curr.put(PAGSCA_TIPOC, mask().get(SC_CLIFO));
|
||||||
|
|
||||||
|
TString filter;
|
||||||
|
filter << '(' << PAGSCA_NRATA <<"==9999)";
|
||||||
|
if (fromage.not_empty())
|
||||||
|
filter << "&&(" << PAGSCA_CODAG << ">=" << fromage << ')';
|
||||||
|
else
|
||||||
|
filter << "&&(" << PAGSCA_CODAG << ">0)";
|
||||||
|
if (toage.not_empty())
|
||||||
|
filter << "&&(" << PAGSCA_CODAG << "<=" << toage << ')';
|
||||||
|
|
||||||
|
TCursor cur(&rel, filter, 1, &curr, &curr);
|
||||||
|
const long items = cur.items();
|
||||||
|
cur.freeze();
|
||||||
|
|
||||||
|
TProgind pi(items, "Ricerca oagamenti non assegnati per agente...", TRUE, TRUE);
|
||||||
|
for (cur = 0L; cur.pos() < items; ++cur)
|
||||||
|
{
|
||||||
|
pi.addstatus(1);
|
||||||
|
if (pi.iscancelled())
|
||||||
|
break;
|
||||||
|
const char* codag = curr.get(PAGSCA_CODAG);
|
||||||
|
TEC_Game_list* games = (TEC_Game_list*)agents.objptr(codag);
|
||||||
|
if (games == NULL)
|
||||||
|
{
|
||||||
|
games = new TEC_Game_list;
|
||||||
|
agents.add(codag, (TObject*)games);
|
||||||
|
}
|
||||||
|
games->add_game(curr);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
long TStampaEC_application::find_agents_games(TAssoc_array& agents)
|
||||||
|
{
|
||||||
|
find_agents_scads(agents);
|
||||||
|
find_agents_unassigned_pags(agents);
|
||||||
return agents.items();
|
return agents.items();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user