00001 /*************************************************************************** 00002 * Copyright (C) 2004 by J. M. Estopa Rey * 00003 * pepma@telefonica.net * 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 #ifndef LINORDERSLIST_H 00021 #define LINORDERSLIST_H 00022 00023 #include "linorderslistbase.h" 00024 #include "postgresiface2.h" 00025 00026 00027 class company; 00028 00029 00030 class linorderslist : public linorderslistbase 00031 { 00032 Q_OBJECT 00033 public: 00034 company *companyact; 00035 QString idpedido; 00036 cursor2 *m_cursorcombo; 00037 cursor2 *m_cursorcombo2; 00038 QString m_idprovider; 00039 QString m_idArticle; 00040 00041 public: 00042 linorderslist(company *, QWidget *parent = 0, const char *name = 0, int flag = 0); 00043 ~linorderslist(); 00044 00045 00046 public: 00047 void chargelinorders(QString); 00048 void chargeorder(QString); 00049 void providerChanged(QString); 00050 00051 00052 private: 00053 int saveOrderLines(); 00054 int saveOrder(); 00055 int insertOrderLine(int); 00056 int updateOrderLine(int); 00057 int deleteOrderLine(int); 00058 00059 void manageArticle(int); 00060 void cargarcombodivision(QString, QString); 00061 void cargarcomboalmacen(QString); 00062 void searchArticle(); 00063 void cancelOrderLinChanges(); 00064 void calculateImports(); 00065 00066 public slots: 00067 virtual void activated(int); 00068 virtual void almacenactivated(int); 00069 virtual void accept(); 00070 virtual void close() {delete this;}; 00071 virtual void neworderlin(); 00072 virtual void searchProvider(); 00073 virtual void orderDateLostFocus(); 00074 virtual void prevDateLostFocus(); 00075 virtual void valueOrderLineChanged(int, int); 00076 virtual void removeOrderLin(); 00077 virtual void applyPrevDate(); 00078 }; 00079 00080 #endif