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:
parent
f0a3ae97c0
commit
d838b8e2e8
@ -1090,7 +1090,9 @@ bool TStampa_schede::stampa_clifo(TCursor& cur, const TString& ragsoc, bool last
|
|||||||
{
|
{
|
||||||
col1.set_col_head("Base sconto");
|
col1.set_col_head("Base sconto");
|
||||||
col2.set_col_head("Totale");
|
col2.set_col_head("Totale");
|
||||||
} else {
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
col1.set_col_head("Netto scontato");
|
col1.set_col_head("Netto scontato");
|
||||||
col2.set_col_head("Lordo 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();
|
long toprint = clifosheet.checked();
|
||||||
if (toprint == 0) toprint = clifos;
|
if (toprint == 0) toprint = clifos;
|
||||||
const bool all = toprint == clifos;
|
const bool all = toprint == clifos;
|
||||||
const long items = clifocur.items();
|
const TRecnotype items = clifocur.items();
|
||||||
|
|
||||||
TString ragsoc;
|
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);
|
TForm_item& tit = _form->find_field('H',odd_page,FF_TITOLO);
|
||||||
tit.set("agenti");
|
tit.set("agenti");
|
||||||
|
|
||||||
TString header(160);
|
TString header;
|
||||||
header = "Preparazione file temporaneo di stampa per l'agente: ";
|
header = "Preparazione file temporaneo di stampa per l'agente: ";
|
||||||
header << _curagente;
|
header << _curagente;
|
||||||
|
|
||||||
pi = new TProgind(items, header, TRUE, TRUE, 60);
|
pi = new TProgind(items, header, TRUE, TRUE);
|
||||||
|
|
||||||
// Sostituisce il file principale
|
// Sostituisce il file principale
|
||||||
TIsamtempfile* tab = new TIsamtempfile(LF_TAB, "svschede", TRUE,TRUE);
|
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;
|
_progressivo = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
printer().open();
|
// printer().open(); // Spostata altrove
|
||||||
for (clifocur = 0; clifocur.pos() < clifos && toprint > 0 && !cancel; ++clifocur)
|
for (clifocur = 0; clifocur.pos() < clifos && toprint > 0 && !cancel; ++clifocur)
|
||||||
{
|
{
|
||||||
if (all || clifosheet.checked(clifocur.pos()))
|
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);
|
ragsoc << ' ' << codcf << " - " << clifocur.file().get(CLI_RAGSOC);
|
||||||
|
|
||||||
if (pi)
|
if (pi)
|
||||||
|
{
|
||||||
pi->addstatus(1L);
|
pi->addstatus(1L);
|
||||||
|
if (pi->iscancelled())
|
||||||
|
{
|
||||||
|
cancel = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
rec.put(DOC_TIPOCF, tipocf);
|
rec.put(DOC_TIPOCF, tipocf);
|
||||||
rec.put(DOC_CODCF, codcf);
|
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
|
// In modo che venga automaticamente cancellato il precedente file temporaneo
|
||||||
_form->relation()->replace(new TLocalisamfile(LF_TAB));
|
_form->relation()->replace(new TLocalisamfile(LF_TAB));
|
||||||
}
|
}
|
||||||
printer().close();
|
// printer().close(); Spostata altrove
|
||||||
|
|
||||||
if (pi)
|
if (pi)
|
||||||
delete pi;
|
delete pi;
|
||||||
@ -1286,6 +1295,7 @@ void TStampa_schede::main_loop()
|
|||||||
const bool all = toprint == 0 || toprint == clifos;
|
const bool all = toprint == 0 || toprint == clifos;
|
||||||
bool cancel = FALSE;
|
bool cancel = FALSE;
|
||||||
|
|
||||||
|
printer().open(); // Spostata da stampa_selezione
|
||||||
if (stampa_per_agente())
|
if (stampa_per_agente())
|
||||||
{
|
{
|
||||||
TRelation relagenti(LF_AGENTI);
|
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
|
const int codpos = m.get_int(SC_SORTCF); // Posizione del codice clifo nello sheet
|
||||||
TAssoc_array selection;
|
TAssoc_array selection;
|
||||||
|
|
||||||
if (!all)
|
if (!all)
|
||||||
{
|
{
|
||||||
// Crea la lista degli elementi selezionati dall'utente
|
// Crea la lista degli elementi selezionati dall'utente
|
||||||
@ -1315,17 +1324,45 @@ void TStampa_schede::main_loop()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Crea la lista degli agenti da stampare
|
||||||
|
TAssoc_array cia;
|
||||||
|
|
||||||
TRelation rel(LF_DOC);
|
TRelation rel(LF_DOC);
|
||||||
TRectype rec(LF_DOC);
|
TRectype darec(LF_DOC), arec(LF_DOC);
|
||||||
rec.put(DOC_TIPOCF, m.get_who());
|
|
||||||
|
/*
|
||||||
|
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)
|
for (curagenti = 0L; curagenti.pos() < ages && !cancel; ++curagenti)
|
||||||
{
|
{
|
||||||
_totage.destroy(); // Azzera totali agente
|
_totage.destroy(); // Azzera totali agente
|
||||||
TString filterage(filter);
|
TString filterage(filter);
|
||||||
if (filterage.not_empty()) filterage << "&&";
|
if (filterage.not_empty()) filterage << "&&";
|
||||||
filterage << '(' << DOC_CODAG << "==\"" << recagenti.get(AGE_CODAGE) << "\")";
|
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);
|
cur.set_filterfunction(filtra_doc_per_stat);
|
||||||
const long docs = cur.items();
|
const long docs = cur.items();
|
||||||
|
|
||||||
@ -1368,6 +1405,7 @@ void TStampa_schede::main_loop()
|
|||||||
if (!cancel)
|
if (!cancel)
|
||||||
stampa_selezione(clifocur, clifosheet, filter);
|
stampa_selezione(clifocur, clifosheet, filter);
|
||||||
}
|
}
|
||||||
|
printer().close(); // Spostata da stampa_selezione
|
||||||
|
|
||||||
delete _form;
|
delete _form;
|
||||||
}
|
}
|
||||||
|
@ -43,9 +43,9 @@ BEGIN
|
|||||||
ITEM "2|Per ragione sociale" MESSAGE HIDE,3@|SHOW,2@
|
ITEM "2|Per ragione sociale" MESSAGE HIDE,3@|SHOW,2@
|
||||||
END
|
END
|
||||||
|
|
||||||
NUMBER SC_NSEL 3
|
NUMBER SC_NSEL 5
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 71 2 "N. "
|
PROMPT 69 2 "N. "
|
||||||
FLAGS "D"
|
FLAGS "D"
|
||||||
END
|
END
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user