00001 /*************************************************************************** 00002 * Copyright (C) 2006 by Tomeu Borras Riera * 00003 * tborras@conetxia.com * 00004 * * 00005 * This program is free software; you can redistribute it and/or modify * 00006 * it under the terms of the GNU General Public License as published by * 00007 * the Free Software Foundation; either version 2 of the License, or * 00008 * (at your option) any later version. * 00009 * * 00010 * This program is distributed in the hope that it will be useful, * 00011 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 00012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 00013 * GNU General Public License for more details. * 00014 * * 00015 * You should have received a copy of the GNU General Public License * 00016 * along with this program; if not, write to the * 00017 * Free Software Foundation, Inc., * 00018 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * 00019 ***************************************************************************/ 00020 00021 #ifndef LISTIVA_H 00022 #define LISTIVA_H 00023 00024 #include <QObject> 00025 #include <QList> 00026 #include <QMutableListIterator> 00027 00028 #include "empresa.h" 00029 #include "iva.h" 00030 #include "funcaux.h" 00031 #include "fixed.h" 00032 00033 00034 class ListIva { 00035 public: 00036 Empresa *companyact; 00037 QString mdb_idregistroiva; 00038 QList<Iva*> m_lista; 00039 00040 public: 00041 ListIva(Empresa *comp); 00042 ListIva(); 00043 void setcompany(Empresa *c) { 00044 companyact = c; 00045 }; 00046 virtual ~ListIva(); 00047 void guardaListIva(); 00048 void vaciar(); 00049 virtual void pintaListIva() { 00050 _depura("Esta funcion aun no ha sido implementada\n", 2); 00051 }; 00052 int cargaListIva(QString); 00053 void borrar(); 00054 Iva *linpos(int); 00055 void append(Iva *iva) { 00056 m_lista.append(iva); 00057 }; 00058 Fixed calculaiva(); 00059 Fixed calculabase(); 00060 void borraIva(int); 00061 void setidregistroiva(QString id) { 00062 mdb_idregistroiva = id; 00063 Iva *linea; 00064 QMutableListIterator<Iva*> m_ilista(m_lista); 00066 m_ilista.toFront(); 00068 while (m_ilista.hasNext()) { 00070 linea = m_ilista.next(); 00071 linea->setidregistroiva(mdb_idregistroiva); 00072 } // end while 00073 }; 00074 }; 00075 00076 #endif 00077
1.5.1