SubForm2Bf Class Reference

Clase SubForm2Bf. More...

#include <subform2bf.h>

Inheritance diagram for SubForm2Bf:

SubForm3 BLWidget Ui_SubForm3Base QWidget PEmpresaBase AlbaranClienteListSubform AlbaranesProveedorListSubform ArticuloListSubForm ClienteListSubform CobrosListSubForm ContratosListSubform FacturasContratoListSubForm FacturasListSubform FacturasProveedorListSubform InventariosSubForm ListAlmacenSubForm ListCompArticuloView ListConfiguracionSubForm ListControlStockView ListDescuentoAlbaranClienteView ListDescuentoAlbaranProvView ListDescuentoFacturaProvView ListDescuentoFacturaView ListDescuentoPedidoClienteView ListDescuentoPedidoProveedorView ListDescuentoPresupuestoView ListLinAlbaranClienteView ListLinAlbaranProveedorView ListLinContratoView ListLinFacturaProveedorView ListLinFacturaView ListLinPedidoClienteView ListLinPedidoProveedorView ListLinPresupuestoView ListLTarifaView ListLTarifaView1 ListSerieFacturaSubForm ListTasaIVASubForm ListTipoIVASubForm ListZonaComercialSubForm MovimientosSubform PagosListSubForm PedidosClienteListSubform PedidosProveedorListSubform PresupuestoListSubForm ProveedorListSubform RutaComercialListSubForm TarifaListSubform

Public Slots

virtual void on_mui_list_pressedSlash (int row, int col)
virtual void on_mui_list_pressedAsterisk (int row, int col)
virtual void on_mui_list_pressedMinus (int row, int col)

Public Member Functions

 SubForm2Bf (QWidget *parent=0)
virtual ~SubForm2Bf ()
virtual void cargar (QString query)
virtual void setEmpresaBase (EmpresaBase *)
virtual void on_mui_list_cellChanged (int row, int col)
virtual int cerrarEditor ()
void setIdCliente (QString id)
void setIdProveedor (QString id)

Data Fields

QSubForm2BfDelegatem_delegate

Protected Attributes

QString mdb_idcliente
QString mdb_idproveedor

Detailed Description

Clase SubForm2Bf.

Es la primera abstraccion de los subformularios que incluye todas las características comunes de la facturación.

Definition at line 59 of file subform2bf.h.


Constructor & Destructor Documentation

SubForm2Bf::SubForm2Bf ( QWidget parent = 0  ) 

Parameters:
parent 

Definition at line 44 of file subform2bf.cpp.

References _depura(), m_delegate, mdb_idcliente, Ui_SubForm3Base::mui_list, SubForm3::setDelete(), and TRUE.

00044                                       : SubForm3(parent) {
00045     _depura("SubForm2Bf::SubForm2Bf", 0);
00046     setDelete(TRUE);
00047     m_delegate = new QSubForm2BfDelegate(this);
00048     mui_list->setItemDelegate(m_delegate);
00049     mdb_idcliente = "";
00050     _depura("END SubForm2Bf::SubForm2Bf", 0);
00051 }

SubForm2Bf::~SubForm2Bf (  )  [virtual]

Definition at line 57 of file subform2bf.cpp.

References _depura(), and m_delegate.

00057                         {
00058     _depura("SubForm2Bf::~SubForm2Bf", 0);
00059     delete m_delegate;
00060     _depura("END SubForm2Bf::~SubForm2Bf", 0);
00061 }


Member Function Documentation

void SubForm2Bf::cargar ( QString  query  )  [virtual]

Parameters:
query 

Reimplemented from SubForm3.

Reimplemented in RutaComercialListSubForm, FacturasContratoListSubForm, ListLinContratoView, ListControlStockView, ListLTarifaView, ListLTarifaView1, MovimientosSubform, AlbaranClienteListSubform, AlbaranesProveedorListSubform, ListCompArticuloView, FacturasListSubform, FacturasProveedorListSubform, ListDescuentoAlbaranClienteView, ListDescuentoAlbaranProvView, ListDescuentoFacturaProvView, ListDescuentoFacturaView, ListDescuentoPedidoClienteView, ListDescuentoPedidoProveedorView, ListDescuentoPresupuestoView, ListLinAlbaranClienteView, ListLinAlbaranProveedorView, ListLinFacturaProveedorView, ListLinFacturaView, ListLinPedidoClienteView, ListLinPedidoProveedorView, ListLinPresupuestoView, PedidosClienteListSubform, PedidosProveedorListSubform, PresupuestoListSubForm, and ProveedorListSubform.

