listtasaivaview.cpp

Go to the documentation of this file.
00001 /***************************************************************************
00002  *   Copyright (C) 2004 by Tomeu Borras Riera                              *
00003  *   tborras@conetxia.com                                                  *
00004  *   Copyright (C) 2006 by Fco. Javier M. C. (Porting to QT4)              *
00005  *   fcojavmc@todo-redes.com                                               *
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 #include <QMessageBox>
00024 #include <QWidget>
00025 #include <QComboBox>
00026 #include <QToolButton>
00027 #include <QTextStream>
00028 #include <QLayout>
00029 #include <QMessageBox>
00030 
00031 #include <fstream>
00032 
00033 #include "listtasaivaview.h"
00034 #include "company.h"
00035 #include "configuracion.h"
00036 #include "busquedacliente.h"
00037 #include "busquedafecha.h"
00038 
00039 #include "funcaux.h"
00040 
00041 
00043 
00047 ListTasaIVAView::ListTasaIVAView(Company *comp, QWidget *parent)
00048         : FichaBf(comp, parent) {
00049     _depura("ListTasaIVAView::ListTasaIVAView", 1);
00050     setTitleName(tr("Tasa IVA"));
00051     setDBTableName("tasa_iva");
00052     setAttribute(Qt::WA_DeleteOnClose);
00053     setupUi(this);
00054     mui_listado->setEmpresaBase(comp);
00055     mui_listado->cargar();
00056     meteWindow(windowTitle(), this);
00057     _depura("END ListTasaIVAView::ListTasaIVAView", 1);
00058 }
00059 
00060 
00062 
00064 void ListTasaIVAView::on_mui_aceptar_clicked() {
00065     _depura("ListTasaIVAView::on_mui_aceptar_clicked", 0);
00066     try {
00067         mui_listado->guardar();
00068         close();
00069     } catch (...) {
00070         mensajeInfo("Error al guardar los almacenes");
00071     } // end try
00072     _depura("END ListTasaIVAView::on_mui_aceptar_clicked", 0);
00073 }
00074 
00075 
00076 ListTasaIVAView::~ListTasaIVAView() {
00077     _depura("ListTasaIVAView::~ListTasaIVAView", 0);
00078     _depura("END ListTasaIVAView::~ListTasaIVAView", 0);
00079 }
00080 
00081 
00084 
00087 ListTasaIVASubForm::ListTasaIVASubForm(QWidget *parent) : SubForm2Bf(parent) {
00088     _depura("ListTasaIVASubForm::ListTasaIVASubForm", 0);
00089     setDBTableName("tasa_iva");
00090     setDBCampoId("idtasa_iva");
00091     addSHeader("idtasa_iva", DBCampo::DBint, DBCampo::DBPrimaryKey, SHeader::DBNoView, tr("Id Tasa IVA"));
00092     addSHeader("desctipo_iva", DBCampo::DBvarchar, DBCampo::DBNoSave, SHeader::DBNone, tr("Tipo IVA"));
00093     addSHeader("idtipo_iva", DBCampo::DBint, DBCampo::DBNotNull, SHeader::DBNoView, tr("Id Tipo IVA"));
00094     addSHeader("porcentasa_iva", DBCampo::DBnumeric, DBCampo::DBNotNull, SHeader::DBNone, tr("Porcentaje IVA"));
00095     addSHeader("porcentretasa_iva", DBCampo::DBnumeric, DBCampo::DBNotNull, SHeader::DBNone, tr("Porcentaje Recargo Equivalencia"));
00096     addSHeader("fechatasa_iva", DBCampo::DBdate, DBCampo::DBNotNull, SHeader::DBNone, tr("Fecha Entrada en Vigor"));
00097     setinsercion(TRUE);
00098     _depura("END ListTasaIVASubForm::ListTasaIVASubForm", 0);
00099 }
00100 
00101 
00103 
00105 void ListTasaIVASubForm::cargar() {
00106         _depura("ListTasaIVASubForm::cargar", 0);
00107         SubForm3::cargar("SELECT * FROM tasa_iva LEFT JOIN tipo_iva on tasa_iva.idtipo_iva = tipo_iva.idtipo_iva");
00108         _depura("END ListTasaIVASubForm::cargar", 0);
00109 }
00110 

Generated on Sat Dec 15 00:01:13 2007 for BulmaGes by  doxygen 1.5.1