falta mirar en la base de datos si guardo el tipo de moneda

This commit is contained in:
2025-01-14 04:13:13 -03:00
parent 7565e21df8
commit 013744d129
15 changed files with 131 additions and 43 deletions
+11 -8
View File
@@ -15,22 +15,25 @@ public class NotificacionesController: ControllerBase {
var cli = RepositorioUsuarios.Singleton.ObtenerClientePorToken(Auth); var cli = RepositorioUsuarios.Singleton.ObtenerClientePorToken(Auth);
if (cli == null) return BadRequest(new {message = "Fallo al intentar encontrar tu usuario (puede que te hayas logeado desde otro dispositivo?)"}); if (cli == null) return BadRequest(new {message = "Fallo al intentar encontrar tu usuario (puede que te hayas logeado desde otro dispositivo?)"});
IQueryable<Notificacione> notificaciones = RepositorioNotificaciones.Singleton.ObtenerNotificacionesDeUsuario(cli.Dni) IQueryable<Notificacione> notificaciones = RepositorioNotificaciones.Singleton.ObtenerNotificacionesDeUsuario(cli.Dni)
.Where(x=>x.Leido == leido); .Where(x=>x.Leido == leido);
List<NotificacionDto> noti = new(); List<NotificacionDto> noti = new();
Parallel.ForEach(notificaciones, i => { foreach (Notificacione i in notificaciones) {
if(i.DniclienteNavigation == null || i.DniremitenteNavigation==null) return BadRequest(new { message = "Esta mal cargado el precontrato"});
var dto = new NotificacionDtoBuilder() var dto = new NotificacionDtoBuilder()
.SetRemitente(i.DniremitenteNavigation.Email) .SetRemitente(i.DniremitenteNavigation.Email??"")
.SetAccion(i.Accion) .SetAccion(i.Accion??"")
.SetMensaje(i.Mensaje) .SetMensaje(i.Mensaje??"")
.SetFecha(i.Fecha) .SetFecha(i.Fecha)
.SetPropiedad(i.IdpropiedadNavigation.Id.ToString()) .SetPropiedad(i.Idpropiedad.ToString()??"")
.SetReceptor(i.DniclienteNavigation.Email) .SetReceptor(i.DniclienteNavigation.Email??"")
.Build(); .Build();
noti.Add(dto); noti.Add(dto);
}); }
return Ok(noti); return Ok(noti);
} }
+7 -1
View File
@@ -43,7 +43,13 @@
<strong>Piso:</strong> {prop.piso || "N/A"}<br> <strong>Piso:</strong> {prop.piso || "N/A"}<br>
<strong>Letra:</strong> {prop.letra || "N/A"}<br> <strong>Letra:</strong> {prop.letra || "N/A"}<br>
<strong>Servicios:</strong> {prop.servicios || "Sin servicios especificados"}<br> <strong>Servicios:</strong> {prop.servicios || "Sin servicios especificados"}<br>
<strong>Monto:</strong> ${prop.monto}<br> <strong>Monto:</strong>
{#if prop.iddivisa == 0}
AR$
{:else}
US$
{/if}
{prop.monto}<br>
<strong>Estado:</strong> {prop.estado}<br> <strong>Estado:</strong> {prop.estado}<br>
</p> </p>
{#if prop.estado == "Disponible"} {#if prop.estado == "Disponible"}
@@ -68,7 +68,13 @@
<strong>Piso:</strong> {prop.piso || "N/A"}<br> <strong>Piso:</strong> {prop.piso || "N/A"}<br>
<strong>Letra:</strong> {prop.letra || "N/A"}<br> <strong>Letra:</strong> {prop.letra || "N/A"}<br>
<strong>Servicios:</strong> {prop.servicios || "Sin servicios especificados"}<br> <strong>Servicios:</strong> {prop.servicios || "Sin servicios especificados"}<br>
<strong>Monto:</strong> ${prop.monto}<br> <strong>Monto:</strong>
{#if prop.iddivisa == 0}
AR$
{:else}
US$
{/if}
{prop.monto}<br>
</p> </p>
<button class="btn btn-primary" onclick={Consultar}>Alquilar</button> <button class="btn btn-primary" onclick={Consultar}>Alquilar</button>
</div> </div>
+11 -4
View File
@@ -3,7 +3,7 @@
import ModalEstatico from "./ModalEstatico.svelte"; import ModalEstatico from "./ModalEstatico.svelte";
import ModificarPropiedadForm from "./modificarPropiedadForm.svelte"; import ModificarPropiedadForm from "./modificarPropiedadForm.svelte";
let { id, ubicacion, tipo, letra, piso,canthabitaciones, servicios, btnbaja = "Baja", monto } = $props(); let { id, ubicacion, tipo, letra, piso,canthabitaciones, servicios, btnbaja = "Baja", monto, iddivisa = 0 } = $props();
import { urlG } from "../stores/urlStore"; import { urlG } from "../stores/urlStore";
@@ -45,10 +45,17 @@
<td>{piso}</td> <td>{piso}</td>
<td>{tipo}</td> <td>{tipo}</td>
<td>{servicios}</td> <td>{servicios}</td>
<td>
{#if iddivisa == 0}
AR$
{:else}
US$
{/if}
</td>
<td>{monto}</td> <td>{monto}</td>
<td class="text-end"> <td class="text-end">
<button class="btn btn-outline-secondary" onclick={()=> setmod()}>Modificar</button> <button class="btn btn-outline-secondary btn-sm" onclick={()=> setmod()}>Modificar</button>
<button class="btn btn-outline-danger" onclick={() => BajaPropiedad()}>{btnbaja}</button> <button class="btn btn-outline-danger btn-sm" onclick={() => BajaPropiedad()}>{btnbaja}</button>
</td> </td>
</tr> </tr>
{#if modal} {#if modal}
@@ -57,7 +64,7 @@
{#if modificar} {#if modificar}
<tr transition:fade={{duration:100}}> <tr transition:fade={{duration:100}}>
<td colspan="8"> <td colspan="8">
<ModificarPropiedadForm {id} {ubicacion} {canthabitaciones} {letra} {piso} {tipo} {servicios} {monto}/> <ModificarPropiedadForm {id} {ubicacion} {canthabitaciones} {letra} {piso} {tipo} {servicios} {monto} {iddivisa}/>
</td> </td>
</tr> </tr>
{/if} {/if}
@@ -2,7 +2,7 @@
import { urlG } from "../stores/urlStore"; import { urlG } from "../stores/urlStore";
import { onMount } from "svelte"; import { onMount } from "svelte";
let { canthabitaciones, id, letra, piso, tipo, ubicacion, servicios, monto } = $props(); let { canthabitaciones, id, letra, piso, tipo, ubicacion, servicios, monto, iddivisa} = $props();
let serviciosSeleccionados: string[] = $state([]); let serviciosSeleccionados: string[] = $state([]);
const serviciosDisponibles = ["Gas", "Internet", "Telefono", "Luz"]; const serviciosDisponibles = ["Gas", "Internet", "Telefono", "Luz"];
@@ -53,7 +53,8 @@
ubicacion, ubicacion,
email, email,
servicios: serviciosSeleccionados, servicios: serviciosSeleccionados,
monto monto,
iddivisa
}), }),
}); });
if (response.ok) { if (response.ok) {
@@ -151,6 +152,29 @@
<label for="idtipopropiedad">Tipo de propiedad</label> <label for="idtipopropiedad">Tipo de propiedad</label>
</div> </div>
<div class="form-floating mb-3">
<h6 class="form-floating form-label">Moneda</h6>
<div class="form-check">
<input
type="radio"
class="form-check-input"
bind:group={iddivisa}
value={0}
id="moneda-ar"
/>
<label class="form-check-label" for="moneda-ar">AR$</label>
</div>
<div class="form-check">
<input
type="radio"
class="form-check-input"
bind:group={iddivisa}
value={1}
id="moneda-us"
/>
<label class="form-check-label" for="moneda-us">US$</label>
</div>
</div>
<div class="mb-3"> <div class="mb-3">
<h6 class="form-floating form-label">Servicios</h6> <h6 class="form-floating form-label">Servicios</h6>
{#each serviciosDisponibles as servicio} {#each serviciosDisponibles as servicio}
@@ -7,10 +7,16 @@ import NavBarAutocompletable from "../Componentes/NavBarAutocompletable.svelte";
<NavBarAutocompletable/> <NavBarAutocompletable/>
<div class="container"> <div class="container-fluid">
<BarraHorizontalConTexto text="Control Alquileres" /> <BarraHorizontalConTexto text="Control Alquileres" />
<div class="row" > <div class="row g-3">
<div class="col-md-6"><!--a-->
<div class="card">
<div class="card-body">
<p>a</p>
</div>
</div>
</div>
</div> </div>
</div> </div>
+4 -1
View File
@@ -52,13 +52,16 @@
<th>Piso</th> <th>Piso</th>
<th>Tipo</th> <th>Tipo</th>
<th>Servicios</th> <th>Servicios</th>
<th>Divisa</th>
<th>Monto</th> <th>Monto</th>
<th></th> <th></th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
{#each $propiedades as propiedad} {#each $propiedades as propiedad}
<RowPropiedad id={propiedad.id} ubicacion={propiedad.ubicacion} letra={propiedad.letra} piso={propiedad.piso} tipo={propiedad.tipo} canthabitaciones={propiedad.canthabitaciones} servicios={propiedad.servicios} monto={propiedad.monto} /> <RowPropiedad id={propiedad.id} ubicacion={propiedad.ubicacion} letra={propiedad.letra} piso={propiedad.piso} tipo={propiedad.tipo}
canthabitaciones={propiedad.canthabitaciones} servicios={propiedad.servicios} monto={propiedad.monto}
iddivisa={propiedad.iddivisa}/>
{/each} {/each}
</tbody> </tbody>
</table> </table>
@@ -53,13 +53,14 @@
<th>Piso</th> <th>Piso</th>
<th>Tipo</th> <th>Tipo</th>
<th>Servicios</th> <th>Servicios</th>
<th>Divisa</th>
<th>Monto</th> <th>Monto</th>
<th></th> <th></th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
{#each $propiedades as propiedad} {#each $propiedades as propiedad}
<RowPropiedad id={propiedad.id} ubicacion={propiedad.ubicacion} letra={propiedad.letra} piso={propiedad.piso} tipo={propiedad.tipo} canthabitaciones={propiedad.canthabitaciones} servicios={propiedad.servicios} btnbaja={"Alta"} monto={propiedad.monto}/> <RowPropiedad id={propiedad.id} ubicacion={propiedad.ubicacion} letra={propiedad.letra} piso={propiedad.piso} tipo={propiedad.tipo} canthabitaciones={propiedad.canthabitaciones} servicios={propiedad.servicios} btnbaja={"Alta"} monto={propiedad.monto} iddivisa={propiedad.iddivisa}/>
{/each} {/each}
</tbody> </tbody>
</table> </table>
+4 -4
View File
@@ -170,7 +170,7 @@
cantidadGarantes: data.cantGarantes, cantidadGarantes: data.cantGarantes,
idPropiedad: Selmens.propiedad, idPropiedad: Selmens.propiedad,
fechaprimernotificacion: fecha, fechaprimernotificacion: fecha,
emailInquilino: localStorage.getItem("email"), emailInquilino: Selmens.remitente,
emailPropietario: Selmens.receptor, emailPropietario: Selmens.receptor,
}; };
@@ -459,7 +459,7 @@
<tbody> <tbody>
{#if mensajes.length <= 0} {#if mensajes.length <= 0}
<tr> <tr>
<td colspan={mostrarleidos == false ? 6 : 5}> <td colspan={mostrarleidos == false ? 7 : 6}>
<p>No hay Mensajes para leer</p> <p>No hay Mensajes para leer</p>
</td> </td>
</tr> </tr>
@@ -481,8 +481,8 @@
Expandir Expandir
</button> </button>
{/if} {/if}
{#if men.accion === "ContratoCancelado" || men.accion === "Rechazo Contrato" || {#if (men.accion === "ContratoCancelado" || men.accion === "Rechazo Contrato" ||
men.accion === "Aceptado Contrato"} men.accion === "Aceptado Contrato") && mostrarleidos == false}
<button <button
class="btn btn-outline-danger" class="btn btn-outline-danger"
onclick={() => marcarleido(men.fecha, localStorage.getItem("email")|| "", men)}> onclick={() => marcarleido(men.fecha, localStorage.getItem("email")|| "", men)}>
+28 -2
View File
@@ -5,15 +5,16 @@
import type { Propiedad } from "../types"; import type { Propiedad } from "../types";
import { urlG } from "../stores/urlStore"; import { urlG } from "../stores/urlStore";
let propiedad: Propiedad = { let propiedad = $state({
ubicacion: "", ubicacion: "",
canthabitaciones: 1, canthabitaciones: 1,
piso: 0, piso: 0,
letra: "", letra: "",
email: localStorage.getItem("email") || "", email: localStorage.getItem("email") || "",
idtipropiedad: 1, idtipropiedad: 1,
iddivisa:0,
monto: 1, monto: 1,
}; });
let token = sessionStorage.getItem("token"); let token = sessionStorage.getItem("token");
let mostrarModal = $state(false); let mostrarModal = $state(false);
@@ -116,6 +117,31 @@
/> />
<label for="letra">Letra</label> <label for="letra">Letra</label>
</div> </div>
<div class="form-floating mb-3">
<h6 class="form-floating form-label">Moneda</h6>
<div class="form-check">
<input
type="radio"
class="form-check-input"
bind:group={propiedad.iddivisa}
value={0}
id="moneda-ar"
/>
<label class="form-check-label" for="moneda-ar">AR$</label>
</div>
<div class="form-check">
<input
type="radio"
class="form-check-input"
bind:group={propiedad.iddivisa}
value={1}
id="moneda-us"
/>
<label class="form-check-label" for="moneda-us">US$</label>
</div>
</div>
<div class="form-floating mb-3"> <div class="form-floating mb-3">
<select <select
id="idtipropiedad" id="idtipropiedad"
+1 -1
View File
@@ -27,7 +27,7 @@ export type PropiedadAdmin = {
servicios: string, servicios: string,
monto: number, monto: number,
estado: string, estado: string,
iddvisa: number iddivisa: number
} }
export type Permiso = { export type Permiso = {
id: number; id: number;
+1
View File
@@ -22,6 +22,7 @@ public class RepositorioContratos: RepositorioBase<RepositorioContratos> {
if (prop == null) return false; if (prop == null) return false;
prop.Idestado = 2; prop.Idestado = 2;
c.Iddivisa = prop.Iddivisa;
c.Id = (con.Contratos.Any() ? con.Contratos.Max(x => x.Id) : 0) + 1; c.Id = (con.Contratos.Any() ? con.Contratos.Max(x => x.Id) : 0) + 1;
c.Monto = prop.Monto; c.Monto = prop.Monto;
+2 -1
View File
@@ -32,6 +32,7 @@ public class RepositorioNotificaciones : RepositorioBase<RepositorioNotificacion
var notis = con.Notificaciones var notis = con.Notificaciones
.Include(x=>x.IdpropiedadNavigation) .Include(x=>x.IdpropiedadNavigation)
.Include(x=>x.DniclienteNavigation)
.Include(x=>x.DniremitenteNavigation) .Include(x=>x.DniremitenteNavigation)
.Where(x => x.Dnicliente == dni); .Where(x => x.Dnicliente == dni);
return notis; return notis;
@@ -39,7 +40,7 @@ public class RepositorioNotificaciones : RepositorioBase<RepositorioNotificacion
public bool HayNotis(long dni) { public bool HayNotis(long dni) {
var con = Context; var con = Context;
bool hay = con.Notificaciones.Where(x=>x.Leido == false).Any(); bool hay = con.Notificaciones.Where(x=>x.Leido == false && x.Dnicliente == dni).Any();
return hay; return hay;
} }
} }
+12 -12
View File
@@ -14,7 +14,7 @@ public class RepositorioPropiedades: RepositorioBase<RepositorioPropiedades> {
FormattableString sqlq = $""" FormattableString sqlq = $"""
SELECT DISTINCT p.id, p.ubicacion, p.canthabitaciones, p.piso, p.letra, tp.descripcion AS Tipo, SELECT DISTINCT p.id, p.ubicacion, p.canthabitaciones, p.piso, p.letra, tp.descripcion AS Tipo,
GROUP_CONCAT(DISTINCT s.descripcion SEPARATOR ', ') AS Servicios, p.monto as Monto, GROUP_CONCAT(DISTINCT s.descripcion SEPARATOR ', ') AS Servicios, p.monto as Monto,
p.iddivisa as Idivisa p.iddivisa as Iddivisa
FROM Propiedades p FROM Propiedades p
JOIN EstadoPropiedad ep ON p.idestado = 1 JOIN EstadoPropiedad ep ON p.idestado = 1
JOIN TipoPropiedad tp ON p.idtipropiedad = tp.id JOIN TipoPropiedad tp ON p.idtipropiedad = tp.id
@@ -82,7 +82,7 @@ public class RepositorioPropiedades: RepositorioBase<RepositorioPropiedades> {
propi.Piso = prop.Piso; propi.Piso = prop.Piso;
propi.Letra = prop.Letra; propi.Letra = prop.Letra;
propi.Monto = prop.Monto; propi.Monto = prop.Monto;
prop.Iddivisa = prop.Iddivisa; propi.Iddivisa = prop.Iddivisa;
propi.IdServicios.Clear(); propi.IdServicios.Clear();
foreach(Servicio ser in prop.IdServicios) { foreach(Servicio ser in prop.IdServicios) {
@@ -97,7 +97,7 @@ public class RepositorioPropiedades: RepositorioBase<RepositorioPropiedades> {
public IQueryable<PropiedadesDto> ObtenerPropiedadesPorEmail(string email) { public IQueryable<PropiedadesDto> ObtenerPropiedadesPorEmail(string email) {
FormattableString sqlq = $""" FormattableString sqlq = $"""
SELECT p.id, p.ubicacion as Ubicacion, p.canthabitaciones, p.piso, p.letra, tp.descripcion as Tipo, GROUP_CONCAT(IFNULL(s.descripcion, '') SEPARATOR ', ') AS Servicios, p.monto as Monto, SELECT p.id, p.ubicacion as Ubicacion, p.canthabitaciones, p.piso, p.letra, tp.descripcion as Tipo, GROUP_CONCAT(IFNULL(s.descripcion, '') SEPARATOR ', ') AS Servicios, p.monto as Monto,
p.iddivisa as Idivisa p.iddivisa as Iddivisa
FROM Propiedades p FROM Propiedades p
JOIN Clientes c ON c.dni = p.dnipropietario JOIN Clientes c ON c.dni = p.dnipropietario
JOIN TipoPropiedad tp ON tp.id = p.idtipropiedad JOIN TipoPropiedad tp ON tp.id = p.idtipropiedad
@@ -114,7 +114,7 @@ public class RepositorioPropiedades: RepositorioBase<RepositorioPropiedades> {
public IQueryable<PropiedadesDto> ObtenerPropiedadesDeBajaPorEmail(string email) { public IQueryable<PropiedadesDto> ObtenerPropiedadesDeBajaPorEmail(string email) {
FormattableString sqlq = $""" FormattableString sqlq = $"""
SELECT p.id, p.ubicacion as Ubicacion, p.canthabitaciones, p.piso, p.letra, tp.descripcion as Tipo, GROUP_CONCAT(IFNULL(s.descripcion, '') SEPARATOR ', ') AS Servicios, p.monto as Monto, SELECT p.id, p.ubicacion as Ubicacion, p.canthabitaciones, p.piso, p.letra, tp.descripcion as Tipo, GROUP_CONCAT(IFNULL(s.descripcion, '') SEPARATOR ', ') AS Servicios, p.monto as Monto,
p.iddivisa as Idivisa p.iddivisa as Iddivisa
FROM Propiedades p FROM Propiedades p
JOIN Clientes c ON c.dni = p.dnipropietario JOIN Clientes c ON c.dni = p.dnipropietario
JOIN TipoPropiedad tp ON tp.id = p.idtipropiedad JOIN TipoPropiedad tp ON tp.id = p.idtipropiedad
@@ -195,7 +195,7 @@ public class RepositorioPropiedades: RepositorioBase<RepositorioPropiedades> {
FormattableString sqlq = $""" FormattableString sqlq = $"""
SELECT DISTINCT p.id, p.ubicacion, p.canthabitaciones, p.piso, p.letra, tp.descripcion AS Tipo, SELECT DISTINCT p.id, p.ubicacion, p.canthabitaciones, p.piso, p.letra, tp.descripcion AS Tipo,
GROUP_CONCAT(DISTINCT s.descripcion SEPARATOR ', ') AS Servicios, p.monto as Monto, GROUP_CONCAT(DISTINCT s.descripcion SEPARATOR ', ') AS Servicios, p.monto as Monto,
p.iddivisa as Idivisa p.iddivisa as Iddivisa
FROM Propiedades p FROM Propiedades p
JOIN EstadoPropiedad ep ON p.idestado = 1 JOIN EstadoPropiedad ep ON p.idestado = 1
JOIN TipoPropiedad tp ON p.idtipropiedad = tp.id JOIN TipoPropiedad tp ON p.idtipropiedad = tp.id
@@ -220,7 +220,7 @@ public class RepositorioPropiedades: RepositorioBase<RepositorioPropiedades> {
FormattableString sqlq = $""" FormattableString sqlq = $"""
SELECT DISTINCT p.id, p.ubicacion, p.canthabitaciones, p.piso, p.letra, tp.descripcion AS Tipo, SELECT DISTINCT p.id, p.ubicacion, p.canthabitaciones, p.piso, p.letra, tp.descripcion AS Tipo,
GROUP_CONCAT(DISTINCT s.descripcion SEPARATOR ', ') AS Servicios, p.monto as Monto, GROUP_CONCAT(DISTINCT s.descripcion SEPARATOR ', ') AS Servicios, p.monto as Monto,
p.iddivisa as Idivisa p.iddivisa as Iddivisa
FROM Propiedades p FROM Propiedades p
JOIN EstadoPropiedad ep ON p.idestado = 1 JOIN EstadoPropiedad ep ON p.idestado = 1
JOIN TipoPropiedad tp ON p.idtipropiedad = tp.id JOIN TipoPropiedad tp ON p.idtipropiedad = tp.id
@@ -240,7 +240,7 @@ public class RepositorioPropiedades: RepositorioBase<RepositorioPropiedades> {
FormattableString sqlq = $""" FormattableString sqlq = $"""
SELECT DISTINCT p.id, p.ubicacion, p.canthabitaciones, p.piso, p.letra, tp.descripcion AS Tipo, SELECT DISTINCT p.id, p.ubicacion, p.canthabitaciones, p.piso, p.letra, tp.descripcion AS Tipo,
GROUP_CONCAT(DISTINCT s.descripcion SEPARATOR ', ') AS Servicios, p.monto as Monto, GROUP_CONCAT(DISTINCT s.descripcion SEPARATOR ', ') AS Servicios, p.monto as Monto,
p.iddivisa as Idivisa p.iddivisa as Iddivisa
FROM Propiedades p FROM Propiedades p
JOIN EstadoPropiedad ep ON p.idestado = 1 JOIN EstadoPropiedad ep ON p.idestado = 1
JOIN TipoPropiedad tp ON p.idtipropiedad = tp.id JOIN TipoPropiedad tp ON p.idtipropiedad = tp.id
@@ -264,7 +264,7 @@ public class RepositorioPropiedades: RepositorioBase<RepositorioPropiedades> {
FormattableString sqlq = $""" FormattableString sqlq = $"""
SELECT DISTINCT p.id, p.ubicacion, p.canthabitaciones, p.piso, p.letra, tp.descripcion AS Tipo, SELECT DISTINCT p.id, p.ubicacion, p.canthabitaciones, p.piso, p.letra, tp.descripcion AS Tipo,
GROUP_CONCAT(DISTINCT s.descripcion SEPARATOR ', ') AS Servicios, p.monto as Monto, GROUP_CONCAT(DISTINCT s.descripcion SEPARATOR ', ') AS Servicios, p.monto as Monto,
p.iddivisa as Idivisa p.iddivisa as Iddivisa
FROM Propiedades p FROM Propiedades p
JOIN EstadoPropiedad ep ON p.idestado = 1 JOIN EstadoPropiedad ep ON p.idestado = 1
JOIN TipoPropiedad tp ON p.idtipropiedad = tp.id JOIN TipoPropiedad tp ON p.idtipropiedad = tp.id
@@ -282,7 +282,7 @@ public class RepositorioPropiedades: RepositorioBase<RepositorioPropiedades> {
FormattableString sqlq = $""" FormattableString sqlq = $"""
SELECT DISTINCT p.id, p.ubicacion, p.canthabitaciones, p.piso, p.letra, tp.descripcion AS Tipo, SELECT DISTINCT p.id, p.ubicacion, p.canthabitaciones, p.piso, p.letra, tp.descripcion AS Tipo,
GROUP_CONCAT(DISTINCT s.descripcion SEPARATOR ', ') AS Servicios, p.monto as Monto, GROUP_CONCAT(DISTINCT s.descripcion SEPARATOR ', ') AS Servicios, p.monto as Monto,
p.iddivisa as Idivisa p.iddivisa as Iddivisa
FROM Propiedades p FROM Propiedades p
JOIN EstadoPropiedad ep ON p.idestado = 1 JOIN EstadoPropiedad ep ON p.idestado = 1
JOIN TipoPropiedad tp ON p.idtipropiedad = tp.id JOIN TipoPropiedad tp ON p.idtipropiedad = tp.id
@@ -301,7 +301,7 @@ public class RepositorioPropiedades: RepositorioBase<RepositorioPropiedades> {
FormattableString sqlq = $""" FormattableString sqlq = $"""
SELECT DISTINCT p.id, p.ubicacion, p.canthabitaciones, p.piso, p.letra, tp.descripcion AS Tipo, SELECT DISTINCT p.id, p.ubicacion, p.canthabitaciones, p.piso, p.letra, tp.descripcion AS Tipo,
GROUP_CONCAT(DISTINCT s.descripcion SEPARATOR ', ') AS Servicios, p.monto as Monto, GROUP_CONCAT(DISTINCT s.descripcion SEPARATOR ', ') AS Servicios, p.monto as Monto,
p.iddivisa as Idivisa p.iddivisa as Iddivisa
FROM Propiedades p FROM Propiedades p
JOIN EstadoPropiedad ep ON p.idestado = 1 JOIN EstadoPropiedad ep ON p.idestado = 1
JOIN TipoPropiedad tp ON p.idtipropiedad = tp.id JOIN TipoPropiedad tp ON p.idtipropiedad = tp.id
@@ -327,7 +327,7 @@ public class RepositorioPropiedades: RepositorioBase<RepositorioPropiedades> {
FormattableString sqlq = $""" FormattableString sqlq = $"""
SELECT DISTINCT p.id, p.ubicacion, p.canthabitaciones, p.piso, p.letra, tp.descripcion AS Tipo, SELECT DISTINCT p.id, p.ubicacion, p.canthabitaciones, p.piso, p.letra, tp.descripcion AS Tipo,
GROUP_CONCAT(DISTINCT s.descripcion SEPARATOR ', ') AS Servicios, p.monto as Monto, GROUP_CONCAT(DISTINCT s.descripcion SEPARATOR ', ') AS Servicios, p.monto as Monto,
p.iddivisa as Idivisa p.iddivisa as Iddivisa
FROM Propiedades p FROM Propiedades p
JOIN EstadoPropiedad ep ON p.idestado = 1 JOIN EstadoPropiedad ep ON p.idestado = 1
JOIN TipoPropiedad tp ON p.idtipropiedad = tp.id JOIN TipoPropiedad tp ON p.idtipropiedad = tp.id
@@ -365,7 +365,7 @@ public class RepositorioPropiedades: RepositorioBase<RepositorioPropiedades> {
FormattableString sqlq = $""" FormattableString sqlq = $"""
SELECT DISTINCT p.id, p.ubicacion, p.canthabitaciones, p.piso, p.letra, tp.descripcion AS Tipo, SELECT DISTINCT p.id, p.ubicacion, p.canthabitaciones, p.piso, p.letra, tp.descripcion AS Tipo,
GROUP_CONCAT(DISTINCT s.descripcion SEPARATOR ', ') AS Servicios, p.monto as Monto, GROUP_CONCAT(DISTINCT s.descripcion SEPARATOR ', ') AS Servicios, p.monto as Monto,
p.iddivisa as Idivisa p.iddivisa as Iddivisa
FROM Propiedades p FROM Propiedades p
JOIN EstadoPropiedad ep ON p.idestado = 1 JOIN EstadoPropiedad ep ON p.idestado = 1
JOIN TipoPropiedad tp ON p.idtipropiedad = tp.id JOIN TipoPropiedad tp ON p.idtipropiedad = tp.id
+4
View File
@@ -165,6 +165,10 @@ public class RepositorioUsuarios: RepositorioBase<RepositorioUsuarios> {
cli.Habilitado = 0; cli.Habilitado = 0;
} }
if (cli.Idgrupos.Any()){
}
return Guardar(con); return Guardar(con);
} }