Definition at line 68 of file subform2bf.cpp.

References _depura(), and SubForm3::cargar().

Referenced by VehiculoView::cargar(), ListLTarifaView1::cargar(), ListLTarifaView::cargar(), ListControlStockView::cargar(), Contrato::cargar(), PresupuestoView::cargarPost(), PedidoProveedorView::cargarPost(), PedidoClienteView::cargarPost(), FacturaView::cargarPost(), FacturaProveedorView::cargarPost(), AlbaranProveedorView::cargarPost(), AlbaranClienteView::cargarPost(), ZView::cargarPost(), Cuadrante1View::cargarPost(), ContratosList::presenta(), PagosList::presentar(), CobrosList::presentar(), ClientsList::presentar(), ArticuloList::presentar(), ZList::presentar(), and TrabajadorView_on_mui_lista_currentItemChanged_Post().

00068                                      {
00069     _depura("SubForm2Bf::cargar", 0);
00070     SubForm3::cargar(query);
00071     _depura("END SubForm2Bf::cargar", 0);
00072 }

void SubForm2Bf::setEmpresaBase ( EmpresaBase c  )  [virtual]

Parameters:
c 

Reimplemented from SubForm3.

Definition at line 414 of file subform2bf.cpp.

References _depura(), m_delegate, PEmpresaBase::setEmpresaBase(), and SubForm3::setEmpresaBase().

Referenced by AlbaranClienteList::AlbaranClienteList(), AlbaranClienteView::AlbaranClienteView(), AlbaranesProveedor::AlbaranesProveedor(), AlbaranProveedorView::AlbaranProveedorView(), AlmacenView_AlmacenView(), ArticuloList::ArticuloList(), ArticuloView::ArticuloView(), ArticuloView_ArticuloView(), ClientsList::ClientsList(), CobrosList::CobrosList(), ContratosList::ContratosList(), ContratoView::ContratoView(), Cuadrante1View::Cuadrante1View(), FacturaProveedorView::FacturaProveedorView(), FacturasList::FacturasList(), FacturasProveedorList::FacturasProveedorList(), FacturaView::FacturaView(), EFQToolButtonImportar::importa_factura_ubl(), InventariosView::InventariosView(), InventarioView::InventarioView(), ListAlmacenView::ListAlmacenView(), ListConfiguracionView::ListConfiguracionView(), ListSerieFacturaView::ListSerieFacturaView(), ListTasaIVAView::ListTasaIVAView(), ListTipoIVAView::ListTipoIVAView(), ListZonaComercialView::ListZonaComercialView(), MovimientosView::MovimientosView(), PagosList::PagosList(), PedidoClienteView::PedidoClienteView(), PedidoProveedorView::PedidoProveedorView(), PedidosClienteList::PedidosClienteList(), PedidosProveedorList::PedidosProveedorList(), PresupuestoList::PresupuestoList(), PresupuestoView::PresupuestoView(), propiedadesempresa::propiedadesempresa(), ProveedorList::ProveedorList(), RutaComercialList::RutaComercialList(), PresupuestoList::setEmpresaBase(), PedidosProveedorList::setEmpresaBase(), PedidosClienteList::setEmpresaBase(), PagosList::setEmpresaBase(), FacturasProveedorList::setEmpresaBase(), FacturasList::setEmpresaBase(), CobrosList::setEmpresaBase(), AlbaranesProveedor::setEmpresaBase(), AlbaranClienteList::setEmpresaBase(), MovimientosView::setEmpresaBase(), ZList::setEmpresaBase(), Inventario::setListControlStock(), TarifaListView::TarifaListView(), TarifaView::TarifaView(), TrabajadorView_TrabajadorView(), TrabajadorView_TrabajadorView_Post(), VehiculoView::VehiculoView(), ZList::ZList(), and ZView::ZView().

