commit 4b13e5a752346c6540dc476d8fb62d09d87a1c24 Author: jdg Date: Sun Sep 12 22:09:46 2021 +0200 First commit 22/01/1999 diff --git a/QRhdsaldo.cpp b/QRhdsaldo.cpp new file mode 100644 index 0000000..0531360 --- /dev/null +++ b/QRhdsaldo.cpp @@ -0,0 +1,15 @@ +//---------------------------------------------------------------------------- +#include +#pragma hdrstop + +#include "QRhdsaldo.h" +#include "hdsaldo.h" +//---------------------------------------------------------------------------- +#pragma resource "*.dfm" +TForm1 *Form1; +//---------------------------------------------------------------------------- +__fastcall TForm1::TForm1(TComponent* Owner) + : TForm(Owner) +{ +} +//---------------------------------------------------------------------------- diff --git a/QRhdsaldo.dfm b/QRhdsaldo.dfm new file mode 100644 index 0000000..89c6127 Binary files /dev/null and b/QRhdsaldo.dfm differ diff --git a/QRhdsaldo.h b/QRhdsaldo.h new file mode 100644 index 0000000..7e01ede --- /dev/null +++ b/QRhdsaldo.h @@ -0,0 +1,43 @@ +//---------------------------------------------------------------------------- +#ifndef QRhdsaldoH +#define QRhdsaldoH +//---------------------------------------------------------------------------- +#include +#include +#include +#include +#include +#include +#include +#include +#include +//---------------------------------------------------------------------------- +class TForm1 : public TForm +{ +__published: + TQuickRep *QuickRep1; + TQRBand *TitleBand1; + TQRLabel *QRLabel1; + TQRBand *PageFooterBand1; + TQRSysData *QRSysData1; + TQRBand *ColumnHeaderBand1; + TQRBand *DetailBand1; + TQRLabel *QRLabel2; + TQRExpr *QRExpr1; + TQRLabel *QRLabel3; + TQRExpr *QRExpr2; + TQRLabel *QRLabel4; + TQRExpr *QRExpr3; + TQRLabel *QRLabel5; + TQRExpr *QRExpr4; + TQRExpr *QRExpr5; + TQRLabel *QRLabel6; + TQRLabel *QRLabel7; +private: +public: + __fastcall TForm1(TComponent* Owner); +}; +//---------------------------------------------------------------------------- +extern PACKAGE TForm1 *Form1; +//---------------------------------------------------------------------------- +#endif \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..7ac49e8 --- /dev/null +++ b/README.md @@ -0,0 +1,9 @@ +#HDSaldo + + +*22/01/1999* + +ToDo: wwtcf? + + +![screenshot](/HDSaldo.png "Screenshot") diff --git a/cleanup.bat b/cleanup.bat new file mode 100644 index 0000000..5e4c8b5 --- /dev/null +++ b/cleanup.bat @@ -0,0 +1,3 @@ +del *.~* +del *.tds +del *.obj diff --git a/hds.PX b/hds.PX new file mode 100644 index 0000000..56a5e9b Binary files /dev/null and b/hds.PX differ diff --git a/hds.db b/hds.db new file mode 100644 index 0000000..08fcb65 Binary files /dev/null and b/hds.db differ diff --git a/hdsaldo.cpp b/hdsaldo.cpp new file mode 100644 index 0000000..50eac04 --- /dev/null +++ b/hdsaldo.cpp @@ -0,0 +1,79 @@ +//--------------------------------------------------------------------------- +#include +#pragma hdrstop + +#include "hdsaldo.h" +#include "QRhdsaldo.h" +//--------------------------------------------------------------------------- +#pragma package(smart_init) +#pragma link "ElastFrm" +#pragma link "ElastFrm" +#pragma resource "*.dfm" +TMainForm *MainForm; +//--------------------------------------------------------------------------- +__fastcall TMainForm::TMainForm(TComponent* Owner) + : TForm(Owner) +{ +} +//--------------------------------------------------------------------------- + +void __fastcall TMainForm::ToolbarButton971Click(TObject *Sender) +{ + Close(); +} +//--------------------------------------------------------------------------- +void __fastcall TMainForm::CheckBox1Click(TObject *Sender) +{ + Table1 -> Filtered = CheckBox1 -> Checked; +} +//--------------------------------------------------------------------------- +void __fastcall TMainForm::Table1CalcFields(TDataSet *DataSet) +{ + Table1Saldo -> AsCurrency = Table1Haber -> AsCurrency - Table1Debe -> AsCurrency; +} +//--------------------------------------------------------------------------- + +void __fastcall TMainForm::Table1NewRecord(TDataSet *DataSet) +{ + Table1Fecha -> AsDateTime = TDateTime::CurrentDate(); +} +//--------------------------------------------------------------------------- + +void __fastcall TMainForm::DateTimePicker1CloseUp(TObject *Sender) +{ + DateTimePicker2CloseUp(Sender); +} +//--------------------------------------------------------------------------- + +void __fastcall TMainForm::DateTimePicker2CloseUp(TObject *Sender) +{ + TDateTime FechaL, FechaH; + + try { + FechaL = DateTimePicker1 -> Date; + FechaH = DateTimePicker2 -> Date; + Table1->FilterOptions = Table1->FilterOptions << foCaseInsensitive; + Table1->Filter = "([Fecha] >= '" + FechaL + "') AND [Fecha] <= '" + FechaH + "'"; + } catch(...) { + // Nothing... + MessageBox( 0, "Imposible aplicar filtro en ese rango.", "ˇ Alerta !", MB_OK ); + } +} +//--------------------------------------------------------------------------- + +void __fastcall TMainForm::BitBtn1Click(TObject *Sender) +{ + Form1 -> QuickRep1 -> Print(); +} +//--------------------------------------------------------------------------- + +void __fastcall TMainForm::FormClose(TObject *Sender, TCloseAction &Action) +{ + try { + Table1 -> Post(); + } catch(...) { + //nothing + } +} +//--------------------------------------------------------------------------- + diff --git a/hdsaldo.dfm b/hdsaldo.dfm new file mode 100644 index 0000000..4ed47ef Binary files /dev/null and b/hdsaldo.dfm differ diff --git a/hdsaldo.h b/hdsaldo.h new file mode 100644 index 0000000..67f2a62 --- /dev/null +++ b/hdsaldo.h @@ -0,0 +1,56 @@ +//--------------------------------------------------------------------------- +#ifndef hdsaldoH +#define hdsaldoH +//--------------------------------------------------------------------------- +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "elastfrm.hpp" +#include "ElastFrm.hpp" +//--------------------------------------------------------------------------- +class TMainForm : public TForm +{ +__published: // IDE-managed Components + TStatusBar *StatusBar1; + TTable *Table1; + TDataSource *DataSource1; + TDBGrid *DBGrid1; + TPanel *Panel1; + TDateTimePicker *DateTimePicker1; + TDateTimePicker *DateTimePicker2; + TLabel *Label2; + TBevel *Bevel1; + TBevel *Bevel2; + TBitBtn *BitBtn1; + TCheckBox *CheckBox1; + TAutoIncField *Table1ID; + TDateField *Table1Fecha; + TStringField *Table1Concepto; + TCurrencyField *Table1Debe; + TCurrencyField *Table1Haber; + TCurrencyField *Table1Saldo; + TElasticForm *ElasticForm1; + void __fastcall ToolbarButton971Click(TObject *Sender); + void __fastcall CheckBox1Click(TObject *Sender); + void __fastcall Table1CalcFields(TDataSet *DataSet); + void __fastcall Table1NewRecord(TDataSet *DataSet); + void __fastcall DateTimePicker1CloseUp(TObject *Sender); + void __fastcall DateTimePicker2CloseUp(TObject *Sender); + void __fastcall BitBtn1Click(TObject *Sender); + void __fastcall FormClose(TObject *Sender, TCloseAction &Action); +private: // User declarations +public: // User declarations + __fastcall TMainForm(TComponent* Owner); +}; +//--------------------------------------------------------------------------- +extern PACKAGE TMainForm *MainForm; +//--------------------------------------------------------------------------- +#endif diff --git a/pHDSaldo.bpr b/pHDSaldo.bpr new file mode 100644 index 0000000..978c59a --- /dev/null +++ b/pHDSaldo.bpr @@ -0,0 +1,124 @@ +# --------------------------------------------------------------------------- +VERSION = BCB.03 +# --------------------------------------------------------------------------- +!ifndef BCB +BCB = $(MAKEDIR)\.. +!endif +# --------------------------------------------------------------------------- +PROJECT = pHDSaldo.exe +OBJFILES = pHDSaldo.obj hdsaldo.obj QRhdsaldo.obj +RESFILES = pHDSaldo.res +RESDEPEN = $(RESFILES) hdsaldo.dfm QRhdsaldo.dfm +LIBFILES = +LIBRARIES = QSElFrm.lib QRPT35.lib JDsoft.lib vcldbx35.lib vcldb35.lib vclx35.lib vcl35.lib +SPARELIBS = vcl35.lib vclx35.lib vcldb35.lib vcldbx35.lib JDsoft.lib QRPT35.lib QSElFrm.lib +PACKAGES = VCLX35.bpi VCL35.bpi VCLDB35.bpi VCLDBX35.bpi bcbsmp35.bpi dclocx35.bpi \ + QRPT35.bpi TEEUI35.bpi TEEDB35.bpi TEE35.bpi ibsmp35.bpi NMFAST35.bpi \ + INETDB35.bpi INET35.bpi JDsoft.bpi +PATHASM = .; +PATHCPP = .; +PATHPAS = .; +PATHRC = .; +DEBUGLIBPATH = $(BCB)\lib\debug +RELEASELIBPATH = $(BCB)\lib\release +DEFFILE = +# --------------------------------------------------------------------------- +CFLAG1 = -Od -Hc -w -Ve -r- -k -y -v -vi- -c -b- -w-par -w-inl -Vx +CFLAG2 = -I..\componentes\cdopping;"..\jd soft\jd";$(BCB)\bin;$(BCB)\objrepos;$(BCB)\projects;$(BCB)\include;$(BCB)\include\vcl \ + -H=$(BCB)\lib\vcld.csm +CFLAG3 = -5 +PFLAGS = -U..\componentes\cdopping;"..\jd soft\jd";$(BCB)\bin;$(BCB)\objrepos;$(BCB)\projects;$(BCB)\lib\obj;$(BCB)\lib;$(DEBUGLIBPATH) \ + -I..\componentes\cdopping;"..\jd soft\jd";$(BCB)\bin;$(BCB)\objrepos;$(BCB)\projects;$(BCB)\include;$(BCB)\include\vcl \ + -AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE -H \ + -$Y -$W -$O- -v -JPHNV -M +RFLAGS = -i..\componentes\cdopping;"..\jd soft\jd";$(BCB)\bin;$(BCB)\objrepos;$(BCB)\projects;$(BCB)\include;$(BCB)\include\vcl +AFLAGS = /i"..\jd soft\jd" /i$(BCB)\bin /i$(BCB)\objrepos /i$(BCB)\projects \ + /i$(BCB)\include /i$(BCB)\include\vcl /mx /w2 /zd +LFLAGS = -L..\componentes\cdopping;"..\jd soft\jd";$(BCB)\bin;$(BCB)\objrepos;$(BCB)\projects;$(BCB)\lib\obj;$(BCB)\lib;$(DEBUGLIBPATH) \ + -aa -Tpe -x -v +IFLAGS = -g +LINKER = ilink32 +# --------------------------------------------------------------------------- +ALLOBJ = c0w32.obj sysinit.obj $(OBJFILES) +ALLRES = $(RESFILES) +ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mt.lib +# --------------------------------------------------------------------------- +.autodepend + +!ifdef IDEOPTIONS + +[Version Info] +IncludeVerInfo=1 +AutoIncBuild=1 +MajorVer=1 +MinorVer=0 +Release=0 +Build=11 +Debug=1 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=3082 +CodePage=1252 + +[Version Info Keys] +CompanyName=JD soft. +FileDescription=Cedido a Zenit Informática. +FileVersion=1.0.0.11 +InternalName=HaberDebeSaldo +LegalCopyright=Copyright (C) JD soft. 1990-1998 +LegalTrademarks= +OriginalFilename=HDSaldo +ProductName=H-D-Saldo +ProductVersion=1.0.0.0 +Comments=e-mail: Jose-David.Guillen@cs.us.es + +[HistoryLists\hlIncludePath] +Count=2 +Item0=..\jd soft\jd;$(BCB)\bin;$(BCB)\objrepos;$(BCB)\projects;$(BCB)\include;$(BCB)\include\vcl +Item1=..\jd soft\jd;l:\programación (-cbuilder-)\jd soft\jd;l:\cbuilder\cbuilder\objrepos;j:\cbuilder\cbuilder\bin;j:\cbuilder\cbuilder\bin;j:\cbuilder\cbuilder\objrepos;$(BCB)\bin;$(BCB)\objrepos;j:\cbuilder\jd soft;j:\progwin95\jd soft;$(BCB)\projects;$(BCB)\include;$(BCB)\include\vcl + +[HistoryLists\hlLibraryPath] +Count=2 +Item0=..\jd soft\jd;$(BCB)\bin;$(BCB)\objrepos;$(BCB)\projects;$(BCB)\lib\obj;$(BCB)\lib +Item1=..\jd soft\jd;l:\programación (-cbuilder-)\jd soft\jd;l:\cbuilder\cbuilder\objrepos;j:\cbuilder\cbuilder\bin;j:\cbuilder\cbuilder\bin;j:\cbuilder\cbuilder\objrepos;$(BCB)\bin;$(BCB)\objrepos;j:\cbuilder\jd soft;j:\progwin95\jd soft;$(BCB)\projects;$(BCB)\lib\obj;$(BCB)\lib + +[HistoryLists\hlUnitAliases] +Count=1 +Item0=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE + +[Debugging] +DebugSourceDirs= + +[Parameters] +RunParams= +HostApplication= + +!endif + +$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) + $(BCB)\BIN\$(LINKER) @&&! + $(LFLAGS) + + $(ALLOBJ), + + $(PROJECT),, + + $(ALLLIB), + + $(DEFFILE), + + $(ALLRES) +! + +.pas.hpp: + $(BCB)\BIN\dcc32 $(PFLAGS) { $** } + +.pas.obj: + $(BCB)\BIN\dcc32 $(PFLAGS) { $** } + +.cpp.obj: + $(BCB)\BIN\bcc32 $(CFLAG1) $(CFLAG2) -o$* $* + +.c.obj: + $(BCB)\BIN\bcc32 $(CFLAG1) $(CFLAG2) -o$* $** + +.rc.res: + $(BCB)\BIN\brcc32 $(RFLAGS) $< +#----------------------------------------------------------------------------- diff --git a/pHDSaldo.cpp b/pHDSaldo.cpp new file mode 100644 index 0000000..89833c7 --- /dev/null +++ b/pHDSaldo.cpp @@ -0,0 +1,24 @@ +//--------------------------------------------------------------------------- +#include +#pragma hdrstop +USERES("pHDSaldo.res"); +USEFORM("hdsaldo.cpp", MainForm); +USEFORM("QRhdsaldo.cpp", Form1); +//--------------------------------------------------------------------------- +WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int) +{ + try + { + Application->Initialize(); + Application->Title = "H-D-Saldo"; + Application->CreateForm(__classid(TMainForm), &MainForm); + Application->CreateForm(__classid(TForm1), &Form1); + Application->Run(); + } + catch (Exception &exception) + { + Application->ShowException(&exception); + } + return 0; +} +//--------------------------------------------------------------------------- diff --git a/pHDSaldo.exe b/pHDSaldo.exe new file mode 100644 index 0000000..7e9f32b Binary files /dev/null and b/pHDSaldo.exe differ diff --git a/pHDSaldo.res b/pHDSaldo.res new file mode 100644 index 0000000..c5948a0 Binary files /dev/null and b/pHDSaldo.res differ