Patch level : 10.0

Files correlati     : cg5100a.msk
Ricompilazione Demo : [ ]
Commento            :
Rimodernata maschera parametri liquidazione


git-svn-id: svn://10.65.10.50/trunk@18378 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
guy 2009-02-27 12:25:32 +00:00
parent 33eac8a89d
commit 30a22ff010
3 changed files with 31 additions and 74 deletions

View File

@ -8,24 +8,15 @@ int main(int argc,char** argv)
switch (n) switch (n)
{ {
case 1: case 1: cg5100(argc,argv); break; // Parametri ditta
cg5100(argc,argv); break; // Parametri ditta case 2: cg5200(argc,argv); break; // Visualizzazione saldi
case 2: case 3: cg5300(argc,argv); break; // Parametri liquidazione
cg5200(argc,argv); break; // Visualizzazione saldi case 4: cg5400(argc,argv); break; // Ripristino stampe
case 3: case 5: cg5500(argc,argv); break; // Visualizzazione Liquidazione
cg5300(argc,argv); break; // Parametri liquidazione case 6: cg5600(argc,argv); break; // Ripristino liquidazione
case 4: case 7: cg5700(argc,argv); break; // Dichiarazione periodica
cg5400(argc,argv); break; // Ripristino stampe case 8: cg5800(argc,argv); break; // Quadro VT
case 5: default: cg5000(argc,argv); break; // Parametri Studio
cg5500(argc,argv); break; // Visualizzazione Liquidazione
case 6:
cg5600(argc,argv); break; // Ripristino liquidazione
case 7:
cg5700(argc,argv); break; // Dichiarazione periodica
case 8:
cg5800(argc,argv); break; // Quadro VT
default:
cg5000(argc,argv); break; // Parametri Studio
} }
return 0; return 0;
} }

View File

@ -2,15 +2,7 @@
TOOLBAR "topbar" 0 0 0 2 TOOLBAR "topbar" 0 0 0 2
BUTTON DLG_OK 10 2 #include <stdbar.h>
BEGIN
PROMPT -12 -11 ""
END
BUTTON DLG_QUIT 10 2
BEGIN
PROMPT -22 -11 ""
END
ENDPAGE ENDPAGE

View File

