Patch level : 2.0 632

Files correlati     : sv1.exe sv1100a.msk
Ricompilazione Demo : [ ]
Commento            :

Richiesta Cliente CMM
Eliminata richiesta di conferma della stampa tra un agente e l'altro.


git-svn-id: svn://10.65.10.50/trunk@11552 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
guy 2003-10-31 10:46:13 +00:00
parent f0a3ae97c0
commit d838b8e2e8
2 changed files with 51 additions and 13 deletions

View File

@ -1090,7 +1090,9 @@ bool TStampa_schede::stampa_clifo(TCursor& cur, const TString& ragsoc, bool last
{
col1.set_col_head("Base sconto");
col2.set_col_head("Totale");
} else {
}
else
{
col1.set_col_head("Netto scontato");
col2.set_col_head("Lordo scontato");
}
@ -1119,7 +1121,7 @@ bool TStampa_schede::stampa_selezione(TCursor& clifocur, const TSheet& clifoshee
long toprint = clifosheet.checked();
if (toprint == 0) toprint = clifos;
const bool all = toprint == clifos;
const long items = clifocur.items();
const TRecnotype items = clifocur.items();
TString ragsoc;
@ -1135,11 +1137,11 @@ bool TStampa_schede::stampa_selezione(TCursor& clifocur, const TSheet& clifoshee
TForm_item& tit = _form->find_field('H',odd_page,FF_TITOLO);
tit.set("agenti");
TString header(160);
TString header;
header = "Preparazione file temporaneo di stampa per l'agente: ";
header << _curagente;
pi = new TProgind(items, header, TRUE, TRUE, 60);
pi = new TProgind(items, header, TRUE, TRUE);
// Sostituisce il file principale
TIsamtempfile* tab = new TIsamtempfile(LF_TAB, "svschede", TRUE,TRUE);
@ -1148,7 +1150,7 @@ bool TStampa_schede::stampa_selezione(TCursor& clifocur, const TSheet& clifoshee
_progressivo = 0;
}
printer().open();
// printer().open(); // Spostata altrove
for (clifocur = 0; clifocur.pos() < clifos && toprint > 0 && !cancel; ++clifocur)
{
if (all || clifosheet.checked(clifocur.pos()))
@ -1159,7 +1161,14 @@ bool TStampa_schede::stampa_selezione(TCursor& clifocur, const TSheet& clifoshee
ragsoc << ' ' << codcf << " - " << clifocur.file().get(CLI_RAGSOC);
if (pi)
{
pi->addstatus(1L);
if (pi->iscancelled())
{
cancel = true;
break;
}
}
rec.put(DOC_TIPOCF, tipocf);
rec.put(DOC_CODCF, codcf);
@ -1188,7 +1197,7 @@ bool TStampa_schede::stampa_selezione(TCursor& clifocur, const TSheet& clifoshee
// In modo che venga automaticamente cancellato il precedente file temporaneo
_form->relation()->replace(new TLocalisamfile(LF_TAB));
}
printer().close();
// printer().close(); Spostata altrove
if (pi)
delete pi;
@ -1286,6 +1295,7 @@ void TStampa_schede::main_loop()
const bool all = toprint == 0 || toprint == clifos;
bool cancel = FALSE;
printer().open(); // Spostata da stampa_selezione
if (stampa_per_agente())
{
TRelation relagenti(LF_AGENTI);
@ -1302,7 +1312,6 @@ void TStampa_schede::main_loop()
const int codpos = m.get_int(SC_SORTCF); // Posizione del codice clifo nello sheet
TAssoc_array selection;
if (!all)
{
// Crea la lista degli elementi selezionati dall'utente
@ -1316,16 +1325,44 @@ void TStampa_schede::main_loop()
}
}
// Crea la lista degli agenti da stampare
TAssoc_array cia;
TRelation rel(LF_DOC);
TRectype rec(LF_DOC);
rec.put(DOC_TIPOCF, m.get_who());
TRectype darec(LF_DOC), arec(LF_DOC);
/*
int key = 0;
TString filterage;
if (_fromdate.ok() || _todate.ok())
{
key = 3;
if (_fromdate.ok())
{
darec.put(DOC_DATADOC, _fromdate);
}
if (_todate.ok())
{
arec.put(DOC_DATADOC, _todate);
}
}
else
{
key = 2;
darec.put(DOC_TIPOCF, m.get_who());
arec.put(DOC_TIPOCF, m.get_who());
}
*/
for (curagenti = 0L; curagenti.pos() < ages && !cancel; ++curagenti)
{
_totage.destroy(); // Azzera totali agente
TString filterage(filter);
if (filterage.not_empty()) filterage << "&&";
filterage << '(' << DOC_CODAG << "==\"" << recagenti.get(AGE_CODAGE) << "\")";
TCursor cur(&rel, filterage, 2, &rec, &rec);
TCursor cur(&rel, filterage, 2, &darec, &arec);
cur.set_filterfunction(filtra_doc_per_stat);
const long docs = cur.items();
@ -1368,6 +1405,7 @@ void TStampa_schede::main_loop()
if (!cancel)
stampa_selezione(clifocur, clifosheet, filter);
}
printer().close(); // Spostata da stampa_selezione
delete _form;
}

View File

@ -43,9 +43,9 @@ BEGIN
ITEM "2|Per ragione sociale" MESSAGE HIDE,3@|SHOW,2@
END
NUMBER SC_NSEL 3
NUMBER SC_NSEL 5
BEGIN
PROMPT 71 2 "N. "
PROMPT 69 2 "N. "
FLAGS "D"
END