A Database Error Occurred

Error Number: 1054

Unknown column 'tblestuchesref.idestuche' in 'field list'

SELECT `productos`.`idproducto`, `productos`.`titulo`, `productos`.`descripcion`, `productos`.`foto`, `productos`.`espromo`, `productos`.`volumen`, `productos`.`unidvol`, `productos`.`tipetiquetaprod`, `productos`.`idestado`, `productos`.`idcategoria`, `productos`.`idbebida`, `productos`.`idbebidatipo_val`, `tblbebidas_tipos_valores`.`bebidatipo_val`, `productos`.`idbebidasubtipo_val`, `tblbebidas_subtipos_valores`.`bebidasubtipo_val`, `productos`.`idbodega`, `productos`.`idestuche`, `productos`.`idmarca`, `tblmarcas`.`desmarca`, `productos`.`idorigen`, `tblbebidas`.`desbebida`, `tblbodegas`.`desbodega`, `productos`.`idoferente`, `oferentes`.`nombrecomercial` as `nombrecomercialofer`, `oferentes`.`nombre` as `nombreofer`, `oferentes`.`apellido` as `apellidoofer`, `oferentes`.`montominimo`, `productos`.`tipoprom`, `productos`.`textoprom`, `productos`.`canttipo`, `productos`.`cant2tipo`, (case when tblestuchesref.idestuche > 0 then (case when tblestuchesref.bultos > 0 then tblestuchesref.bultos else 1 end ) else (case when tblestuches.bultos > 0 then tblestuches.bultos else 1 end ) end ) as bultos, (case when tblestuchesref.idestuche > 0 then `tblestuchesref`.`desestuche` else `tblestuches`.`desestuche` end ) as desestuche, `productos`.`precio`, `productos`.`precioant`, 0 as `sinstock`, 0 as `tipprecio`, 0 as `tipetiqueta` FROM `productos` LEFT JOIN `tblbebidas` ON `productos`.`idbebida` = `tblbebidas`.`idbebida` LEFT JOIN `tblbodegas` ON `productos`.`idbodega` = `tblbodegas`.`idbodega` LEFT JOIN `tblmarcas` ON `productos`.`idmarca` = `tblmarcas`.`idmarca` LEFT JOIN `tblestuches` ON `productos`.`idestuche` = `tblestuches`.`idestuche` LEFT JOIN `tblbebidas_tipos_valores` ON `productos`.`idbebidatipo_val` = `tblbebidas_tipos_valores`.`idbebidatipo_val` LEFT JOIN `tblbebidas_subtipos_valores` ON `productos`.`idbebidasubtipo_val` = `tblbebidas_subtipos_valores`.`idbebidasubtipo_val` LEFT JOIN `oferentes` ON `productos`.`idoferente` = `oferentes`.`idoferente` WHERE `productos`.`idestado` = 1 AND `productos`.`idproducto` = '234'

Filename: models/Principal_model.php

Line Number: 699