diff --git a/Compras/Proveedores.aspx.vb b/Compras/Proveedores.aspx.vb
index 324247962..285232dd5 100644
--- a/Compras/Proveedores.aspx.vb
+++ b/Compras/Proveedores.aspx.vb
@@ -1309,7 +1309,7 @@ Partial Class Compras_Proveedores
e.Row.FCHyperLink("HplCheque").Visible = True
HLSendMail.Visible = True
- HLSendMail.HRef = String.Format("javascript:$get('HdnCveIE').value='{0}';$get('HdnSerieFolio').value='{1}';$get('HdnFolioPago').value='{2}';$get('TxtParaMail').value='{3}';$('#ModalDivMail').modal();", e.Row.DBCampo("CveIE"), e.Row.DBCampo("SerieFolio"), e.Row.DBCampo("FolioPago"), TxtCorreoCobranza.Text)
+ HLSendMail.HRef = String.Format("javascript:$get('HdnCveIE').value='{0}';$get('HdnSerieFolio').value='{1}';$get('HdnFolioPago').value='{2}';$get('TxtParaMail').value='{3}';$('#ModalDivMail').modal();void(0);", e.Row.DBCampo("CveIE"), e.Row.DBCampo("SerieFolio"), e.Row.DBCampo("FolioPago"), TxtCorreoCobranza.Text)
If ObjCompra.GetCompraComplementoPago(-1, UsuarioActual.CveEmpresa, e.Row.DBCampo("CveIE").ToString.ToEntero) Then
If ObjCompra.DtResultados.Rows.Count > 0 Then
diff --git a/Inicio.aspx b/Inicio.aspx
index 86120a1e5..b67998ec2 100644
--- a/Inicio.aspx
+++ b/Inicio.aspx
@@ -1453,7 +1453,7 @@
-
+
diff --git a/Inventarios/EntregaAlmacen.aspx.vb b/Inventarios/EntregaAlmacen.aspx.vb
index d6bd61c1d..d1ff5c083 100644
--- a/Inventarios/EntregaAlmacen.aspx.vb
+++ b/Inventarios/EntregaAlmacen.aspx.vb
@@ -1204,8 +1204,8 @@ Partial Class Inventarios_EntregaAlmacen
End If
Else
e.Row.FCTextBox("TxtLote").Visible = False
- End If
-
+ End If
+
e.Row.FCButton("BtnDividir").Attributes.Add("onclick", String.Format("Dividir('{0}');", e.Row.FCTextBox("TxtDividir").ClientID))
e.Row.FCButton("BtnDividir").CommandArgument = e.Row.RowIndex.ToString()
e.Row.FCTextBox("TxtDividir").Attributes.Add("onkeyup", String.Format("LimitaCantidad({0},this,'{1}');", e.Row.DBCampo("CantidadF"), e.Row.FCButton("BtnDividir").ClientID))
@@ -1249,7 +1249,11 @@ Partial Class Inventarios_EntregaAlmacen
If Boolean.Parse(e.Row.DataKey("AplicaLote")) Or Boolean.Parse(e.Row.DataKey("AplicaCaducidad")) Then
- CargarCaducidadProducto(e.Row.DataKey("CvePS").ToEntero, e.Row.FCDropDownList("DdlCaducidadProducto"))
+ Dim ValorAsignado As String = ""
+ If GvDatos.Columns(8).Visible AndAlso EsDevolucionVenta = 1 Then
+ ValorAsignado = $"{e.Row.DBCampo("Lote").ToString}|{e.Row.DBCampo("FechaCaducidad").ToDate.ToString("dd/MM/yyyy")}"
+ End If
+ CargarCaducidadProducto(e.Row.DataKey("CvePS").ToEntero, e.Row.FCDropDownList("DdlCaducidadProducto"), ValorAsignado)
End If
@@ -1282,7 +1286,7 @@ Partial Class Inventarios_EntregaAlmacen
End Sub
- Private Sub CargarCaducidadProducto(CvePS As Integer, ByRef DdlLoteFechaCaducidad As DropDownList)
+ Private Sub CargarCaducidadProducto(CvePS As Integer, ByRef DdlLoteFechaCaducidad As DropDownList, ValorAsignado As String)
Dim almacenes As String = DdlAlmacen.SelectedValue
If almacenes = "" Then
@@ -1300,6 +1304,10 @@ Partial Class Inventarios_EntregaAlmacen
End If
ObjInventarios.Dispose()
+ If Not String.IsNullOrEmpty(ValorAsignado) Then
+ DdlLoteFechaCaducidad.SelectedValueExist(ValorAsignado)
+ End If
+
End Sub
Private Sub CargaDocumentos(tCveVenta As Integer)
diff --git a/OS/Asignaciones.aspx.vb b/OS/Asignaciones.aspx.vb
index 856c54818..8455c82d4 100644
--- a/OS/Asignaciones.aspx.vb
+++ b/OS/Asignaciones.aspx.vb
@@ -268,13 +268,15 @@ Partial Class OS_Asignaciones
TieneError = True
End If
+ Dim OIDescripcion As String = ""
+
If Not TieneError Then
Dim RecurrenciaTipo As Integer = 0, Frecuencia As Integer = -1, DiasSemana As String = "-1", Dias As Integer = -1, Mes As Integer = -1, RecurrenciaFin As String = "-1"
Dim Fecha As DateTime = time
- Dim OIDescripcion As String = $"{DdlTecnico.SelectedItem.Text} Orden de servicio {row.DataKey("Folio")} "
+ OIDescripcion = $"Orden de servicio {row.DataKey("Folio")} "
- If Not ObjEventos.AddEventoAgenda(2, DdlTecnico.SelectedItem.Text, OIDescripcion, 2, time, time.AddHours(1), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa,
+ If Not ObjEventos.AddEventoAgenda(2, DdlTecnico.SelectedItem.Text, $"{DdlTecnico.SelectedItem.Text} {OIDescripcion}", 2, time, time.AddHours(1), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa,
RecurrenciaTipo:=RecurrenciaTipo, Frecuencia:=Frecuencia, DiasSemana:=DiasSemana, Dia:=Dias, Mes:=Mes, RecurrenciaFin:=RecurrenciaFin, CveTipoEvento:=2,
Importe:=0, CveOS:=row.DataKey("CveOS").ToEntero, CveSubProyecto:=row.DataKey("CveSubProyecto").ToEntero) Then
TieneError = True
@@ -283,7 +285,7 @@ Partial Class OS_Asignaciones
End If
If Not TieneError Then
- If Not AgendarCirugia(ObjEventos, row.DataKey("CveOS").ToEntero, time, DdlTecnico.SelectedValue.ToEntero(), row.DataKey("Medico"), row.DataKey("Procedimiento"), row.DataKey("Nombre")) Then
+ If Not AgendarCirugia(ObjEventos, row.DataKey("CveOS").ToEntero, time, DdlTecnico.SelectedValue.ToEntero(), row.DataKey("Medico"), row.DataKey("Procedimiento"), row.DataKey("Nombre"), OIDescripcion) Then
TieneError = True
End If
End If
@@ -326,17 +328,16 @@ Partial Class OS_Asignaciones
UpOS.Update()
End Sub
- Protected Function AgendarCirugia(ByRef ObjEventos As ClsOIEventos, CveOS As Integer, FechaCirugia As DateTime, CveUsuarioAgendar As Integer, Medico As String, Procedimiento As String, Hospital As String) As Boolean
+ Protected Function AgendarCirugia(ByRef ObjEventos As ClsOIEventos, CveOS As Integer, FechaCirugia As DateTime, CveUsuarioAgendar As Integer, Medico As String, Procedimiento As String, Hospital As String, OIDescripcion As String) As Boolean
Dim TieneError As Boolean = False
Try
If FechaCirugia > MinFecha Then
If CveUsuarioAgendar > 0 Then
- Dim Asunto As String = "Cirugía"
Dim Descripcion As New StringBuilder
- Descripcion.AppendFormat("Dr {0} {1}", Hospital, " ")
+ Descripcion.AppendFormat("Dr {0} {1}", Medico, " ")
Descripcion.AppendFormat("Cirugía {0} {1}", Procedimiento, " ")
@@ -344,6 +345,10 @@ Partial Class OS_Asignaciones
Descripcion.AppendFormat("{0} {1}", Hospital, " ")
+ Descripcion.AppendFormat("{0} {1}", OIDescripcion, " ")
+
+ Dim Asunto As String = $"Cirugía - {Hospital}"
+
If Not ObjEventos.AddEventoAgenda(4, Asunto, Descripcion.ToString(), 3, FechaCirugia, FechaCirugia, CveUsuarioAgendar, UsuarioActual.CveEmpresa, RecurrenciaTipo:=0, CveTipoEvento:=2, CveOS:=CveOS) Then
TieneError = True
End If
diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb
index 1a2e21d5c..fc3d6fe64 100644
--- a/Ventas/Ventas.aspx.vb
+++ b/Ventas/Ventas.aspx.vb
@@ -1002,6 +1002,14 @@ Partial Class Ventas
ViewState("CveOSVentaMedica") = value
End Set
End Property
+ Private Property FolioOSVentaMedica As Integer
+ Get
+ Return IfNull(ViewState("FolioOSVentaMedica"), "0").ToString().ToEntero()
+ End Get
+ Set(value As Integer)
+ ViewState("FolioOSVentaMedica") = value
+ End Set
+ End Property
Private ReadOnly Property SaldoVenta As Decimal
Get
Return If(IsNothing(ViewState("SaldoVenta")), 0, ViewState("SaldoVenta").ToString().ToDecimal)
@@ -5132,15 +5140,17 @@ Partial Class Ventas
End If
DiasCredito = DbRowVenta("DiasCredito").ToString().ToEntero()
EsDiasCreditoFijo = CBool(DbRowVenta("EsDiasCreditoFijo").ToString())
- If UsuarioActual.Empresa.Funcionalidad(109) = "1" Then
- Dim TienePermiso As String = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, -1).FiltroPrimeroValor("CveSubProyecto", String.Format("CveSubProyecto = {0}", DbRowVenta("CveSubProyecto")))
- If TienePermiso <> "" Then ' si tiene acceso en el subproyecto
- 'LkNotaCredito.Visible = UsuarioActual.TienePermisoProceso(175)
- If UsuarioActual.TienePermisoProceso(264) Then
- InicializaAplicaRNCDevolucion(TmpDT)
- End If
- End If
- End If
+
+ 'If UsuarioActual.Empresa.Funcionalidad(109) = "1" Then
+ ' Dim TienePermiso As String = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, -1).FiltroPrimeroValor("CveSubProyecto", String.Format("CveSubProyecto = {0}", DbRowVenta("CveSubProyecto")))
+ ' If TienePermiso <> "" Then ' si tiene acceso en el subproyecto
+ ' 'LkNotaCredito.Visible = UsuarioActual.TienePermisoProceso(175)
+ ' If UsuarioActual.TienePermisoProceso(264) Then
+ ' InicializaAplicaRNCDevolucion(TmpDT)
+ ' End If
+ ' End If
+ 'End If
+
Case "RNC"
Trsaldo.Visible = True
HplSaldoAuxiliar.NavigateUrl = String.Format("/Contabilidad/PopUpAuxiliar.aspx?Tipo=CxCClientes&CveCliente={0}&CveVenta={1}&TB_iframe=true&height=550&width=920", DbRowVenta("CveCliente"), DbRowVenta("CveVenta"))
@@ -13934,6 +13944,11 @@ Partial Class Ventas
End If
Dim EsatusAlmacen As Integer = If(RBLTipoVenta.SelectedValue.Contiene("5", "6") AndAlso EsVentaMedica AndAlso DdlTipoComprobante.SelectedValue = "Ped", 1, 0) ', EstatusAlmacen:=EsatusAlmacen
+
+ If TmpDTDetalle Is Nothing OrElse TmpDTDetalle.Rows.Count = 0 Then
+ ErrorList.Add("Ocurrió un error al registrar la factura. No se encontraron productos y/o servicios. Revise su factura y cualquier detalle comuníquese a Soporte Técnico")
+ End If
+
'Se agregan los PS
For Each Row As DataRow In TmpDTDetalle.Rows
If Not ObjVentas.AddVentaDetalle(ObjVentas.CveVenta, Row("CvePS").ToString().ToEntero(), Row("Cantidad").ToString().ToDecimal, Row("CveUM").ToString().ToEntero(),
@@ -14184,11 +14199,13 @@ Partial Class Ventas
If EsVentaMedica AndAlso ErrorList.Count = 0 AndAlso ObjEventos IsNot Nothing Then
Dim CveOSAgenda As Integer = -1
+ Dim FolioOSAgenda As Integer = 0
If Me.CveOSVentaMedica > 0 Then
CveOSAgenda = Me.CveOSVentaMedica
+ FolioOSAgenda = Me.FolioOSVentaMedica
End If
- If Not AgendarCirugia(ObjEventos, CveOSAgenda) Then
+ If Not AgendarCirugia(ObjEventos, CveOSAgenda, FolioOSAgenda) Then
ErrorList.Add("Ocurrió un error al guardar la agenda")
End If
End If
@@ -22698,6 +22715,12 @@ Partial Class Ventas
End Sub
Private Sub BtnEditarRemision_Click(sender As Object, e As EventArgs) Handles BtnEditarRemision.Click
+
+ If TmpDT Is Nothing OrElse TmpDT.Rows.Count = 0 Then
+ Alert("Es necesario tener al menos 1 producto y/o servicio", TipoMensaje.MsgAdvertencia)
+ Exit Sub
+ End If
+
Dim OcurrioError As Boolean = False
Dim ObjVentas As New ClsVentas
ObjVentas.IniciaTransacSQL()
@@ -31361,6 +31384,12 @@ Partial Class Ventas
End Sub
Private Sub BtnEditarCotizacion_Click(sender As Object, e As EventArgs) Handles BtnEditarCotizacion.Click
+
+ If TmpDT Is Nothing OrElse TmpDT.Rows.Count = 0 Then
+ Alert("Es necesario tener al menos 1 producto y/o servicio", TipoMensaje.MsgAdvertencia)
+ Exit Sub
+ End If
+
Dim VaFacturarCotizacion As Boolean = False
'SI CARGA UNA COTIZACION DEBE GUARDAR TAMBIEN
If IfNull(ViewState("CveCotizacion"), 0).ToString().ToEntero() > 0 Then
@@ -31461,8 +31490,6 @@ Partial Class Ventas
Moneda = 1
End If
-
- 'ACTUALIZA VENTA
'ACTUALIZA VENTA
If Not ObjVentas.UpdateVentas(TxtSubTotal.Text.ToDecimal, LblDescuentos.Text.ToDecimal(), TxtIVA.Text.ToDecimal(), TxtIEPS.Text.ToDecimal(), TxtTotal.Text.ToDecimal(),
Moneda, TipoCambio, TxtFecha.Text.Trim.ToDate, TxtObsFact.Text.Trim,
@@ -31476,7 +31503,6 @@ Partial Class Ventas
End If
-
'ELIMINA DETALLES
If Not ObjVentas.RemoveVentasDetalle(CveVenta) Then
MensajeError = "Ocurrió un error al actualizar las partidas de la cotización"
@@ -35779,6 +35805,10 @@ Partial Class Ventas
Protected Sub LnkEditarDir_Click(sender As Object, e As EventArgs)
DdlDireccionEnvio.Enabled = True
+ ChkDireccionEnvio.Enabled = True
+ ChkDireccionEnvio.Checked = True
+ ChkDireccionEnvio_CheckedChanged(ChkDireccionEnvio, EventArgs.Empty)
+ 'DdlDireccionEnvio.Visible = True
LnkEditarDir.Visible = False
LnkAplicarDir.Visible = True
End Sub
@@ -35793,7 +35823,7 @@ Partial Class Ventas
ObjVentas.Dispose()
If ProcesoOK Then
- Alert("Dirección Actualizada correctamente.", ModExtensiones.TipoMensaje.ToastInformacion)
+ Alert("La dirección se ha actualizado correctamente.", TipoMensaje.MsgInformacion)
LnkAplicarDir.Visible = False
LnkEditarDir.Visible = True
End If
@@ -37738,6 +37768,7 @@ Partial Class Ventas
CveProcedimiento:=DdlProcedimiento.SelectedValue.ToEntero, CveTipoVenta:=RBLTipoVenta.SelectedValue.ToEntero, FechaCita:=TxtFechaOS.Text.Replace(",", "").ToDateTime,
Paciente:=TxtPaciente.Text, IdentificadorCliente:=TxtEpisodio.Text) Then
CveOSVentaMedica = ObjOrdenServicio.CveOS
+ FolioOSVentaMedica = ObjOrdenServicio.Folio
Else
errorList.Add("Se presento un error al guardar la orden de servicio.")
Errores = True
@@ -38165,7 +38196,7 @@ Partial Class Ventas
End Sub
- Protected Function AgendarCirugia(ByRef ObjEventos As ClsOIEventos, CveOS As Integer) As Boolean
+ Protected Function AgendarCirugia(ByRef ObjEventos As ClsOIEventos, CveOS As Integer, FolioOS As Integer) As Boolean
Dim TieneError As Boolean = False
Try
If DdlMedico.SelectedValue.ToEntero() > 0 AndAlso TrVentasMedicas2.Visible AndAlso TdFechaOS1.Visible AndAlso TdFechaOS2.Visible Then
@@ -38187,7 +38218,6 @@ Partial Class Ventas
If CveUsuarioAgendar > 0 Then
- Dim Asunto As String = "Cirugía"
Dim Descripcion As New StringBuilder
If DdlMedico.SelectedValue.ToEntero() > 0 Then
@@ -38200,12 +38230,23 @@ Partial Class Ventas
Descripcion.AppendFormat("Fecha de Cirugía {0} {1}", FechaCirugia.ToString("dd/MM/yyyy HH:mm"), " ")
+ Dim Hospital As String = ""
+
If DdlClienteSucursal.SelectedValue.ToEntero() > 0 Then
- Descripcion.AppendFormat("{0} {1}", DdlClienteSucursal.SelectedItem.Text, " ")
+ Hospital = DdlClienteSucursal.SelectedItem.Text
ElseIf DdlSucursalCliente.SelectedValue.ToEntero() > 0 Then
- Descripcion.AppendFormat("{0} {1}", DdlSucursalCliente.SelectedItem.Text, " ")
+ Hospital = DdlSucursalCliente.SelectedItem.Text
Else
- Descripcion.AppendFormat("{0} {1}", Me.NombreCliente, vbCrLf)
+ Hospital = Me.NombreCliente
+ End If
+
+ Descripcion.AppendFormat("{0} {1}", Hospital, " ")
+
+ Dim Asunto As String = $"Cirugía - {Hospital}"
+
+ If CveOS > 0 Then
+ Dim OIDescripcion As String = $"Orden de servicio {FolioOS} "
+ Descripcion.AppendFormat("{0} {1}", OIDescripcion, " ")
End If
If Not ObjEventos.AddEventoAgenda(4, Asunto, Descripcion.ToString(), 3, FechaCirugia, FechaCirugia.AddHours(1), CveUsuarioAgendar, UsuarioActual.CveEmpresa, RecurrenciaTipo:=0, CveTipoEvento:=2, CveOS:=CveOS) Then