Patch level : 10.0
Files correlati : ha2.exe ha2100a.msk Ricompilazione Demo : [ ] Commento : Gestione invio definitivo e forzature su file PRIVAT git-svn-id: svn://10.65.10.50/branches/R_10_00@22520 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
091cb9a1a7
commit
a92ca91767
@ -179,6 +179,11 @@ void THardy_esselunga::elabora(const TMask& mask)
|
|||||||
const long items = genera_recordset(mask, recset);
|
const long items = genera_recordset(mask, recset);
|
||||||
if (items == 0)
|
if (items == 0)
|
||||||
log.log(1, "Non esistono documenti che soddisfano i parametri selezionati.");
|
log.log(1, "Non esistono documenti che soddisfano i parametri selezionati.");
|
||||||
|
|
||||||
|
// memorizzo su campo virtuale che il doc. e' stato inviato
|
||||||
|
const bool definitivo = mask.get_bool(F_DEFINITIVO);
|
||||||
|
const bool forzatura = mask.get_bool(F_FORZATURA);
|
||||||
|
|
||||||
// lettura dei documenti da recordset
|
// lettura dei documenti da recordset
|
||||||
TProgind pi(recset.items(), TR("Elaborazione documenti in corso..."), true, true);
|
TProgind pi(recset.items(), TR("Elaborazione documenti in corso..."), true, true);
|
||||||
TPrivat_recordset privat(dipendenza);
|
TPrivat_recordset privat(dipendenza);
|
||||||
@ -194,6 +199,10 @@ void THardy_esselunga::elabora(const TMask& mask)
|
|||||||
if ( codcf_esselunga > 0)
|
if ( codcf_esselunga > 0)
|
||||||
{
|
{
|
||||||
TDocumento doc(recset.cursor()->curr());
|
TDocumento doc(recset.cursor()->curr());
|
||||||
|
|
||||||
|
if (!forzatura && doc.get_bool("HA_PRIVAT"))
|
||||||
|
continue; // Scarta documenti già inviati
|
||||||
|
|
||||||
// passo tutte le righe del documento all'AS400recordset
|
// passo tutte le righe del documento all'AS400recordset
|
||||||
TString16 numdoc;
|
TString16 numdoc;
|
||||||
const TString& num = doc.numerazione();
|
const TString& num = doc.numerazione();
|
||||||
@ -219,6 +228,11 @@ void THardy_esselunga::elabora(const TMask& mask)
|
|||||||
privat.set("QTARESA", "0000000");
|
privat.set("QTARESA", "0000000");
|
||||||
}
|
}
|
||||||
} //FOR_EACH...
|
} //FOR_EACH...
|
||||||
|
if (definitivo)
|
||||||
|
{
|
||||||
|
doc.put("HA_PRIVAT", "X");
|
||||||
|
doc.rewrite();
|
||||||
|
}
|
||||||
} // if check_cliente...
|
} // if check_cliente...
|
||||||
} //for (bool ok = recset.move_first()...
|
} //for (bool ok = recset.move_first()...
|
||||||
|
|
||||||
@ -226,12 +240,6 @@ void THardy_esselunga::elabora(const TMask& mask)
|
|||||||
tempfile.temp();
|
tempfile.temp();
|
||||||
privat.save_as(tempfile, fmt_text);
|
privat.save_as(tempfile, fmt_text);
|
||||||
fcopy(tempfile, file_privat, true);
|
fcopy(tempfile, file_privat, true);
|
||||||
// memorizzo su campo virtuale che il doc. e' stato inviato
|
|
||||||
const bool definitivo = mask.get_bool(F_DEFINITIVO);
|
|
||||||
if (definitivo)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
log.print_or_preview();
|
log.print_or_preview();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
#define F_DIPENDENZA 205
|
#define F_DIPENDENZA 205
|
||||||
#define F_DEFINITIVO 206
|
#define F_DEFINITIVO 206
|
||||||
#define F_SHEETDOC 207
|
#define F_SHEETDOC 207
|
||||||
|
#define F_FORZATURA 208
|
||||||
// campi dello sheet
|
// campi dello sheet
|
||||||
#define F_S_CODNUM 101
|
#define F_S_CODNUM 101
|
||||||
#define F_S_DESNUM 102
|
#define F_S_DESNUM 102
|
||||||
|
@ -77,6 +77,11 @@ BEGIN
|
|||||||
PROMPT 2 6 "Trasferimento definitivo"
|
PROMPT 2 6 "Trasferimento definitivo"
|
||||||
END
|
END
|
||||||
|
|
||||||
|
BOOLEAN F_FORZATURA
|
||||||
|
BEGIN
|
||||||
|
PROMPT 35 6 "Includere documenti già trasferiti"
|
||||||
|
END
|
||||||
|
|
||||||
SPREADSHEET F_SHEETDOC 78 10
|
SPREADSHEET F_SHEETDOC 78 10
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 1 8 "Scelta documenti"
|
PROMPT 1 8 "Scelta documenti"
|
||||||
|
@ -691,7 +691,7 @@ void THardy_esselunga_fat::elabora(const TMask& mask)
|
|||||||
if (codcf_esselunga.full())
|
if (codcf_esselunga.full())
|
||||||
{
|
{
|
||||||
TDocumento doc(recset.cursor()->curr());
|
TDocumento doc(recset.cursor()->curr());
|
||||||
if (doc.get_bool("HA_FATTURE") && !forzatura)
|
if (!forzatura && doc.get_bool("HA_FATTURE"))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (esistono_righe_esselunga(doc))
|
if (esistono_righe_esselunga(doc))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user