select id as idemprenda, nombre as titleemprenda, if(ifnull(foto1,'')='',concat('../images/235x225/', id, '.jpg'), concat('../files//emprendimientos/emprendimiento/', foto1)) as imageemprenda, 'panel panel-default' as classemprenda, concat('../emprendimientos/proyecto.php?proyecto=', id) as linkemprenda, (select count(*) from ocom where emprendimiento = Emprendimientos.id and estado not in ('ANULADA', 'BAJA', 'CANCELADA', 'INACTIVA')) as cantemprenda from Emprendimientos where estado in ('EN FUNCIONAMIENTO', 'EN OBRA', 'FINALIZADO', 'PLANEAMIENTO', 'LANZAMIENTO' ) and id in(-1) order by fechaInicioVentas desc limit 5
select id as idemprenda, nombre as titleemprenda, if(ifnull(foto1,'')='',concat('../images/235x225/', id, '.jpg'), concat('../files//emprendimientos/emprendimiento/', foto1)) as imageemprenda, 'panel panel-default' as classemprenda, concat('../emprendimientos/proyecto.php?proyecto=', id) as linkemprenda, (select count(*) from ocom where emprendimiento = Emprendimientos.id and estado not in ('ANULADA', 'BAJA', 'CANCELADA', 'INACTIVA')) as cantemprenda from Emprendimientos where estado in ('EN FUNCIONAMIENTO', 'EN OBRA', 'FINALIZADO', 'PLANEAMIENTO', 'LANZAMIENTO' ) and id in(-1) order by fechaInicioVentas desc limit 5
select nombre as text, concat('../emprendimientos/plano.php?proyecto=&id=', id) as link, if(''=planos.id,'activo', 'inactivo') as linkclass from planos where emprendimiento = '' and tipo = 'Vista' and activo = 's'
select nombre as text, concat('../emprendimientos/plano.php?proyecto=&id=', id) as link, if(''=planos.id,'activo', 'inactivo') as linkclass from planos where emprendimiento = '' and tipo = 'Planta'
select id as idemprenda, nombre as titleemprenda, if(ifnull(foto1,'')='',concat('../images/235x225/', id, '.jpg'), concat('../files//emprendimientos/emprendimiento/', foto1)) as imageemprenda, 'panel panel-default' as classemprenda, concat('../emprendimientos/proyecto.php?proyecto=', id) as linkemprenda, (select count(*) from ocom where emprendimiento = Emprendimientos.id and estado not in ('ANULADA', 'BAJA', 'CANCELADA', 'INACTIVA')) as cantemprenda from Emprendimientos where estado in ('EN FUNCIONAMIENTO', 'EN OBRA', 'FINALIZADO', 'PLANEAMIENTO', 'LANZAMIENTO' ) and id in(-1) order by fechaInicioVentas desc limit 5
select id as idemprenda, nombre as titleemprenda, if(ifnull(foto1,'')='',concat('../images/235x225/', id, '.jpg'), concat('../files//emprendimientos/emprendimiento/', foto1)) as imageemprenda, 'panel panel-default' as classemprenda, concat('../emprendimientos/proyecto.php?proyecto=', id) as linkemprenda, (select count(*) from ocom where emprendimiento = Emprendimientos.id and estado not in ('ANULADA', 'BAJA', 'CANCELADA', 'INACTIVA')) as cantemprenda from Emprendimientos where estado in ('EN FUNCIONAMIENTO', 'EN OBRA', 'FINALIZADO', 'PLANEAMIENTO', 'LANZAMIENTO' ) and id in(-1) order by fechaInicioVentas desc limit 5
select nombre as text, concat('../emprendimientos/plano.php?proyecto=&id=', id) as link, if(''=planos.id,'activo', 'inactivo') as linkclass from planos where emprendimiento = '' and tipo = 'Vista' and activo = 's'
select nombre as text, concat('../emprendimientos/plano.php?proyecto=&id=', id) as link, if(''=planos.id,'activo', 'inactivo') as linkclass from planos where emprendimiento = '' and tipo = 'Planta'
select id as idemprenda, nombre as titleemprenda, if(ifnull(foto1,'')='',concat('../images/235x225/', id, '.jpg'), concat('../files//emprendimientos/emprendimiento/', foto1)) as imageemprenda, 'panel panel-default' as classemprenda, concat('../emprendimientos/proyecto.php?proyecto=', id) as linkemprenda, (select count(*) from ocom where emprendimiento = Emprendimientos.id and estado not in ('ANULADA', 'BAJA', 'CANCELADA', 'INACTIVA')) as cantemprenda from Emprendimientos where estado in ('EN FUNCIONAMIENTO', 'EN OBRA', 'FINALIZADO', 'PLANEAMIENTO', 'LANZAMIENTO' ) and id in(-1) order by fechaInicioVentas desc limit 5
select id as idemprenda, nombre as titleemprenda, if(ifnull(foto1,'')='',concat('../images/235x225/', id, '.jpg'), concat('../files//emprendimientos/emprendimiento/', foto1)) as imageemprenda, 'panel panel-default' as classemprenda, concat('../emprendimientos/proyecto.php?proyecto=', id) as linkemprenda, (select count(*) from ocom where emprendimiento = Emprendimientos.id and estado not in ('ANULADA', 'BAJA', 'CANCELADA', 'INACTIVA')) as cantemprenda from Emprendimientos where estado in ('EN FUNCIONAMIENTO', 'EN OBRA', 'FINALIZADO', 'PLANEAMIENTO', 'LANZAMIENTO' ) and id in(-1) order by fechaInicioVentas desc limit 5
select nombre as text, concat('../emprendimientos/plano.php?proyecto=&id=', id) as link, if(''=planos.id,'activo', 'inactivo') as linkclass from planos where emprendimiento = '' and tipo = 'Vista' and activo = 's'
select nombre as text, concat('../emprendimientos/plano.php?proyecto=&id=', id) as link, if(''=planos.id,'activo', 'inactivo') as linkclass from planos where emprendimiento = '' and tipo = 'Planta'
select id as idemprenda, nombre as titleemprenda, if(ifnull(foto1,'')='',concat('../images/235x225/', id, '.jpg'), concat('../files//emprendimientos/emprendimiento/', foto1)) as imageemprenda, 'panel panel-default' as classemprenda, concat('../emprendimientos/proyecto.php?proyecto=', id) as linkemprenda, (select count(*) from ocom where emprendimiento = Emprendimientos.id and estado not in ('ANULADA', 'BAJA', 'CANCELADA', 'INACTIVA')) as cantemprenda from Emprendimientos where estado in ('EN FUNCIONAMIENTO', 'EN OBRA', 'FINALIZADO', 'PLANEAMIENTO', 'LANZAMIENTO' ) and id in(-1) order by fechaInicioVentas desc limit 5
select id as idemprenda, nombre as titleemprenda, if(ifnull(foto1,'')='',concat('../images/235x225/', id, '.jpg'), concat('../files//emprendimientos/emprendimiento/', foto1)) as imageemprenda, 'panel panel-default' as classemprenda, concat('../emprendimientos/proyecto.php?proyecto=', id) as linkemprenda, (select count(*) from ocom where emprendimiento = Emprendimientos.id and estado not in ('ANULADA', 'BAJA', 'CANCELADA', 'INACTIVA')) as cantemprenda from Emprendimientos where estado in ('EN FUNCIONAMIENTO', 'EN OBRA', 'FINALIZADO', 'PLANEAMIENTO', 'LANZAMIENTO' ) and id in(-1) order by fechaInicioVentas desc limit 5
select nombre as text, concat('../emprendimientos/plano.php?proyecto=&id=', id) as link, if(''=planos.id,'activo', 'inactivo') as linkclass from planos where emprendimiento = '' and tipo = 'Vista' and activo = 's'
select nombre as text, concat('../emprendimientos/plano.php?proyecto=&id=', id) as link, if(''=planos.id,'activo', 'inactivo') as linkclass from planos where emprendimiento = '' and tipo = 'Planta'
select id, titulo, fechadia, actualizacion, fechaevento from cmactiv where tipo = 'T' and estado not in ('Finalizada', 'Aprobada', 'Anulada') and prioridad in ('Urgente', '!') and responsable = '' and (notificacion is null or notificacion < current_date())
select id as alerta_id, idobj as alerta_idobj, tipo as alerta_tipo, titulo as alerta_titulo, detalles as alerta_detalles, link as alerta_link, fecha as alerta_fecha from alertas where usuario = '' order by fecha desc
select id, titulo, fechadia, actualizacion, fechaevento from cmactiv where tipo = 'T' and estado not in ('Finalizada', 'Aprobada', 'Anulada') and prioridad in ('Urgente', '!') and responsable = '' and (notificacion is null or notificacion < current_date())
select id as alerta_id, idobj as alerta_idobj, tipo as alerta_tipo, titulo as alerta_titulo, detalles as alerta_detalles, link as alerta_link, fecha as alerta_fecha from alertas where usuario = '' order by fecha desc
select id, titulo, fechadia, actualizacion, fechaevento from cmactiv where tipo = 'T' and estado not in ('Finalizada', 'Aprobada', 'Anulada') and prioridad in ('Urgente', '!') and responsable = '' and (notificacion is null or notificacion < current_date())
select id as alerta_id, idobj as alerta_idobj, tipo as alerta_tipo, titulo as alerta_titulo, detalles as alerta_detalles, link as alerta_link, fecha as alerta_fecha from alertas where usuario = '' order by fecha desc
select id,nombre from Emprendimientos where id in ('GodoyCruz','Cervinio','Juncal','Ocampo','Cabello','Callao','Libertador','Boulevard','Basavilbas','PBallena','DelMar','Nordelta','SanTelmo','DelPolo','Lomas','Madero','Dorrego','dqpr','frontenac','dique4','qbajo','qlacroze','dqplaza','qbb','2','3','4')
select estado from consultas group by estado
select title as titleconfiguracion, icon as iconconfiguracion, concat('../', module, '/', name, '.php?proyecto=qbb&emprendimiento=qbb') as linkconfiguracion from ddwindow where (menu like 'config/Emprendimientos%' or menu like '%,config/Emprendimientos%') and menu not like '%4' order by title
select
o.id,
o.estado as Estado,
date(o.fecha) as fecha,
trim(replace(o.clase, 'Fiduciante', '')) as clase,
/** (select sum(porcentajeCosto) from Unidades where id in (select unidadId from rcom where operacionComercial = o.id)) as Porcentaje, **/
o.origen,
(select group_concat(denominacion) from Unidades where tipou in ('D') and id in (select unidadId from rcom where operacionComercial = o.id)) as UF,
(select group_concat(denominacion) from Unidades where tipou not in ('D', 'O') and id in (select unidadId from rcom where operacionComercial = o.id)) as UC,
(select group_concat(concat(ifnull(cmcont.razonsocial,''),' ',ifnull(trim(cmcont.nombre),''),' ',ifnull(trim(cmcont.apellido),'')) separator '
') from cmcont join ocomcli on cmcont.id = ocomcli.cliente where ocomcli.operacioncomercial= o.id and (ocomcli.relacion is null or ocomcli.relacion != 'Cedente') ) as Cliente,
(select group_concat(numdoc) from cmcont join ocomcli on cmcont.id = ocomcli.cliente where ocomcli.operacioncomercial= o.id) as Documento,
(select group_concat(cuit) from cmcont join ocomcli on cmcont.id = ocomcli.cliente where ocomcli.operacioncomercial= o.id) as Cuit,
o.fechaInicioContrato as firma,
o.moneda,
round(o.precioTotal1,0) as total1,
o.moneda2,
round(o.precioTotal2,0) as total2,
round((select sum(-emtrans.aplicaciones) from emtrans cross join emdoc on emtrans.documento = emdoc.id where emdoc.ocom = o.id and emtrans.tipo = 'M'),0) as pagado,
round((select sum(-emtrans.saldo) from emtrans cross join emdoc on emtrans.documento = emdoc.id where emdoc.ocom = o.id and emtrans.tipo = 'M'),0) as saldo,
o.comisionVenta as comision
from
ocom o
where
o.emprendimiento = 'qbb'
and ('' = '' or o.origen in (''''))
and (
('' = '' and o.estado not in ('Anulada', 'Inactiva'))
or
('' != '' and o.estado = '')
)
and ('' = '' or o.origen = '')
and (
o.id in (select operacionComercial from rcom where unidadId in (select id from Unidades where denominacion like '%%'))
or (select group_concat(concat(ifnull(cmcont.razonsocial,''),' ',ifnull(trim(cmcont.nombre),''),' ',ifnull(trim(cmcont.apellido),'')) separator '
') from cmcont join ocomcli on cmcont.id = ocomcli.cliente where ocomcli.operacioncomercial= o.id and (ocomcli.relacion is null or ocomcli.relacion != 'Cedente') ) like '%%'
or (select group_concat(cuit) from cmcont join ocomcli on cmcont.id = ocomcli.cliente where ocomcli.operacioncomercial= o.id) like '%%'
or (select group_concat(numdoc) from cmcont join ocomcli on cmcont.id = ocomcli.cliente where ocomcli.operacioncomercial= o.id) like '%%'
)
order by 1 desc limit 0, 50
select title as titleconfiguracion, icon as iconconfiguracion, concat('../', module, '/', name, '.php?proyecto=qbb&emprendimiento=qbb') as linkconfiguracion from ddwindow where (menu like 'config/Emprendimientos%' or menu like '%,config/Emprendimientos%') and menu not like '%4' order by title
select descripcion as text, notas as tooltip, /** if(descripcion='','?emprendimiento=qbb&proyecto=qbb', concat("?emprendimiento=qbb&proyecto=qbb&estado2=",descripcion)) as link, **/ '#' as link, if(descripcion = '', 'active', '') as class, if((select count(*) from ocom where emprendimiento = 'qbb' and estado = estadosov.descripcion)=0,'', (select count(*) from ocom where emprendimiento = 'qbb' and estado = estadosov.descripcion)) as badge, concat('min-width: 115px; width: ', round(length(descripcion) * 7 - (length(descripcion)-length(replace(descripcion ,' ',''))) * 18,0), 'px') as style from estadosov where emprendimientoid = 'qbb' and (activo = 'S' or (select count(*) from ocom where emprendimiento = 'qbb' and estado = estadosov.descripcion) > 0) order by orden
select
o.id,
o.estado as Estado,
date(o.fecha) as fecha,
trim(replace(o.clase, 'Fiduciante', '')) as clase,
/** (select sum(porcentajeCosto) from Unidades where id in (select unidadId from rcom where operacionComercial = o.id)) as Porcentaje, **/
o.origen,
(select group_concat(denominacion) from Unidades where tipou in ('D') and id in (select unidadId from rcom where operacionComercial = o.id)) as UF,
(select group_concat(denominacion) from Unidades where tipou not in ('D', 'O') and id in (select unidadId from rcom where operacionComercial = o.id)) as UC,
(select group_concat(concat(ifnull(cmcont.razonsocial,''),' ',ifnull(trim(cmcont.nombre),''),' ',ifnull(trim(cmcont.apellido),'')) separator '
') from cmcont join ocomcli on cmcont.id = ocomcli.cliente where ocomcli.operacioncomercial= o.id and (ocomcli.relacion is null or ocomcli.relacion != 'Cedente') ) as Cliente,
(select group_concat(numdoc) from cmcont join ocomcli on cmcont.id = ocomcli.cliente where ocomcli.operacioncomercial= o.id) as Documento,
(select group_concat(cuit) from cmcont join ocomcli on cmcont.id = ocomcli.cliente where ocomcli.operacioncomercial= o.id) as Cuit,
o.fechaInicioContrato as firma,
o.moneda,
round(o.precioTotal1,0) as total1,
o.moneda2,
round(o.precioTotal2,0) as total2,
round((select sum(-emtrans.aplicaciones) from emtrans cross join emdoc on emtrans.documento = emdoc.id where emdoc.ocom = o.id and emtrans.tipo = 'M'),0) as pagado,
round((select sum(-emtrans.saldo) from emtrans cross join emdoc on emtrans.documento = emdoc.id where emdoc.ocom = o.id and emtrans.tipo = 'M'),0) as saldo,
o.comisionVenta as comision
from
ocom o
where
o.emprendimiento = 'qbb'
and ('' = '' or o.origen in (''''))
and (
('' = '' and o.estado not in ('Anulada', 'Inactiva'))
or
('' != '' and o.estado = '')
)
and ('' = '' or o.origen = '')
and (
o.id in (select operacionComercial from rcom where unidadId in (select id from Unidades where denominacion like '%%'))
or (select group_concat(concat(ifnull(cmcont.razonsocial,''),' ',ifnull(trim(cmcont.nombre),''),' ',ifnull(trim(cmcont.apellido),'')) separator '
') from cmcont join ocomcli on cmcont.id = ocomcli.cliente where ocomcli.operacioncomercial= o.id and (ocomcli.relacion is null or ocomcli.relacion != 'Cedente') ) like '%%'
or (select group_concat(cuit) from cmcont join ocomcli on cmcont.id = ocomcli.cliente where ocomcli.operacioncomercial= o.id) like '%%'
or (select group_concat(numdoc) from cmcont join ocomcli on cmcont.id = ocomcli.cliente where ocomcli.operacioncomercial= o.id) like '%%'
)
order by 1 desc limit 0, 50
select * from ddform where concat(module, '.', name) = 'ventas.recibo' and dbtable is not null and dbtable != ''
select * from ddfield where concat(module, '.', form) = 'ventas.recibo' and ((dbcol is not null and dbcol != '') or type = 'table') group by name order by numero
select * from emdoc where id = '28572'
select * from ddform where concat(module, '.', name) = 'empresas.empresa' and dbtable is not null and dbtable != ''
select * from ddfield where concat(module, '.', form) = 'empresas.empresa' and ((dbcol is not null and dbcol != '') or type = 'table') group by name order by numero
select * from ememp where id = '2'
select * from ddform where concat(module, '.', name) = 'empresas.empresa.sucursales'
select * from ddfield where concat(module, '.', form) = 'empresas.empresa.sucursales' and ((dbcol is not null and dbcol != '') or type = 'table') order by numero
select * from emsuc where empresa = '2' order by id
select * from ddform where concat(module, '.', name) = 'empresas.empresa.centrocostos'
select * from ddfield where concat(module, '.', form) = 'empresas.empresa.centrocostos' and ((dbcol is not null and dbcol != '') or type = 'table') order by numero
select * from emcc where empresa = '2' order by id
select * from ddform where concat(module, '.', name) = 'empresas.empresa.unidadesnegocio'
select * from ddfield where concat(module, '.', form) = 'empresas.empresa.unidadesnegocio' and ((dbcol is not null and dbcol != '') or type = 'table') order by numero
select * from emun where empresa = '2' order by id
select * from ddform where concat(module, '.', name) = 'empresas.empresa.ejercicios'
select * from ddfield where concat(module, '.', form) = 'empresas.empresa.ejercicios' and ((dbcol is not null and dbcol != '') or type = 'table') order by numero
select * from emejer where empresa = '2' order by id
select * from ddform where concat(module, '.', name) = 'empresas.empresa.relaciones'
select * from ddfield where concat(module, '.', form) = 'empresas.empresa.relaciones' and ((dbcol is not null and dbcol != '') or type = 'table') order by numero
select * from emremp where empresa = '2' order by id
select * from ddform where concat(module, '.', name) = 'empresas.empresa.tiposcomprobantesventas'
select * from ddfield where concat(module, '.', form) = 'empresas.empresa.tiposcomprobantesventas' and ((dbcol is not null and dbcol != '') or type = 'table') order by numero
select * from emtcv where empresa = '2' order by id
select * from ddform where concat(module, '.', name) = 'empresas.empresa.tiposov'
select * from ddfield where concat(module, '.', form) = 'empresas.empresa.tiposov' and ((dbcol is not null and dbcol != '') or type = 'table') order by numero
select * from emtov where empresa = '2' order by id
select * from ddform where concat(module, '.', name) = 'empresas.empresa.tiposcomprobantescompras'
select * from ddfield where concat(module, '.', form) = 'empresas.empresa.tiposcomprobantescompras' and ((dbcol is not null and dbcol != '') or type = 'table') order by numero
select * from emtcc where empresa = '2' order by id
select * from ddform where concat(module, '.', name) = 'empresas.empresa.calculopunitorios'
select * from ddfield where concat(module, '.', form) = 'empresas.empresa.calculopunitorios' and ((dbcol is not null and dbcol != '') or type = 'table') order by numero
select * from emcalpunitorios where empresa = '2' order by id
select * from ddform where concat(module, '.', name) = 'empresas.empresa.talonarios'
select * from ddfield where concat(module, '.', form) = 'empresas.empresa.talonarios' and ((dbcol is not null and dbcol != '') or type = 'table') order by numero
select * from emtal where empresa = '2' order by id
select * from ddform where concat(module, '.', name) = 'ventas.cliente' and dbtable is not null and dbtable != ''
select * from ddfield where concat(module, '.', form) = 'ventas.cliente' and ((dbcol is not null and dbcol != '') or type = 'table') group by name order by numero
select * from cmcont where id = '91116'
select * from ddform where concat(module, '.', name) = 'ventas.recibo.suma'
select * from ddfield where concat(module, '.', form) = 'ventas.recibo.suma' and ((dbcol is not null and dbcol != '') or type = 'table') order by numero
select * from emtrans where documento = '28572' and (tipo = 'P') order by id
select * from ddform where concat(module, '.', name) = 'empresas.cuenta' and dbtable is not null and dbtable != ''
select * from ddfield where concat(module, '.', form) = 'empresas.cuenta' and ((dbcol is not null and dbcol != '') or type = 'table') group by name order by numero
select * from emcuenta where id in (1 )
select * from ddform where concat(module, '.', name) = 'ventas.recibo.concepto'
select * from ddfield where concat(module, '.', form) = 'ventas.recibo.concepto' and ((dbcol is not null and dbcol != '') or type = 'table') order by numero
select *, -importe as importe_transform, -importelocal as importelocal_transform from emtrans where documento = '28572' and (tipo = 'C') order by id
select * from ddform where concat(module, '.', name) = 'ventas.comprobanteCliente.vencimientos' and dbtable is not null and dbtable != ''
select * from ddfield where concat(module, '.', form) = 'ventas.comprobanteCliente.vencimientos' and ((dbcol is not null and dbcol != '') or type = 'table') group by name order by numero
select *, (select totalnegativo from emtcv where id = (select tipocomprobante from emdoc where id = emtrans.documento))*importe as importe_transform, (select totalnegativo from emtcv where id = (select tipocomprobante from emdoc where id = emtrans.documento))*saldo as saldo_transform from emtrans where id in (53665 )
select * from ddform where concat(module, '.', name) = 'empresas.cuenta' and dbtable is not null and dbtable != ''
select * from ddfield where concat(module, '.', form) = 'empresas.cuenta' and ((dbcol is not null and dbcol != '') or type = 'table') group by name order by numero
select * from emcuenta where id in (3 )
select * from ddform where concat(module, '.', name) = 'ventas.recibo' and dbtable is not null and dbtable != ''
select * from ddfield where concat(module, '.', form) = 'ventas.recibo' and (props is null or props not like '%readonly%') and ((dbcol is not null and dbcol != '') or type = 'table') order by numero
select id, nombre from modelos where formulario = 'ventas.recibo'
select id, titulo, fecha, archivo, aplicable, ultimaoperacion from docs2 where form = 'ventas.recibo' and idobj = '28572' and ('' = '' or titulo like '%%') order by fecha desc
select * from ddform where concat(module, '.', name) = 'ventas.recibo' and dbtable is not null and dbtable != ''
select * from ddfield where concat(module, '.', form) = 'ventas.recibo' and ((dbcol is not null and dbcol != '') or type = 'table') group by name order by numero
select * from emdoc where id = '28572'
select * from ddform where concat(module, '.', name) = 'empresas.empresa' and dbtable is not null and dbtable != ''
select * from ddfield where concat(module, '.', form) = 'empresas.empresa' and ((dbcol is not null and dbcol != '') or type = 'table') group by name order by numero
select * from ememp where id = '2'
select * from ddform where concat(module, '.', name) = 'empresas.empresa.sucursales'
select * from ddfield where concat(module, '.', form) = 'empresas.empresa.sucursales' and ((dbcol is not null and dbcol != '') or type = 'table') order by numero
select * from emsuc where empresa = '2' order by id
select * from ddform where concat(module, '.', name) = 'empresas.empresa.centrocostos'
select * from ddfield where concat(module, '.', form) = 'empresas.empresa.centrocostos' and ((dbcol is not null and dbcol != '') or type = 'table') order by numero
select * from emcc where empresa = '2' order by id
select * from ddform where concat(module, '.', name) = 'empresas.empresa.unidadesnegocio'
select * from ddfield where concat(module, '.', form) = 'empresas.empresa.unidadesnegocio' and ((dbcol is not null and dbcol != '') or type = 'table') order by numero
select * from emun where empresa = '2' order by id
select * from ddform where concat(module, '.', name) = 'empresas.empresa.ejercicios'
select * from ddfield where concat(module, '.', form) = 'empresas.empresa.ejercicios' and ((dbcol is not null and dbcol != '') or type = 'table') order by numero
select * from emejer where empresa = '2' order by id
select * from ddform where concat(module, '.', name) = 'empresas.empresa.relaciones'
select * from ddfield where concat(module, '.', form) = 'empresas.empresa.relaciones' and ((dbcol is not null and dbcol != '') or type = 'table') order by numero
select * from emremp where empresa = '2' order by id
select * from ddform where concat(module, '.', name) = 'empresas.empresa.tiposcomprobantesventas'
select * from ddfield where concat(module, '.', form) = 'empresas.empresa.tiposcomprobantesventas' and ((dbcol is not null and dbcol != '') or type = 'table') order by numero
select * from emtcv where empresa = '2' order by id
select * from ddform where concat(module, '.', name) = 'empresas.empresa.tiposov'
select * from ddfield where concat(module, '.', form) = 'empresas.empresa.tiposov' and ((dbcol is not null and dbcol != '') or type = 'table') order by numero
select * from emtov where empresa = '2' order by id
select * from ddform where concat(module, '.', name) = 'empresas.empresa.tiposcomprobantescompras'
select * from ddfield where concat(module, '.', form) = 'empresas.empresa.tiposcomprobantescompras' and ((dbcol is not null and dbcol != '') or type = 'table') order by numero
select * from emtcc where empresa = '2' order by id
select * from ddform where concat(module, '.', name) = 'empresas.empresa.calculopunitorios'
select * from ddfield where concat(module, '.', form) = 'empresas.empresa.calculopunitorios' and ((dbcol is not null and dbcol != '') or type = 'table') order by numero
select * from emcalpunitorios where empresa = '2' order by id
select * from ddform where concat(module, '.', name) = 'empresas.empresa.talonarios'
select * from ddfield where concat(module, '.', form) = 'empresas.empresa.talonarios' and ((dbcol is not null and dbcol != '') or type = 'table') order by numero
select * from emtal where empresa = '2' order by id
select * from ddform where concat(module, '.', name) = 'ventas.cliente' and dbtable is not null and dbtable != ''
select * from ddfield where concat(module, '.', form) = 'ventas.cliente' and ((dbcol is not null and dbcol != '') or type = 'table') group by name order by numero
select * from cmcont where id = '91116'
select * from ddform where concat(module, '.', name) = 'ventas.recibo.suma'
select * from ddfield where concat(module, '.', form) = 'ventas.recibo.suma' and ((dbcol is not null and dbcol != '') or type = 'table') order by numero
select * from emtrans where documento = '28572' and (tipo = 'P') order by id
select * from ddform where concat(module, '.', name) = 'empresas.cuenta' and dbtable is not null and dbtable != ''
select * from ddfield where concat(module, '.', form) = 'empresas.cuenta' and ((dbcol is not null and dbcol != '') or type = 'table') group by name order by numero
select * from emcuenta where id in (1 )
select * from ddform where concat(module, '.', name) = 'ventas.recibo.concepto'
select * from ddfield where concat(module, '.', form) = 'ventas.recibo.concepto' and ((dbcol is not null and dbcol != '') or type = 'table') order by numero
select *, -importe as importe_transform, -importelocal as importelocal_transform from emtrans where documento = '28572' and (tipo = 'C') order by id
select * from ddform where concat(module, '.', name) = 'ventas.comprobanteCliente.vencimientos' and dbtable is not null and dbtable != ''
select * from ddfield where concat(module, '.', form) = 'ventas.comprobanteCliente.vencimientos' and ((dbcol is not null and dbcol != '') or type = 'table') group by name order by numero
select *, (select totalnegativo from emtcv where id = (select tipocomprobante from emdoc where id = emtrans.documento))*importe as importe_transform, (select totalnegativo from emtcv where id = (select tipocomprobante from emdoc where id = emtrans.documento))*saldo as saldo_transform from emtrans where id in (53665 )
select * from ddform where concat(module, '.', name) = 'empresas.cuenta' and dbtable is not null and dbtable != ''
select * from ddfield where concat(module, '.', form) = 'empresas.cuenta' and ((dbcol is not null and dbcol != '') or type = 'table') group by name order by numero
select * from emcuenta where id in (3 )
select * from ddform where concat(module, '.', name) = 'ventas.recibo' and dbtable is not null and dbtable != ''
select * from ddfield where concat(module, '.', form) = 'ventas.recibo' and (props is null or props not like '%readonly%') and ((dbcol is not null and dbcol != '') or type = 'table') order by numero
select id, nombre from modelos where formulario = 'ventas.recibo'
select id, titulo, fecha, archivo, aplicable, ultimaoperacion from docs2 where form = 'ventas.recibo' and idobj = '28572' and ('' = '' or titulo like '%%') order by fecha desc
select * from ddform where concat(module, '.', name) = 'compras.comprobanteProveedor' and dbtable is not null and dbtable != ''
select * from ddfield where concat(module, '.', form) = 'compras.comprobanteProveedor' and ((dbcol is not null and dbcol != '') or type = 'table') order by numero
select * from ddform where concat(module, '.', name) = 'compras.comprobanteProveedor.detalles' and dbtable is not null and dbtable != ''
select * from ddfield where concat(module, '.', form) = 'compras.comprobanteProveedor.detalles' and ((dbcol is not null and dbcol != '') or type = 'table') order by numero
select * from ddform where concat(module, '.', name) = 'compras.comprobanteProveedor.otrosimpuestos' and dbtable is not null and dbtable != ''
select * from ddfield where concat(module, '.', form) = 'compras.comprobanteProveedor.otrosimpuestos' and ((dbcol is not null and dbcol != '') or type = 'table') order by numero
select * from ddform where concat(module, '.', name) = 'compras.comprobanteProveedor.vencimientos' and dbtable is not null and dbtable != ''
select * from ddfield where concat(module, '.', form) = 'compras.comprobanteProveedor.vencimientos' and ((dbcol is not null and dbcol != '') or type = 'table') order by numero
select * from ddform where concat(module, '.', name) = 'compras.comprobanteProveedor.importes' and dbtable is not null and dbtable != ''
select * from ddfield where concat(module, '.', form) = 'compras.comprobanteProveedor.importes' and ((dbcol is not null and dbcol != '') or type = 'table') order by numero
select * from ddform where concat(module, '.', name) = 'compras.comprobanteProveedor' and dbtable is not null and dbtable != ''
select * from ddfield where concat(module, '.', form) = 'compras.comprobanteProveedor' and (props is null or props not like '%readonly%') and ((dbcol is not null and dbcol != '') or type = 'table') order by numero
select id, ubicacion, titulo, icono, url from contenidos where form = 'compras.comprobanteProveedor' and tipo = 'boton'
select id, ubicacion, titulo, icono, url, contenido from contenidos where form = 'compras.comprobanteProveedor' and tipo = 'codigo'
select * from ddform where concat(module, '.', name) = 'compras.comprobanteProveedor'
select descripcion as text, notas as tooltip, if(descripcion = '', 'active', '') as class, (select count(*) from emdoc where status = estados.descripcion) as badge, concat('width: ', round(length(descripcion) * 20 - (length(descripcion)-length(replace(descripcion ,' ',''))) * 4,0), 'px') as style from estados where form = 'compras.comprobanteProveedor' and activo = 'S' order by orden
select id, titulo, fecha, archivo, aplicable, ultimaoperacion from docs2 where form = 'compras.comprobanteProveedor' and idobj = '' and ('' = '' or titulo like '%%') order by fecha desc
select * from ddform where concat(module, '.', name) = 'compras.comprobanteProveedor' and dbtable is not null and dbtable != ''
select * from ddfield where concat(module, '.', form) = 'compras.comprobanteProveedor' and (props is null or props not like '%readonly%') and ((dbcol is not null and dbcol != '') or type = 'table') order by numero
select * from ddform where concat(module, '.', name) = 'compras.comprobanteProveedor' and dbtable is not null and dbtable != ''
select * from ddfield where concat(module, '.', form) = 'compras.comprobanteProveedor' and (props is null or props not like '%readonly%') and ((dbcol is not null and dbcol != '') or type = 'table') order by numero
select * from ddform where concat(module, '.', name) = 'compras.comprobanteProveedor'
select id as idemprenda, nombre as titleemprenda, if(ifnull(foto1,'')='',concat('../images/235x225/', id, '.jpg'), concat('../files//emprendimientos/emprendimiento/', foto1)) as imageemprenda, 'panel panel-default' as classemprenda, concat('../emprendimientos/proyecto.php?proyecto=', id) as linkemprenda, (select count(*) from ocom where emprendimiento = Emprendimientos.id and estado not in ('ANULADA', 'BAJA', 'CANCELADA', 'INACTIVA')) as cantemprenda from Emprendimientos where estado in ('EN FUNCIONAMIENTO', 'EN OBRA', 'FINALIZADO', 'PLANEAMIENTO', 'LANZAMIENTO' ) and id in(-1) order by fechaInicioVentas desc limit 5
select id as idemprenda, nombre as titleemprenda, if(ifnull(foto1,'')='',concat('../images/235x225/', id, '.jpg'), concat('../files//emprendimientos/emprendimiento/', foto1)) as imageemprenda, 'panel panel-default' as classemprenda, concat('../emprendimientos/proyecto.php?proyecto=', id) as linkemprenda, (select count(*) from ocom where emprendimiento = Emprendimientos.id and estado not in ('ANULADA', 'BAJA', 'CANCELADA', 'INACTIVA')) as cantemprenda from Emprendimientos where estado in ('EN FUNCIONAMIENTO', 'EN OBRA', 'FINALIZADO', 'PLANEAMIENTO', 'LANZAMIENTO' ) and id in(-1) order by fechaInicioVentas desc limit 5
select nombre as text, concat('../emprendimientos/plano.php?proyecto=&id=', id) as link, if(''=planos.id,'activo', 'inactivo') as linkclass from planos where emprendimiento = '' and tipo = 'Vista' and activo = 's'
select nombre as text, concat('../emprendimientos/plano.php?proyecto=&id=', id) as link, if(''=planos.id,'activo', 'inactivo') as linkclass from planos where emprendimiento = '' and tipo = 'Planta'
select id, titulo, fechadia, actualizacion, fechaevento from cmactiv where tipo = 'T' and estado not in ('Finalizada', 'Aprobada', 'Anulada') and prioridad in ('Urgente', '!') and responsable = '' and (notificacion is null or notificacion < current_date())
select id as alerta_id, idobj as alerta_idobj, tipo as alerta_tipo, titulo as alerta_titulo, detalles as alerta_detalles, link as alerta_link, fecha as alerta_fecha from alertas where usuario = '' order by fecha desc
select id, titulo, fechadia, actualizacion, fechaevento from cmactiv where tipo = 'T' and estado not in ('Finalizada', 'Aprobada', 'Anulada') and prioridad in ('Urgente', '!') and responsable = '' and (notificacion is null or notificacion < current_date())
select id as alerta_id, idobj as alerta_idobj, tipo as alerta_tipo, titulo as alerta_titulo, detalles as alerta_detalles, link as alerta_link, fecha as alerta_fecha from alertas where usuario = '' order by fecha desc
select id, titulo, fechadia, actualizacion, fechaevento from cmactiv where tipo = 'T' and estado not in ('Finalizada', 'Aprobada', 'Anulada') and prioridad in ('Urgente', '!') and responsable = '' and (notificacion is null or notificacion < current_date())
select id as alerta_id, idobj as alerta_idobj, tipo as alerta_tipo, titulo as alerta_titulo, detalles as alerta_detalles, link as alerta_link, fecha as alerta_fecha from alertas where usuario = '' order by fecha desc
select id as idemprenda, nombre as titleemprenda, if(ifnull(foto1,'')='',concat('../images/235x225/', id, '.jpg'), concat('../files//emprendimientos/emprendimiento/', foto1)) as imageemprenda, 'panel panel-default' as classemprenda, concat('../emprendimientos/proyecto.php?proyecto=', id) as linkemprenda, (select count(*) from ocom where emprendimiento = Emprendimientos.id and estado not in ('ANULADA', 'BAJA', 'CANCELADA', 'INACTIVA')) as cantemprenda from Emprendimientos where estado in ('EN FUNCIONAMIENTO', 'EN OBRA', 'FINALIZADO', 'PLANEAMIENTO', 'LANZAMIENTO' ) and id in(-1) order by fechaInicioVentas desc limit 5
select id as idemprenda, nombre as titleemprenda, if(ifnull(foto1,'')='',concat('../images/235x225/', id, '.jpg'), concat('../files//emprendimientos/emprendimiento/', foto1)) as imageemprenda, 'panel panel-default' as classemprenda, concat('../emprendimientos/proyecto.php?proyecto=', id) as linkemprenda, (select count(*) from ocom where emprendimiento = Emprendimientos.id and estado not in ('ANULADA', 'BAJA', 'CANCELADA', 'INACTIVA')) as cantemprenda from Emprendimientos where estado in ('EN FUNCIONAMIENTO', 'EN OBRA', 'FINALIZADO', 'PLANEAMIENTO', 'LANZAMIENTO' ) and id in(-1) order by fechaInicioVentas desc limit 5
select nombre as text, concat('../emprendimientos/plano.php?proyecto=&id=', id) as link, if(''=planos.id,'activo', 'inactivo') as linkclass from planos where emprendimiento = '' and tipo = 'Vista' and activo = 's'
select nombre as text, concat('../emprendimientos/plano.php?proyecto=&id=', id) as link, if(''=planos.id,'activo', 'inactivo') as linkclass from planos where emprendimiento = '' and tipo = 'Planta'
select id as idemprenda, nombre as titleemprenda, if(ifnull(foto1,'')='',concat('../images/235x225/', id, '.jpg'), concat('../files//emprendimientos/emprendimiento/', foto1)) as imageemprenda, 'panel panel-default' as classemprenda, concat('../emprendimientos/proyecto.php?proyecto=', id) as linkemprenda, (select count(*) from ocom where emprendimiento = Emprendimientos.id and estado not in ('ANULADA', 'BAJA', 'CANCELADA', 'INACTIVA')) as cantemprenda from Emprendimientos where estado in ('EN FUNCIONAMIENTO', 'EN OBRA', 'FINALIZADO', 'PLANEAMIENTO', 'LANZAMIENTO' ) and id in(-1) order by fechaInicioVentas desc limit 5
select id as idemprenda, nombre as titleemprenda, if(ifnull(foto1,'')='',concat('../images/235x225/', id, '.jpg'), concat('../files//emprendimientos/emprendimiento/', foto1)) as imageemprenda, 'panel panel-default' as classemprenda, concat('../emprendimientos/proyecto.php?proyecto=', id) as linkemprenda, (select count(*) from ocom where emprendimiento = Emprendimientos.id and estado not in ('ANULADA', 'BAJA', 'CANCELADA', 'INACTIVA')) as cantemprenda from Emprendimientos where estado in ('EN FUNCIONAMIENTO', 'EN OBRA', 'FINALIZADO', 'PLANEAMIENTO', 'LANZAMIENTO' ) and id in(-1) order by fechaInicioVentas desc limit 5
select nombre as text, concat('../emprendimientos/plano.php?proyecto=&id=', id) as link, if(''=planos.id,'activo', 'inactivo') as linkclass from planos where emprendimiento = '' and tipo = 'Vista' and activo = 's'
select nombre as text, concat('../emprendimientos/plano.php?proyecto=&id=', id) as link, if(''=planos.id,'activo', 'inactivo') as linkclass from planos where emprendimiento = '' and tipo = 'Planta'
select id, titulo, fechadia, actualizacion, fechaevento from cmactiv where tipo = 'T' and estado not in ('Finalizada', 'Aprobada', 'Anulada') and prioridad in ('Urgente', '!') and responsable = '' and (notificacion is null or notificacion < current_date())
select id as alerta_id, idobj as alerta_idobj, tipo as alerta_tipo, titulo as alerta_titulo, detalles as alerta_detalles, link as alerta_link, fecha as alerta_fecha from alertas where usuario = '' order by fecha desc
select id, titulo, fechadia, actualizacion, fechaevento from cmactiv where tipo = 'T' and estado not in ('Finalizada', 'Aprobada', 'Anulada') and prioridad in ('Urgente', '!') and responsable = '' and (notificacion is null or notificacion < current_date())
select id as alerta_id, idobj as alerta_idobj, tipo as alerta_tipo, titulo as alerta_titulo, detalles as alerta_detalles, link as alerta_link, fecha as alerta_fecha from alertas where usuario = '' order by fecha desc
select id, titulo, fechadia, actualizacion, fechaevento from cmactiv where tipo = 'T' and estado not in ('Finalizada', 'Aprobada', 'Anulada') and prioridad in ('Urgente', '!') and responsable = '' and (notificacion is null or notificacion < current_date())
select id as alerta_id, idobj as alerta_idobj, tipo as alerta_tipo, titulo as alerta_titulo, detalles as alerta_detalles, link as alerta_link, fecha as alerta_fecha from alertas where usuario = '' order by fecha desc
select id as idemprenda, nombre as titleemprenda, if(ifnull(foto1,'')='',concat('../images/235x225/', id, '.jpg'), concat('../files//emprendimientos/emprendimiento/', foto1)) as imageemprenda, 'panel panel-default' as classemprenda, concat('../emprendimientos/proyecto.php?proyecto=', id) as linkemprenda, (select count(*) from ocom where emprendimiento = Emprendimientos.id and estado not in ('ANULADA', 'BAJA', 'CANCELADA', 'INACTIVA')) as cantemprenda from Emprendimientos where estado in ('EN FUNCIONAMIENTO', 'EN OBRA', 'FINALIZADO', 'PLANEAMIENTO', 'LANZAMIENTO' ) and id in(-1) order by fechaInicioVentas desc limit 5
select id as idemprenda, nombre as titleemprenda, if(ifnull(foto1,'')='',concat('../images/235x225/', id, '.jpg'), concat('../files//emprendimientos/emprendimiento/', foto1)) as imageemprenda, 'panel panel-default' as classemprenda, concat('../emprendimientos/proyecto.php?proyecto=', id) as linkemprenda, (select count(*) from ocom where emprendimiento = Emprendimientos.id and estado not in ('ANULADA', 'BAJA', 'CANCELADA', 'INACTIVA')) as cantemprenda from Emprendimientos where estado in ('EN FUNCIONAMIENTO', 'EN OBRA', 'FINALIZADO', 'PLANEAMIENTO', 'LANZAMIENTO' ) and id in(-1) order by fechaInicioVentas desc limit 5
select nombre as text, concat('../emprendimientos/plano.php?proyecto=&id=', id) as link, if(''=planos.id,'activo', 'inactivo') as linkclass from planos where emprendimiento = '' and tipo = 'Vista' and activo = 's'
select nombre as text, concat('../emprendimientos/plano.php?proyecto=&id=', id) as link, if(''=planos.id,'activo', 'inactivo') as linkclass from planos where emprendimiento = '' and tipo = 'Planta'
select id as idemprenda, nombre as titleemprenda, if(ifnull(foto1,'')='',concat('../images/235x225/', id, '.jpg'), concat('../files//emprendimientos/emprendimiento/', foto1)) as imageemprenda, 'panel panel-default' as classemprenda, concat('../emprendimientos/proyecto.php?proyecto=', id) as linkemprenda, (select count(*) from ocom where emprendimiento = Emprendimientos.id and estado not in ('ANULADA', 'BAJA', 'CANCELADA', 'INACTIVA')) as cantemprenda from Emprendimientos where estado in ('EN FUNCIONAMIENTO', 'EN OBRA', 'FINALIZADO', 'PLANEAMIENTO', 'LANZAMIENTO' ) and id in(-1) order by fechaInicioVentas desc limit 5
select id as idemprenda, nombre as titleemprenda, if(ifnull(foto1,'')='',concat('../images/235x225/', id, '.jpg'), concat('../files//emprendimientos/emprendimiento/', foto1)) as imageemprenda, 'panel panel-default' as classemprenda, concat('../emprendimientos/proyecto.php?proyecto=', id) as linkemprenda, (select count(*) from ocom where emprendimiento = Emprendimientos.id and estado not in ('ANULADA', 'BAJA', 'CANCELADA', 'INACTIVA')) as cantemprenda from Emprendimientos where estado in ('EN FUNCIONAMIENTO', 'EN OBRA', 'FINALIZADO', 'PLANEAMIENTO', 'LANZAMIENTO' ) and id in(-1) order by fechaInicioVentas desc limit 5
select nombre as text, concat('../emprendimientos/plano.php?proyecto=&id=', id) as link, if(''=planos.id,'activo', 'inactivo') as linkclass from planos where emprendimiento = '' and tipo = 'Vista' and activo = 's'
select nombre as text, concat('../emprendimientos/plano.php?proyecto=&id=', id) as link, if(''=planos.id,'activo', 'inactivo') as linkclass from planos where emprendimiento = '' and tipo = 'Planta'
select id, titulo, fechadia, actualizacion, fechaevento from cmactiv where tipo = 'T' and estado not in ('Finalizada', 'Aprobada', 'Anulada') and prioridad in ('Urgente', '!') and responsable = '' and (notificacion is null or notificacion < current_date())
select id as alerta_id, idobj as alerta_idobj, tipo as alerta_tipo, titulo as alerta_titulo, detalles as alerta_detalles, link as alerta_link, fecha as alerta_fecha from alertas where usuario = '' order by fecha desc
select id, titulo, fechadia, actualizacion, fechaevento from cmactiv where tipo = 'T' and estado not in ('Finalizada', 'Aprobada', 'Anulada') and prioridad in ('Urgente', '!') and responsable = '' and (notificacion is null or notificacion < current_date())
select id as alerta_id, idobj as alerta_idobj, tipo as alerta_tipo, titulo as alerta_titulo, detalles as alerta_detalles, link as alerta_link, fecha as alerta_fecha from alertas where usuario = '' order by fecha desc
select id, titulo, fechadia, actualizacion, fechaevento from cmactiv where tipo = 'T' and estado not in ('Finalizada', 'Aprobada', 'Anulada') and prioridad in ('Urgente', '!') and responsable = '' and (notificacion is null or notificacion < current_date())
select id as alerta_id, idobj as alerta_idobj, tipo as alerta_tipo, titulo as alerta_titulo, detalles as alerta_detalles, link as alerta_link, fecha as alerta_fecha from alertas where usuario = '' order by fecha desc
select id as idemprenda, nombre as titleemprenda, if(ifnull(foto1,'')='',concat('../images/235x225/', id, '.jpg'), concat('../files//emprendimientos/emprendimiento/', foto1)) as imageemprenda, 'panel panel-default' as classemprenda, concat('../emprendimientos/proyecto.php?proyecto=', id) as linkemprenda, (select count(*) from ocom where emprendimiento = Emprendimientos.id and estado not in ('ANULADA', 'BAJA', 'CANCELADA', 'INACTIVA')) as cantemprenda from Emprendimientos where estado in ('EN FUNCIONAMIENTO', 'EN OBRA', 'FINALIZADO', 'PLANEAMIENTO', 'LANZAMIENTO' ) and id in(-1) order by fechaInicioVentas desc limit 5
select id as idemprenda, nombre as titleemprenda, if(ifnull(foto1,'')='',concat('../images/235x225/', id, '.jpg'), concat('../files//emprendimientos/emprendimiento/', foto1)) as imageemprenda, 'panel panel-default' as classemprenda, concat('../emprendimientos/proyecto.php?proyecto=', id) as linkemprenda, (select count(*) from ocom where emprendimiento = Emprendimientos.id and estado not in ('ANULADA', 'BAJA', 'CANCELADA', 'INACTIVA')) as cantemprenda from Emprendimientos where estado in ('EN FUNCIONAMIENTO', 'EN OBRA', 'FINALIZADO', 'PLANEAMIENTO', 'LANZAMIENTO' ) and id in(-1) order by fechaInicioVentas desc limit 5
select nombre as text, concat('../emprendimientos/plano.php?proyecto=&id=', id) as link, if(''=planos.id,'activo', 'inactivo') as linkclass from planos where emprendimiento = '' and tipo = 'Vista' and activo = 's'
select nombre as text, concat('../emprendimientos/plano.php?proyecto=&id=', id) as link, if(''=planos.id,'activo', 'inactivo') as linkclass from planos where emprendimiento = '' and tipo = 'Planta'
select id, titulo, fechadia, actualizacion, fechaevento from cmactiv where tipo = 'T' and estado not in ('Finalizada', 'Aprobada', 'Anulada') and prioridad in ('Urgente', '!') and responsable = '' and (notificacion is null or notificacion < current_date())
select id as alerta_id, idobj as alerta_idobj, tipo as alerta_tipo, titulo as alerta_titulo, detalles as alerta_detalles, link as alerta_link, fecha as alerta_fecha from alertas where usuario = '' order by fecha desc
select id, titulo, fechadia, actualizacion, fechaevento from cmactiv where tipo = 'T' and estado not in ('Finalizada', 'Aprobada', 'Anulada') and prioridad in ('Urgente', '!') and responsable = '' and (notificacion is null or notificacion < current_date())
select id as alerta_id, idobj as alerta_idobj, tipo as alerta_tipo, titulo as alerta_titulo, detalles as alerta_detalles, link as alerta_link, fecha as alerta_fecha from alertas where usuario = '' order by fecha desc
select id, titulo, fechadia, actualizacion, fechaevento from cmactiv where tipo = 'T' and estado not in ('Finalizada', 'Aprobada', 'Anulada') and prioridad in ('Urgente', '!') and responsable = '' and (notificacion is null or notificacion < current_date())
select id as alerta_id, idobj as alerta_idobj, tipo as alerta_tipo, titulo as alerta_titulo, detalles as alerta_detalles, link as alerta_link, fecha as alerta_fecha from alertas where usuario = '' order by fecha desc
select id as idemprenda, nombre as titleemprenda, if(ifnull(foto1,'')='',concat('../images/235x225/', id, '.jpg'), concat('../files//emprendimientos/emprendimiento/', foto1)) as imageemprenda, 'panel panel-default' as classemprenda, concat('../emprendimientos/proyecto.php?proyecto=', id) as linkemprenda, (select count(*) from ocom where emprendimiento = Emprendimientos.id and estado not in ('ANULADA', 'BAJA', 'CANCELADA', 'INACTIVA')) as cantemprenda from Emprendimientos where estado in ('EN FUNCIONAMIENTO', 'EN OBRA', 'FINALIZADO', 'PLANEAMIENTO', 'LANZAMIENTO' ) and id in(-1) order by fechaInicioVentas desc limit 5
select id as idemprenda, nombre as titleemprenda, if(ifnull(foto1,'')='',concat('../images/235x225/', id, '.jpg'), concat('../files//emprendimientos/emprendimiento/', foto1)) as imageemprenda, 'panel panel-default' as classemprenda, concat('../emprendimientos/proyecto.php?proyecto=', id) as linkemprenda, (select count(*) from ocom where emprendimiento = Emprendimientos.id and estado not in ('ANULADA', 'BAJA', 'CANCELADA', 'INACTIVA')) as cantemprenda from Emprendimientos where estado in ('EN FUNCIONAMIENTO', 'EN OBRA', 'FINALIZADO', 'PLANEAMIENTO', 'LANZAMIENTO' ) and id in(-1) order by fechaInicioVentas desc limit 5
select nombre as text, concat('../emprendimientos/plano.php?proyecto=&id=', id) as link, if(''=planos.id,'activo', 'inactivo') as linkclass from planos where emprendimiento = '' and tipo = 'Vista' and activo = 's'
select nombre as text, concat('../emprendimientos/plano.php?proyecto=&id=', id) as link, if(''=planos.id,'activo', 'inactivo') as linkclass from planos where emprendimiento = '' and tipo = 'Planta'
select id as idemprenda, nombre as titleemprenda, if(ifnull(foto1,'')='',concat('../images/235x225/', id, '.jpg'), concat('../files//emprendimientos/emprendimiento/', foto1)) as imageemprenda, 'panel panel-default' as classemprenda, concat('../emprendimientos/proyecto.php?proyecto=', id) as linkemprenda, (select count(*) from ocom where emprendimiento = Emprendimientos.id and estado not in ('ANULADA', 'BAJA', 'CANCELADA', 'INACTIVA')) as cantemprenda from Emprendimientos where estado in ('EN FUNCIONAMIENTO', 'EN OBRA', 'FINALIZADO', 'PLANEAMIENTO', 'LANZAMIENTO' ) and id in(-1) order by fechaInicioVentas desc limit 5
select id as idemprenda, nombre as titleemprenda, if(ifnull(foto1,'')='',concat('../images/235x225/', id, '.jpg'), concat('../files//emprendimientos/emprendimiento/', foto1)) as imageemprenda, 'panel panel-default' as classemprenda, concat('../emprendimientos/proyecto.php?proyecto=', id) as linkemprenda, (select count(*) from ocom where emprendimiento = Emprendimientos.id and estado not in ('ANULADA', 'BAJA', 'CANCELADA', 'INACTIVA')) as cantemprenda from Emprendimientos where estado in ('EN FUNCIONAMIENTO', 'EN OBRA', 'FINALIZADO', 'PLANEAMIENTO', 'LANZAMIENTO' ) and id in(-1) order by fechaInicioVentas desc limit 5
select nombre as text, concat('../emprendimientos/plano.php?proyecto=&id=', id) as link, if(''=planos.id,'activo', 'inactivo') as linkclass from planos where emprendimiento = '' and tipo = 'Vista' and activo = 's'
select nombre as text, concat('../emprendimientos/plano.php?proyecto=&id=', id) as link, if(''=planos.id,'activo', 'inactivo') as linkclass from planos where emprendimiento = '' and tipo = 'Planta'
select id as idemprenda, nombre as titleemprenda, if(ifnull(foto1,'')='',concat('../images/235x225/', id, '.jpg'), concat('../files//emprendimientos/emprendimiento/', foto1)) as imageemprenda, 'panel panel-default' as classemprenda, concat('../emprendimientos/proyecto.php?proyecto=', id) as linkemprenda, (select count(*) from ocom where emprendimiento = Emprendimientos.id and estado not in ('ANULADA', 'BAJA', 'CANCELADA', 'INACTIVA')) as cantemprenda from Emprendimientos where estado in ('EN FUNCIONAMIENTO', 'EN OBRA', 'FINALIZADO', 'PLANEAMIENTO', 'LANZAMIENTO' ) and id in(-1) order by fechaInicioVentas desc limit 5
select id as idemprenda, nombre as titleemprenda, if(ifnull(foto1,'')='',concat('../images/235x225/', id, '.jpg'), concat('../files//emprendimientos/emprendimiento/', foto1)) as imageemprenda, 'panel panel-default' as classemprenda, concat('../emprendimientos/proyecto.php?proyecto=', id) as linkemprenda, (select count(*) from ocom where emprendimiento = Emprendimientos.id and estado not in ('ANULADA', 'BAJA', 'CANCELADA', 'INACTIVA')) as cantemprenda from Emprendimientos where estado in ('EN FUNCIONAMIENTO', 'EN OBRA', 'FINALIZADO', 'PLANEAMIENTO', 'LANZAMIENTO' ) and id in(-1) order by fechaInicioVentas desc limit 5
select nombre as text, concat('../emprendimientos/plano.php?proyecto=&id=', id) as link, if(''=planos.id,'activo', 'inactivo') as linkclass from planos where emprendimiento = '' and tipo = 'Vista' and activo = 's'
select nombre as text, concat('../emprendimientos/plano.php?proyecto=&id=', id) as link, if(''=planos.id,'activo', 'inactivo') as linkclass from planos where emprendimiento = '' and tipo = 'Planta'
select id as idemprenda, nombre as titleemprenda, if(ifnull(foto1,'')='',concat('../images/235x225/', id, '.jpg'), concat('../files//emprendimientos/emprendimiento/', foto1)) as imageemprenda, 'panel panel-default' as classemprenda, concat('../emprendimientos/proyecto.php?proyecto=', id) as linkemprenda, (select count(*) from ocom where emprendimiento = Emprendimientos.id and estado not in ('ANULADA', 'BAJA', 'CANCELADA', 'INACTIVA')) as cantemprenda from Emprendimientos where estado in ('EN FUNCIONAMIENTO', 'EN OBRA', 'FINALIZADO', 'PLANEAMIENTO', 'LANZAMIENTO' ) and id in(-1) order by fechaInicioVentas desc limit 5
select id as idemprenda, nombre as titleemprenda, if(ifnull(foto1,'')='',concat('../images/235x225/', id, '.jpg'), concat('../files//emprendimientos/emprendimiento/', foto1)) as imageemprenda, 'panel panel-default' as classemprenda, concat('../emprendimientos/proyecto.php?proyecto=', id) as linkemprenda, (select count(*) from ocom where emprendimiento = Emprendimientos.id and estado not in ('ANULADA', 'BAJA', 'CANCELADA', 'INACTIVA')) as cantemprenda from Emprendimientos where estado in ('EN FUNCIONAMIENTO', 'EN OBRA', 'FINALIZADO', 'PLANEAMIENTO', 'LANZAMIENTO' ) and id in(-1) order by fechaInicioVentas desc limit 5
select nombre as text, concat('../emprendimientos/plano.php?proyecto=&id=', id) as link, if(''=planos.id,'activo', 'inactivo') as linkclass from planos where emprendimiento = '' and tipo = 'Vista' and activo = 's'
select nombre as text, concat('../emprendimientos/plano.php?proyecto=&id=', id) as link, if(''=planos.id,'activo', 'inactivo') as linkclass from planos where emprendimiento = '' and tipo = 'Planta'
select id as idemprenda, nombre as titleemprenda, if(ifnull(foto1,'')='',concat('../images/235x225/', id, '.jpg'), concat('../files//emprendimientos/emprendimiento/', foto1)) as imageemprenda, 'panel panel-default' as classemprenda, concat('../emprendimientos/proyecto.php?proyecto=', id) as linkemprenda, (select count(*) from ocom where emprendimiento = Emprendimientos.id and estado not in ('ANULADA', 'BAJA', 'CANCELADA', 'INACTIVA')) as cantemprenda from Emprendimientos where estado in ('EN FUNCIONAMIENTO', 'EN OBRA', 'FINALIZADO', 'PLANEAMIENTO', 'LANZAMIENTO' ) and id in(-1) order by fechaInicioVentas desc limit 5
select id as idemprenda, nombre as titleemprenda, if(ifnull(foto1,'')='',concat('../images/235x225/', id, '.jpg'), concat('../files//emprendimientos/emprendimiento/', foto1)) as imageemprenda, 'panel panel-default' as classemprenda, concat('../emprendimientos/proyecto.php?proyecto=', id) as linkemprenda, (select count(*) from ocom where emprendimiento = Emprendimientos.id and estado not in ('ANULADA', 'BAJA', 'CANCELADA', 'INACTIVA')) as cantemprenda from Emprendimientos where estado in ('EN FUNCIONAMIENTO', 'EN OBRA', 'FINALIZADO', 'PLANEAMIENTO', 'LANZAMIENTO' ) and id in(-1) order by fechaInicioVentas desc limit 5
select nombre as text, concat('../emprendimientos/plano.php?proyecto=&id=', id) as link, if(''=planos.id,'activo', 'inactivo') as linkclass from planos where emprendimiento = '' and tipo = 'Vista' and activo = 's'
select nombre as text, concat('../emprendimientos/plano.php?proyecto=&id=', id) as link, if(''=planos.id,'activo', 'inactivo') as linkclass from planos where emprendimiento = '' and tipo = 'Planta'
select id as idemprenda, nombre as titleemprenda, if(ifnull(foto1,'')='',concat('../images/235x225/', id, '.jpg'), concat('../files//emprendimientos/emprendimiento/', foto1)) as imageemprenda, 'panel panel-default' as classemprenda, concat('../emprendimientos/proyecto.php?proyecto=', id) as linkemprenda, (select count(*) from ocom where emprendimiento = Emprendimientos.id and estado not in ('ANULADA', 'BAJA', 'CANCELADA', 'INACTIVA')) as cantemprenda from Emprendimientos where estado in ('EN FUNCIONAMIENTO', 'EN OBRA', 'FINALIZADO', 'PLANEAMIENTO', 'LANZAMIENTO' ) and id in(-1) order by fechaInicioVentas desc limit 5
select id as idemprenda, nombre as titleemprenda, if(ifnull(foto1,'')='',concat('../images/235x225/', id, '.jpg'), concat('../files//emprendimientos/emprendimiento/', foto1)) as imageemprenda, 'panel panel-default' as classemprenda, concat('../emprendimientos/proyecto.php?proyecto=', id) as linkemprenda, (select count(*) from ocom where emprendimiento = Emprendimientos.id and estado not in ('ANULADA', 'BAJA', 'CANCELADA', 'INACTIVA')) as cantemprenda from Emprendimientos where estado in ('EN FUNCIONAMIENTO', 'EN OBRA', 'FINALIZADO', 'PLANEAMIENTO', 'LANZAMIENTO' ) and id in(-1) order by fechaInicioVentas desc limit 5
select nombre as text, concat('../emprendimientos/plano.php?proyecto=&id=', id) as link, if(''=planos.id,'activo', 'inactivo') as linkclass from planos where emprendimiento = '' and tipo = 'Vista' and activo = 's'
select nombre as text, concat('../emprendimientos/plano.php?proyecto=&id=', id) as link, if(''=planos.id,'activo', 'inactivo') as linkclass from planos where emprendimiento = '' and tipo = 'Planta'
select id, titulo, fechadia, actualizacion, fechaevento from cmactiv where tipo = 'T' and estado not in ('Finalizada', 'Aprobada', 'Anulada') and prioridad in ('Urgente', '!') and responsable = '' and (notificacion is null or notificacion < current_date())
select id as alerta_id, idobj as alerta_idobj, tipo as alerta_tipo, titulo as alerta_titulo, detalles as alerta_detalles, link as alerta_link, fecha as alerta_fecha from alertas where usuario = '' order by fecha desc
select id, titulo, fechadia, actualizacion, fechaevento from cmactiv where tipo = 'T' and estado not in ('Finalizada', 'Aprobada', 'Anulada') and prioridad in ('Urgente', '!') and responsable = '' and (notificacion is null or notificacion < current_date())
select id as alerta_id, idobj as alerta_idobj, tipo as alerta_tipo, titulo as alerta_titulo, detalles as alerta_detalles, link as alerta_link, fecha as alerta_fecha from alertas where usuario = '' order by fecha desc
select id, titulo, fechadia, actualizacion, fechaevento from cmactiv where tipo = 'T' and estado not in ('Finalizada', 'Aprobada', 'Anulada') and prioridad in ('Urgente', '!') and responsable = '' and (notificacion is null or notificacion < current_date())
select id as alerta_id, idobj as alerta_idobj, tipo as alerta_tipo, titulo as alerta_titulo, detalles as alerta_detalles, link as alerta_link, fecha as alerta_fecha from alertas where usuario = '' order by fecha desc
select porcentaje, tipo, fecha, cantidad, moneda, tc from cuotasformapago where formapago = '32'
select moneda, sum(porcentaje * tc / 100) as ratio from cuotasformapago where formapago = '32' group by moneda order by moneda desc
select porcentaje, tipo, fecha, cantidad, moneda, tc from cuotasformapago where formapago = '32'
select moneda, sum(porcentaje * tc / 100) as ratio from cuotasformapago where formapago = '32' group by moneda order by moneda desc
select porcentaje, tipo, fecha, cantidad, moneda, tc from cuotasformapago where formapago = '32'
select moneda, sum(porcentaje * tc / 100) as ratio from cuotasformapago where formapago = '32' group by moneda order by moneda desc
select porcentaje, tipo, fecha, cantidad, moneda, tc from cuotasformapago where formapago = '32'
select moneda, sum(porcentaje * tc / 100) as ratio from cuotasformapago where formapago = '32' group by moneda order by moneda desc
select u.id, u.denominacion, u.piso, u.dormitorios, u.superficiem2, round((u.precio + ifnull((select sum(u2.precio) from Unidades as u2 where u2.uf = u.id and u2.tipou not in ('O', 'D')),0)),0) as precio, (select archivo from planos where id = u.plano) as plano, u.mindormitorios, u.maxdormitorios, u.status, u.categoria from Unidades as u where u.emprendimientoid = '3' and u.tipou = 'D'
select title as titleconfiguracion, icon as iconconfiguracion, concat('../', module, '/', name, '.php?proyecto=3&emprendimiento=') as linkconfiguracion from ddwindow where (menu like 'config/Emprendimientos%' or menu like '%,config/Emprendimientos%') and menu not like '%4' order by title
select id as idplano, tipo as tipoplano, nombre as nombreplano from planos where emprendimiento = '3' and tipo in ('Vista') /** and ('' = '' or (tipo = 'Planta' and piso like '%SS')) **/ and activo = 's' order by tipo desc, id limit 1
select id as idplano, tipo as tipoplano, nombre as nombreplano from planos where emprendimiento = '3' and tipo in ('Vista') /** and ('' = '' or (tipo = 'Planta' and piso like '%SS')) **/ and activo = 's' order by tipo desc, id limit 1,1000
select id as idplano, tipo as tipoplano, nombre as nombreplano from planos where emprendimiento = '3' and tipo in ('Planta') /** and ('' = '' or (tipo = 'Planta' and piso like '%SS')) **/ and activo = 's' order by tipo desc, id limit 1
select id as idplano, tipo as tipoplano, nombre as nombreplano from planos where emprendimiento = '3' and tipo in ('Planta') /** and ('' = '' or (tipo = 'Planta' and piso like '%SS')) **/ and activo = 's' order by tipo desc, id limit 1, 100
select id as idplano, tipo as tipoplano, nombre as nombreplano from planos where emprendimiento = '3' and tipo in ('Vista', 'Planta') and ('' = '' or (tipo = 'Planta' and piso like '%SS')) and activo = 's' order by tipo desc, id
select rect.unidad, rect.x, rect.y, rect.w, rect.h, '' as coordenadas, if(ifnull(rect.unidad,'')='', rect.link, /** if(u.status='RESERVADO', concat('../ventas/verventa.php?&proyecto=3&id=', (select operacioncomercial from rcom where estado = 'ACTIVA' and unidadId = rect.unidad)), **/ /*concat('../emprendimientos/planos.php?proyecto=3&unidad=', rect.unidad)*/ concat('../reservas/unidadficha.php?proyecto=3&unidad=', rect.unidad) /** ) **/ ) as link, if(ifnull(rect.unidad,'')='', '', /** if(u.status='RESERVADO', 'blank', **/ 'popup' /** ) **/ ) as linktarget, rect.transicion, (select archivo from planos where id = substring_index(rect.link, '=', -1)) as archivoplano, u.denominacion, u.denominacionua, u.tipounidad, u.torre, u.piso, u.departamento, u.superficieM2, baulera1M2, u.ancho as cocheraancho, u.largo as cocheralargo, u.precio, u.porcentajeCosto as porcentaje, u.categoria, u.moneda, u.observaciones, u.status, (select nombre from estadounidad where estado = u.status) as status2, u.vencimiento as fvencimientoND, u.torres, u.tipou, u.ambientes, u.orientacion, (select group_concat(ifnull(razonsocial, ''), ' ', nombre, ' ', apellido, if(ocomcli.porcentaje=100,'', concat(' (', ocomcli.porcentaje, '%)')) separator '
') from cmcont cross join ocomcli on cmcont.id = ocomcli.cliente cross join ocom on ocomcli.operacioncomercial = ocom.id cross join rcom on ocom.id = rcom.operacioncomercial where ocom.estado != 'ANULADA' and rcom.unidadid = u.id and rcom.estado not in ('Inactiva')) as clientes, (select sum(ocomcli.porcentaje) from cmcont cross join ocomcli on cmcont.id = ocomcli.cliente cross join ocom on ocomcli.operacioncomercial = ocom.id cross join rcom on ocom.id = rcom.operacioncomercial where ocom.estado != 'ANULADA' and rcom.unidadid = u.id and rcom.estado not in ('Inactiva')) as participacion, (select group_concat(ifnull(razonsocial, ''), ' ', apellido, if(ocomcli.porcentaje=100,'', concat(' (', ocomcli.porcentaje, '%)'))) from cmcont cross join ocomcli on cmcont.id = ocomcli.cliente cross join ocom on ocomcli.operacioncomercial = ocom.id cross join rcom on ocom.id = rcom.operacioncomercial where ocom.estado != 'ANULADA' and rcom.unidadid = u.id and rcom.estado not in ('Inactiva')) as apellidosclientes, (select ocom.estado from ocom cross join rcom on ocom.id = rcom.operacioncomercial where rcom.unidadid = u.id and rcom.estado not in ('Inactiva','Anulada')) as estadoocom, (select group_concat(uf.denominacion) from rcom as r1 cross join ocom on r1.operacioncomercial = ocom.id cross join rcom as r2 on ocom.id = r2.operacioncomercial cross join Unidades as uf on r2.unidadId = uf.id where r1.unidadid = u.id and r1.estado not in ('Inactiva') and r2.estado not in ('Inactiva') and ocom.estado != 'ANULADA' and uf.tipou = 'D' ) as ufdenominacion, (select group_concat(u2.tipou, u2.departamento separator ',') from Unidades as u2 where u2.emprendimientoId = u.emprendimientoId and u2.uf = u.id) as complementariasasociadas, (select group_concat((select nombre from tipos where tipou = u2.tipou), ' ', u2.denominacion, if(ifnull(u2.observaciones,'')='', '', concat(' (', u2.observaciones, ')')) separator '
') from Unidades as u2 where u2.emprendimientoId = u.emprendimientoId and u2.uf = u.id) as complementariasasociadas2, (select u2.denominacion from Unidades as u2 where u2.emprendimientoId = u.emprendimientoId and u2.id = u.uf) as ufasociada, (select sum(u2.precio) from Unidades as u2 where u2.emprendimientoId = u.emprendimientoId and u2.uf = u.id) as preciocomplementaria, (select sum(u2.superficiem2) from Unidades as u2 where u2.emprendimientoId = u.emprendimientoId and u2.uf = u.id) as superficiecomplementaria, (select sum(u2.porcentajeCosto) from Unidades as u2 where u2.emprendimientoId = u.emprendimientoId and u2.uf = u.id and tipou != 'D') as porcentajecomplementaria, (select id from formapago where emprendimiento = 'u.emprendimientoId' and principal = 'S' and (categoria = 'u.categoria' or categoria = '' or categoria is null) order by categoria limit 1) as idfp, concat(ifnull(u.observaciones, ''), ifnull((select observaciones from Unidades as u2 where u2.id = u.uf), '') ) as observacionestodas, concat( if(''='', '', if(u.observaciones like '%%','destacada', if( (select observaciones from Unidades as u2 where u2.id = u.uf) like '%%', 'destacada', '') ) ) , if(''='', '', if( (select group_concat(cmcont.contacto) from cmcont cross join ocomcli on cmcont.id = ocomcli.cliente cross join rcom on ocomcli.operacioncomercial = rcom.operacioncomercial where rcom.unidadId = u.id) like '%%','destacada','') ) , if(''='', '', if( '' in (select cmcont.numdoc from cmcont cross join ocomcli on cmcont.id = ocomcli.cliente cross join rcom on ocomcli.operacioncomercial = rcom.operacioncomercial where rcom.unidadId = u.id) ,'destacada','') ) )as claseadicional, (select denominacion from Unidades where id = u.uf) as unidadasociada, (select sum(porcentaje) from ocomcli cross join rcom on ocomcli.operacioncomercial = rcom.operacioncomercial where rcom.unidadId = u.id and rcom.estado not in ('Inactiva')) as totalporcentajeparticipacion from rect left outer join Unidades as u on rect.unidad = u.id where rect.plano = '755' and (''= '' or u.departamento in (-1)) union all select pol.unidad, 0 as x, 0 as y, 0 as w, 0 as h, pol.coordenadas, if(ifnull(pol.unidad,'')='', pol.link, if(u.status='RESERVADO', concat('../ventas/verventa.php?&proyecto=3&id=', (select operacioncomercial from rcom where estado = 'ACTIVA' and unidadId = pol.unidad)), /*concat('../emprendimientos/planos.php?proyecto=3&unidad=', pol.unidad)*/ concat('../reservas/unidadficha.php?proyecto=3&unidad=', pol.unidad) ) ) as link, if(ifnull(pol.unidad,'')='', '', if(u.status='RESERVADO', 'blank', 'popup' ) ) as linktarget, pol.transicion, (select archivo from planos where id = substring_index(pol.link, '=', -1)) as archivoplano, u.denominacion, u.denominacionua, u.tipounidad, u.torre, u.piso, u.departamento, u.superficieM2, baulera1M2, u.ancho as cocheraancho, u.largo as cocheralargo, u.precio, u.porcentajeCosto as porcentaje, u.categoria, u.moneda, u.observaciones, u.status, (select nombre from estadounidad where estado = u.status) as status2, u.vencimiento as fvencimientoND, u.torres, u.tipou, u.ambientes, u.orientacion, (select group_concat(ifnull(razonsocial, ''), ' ', nombre, ' ', apellido, if(ocomcli.porcentaje=100,'', concat(' (', ocomcli.porcentaje, '%)')) separator '
') from cmcont cross join ocomcli on cmcont.id = ocomcli.cliente cross join ocom on ocomcli.operacioncomercial = ocom.id cross join rcom on ocom.id = rcom.operacioncomercial where ocom.estado != 'ANULADA' and rcom.unidadid = u.id and rcom.estado not in ('Inactiva')) as clientes, (select sum(ocomcli.porcentaje) from cmcont cross join ocomcli on cmcont.id = ocomcli.cliente cross join ocom on ocomcli.operacioncomercial = ocom.id cross join rcom on ocom.id = rcom.operacioncomercial where ocom.estado != 'ANULADA' and rcom.unidadid = u.id and rcom.estado not in ('Inactiva')) as participacion, (select group_concat(ifnull(razonsocial, ''), ' ', apellido, if(ocomcli.porcentaje=100,'', concat(' (', ocomcli.porcentaje, '%)'))) from cmcont cross join ocomcli on cmcont.id = ocomcli.cliente cross join ocom on ocomcli.operacioncomercial = ocom.id cross join rcom on ocom.id = rcom.operacioncomercial where ocom.estado != 'ANULADA' and rcom.unidadid = u.id and rcom.estado not in ('Inactiva')) as apellidosclientes, (select ocom.estado from ocom cross join rcom on ocom.id = rcom.operacioncomercial where rcom.unidadid = u.id and rcom.estado not in ('Inactiva','Anulada')) as estadoocom, (select group_concat(uf.denominacion) from rcom as r1 cross join ocom on r1.operacioncomercial = ocom.id cross join rcom as r2 on ocom.id = r2.operacioncomercial cross join Unidades as uf on r2.unidadId = uf.id where r1.unidadid = u.id and r1.estado not in ('Inactiva') and r2.estado not in ('Inactiva') and ocom.estado != 'ANULADA' and uf.tipou = 'D' ) as ufdenominacion, (select group_concat(u2.tipou, u2.departamento separator ',') from Unidades as u2 where u2.emprendimientoId = u.emprendimientoId and u2.uf = u.id) as complementariasasociadas, (select group_concat((select nombre from tipos where tipou = u2.tipou), ' ', u2.denominacion, if(ifnull(u2.observaciones,'')='', '', concat(' (', u2.observaciones, ')')) separator '
') from Unidades as u2 where u2.emprendimientoId = u.emprendimientoId and u2.uf = u.id) as complementariasasociadas2, (select u2.denominacion from Unidades as u2 where u2.emprendimientoId = u.emprendimientoId and u2.id = u.uf) as ufasociada, (select sum(u2.precio) from Unidades as u2 where u2.emprendimientoId = u.emprendimientoId and u2.uf = u.id) as preciocomplementaria, (select sum(u2.superficiem2) from Unidades as u2 where u2.emprendimientoId = u.emprendimientoId and u2.uf = u.id) as superficiecomplementaria, (select sum(u2.porcentajeCosto) from Unidades as u2 where u2.emprendimientoId = u.emprendimientoId and u2.uf = u.id) as porcentajecomplementaria, (select id from formapago where emprendimiento = 'u.emprendimientoId' and principal = 'S' and (categoria = 'u.categoria' or categoria = '' or categoria is null) order by categoria limit 1) as idfp, concat(ifnull(u.observaciones, ''), ifnull((select observaciones from Unidades as u2 where u2.id = u.uf), '') ) as observacionestodas, concat( if(''='', '', if(u.observaciones like '%%','destacada', if( (select observaciones from Unidades as u2 where u2.id = u.uf) like '%%', 'destacada', '') ) ) , if(''='', '', if( (select group_concat(cmcont.contacto) from cmcont cross join ocomcli on cmcont.id = ocomcli.cliente cross join rcom on ocomcli.operacioncomercial = rcom.operacioncomercial where rcom.unidadId = u.id) like '%%','destacada','') ) , if(''='', '', if( '' in (select cmcont.numdoc from cmcont cross join ocomcli on cmcont.id = ocomcli.cliente cross join rcom on ocomcli.operacioncomercial = rcom.operacioncomercial where rcom.unidadId = u.id) ,'destacada','') ) )as claseadicional, (select denominacion from Unidades where id = u.uf) as unidadasociada, (select sum(porcentaje) from ocomcli cross join rcom on ocomcli.operacioncomercial = rcom.operacioncomercial where rcom.unidadId = u.id and rcom.estado not in ('Inactiva')) as totalporcentajeparticipacion from pol left outer join Unidades as u on pol.unidad = u.id where pol.plano = '755' and (''= '' or u.departamento in (-1))
select rect.unidad, rect.x, rect.y, rect.w, rect.h, '' as coordenadas, if(ifnull(rect.unidad,'')='', rect.link, /** if(u.status='RESERVADO', concat('../ventas/verventa.php?&proyecto=3&id=', (select operacioncomercial from rcom where estado = 'ACTIVA' and unidadId = rect.unidad)), **/ /*concat('../emprendimientos/planos.php?proyecto=3&unidad=', rect.unidad)*/ concat('../reservas/unidadficha.php?proyecto=3&unidad=', rect.unidad) /** ) **/ ) as link, if(ifnull(rect.unidad,'')='', '', /** if(u.status='RESERVADO', 'blank', **/ 'popup' /** ) **/ ) as linktarget, rect.transicion, (select archivo from planos where id = substring_index(rect.link, '=', -1)) as archivoplano, u.denominacion, u.codigo, replace(replace(u.denominacionua, '1ss', ''), '2ss', '') as denominacionua, u.tipounidad, u.torre, u.piso, u.departamento, u.superficieM2, baulera1M2, u.ancho as cocheraancho, u.largo as cocheralargo, round(u.precio * '1' / '1',0) as precio, u.porcentajeCosto as porcentaje, u.porcentajeequipamiento as porcentajeequipamiento, u.porcentajeexpensas as porcentajeexpensas, u.categoria, u.moneda, u.observaciones, u.status, (select nombre from estadounidad where estado = u.status) as status2, u.vencimiento as fvencimientoND, u.torres, u.tipou, u.ambientes, u.orientacion, (select group_concat(ifnull(razonsocial, ''), ' ', nombre, ' ', apellido, if(ocomcli.porcentaje=100,'', concat(' (', ocomcli.porcentaje, '%)')) separator '
') from cmcont cross join ocomcli on cmcont.id = ocomcli.cliente cross join ocom on ocomcli.operacioncomercial = ocom.id cross join rcom on ocom.id = rcom.operacioncomercial where ocom.estado != 'ANULADA' and rcom.unidadid = u.id and rcom.estado not in ('Inactiva')) as clientes, (select sum(ocomcli.porcentaje) from cmcont cross join ocomcli on cmcont.id = ocomcli.cliente cross join ocom on ocomcli.operacioncomercial = ocom.id cross join rcom on ocom.id = rcom.operacioncomercial where ocom.estado != 'ANULADA' and rcom.unidadid = u.id and rcom.estado not in ('Inactiva')) as participacion, (select group_concat(ifnull(razonsocial, ''), ' ', apellido, if(ocomcli.porcentaje=100,'', concat(' (', ocomcli.porcentaje, '%)'))) from cmcont cross join ocomcli on cmcont.id = ocomcli.cliente cross join ocom on ocomcli.operacioncomercial = ocom.id cross join rcom on ocom.id = rcom.operacioncomercial where ocom.estado != 'ANULADA' and rcom.unidadid = u.id and rcom.estado not in ('Inactiva')) as apellidosclientes, (select ocom.estado from ocom cross join rcom on ocom.id = rcom.operacioncomercial where rcom.unidadid = u.id and rcom.estado not in ('Inactiva','Anulada')) as estadoocom, (select group_concat(uf.denominacion) from rcom as r1 cross join ocom on r1.operacioncomercial = ocom.id cross join rcom as r2 on ocom.id = r2.operacioncomercial cross join Unidades as uf on r2.unidadId = uf.id where r1.unidadid = u.id and r1.estado not in ('Inactiva') and r2.estado not in ('Inactiva') and ocom.estado != 'ANULADA' and uf.tipou = 'D' ) as ufdenominacion, (select group_concat(u2.tipou, u2.departamento separator ',') from Unidades as u2 where u2.emprendimientoId = u.emprendimientoId and u2.uf = u.id) as complementariasasociadas, (select group_concat((select nombre from tipos where tipou = u2.tipou), ' ', u2.denominacion, if(ifnull(u2.observaciones,'')='', '', concat(' (', u2.observaciones, ')')) separator '
') from Unidades as u2 where u2.emprendimientoId = u.emprendimientoId and u2.uf = u.id) as complementariasasociadas2, (select u2.denominacion from Unidades as u2 where u2.emprendimientoId = u.emprendimientoId and u2.id = u.uf) as ufasociada, round((select sum(u2.precio) from Unidades as u2 where u2.emprendimientoId = u.emprendimientoId and u2.uf = u.id) * '1' / '1',0) as preciocomplementaria, (select sum(u2.superficiem2) from Unidades as u2 where u2.emprendimientoId = u.emprendimientoId and u2.uf = u.id) as superficiecomplementaria, (select sum(u2.porcentajeCosto) from Unidades as u2 where u2.emprendimientoId = u.emprendimientoId and u2.uf = u.id and tipou != 'D') as porcentajecomplementaria, (select id from formapago where emprendimiento = 'u.emprendimientoId' and principal = 'S' and (categoria = 'u.categoria' or categoria = '' or categoria is null) order by categoria limit 1) as idfp, (select denominacion from Unidades where id = u.uf) as unidadasociada from rect left outer join Unidades as u on rect.unidad = u.id where rect.plano = '755' and (''= '' or u.departamento in (-1)) union all select pol.unidad, 0 as x, 0 as y, 0 as w, 0 as h, pol.coordenadas, if(ifnull(pol.unidad,'')='', pol.link, if(u.status='RESERVADO', concat('../ventas/verventa.php?&proyecto=3&id=', (select operacioncomercial from rcom where estado = 'ACTIVA' and unidadId = pol.unidad)), /*concat('../emprendimientos/planos.php?proyecto=3&unidad=', pol.unidad)*/ concat('../reservas/unidadficha.php?proyecto=3&unidad=', pol.unidad) ) ) as link, if(ifnull(pol.unidad,'')='', '', if(u.status='RESERVADO', 'blank', 'popup' ) ) as linktarget, pol.transicion, (select archivo from planos where id = substring_index(pol.link, '=', -1)) as archivoplano, u.denominacion, u.codigo, replace(replace(u.denominacionua, '1ss', ''), '2ss', '') as denominacionua, u.tipounidad, u.torre, u.piso, u.departamento, u.superficieM2, baulera1M2, u.ancho as cocheraancho, u.largo as cocheralargo, round(u.precio * '1' / '1',0) as precio, u.porcentajeCosto as porcentaje, u.porcentajeequipamiento as porcentajeequipamiento, u.porcentajeexpensas as porcentajeexpensas, u.categoria, u.moneda, u.observaciones, u.status, (select nombre from estadounidad where estado = u.status) as status2, u.vencimiento as fvencimientoND, u.torres, u.tipou, u.ambientes, u.orientacion, (select group_concat(ifnull(razonsocial, ''), ' ', nombre, ' ', apellido, if(ocomcli.porcentaje=100,'', concat(' (', ocomcli.porcentaje, '%)')) separator '
') from cmcont cross join ocomcli on cmcont.id = ocomcli.cliente cross join ocom on ocomcli.operacioncomercial = ocom.id cross join rcom on ocom.id = rcom.operacioncomercial where ocom.estado != 'ANULADA' and rcom.unidadid = u.id and rcom.estado not in ('Inactiva')) as clientes, (select sum(ocomcli.porcentaje) from cmcont cross join ocomcli on cmcont.id = ocomcli.cliente cross join ocom on ocomcli.operacioncomercial = ocom.id cross join rcom on ocom.id = rcom.operacioncomercial where ocom.estado != 'ANULADA' and rcom.unidadid = u.id and rcom.estado not in ('Inactiva')) as participacion, (select group_concat(ifnull(razonsocial, ''), ' ', apellido, if(ocomcli.porcentaje=100,'', concat(' (', ocomcli.porcentaje, '%)'))) from cmcont cross join ocomcli on cmcont.id = ocomcli.cliente cross join ocom on ocomcli.operacioncomercial = ocom.id cross join rcom on ocom.id = rcom.operacioncomercial where ocom.estado != 'ANULADA' and rcom.unidadid = u.id and rcom.estado not in ('Inactiva')) as apellidosclientes, (select ocom.estado from ocom cross join rcom on ocom.id = rcom.operacioncomercial where rcom.unidadid = u.id and rcom.estado not in ('Inactiva','Anulada')) as estadoocom, (select group_concat(uf.denominacion) from rcom as r1 cross join ocom on r1.operacioncomercial = ocom.id cross join rcom as r2 on ocom.id = r2.operacioncomercial cross join Unidades as uf on r2.unidadId = uf.id where r1.unidadid = u.id and r1.estado not in ('Inactiva') and r2.estado not in ('Inactiva') and ocom.estado != 'ANULADA' and uf.tipou = 'D' ) as ufdenominacion, (select group_concat(u2.tipou, u2.departamento separator ',') from Unidades as u2 where u2.emprendimientoId = u.emprendimientoId and u2.uf = u.id) as complementariasasociadas, (select group_concat((select nombre from tipos where tipou = u2.tipou), ' ', u2.denominacion, if(ifnull(u2.observaciones,'')='', '', concat(' (', u2.observaciones, ')')) separator '
') from Unidades as u2 where u2.emprendimientoId = u.emprendimientoId and u2.uf = u.id) as complementariasasociadas2, (select u2.denominacion from Unidades as u2 where u2.emprendimientoId = u.emprendimientoId and u2.id = u.uf) as ufasociada, round((select sum(u2.precio) from Unidades as u2 where u2.emprendimientoId = u.emprendimientoId and u2.uf = u.id) * '1' / '1',0) as preciocomplementaria, (select sum(u2.superficiem2) from Unidades as u2 where u2.emprendimientoId = u.emprendimientoId and u2.uf = u.id) as superficiecomplementaria, (select sum(u2.porcentajeCosto) from Unidades as u2 where u2.emprendimientoId = u.emprendimientoId and u2.uf = u.id) as porcentajecomplementaria, (select id from formapago where emprendimiento = 'u.emprendimientoId' and principal = 'S' and (categoria = 'u.categoria' or categoria = '' or categoria is null) order by categoria limit 1) as idfp, (select denominacion from Unidades where id = u.uf) as unidadasociada from pol left outer join Unidades as u on pol.unidad = u.id where pol.plano = '755' and (''= '' or u.departamento in (-1))
select SQL_CALC_FOUND_ROWS Unidades.denominacion, rcart.precio, rcart.moneda, rcart.id as idcotiz from rcart cross join Unidades on rcart.unidadId = Unidades.id where rcart.cliente = ''
select porcentaje, tipo, fecha, cantidad, moneda, tc from cuotasformapago where formapago = '32'
select moneda, sum(porcentaje * tc / 100) as ratio from cuotasformapago where formapago = '32' group by moneda order by moneda desc
select porcentaje, tipo, fecha, cantidad, moneda, tc from cuotasformapago where formapago = '32'
select moneda, sum(porcentaje * tc / 100) as ratio from cuotasformapago where formapago = '32' group by moneda order by moneda desc
select porcentaje, tipo, fecha, cantidad, moneda, tc from cuotasformapago where formapago = '32'
select moneda, sum(porcentaje * tc / 100) as ratio from cuotasformapago where formapago = '32' group by moneda order by moneda desc
select porcentaje, tipo, fecha, cantidad, moneda, tc from cuotasformapago where formapago = '32'
select moneda, sum(porcentaje * tc / 100) as ratio from cuotasformapago where formapago = '32' group by moneda order by moneda desc
select id, denominacion, piso, dormitorios, superficiem2, cast(round(precio / 100,0) * 100 as unsigned) as precio, (select archivo from planos where id = Unidades.plano) as plano, mindormitorios, maxdormitorios, status, categoria from Unidades where emprendimientoid = '3' and id in (select unidad from pol where plano = 765)
select title as titleconfiguracion, icon as iconconfiguracion, concat('../', module, '/', name, '.php?proyecto=3&emprendimiento=') as linkconfiguracion from ddwindow where (menu like 'config/Emprendimientos%' or menu like '%,config/Emprendimientos%') and menu not like '%4' order by title
select id as idplano, tipo as tipoplano, nombre as nombreplano from planos where emprendimiento = '3' and tipo in ('Vista') /** and ('' = '' or (tipo = 'Planta' and piso like '%SS')) **/ and activo = 's' order by tipo desc, id limit 1
select id as idplano, tipo as tipoplano, nombre as nombreplano from planos where emprendimiento = '3' and tipo in ('Vista') /** and ('' = '' or (tipo = 'Planta' and piso like '%SS')) **/ and activo = 's' order by tipo desc, id limit 1,1000
select id as idplano, tipo as tipoplano, nombre as nombreplano from planos where emprendimiento = '3' and tipo in ('Planta') /** and ('' = '' or (tipo = 'Planta' and piso like '%SS')) **/ and activo = 's' order by tipo desc, id limit 1
select id as idplano, tipo as tipoplano, nombre as nombreplano from planos where emprendimiento = '3' and tipo in ('Planta') /** and ('' = '' or (tipo = 'Planta' and piso like '%SS')) **/ and activo = 's' order by tipo desc, id limit 1, 100
select id as idplano, tipo as tipoplano, nombre as nombreplano from planos where emprendimiento = '3' and tipo in ('Vista', 'Planta') and ('' = '' or (tipo = 'Planta' and piso like '%SS')) and activo = 's' order by tipo desc, id
select rect.unidad, rect.x, rect.y, rect.w, rect.h, '' as coordenadas, if(ifnull(rect.unidad,'')='', rect.link, /** if(u.status='RESERVADO', concat('../ventas/verventa.php?&proyecto=3&id=', (select operacioncomercial from rcom where estado = 'ACTIVA' and unidadId = rect.unidad)), **/ /*concat('../emprendimientos/planos.php?proyecto=3&unidad=', rect.unidad)*/ concat('../reservas/unidadficha.php?proyecto=3&unidad=', rect.unidad) /** ) **/ ) as link, if(ifnull(rect.unidad,'')='', '', /** if(u.status='RESERVADO', 'blank', **/ 'popup' /** ) **/ ) as linktarget, rect.transicion, (select archivo from planos where id = substring_index(rect.link, '=', -1)) as archivoplano, u.denominacion, u.denominacionua, u.tipounidad, u.torre, u.piso, u.departamento, u.superficieM2, baulera1M2, u.ancho as cocheraancho, u.largo as cocheralargo, u.precio, u.porcentajeCosto as porcentaje, u.categoria, u.moneda, u.observaciones, u.status, (select nombre from estadounidad where estado = u.status) as status2, u.vencimiento as fvencimientoND, u.torres, u.tipou, u.ambientes, u.orientacion, (select group_concat(ifnull(razonsocial, ''), ' ', nombre, ' ', apellido, if(ocomcli.porcentaje=100,'', concat(' (', ocomcli.porcentaje, '%)')) separator '
') from cmcont cross join ocomcli on cmcont.id = ocomcli.cliente cross join ocom on ocomcli.operacioncomercial = ocom.id cross join rcom on ocom.id = rcom.operacioncomercial where ocom.estado != 'ANULADA' and rcom.unidadid = u.id and rcom.estado not in ('Inactiva')) as clientes, (select sum(ocomcli.porcentaje) from cmcont cross join ocomcli on cmcont.id = ocomcli.cliente cross join ocom on ocomcli.operacioncomercial = ocom.id cross join rcom on ocom.id = rcom.operacioncomercial where ocom.estado != 'ANULADA' and rcom.unidadid = u.id and rcom.estado not in ('Inactiva')) as participacion, (select group_concat(ifnull(razonsocial, ''), ' ', apellido, if(ocomcli.porcentaje=100,'', concat(' (', ocomcli.porcentaje, '%)'))) from cmcont cross join ocomcli on cmcont.id = ocomcli.cliente cross join ocom on ocomcli.operacioncomercial = ocom.id cross join rcom on ocom.id = rcom.operacioncomercial where ocom.estado != 'ANULADA' and rcom.unidadid = u.id and rcom.estado not in ('Inactiva')) as apellidosclientes, (select ocom.estado from ocom cross join rcom on ocom.id = rcom.operacioncomercial where rcom.unidadid = u.id and rcom.estado not in ('Inactiva','Anulada')) as estadoocom, (select group_concat(uf.denominacion) from rcom as r1 cross join ocom on r1.operacioncomercial = ocom.id cross join rcom as r2 on ocom.id = r2.operacioncomercial cross join Unidades as uf on r2.unidadId = uf.id where r1.unidadid = u.id and r1.estado not in ('Inactiva') and r2.estado not in ('Inactiva') and ocom.estado != 'ANULADA' and uf.tipou = 'D' ) as ufdenominacion, (select group_concat(u2.tipou, u2.departamento separator ',') from Unidades as u2 where u2.emprendimientoId = u.emprendimientoId and u2.uf = u.id) as complementariasasociadas, (select group_concat((select nombre from tipos where tipou = u2.tipou), ' ', u2.denominacion, if(ifnull(u2.observaciones,'')='', '', concat(' (', u2.observaciones, ')')) separator '
') from Unidades as u2 where u2.emprendimientoId = u.emprendimientoId and u2.uf = u.id) as complementariasasociadas2, (select u2.denominacion from Unidades as u2 where u2.emprendimientoId = u.emprendimientoId and u2.id = u.uf) as ufasociada, (select sum(u2.precio) from Unidades as u2 where u2.emprendimientoId = u.emprendimientoId and u2.uf = u.id) as preciocomplementaria, (select sum(u2.superficiem2) from Unidades as u2 where u2.emprendimientoId = u.emprendimientoId and u2.uf = u.id) as superficiecomplementaria, (select sum(u2.porcentajeCosto) from Unidades as u2 where u2.emprendimientoId = u.emprendimientoId and u2.uf = u.id and tipou != 'D') as porcentajecomplementaria, (select id from formapago where emprendimiento = 'u.emprendimientoId' and principal = 'S' and (categoria = 'u.categoria' or categoria = '' or categoria is null) order by categoria limit 1) as idfp, concat(ifnull(u.observaciones, ''), ifnull((select observaciones from Unidades as u2 where u2.id = u.uf), '') ) as observacionestodas, concat( if(''='', '', if(u.observaciones like '%%','destacada', if( (select observaciones from Unidades as u2 where u2.id = u.uf) like '%%', 'destacada', '') ) ) , if(''='', '', if( (select group_concat(cmcont.contacto) from cmcont cross join ocomcli on cmcont.id = ocomcli.cliente cross join rcom on ocomcli.operacioncomercial = rcom.operacioncomercial where rcom.unidadId = u.id) like '%%','destacada','') ) , if(''='', '', if( '' in (select cmcont.numdoc from cmcont cross join ocomcli on cmcont.id = ocomcli.cliente cross join rcom on ocomcli.operacioncomercial = rcom.operacioncomercial where rcom.unidadId = u.id) ,'destacada','') ) )as claseadicional, (select denominacion from Unidades where id = u.uf) as unidadasociada, (select sum(porcentaje) from ocomcli cross join rcom on ocomcli.operacioncomercial = rcom.operacioncomercial where rcom.unidadId = u.id and rcom.estado not in ('Inactiva')) as totalporcentajeparticipacion from rect left outer join Unidades as u on rect.unidad = u.id where rect.plano = '765' and (''= '' or u.departamento in (-1)) union all select pol.unidad, 0 as x, 0 as y, 0 as w, 0 as h, pol.coordenadas, if(ifnull(pol.unidad,'')='', pol.link, if(u.status='RESERVADO', concat('../ventas/verventa.php?&proyecto=3&id=', (select operacioncomercial from rcom where estado = 'ACTIVA' and unidadId = pol.unidad)), /*concat('../emprendimientos/planos.php?proyecto=3&unidad=', pol.unidad)*/ concat('../reservas/unidadficha.php?proyecto=3&unidad=', pol.unidad) ) ) as link, if(ifnull(pol.unidad,'')='', '', if(u.status='RESERVADO', 'blank', 'popup' ) ) as linktarget, pol.transicion, (select archivo from planos where id = substring_index(pol.link, '=', -1)) as archivoplano, u.denominacion, u.denominacionua, u.tipounidad, u.torre, u.piso, u.departamento, u.superficieM2, baulera1M2, u.ancho as cocheraancho, u.largo as cocheralargo, u.precio, u.porcentajeCosto as porcentaje, u.categoria, u.moneda, u.observaciones, u.status, (select nombre from estadounidad where estado = u.status) as status2, u.vencimiento as fvencimientoND, u.torres, u.tipou, u.ambientes, u.orientacion, (select group_concat(ifnull(razonsocial, ''), ' ', nombre, ' ', apellido, if(ocomcli.porcentaje=100,'', concat(' (', ocomcli.porcentaje, '%)')) separator '
') from cmcont cross join ocomcli on cmcont.id = ocomcli.cliente cross join ocom on ocomcli.operacioncomercial = ocom.id cross join rcom on ocom.id = rcom.operacioncomercial where ocom.estado != 'ANULADA' and rcom.unidadid = u.id and rcom.estado not in ('Inactiva')) as clientes, (select sum(ocomcli.porcentaje) from cmcont cross join ocomcli on cmcont.id = ocomcli.cliente cross join ocom on ocomcli.operacioncomercial = ocom.id cross join rcom on ocom.id = rcom.operacioncomercial where ocom.estado != 'ANULADA' and rcom.unidadid = u.id and rcom.estado not in ('Inactiva')) as participacion, (select group_concat(ifnull(razonsocial, ''), ' ', apellido, if(ocomcli.porcentaje=100,'', concat(' (', ocomcli.porcentaje, '%)'))) from cmcont cross join ocomcli on cmcont.id = ocomcli.cliente cross join ocom on ocomcli.operacioncomercial = ocom.id cross join rcom on ocom.id = rcom.operacioncomercial where ocom.estado != 'ANULADA' and rcom.unidadid = u.id and rcom.estado not in ('Inactiva')) as apellidosclientes, (select ocom.estado from ocom cross join rcom on ocom.id = rcom.operacioncomercial where rcom.unidadid = u.id and rcom.estado not in ('Inactiva','Anulada')) as estadoocom, (select group_concat(uf.denominacion) from rcom as r1 cross join ocom on r1.operacioncomercial = ocom.id cross join rcom as r2 on ocom.id = r2.operacioncomercial cross join Unidades as uf on r2.unidadId = uf.id where r1.unidadid = u.id and r1.estado not in ('Inactiva') and r2.estado not in ('Inactiva') and ocom.estado != 'ANULADA' and uf.tipou = 'D' ) as ufdenominacion, (select group_concat(u2.tipou, u2.departamento separator ',') from Unidades as u2 where u2.emprendimientoId = u.emprendimientoId and u2.uf = u.id) as complementariasasociadas, (select group_concat((select nombre from tipos where tipou = u2.tipou), ' ', u2.denominacion, if(ifnull(u2.observaciones,'')='', '', concat(' (', u2.observaciones, ')')) separator '
') from Unidades as u2 where u2.emprendimientoId = u.emprendimientoId and u2.uf = u.id) as complementariasasociadas2, (select u2.denominacion from Unidades as u2 where u2.emprendimientoId = u.emprendimientoId and u2.id = u.uf) as ufasociada, (select sum(u2.precio) from Unidades as u2 where u2.emprendimientoId = u.emprendimientoId and u2.uf = u.id) as preciocomplementaria, (select sum(u2.superficiem2) from Unidades as u2 where u2.emprendimientoId = u.emprendimientoId and u2.uf = u.id) as superficiecomplementaria, (select sum(u2.porcentajeCosto) from Unidades as u2 where u2.emprendimientoId = u.emprendimientoId and u2.uf = u.id) as porcentajecomplementaria, (select id from formapago where emprendimiento = 'u.emprendimientoId' and principal = 'S' and (categoria = 'u.categoria' or categoria = '' or categoria is null) order by categoria limit 1) as idfp, concat(ifnull(u.observaciones, ''), ifnull((select observaciones from Unidades as u2 where u2.id = u.uf), '') ) as observacionestodas, concat( if(''='', '', if(u.observaciones like '%%','destacada', if( (select observaciones from Unidades as u2 where u2.id = u.uf) like '%%', 'destacada', '') ) ) , if(''='', '', if( (select group_concat(cmcont.contacto) from cmcont cross join ocomcli on cmcont.id = ocomcli.cliente cross join rcom on ocomcli.operacioncomercial = rcom.operacioncomercial where rcom.unidadId = u.id) like '%%','destacada','') ) , if(''='', '', if( '' in (select cmcont.numdoc from cmcont cross join ocomcli on cmcont.id = ocomcli.cliente cross join rcom on ocomcli.operacioncomercial = rcom.operacioncomercial where rcom.unidadId = u.id) ,'destacada','') ) )as claseadicional, (select denominacion from Unidades where id = u.uf) as unidadasociada, (select sum(porcentaje) from ocomcli cross join rcom on ocomcli.operacioncomercial = rcom.operacioncomercial where rcom.unidadId = u.id and rcom.estado not in ('Inactiva')) as totalporcentajeparticipacion from pol left outer join Unidades as u on pol.unidad = u.id where pol.plano = '765' and (''= '' or u.departamento in (-1))
select rect.unidad, rect.x, rect.y, rect.w, rect.h, '' as coordenadas, if(ifnull(rect.unidad,'')='', rect.link, /** if(u.status='RESERVADO', concat('../ventas/verventa.php?&proyecto=3&id=', (select operacioncomercial from rcom where estado = 'ACTIVA' and unidadId = rect.unidad)), **/ /*concat('../emprendimientos/planos.php?proyecto=3&unidad=', rect.unidad)*/ concat('../reservas/unidadficha.php?proyecto=3&unidad=', rect.unidad) /** ) **/ ) as link, if(ifnull(rect.unidad,'')='', '', /** if(u.status='RESERVADO', 'blank', **/ 'popup' /** ) **/ ) as linktarget, rect.transicion, (select archivo from planos where id = substring_index(rect.link, '=', -1)) as archivoplano, u.denominacion, u.codigo, replace(replace(u.denominacionua, '1ss', ''), '2ss', '') as denominacionua, u.tipounidad, u.torre, u.piso, u.departamento, u.superficieM2, baulera1M2, u.ancho as cocheraancho, u.largo as cocheralargo, round(u.precio * '1' / '1',0) as precio, u.porcentajeCosto as porcentaje, u.porcentajeequipamiento as porcentajeequipamiento, u.porcentajeexpensas as porcentajeexpensas, u.categoria, u.moneda, u.observaciones, u.status, (select nombre from estadounidad where estado = u.status) as status2, u.vencimiento as fvencimientoND, u.torres, u.tipou, u.ambientes, u.orientacion, (select group_concat(ifnull(razonsocial, ''), ' ', nombre, ' ', apellido, if(ocomcli.porcentaje=100,'', concat(' (', ocomcli.porcentaje, '%)')) separator '
') from cmcont cross join ocomcli on cmcont.id = ocomcli.cliente cross join ocom on ocomcli.operacioncomercial = ocom.id cross join rcom on ocom.id = rcom.operacioncomercial where ocom.estado != 'ANULADA' and rcom.unidadid = u.id and rcom.estado not in ('Inactiva')) as clientes, (select sum(ocomcli.porcentaje) from cmcont cross join ocomcli on cmcont.id = ocomcli.cliente cross join ocom on ocomcli.operacioncomercial = ocom.id cross join rcom on ocom.id = rcom.operacioncomercial where ocom.estado != 'ANULADA' and rcom.unidadid = u.id and rcom.estado not in ('Inactiva')) as participacion, (select group_concat(ifnull(razonsocial, ''), ' ', apellido, if(ocomcli.porcentaje=100,'', concat(' (', ocomcli.porcentaje, '%)'))) from cmcont cross join ocomcli on cmcont.id = ocomcli.cliente cross join ocom on ocomcli.operacioncomercial = ocom.id cross join rcom on ocom.id = rcom.operacioncomercial where ocom.estado != 'ANULADA' and rcom.unidadid = u.id and rcom.estado not in ('Inactiva')) as apellidosclientes, (select ocom.estado from ocom cross join rcom on ocom.id = rcom.operacioncomercial where rcom.unidadid = u.id and rcom.estado not in ('Inactiva','Anulada')) as estadoocom, (select group_concat(uf.denominacion) from rcom as r1 cross join ocom on r1.operacioncomercial = ocom.id cross join rcom as r2 on ocom.id = r2.operacioncomercial cross join Unidades as uf on r2.unidadId = uf.id where r1.unidadid = u.id and r1.estado not in ('Inactiva') and r2.estado not in ('Inactiva') and ocom.estado != 'ANULADA' and uf.tipou = 'D' ) as ufdenominacion, (select group_concat(u2.tipou, u2.departamento separator ',') from Unidades as u2 where u2.emprendimientoId = u.emprendimientoId and u2.uf = u.id) as complementariasasociadas, (select group_concat((select nombre from tipos where tipou = u2.tipou), ' ', u2.denominacion, if(ifnull(u2.observaciones,'')='', '', concat(' (', u2.observaciones, ')')) separator '
') from Unidades as u2 where u2.emprendimientoId = u.emprendimientoId and u2.uf = u.id) as complementariasasociadas2, (select u2.denominacion from Unidades as u2 where u2.emprendimientoId = u.emprendimientoId and u2.id = u.uf) as ufasociada, round((select sum(u2.precio) from Unidades as u2 where u2.emprendimientoId = u.emprendimientoId and u2.uf = u.id) * '1' / '1',0) as preciocomplementaria, (select sum(u2.superficiem2) from Unidades as u2 where u2.emprendimientoId = u.emprendimientoId and u2.uf = u.id) as superficiecomplementaria, (select sum(u2.porcentajeCosto) from Unidades as u2 where u2.emprendimientoId = u.emprendimientoId and u2.uf = u.id and tipou != 'D') as porcentajecomplementaria, (select id from formapago where emprendimiento = 'u.emprendimientoId' and principal = 'S' and (categoria = 'u.categoria' or categoria = '' or categoria is null) order by categoria limit 1) as idfp, (select denominacion from Unidades where id = u.uf) as unidadasociada from rect left outer join Unidades as u on rect.unidad = u.id where rect.plano = '765' and (''= '' or u.departamento in (-1)) union all select pol.unidad, 0 as x, 0 as y, 0 as w, 0 as h, pol.coordenadas, if(ifnull(pol.unidad,'')='', pol.link, if(u.status='RESERVADO', concat('../ventas/verventa.php?&proyecto=3&id=', (select operacioncomercial from rcom where estado = 'ACTIVA' and unidadId = pol.unidad)), /*concat('../emprendimientos/planos.php?proyecto=3&unidad=', pol.unidad)*/ concat('../reservas/unidadficha.php?proyecto=3&unidad=', pol.unidad) ) ) as link, if(ifnull(pol.unidad,'')='', '', if(u.status='RESERVADO', 'blank', 'popup' ) ) as linktarget, pol.transicion, (select archivo from planos where id = substring_index(pol.link, '=', -1)) as archivoplano, u.denominacion, u.codigo, replace(replace(u.denominacionua, '1ss', ''), '2ss', '') as denominacionua, u.tipounidad, u.torre, u.piso, u.departamento, u.superficieM2, baulera1M2, u.ancho as cocheraancho, u.largo as cocheralargo, round(u.precio * '1' / '1',0) as precio, u.porcentajeCosto as porcentaje, u.porcentajeequipamiento as porcentajeequipamiento, u.porcentajeexpensas as porcentajeexpensas, u.categoria, u.moneda, u.observaciones, u.status, (select nombre from estadounidad where estado = u.status) as status2, u.vencimiento as fvencimientoND, u.torres, u.tipou, u.ambientes, u.orientacion, (select group_concat(ifnull(razonsocial, ''), ' ', nombre, ' ', apellido, if(ocomcli.porcentaje=100,'', concat(' (', ocomcli.porcentaje, '%)')) separator '
') from cmcont cross join ocomcli on cmcont.id = ocomcli.cliente cross join ocom on ocomcli.operacioncomercial = ocom.id cross join rcom on ocom.id = rcom.operacioncomercial where ocom.estado != 'ANULADA' and rcom.unidadid = u.id and rcom.estado not in ('Inactiva')) as clientes, (select sum(ocomcli.porcentaje) from cmcont cross join ocomcli on cmcont.id = ocomcli.cliente cross join ocom on ocomcli.operacioncomercial = ocom.id cross join rcom on ocom.id = rcom.operacioncomercial where ocom.estado != 'ANULADA' and rcom.unidadid = u.id and rcom.estado not in ('Inactiva')) as participacion, (select group_concat(ifnull(razonsocial, ''), ' ', apellido, if(ocomcli.porcentaje=100,'', concat(' (', ocomcli.porcentaje, '%)'))) from cmcont cross join ocomcli on cmcont.id = ocomcli.cliente cross join ocom on ocomcli.operacioncomercial = ocom.id cross join rcom on ocom.id = rcom.operacioncomercial where ocom.estado != 'ANULADA' and rcom.unidadid = u.id and rcom.estado not in ('Inactiva')) as apellidosclientes, (select ocom.estado from ocom cross join rcom on ocom.id = rcom.operacioncomercial where rcom.unidadid = u.id and rcom.estado not in ('Inactiva','Anulada')) as estadoocom, (select group_concat(uf.denominacion) from rcom as r1 cross join ocom on r1.operacioncomercial = ocom.id cross join rcom as r2 on ocom.id = r2.operacioncomercial cross join Unidades as uf on r2.unidadId = uf.id where r1.unidadid = u.id and r1.estado not in ('Inactiva') and r2.estado not in ('Inactiva') and ocom.estado != 'ANULADA' and uf.tipou = 'D' ) as ufdenominacion, (select group_concat(u2.tipou, u2.departamento separator ',') from Unidades as u2 where u2.emprendimientoId = u.emprendimientoId and u2.uf = u.id) as complementariasasociadas, (select group_concat((select nombre from tipos where tipou = u2.tipou), ' ', u2.denominacion, if(ifnull(u2.observaciones,'')='', '', concat(' (', u2.observaciones, ')')) separator '
') from Unidades as u2 where u2.emprendimientoId = u.emprendimientoId and u2.uf = u.id) as complementariasasociadas2, (select u2.denominacion from Unidades as u2 where u2.emprendimientoId = u.emprendimientoId and u2.id = u.uf) as ufasociada, round((select sum(u2.precio) from Unidades as u2 where u2.emprendimientoId = u.emprendimientoId and u2.uf = u.id) * '1' / '1',0) as preciocomplementaria, (select sum(u2.superficiem2) from Unidades as u2 where u2.emprendimientoId = u.emprendimientoId and u2.uf = u.id) as superficiecomplementaria, (select sum(u2.porcentajeCosto) from Unidades as u2 where u2.emprendimientoId = u.emprendimientoId and u2.uf = u.id) as porcentajecomplementaria, (select id from formapago where emprendimiento = 'u.emprendimientoId' and principal = 'S' and (categoria = 'u.categoria' or categoria = '' or categoria is null) order by categoria limit 1) as idfp, (select denominacion from Unidades where id = u.uf) as unidadasociada from pol left outer join Unidades as u on pol.unidad = u.id where pol.plano = '765' and (''= '' or u.departamento in (-1))
select SQL_CALC_FOUND_ROWS Unidades.denominacion, rcart.precio, rcart.moneda, rcart.id as idcotiz from rcart cross join Unidades on rcart.unidadId = Unidades.id where rcart.cliente = ''
select porcentaje, tipo, fecha, cantidad, moneda, tc from cuotasformapago where formapago = '32'
select moneda, sum(porcentaje * tc / 100) as ratio from cuotasformapago where formapago = '32' group by moneda order by moneda desc
select porcentaje, tipo, fecha, cantidad, moneda, tc from cuotasformapago where formapago = '32'
select moneda, sum(porcentaje * tc / 100) as ratio from cuotasformapago where formapago = '32' group by moneda order by moneda desc
select porcentaje, tipo, fecha, cantidad, moneda, tc from cuotasformapago where formapago = '32'
select moneda, sum(porcentaje * tc / 100) as ratio from cuotasformapago where formapago = '32' group by moneda order by moneda desc
select porcentaje, tipo, fecha, cantidad, moneda, tc from cuotasformapago where formapago = '32'
select moneda, sum(porcentaje * tc / 100) as ratio from cuotasformapago where formapago = '32' group by moneda order by moneda desc
select u.id, u.denominacion, u.piso, u.dormitorios, u.superficiem2, round((u.precio + ifnull((select sum(u2.precio) from Unidades as u2 where u2.uf = u.id and u2.tipou not in ('O', 'D')),0)),0) as precio, (select archivo from planos where id = u.plano) as plano, u.mindormitorios, u.maxdormitorios, u.status, u.categoria from Unidades as u where u.emprendimientoid = '3' and u.tipou = 'D'
select title as titleconfiguracion, icon as iconconfiguracion, concat('../', module, '/', name, '.php?proyecto=3&emprendimiento=') as linkconfiguracion from ddwindow where (menu like 'config/Emprendimientos%' or menu like '%,config/Emprendimientos%') and menu not like '%4' order by title
select id as idplano, tipo as tipoplano, nombre as nombreplano from planos where emprendimiento = '3' and tipo in ('Vista') /** and ('' = '' or (tipo = 'Planta' and piso like '%SS')) **/ and activo = 's' order by tipo desc, id limit 1
select id as idplano, tipo as tipoplano, nombre as nombreplano from planos where emprendimiento = '3' and tipo in ('Vista') /** and ('' = '' or (tipo = 'Planta' and piso like '%SS')) **/ and activo = 's' order by tipo desc, id limit 1,1000
select id as idplano, tipo as tipoplano, nombre as nombreplano from planos where emprendimiento = '3' and tipo in ('Planta') /** and ('' = '' or (tipo = 'Planta' and piso like '%SS')) **/ and activo = 's' order by tipo desc, id limit 1
select id as idplano, tipo as tipoplano, nombre as nombreplano from planos where emprendimiento = '3' and tipo in ('Planta') /** and ('' = '' or (tipo = 'Planta' and piso like '%SS')) **/ and activo = 's' order by tipo desc, id limit 1, 100
select id as idplano, tipo as tipoplano, nombre as nombreplano from planos where emprendimiento = '3' and tipo in ('Vista', 'Planta') and ('' = '' or (tipo = 'Planta' and piso like '%SS')) and activo = 's' order by tipo desc, id
select rect.unidad, rect.x, rect.y, rect.w, rect.h, '' as coordenadas, if(ifnull(rect.unidad,'')='', rect.link, /** if(u.status='RESERVADO', concat('../ventas/verventa.php?&proyecto=3&id=', (select operacioncomercial from rcom where estado = 'ACTIVA' and unidadId = rect.unidad)), **/ /*concat('../emprendimientos/planos.php?proyecto=3&unidad=', rect.unidad)*/ concat('../reservas/unidadficha.php?proyecto=3&unidad=', rect.unidad) /** ) **/ ) as link, if(ifnull(rect.unidad,'')='', '', /** if(u.status='RESERVADO', 'blank', **/ 'popup' /** ) **/ ) as linktarget, rect.transicion, (select archivo from planos where id = substring_index(rect.link, '=', -1)) as archivoplano, u.denominacion, u.denominacionua, u.tipounidad, u.torre, u.piso, u.departamento, u.superficieM2, baulera1M2, u.ancho as cocheraancho, u.largo as cocheralargo, u.precio, u.porcentajeCosto as porcentaje, u.categoria, u.moneda, u.observaciones, u.status, (select nombre from estadounidad where estado = u.status) as status2, u.vencimiento as fvencimientoND, u.torres, u.tipou, u.ambientes, u.orientacion, (select group_concat(ifnull(razonsocial, ''), ' ', nombre, ' ', apellido, if(ocomcli.porcentaje=100,'', concat(' (', ocomcli.porcentaje, '%)')) separator '
') from cmcont cross join ocomcli on cmcont.id = ocomcli.cliente cross join ocom on ocomcli.operacioncomercial = ocom.id cross join rcom on ocom.id = rcom.operacioncomercial where ocom.estado != 'ANULADA' and rcom.unidadid = u.id and rcom.estado not in ('Inactiva')) as clientes, (select sum(ocomcli.porcentaje) from cmcont cross join ocomcli on cmcont.id = ocomcli.cliente cross join ocom on ocomcli.operacioncomercial = ocom.id cross join rcom on ocom.id = rcom.operacioncomercial where ocom.estado != 'ANULADA' and rcom.unidadid = u.id and rcom.estado not in ('Inactiva')) as participacion, (select group_concat(ifnull(razonsocial, ''), ' ', apellido, if(ocomcli.porcentaje=100,'', concat(' (', ocomcli.porcentaje, '%)'))) from cmcont cross join ocomcli on cmcont.id = ocomcli.cliente cross join ocom on ocomcli.operacioncomercial = ocom.id cross join rcom on ocom.id = rcom.operacioncomercial where ocom.estado != 'ANULADA' and rcom.unidadid = u.id and rcom.estado not in ('Inactiva')) as apellidosclientes, (select ocom.estado from ocom cross join rcom on ocom.id = rcom.operacioncomercial where rcom.unidadid = u.id and rcom.estado not in ('Inactiva','Anulada')) as estadoocom, (select group_concat(uf.denominacion) from rcom as r1 cross join ocom on r1.operacioncomercial = ocom.id cross join rcom as r2 on ocom.id = r2.operacioncomercial cross join Unidades as uf on r2.unidadId = uf.id where r1.unidadid = u.id and r1.estado not in ('Inactiva') and r2.estado not in ('Inactiva') and ocom.estado != 'ANULADA' and uf.tipou = 'D' ) as ufdenominacion, (select group_concat(u2.tipou, u2.departamento separator ',') from Unidades as u2 where u2.emprendimientoId = u.emprendimientoId and u2.uf = u.id) as complementariasasociadas, (select group_concat((select nombre from tipos where tipou = u2.tipou), ' ', u2.denominacion, if(ifnull(u2.observaciones,'')='', '', concat(' (', u2.observaciones, ')')) separator '
') from Unidades as u2 where u2.emprendimientoId = u.emprendimientoId and u2.uf = u.id) as complementariasasociadas2, (select u2.denominacion from Unidades as u2 where u2.emprendimientoId = u.emprendimientoId and u2.id = u.uf) as ufasociada, (select sum(u2.precio) from Unidades as u2 where u2.emprendimientoId = u.emprendimientoId and u2.uf = u.id) as preciocomplementaria, (select sum(u2.superficiem2) from Unidades as u2 where u2.emprendimientoId = u.emprendimientoId and u2.uf = u.id) as superficiecomplementaria, (select sum(u2.porcentajeCosto) from Unidades as u2 where u2.emprendimientoId = u.emprendimientoId and u2.uf = u.id and tipou != 'D') as porcentajecomplementaria, (select id from formapago where emprendimiento = 'u.emprendimientoId' and principal = 'S' and (categoria = 'u.categoria' or categoria = '' or categoria is null) order by categoria limit 1) as idfp, concat(ifnull(u.observaciones, ''), ifnull((select observaciones from Unidades as u2 where u2.id = u.uf), '') ) as observacionestodas, concat( if(''='', '', if(u.observaciones like '%%','destacada', if( (select observaciones from Unidades as u2 where u2.id = u.uf) like '%%', 'destacada', '') ) ) , if(''='', '', if( (select group_concat(cmcont.contacto) from cmcont cross join ocomcli on cmcont.id = ocomcli.cliente cross join rcom on ocomcli.operacioncomercial = rcom.operacioncomercial where rcom.unidadId = u.id) like '%%','destacada','') ) , if(''='', '', if( '' in (select cmcont.numdoc from cmcont cross join ocomcli on cmcont.id = ocomcli.cliente cross join rcom on ocomcli.operacioncomercial = rcom.operacioncomercial where rcom.unidadId = u.id) ,'destacada','') ) )as claseadicional, (select denominacion from Unidades where id = u.uf) as unidadasociada, (select sum(porcentaje) from ocomcli cross join rcom on ocomcli.operacioncomercial = rcom.operacioncomercial where rcom.unidadId = u.id and rcom.estado not in ('Inactiva')) as totalporcentajeparticipacion from rect left outer join Unidades as u on rect.unidad = u.id where rect.plano = '766' and (''= '' or u.departamento in (-1)) union all select pol.unidad, 0 as x, 0 as y, 0 as w, 0 as h, pol.coordenadas, if(ifnull(pol.unidad,'')='', pol.link, if(u.status='RESERVADO', concat('../ventas/verventa.php?&proyecto=3&id=', (select operacioncomercial from rcom where estado = 'ACTIVA' and unidadId = pol.unidad)), /*concat('../emprendimientos/planos.php?proyecto=3&unidad=', pol.unidad)*/ concat('../reservas/unidadficha.php?proyecto=3&unidad=', pol.unidad) ) ) as link, if(ifnull(pol.unidad,'')='', '', if(u.status='RESERVADO', 'blank', 'popup' ) ) as linktarget, pol.transicion, (select archivo from planos where id = substring_index(pol.link, '=', -1)) as archivoplano, u.denominacion, u.denominacionua, u.tipounidad, u.torre, u.piso, u.departamento, u.superficieM2, baulera1M2, u.ancho as cocheraancho, u.largo as cocheralargo, u.precio, u.porcentajeCosto as porcentaje, u.categoria, u.moneda, u.observaciones, u.status, (select nombre from estadounidad where estado = u.status) as status2, u.vencimiento as fvencimientoND, u.torres, u.tipou, u.ambientes, u.orientacion, (select group_concat(ifnull(razonsocial, ''), ' ', nombre, ' ', apellido, if(ocomcli.porcentaje=100,'', concat(' (', ocomcli.porcentaje, '%)')) separator '
') from cmcont cross join ocomcli on cmcont.id = ocomcli.cliente cross join ocom on ocomcli.operacioncomercial = ocom.id cross join rcom on ocom.id = rcom.operacioncomercial where ocom.estado != 'ANULADA' and rcom.unidadid = u.id and rcom.estado not in ('Inactiva')) as clientes, (select sum(ocomcli.porcentaje) from cmcont cross join ocomcli on cmcont.id = ocomcli.cliente cross join ocom on ocomcli.operacioncomercial = ocom.id cross join rcom on ocom.id = rcom.operacioncomercial where ocom.estado != 'ANULADA' and rcom.unidadid = u.id and rcom.estado not in ('Inactiva')) as participacion, (select group_concat(ifnull(razonsocial, ''), ' ', apellido, if(ocomcli.porcentaje=100,'', concat(' (', ocomcli.porcentaje, '%)'))) from cmcont cross join ocomcli on cmcont.id = ocomcli.cliente cross join ocom on ocomcli.operacioncomercial = ocom.id cross join rcom on ocom.id = rcom.operacioncomercial where ocom.estado != 'ANULADA' and rcom.unidadid = u.id and rcom.estado not in ('Inactiva')) as apellidosclientes, (select ocom.estado from ocom cross join rcom on ocom.id = rcom.operacioncomercial where rcom.unidadid = u.id and rcom.estado not in ('Inactiva','Anulada')) as estadoocom, (select group_concat(uf.denominacion) from rcom as r1 cross join ocom on r1.operacioncomercial = ocom.id cross join rcom as r2 on ocom.id = r2.operacioncomercial cross join Unidades as uf on r2.unidadId = uf.id where r1.unidadid = u.id and r1.estado not in ('Inactiva') and r2.estado not in ('Inactiva') and ocom.estado != 'ANULADA' and uf.tipou = 'D' ) as ufdenominacion, (select group_concat(u2.tipou, u2.departamento separator ',') from Unidades as u2 where u2.emprendimientoId = u.emprendimientoId and u2.uf = u.id) as complementariasasociadas, (select group_concat((select nombre from tipos where tipou = u2.tipou), ' ', u2.denominacion, if(ifnull(u2.observaciones,'')='', '', concat(' (', u2.observaciones, ')')) separator '
') from Unidades as u2 where u2.emprendimientoId = u.emprendimientoId and u2.uf = u.id) as complementariasasociadas2, (select u2.denominacion from Unidades as u2 where u2.emprendimientoId = u.emprendimientoId and u2.id = u.uf) as ufasociada, (select sum(u2.precio) from Unidades as u2 where u2.emprendimientoId = u.emprendimientoId and u2.uf = u.id) as preciocomplementaria, (select sum(u2.superficiem2) from Unidades as u2 where u2.emprendimientoId = u.emprendimientoId and u2.uf = u.id) as superficiecomplementaria, (select sum(u2.porcentajeCosto) from Unidades as u2 where u2.emprendimientoId = u.emprendimientoId and u2.uf = u.id) as porcentajecomplementaria, (select id from formapago where emprendimiento = 'u.emprendimientoId' and principal = 'S' and (categoria = 'u.categoria' or categoria = '' or categoria is null) order by categoria limit 1) as idfp, concat(ifnull(u.observaciones, ''), ifnull((select observaciones from Unidades as u2 where u2.id = u.uf), '') ) as observacionestodas, concat( if(''='', '', if(u.observaciones like '%%','destacada', if( (select observaciones from Unidades as u2 where u2.id = u.uf) like '%%', 'destacada', '') ) ) , if(''='', '', if( (select group_concat(cmcont.contacto) from cmcont cross join ocomcli on cmcont.id = ocomcli.cliente cross join rcom on ocomcli.operacioncomercial = rcom.operacioncomercial where rcom.unidadId = u.id) like '%%','destacada','') ) , if(''='', '', if( '' in (select cmcont.numdoc from cmcont cross join ocomcli on cmcont.id = ocomcli.cliente cross join rcom on ocomcli.operacioncomercial = rcom.operacioncomercial where rcom.unidadId = u.id) ,'destacada','') ) )as claseadicional, (select denominacion from Unidades where id = u.uf) as unidadasociada, (select sum(porcentaje) from ocomcli cross join rcom on ocomcli.operacioncomercial = rcom.operacioncomercial where rcom.unidadId = u.id and rcom.estado not in ('Inactiva')) as totalporcentajeparticipacion from pol left outer join Unidades as u on pol.unidad = u.id where pol.plano = '766' and (''= '' or u.departamento in (-1))
select rect.unidad, rect.x, rect.y, rect.w, rect.h, '' as coordenadas, if(ifnull(rect.unidad,'')='', rect.link, /** if(u.status='RESERVADO', concat('../ventas/verventa.php?&proyecto=3&id=', (select operacioncomercial from rcom where estado = 'ACTIVA' and unidadId = rect.unidad)), **/ /*concat('../emprendimientos/planos.php?proyecto=3&unidad=', rect.unidad)*/ concat('../reservas/unidadficha.php?proyecto=3&unidad=', rect.unidad) /** ) **/ ) as link, if(ifnull(rect.unidad,'')='', '', /** if(u.status='RESERVADO', 'blank', **/ 'popup' /** ) **/ ) as linktarget, rect.transicion, (select archivo from planos where id = substring_index(rect.link, '=', -1)) as archivoplano, u.denominacion, u.codigo, replace(replace(u.denominacionua, '1ss', ''), '2ss', '') as denominacionua, u.tipounidad, u.torre, u.piso, u.departamento, u.superficieM2, baulera1M2, u.ancho as cocheraancho, u.largo as cocheralargo, round(u.precio * '1' / '1',0) as precio, u.porcentajeCosto as porcentaje, u.porcentajeequipamiento as porcentajeequipamiento, u.porcentajeexpensas as porcentajeexpensas, u.categoria, u.moneda, u.observaciones, u.status, (select nombre from estadounidad where estado = u.status) as status2, u.vencimiento as fvencimientoND, u.torres, u.tipou, u.ambientes, u.orientacion, (select group_concat(ifnull(razonsocial, ''), ' ', nombre, ' ', apellido, if(ocomcli.porcentaje=100,'', concat(' (', ocomcli.porcentaje, '%)')) separator '
') from cmcont cross join ocomcli on cmcont.id = ocomcli.cliente cross join ocom on ocomcli.operacioncomercial = ocom.id cross join rcom on ocom.id = rcom.operacioncomercial where ocom.estado != 'ANULADA' and rcom.unidadid = u.id and rcom.estado not in ('Inactiva')) as clientes, (select sum(ocomcli.porcentaje) from cmcont cross join ocomcli on cmcont.id = ocomcli.cliente cross join ocom on ocomcli.operacioncomercial = ocom.id cross join rcom on ocom.id = rcom.operacioncomercial where ocom.estado != 'ANULADA' and rcom.unidadid = u.id and rcom.estado not in ('Inactiva')) as participacion, (select group_concat(ifnull(razonsocial, ''), ' ', apellido, if(ocomcli.porcentaje=100,'', concat(' (', ocomcli.porcentaje, '%)'))) from cmcont cross join ocomcli on cmcont.id = ocomcli.cliente cross join ocom on ocomcli.operacioncomercial = ocom.id cross join rcom on ocom.id = rcom.operacioncomercial where ocom.estado != 'ANULADA' and rcom.unidadid = u.id and rcom.estado not in ('Inactiva')) as apellidosclientes, (select ocom.estado from ocom cross join rcom on ocom.id = rcom.operacioncomercial where rcom.unidadid = u.id and rcom.estado not in ('Inactiva','Anulada')) as estadoocom, (select group_concat(uf.denominacion) from rcom as r1 cross join ocom on r1.operacioncomercial = ocom.id cross join rcom as r2 on ocom.id = r2.operacioncomercial cross join Unidades as uf on r2.unidadId = uf.id where r1.unidadid = u.id and r1.estado not in ('Inactiva') and r2.estado not in ('Inactiva') and ocom.estado != 'ANULADA' and uf.tipou = 'D' ) as ufdenominacion, (select group_concat(u2.tipou, u2.departamento separator ',') from Unidades as u2 where u2.emprendimientoId = u.emprendimientoId and u2.uf = u.id) as complementariasasociadas, (select group_concat((select nombre from tipos where tipou = u2.tipou), ' ', u2.denominacion, if(ifnull(u2.observaciones,'')='', '', concat(' (', u2.observaciones, ')')) separator '
') from Unidades as u2 where u2.emprendimientoId = u.emprendimientoId and u2.uf = u.id) as complementariasasociadas2, (select u2.denominacion from Unidades as u2 where u2.emprendimientoId = u.emprendimientoId and u2.id = u.uf) as ufasociada, round((select sum(u2.precio) from Unidades as u2 where u2.emprendimientoId = u.emprendimientoId and u2.uf = u.id) * '1' / '1',0) as preciocomplementaria, (select sum(u2.superficiem2) from Unidades as u2 where u2.emprendimientoId = u.emprendimientoId and u2.uf = u.id) as superficiecomplementaria, (select sum(u2.porcentajeCosto) from Unidades as u2 where u2.emprendimientoId = u.emprendimientoId and u2.uf = u.id and tipou != 'D') as porcentajecomplementaria, (select id from formapago where emprendimiento = 'u.emprendimientoId' and principal = 'S' and (categoria = 'u.categoria' or categoria = '' or categoria is null) order by categoria limit 1) as idfp, (select denominacion from Unidades where id = u.uf) as unidadasociada from rect left outer join Unidades as u on rect.unidad = u.id where rect.plano = '766' and (''= '' or u.departamento in (-1)) union all select pol.unidad, 0 as x, 0 as y, 0 as w, 0 as h, pol.coordenadas, if(ifnull(pol.unidad,'')='', pol.link, if(u.status='RESERVADO', concat('../ventas/verventa.php?&proyecto=3&id=', (select operacioncomercial from rcom where estado = 'ACTIVA' and unidadId = pol.unidad)), /*concat('../emprendimientos/planos.php?proyecto=3&unidad=', pol.unidad)*/ concat('../reservas/unidadficha.php?proyecto=3&unidad=', pol.unidad) ) ) as link, if(ifnull(pol.unidad,'')='', '', if(u.status='RESERVADO', 'blank', 'popup' ) ) as linktarget, pol.transicion, (select archivo from planos where id = substring_index(pol.link, '=', -1)) as archivoplano, u.denominacion, u.codigo, replace(replace(u.denominacionua, '1ss', ''), '2ss', '') as denominacionua, u.tipounidad, u.torre, u.piso, u.departamento, u.superficieM2, baulera1M2, u.ancho as cocheraancho, u.largo as cocheralargo, round(u.precio * '1' / '1',0) as precio, u.porcentajeCosto as porcentaje, u.porcentajeequipamiento as porcentajeequipamiento, u.porcentajeexpensas as porcentajeexpensas, u.categoria, u.moneda, u.observaciones, u.status, (select nombre from estadounidad where estado = u.status) as status2, u.vencimiento as fvencimientoND, u.torres, u.tipou, u.ambientes, u.orientacion, (select group_concat(ifnull(razonsocial, ''), ' ', nombre, ' ', apellido, if(ocomcli.porcentaje=100,'', concat(' (', ocomcli.porcentaje, '%)')) separator '
') from cmcont cross join ocomcli on cmcont.id = ocomcli.cliente cross join ocom on ocomcli.operacioncomercial = ocom.id cross join rcom on ocom.id = rcom.operacioncomercial where ocom.estado != 'ANULADA' and rcom.unidadid = u.id and rcom.estado not in ('Inactiva')) as clientes, (select sum(ocomcli.porcentaje) from cmcont cross join ocomcli on cmcont.id = ocomcli.cliente cross join ocom on ocomcli.operacioncomercial = ocom.id cross join rcom on ocom.id = rcom.operacioncomercial where ocom.estado != 'ANULADA' and rcom.unidadid = u.id and rcom.estado not in ('Inactiva')) as participacion, (select group_concat(ifnull(razonsocial, ''), ' ', apellido, if(ocomcli.porcentaje=100,'', concat(' (', ocomcli.porcentaje, '%)'))) from cmcont cross join ocomcli on cmcont.id = ocomcli.cliente cross join ocom on ocomcli.operacioncomercial = ocom.id cross join rcom on ocom.id = rcom.operacioncomercial where ocom.estado != 'ANULADA' and rcom.unidadid = u.id and rcom.estado not in ('Inactiva')) as apellidosclientes, (select ocom.estado from ocom cross join rcom on ocom.id = rcom.operacioncomercial where rcom.unidadid = u.id and rcom.estado not in ('Inactiva','Anulada')) as estadoocom, (select group_concat(uf.denominacion) from rcom as r1 cross join ocom on r1.operacioncomercial = ocom.id cross join rcom as r2 on ocom.id = r2.operacioncomercial cross join Unidades as uf on r2.unidadId = uf.id where r1.unidadid = u.id and r1.estado not in ('Inactiva') and r2.estado not in ('Inactiva') and ocom.estado != 'ANULADA' and uf.tipou = 'D' ) as ufdenominacion, (select group_concat(u2.tipou, u2.departamento separator ',') from Unidades as u2 where u2.emprendimientoId = u.emprendimientoId and u2.uf = u.id) as complementariasasociadas, (select group_concat((select nombre from tipos where tipou = u2.tipou), ' ', u2.denominacion, if(ifnull(u2.observaciones,'')='', '', concat(' (', u2.observaciones, ')')) separator '
') from Unidades as u2 where u2.emprendimientoId = u.emprendimientoId and u2.uf = u.id) as complementariasasociadas2, (select u2.denominacion from Unidades as u2 where u2.emprendimientoId = u.emprendimientoId and u2.id = u.uf) as ufasociada, round((select sum(u2.precio) from Unidades as u2 where u2.emprendimientoId = u.emprendimientoId and u2.uf = u.id) * '1' / '1',0) as preciocomplementaria, (select sum(u2.superficiem2) from Unidades as u2 where u2.emprendimientoId = u.emprendimientoId and u2.uf = u.id) as superficiecomplementaria, (select sum(u2.porcentajeCosto) from Unidades as u2 where u2.emprendimientoId = u.emprendimientoId and u2.uf = u.id) as porcentajecomplementaria, (select id from formapago where emprendimiento = 'u.emprendimientoId' and principal = 'S' and (categoria = 'u.categoria' or categoria = '' or categoria is null) order by categoria limit 1) as idfp, (select denominacion from Unidades where id = u.uf) as unidadasociada from pol left outer join Unidades as u on pol.unidad = u.id where pol.plano = '766' and (''= '' or u.departamento in (-1))
select SQL_CALC_FOUND_ROWS Unidades.denominacion, rcart.precio, rcart.moneda, rcart.id as idcotiz from rcart cross join Unidades on rcart.unidadId = Unidades.id where rcart.cliente = ''
select porcentaje, tipo, fecha, cantidad, moneda, tc from cuotasformapago where formapago = '32'
select moneda, sum(porcentaje * tc / 100) as ratio from cuotasformapago where formapago = '32' group by moneda order by moneda desc
select porcentaje, tipo, fecha, cantidad, moneda, tc from cuotasformapago where formapago = '32'
select moneda, sum(porcentaje * tc / 100) as ratio from cuotasformapago where formapago = '32' group by moneda order by moneda desc
select porcentaje, tipo, fecha, cantidad, moneda, tc from cuotasformapago where formapago = '32'
select moneda, sum(porcentaje * tc / 100) as ratio from cuotasformapago where formapago = '32' group by moneda order by moneda desc
select porcentaje, tipo, fecha, cantidad, moneda, tc from cuotasformapago where formapago = '32'
select moneda, sum(porcentaje * tc / 100) as ratio from cuotasformapago where formapago = '32' group by moneda order by moneda desc
select id, denominacion, piso, dormitorios, superficiem2, cast(round(precio / 100,0) * 100 as unsigned) as precio, (select archivo from planos where id = Unidades.plano) as plano, mindormitorios, maxdormitorios, status, categoria from Unidades where emprendimientoid = '3' and id in (select unidad from pol where plano = 765)
select title as titleconfiguracion, icon as iconconfiguracion, concat('../', module, '/', name, '.php?proyecto=3&emprendimiento=') as linkconfiguracion from ddwindow where (menu like 'config/Emprendimientos%' or menu like '%,config/Emprendimientos%') and menu not like '%4' order by title
select id as idplano, tipo as tipoplano, nombre as nombreplano from planos where emprendimiento = '3' and tipo in ('Vista') /** and ('' = '' or (tipo = 'Planta' and piso like '%SS')) **/ and activo = 's' order by tipo desc, id limit 1
select id as idplano, tipo as tipoplano, nombre as nombreplano from planos where emprendimiento = '3' and tipo in ('Vista') /** and ('' = '' or (tipo = 'Planta' and piso like '%SS')) **/ and activo = 's' order by tipo desc, id limit 1,1000
select id as idplano, tipo as tipoplano, nombre as nombreplano from planos where emprendimiento = '3' and tipo in ('Planta') /** and ('' = '' or (tipo = 'Planta' and piso like '%SS')) **/ and activo = 's' order by tipo desc, id limit 1
select id as idplano, tipo as tipoplano, nombre as nombreplano from planos where emprendimiento = '3' and tipo in ('Planta') /** and ('' = '' or (tipo = 'Planta' and piso like '%SS')) **/ and activo = 's' order by tipo desc, id limit 1, 100
select id as idplano, tipo as tipoplano, nombre as nombreplano from planos where emprendimiento = '3' and tipo in ('Vista', 'Planta') and ('' = '' or (tipo = 'Planta' and piso like '%SS')) and activo = 's' order by tipo desc, id
select rect.unidad, rect.x, rect.y, rect.w, rect.h, '' as coordenadas, if(ifnull(rect.unidad,'')='', rect.link, /** if(u.status='RESERVADO', concat('../ventas/verventa.php?&proyecto=3&id=', (select operacioncomercial from rcom where estado = 'ACTIVA' and unidadId = rect.unidad)), **/ /*concat('../emprendimientos/planos.php?proyecto=3&unidad=', rect.unidad)*/ concat('../reservas/unidadficha.php?proyecto=3&unidad=', rect.unidad) /** ) **/ ) as link, if(ifnull(rect.unidad,'')='', '', /** if(u.status='RESERVADO', 'blank', **/ 'popup' /** ) **/ ) as linktarget, rect.transicion, (select archivo from planos where id = substring_index(rect.link, '=', -1)) as archivoplano, u.denominacion, u.denominacionua, u.tipounidad, u.torre, u.piso, u.departamento, u.superficieM2, baulera1M2, u.ancho as cocheraancho, u.largo as cocheralargo, u.precio, u.porcentajeCosto as porcentaje, u.categoria, u.moneda, u.observaciones, u.status, (select nombre from estadounidad where estado = u.status) as status2, u.vencimiento as fvencimientoND, u.torres, u.tipou, u.ambientes, u.orientacion, (select group_concat(ifnull(razonsocial, ''), ' ', nombre, ' ', apellido, if(ocomcli.porcentaje=100,'', concat(' (', ocomcli.porcentaje, '%)')) separator '
') from cmcont cross join ocomcli on cmcont.id = ocomcli.cliente cross join ocom on ocomcli.operacioncomercial = ocom.id cross join rcom on ocom.id = rcom.operacioncomercial where ocom.estado != 'ANULADA' and rcom.unidadid = u.id and rcom.estado not in ('Inactiva')) as clientes, (select sum(ocomcli.porcentaje) from cmcont cross join ocomcli on cmcont.id = ocomcli.cliente cross join ocom on ocomcli.operacioncomercial = ocom.id cross join rcom on ocom.id = rcom.operacioncomercial where ocom.estado != 'ANULADA' and rcom.unidadid = u.id and rcom.estado not in ('Inactiva')) as participacion, (select group_concat(ifnull(razonsocial, ''), ' ', apellido, if(ocomcli.porcentaje=100,'', concat(' (', ocomcli.porcentaje, '%)'))) from cmcont cross join ocomcli on cmcont.id = ocomcli.cliente cross join ocom on ocomcli.operacioncomercial = ocom.id cross join rcom on ocom.id = rcom.operacioncomercial where ocom.estado != 'ANULADA' and rcom.unidadid = u.id and rcom.estado not in ('Inactiva')) as apellidosclientes, (select ocom.estado from ocom cross join rcom on ocom.id = rcom.operacioncomercial where rcom.unidadid = u.id and rcom.estado not in ('Inactiva','Anulada')) as estadoocom, (select group_concat(uf.denominacion) from rcom as r1 cross join ocom on r1.operacioncomercial = ocom.id cross join rcom as r2 on ocom.id = r2.operacioncomercial cross join Unidades as uf on r2.unidadId = uf.id where r1.unidadid = u.id and r1.estado not in ('Inactiva') and r2.estado not in ('Inactiva') and ocom.estado != 'ANULADA' and uf.tipou = 'D' ) as ufdenominacion, (select group_concat(u2.tipou, u2.departamento separator ',') from Unidades as u2 where u2.emprendimientoId = u.emprendimientoId and u2.uf = u.id) as complementariasasociadas, (select group_concat((select nombre from tipos where tipou = u2.tipou), ' ', u2.denominacion, if(ifnull(u2.observaciones,'')='', '', concat(' (', u2.observaciones, ')')) separator '
') from Unidades as u2 where u2.emprendimientoId = u.emprendimientoId and u2.uf = u.id) as complementariasasociadas2, (select u2.denominacion from Unidades as u2 where u2.emprendimientoId = u.emprendimientoId and u2.id = u.uf) as ufasociada, (select sum(u2.precio) from Unidades as u2 where u2.emprendimientoId = u.emprendimientoId and u2.uf = u.id) as preciocomplementaria, (select sum(u2.superficiem2) from Unidades as u2 where u2.emprendimientoId = u.emprendimientoId and u2.uf = u.id) as superficiecomplementaria, (select sum(u2.porcentajeCosto) from Unidades as u2 where u2.emprendimientoId = u.emprendimientoId and u2.uf = u.id and tipou != 'D') as porcentajecomplementaria, (select id from formapago where emprendimiento = 'u.emprendimientoId' and principal = 'S' and (categoria = 'u.categoria' or categoria = '' or categoria is null) order by categoria limit 1) as idfp, concat(ifnull(u.observaciones, ''), ifnull((select observaciones from Unidades as u2 where u2.id = u.uf), '') ) as observacionestodas, concat( if(''='', '', if(u.observaciones like '%%','destacada', if( (select observaciones from Unidades as u2 where u2.id = u.uf) like '%%', 'destacada', '') ) ) , if(''='', '', if( (select group_concat(cmcont.contacto) from cmcont cross join ocomcli on cmcont.id = ocomcli.cliente cross join rcom on ocomcli.operacioncomercial = rcom.operacioncomercial where rcom.unidadId = u.id) like '%%','destacada','') ) , if(''='', '', if( '' in (select cmcont.numdoc from cmcont cross join ocomcli on cmcont.id = ocomcli.cliente cross join rcom on ocomcli.operacioncomercial = rcom.operacioncomercial where rcom.unidadId = u.id) ,'destacada','') ) )as claseadicional, (select denominacion from Unidades where id = u.uf) as unidadasociada, (select sum(porcentaje) from ocomcli cross join rcom on ocomcli.operacioncomercial = rcom.operacioncomercial where rcom.unidadId = u.id and rcom.estado not in ('Inactiva')) as totalporcentajeparticipacion from rect left outer join Unidades as u on rect.unidad = u.id where rect.plano = '765' and (''= '' or u.departamento in (-1)) union all select pol.unidad, 0 as x, 0 as y, 0 as w, 0 as h, pol.coordenadas, if(ifnull(pol.unidad,'')='', pol.link, if(u.status='RESERVADO', concat('../ventas/verventa.php?&proyecto=3&id=', (select operacioncomercial from rcom where estado = 'ACTIVA' and unidadId = pol.unidad)), /*concat('../emprendimientos/planos.php?proyecto=3&unidad=', pol.unidad)*/ concat('../reservas/unidadficha.php?proyecto=3&unidad=', pol.unidad) ) ) as link, if(ifnull(pol.unidad,'')='', '', if(u.status='RESERVADO', 'blank', 'popup' ) ) as linktarget, pol.transicion, (select archivo from planos where id = substring_index(pol.link, '=', -1)) as archivoplano, u.denominacion, u.denominacionua, u.tipounidad, u.torre, u.piso, u.departamento, u.superficieM2, baulera1M2, u.ancho as cocheraancho, u.largo as cocheralargo, u.precio, u.porcentajeCosto as porcentaje, u.categoria, u.moneda, u.observaciones, u.status, (select nombre from estadounidad where estado = u.status) as status2, u.vencimiento as fvencimientoND, u.torres, u.tipou, u.ambientes, u.orientacion, (select group_concat(ifnull(razonsocial, ''), ' ', nombre, ' ', apellido, if(ocomcli.porcentaje=100,'', concat(' (', ocomcli.porcentaje, '%)')) separator '
') from cmcont cross join ocomcli on cmcont.id = ocomcli.cliente cross join ocom on ocomcli.operacioncomercial = ocom.id cross join rcom on ocom.id = rcom.operacioncomercial where ocom.estado != 'ANULADA' and rcom.unidadid = u.id and rcom.estado not in ('Inactiva')) as clientes, (select sum(ocomcli.porcentaje) from cmcont cross join ocomcli on cmcont.id = ocomcli.cliente cross join ocom on ocomcli.operacioncomercial = ocom.id cross join rcom on ocom.id = rcom.operacioncomercial where ocom.estado != 'ANULADA' and rcom.unidadid = u.id and rcom.estado not in ('Inactiva')) as participacion, (select group_concat(ifnull(razonsocial, ''), ' ', apellido, if(ocomcli.porcentaje=100,'', concat(' (', ocomcli.porcentaje, '%)'))) from cmcont cross join ocomcli on cmcont.id = ocomcli.cliente cross join ocom on ocomcli.operacioncomercial = ocom.id cross join rcom on ocom.id = rcom.operacioncomercial where ocom.estado != 'ANULADA' and rcom.unidadid = u.id and rcom.estado not in ('Inactiva')) as apellidosclientes, (select ocom.estado from ocom cross join rcom on ocom.id = rcom.operacioncomercial where rcom.unidadid = u.id and rcom.estado not in ('Inactiva','Anulada')) as estadoocom, (select group_concat(uf.denominacion) from rcom as r1 cross join ocom on r1.operacioncomercial = ocom.id cross join rcom as r2 on ocom.id = r2.operacioncomercial cross join Unidades as uf on r2.unidadId = uf.id where r1.unidadid = u.id and r1.estado not in ('Inactiva') and r2.estado not in ('Inactiva') and ocom.estado != 'ANULADA' and uf.tipou = 'D' ) as ufdenominacion, (select group_concat(u2.tipou, u2.departamento separator ',') from Unidades as u2 where u2.emprendimientoId = u.emprendimientoId and u2.uf = u.id) as complementariasasociadas, (select group_concat((select nombre from tipos where tipou = u2.tipou), ' ', u2.denominacion, if(ifnull(u2.observaciones,'')='', '', concat(' (', u2.observaciones, ')')) separator '
') from Unidades as u2 where u2.emprendimientoId = u.emprendimientoId and u2.uf = u.id) as complementariasasociadas2, (select u2.denominacion from Unidades as u2 where u2.emprendimientoId = u.emprendimientoId and u2.id = u.uf) as ufasociada, (select sum(u2.precio) from Unidades as u2 where u2.emprendimientoId = u.emprendimientoId and u2.uf = u.id) as preciocomplementaria, (select sum(u2.superficiem2) from Unidades as u2 where u2.emprendimientoId = u.emprendimientoId and u2.uf = u.id) as superficiecomplementaria, (select sum(u2.porcentajeCosto) from Unidades as u2 where u2.emprendimientoId = u.emprendimientoId and u2.uf = u.id) as porcentajecomplementaria, (select id from formapago where emprendimiento = 'u.emprendimientoId' and principal = 'S' and (categoria = 'u.categoria' or categoria = '' or categoria is null) order by categoria limit 1) as idfp, concat(ifnull(u.observaciones, ''), ifnull((select observaciones from Unidades as u2 where u2.id = u.uf), '') ) as observacionestodas, concat( if(''='', '', if(u.observaciones like '%%','destacada', if( (select observaciones from Unidades as u2 where u2.id = u.uf) like '%%', 'destacada', '') ) ) , if(''='', '', if( (select group_concat(cmcont.contacto) from cmcont cross join ocomcli on cmcont.id = ocomcli.cliente cross join rcom on ocomcli.operacioncomercial = rcom.operacioncomercial where rcom.unidadId = u.id) like '%%','destacada','') ) , if(''='', '', if( '' in (select cmcont.numdoc from cmcont cross join ocomcli on cmcont.id = ocomcli.cliente cross join rcom on ocomcli.operacioncomercial = rcom.operacioncomercial where rcom.unidadId = u.id) ,'destacada','') ) )as claseadicional, (select denominacion from Unidades where id = u.uf) as unidadasociada, (select sum(porcentaje) from ocomcli cross join rcom on ocomcli.operacioncomercial = rcom.operacioncomercial where rcom.unidadId = u.id and rcom.estado not in ('Inactiva')) as totalporcentajeparticipacion from pol left outer join Unidades as u on pol.unidad = u.id where pol.plano = '765' and (''= '' or u.departamento in (-1))
select rect.unidad, rect.x, rect.y, rect.w, rect.h, '' as coordenadas, if(ifnull(rect.unidad,'')='', rect.link, /** if(u.status='RESERVADO', concat('../ventas/verventa.php?&proyecto=3&id=', (select operacioncomercial from rcom where estado = 'ACTIVA' and unidadId = rect.unidad)), **/ /*concat('../emprendimientos/planos.php?proyecto=3&unidad=', rect.unidad)*/ concat('../reservas/unidadficha.php?proyecto=3&unidad=', rect.unidad) /** ) **/ ) as link, if(ifnull(rect.unidad,'')='', '', /** if(u.status='RESERVADO', 'blank', **/ 'popup' /** ) **/ ) as linktarget, rect.transicion, (select archivo from planos where id = substring_index(rect.link, '=', -1)) as archivoplano, u.denominacion, u.codigo, replace(replace(u.denominacionua, '1ss', ''), '2ss', '') as denominacionua, u.tipounidad, u.torre, u.piso, u.departamento, u.superficieM2, baulera1M2, u.ancho as cocheraancho, u.largo as cocheralargo, round(u.precio * '1' / '1',0) as precio, u.porcentajeCosto as porcentaje, u.porcentajeequipamiento as porcentajeequipamiento, u.porcentajeexpensas as porcentajeexpensas, u.categoria, u.moneda, u.observaciones, u.status, (select nombre from estadounidad where estado = u.status) as status2, u.vencimiento as fvencimientoND, u.torres, u.tipou, u.ambientes, u.orientacion, (select group_concat(ifnull(razonsocial, ''), ' ', nombre, ' ', apellido, if(ocomcli.porcentaje=100,'', concat(' (', ocomcli.porcentaje, '%)')) separator '
') from cmcont cross join ocomcli on cmcont.id = ocomcli.cliente cross join ocom on ocomcli.operacioncomercial = ocom.id cross join rcom on ocom.id = rcom.operacioncomercial where ocom.estado != 'ANULADA' and rcom.unidadid = u.id and rcom.estado not in ('Inactiva')) as clientes, (select sum(ocomcli.porcentaje) from cmcont cross join ocomcli on cmcont.id = ocomcli.cliente cross join ocom on ocomcli.operacioncomercial = ocom.id cross join rcom on ocom.id = rcom.operacioncomercial where ocom.estado != 'ANULADA' and rcom.unidadid = u.id and rcom.estado not in ('Inactiva')) as participacion, (select group_concat(ifnull(razonsocial, ''), ' ', apellido, if(ocomcli.porcentaje=100,'', concat(' (', ocomcli.porcentaje, '%)'))) from cmcont cross join ocomcli on cmcont.id = ocomcli.cliente cross join ocom on ocomcli.operacioncomercial = ocom.id cross join rcom on ocom.id = rcom.operacioncomercial where ocom.estado != 'ANULADA' and rcom.unidadid = u.id and rcom.estado not in ('Inactiva')) as apellidosclientes, (select ocom.estado from ocom cross join rcom on ocom.id = rcom.operacioncomercial where rcom.unidadid = u.id and rcom.estado not in ('Inactiva','Anulada')) as estadoocom, (select group_concat(uf.denominacion) from rcom as r1 cross join ocom on r1.operacioncomercial = ocom.id cross join rcom as r2 on ocom.id = r2.operacioncomercial cross join Unidades as uf on r2.unidadId = uf.id where r1.unidadid = u.id and r1.estado not in ('Inactiva') and r2.estado not in ('Inactiva') and ocom.estado != 'ANULADA' and uf.tipou = 'D' ) as ufdenominacion, (select group_concat(u2.tipou, u2.departamento separator ',') from Unidades as u2 where u2.emprendimientoId = u.emprendimientoId and u2.uf = u.id) as complementariasasociadas, (select group_concat((select nombre from tipos where tipou = u2.tipou), ' ', u2.denominacion, if(ifnull(u2.observaciones,'')='', '', concat(' (', u2.observaciones, ')')) separator '
') from Unidades as u2 where u2.emprendimientoId = u.emprendimientoId and u2.uf = u.id) as complementariasasociadas2, (select u2.denominacion from Unidades as u2 where u2.emprendimientoId = u.emprendimientoId and u2.id = u.uf) as ufasociada, round((select sum(u2.precio) from Unidades as u2 where u2.emprendimientoId = u.emprendimientoId and u2.uf = u.id) * '1' / '1',0) as preciocomplementaria, (select sum(u2.superficiem2) from Unidades as u2 where u2.emprendimientoId = u.emprendimientoId and u2.uf = u.id) as superficiecomplementaria, (select sum(u2.porcentajeCosto) from Unidades as u2 where u2.emprendimientoId = u.emprendimientoId and u2.uf = u.id and tipou != 'D') as porcentajecomplementaria, (select id from formapago where emprendimiento = 'u.emprendimientoId' and principal = 'S' and (categoria = 'u.categoria' or categoria = '' or categoria is null) order by categoria limit 1) as idfp, (select denominacion from Unidades where id = u.uf) as unidadasociada from rect left outer join Unidades as u on rect.unidad = u.id where rect.plano = '765' and (''= '' or u.departamento in (-1)) union all select pol.unidad, 0 as x, 0 as y, 0 as w, 0 as h, pol.coordenadas, if(ifnull(pol.unidad,'')='', pol.link, if(u.status='RESERVADO', concat('../ventas/verventa.php?&proyecto=3&id=', (select operacioncomercial from rcom where estado = 'ACTIVA' and unidadId = pol.unidad)), /*concat('../emprendimientos/planos.php?proyecto=3&unidad=', pol.unidad)*/ concat('../reservas/unidadficha.php?proyecto=3&unidad=', pol.unidad) ) ) as link, if(ifnull(pol.unidad,'')='', '', if(u.status='RESERVADO', 'blank', 'popup' ) ) as linktarget, pol.transicion, (select archivo from planos where id = substring_index(pol.link, '=', -1)) as archivoplano, u.denominacion, u.codigo, replace(replace(u.denominacionua, '1ss', ''), '2ss', '') as denominacionua, u.tipounidad, u.torre, u.piso, u.departamento, u.superficieM2, baulera1M2, u.ancho as cocheraancho, u.largo as cocheralargo, round(u.precio * '1' / '1',0) as precio, u.porcentajeCosto as porcentaje, u.porcentajeequipamiento as porcentajeequipamiento, u.porcentajeexpensas as porcentajeexpensas, u.categoria, u.moneda, u.observaciones, u.status, (select nombre from estadounidad where estado = u.status) as status2, u.vencimiento as fvencimientoND, u.torres, u.tipou, u.ambientes, u.orientacion, (select group_concat(ifnull(razonsocial, ''), ' ', nombre, ' ', apellido, if(ocomcli.porcentaje=100,'', concat(' (', ocomcli.porcentaje, '%)')) separator '
') from cmcont cross join ocomcli on cmcont.id = ocomcli.cliente cross join ocom on ocomcli.operacioncomercial = ocom.id cross join rcom on ocom.id = rcom.operacioncomercial where ocom.estado != 'ANULADA' and rcom.unidadid = u.id and rcom.estado not in ('Inactiva')) as clientes, (select sum(ocomcli.porcentaje) from cmcont cross join ocomcli on cmcont.id = ocomcli.cliente cross join ocom on ocomcli.operacioncomercial = ocom.id cross join rcom on ocom.id = rcom.operacioncomercial where ocom.estado != 'ANULADA' and rcom.unidadid = u.id and rcom.estado not in ('Inactiva')) as participacion, (select group_concat(ifnull(razonsocial, ''), ' ', apellido, if(ocomcli.porcentaje=100,'', concat(' (', ocomcli.porcentaje, '%)'))) from cmcont cross join ocomcli on cmcont.id = ocomcli.cliente cross join ocom on ocomcli.operacioncomercial = ocom.id cross join rcom on ocom.id = rcom.operacioncomercial where ocom.estado != 'ANULADA' and rcom.unidadid = u.id and rcom.estado not in ('Inactiva')) as apellidosclientes, (select ocom.estado from ocom cross join rcom on ocom.id = rcom.operacioncomercial where rcom.unidadid = u.id and rcom.estado not in ('Inactiva','Anulada')) as estadoocom, (select group_concat(uf.denominacion) from rcom as r1 cross join ocom on r1.operacioncomercial = ocom.id cross join rcom as r2 on ocom.id = r2.operacioncomercial cross join Unidades as uf on r2.unidadId = uf.id where r1.unidadid = u.id and r1.estado not in ('Inactiva') and r2.estado not in ('Inactiva') and ocom.estado != 'ANULADA' and uf.tipou = 'D' ) as ufdenominacion, (select group_concat(u2.tipou, u2.departamento separator ',') from Unidades as u2 where u2.emprendimientoId = u.emprendimientoId and u2.uf = u.id) as complementariasasociadas, (select group_concat((select nombre from tipos where tipou = u2.tipou), ' ', u2.denominacion, if(ifnull(u2.observaciones,'')='', '', concat(' (', u2.observaciones, ')')) separator '
') from Unidades as u2 where u2.emprendimientoId = u.emprendimientoId and u2.uf = u.id) as complementariasasociadas2, (select u2.denominacion from Unidades as u2 where u2.emprendimientoId = u.emprendimientoId and u2.id = u.uf) as ufasociada, round((select sum(u2.precio) from Unidades as u2 where u2.emprendimientoId = u.emprendimientoId and u2.uf = u.id) * '1' / '1',0) as preciocomplementaria, (select sum(u2.superficiem2) from Unidades as u2 where u2.emprendimientoId = u.emprendimientoId and u2.uf = u.id) as superficiecomplementaria, (select sum(u2.porcentajeCosto) from Unidades as u2 where u2.emprendimientoId = u.emprendimientoId and u2.uf = u.id) as porcentajecomplementaria, (select id from formapago where emprendimiento = 'u.emprendimientoId' and principal = 'S' and (categoria = 'u.categoria' or categoria = '' or categoria is null) order by categoria limit 1) as idfp, (select denominacion from Unidades where id = u.uf) as unidadasociada from pol left outer join Unidades as u on pol.unidad = u.id where pol.plano = '765' and (''= '' or u.departamento in (-1))
select SQL_CALC_FOUND_ROWS Unidades.denominacion, rcart.precio, rcart.moneda, rcart.id as idcotiz from rcart cross join Unidades on rcart.unidadId = Unidades.id where rcart.cliente = ''
select porcentaje, tipo, fecha, cantidad, moneda, tc from cuotasformapago where formapago = '32'
select moneda, sum(porcentaje * tc / 100) as ratio from cuotasformapago where formapago = '32' group by moneda order by moneda desc
select porcentaje, tipo, fecha, cantidad, moneda, tc from cuotasformapago where formapago = '32'
select moneda, sum(porcentaje * tc / 100) as ratio from cuotasformapago where formapago = '32' group by moneda order by moneda desc
select porcentaje, tipo, fecha, cantidad, moneda, tc from cuotasformapago where formapago = '32'
select moneda, sum(porcentaje * tc / 100) as ratio from cuotasformapago where formapago = '32' group by moneda order by moneda desc
select porcentaje, tipo, fecha, cantidad, moneda, tc from cuotasformapago where formapago = '32'
select moneda, sum(porcentaje * tc / 100) as ratio from cuotasformapago where formapago = '32' group by moneda order by moneda desc
select u.id, u.denominacion, u.piso, u.dormitorios, u.superficiem2, round((u.precio + ifnull((select sum(u2.precio) from Unidades as u2 where u2.uf = u.id and u2.tipou not in ('O', 'D')),0)),0) as precio, (select archivo from planos where id = u.plano) as plano, u.mindormitorios, u.maxdormitorios, u.status, u.categoria from Unidades as u where u.emprendimientoid = '3' and u.tipou = 'D'
select title as titleconfiguracion, icon as iconconfiguracion, concat('../', module, '/', name, '.php?proyecto=3&emprendimiento=') as linkconfiguracion from ddwindow where (menu like 'config/Emprendimientos%' or menu like '%,config/Emprendimientos%') and menu not like '%4' order by title
select id as idplano, tipo as tipoplano, nombre as nombreplano from planos where emprendimiento = '3' and tipo in ('Vista') /** and ('' = '' or (tipo = 'Planta' and piso like '%SS')) **/ and activo = 's' order by tipo desc, id limit 1
select id as idplano, tipo as tipoplano, nombre as nombreplano from planos where emprendimiento = '3' and tipo in ('Vista') /** and ('' = '' or (tipo = 'Planta' and piso like '%SS')) **/ and activo = 's' order by tipo desc, id limit 1,1000
select id as idplano, tipo as tipoplano, nombre as nombreplano from planos where emprendimiento = '3' and tipo in ('Planta') /** and ('' = '' or (tipo = 'Planta' and piso like '%SS')) **/ and activo = 's' order by tipo desc, id limit 1
select id as idplano, tipo as tipoplano, nombre as nombreplano from planos where emprendimiento = '3' and tipo in ('Planta') /** and ('' = '' or (tipo = 'Planta' and piso like '%SS')) **/ and activo = 's' order by tipo desc, id limit 1, 100
select id as idplano, tipo as tipoplano, nombre as nombreplano from planos where emprendimiento = '3' and tipo in ('Vista', 'Planta') and ('' = '' or (tipo = 'Planta' and piso like '%SS')) and activo = 's' order by tipo desc, id
select rect.unidad, rect.x, rect.y, rect.w, rect.h, '' as coordenadas, if(ifnull(rect.unidad,'')='', rect.link, /** if(u.status='RESERVADO', concat('../ventas/verventa.php?&proyecto=3&id=', (select operacioncomercial from rcom where estado = 'ACTIVA' and unidadId = rect.unidad)), **/ /*concat('../emprendimientos/planos.php?proyecto=3&unidad=', rect.unidad)*/ concat('../reservas/unidadficha.php?proyecto=3&unidad=', rect.unidad) /** ) **/ ) as link, if(ifnull(rect.unidad,'')='', '', /** if(u.status='RESERVADO', 'blank', **/ 'popup' /** ) **/ ) as linktarget, rect.transicion, (select archivo from planos where id = substring_index(rect.link, '=', -1)) as archivoplano, u.denominacion, u.denominacionua, u.tipounidad, u.torre, u.piso, u.departamento, u.superficieM2, baulera1M2, u.ancho as cocheraancho, u.largo as cocheralargo, u.precio, u.porcentajeCosto as porcentaje, u.categoria, u.moneda, u.observaciones, u.status, (select nombre from estadounidad where estado = u.status) as status2, u.vencimiento as fvencimientoND, u.torres, u.tipou, u.ambientes, u.orientacion, (select group_concat(ifnull(razonsocial, ''), ' ', nombre, ' ', apellido, if(ocomcli.porcentaje=100,'', concat(' (', ocomcli.porcentaje, '%)')) separator '
') from cmcont cross join ocomcli on cmcont.id = ocomcli.cliente cross join ocom on ocomcli.operacioncomercial = ocom.id cross join rcom on ocom.id = rcom.operacioncomercial where ocom.estado != 'ANULADA' and rcom.unidadid = u.id and rcom.estado not in ('Inactiva')) as clientes, (select sum(ocomcli.porcentaje) from cmcont cross join ocomcli on cmcont.id = ocomcli.cliente cross join ocom on ocomcli.operacioncomercial = ocom.id cross join rcom on ocom.id = rcom.operacioncomercial where ocom.estado != 'ANULADA' and rcom.unidadid = u.id and rcom.estado not in ('Inactiva')) as participacion, (select group_concat(ifnull(razonsocial, ''), ' ', apellido, if(ocomcli.porcentaje=100,'', concat(' (', ocomcli.porcentaje, '%)'))) from cmcont cross join ocomcli on cmcont.id = ocomcli.cliente cross join ocom on ocomcli.operacioncomercial = ocom.id cross join rcom on ocom.id = rcom.operacioncomercial where ocom.estado != 'ANULADA' and rcom.unidadid = u.id and rcom.estado not in ('Inactiva')) as apellidosclientes, (select ocom.estado from ocom cross join rcom on ocom.id = rcom.operacioncomercial where rcom.unidadid = u.id and rcom.estado not in ('Inactiva','Anulada')) as estadoocom, (select group_concat(uf.denominacion) from rcom as r1 cross join ocom on r1.operacioncomercial = ocom.id cross join rcom as r2 on ocom.id = r2.operacioncomercial cross join Unidades as uf on r2.unidadId = uf.id where r1.unidadid = u.id and r1.estado not in ('Inactiva') and r2.estado not in ('Inactiva') and ocom.estado != 'ANULADA' and uf.tipou = 'D' ) as ufdenominacion, (select group_concat(u2.tipou, u2.departamento separator ',') from Unidades as u2 where u2.emprendimientoId = u.emprendimientoId and u2.uf = u.id) as complementariasasociadas, (select group_concat((select nombre from tipos where tipou = u2.tipou), ' ', u2.denominacion, if(ifnull(u2.observaciones,'')='', '', concat(' (', u2.observaciones, ')')) separator '
') from Unidades as u2 where u2.emprendimientoId = u.emprendimientoId and u2.uf = u.id) as complementariasasociadas2, (select u2.denominacion from Unidades as u2 where u2.emprendimientoId = u.emprendimientoId and u2.id = u.uf) as ufasociada, (select sum(u2.precio) from Unidades as u2 where u2.emprendimientoId = u.emprendimientoId and u2.uf = u.id) as preciocomplementaria, (select sum(u2.superficiem2) from Unidades as u2 where u2.emprendimientoId = u.emprendimientoId and u2.uf = u.id) as superficiecomplementaria, (select sum(u2.porcentajeCosto) from Unidades as u2 where u2.emprendimientoId = u.emprendimientoId and u2.uf = u.id and tipou != 'D') as porcentajecomplementaria, (select id from formapago where emprendimiento = 'u.emprendimientoId' and principal = 'S' and (categoria = 'u.categoria' or categoria = '' or categoria is null) order by categoria limit 1) as idfp, concat(ifnull(u.observaciones, ''), ifnull((select observaciones from Unidades as u2 where u2.id = u.uf), '') ) as observacionestodas, concat( if(''='', '', if(u.observaciones like '%%','destacada', if( (select observaciones from Unidades as u2 where u2.id = u.uf) like '%%', 'destacada', '') ) ) , if(''='', '', if( (select group_concat(cmcont.contacto) from cmcont cross join ocomcli on cmcont.id = ocomcli.cliente cross join rcom on ocomcli.operacioncomercial = rcom.operacioncomercial where rcom.unidadId = u.id) like '%%','destacada','') ) , if(''='', '', if( '' in (select cmcont.numdoc from cmcont cross join ocomcli on cmcont.id = ocomcli.cliente cross join rcom on ocomcli.operacioncomercial = rcom.operacioncomercial where rcom.unidadId = u.id) ,'destacada','') ) )as claseadicional, (select denominacion from Unidades where id = u.uf) as unidadasociada, (select sum(porcentaje) from ocomcli cross join rcom on ocomcli.operacioncomercial = rcom.operacioncomercial where rcom.unidadId = u.id and rcom.estado not in ('Inactiva')) as totalporcentajeparticipacion from rect left outer join Unidades as u on rect.unidad = u.id where rect.plano = '755' and (''= '' or u.departamento in (-1)) union all select pol.unidad, 0 as x, 0 as y, 0 as w, 0 as h, pol.coordenadas, if(ifnull(pol.unidad,'')='', pol.link, if(u.status='RESERVADO', concat('../ventas/verventa.php?&proyecto=3&id=', (select operacioncomercial from rcom where estado = 'ACTIVA' and unidadId = pol.unidad)), /*concat('../emprendimientos/planos.php?proyecto=3&unidad=', pol.unidad)*/ concat('../reservas/unidadficha.php?proyecto=3&unidad=', pol.unidad) ) ) as link, if(ifnull(pol.unidad,'')='', '', if(u.status='RESERVADO', 'blank', 'popup' ) ) as linktarget, pol.transicion, (select archivo from planos where id = substring_index(pol.link, '=', -1)) as archivoplano, u.denominacion, u.denominacionua, u.tipounidad, u.torre, u.piso, u.departamento, u.superficieM2, baulera1M2, u.ancho as cocheraancho, u.largo as cocheralargo, u.precio, u.porcentajeCosto as porcentaje, u.categoria, u.moneda, u.observaciones, u.status, (select nombre from estadounidad where estado = u.status) as status2, u.vencimiento as fvencimientoND, u.torres, u.tipou, u.ambientes, u.orientacion, (select group_concat(ifnull(razonsocial, ''), ' ', nombre, ' ', apellido, if(ocomcli.porcentaje=100,'', concat(' (', ocomcli.porcentaje, '%)')) separator '
') from cmcont cross join ocomcli on cmcont.id = ocomcli.cliente cross join ocom on ocomcli.operacioncomercial = ocom.id cross join rcom on ocom.id = rcom.operacioncomercial where ocom.estado != 'ANULADA' and rcom.unidadid = u.id and rcom.estado not in ('Inactiva')) as clientes, (select sum(ocomcli.porcentaje) from cmcont cross join ocomcli on cmcont.id = ocomcli.cliente cross join ocom on ocomcli.operacioncomercial = ocom.id cross join rcom on ocom.id = rcom.operacioncomercial where ocom.estado != 'ANULADA' and rcom.unidadid = u.id and rcom.estado not in ('Inactiva')) as participacion, (select group_concat(ifnull(razonsocial, ''), ' ', apellido, if(ocomcli.porcentaje=100,'', concat(' (', ocomcli.porcentaje, '%)'))) from cmcont cross join ocomcli on cmcont.id = ocomcli.cliente cross join ocom on ocomcli.operacioncomercial = ocom.id cross join rcom on ocom.id = rcom.operacioncomercial where ocom.estado != 'ANULADA' and rcom.unidadid = u.id and rcom.estado not in ('Inactiva')) as apellidosclientes, (select ocom.estado from ocom cross join rcom on ocom.id = rcom.operacioncomercial where rcom.unidadid = u.id and rcom.estado not in ('Inactiva','Anulada')) as estadoocom, (select group_concat(uf.denominacion) from rcom as r1 cross join ocom on r1.operacioncomercial = ocom.id cross join rcom as r2 on ocom.id = r2.operacioncomercial cross join Unidades as uf on r2.unidadId = uf.id where r1.unidadid = u.id and r1.estado not in ('Inactiva') and r2.estado not in ('Inactiva') and ocom.estado != 'ANULADA' and uf.tipou = 'D' ) as ufdenominacion, (select group_concat(u2.tipou, u2.departamento separator ',') from Unidades as u2 where u2.emprendimientoId = u.emprendimientoId and u2.uf = u.id) as complementariasasociadas, (select group_concat((select nombre from tipos where tipou = u2.tipou), ' ', u2.denominacion, if(ifnull(u2.observaciones,'')='', '', concat(' (', u2.observaciones, ')')) separator '
') from Unidades as u2 where u2.emprendimientoId = u.emprendimientoId and u2.uf = u.id) as complementariasasociadas2, (select u2.denominacion from Unidades as u2 where u2.emprendimientoId = u.emprendimientoId and u2.id = u.uf) as ufasociada, (select sum(u2.precio) from Unidades as u2 where u2.emprendimientoId = u.emprendimientoId and u2.uf = u.id) as preciocomplementaria, (select sum(u2.superficiem2) from Unidades as u2 where u2.emprendimientoId = u.emprendimientoId and u2.uf = u.id) as superficiecomplementaria, (select sum(u2.porcentajeCosto) from Unidades as u2 where u2.emprendimientoId = u.emprendimientoId and u2.uf = u.id) as porcentajecomplementaria, (select id from formapago where emprendimiento = 'u.emprendimientoId' and principal = 'S' and (categoria = 'u.categoria' or categoria = '' or categoria is null) order by categoria limit 1) as idfp, concat(ifnull(u.observaciones, ''), ifnull((select observaciones from Unidades as u2 where u2.id = u.uf), '') ) as observacionestodas, concat( if(''='', '', if(u.observaciones like '%%','destacada', if( (select observaciones from Unidades as u2 where u2.id = u.uf) like '%%', 'destacada', '') ) ) , if(''='', '', if( (select group_concat(cmcont.contacto) from cmcont cross join ocomcli on cmcont.id = ocomcli.cliente cross join rcom on ocomcli.operacioncomercial = rcom.operacioncomercial where rcom.unidadId = u.id) like '%%','destacada','') ) , if(''='', '', if( '' in (select cmcont.numdoc from cmcont cross join ocomcli on cmcont.id = ocomcli.cliente cross join rcom on ocomcli.operacioncomercial = rcom.operacioncomercial where rcom.unidadId = u.id) ,'destacada','') ) )as claseadicional, (select denominacion from Unidades where id = u.uf) as unidadasociada, (select sum(porcentaje) from ocomcli cross join rcom on ocomcli.operacioncomercial = rcom.operacioncomercial where rcom.unidadId = u.id and rcom.estado not in ('Inactiva')) as totalporcentajeparticipacion from pol left outer join Unidades as u on pol.unidad = u.id where pol.plano = '755' and (''= '' or u.departamento in (-1))
select rect.unidad, rect.x, rect.y, rect.w, rect.h, '' as coordenadas, if(ifnull(rect.unidad,'')='', rect.link, /** if(u.status='RESERVADO', concat('../ventas/verventa.php?&proyecto=3&id=', (select operacioncomercial from rcom where estado = 'ACTIVA' and unidadId = rect.unidad)), **/ /*concat('../emprendimientos/planos.php?proyecto=3&unidad=', rect.unidad)*/ concat('../reservas/unidadficha.php?proyecto=3&unidad=', rect.unidad) /** ) **/ ) as link, if(ifnull(rect.unidad,'')='', '', /** if(u.status='RESERVADO', 'blank', **/ 'popup' /** ) **/ ) as linktarget, rect.transicion, (select archivo from planos where id = substring_index(rect.link, '=', -1)) as archivoplano, u.denominacion, u.codigo, replace(replace(u.denominacionua, '1ss', ''), '2ss', '') as denominacionua, u.tipounidad, u.torre, u.piso, u.departamento, u.superficieM2, baulera1M2, u.ancho as cocheraancho, u.largo as cocheralargo, round(u.precio * '1' / '1',0) as precio, u.porcentajeCosto as porcentaje, u.porcentajeequipamiento as porcentajeequipamiento, u.porcentajeexpensas as porcentajeexpensas, u.categoria, u.moneda, u.observaciones, u.status, (select nombre from estadounidad where estado = u.status) as status2, u.vencimiento as fvencimientoND, u.torres, u.tipou, u.ambientes, u.orientacion, (select group_concat(ifnull(razonsocial, ''), ' ', nombre, ' ', apellido, if(ocomcli.porcentaje=100,'', concat(' (', ocomcli.porcentaje, '%)')) separator '
') from cmcont cross join ocomcli on cmcont.id = ocomcli.cliente cross join ocom on ocomcli.operacioncomercial = ocom.id cross join rcom on ocom.id = rcom.operacioncomercial where ocom.estado != 'ANULADA' and rcom.unidadid = u.id and rcom.estado not in ('Inactiva')) as clientes, (select sum(ocomcli.porcentaje) from cmcont cross join ocomcli on cmcont.id = ocomcli.cliente cross join ocom on ocomcli.operacioncomercial = ocom.id cross join rcom on ocom.id = rcom.operacioncomercial where ocom.estado != 'ANULADA' and rcom.unidadid = u.id and rcom.estado not in ('Inactiva')) as participacion, (select group_concat(ifnull(razonsocial, ''), ' ', apellido, if(ocomcli.porcentaje=100,'', concat(' (', ocomcli.porcentaje, '%)'))) from cmcont cross join ocomcli on cmcont.id = ocomcli.cliente cross join ocom on ocomcli.operacioncomercial = ocom.id cross join rcom on ocom.id = rcom.operacioncomercial where ocom.estado != 'ANULADA' and rcom.unidadid = u.id and rcom.estado not in ('Inactiva')) as apellidosclientes, (select ocom.estado from ocom cross join rcom on ocom.id = rcom.operacioncomercial where rcom.unidadid = u.id and rcom.estado not in ('Inactiva','Anulada')) as estadoocom, (select group_concat(uf.denominacion) from rcom as r1 cross join ocom on r1.operacioncomercial = ocom.id cross join rcom as r2 on ocom.id = r2.operacioncomercial cross join Unidades as uf on r2.unidadId = uf.id where r1.unidadid = u.id and r1.estado not in ('Inactiva') and r2.estado not in ('Inactiva') and ocom.estado != 'ANULADA' and uf.tipou = 'D' ) as ufdenominacion, (select group_concat(u2.tipou, u2.departamento separator ',') from Unidades as u2 where u2.emprendimientoId = u.emprendimientoId and u2.uf = u.id) as complementariasasociadas, (select group_concat((select nombre from tipos where tipou = u2.tipou), ' ', u2.denominacion, if(ifnull(u2.observaciones,'')='', '', concat(' (', u2.observaciones, ')')) separator '
') from Unidades as u2 where u2.emprendimientoId = u.emprendimientoId and u2.uf = u.id) as complementariasasociadas2, (select u2.denominacion from Unidades as u2 where u2.emprendimientoId = u.emprendimientoId and u2.id = u.uf) as ufasociada, round((select sum(u2.precio) from Unidades as u2 where u2.emprendimientoId = u.emprendimientoId and u2.uf = u.id) * '1' / '1',0) as preciocomplementaria, (select sum(u2.superficiem2) from Unidades as u2 where u2.emprendimientoId = u.emprendimientoId and u2.uf = u.id) as superficiecomplementaria, (select sum(u2.porcentajeCosto) from Unidades as u2 where u2.emprendimientoId = u.emprendimientoId and u2.uf = u.id and tipou != 'D') as porcentajecomplementaria, (select id from formapago where emprendimiento = 'u.emprendimientoId' and principal = 'S' and (categoria = 'u.categoria' or categoria = '' or categoria is null) order by categoria limit 1) as idfp, (select denominacion from Unidades where id = u.uf) as unidadasociada from rect left outer join Unidades as u on rect.unidad = u.id where rect.plano = '755' and (''= '' or u.departamento in (-1)) union all select pol.unidad, 0 as x, 0 as y, 0 as w, 0 as h, pol.coordenadas, if(ifnull(pol.unidad,'')='', pol.link, if(u.status='RESERVADO', concat('../ventas/verventa.php?&proyecto=3&id=', (select operacioncomercial from rcom where estado = 'ACTIVA' and unidadId = pol.unidad)), /*concat('../emprendimientos/planos.php?proyecto=3&unidad=', pol.unidad)*/ concat('../reservas/unidadficha.php?proyecto=3&unidad=', pol.unidad) ) ) as link, if(ifnull(pol.unidad,'')='', '', if(u.status='RESERVADO', 'blank', 'popup' ) ) as linktarget, pol.transicion, (select archivo from planos where id = substring_index(pol.link, '=', -1)) as archivoplano, u.denominacion, u.codigo, replace(replace(u.denominacionua, '1ss', ''), '2ss', '') as denominacionua, u.tipounidad, u.torre, u.piso, u.departamento, u.superficieM2, baulera1M2, u.ancho as cocheraancho, u.largo as cocheralargo, round(u.precio * '1' / '1',0) as precio, u.porcentajeCosto as porcentaje, u.porcentajeequipamiento as porcentajeequipamiento, u.porcentajeexpensas as porcentajeexpensas, u.categoria, u.moneda, u.observaciones, u.status, (select nombre from estadounidad where estado = u.status) as status2, u.vencimiento as fvencimientoND, u.torres, u.tipou, u.ambientes, u.orientacion, (select group_concat(ifnull(razonsocial, ''), ' ', nombre, ' ', apellido, if(ocomcli.porcentaje=100,'', concat(' (', ocomcli.porcentaje, '%)')) separator '
') from cmcont cross join ocomcli on cmcont.id = ocomcli.cliente cross join ocom on ocomcli.operacioncomercial = ocom.id cross join rcom on ocom.id = rcom.operacioncomercial where ocom.estado != 'ANULADA' and rcom.unidadid = u.id and rcom.estado not in ('Inactiva')) as clientes, (select sum(ocomcli.porcentaje) from cmcont cross join ocomcli on cmcont.id = ocomcli.cliente cross join ocom on ocomcli.operacioncomercial = ocom.id cross join rcom on ocom.id = rcom.operacioncomercial where ocom.estado != 'ANULADA' and rcom.unidadid = u.id and rcom.estado not in ('Inactiva')) as participacion, (select group_concat(ifnull(razonsocial, ''), ' ', apellido, if(ocomcli.porcentaje=100,'', concat(' (', ocomcli.porcentaje, '%)'))) from cmcont cross join ocomcli on cmcont.id = ocomcli.cliente cross join ocom on ocomcli.operacioncomercial = ocom.id cross join rcom on ocom.id = rcom.operacioncomercial where ocom.estado != 'ANULADA' and rcom.unidadid = u.id and rcom.estado not in ('Inactiva')) as apellidosclientes, (select ocom.estado from ocom cross join rcom on ocom.id = rcom.operacioncomercial where rcom.unidadid = u.id and rcom.estado not in ('Inactiva','Anulada')) as estadoocom, (select group_concat(uf.denominacion) from rcom as r1 cross join ocom on r1.operacioncomercial = ocom.id cross join rcom as r2 on ocom.id = r2.operacioncomercial cross join Unidades as uf on r2.unidadId = uf.id where r1.unidadid = u.id and r1.estado not in ('Inactiva') and r2.estado not in ('Inactiva') and ocom.estado != 'ANULADA' and uf.tipou = 'D' ) as ufdenominacion, (select group_concat(u2.tipou, u2.departamento separator ',') from Unidades as u2 where u2.emprendimientoId = u.emprendimientoId and u2.uf = u.id) as complementariasasociadas, (select group_concat((select nombre from tipos where tipou = u2.tipou), ' ', u2.denominacion, if(ifnull(u2.observaciones,'')='', '', concat(' (', u2.observaciones, ')')) separator '
') from Unidades as u2 where u2.emprendimientoId = u.emprendimientoId and u2.uf = u.id) as complementariasasociadas2, (select u2.denominacion from Unidades as u2 where u2.emprendimientoId = u.emprendimientoId and u2.id = u.uf) as ufasociada, round((select sum(u2.precio) from Unidades as u2 where u2.emprendimientoId = u.emprendimientoId and u2.uf = u.id) * '1' / '1',0) as preciocomplementaria, (select sum(u2.superficiem2) from Unidades as u2 where u2.emprendimientoId = u.emprendimientoId and u2.uf = u.id) as superficiecomplementaria, (select sum(u2.porcentajeCosto) from Unidades as u2 where u2.emprendimientoId = u.emprendimientoId and u2.uf = u.id) as porcentajecomplementaria, (select id from formapago where emprendimiento = 'u.emprendimientoId' and principal = 'S' and (categoria = 'u.categoria' or categoria = '' or categoria is null) order by categoria limit 1) as idfp, (select denominacion from Unidades where id = u.uf) as unidadasociada from pol left outer join Unidades as u on pol.unidad = u.id where pol.plano = '755' and (''= '' or u.departamento in (-1))
select SQL_CALC_FOUND_ROWS Unidades.denominacion, rcart.precio, rcart.moneda, rcart.id as idcotiz from rcart cross join Unidades on rcart.unidadId = Unidades.id where rcart.cliente = ''
select id as idemprenda, nombre as titleemprenda, if(ifnull(foto1,'')='',concat('../images/235x225/', id, '.jpg'), concat('../files//emprendimientos/emprendimiento/', foto1)) as imageemprenda, 'panel panel-default' as classemprenda, concat('../emprendimientos/proyecto.php?proyecto=', id) as linkemprenda, (select count(*) from ocom where emprendimiento = Emprendimientos.id and estado not in ('ANULADA', 'BAJA', 'CANCELADA', 'INACTIVA')) as cantemprenda from Emprendimientos where estado in ('EN FUNCIONAMIENTO', 'EN OBRA', 'FINALIZADO', 'PLANEAMIENTO', 'LANZAMIENTO' ) and id in(-1) order by fechaInicioVentas desc limit 5
select id as idemprenda, nombre as titleemprenda, if(ifnull(foto1,'')='',concat('../images/235x225/', id, '.jpg'), concat('../files//emprendimientos/emprendimiento/', foto1)) as imageemprenda, 'panel panel-default' as classemprenda, concat('../emprendimientos/proyecto.php?proyecto=', id) as linkemprenda, (select count(*) from ocom where emprendimiento = Emprendimientos.id and estado not in ('ANULADA', 'BAJA', 'CANCELADA', 'INACTIVA')) as cantemprenda from Emprendimientos where estado in ('EN FUNCIONAMIENTO', 'EN OBRA', 'FINALIZADO', 'PLANEAMIENTO', 'LANZAMIENTO' ) and id in(-1) order by fechaInicioVentas desc limit 5
select nombre as text, concat('../emprendimientos/plano.php?proyecto=&id=', id) as link, if(''=planos.id,'activo', 'inactivo') as linkclass from planos where emprendimiento = '' and tipo = 'Vista' and activo = 's'
select nombre as text, concat('../emprendimientos/plano.php?proyecto=&id=', id) as link, if(''=planos.id,'activo', 'inactivo') as linkclass from planos where emprendimiento = '' and tipo = 'Planta'
select id, titulo, fechadia, actualizacion, fechaevento from cmactiv where tipo = 'T' and estado not in ('Finalizada', 'Aprobada', 'Anulada') and prioridad in ('Urgente', '!') and responsable = '' and (notificacion is null or notificacion < current_date())
select id as alerta_id, idobj as alerta_idobj, tipo as alerta_tipo, titulo as alerta_titulo, detalles as alerta_detalles, link as alerta_link, fecha as alerta_fecha from alertas where usuario = '' order by fecha desc
select id, titulo, fechadia, actualizacion, fechaevento from cmactiv where tipo = 'T' and estado not in ('Finalizada', 'Aprobada', 'Anulada') and prioridad in ('Urgente', '!') and responsable = '' and (notificacion is null or notificacion < current_date())
select id as alerta_id, idobj as alerta_idobj, tipo as alerta_tipo, titulo as alerta_titulo, detalles as alerta_detalles, link as alerta_link, fecha as alerta_fecha from alertas where usuario = '' order by fecha desc
select id, titulo, fechadia, actualizacion, fechaevento from cmactiv where tipo = 'T' and estado not in ('Finalizada', 'Aprobada', 'Anulada') and prioridad in ('Urgente', '!') and responsable = '' and (notificacion is null or notificacion < current_date())
select id as alerta_id, idobj as alerta_idobj, tipo as alerta_tipo, titulo as alerta_titulo, detalles as alerta_detalles, link as alerta_link, fecha as alerta_fecha from alertas where usuario = '' order by fecha desc