Trapasos con pendientes por surtir,validar pagos,cambiar cliente de dispositivo,guardar PDF factura

This commit is contained in:
2019-10-07 15:58:00 -07:00
parent 6e379377f1
commit 6c9677a02b
6 changed files with 8688 additions and 8641 deletions

View File

@@ -4925,10 +4925,22 @@ Partial Class Clientes
End If
End If
End Sub
Private Sub CargaClienteDispositivos(CveEmpresa As Integer)
Dim Dt As DataTable = GlobalDTUsuarios(UsuarioActual.CveUsuario)
If Dt IsNot Nothing AndAlso Dt.Rows.Count > 0 Then
DdlClienteDispositivo.DataSource = Dt.FiltraParametros($"CvePlataforma = 3 AND CveEmpresa = {CveEmpresa}", "Empresa")
DdlClienteDispositivo.DataBind()
DdlClienteDispositivo.Items.Insert(0, New ListItem("Seleccione", "-1"))
End If
End Sub
Protected Sub DdlEmpresaDispositivo_SelectedIndexChanged(sender As Object, e As EventArgs)
CargaEmpresasUsuario(DdlEmpresaDispositivo.SelectedValue.ToEntero())
End Sub
CargaClienteDispositivos(DdlEmpresaDispositivo.SelectedValue.ToEntero())
End Sub
Protected Sub ImgMoverDispositivo_Click(sender As Object, e As EventArgs)
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
Me.NombreDispositivo = GvRow.DataKey("Display")

View File

@@ -1142,6 +1142,15 @@ Partial Class Ventas
End Set
End Property
Private Property PermiteCredito As Boolean
Get
Return If(IsNothing(ViewState("PermiteCredito")), False, CBool(ViewState("PermiteCredito")))
End Get
Set(value As Boolean)
ViewState("PermiteCredito") = value
End Set
End Property
#End Region
#Region "Propiedades PuntoVenta"
@@ -4860,7 +4869,7 @@ Partial Class Ventas
TrAtencionA.Visible = True
tdVigencia.Visible = DdlTipoComprobante.SelectedValue.Contiene("Cot")
tdFechaVigencia.Visible = DdlTipoComprobante.SelectedValue.Contiene("Cot")
Me.PermiteCredito = ObjCliente.PermiteCredito
LbAgregar.Enabled = True
LnkAgregarPyME.Enabled = True
@@ -16531,6 +16540,11 @@ Partial Class Ventas
Private Function ValidaPagosContado() As Boolean
Dim Retorno = False
If (UsuarioActual.CveEmpresa = 140) AndAlso (Not PermiteCredito) AndAlso (DtPagos Is Nothing OrElse DtPagos.Rows.Count = 0) Then
Alert("Es necesario especificar un pago.", TipoMensaje.MsgAdvertencia)
Retorno = True
End If
If DtPagos.SUM("Importe").ToString.ToDecimal > TxtTotal.Text.ToDecimal Then
Alert("El importe de los pagos no puede exceder el importe de la factura. Por favor verifique.", TipoMensaje.MsgAdvertencia)
Retorno = True