00414                                               {
00415     _depura("SubForm2Bf::setcompany", 0);
00416     SubForm3::setEmpresaBase(c);
00417     m_delegate->setEmpresaBase(c);
00418     _depura("END SubForm2Bf::setcompany", 0);
00419 }

void SubForm2Bf::on_mui_list_cellChanged ( int  row,
int  col 
) [virtual]

Parameters:
row 
col 
Returns:

Disparamos los plugins.

Si el campo no ha sido cambiado se sale.

Calculamos el recargo equivalente.

Reimplemented from SubForm3.

Definition at line 164 of file subform2bf.cpp.

References _depura(), DBCampo::cambiado(), postgresiface2::cargacursor(), PEmpresaBase::empresaBase(), cursor2::eof(), FALSE, g_plugins, SubForm3::item(), Plugins::lanza(), SubForm3::lineaat(), SubForm3::m_procesacambios, SubForm3::m_tablename, mdb_idcliente, mdb_idproveedor, mensajeAviso(), DBCampo::nomcampo(), SubForm3::on_mui_list_cellChanged(), SDBCampo::refresh(), DBRecord::setDBvalue(), TRUE, cursor2::valor(), and DBCampo::valorcampo().

Referenced by on_mui_list_pressedAsterisk(), and on_mui_list_pressedMinus().

