Patch level : 12.00 1280
Files correlati : sc0.exe Commento : Programma di controllo e ripristino partite errate.
This commit is contained in:
parent
9312283490
commit
59cccf46be
@ -8,7 +8,8 @@ int main(int argc, char** argv)
|
|||||||
switch(n)
|
switch(n)
|
||||||
{
|
{
|
||||||
case 1: sc0200(argc,argv); break; // Gestione partite
|
case 1: sc0200(argc,argv); break; // Gestione partite
|
||||||
case 2: sc0300(argc,argv); break; // Pareggio partite
|
case 2: sc0300(argc, argv); break; // Pareggio partite
|
||||||
|
case 3: sc0400(argc, argv); break; // Controllo partite
|
||||||
default: sc0100(argc,argv); break; // Gestione classica
|
default: sc0100(argc,argv); break; // Gestione classica
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
int sc0100(int argc, char* argv[]);
|
int sc0100(int argc, char* argv[]);
|
||||||
int sc0200(int argc, char* argv[]);
|
int sc0200(int argc, char* argv[]);
|
||||||
int sc0300(int argc, char* argv[]);
|
int sc0300(int argc, char* argv[]);
|
||||||
|
int sc0400(int argc, char* argv[]);
|
||||||
|
80
src/sc/sc0400.cpp
Normal file
80
src/sc/sc0400.cpp
Normal file
@ -0,0 +1,80 @@
|
|||||||
|
#include <applicat.h>
|
||||||
|
#include <progind.h>
|
||||||
|
#include <recset.h>
|
||||||
|
#include <relation.h>
|
||||||
|
#include <reputils.h>
|
||||||
|
#include "../cg/cgsaldac.h"
|
||||||
|
#include <nditte.h>
|
||||||
|
#include <partite.h>
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////
|
||||||
|
// TControllo_partite
|
||||||
|
///////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
class TControllo_partite : public TSkeleton_application
|
||||||
|
{
|
||||||
|
protected:
|
||||||
|
virtual void main_loop();
|
||||||
|
};
|
||||||
|
|
||||||
|
void TControllo_partite::main_loop()
|
||||||
|
{
|
||||||
|
TLog_report log("Controllo partite");
|
||||||
|
TCursor part(new TRelation(LF_PARTITE));
|
||||||
|
TString4 last_tipocf;
|
||||||
|
int last_gruppo = -1;
|
||||||
|
int last_conto = -1;
|
||||||
|
long last_sottoconto = -1L;
|
||||||
|
int last_anno = -1;
|
||||||
|
TString last_npart;
|
||||||
|
const long items = part.items();
|
||||||
|
const int codditta = prefix().get_codditta();
|
||||||
|
|
||||||
|
{
|
||||||
|
TProgress_monitor p(items, "Controllo partite");
|
||||||
|
|
||||||
|
part.freeze();
|
||||||
|
log.line();
|
||||||
|
log.log(0, format("Ditta %s", (const char *)cache().get(LF_NDITTE, codditta, NDT_RAGSOC)));
|
||||||
|
log.line();
|
||||||
|
for (part = 0L; p.addstatus() && part.pos() < items; ++part)
|
||||||
|
{
|
||||||
|
const TString4 tipocf = part.curr().get(PART_TIPOCF);
|
||||||
|
const int gruppo = part.curr().get_int(PART_GRUPPO);
|
||||||
|
const int conto = part.curr().get_int(PART_CONTO);
|
||||||
|
const long sottoconto = part.curr().get_long(PART_SOTTOCONTO);
|
||||||
|
const TString npart = part.curr().get(PART_NUMPART);
|
||||||
|
const int anno = part.curr().get_int(PART_ANNO);
|
||||||
|
|
||||||
|
if ((tipocf != last_tipocf) || (gruppo != last_gruppo) ||
|
||||||
|
(conto != last_conto) || (sottoconto != last_sottoconto) ||
|
||||||
|
(npart != last_npart) || (anno != last_anno))
|
||||||
|
{
|
||||||
|
last_tipocf = tipocf;
|
||||||
|
last_gruppo = gruppo;
|
||||||
|
last_conto = conto;
|
||||||
|
last_sottoconto = sottoconto;
|
||||||
|
last_npart = npart;
|
||||||
|
last_anno = anno;
|
||||||
|
|
||||||
|
TPartita p(part.curr());
|
||||||
|
|
||||||
|
if (p.patched())
|
||||||
|
log.log(0, format(FR("La partita %s %03d %03d %0ld %04d %s è stata corretta"),
|
||||||
|
(const char *)tipocf, gruppo, conto, sottoconto, anno, (const char *)npart));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
log.preview();
|
||||||
|
}
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////
|
||||||
|
// Main
|
||||||
|
///////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
int sc0400(int argc, char* argv[])
|
||||||
|
{
|
||||||
|
TControllo_partite pp;
|
||||||
|
pp.run(argc, argv, TR("Controllo Partite"));
|
||||||
|
return 0;
|
||||||
|
}
|
@ -24,4 +24,5 @@ Item_03 = "Allineamento Partite", "sc1 -2", "F"
|
|||||||
Item_04 = "Abbuoni automatici", "sc1 -3", "F"
|
Item_04 = "Abbuoni automatici", "sc1 -3", "F"
|
||||||
Item_05 = "Controllo pagamenti doppi", "sc1 -4", "F"
|
Item_05 = "Controllo pagamenti doppi", "sc1 -4", "F"
|
||||||
Item_06 = "Controllo partite chiuse", "sc1 -5", "F"
|
Item_06 = "Controllo partite chiuse", "sc1 -5", "F"
|
||||||
|
Item_07 = "Controllo partite errate", "sc0 -3", "F"
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user