00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016 #ifndef __PGIMPORTFILES__
00017 #define __PGIMPORTFILES__
00018
00019 #include <qfile.h>
00020 #include <qstring.h>
00021 #include <qxml.h>
00022
00023 #include "postgresiface2.h"
00024
00025
00030 class pgimportfiles {
00031 private:
00033 postgresiface2 *conexionbase;
00035 void (*alerta)(int,int);
00037 void (*mensajeria) (QString);
00039 bool m_modoTest;
00041 QString m_fInicial;
00043 QString m_fFinal;
00044 public:
00045 void setFInicial(QString f) {m_fInicial = f;};
00046 void setFFinal(QString f) {m_fFinal = f;};
00047 void setModoTest() {m_modoTest=TRUE;};
00048 void setModoNormal() {m_modoTest=FALSE;};
00049 bool modoTest() {return m_modoTest == TRUE;};
00050 pgimportfiles(postgresiface2 *, void(*)(int,int), void(*) (QString));
00051 ~pgimportfiles(){};
00052 int contaplus2Bulmages(QFile &, QFile &);
00053 int bulmages2Contaplus(QFile &, QFile &);
00055 int bulmages2XML(QFile &);
00057 int XML2Bulmages(QFile &);
00058 QString searchParent(QString);
00059 };
00060
00061
00062
00063
00064 class StructureParser : public QXmlDefaultHandler {
00065 private:
00066 void (*alerta)(int,int);
00067 postgresiface2 *conexionbase;
00068 QString cadintermedia;
00069
00070 QString idasiento;
00071 QString ordenasiento;
00072 QString fechaasiento;
00074 QString idapunte;
00075 QString idborrador;
00076 QString fechaapunte;
00077 QString codigocuentaapunte;
00078 QString debeapunte;
00079 QString haberapunte;
00080 QString conceptocontableapunte;
00081 int m_ordenapunte;
00083 QString idcuenta;
00084 QString descripcioncuenta;
00085 QString codigocuenta;
00086 QString codigopadre;
00087 QString m_bloqueadaCuenta;
00088 QString m_nodebeCuenta;
00089 QString m_nohaberCuenta;
00091 QString m_idRegistroIva;
00092 QString m_rIvaContrapartida;
00093 QString m_rIvaBaseImp;
00094 QString m_rIvaIva;
00095 QString m_rIvaFFactura;
00096 QString m_rIvaFactura;
00097 QString m_rIvaCIF;
00098 QString m_rIvaIdFPago;
00099 QString m_rIvRecRegIva;
00101 QString m_idTipoIva;
00102 QString m_baseIva;
00103 QString m_nombreTipoIva;
00104
00106 QString tagpadre;
00107 public:
00108 StructureParser(postgresiface2 *,void (*)(int,int));
00109 ~StructureParser();
00110 bool startDocument();
00111 bool startElement( const QString&, const QString&, const QString& ,
00112 const QXmlAttributes& );
00113 bool endElement( const QString&, const QString&, const QString& );
00114 bool characters (const QString&);
00115
00116 private:
00117 QString indent;
00118 };
00119
00120
00121 #endif