00164                                                          {
00165     _depura("SubForm2Bf::on_mui_list_cellChanged", 0, QString::number(row) + " " + QString::number(col));
00166 
00167     if (!m_procesacambios) {
00168         _depura("SubForm2Bf::on_mui_list_cellChanged", 0, QString::number(row) + " " + QString::number(col)+" m_procesacambios es FALSE");
00169         return;
00170     } // end if
00171     m_procesacambios = FALSE;
00172 
00173     cursor2 *cur2 = NULL;
00174     cursor2 *cur = NULL;
00175     cursor2 *cur1 = NULL;
00176 
00178     int res = g_plugins->lanza("SubForm2Bf_on_mui_list_editFinished", this);
00179     if (res != 0) {
00180         m_procesacambios = TRUE;
00181         return;
00182     } // end if
00183 
00184     SDBRecord *rec = lineaat(row);
00185     if (rec == NULL) {
00186         _depura ("SubForm2Bf::on_mui_list_cellChanged", 0, QString::number(row) + " " + QString::number(col) + "la linea no existe");
00187         m_procesacambios = TRUE;
00188         return;
00189     } // end if
00190 
00191     SDBCampo *camp = (SDBCampo *) item(row, col);
00192     camp->refresh();
00193 
00195     if ( ! camp->cambiado() ) {
00196         _depura("SubForm2Bf::on_mui_list_cellChanged", 0, QString::number(row) + " " + QString::number(col) + camp->valorcampo() + "Sin cambios");
00197         SubForm3::on_mui_list_cellChanged(row, col);
00198         m_procesacambios = TRUE;
00199         return;
00200     } // end if
00201 
00202     if (camp->nomcampo() == "desctipo_iva") {
00203         cur = empresaBase()->cargacursor("SELECT * FROM tipo_iva WHERE desctipo_iva = '" + camp->text() + "'");
00204         if (!cur->eof()) {
00205             rec->setDBvalue("idtipo_iva", cur->valor("idtipo_iva"));
00206         } // end if
00207     } // end if
00208 
00209     if (camp->nomcampo() == "nomtrabajador") {
00210         cur = empresaBase()->cargacursor("SELECT * FROM trabajador WHERE apellidostrabajador ||', '||nomtrabajador = '" + camp->text() + "'");
00211         if (!cur->eof()) {
00212             rec->setDBvalue("idtrabajador", cur->valor("idtrabajador"));
00213         } // end if
00214     } // end if
00215 
00216     if (camp->nomcampo() == "nomalmacen") {
00217         cur = empresaBase()->cargacursor("SELECT * FROM almacen WHERE nomalmacen ||', '||codigoalmacen = '" + camp->text() + "'");
00218         if (!cur->eof()) {
00219             rec->setDBvalue("idalmacen", cur->valor("idalmacen"));
00220         } // end if
00221     } // end if
00222 
00223     if (camp->nomcampo() == "codigocompletoarticulo") {
00224         cur = empresaBase()->cargacursor("SELECT * FROM articulo WHERE codigocompletoarticulo = '" + camp->text() + "'");
00225         if (!cur->eof()) {
00226             rec->setDBvalue("idarticulo", cur->valor("idarticulo"));
00227             rec->setDBvalue("codigocompletoarticulo", cur->valor("codigocompletoarticulo"));
00228             rec->setDBvalue("nomarticulo", cur->valor("nomarticulo"));
00229             if (m_tablename == "lpresupuesto"
00230                     || m_tablename == "lpedidoproveedor"
00231                     || m_tablename == "lpedidocliente"
00232                     || m_tablename == "lalbaranp"
00233                     || m_tablename == "lfacturap"
00234                     || m_tablename == "lalbaran"
00235                     || m_tablename == "lfactura") {
00236                 rec->setDBvalue("desc" + m_tablename, cur->valor("nomarticulo"));
00237                 rec->setDBvalue("cant" + m_tablename, "1.00");
00238                 rec->setDBvalue("descuento" + m_tablename, "0.00");
00239                 rec->setDBvalue("pvp" + m_tablename, cur->valor("pvparticulo"));
00240             } // end if
00241         } else {
00242             mensajeAviso(tr("Articulo inexistente"));
00243             delete cur;
00244             m_procesacambios = TRUE;
00245             return;
00246         } // end if
00247 
00248         cur1 = empresaBase()->cargacursor("SELECT * FROM tasa_iva WHERE idtipo_iva = " + cur->valor("idtipo_iva") + " ORDER BY fechatasa_iva LIMIT 1");
00249         if (!cur->eof() ) {
00250             if (m_tablename == "lpresupuesto"
00251                     || m_tablename == "lpedidocliente"
00252                     || m_tablename == "lpedidoproveedor"
00253                     || m_tablename == "lalbaranp"
00254                     || m_tablename == "lfacturap"
00255                     || m_tablename == "lalbaran"
00256                     || m_tablename == "lfactura") {
00257                 rec->setDBvalue("iva" + m_tablename, cur1->valor("porcentasa_iva"));
00258 
00260                 if (mdb_idcliente != "") {
00261                     cur2 = empresaBase()->cargacursor("SELECT recargoeqcliente FROM cliente WHERE idcliente = " + mdb_idcliente);
00262                     if (!cur2->eof()) {
00263                         if (cur2->valor("recargoeqcliente") == "t") {
00264                             rec->setDBvalue("reqeq" + m_tablename, cur1->valor("porcentretasa_iva"));
00265                         } // end if
00266                     } // end if
00267                     delete cur2;
00268                 } else {
00269                     rec->setDBvalue("reqeq" + m_tablename, "0");
00270                 } // end if
00271 
00272                 if (mdb_idproveedor != "") {
00273                     cur2 = empresaBase()->cargacursor("SELECT recargoeqproveedor FROM proveedor WHERE idproveedor = " + mdb_idproveedor);
00274                     if (!cur2->eof()) {
00275                         if (cur2->valor("recargoeqproveedor") == "t") {
00276                             rec->setDBvalue("reqeq" + m_tablename, cur1->valor("porcentretasa_iva"));
00277                         } // end if
00278                     } // end if
00279                     delete cur2;
00280                 } else {
00281                     rec->setDBvalue("reqeq" + m_tablename, "0");
00282                 } // end if
00283 
00284             } // end if
00285         } // end if
00286         if (cur1 != NULL)
00287             delete cur1;
00288         if (cur != NULL)
00289             delete cur;
00290     } // end if
00291 
00292     SubForm3::on_mui_list_cellChanged(row, col);
00293     m_procesacambios = TRUE;
00294 
00295     _depura("END SubForm2Bf::on_mui_list_editFinished", 0);
00296 }

