//---------------------------------------------------------------------------

#ifndef FichaPersonasH
#define FichaPersonasH
//---------------------------------------------------------------------------
#include <Math.hpp>
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include <Buttons.hpp>
#include <ComCtrls.hpp>
#include <ExtCtrls.hpp>
#include <DBGrids.hpp>
#include <Grids.hpp>
#include <Db.hpp>
#include <DBCtrls.hpp>
#include <Mask.hpp>
#include <DBTables.hpp>
#include <ImgList.hpp>
//---------------------------------------------------------------------------
class TFichaPersonal : public TForm
{
__published:	// IDE-managed Components
        TStatusBar *StatusBar1;
        TPanel *Panel1;
        TSpeedButton *btPost;
        TSpeedButton *SpeedButton3;
        TSpeedButton *SpeedButton4;
        TSpeedButton *newPerson;
        TSpeedButton *SpeedButton6;
        TSpeedButton *SpeedButton7;
        TBevel *Bevel4;
        TBevel *Bevel5;
        TPageControl *PageControl2;
        TTabSheet *Tab_LPersonas;
        TTabSheet *Tab_FPersonas;
        TPageControl *PageControl1;
        TTabSheet *TabSheet1;
        TBevel *Bevel1;
        TTabSheet *TabSheet2;
        TBevel *Bevel2;
        TTabSheet *TabSheet3;
        TBevel *Bevel3;
        TDataSource *Ds_FPersonas;
        TDBMemo *DBMemo1;
        TLabel *Label2;
        TImage *Image1;
        TDBEdit *DBEdit1;
        TLabel *Label3;
        TLabel *Label4;
        TLabel *Label6;
        TDBEdit *DBEdit2;
        TDBEdit *DBEdit3;
        TDBEdit *DBEdit4;
        TDBEdit *DBEdit5;
        TLabel *Label7;
        TLabel *Label8;
        TDBEdit *DBEdit6;
        TLabel *Label9;
        TDBEdit *DBEdit7;
        TLabel *Label10;
        TDBEdit *DBEdit8;
        TLabel *Label11;
        TDBEdit *DBEdit9;
        TSpeedButton *busqPersonas;
        TLabel *Label12;
        TDBEdit *DBEdit10;
        TDBEdit *DBEdit11;
        TDBEdit *DBEdit12;
        TDBEdit *DBEdit13;
        TLabel *Label13;
        TDBEdit *DBEdit14;
        TLabel *Label14;
        TDBEdit *DBEdit15;
        TSpeedButton *SpeedButton1;
        TSpeedButton *SpeedButton8;
        TLabel *Label15;
        TComboBox *tipoDocumento;
        TLabel *Label16;
        TLabel *Label17;
        TDBText *DBText1;
        TLabel *Label18;
        TLabel *Label19;
        TLabel *Label21;
        TLabel *Label22;
        TLabel *Label23;
        TLabel *Label24;
        TSpeedButton *SpeedButton9;
        TDBEdit *DBEdit17;
        TDBEdit *DBEdit18;
        TDBEdit *DBEdit19;
        TDBEdit *DBEdit20;
        TDBEdit *DBEdit21;
        TDBEdit *DBEdit22;
        TDBEdit *DBEdit23;
        TDBEdit *DBEdit24;
        TDBEdit *DBEdit25;
        TDBEdit *DBEdit26;
        TDBEdit *DBEdit27;
        TLabel *Label20;
        TLabel *Label25;
        TLabel *Label26;
        TLabel *Label27;
        TBevel *Bevel6;
        TSpeedButton *SpeedButton10;
        TDBText *DBText2;
        TTable *Tb_FPersonas;
        TDBText *DBText3;
        TDBText *DBText4;
        TDBEdit *DBEdit16;
        TDBEdit *DBEdit28;
        TDBEdit *DBEdit29;
        TLabel *Label1;
        TLabel *Label5;
        TLabel *Label28;
        TLabel *Label31;
        TDBGrid *DBGrid1;
        TEdit *Edit1;
        TSpeedButton *SpeedButton5;
        TDataSource *DS_dhs;
        TTable *Tb_dhs;
        TAutoIncField *Tb_dhsID;
        TIntegerField *Tb_dhsIDC;
        TDateField *Tb_dhsFecha;
        TStringField *Tb_dhsConcepto;
        TCurrencyField *Tb_dhsDebe;
        TCurrencyField *Tb_dhsHaber;
        TCurrencyField *Tb_dhssaldo;
        TDateTimePicker *desde;
        TDateTimePicker *hasta;
        TSpeedButton *SpeedButton2;
        TSpeedButton *SpeedButton11;
        TBevel *Bevel7;
        TCheckBox *CheckBox1;
        TButton *Button1;
        TImageList *ImageList1;
        void __fastcall tipoDocumentoChange(TObject *Sender);
        void __fastcall Tb_FPersonasNewRecord(TDataSet *DataSet);
        void __fastcall Tb_FPersonasBeforePost(TDataSet *DataSet);
        void __fastcall Ds_FPersonasStateChange(TObject *Sender);
        void __fastcall newPersonClick(TObject *Sender);
        void __fastcall btPostClick(TObject *Sender);
        void __fastcall Ds_FPersonasDataChange(TObject *Sender,
          TField *Field);
        void __fastcall NextField_Tab1(TObject *Sender, char &Key);
        void __fastcall NextField_Tab2(TObject *Sender, char &Key);
        void __fastcall SpeedButton2Click(TObject *Sender);
        void __fastcall SpeedButton6Click(TObject *Sender);
        void __fastcall SpeedButton3Click(TObject *Sender);
        void __fastcall SpeedButton7Click(TObject *Sender);
        void __fastcall FormClose(TObject *Sender, TCloseAction &Action);
        void __fastcall SpeedButton5Click(TObject *Sender);
        void __fastcall Edit1KeyPress(TObject *Sender, char &Key);
        void __fastcall Tb_dhsCalcFields(TDataSet *DataSet);
        void __fastcall setDHS_Filter(TObject *Sender);
        void __fastcall Tb_dhsNewRecord(TDataSet *DataSet);
        void __fastcall CheckBox1Click(TObject *Sender);
        void __fastcall RefrescarTotales(TObject *Sender);
        void __fastcall SpeedButton4Click(TObject *Sender);
private:	// User declarations
        AnsiString carpeta;
        bool updatingDB;
        AnsiString condicion, busqueda;
        bool __fastcall sincronizarFicha( int idPersona );
        bool __fastcall CorrectaCC( int Banco, int Oficina, int DC, AnsiString NumCuenta );
public:		// User declarations
        bool  needReloadGroup;
        __fastcall TFichaPersonal(TComponent* Owner);
        void __fastcall setCarpeta(AnsiString carpeta);
};
//---------------------------------------------------------------------------
extern PACKAGE TFichaPersonal *FichaPersonal;
//---------------------------------------------------------------------------
#endif