@ -1,29 +1,26 @@
#include <applicat.h> #include <applicat.h>
#include <tabutil.h> #include <tabutil.h>
#include <mask.h>
#include <prefix.h>
#include <sheet.h> #include <sheet.h>
#include <relation.h> #include <relation.h>
#include <recarray.h> #include <recarray.h>
#include <urldefid.h> #include <urldefid.h>
#include <utility.h> #include <utility.h>
#include <nditte.h>
#define F_YEAR 101 #define F_YEAR 101
// ripristino liquidazione // ripristino liquidazione dati anno e ditta scancella tutte
// dati anno e ditta scancella tutte // le tabelle dimmerda piu' che altro serve alla Prassi
// le tabelle dimmerda
// piu' che altro serve alla Prassi
// per non far cazzate quando provano // per non far cazzate quando provano
class TRipristino_liq : public TApplication class TRipristino_liq : public TApplication
{ {
long _firm; long _firm;
TString _year; int _year;
TRelation* _nditte;
TArray_sheet* _ditte; TArray_sheet* _ditte;
TArray _nomiditte; TString_array _nomiditte;
virtual bool create(); virtual bool create();
virtual bool destroy(); virtual bool destroy();
@ -37,7 +34,7 @@ public:
void build_ditte_sheet(); void build_ditte_sheet();
void build_nomiditte(); void build_nomiditte();
void set_year(const char* y) { _year = y; } void set_year(int y) { _year = y; }
bool do_restore(); bool do_restore();
bool restore_firm(long firm); bool restore_firm(long firm);
@ -53,8 +50,7 @@ bool TRipristino_liq::ch_year_handler(TMask_field& f, KEY key)
{ {
if (key == K_TAB && f.focusdirty()) if (key == K_TAB && f.focusdirty())
{ {
TWait_cursor hourglass; app().set_year(atoi(f.get()));
app().set_year(f.get());
app().build_nomiditte(); app().build_nomiditte();
app().build_ditte_sheet(); app().build_ditte_sheet();
} }
@ -83,37 +79,17 @@ void TRipristino_liq::build_ditte_sheet()
void TRipristino_liq::build_nomiditte() void TRipristino_liq::build_nomiditte()
{ {
_nomiditte.destroy(); TString16 cod;
// ricostruire _nomiditte e rifare build_ditte_sheet prefix().firms(_nomiditte);
TRectype & ditta = _nditte->lfile().curr(); FOR_EACH_ARRAY_ROW(_nomiditte, i, row)
TCursor cur(_nditte);
const TRecnotype items = cur.items();
cur.freeze();
for (cur = 0L; cur.pos() < items; ++cur)
{ {
// check no archivi const long firm = atol(*row);
bool good = prefix().exist(ditta.get_long("CODDITTA")); row->add(cache().get(LF_NDITTE, firm).get(NDT_RAGSOC));
if (good)
{
// check no parametri liquidazione
TString16 cod;
cod.format("%05ld%s", ditta.get_long("CODDITTA"), (const char *)_year);
const TRectype & lia = cache().get("%LIA", cod);
TToken_string* d = new TToken_string(64); // check no parametri liquidazione
cod.format("%05ld%04d", firm, _year);
// add record const TString& fr = cache().get("%LIA", cod, "S7");
d->add(ditta.get("CODDITTA")); row->add(fr.blank() ? "??" : fr);
d->add(ditta.get("RAGSOC"));
const TString & fr = lia.get("S7");
d->add(fr.empty() ? "??" : fr);
_nomiditte.add(d);
}
} }
TApplication::set_firm(_firm); TApplication::set_firm(_firm);
} }
@ -124,8 +100,7 @@ bool TRipristino_liq::create()
TApplication::create(); TApplication::create();
_firm = get_firm(); _firm = get_firm();
TDate oggi(TODAY); TDate oggi(TODAY);
_year.format("%d",oggi.year()); _year = oggi.year();
_nditte = new TRelation(LF_NDITTE);
_ditte = new TArray_sheet(-1, -1, 65, 20, TR("Selezione Ditte"), _ditte = new TArray_sheet(-1, -1, 65, 20, TR("Selezione Ditte"),
HR("@1|Cod.@5|Ragione Sociale@50|Vers.")); HR("@1|Cod.@5|Ragione Sociale@50|Vers."));
build_nomiditte(); build_nomiditte();
@ -137,7 +112,6 @@ bool TRipristino_liq::create()
bool TRipristino_liq::destroy() bool TRipristino_liq::destroy()
{ {
delete _nditte;
delete _ditte; delete _ditte;
return TApplication::destroy(); return TApplication::destroy();
} }
@ -181,7 +155,7 @@ bool TRipristino_liq::do_restore()
void TRipristino_liq::zero_cursor(const char * tablename) void TRipristino_liq::zero_cursor(const char * tablename)
{ {
TRelation rel(tablename); TRelation rel(tablename);
TRectype & rec = rel.curr(); TRectype& rec = rel.curr();
rec.put("CODTAB", _year); rec.put("CODTAB", _year);
@ -202,7 +176,7 @@ bool TRipristino_liq::restore_firm(long firm)
TTable lia("%LIA"); TTable lia("%LIA");
TString cod; TString cod;
cod.format("%05ld%s", firm, (const char *)_year); cod.format("%05ld%04d", firm, _year);
lia.put("CODTAB", cod); lia.put("CODTAB", cod);
if (lia.read(_isequal, _lock) == NOERR) if (lia.read(_isequal, _lock) == NOERR)