int SubForm2Bf::cerrarEditor (  )  [virtual]

Returns:

Reimplemented from SubForm3.

Definition at line 426 of file subform2bf.cpp.

References _depura(), QSubForm2BfDelegate::cerrarEditor(), m_delegate, and Ui_SubForm3Base::mui_list.

00426                              {
00427     _depura("SubForm2Bf::cerrarEditor", 0);
00428     QWidget *editor = mui_list->QAbstractItemView::indexWidget(mui_list->currentIndex());
00429     m_delegate->cerrarEditor(editor);
00430     _depura("END SubForm2Bf::cerrarEditor", 0);
00431     return 0;
00432 }

void SubForm2Bf::setIdCliente ( QString  id  ) 

Parameters:
id 
Returns:

En la primera carga no hay reajustes, pero si actualización del cliente.

En las cargas sucesivas si el idcliente no ha cambiado no se hace nada

Reseteamos los valores.

Si el idcliente no existe salimos.

Cuando se cambia el cliente se deben recalcular las lineas por si hay Recargo Equivalente

Definition at line 304 of file subform2bf.cpp.

References _depura(), postgresiface2::cargacursor(), PEmpresaBase::empresaBase(), cursor2::eof(), SubForm3::lineaat(), SubForm3::m_tablename, mdb_idcliente, SubForm3::rowCount(), DBRecord::setDBvalue(), and cursor2::valor().

Referenced by ContratoView::on_m_cliente_valueChanged(), PresupuestoView::on_mui_idcliente_valueChanged(), PedidoClienteView::on_mui_idcliente_valueChanged(), FacturaView::on_mui_idcliente_valueChanged(), and AlbaranClienteView::on_mui_idcliente_valueChanged().

00304                                         {
00305     _depura("SubForm2Bf::setIdCliente", 0, id);
00306 
00308     if (mdb_idcliente  == "" ) {
00309     mdb_idcliente = id;
00310     return;
00311     } // end if
00312 
00314     if (mdb_idcliente == id) return;
00315 
00317     for (int i = 0; i < rowCount() - 1; i++) {
00318         SDBRecord *rec = lineaat(i);
00319         rec->setDBvalue("iva" + m_tablename, "0");
00320         rec->setDBvalue("reqeq" + m_tablename, "0");
00321     } // end for
00322 
00323     mdb_idcliente = id;
00324 
00326     if (id == "") {
00327         _depura("END SubForm2Bf::setIdCliente", 0, "idcliente invalido");
00328         return;
00329     } // end if
00330 
00331     cursor2 *curcliente = empresaBase()->cargacursor("SELECT recargoeqcliente, regimenfiscalcliente FROM cliente WHERE idcliente = " + mdb_idcliente);
00332 
00333     if (!curcliente->eof()) {
00335         for (int i = 0; i < rowCount() - 1; i++) {
00336             SDBRecord *rec = lineaat(i);
00337             cursor2 *cur = empresaBase()->cargacursor("SELECT * FROM articulo WHERE idarticulo = " + rec->DBvalue("idarticulo") );
00338             cursor2 *cur1 = empresaBase()->cargacursor("SELECT * FROM tasa_iva WHERE idtipo_iva = " + cur->valor("idtipo_iva") + " ORDER BY fechatasa_iva LIMIT 1");
00339             if (!cur->eof()) {
00340 
00341                 if (curcliente->valor("regimenfiscalcliente") == "Normal") {
00342                     rec->setDBvalue("iva" + m_tablename, cur1->valor("porcentasa_iva"));
00343                 } // end if
00344 
00345                 if (curcliente->valor("recargoeqcliente") == "t") {
00346                     rec->setDBvalue("reqeq" + m_tablename, cur1->valor("porcentretasa_iva"));
00347                 } // end if
00348 
00349             } // end if
00350             delete cur1;
00351             delete cur;
00352         } // end for
00353     } // end if
00354     delete curcliente;
00355     _depura("END SubForm2Bf::setIdCliente", 0);
00356 }

void SubForm2Bf::setIdProveedor ( QString  id  ) 

