00001 /*************************************************************************** 00002 empresa.h - description 00003 ------------------- 00004 begin : Wed Nov 27 2002 00005 copyright : (C) 2002 by Tomeu Borrás 00006 email : tborras@conetxia.com 00007 ***************************************************************************/ 00008 /*************************************************************************** 00009 * * 00010 * This program is free software; you can redistribute it and/or modify * 00011 * it under the terms of the GNU General Public License as published by * 00012 * the Free Software Foundation; either version 2 of the License, or * 00013 * (at your option) any later version. * 00014 * * 00015 ***************************************************************************/ 00016 00017 #ifndef EMPRESA_H 00018 #define EMPRESA_H 00019 00020 #include <qmessagebox.h> 00021 #include <qfiledialog.h> 00022 #include <qstring.h> 00023 #include <qsqldatabase.h> 00024 #include <qworkspace.h> 00025 #include <qwidget.h> 00026 #include <qsizepolicy.h> 00027 00028 00029 #include "intapunts3view.h" 00030 #include "balanceview.h" 00031 #include "balance1view.h" 00032 #include "diarioview1.h" 00033 #include "extractoview1.h" 00034 #include "bmodelo347.h" 00035 #include "postgresiface2.h" 00036 #include "log.h" 00037 #include "selectccosteview.h" 00038 #include "selectcanalview.h" 00039 00040 00052 class empresa { 00053 private: 00054 QString nombre; 00055 int ano; 00056 QString contrasenya; 00057 QWorkspace *pWorkspace; 00058 postgresiface2 *conexionbase2; // Usaremos la nueva versión de postgresiface, durante un tiempo deberá convivir con la version anterior. 00059 postgresiface2 *conexionanterior2; 00060 00061 balance1view *balance1; 00062 diarioview1 *diario; 00063 extractoview1 *extracto; 00064 balanceview *balance; 00065 intapunts3view *introapunts1; // introapunts. 00066 int numdigitos; // El numero de digitos que tienen las cuentas. 00067 00068 // Hay unos selectores generales, que van a ser estos y que indican con que se trabaja, luego 00069 // Estos selectores generales se podran invocar desde distintas partes. 00070 selectccosteview *selccostes; 00071 selectcanalview *selcanales; 00072 public: 00073 QString nombreDB; 00074 00075 public: 00076 empresa(); 00077 ~empresa(); 00079 postgresiface2 *bdempresa() {return (conexionbase2);} 00080 intapunts3view *intapuntsempresa() {return(introapunts1);} 00081 int numdigitosempresa() { return(numdigitos);} 00082 QString nomuserempresa() { return(nombre);} 00083 QString nombreempresa() {return(nombre);} 00084 00085 int muestracuentas(); 00086 int nuevacuenta(); 00087 int muestraapuntes(); 00088 int muestraapuntes1(); 00089 int muestraasientos(); 00090 int propiedadempresa(); 00091 int nuevaempresa(); 00092 int borrarempresa(); 00094 QString searchCompany(); 00095 int libromayor(); 00096 int librodiario(); 00097 int librobalance(); 00098 int librobalancetree(); 00099 int registroiva(); 00100 int modelo347(); 00101 int inicializa1(QString, QWorkspace *); 00102 int boton_siguiente(); 00103 int boton_anterior(); 00104 int boton_primero(); 00105 int boton_ultimo(); 00106 int boton_guardar(); 00107 int boton_imprimir(); 00108 int boton_reload(); 00109 int ainteligentes(); 00110 int ccostes(); 00111 int canales(); 00112 int tiposIVA(); 00113 int fPago(); 00114 void cierraempresa(); 00115 void abreempresa(); 00116 void regularizaempresa(); 00117 void maximiza(); 00118 void Abrirasientos(); 00119 void Ordenarasientos(); 00120 void Filtro(); 00121 void nuevoejercicio(); 00122 int mpatrimoniales(); 00123 int compbalance(); 00124 int amortizaciones(); 00125 void reemplazacuentaenasientos(); 00126 int cambioejercicio(); 00127 void centrocostedefecto(){ selccostes->exec();} 00128 void canaldefecto() { selcanales->exec();} 00129 selectccosteview * getselccostes() {return selccostes;} 00130 selectcanalview *getselcanales() {return selcanales;} 00131 void recalculasaldos(); 00132 void cobPag(); // Gestion de cobros y pagos 00133 }; 00134 #endif