Merge branch 'master' of http://192.168.10.111:8383/SIG
This commit is contained in:
@@ -2870,7 +2870,7 @@ Partial Class Inventarios_EntradasSalidas
|
||||
txtCantidad.Enabled = False
|
||||
'DdlClasificacion.Enabled = False
|
||||
DdlProducto2.Enabled = False
|
||||
DdlUnidad.Enabled = False
|
||||
'DdlUnidad.Enabled = False
|
||||
|
||||
'codigo provisional, hay entradas con productos, que al asignar serie, debe de tener e ncantidad = 1
|
||||
If GvRow.DataKey("Cantidad").ToEntero() > 1 Then txtCantidad.Enabled = True
|
||||
|
||||
@@ -4,12 +4,9 @@ Option Explicit On
|
||||
Imports System.Data
|
||||
Imports System.Data.SqlClient
|
||||
Imports System.IO
|
||||
Imports System.Web.Management
|
||||
Imports DocumentFormat.OpenXml.InkML
|
||||
Imports Extensiones
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
Imports MoreLinq
|
||||
Imports Telerik.Web.UI
|
||||
|
||||
|
||||
Partial Class Inventarios_EntregaAlmacen
|
||||
Inherits ClsPaginas
|
||||
@@ -3364,7 +3361,7 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
Msg.AppendFormat("<br/><a class=""Texto"" target='_blank' href=""/Compras/PopUpVerFactura.aspx?P={0}"">Consola</a> ", Encripta(String.Format("OP=Alm&CveMovimiento={0}&Consola={1}", CveMovimiento, Consola)))
|
||||
End If
|
||||
|
||||
If CveMovimientoEntrada > 0 AndAlso Not UsuarioActual.Empresa.Funcionalidad(578).ToEntero = 1 Then
|
||||
If CveMovimientoEntrada > 0 AndAlso Not UsuarioActual.Empresa.Funcionalidad(578) = "1" Then
|
||||
Msg.AppendFormat("<br/><br/> Movimiento Entrada (Traspaso): <b><a href=""/Inventarios/EntradasSalidas.aspx?CveMovimiento={0}"" target=""_blank"">{1}</a></b>", CveMovimientoEntrada, FolioEntrada)
|
||||
Msg.AppendFormat("<br/> <a class=""Texto"" target='_blank' href=""/Compras/PopUpVerFactura.aspx?P={0}"">Imprimir Movimiento</a> ", Encripta(String.Format("OP=Alm&CveMovimiento={0}", CveMovimientoEntrada)))
|
||||
End If
|
||||
@@ -3415,12 +3412,16 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
|
||||
Alert(Msg.ToString(), TipoMensaje.MsgInformacion)
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(578) = "1" Then
|
||||
EnviarCorreoEntregaSMS(CveVentaSurtir, UsuarioActual, CveMovimiento, Folio)
|
||||
End If
|
||||
|
||||
Limpia()
|
||||
CargaPendientes()
|
||||
LimpiaCampos()
|
||||
CargaBitacora = False
|
||||
Else
|
||||
ObjInventario.RollBack()
|
||||
CargaPendientes()
|
||||
LimpiaCampos()
|
||||
CargaBitacora = False
|
||||
Else
|
||||
ObjInventario.RollBack()
|
||||
Alert(TextoError.ToString(), TipoMensaje.MsgError)
|
||||
RegistraScript("playsonidito('142608__autistic-lucario__error.wav')")
|
||||
End If
|
||||
@@ -3958,6 +3959,48 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
MailCls = Nothing
|
||||
End Sub
|
||||
|
||||
Private Sub EnviarCorreoEntregaSMS(tCveVenta As Integer, UsuarioActual As Usuario, tCveMovimiento As Integer, FolioRemision As Integer)
|
||||
'Dim Correo As New ClsSisMail
|
||||
Dim SerieFolio As String = ""
|
||||
Dim Destinatario As String = ""
|
||||
Dim tCveVendedor As Integer
|
||||
Dim ObjVentas As New ClsVentas()
|
||||
|
||||
Dim strBody As New StringBuilder
|
||||
If ObjVentas.GetVenta(tCveVenta, UsuarioActual.CveEmpresa) Then
|
||||
Dim dr As DataRow = ObjVentas.DtResultados.FiltroPrimero("")
|
||||
tCveVendedor = dr("CveVendedor").ToString.ToEntero()
|
||||
Dim CorreoVendedor As String = dr("CorreoVendedorVenta").ToString
|
||||
Dim dtDetalle As New DataTable
|
||||
Dim objInv As New ClsInventarios
|
||||
If objInv.GetMovimientosDetalle(tCveMovimiento, UsuarioActual.CveEmpresa) Then
|
||||
dtDetalle = objInv.DtResultados
|
||||
End If
|
||||
objInv.Dispose()
|
||||
Dim ListMateriales As New List(Of GenericaCantidadProducto)
|
||||
Dim DetalleTable As String = ""
|
||||
For Each dRow As DataRow In dtDetalle.Rows
|
||||
ListMateriales.Add(New GenericaCantidadProducto With {.Cantidad = dRow("Cantidad").ToString.ToEntero, .Producto = dRow("PS").ToString})
|
||||
Next
|
||||
|
||||
Dim tCveOS As Integer = -1
|
||||
Dim FolioOS As String = "-"
|
||||
Dim objOS As New ClsOS
|
||||
If objOS.GetCotizacionOS(CveVentaSurtir) Then
|
||||
tCveOS = objOS.DtResultados.FiltroPrimeroValor("CveOS", "").ToEntero
|
||||
FolioOS = objOS.DtResultados.FiltroPrimeroValor("Folio", "")
|
||||
End If
|
||||
|
||||
objOS.Dispose()
|
||||
' TxtObservaciones.Text = $"Dr. {drE("Medico").ToString}{vbCrLf}Cx. {drE("Procedimiento").ToString}{vbCrLf}F. Cirugía {drE("FechaParaSurtir").ToString.ToDateTime.ToString("dd/MM/yyyy HH:mm")}{vbCrLf}H. {drE("Sucursal").ToString}{vbCrLf}"
|
||||
|
||||
EnviaNotificacionSMS(6, UsuarioActual.Empresa, tCveOS, FolioOS, dr("FechaParaSurtir").ToString.ToDateTime, dr("ClienteNombre").ToString, dr("Medico").ToString, dr("Procedimiento").ToString, "", dr("VendedorNombre").ToString, FolioRemision.ToString, ListMateriales, CorreoVendedor)
|
||||
|
||||
End If
|
||||
ObjVentas.Dispose()
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub Limpia()
|
||||
|
||||
'DATOS DE LA VENTA
|
||||
@@ -4581,51 +4624,15 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
Dim ObjOS As New ClsOS(TransaccionSql)
|
||||
|
||||
Respuesta = ObjOS.UpdateOrdenesServiciosEstatus(CveOSEstatusFinalizada, UsuarioActual.CveUsuario, CveOSCerrar)
|
||||
|
||||
Dim cancelarPeido As Boolean = CancelarPedido(TransaccionSql, CveMovimientoGenerado, Respuesta)
|
||||
|
||||
If Respuesta Then
|
||||
Dim ObjInventario As New ClsInventarios(TransaccionSql)
|
||||
If ObjInventario.GetMovimientosDetalle(CveMovimientoGenerado, UsuarioActual.CveEmpresa) Then
|
||||
If Not cancelarPeido Then
|
||||
|
||||
|
||||
'Dim DT_Ventas_Detalles As DataTable = DTSolicitudDev.FiltraParametros("", "", {"CantidadPedido", "CvePS", "CveVentaDetalle"})
|
||||
'DT_Ventas_Detalles.Columns.Add("CantidadUsada", GetType(Decimal))
|
||||
'DT_Ventas_Detalles.AcceptChanges()
|
||||
|
||||
'For Each dRow As DataRow In DT_Ventas_Detalles.Rows
|
||||
|
||||
' For Each gvRow As GridViewRow In GvMU.Rows
|
||||
|
||||
' Dim CantidadUsada As Decimal = gvRow.FCTextBox("TxtUtilizado").Text.ToDecimal
|
||||
|
||||
' If dRow("CvePS").ToString.ToDecimal = gvRow.DataKey("CvePS").ToDecimal AndAlso CantidadUsada > 0 Then
|
||||
|
||||
' dRow("CantidadUsada") = dRow("CantidadUsada").ToString.ToDecimal + CantidadUsada
|
||||
|
||||
' End If
|
||||
' Next
|
||||
|
||||
'Next
|
||||
|
||||
'For Each dRow As DataRow In DT_Ventas_Detalles.Rows
|
||||
' Dim CantidadUsada As Decimal = dRow("CantidadUsada").ToString.ToDecimal
|
||||
' If dRow("CantidadUsada").ToString.ToDecimal < dRow("CantidadPedido").ToString.ToDecimal Then
|
||||
' If Not ObjInventario.UpdatePedidoDetalleCantidad(dRow("CveVentaDetalle").ToString.ToEntero, CantidadUsada, 2) Then
|
||||
' ProcesoOK = False
|
||||
' Exit For
|
||||
' End If
|
||||
' End If
|
||||
'Next
|
||||
|
||||
|
||||
|
||||
For Each Dr As DataRow In ObjInventario.DtResultados.Rows
|
||||
|
||||
Dim CveVentaDetalle As Integer = Dr("CveVentaDetalle").ToString().ToEntero()
|
||||
Dim Cantidad As Decimal = Dr("Cantidad").ToString().ToDecimal
|
||||
|
||||
If CveVentaDetalle > 0 Then
|
||||
If Not ObjInventario.UpdatePedidoDetalleCantidad(CveVentaDetalle, Cantidad) Then
|
||||
Respuesta = False
|
||||
@@ -4634,11 +4641,7 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
Else
|
||||
Respuesta = False
|
||||
End If
|
||||
|
||||
Next
|
||||
|
||||
|
||||
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
Reference in New Issue
Block a user