Parameters:
id 
Returns:

En la primera carga no hay reajustes, pero si actualización del proveedor.

En las cargas sucesivas si el idproveedor no ha cambiado no se hace nada

Reseteamos los valores

Cuando se cambia el cliente se deben recalcular las lineas por si hay Recargo Equivalente

Definition at line 364 of file subform2bf.cpp.

References _depura(), postgresiface2::cargacursor(), PEmpresaBase::empresaBase(), cursor2::eof(), SubForm3::lineaat(), SubForm3::m_tablename, mdb_idproveedor, SubForm3::rowCount(), DBRecord::setDBvalue(), and cursor2::valor().

Referenced by FacturaProveedorView::on_mui_idproveedor_valueChanged(), and AlbaranProveedorView::on_mui_idproveedor_valueChanged().

00364                                           {
00365     _depura("SubForm2Bf::setIdProveedor", 0, id);
00366 
00368     if (mdb_idproveedor  == "" ) {
00369         mdb_idproveedor = id;
00370         return;
00371     } // end if
00372 
00374     if (mdb_idproveedor == id) return;
00375 
00376     mdb_idproveedor = id;
00377 
00379     for (int i = 0; i < rowCount() - 1; i++) {
00380         SDBRecord *rec = lineaat(i);
00381         rec->setDBvalue("iva"+m_tablename, "0");
00382         rec->setDBvalue("reqeq"+m_tablename, "0");
00383     } // end for
00384 
00385     cursor2 *curproveedor = empresaBase()->cargacursor("SELECT recargoeqproveedor, regimenfiscalproveedor FROM proveedor WHERE idproveedor="+mdb_idproveedor);
00386     if (!curproveedor->eof()) {
00388         for (int i = 0; i < rowCount() - 1; i++) {
00389             SDBRecord *rec = lineaat(i);
00390             cursor2 *cur = empresaBase()->cargacursor("SELECT * FROM articulo WHERE idarticulo = " + rec->DBvalue("idarticulo") );
00391             cursor2 *cur1 = empresaBase()->cargacursor("SELECT * FROM tasa_iva WHERE idtipo_iva = " + cur->valor("idtipo_iva") + " ORDER BY fechatasa_iva LIMIT 1");
00392             if (!cur->eof() ) {
00393                 if (curproveedor->valor("regimenfiscalproveedor") == "Normal") {
00394                     rec->setDBvalue("iva"+m_tablename, cur1->valor("porcentasa_iva"));
00395                 } // end if
00396                 if (curproveedor->valor("recargoeqproveedor") == "t") {
00397                     rec->setDBvalue("reqeq"+m_tablename, cur1->valor("porcentretasa_iva"));
00398                 } // end if
00399 
00400             } // end if
00401             delete cur1;
00402             delete cur;
00403         } // end for
00404     } // end if
00405     delete curproveedor;
00406     _depura("END SubForm2Bf::setIdProveedor", 0);
00407 }

void SubForm2Bf::on_mui_list_pressedSlash ( int  row,
int  col 
) [virtual, slot]

Parameters:
row 
col 

Reimplemented from SubForm3.

Definition at line 128 of file subform2bf.cpp.

References _depura(), editaTexto(), SubForm3::item(), and SDBCampo::set().

00128                                                           {
00129     _depura("SubForm2Bf::pressedSlash", 0);
00130     SDBCampo *camp = (SDBCampo *) item(row, col);
00131     QString text = editaTexto(camp->text());
00132     camp->set(text);
00133     _depura("END SubForm2Bf::pressedSlash", 0);
00134 }

void SubForm2Bf::on_mui_list_pressedAsterisk ( int  row,
int  col 
) [virtual, slot]

Parameters:
row 
col 
Returns:

Esto es convertir un QWidget en un sistema modal de dialogo.

Si no tenemos un idarticulo salimos ya que significa que no se ha seleccionado ninguno.

Invocamos la finalizacion de edicion para que todos los campos se actualicen.

Reimplemented from SubForm3.

Definition at line 81 of file subform2bf.cpp.

