Patch level : 10.0 NO PATCH
Files correlati : ps6342 Ricompilazione Demo : [ ] Commento : Aggiunto il programma sui saldi di analitica git-svn-id: svn://10.65.10.50/branches/R_10_00@21015 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
ae5ef4e2fc
commit
587378f621
@ -11,6 +11,7 @@ int main(int argc, char** argv)
|
||||
case 1: pd6342200(argc, argv); break; //importatore di movimenti in analitica per Habilita
|
||||
case 2: pd6342300(argc, argv); break; //ribaltamento ricorsivo movimenti per Habilita
|
||||
case 3: pd6342400(argc, argv); break; //quadratore dei movimenti analitici per Habilita
|
||||
case 4: pd6342500(argc, argv); break; //scheletro programma sui saldi di analitica per Habilita
|
||||
default: pd6342100(argc, argv); break; //stampa costi/ricavi mensili per Habilita
|
||||
}
|
||||
return 0;
|
||||
|
@ -1,4 +1,5 @@
|
||||
int pd6342100(int argc, char* argv[]);
|
||||
int pd6342200(int argc, char* argv[]);
|
||||
int pd6342300(int argc, char* argv[]);
|
||||
int pd6342400(int argc, char* argv[]);
|
||||
int pd6342400(int argc, char* argv[]);
|
||||
int pd6342500(int argc, char* argv[]);
|
113
ps/pd6342500.cpp
Executable file
113
ps/pd6342500.cpp
Executable file
@ -0,0 +1,113 @@
|
||||
#include <defmask.h>
|
||||
|
||||
#include "pd6342500a.h"
|
||||
#include "../ca/calib01.h"
|
||||
#include "../ca/movana.h"
|
||||
#include "../ca/rmovana.h"
|
||||
#include "../ve/velib.h"
|
||||
|
||||
///////////////////////////////////////////////////////////
|
||||
// TSaldi_ana_msk
|
||||
///////////////////////////////////////////////////////////
|
||||
|
||||
class TSaldi_ana_msk: public TAutomask
|
||||
{
|
||||
short _first_cdc, _first_cms, _first_fase, _first_conto;
|
||||
short _first_cdc_s, _first_cms_s, _first_fase_s, _first_conto_s;
|
||||
|
||||
protected:
|
||||
void riempi_sheet();
|
||||
|
||||
virtual bool on_field_event(TOperable_field& o, TField_event e, long jolly);
|
||||
public:
|
||||
TSaldi_ana_msk();
|
||||
};
|
||||
|
||||
void TSaldi_ana_msk::riempi_sheet()
|
||||
{
|
||||
TString80 cdc;
|
||||
TString80 cms;
|
||||
TString80 fase;
|
||||
TString80 conto;
|
||||
|
||||
ca_get_fields(*this, cdc, cms, fase, conto, _first_cdc, _first_cms, _first_fase, _first_conto, "CdC", "Cms", "Fase", "Conto");
|
||||
|
||||
TString query;
|
||||
query << "USE SALDANA\n"
|
||||
<< "FROM ANNO=" << get_date(F_DADATA).year() << " CONTO=\"" << conto << "\" COSTO=\"" << cdc << "\" COMMESSA=\"" << cms << "\" FASE=\"" << fase << "\"\n"
|
||||
<< "TO ANNO=" << get_date(F_ADATA).year() << " CONTO=\"" << conto << "\" COSTO=\"" << cdc << "\" COMMESSA=\"" << cms << "\" FASE=\"" << fase << "\"";
|
||||
|
||||
TISAM_recordset saldana(query);
|
||||
}
|
||||
|
||||
bool TSaldi_ana_msk::on_field_event(TOperable_field& o, TField_event e, long jolly)
|
||||
{
|
||||
switch(o.dlg())
|
||||
{
|
||||
case DLG_FINDREC:
|
||||
if(e == fe_button)
|
||||
{
|
||||
riempi_sheet();
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
default: break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
TSaldi_ana_msk::TSaldi_ana_msk() : TAutomask("pd6342500a")
|
||||
{
|
||||
const TDate data(TODAY);
|
||||
const TDate primo(1, 1, data.year());
|
||||
set(F_DADATA, primo);
|
||||
|
||||
TConfig& cfg = ca_config();
|
||||
const bool use_pdcc = cfg.get_bool("UsePdcc");
|
||||
|
||||
_first_cdc = _first_cms = _first_fase = _first_conto;
|
||||
_first_cdc_s = _first_cms_s = _first_fase_s = _first_conto_s;
|
||||
|
||||
//sistema i campi degli sheet tenendo conto della configurazione dell'analitica
|
||||
ca_create_fields_ext(*this, 0, 2, 7, F_CDC1, 0, _first_cdc, _first_cms, _first_fase, _first_conto, "CdC", "Cms", "Fase", "Conto");
|
||||
|
||||
TSheet_field& sheet = sfield(F_SHEET);
|
||||
ca_create_fields_ext(sheet.sheet_mask(), 0, 2, 7, S_CDC1, 0, _first_cdc_s, _first_cms_s, _first_fase_s, _first_conto_s, "CdC", "Cms", "Fase", "Conto");
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////
|
||||
// TSaldi_ana_app
|
||||
///////////////////////////////////////////////////////////
|
||||
|
||||
class TSaldi_ana_app: public TSkeleton_application
|
||||
{
|
||||
protected:
|
||||
virtual bool check_autorization() const {return false;}
|
||||
virtual const char * extra_modules() const {return "ca";}
|
||||
|
||||
virtual void main_loop();
|
||||
|
||||
void elabora();
|
||||
};
|
||||
|
||||
void TSaldi_ana_app::elabora()
|
||||
{
|
||||
}
|
||||
|
||||
void TSaldi_ana_app::main_loop()
|
||||
{
|
||||
TSaldi_ana_msk m;
|
||||
bool running = true;
|
||||
|
||||
while(m.run() == K_ENTER)
|
||||
{
|
||||
elabora();
|
||||
}
|
||||
}
|
||||
|
||||
int pd6342500(int argc, char* argv[])
|
||||
{
|
||||
TSaldi_ana_app app;
|
||||
app.run(argc, argv, TR("Saldi Analitici"));
|
||||
return 0;
|
||||
}
|
289
ps/pd6342500a.uml
Executable file
289
ps/pd6342500a.uml
Executable file
@ -0,0 +1,289 @@
|
||||
#include "pd6342500a.h"
|
||||
|
||||
TOOLBAR "" 0 0 0 2
|
||||
|
||||
BUTTON DLG_FINDREC
|
||||
BEGIN
|
||||
PROMPT 1 1 "Cerca"
|
||||
PICTURE TOOL_FINDREC
|
||||
END
|
||||
|
||||
BUTTON DLG_SAVEREC
|
||||
BEGIN
|
||||
PROMPT 1 1 "Salva"
|
||||
PICTURE TOOL_SAVEREC
|
||||
END
|
||||
|
||||
BUTTON DLG_CANCEL
|
||||
BEGIN
|
||||
PROMPT 1 1 "Annulla"
|
||||
PICTURE TOOL_CANCEL
|
||||
END
|
||||
|
||||
#include <stdbar.h>
|
||||
|
||||
ENDPAGE
|
||||
|
||||
PAGE "Quadra movimenti" -1 -1 80 0
|
||||
|
||||
GROUPBOX DLG_NULL 78 3
|
||||
BEGIN
|
||||
PROMPT 1 0 "@bFiltro righe analitiche"
|
||||
END
|
||||
|
||||
DATE F_DADATA
|
||||
BEGIN
|
||||
PROMPT 2 1 "Considera i movimenti dal "
|
||||
CHECKTYPE REQUIRED
|
||||
END
|
||||
|
||||
DATE F_ADATA
|
||||
BEGIN
|
||||
PROMPT 42 1 "al "
|
||||
FLAGS "A"
|
||||
CHECKTYPE REQUIRED
|
||||
END
|
||||
|
||||
GROUPBOX DLG_NULL 78 5
|
||||
BEGIN
|
||||
PROMPT 1 3 "@bParametri per la quadratura"
|
||||
END
|
||||
|
||||
SPREADSHEET F_SHEET 39 0
|
||||
BEGIN
|
||||
PROMPT 41 8 ""
|
||||
ITEM "Dare@9"
|
||||
ITEM "Avere@9"
|
||||
ITEM "Descrizione@15"
|
||||
ITEM "CDC1"
|
||||
ITEM "CDC2"
|
||||
ITEM "CDC3"
|
||||
ITEM "CDC4"
|
||||
ITEM "CDC5"
|
||||
ITEM "CDC6"
|
||||
ITEM "CDC7"
|
||||
ITEM "CDC8"
|
||||
ITEM "CDC9"
|
||||
ITEM "CDC10"
|
||||
ITEM "CDC11"
|
||||
ITEM "CDC12"
|
||||
ITEM "CDC13"
|
||||
ITEM "CDC14"
|
||||
ITEM "CDC15"
|
||||
ITEM "CDC16"
|
||||
ITEM "Reg@5"
|
||||
ITEM "Riga@5"
|
||||
END
|
||||
|
||||
ENDPAGE
|
||||
ENDMASK
|
||||
|
||||
TOOLBAR "" 0 0 0 2
|
||||
|
||||
BUTTON DLG_OK 2 2
|
||||
BEGIN
|
||||
PROMPT 1 1 ""
|
||||
END
|
||||
|
||||
BUTTON DLG_DELREC 2 2
|
||||
BEGIN
|
||||
PROMPT 2 1 "Sposta"
|
||||
PICTURE BMP_LINK
|
||||
END
|
||||
|
||||
BUTTON DLG_CANCEL 2 2
|
||||
BEGIN
|
||||
PROMPT 3 1 ""
|
||||
END
|
||||
|
||||
ENDPAGE
|
||||
ENDMASK
|
||||
|
||||
PAGE "Riga analitica" -1 -1 78 13
|
||||
|
||||
CURRENCY S_DARE 15
|
||||
BEGIN
|
||||
PROMPT 2 1 "Dare "
|
||||
END
|
||||
|
||||
CURRENCY S_AVERE 15
|
||||
BEGIN
|
||||
PROMPT 43 1 "Avere "
|
||||
END
|
||||
|
||||
STRING S_DESCR 50
|
||||
BEGIN
|
||||
PROMPT 2 2 "Descrizione "
|
||||
END
|
||||
|
||||
STRING S_CDC1 20
|
||||
BEGIN
|
||||
PROMPT 2 3 "Cdc 1"
|
||||
USE LF_CDC
|
||||
CHECKTYPE NORMAL
|
||||
FLAGS "H"
|
||||
END
|
||||
|
||||
STRING S_CDC2 20
|
||||
BEGIN
|
||||
PROMPT 2 3 "Cdc 2"
|
||||
COPY USE S_CDC1
|
||||
CHECKTYPE NORMAL
|
||||
FLAGS "H"
|
||||
END
|
||||
|
||||
STRING S_CDC3 20
|
||||
BEGIN
|
||||
PROMPT 2 3 "Cdc 2"
|
||||
COPY USE S_CDC1
|
||||
CHECKTYPE NORMAL
|
||||
FLAGS "H"
|
||||
END
|
||||
|
||||
STRING S_CDC4 20
|
||||
BEGIN
|
||||
PROMPT 2 3 "Cdc 2"
|
||||
COPY USE S_CDC1
|
||||
CHECKTYPE NORMAL
|
||||
FLAGS "H"
|
||||
END
|
||||
|
||||
STRING S_CDC5 20
|
||||
BEGIN
|
||||
PROMPT 2 3 "Cdc 2"
|
||||
COPY USE S_CDC1
|
||||
CHECKTYPE NORMAL
|
||||
FLAGS "H"
|
||||
END
|
||||
|
||||
STRING S_CDC6 20
|
||||
BEGIN
|
||||
PROMPT 2 3 "Cdc 2"
|
||||
COPY USE S_CDC1
|
||||
CHECKTYPE NORMAL
|
||||
FLAGS "H"
|
||||
END
|
||||
|
||||
STRING S_CDC7 20
|
||||
BEGIN
|
||||
PROMPT 2 4 "Cdc 2"
|
||||
COPY USE S_CDC1
|
||||
CHECKTYPE NORMAL
|
||||
FLAGS "H"
|
||||
END
|
||||
|
||||
STRING S_CDC8 20
|
||||
BEGIN
|
||||
PROMPT 2 4 "Cdc 2"
|
||||
COPY USE S_CDC1
|
||||
CHECKTYPE NORMAL
|
||||
FLAGS "H"
|
||||
END
|
||||
|
||||
STRING S_CDC9 20
|
||||
BEGIN
|
||||
PROMPT 2 4 "Cdc 2"
|
||||
COPY USE S_CDC1
|
||||
CHECKTYPE NORMAL
|
||||
FLAGS "H"
|
||||
END
|
||||
|
||||
STRING S_CDC10 20
|
||||
BEGIN
|
||||
PROMPT 2 4 "Cdc 2"
|
||||
COPY USE S_CDC1
|
||||
CHECKTYPE NORMAL
|
||||
FLAGS "H"
|
||||
END
|
||||
|
||||
STRING S_CDC11 20
|
||||
BEGIN
|
||||
PROMPT 2 4 "Cdc 2"
|
||||
COPY USE S_CDC1
|
||||
CHECKTYPE NORMAL
|
||||
FLAGS "H"
|
||||
END
|
||||
|
||||
STRING S_CDC12 20
|
||||
BEGIN
|
||||
PROMPT 2 4 "Cdc 2"
|
||||
COPY USE S_CDC1
|
||||
CHECKTYPE NORMAL
|
||||
FLAGS "H"
|
||||
END
|
||||
|
||||
STRING S_CDC13 20
|
||||
BEGIN
|
||||
PROMPT 2 5 "Con 1"
|
||||
USE LF_PCON
|
||||
CHECKTYPE NORMAL
|
||||
GROUP 1
|
||||
FLAGS "H"
|
||||
END
|
||||
|
||||
STRING S_CDC14 20
|
||||
BEGIN
|
||||
PROMPT 21 5 "Con 2"
|
||||
COPY USE S_CONT1
|
||||
CHECKTYPE NORMAL
|
||||
GROUP 1
|
||||
FLAGS "H"
|
||||
END
|
||||
|
||||
STRING S_CDC15 20
|
||||
BEGIN
|
||||
PROMPT 41 5 "Con 3"
|
||||
COPY USE S_CONT1
|
||||
CHECKTYPE NORMAL
|
||||
GROUP 1
|
||||
FLAGS "H"
|
||||
END
|
||||
|
||||
STRING S_CDC16 20
|
||||
BEGIN
|
||||
PROMPT 61 5 "Con 4"
|
||||
COPY USE S_CONT1
|
||||
CHECKTYPE NORMAL
|
||||
GROUP 1
|
||||
FLAGS "H"
|
||||
END
|
||||
|
||||
NUMBER S_NUMREG 10
|
||||
BEGIN
|
||||
PROMPT 2 7 "Num. registrazione"
|
||||
FLAGS "D"
|
||||
END
|
||||
|
||||
NUMBER S_NUMRIGA 10
|
||||
BEGIN
|
||||
PROMPT 33 7 "Num. riga"
|
||||
FLAGS "D"
|
||||
END
|
||||
|
||||
BUTTON DLG_USER 2 2
|
||||
BEGIN
|
||||
PROMPT 200 200 ""
|
||||
END
|
||||
|
||||
ENDPAGE
|
||||
|
||||
TOOLBAR "" 0 0 0 2
|
||||
|
||||
BUTTON DLG_OK 2 2
|
||||
BEGIN
|
||||
PROMPT 1 1 ""
|
||||
END
|
||||
|
||||
BUTTON DLG_DELREC 2 2
|
||||
BEGIN
|
||||
PROMPT 2 1 "Sposta"
|
||||
PICTURE BMP_LINK
|
||||
END
|
||||
|
||||
BUTTON DLG_CANCEL 2 2
|
||||
BEGIN
|
||||
PROMPT 3 1 ""
|
||||
END
|
||||
|
||||
ENDPAGE
|
||||
ENDMASK
|
Loading…
x
Reference in New Issue
Block a user