-- Activación de GlobalDtVentasMotivoDevolución
This commit is contained in:
@@ -11355,17 +11355,30 @@ Partial Class Ventas
|
||||
MensajeAlert.Append("Ocurrió un error al generar el PDF. Por favor vuelva a entrar a la factura para imprimir el PDF. ")
|
||||
End If
|
||||
End If
|
||||
|
||||
GeneraPDFCotizacion(ChkEnviarFactura.Checked) ' MANDA CORREO
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
'ENVIAR NOTIFICACION DE SMS
|
||||
If UsuarioActual.Empresa.Funcionalidad(578) = "1" Then
|
||||
If DdlTipoComprobante.SelectedValue.Contiene("Ped") Then
|
||||
Dim CorreoDestino As String = "rene.molina@adssistemas.mx"
|
||||
|
||||
'ENVIA CORREO CON DETALLE DEL CONTRATO
|
||||
If DdlTipoComprobante.SelectedValue.Contiene("DPe", "Ped") Then
|
||||
If Not String.IsNullOrEmpty(CorreoNotificacionPedDev) Then
|
||||
EnviarCorreoDevPed()
|
||||
If RBLTipoVenta.SelectedValue.Contiene("1", "2") Then
|
||||
Dim ListMateriales As New List(Of GenericaCantidadProducto)
|
||||
Dim DetalleTable As String = ""
|
||||
For Each dRow As DataRow In TmpDT.Rows
|
||||
ListMateriales.Add(New GenericaCantidadProducto With {.Cantidad = dRow("Cantidad").ToString.ToEntero, .Producto = dRow("PS").ToString})
|
||||
Next
|
||||
EnviaNotificacionSMS(3, UsuarioActual.Empresa, CveVenta, TxtFolio.Text, TxtFechaOS.Text.ToDateTime, If(DdlSucursalCliente.Visible, DdlSucursalCliente.SelectedItem.Text, LblCliente.Text), DdlMedico.SelectedItem.Text, DdlProcedimiento.SelectedItem.Text, "", DdlVendedor.SelectedItem.Text, "", ListMateriales, CorreoDestino)
|
||||
Else
|
||||
EnviaNotificacionSMS(4, UsuarioActual.Empresa, CveVenta, TxtFolio.Text, TxtFechaOS.Text.ToDateTime, If(DdlSucursalCliente.Visible, DdlSucursalCliente.SelectedItem.Text, LblCliente.Text), DdlMedico.SelectedItem.Text, DdlProcedimiento.SelectedItem.Text, "", DdlVendedor.SelectedItem.Text, "", Nothing, CorreoDestino)
|
||||
End If
|
||||
'cirugía en el mismo día o si es despues de las 9 y requiere técnico, 'jefe de técnicos
|
||||
If TxtFechaOS.Text.ToDate.ToShortDateString = NowADS.ToShortDateString OrElse (NowADS.Hour > 21 OrElse ChkRequiereTecnicoModal.Checked) Then
|
||||
EnviaNotificacionSMS(5, UsuarioActual.Empresa, CveVenta, TxtFolio.Text, TxtFechaOS.Text.ToDateTime, If(DdlSucursalCliente.Visible, DdlSucursalCliente.SelectedItem.Text, LblCliente.Text), DdlMedico.SelectedItem.Text, DdlProcedimiento.SelectedItem.Text, "", DdlVendedor.SelectedItem.Text, "", Nothing, CorreoDestino)
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
@@ -38240,10 +38253,14 @@ Partial Class Ventas
|
||||
Protected Sub LBAplicaDevolucion_Click(sender As Object, e As EventArgs)
|
||||
|
||||
Dim SaldoAlmacen As Decimal = 0
|
||||
|
||||
Dim PermiteCancelar As Boolean = True
|
||||
Dim tCveVentaDevolucion As Integer = CveVenta
|
||||
If CveVentaPadre > 0 Then
|
||||
tCveVentaDevolucion = CveVentaPadre
|
||||
DevolucionAlmacen = 0
|
||||
End If
|
||||
Using ObjVentas As New ClsVentas
|
||||
If ObjVentas.GetVenta(CveVenta, UsuarioActual.CveEmpresa, VerificaAlmacen:=True) Then
|
||||
If ObjVentas.GetVenta(tCveVentaDevolucion, UsuarioActual.CveEmpresa, VerificaAlmacen:=True) Then
|
||||
If ObjVentas.DtResultados.Rows.Count > 0 Then
|
||||
Dim RowVenta As DataRow = ObjVentas.DtResultados.Rows(0)
|
||||
SaldoAlmacen = RowVenta("SaldoAlmacen").ToString().ToDecimal()
|
||||
@@ -38267,19 +38284,12 @@ Partial Class Ventas
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(382) = "1" Then
|
||||
DivMotivoDevolucion.Visible = True
|
||||
|
||||
Using ObjVenta As New ClsVentas
|
||||
If ObjVenta.GetMotivoDevolucion(-1, 1, UsuarioActual.CveEmpresa) Then
|
||||
DdlMotivoDevolucion.DataSource = ObjVenta.DtResultados.Copy()
|
||||
End If
|
||||
DdlMotivoDevolucion.DataBind()
|
||||
DdlMotivoDevolucion.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
End Using
|
||||
|
||||
DdlMotivoDevolucion.DataSource = GlobalDTVentasMotivosDevolucion(UsuarioActual.CveEmpresa)
|
||||
DdlMotivoDevolucion.DataBind()
|
||||
DdlMotivoDevolucion.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
UpDevolucion.Update()
|
||||
|
||||
End If
|
||||
|
||||
|
||||
RegistraScript("$('#DivAplicaDevolucion').modal('show');")
|
||||
End If
|
||||
|
||||
|
||||
Reference in New Issue
Block a user