References _depura(), postgresiface2::cargacursor(), PEmpresaBase::empresaBase(), cursor2::eof(), FALSE, ArticuloList::idarticulo(), SubForm3::item(), SubForm3::lineaat(), SubForm3::m_procesacambios, DBCampo::nomcampo(), on_mui_list_cellChanged(), Listado::SelectMode, DBRecord::setDBvalue(), theApp, TRUE, and cursor2::valor().

00081                                                              {
00082     _depura("SubForm2Bf::pressedAsterisk", 0);
00083 
00084     SDBRecord *rec = lineaat(row);
00085     SDBCampo *camp = (SDBCampo *) item(row, col);
00086 
00087     if (camp->nomcampo() != "codigocompletoarticulo") {
00088         return;
00089     } // end if
00090 
00091     m_procesacambios = FALSE;
00092 
00093     ArticuloList *artlist = new ArticuloList((Company *) empresaBase(), NULL, 0, ArticuloList::SelectMode);
00095     this->setEnabled(false);
00096     artlist->show();
00097     while (!artlist->isHidden())
00098         theApp->processEvents();
00099     this->setEnabled(true);
00100     QString idArticle = artlist->idarticulo();
00101     delete artlist;
00102 
00104     if ( idArticle == "") {
00105        m_procesacambios = TRUE;
00106        return;
00107     } // end if
00108 
00109     cursor2 *cur = empresaBase()->cargacursor("SELECT * FROM articulo WHERE idarticulo = " + idArticle);
00110     if (!cur->eof()) {
00111         rec->setDBvalue("idarticulo", idArticle);
00112         rec->setDBvalue("codigocompletoarticulo", cur->valor("codigocompletoarticulo"));
00113         rec->setDBvalue("nomarticulo", cur->valor("nomarticulo"));
00114     } // end if
00115     delete cur;
00116     m_procesacambios = TRUE;
00118     on_mui_list_cellChanged(row, col);
00119     _depura("END SubForm2Bf::pressedAsterisk", 0);
00120 }

void SubForm2Bf::on_mui_list_pressedMinus ( int  row,
int  col 
) [virtual, slot]

Parameters:
row 
col 

Invocamos la finalizacion de edicion para que todos los campos se actualicen.

Reimplemented from SubForm3.

Definition at line 142 of file subform2bf.cpp.

References _depura(), postgresiface2::cargacursor(), DBRecord::DBvalue(), PEmpresaBase::empresaBase(), cursor2::eof(), SubForm3::item(), SubForm3::lineaat(), DBCampo::nomcampo(), on_mui_list_cellChanged(), DBRecord::setDBvalue(), and cursor2::valor().

00142                                                           {
00143     _depura("SubForm2Bf::pressedMinus", 0);
00144 
00145     SDBRecord *rec = lineaat(row);
00146     SDBCampo *camp = (SDBCampo *) item(row, col);
00147     cursor2 *cur = empresaBase()->cargacursor("SELECT * FROM articulo WHERE idarticulo = " + rec->DBvalue("idarticulo"));
00148     if (!cur->eof()) {
00149         rec->setDBvalue(camp->nomcampo(), cur->valor("obserarticulo"));
00150     } // end if
00151     delete cur;
00153     on_mui_list_cellChanged(row, col);
00154     _depura("END SubForm2Bf::pressedMinus", 0);
00155 }


Field Documentation

QSubForm2BfDelegate* SubForm2Bf::m_delegate

Definition at line 63 of file subform2bf.h.

Referenced by AlmacenView_AlmacenView(), cerrarEditor(), setEmpresaBase(), SubForm2Bf(), and ~SubForm2Bf().

QString SubForm2Bf::mdb_idcliente [protected]

Definition at line 66 of file subform2bf.h.

Referenced by on_mui_list_cellChanged(), setIdCliente(), and SubForm2Bf().

QString SubForm2Bf::mdb_idproveedor [protected]

Definition at line 67 of file subform2bf.h.

Referenced by on_mui_list_cellChanged(), and setIdProveedor().


The documentation for this class was generated from the following files:
Generated on Sat Dec 15 00:02:16 2007 for BulmaGes by  doxygen 1.5.1