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)
{
case 1:
cg5100(argc,argv); break; // Parametri ditta
case 2:
cg5200(argc,argv); break; // Visualizzazione saldi
case 3:
cg5300(argc,argv); break; // Parametri liquidazione
case 4:
cg5400(argc,argv); break; // Ripristino stampe
case 5:
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
case 1: cg5100(argc,argv); break; // Parametri ditta
case 2: cg5200(argc,argv); break; // Visualizzazione saldi
case 3: cg5300(argc,argv); break; // Parametri liquidazione
case 4: cg5400(argc,argv); break; // Ripristino stampe
case 5: 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;
}

View File

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

View File

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