00001 /*************************************************************************** 00002 * Copyright (C) 2003 by Santiago Capel * 00003 * Santiago Capel Torres (GestiONG) * 00004 * Tomeu Borras Riera * 00005 * http://www.iglues.org * 00006 * * 00007 * This program is free software; you can redistribute it and/or modify * 00008 * it under the terms of the GNU General Public License as published by * 00009 * the Free Software Foundation; either version 2 of the License, or * 00010 * (at your option) any later version. * 00011 * * 00012 * This program is distributed in the hope that it will be useful, * 00013 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 00014 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 00015 * GNU General Public License for more details. * 00016 * * 00017 * You should have received a copy of the GNU General Public License * 00018 * along with this program; if not, write to the * 00019 * Free Software Foundation, Inc., * 00020 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * 00021 ***************************************************************************/ 00022 00023 #ifndef __PGIMPORTFILES__ 00024 #define __PGIMPORTFILES__ 00025 00026 #include <QFile> 00027 #include <QString> 00028 00029 #include "postgresiface2.h" 00030 #include "funcaux.h" 00031 00032 #define IMPORT_TODO 0xFFFFFFFF 00033 00035 #define IMPORT_CUENTAS 1 00036 #define IMPORT_TIPOSIVA 2 00037 #define IMPORT_ASIENTOS 4 00038 #define IMPORT_AINTELIGENTES 8 00039 #define IMPORT_BALANCES 16 00040 #define IMPORT_COBROS 32 00041 #define IMPORT_FACTURAS 64 00042 00044 #define IMPORT_FAMILIAS 1 00045 #define IMPORT_ALBARANESCLIENTE 2 00046 #define IMPORT_CLIENTES 128 00047 #define IMPORT_PROVEEDORES 256 00048 #define IMPORT_ARTICULOS 512 00049 #define IMPORT_FACTURASCLIENTE 1024 00050 #define IMPORT_ALMACENES 2048 00051 #define IMPORT_TRABAJADORES 4096 00052 #define IMPORT_FORMAS_PAGO 8192 00053 #define IMPORT_PRESUPUESTOSCLIENTE 16384 00054 #define IMPORT_PEDIDOSCLIENTE 4 00055 00056 00058 00059 class pgimportfiles { 00060 private: 00063 postgresiface2 *conexionbase; 00066 bool m_modoTest; 00069 QString m_fInicial; 00072 QString m_fFinal; 00073 00074 public: 00077 virtual void alerta(int, int); 00080 virtual void mensajeria(QString); 00081 void setFInicial(QString f); 00082 void setFFinal(QString f); 00083 void setModoTest(); 00084 void setModoNormal(); 00085 bool modoTest(); 00086 pgimportfiles(postgresiface2 *); 00087 virtual ~pgimportfiles(); 00088 int contaplus2Bulmages(QFile &, QFile &); 00089 int bulmages2Contaplus(QFile &, QFile &); 00091 int bulmages2XML(QFile &, unsigned long long int tipo = IMPORT_TODO); 00092 int bulmafact2XML(QFile &, unsigned long long int tipo = IMPORT_TODO); 00094 int XML2Bulmages(QFile &, unsigned long long int tip = IMPORT_TODO); 00095 int XML2BulmaFact(QFile &, unsigned long long int tip = IMPORT_TODO); 00096 QString searchParent(QString); 00097 }; 00098 00099 #endif 00100
1.5.1