-- mejora carga de clientes
This commit is contained in:
@@ -736,8 +736,8 @@ Partial Class ContabilidadC_RegPrePolizaS
|
|||||||
Private Sub CargaClientes()
|
Private Sub CargaClientes()
|
||||||
DdlClientes.setEsWebService(True)
|
DdlClientes.setEsWebService(True)
|
||||||
DdlClientes.Attributes.Add("data-metodo", "getcliente")
|
DdlClientes.Attributes.Add("data-metodo", "getcliente")
|
||||||
DdlClientes.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa)
|
'DdlClientes.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa)
|
||||||
DdlClientes.DataBind()
|
'DdlClientes.DataBind()
|
||||||
' DdlClientes.Items.Insert(0, New ListItem(" - ", "-1"))
|
' DdlClientes.Items.Insert(0, New ListItem(" - ", "-1"))
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -1359,16 +1359,17 @@ Partial Class ContabilidadC_RegPrePolizaS
|
|||||||
|
|
||||||
If CveCliente > 0 Then
|
If CveCliente > 0 Then
|
||||||
DvModalconceptoCliente.Visible = True
|
DvModalconceptoCliente.Visible = True
|
||||||
DdlClientesE.SelectedValue = CveCliente
|
|
||||||
DdlClientesE.SelectedText = GlobalDTCliente(UsuarioActual.CveEmpresa, CveCliente:=CveCliente).FiltroPrimeroValor("NombreComercial", "")
|
|
||||||
DdlClientesE_SelectedIndexChanged(DdlClientesE, e)
|
|
||||||
|
|
||||||
|
DdlClientesE.SelectedText = GlobalDTCliente(UsuarioActual.CveEmpresa, CveCliente:=CveCliente).FiltroPrimeroValor("NombreComercial", "")
|
||||||
|
DdlClientesE.ddl.Items.Insert(0, New ListItem(GlobalDTCliente(UsuarioActual.CveEmpresa, CveCliente:=CveCliente).FiltroPrimeroValor("NombreComercial", ""), CveCliente))
|
||||||
|
DdlClientesE.SelectedValue = CveCliente
|
||||||
|
|
||||||
|
CargaVentasE(CveCliente)
|
||||||
End If
|
End If
|
||||||
If CveVenta > 0 Then
|
If CveVenta > 0 Then
|
||||||
DdlVentasE.SelectedValueExist(CveVenta)
|
DdlVentasE.SelectedValueExist(CveVenta)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
If CveClasificacion > 0 Then
|
If CveClasificacion > 0 Then
|
||||||
DdlClasificacionesE.SelectedValue = CveClasificacion
|
DdlClasificacionesE.SelectedValue = CveClasificacion
|
||||||
End If
|
End If
|
||||||
@@ -1621,11 +1622,20 @@ Partial Class ContabilidadC_RegPrePolizaS
|
|||||||
DdlClientesE.setEsWebService(True)
|
DdlClientesE.setEsWebService(True)
|
||||||
|
|
||||||
DdlClientesE.Attributes.Add("data-metodo", "getcliente")
|
DdlClientesE.Attributes.Add("data-metodo", "getcliente")
|
||||||
'DdlClientesE.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa)
|
|
||||||
'DdlClientesE.DataBind()
|
|
||||||
' DdlClientes.Items.Insert(0, New ListItem(" - ", "-1"))
|
|
||||||
End Sub
|
End Sub
|
||||||
Private Sub CargaVentasE(CveCliente As Integer, Optional CveMoneda As Integer = -1)
|
Private Sub CargaVentasE(CveCliente As Integer)
|
||||||
|
If CveCliente <= 0 Then Exit Sub
|
||||||
|
|
||||||
|
If DrConceptoContable IsNot Nothing Then
|
||||||
|
Dim AplicaME = Boolean.Parse(DrConceptoContable("EsMonedaExtranjera").ToString)
|
||||||
|
Dim AplicaVenta = Boolean.Parse(DrConceptoContable("AplicaVenta").ToString)
|
||||||
|
If AplicaME Then
|
||||||
|
CveMoneda = 2
|
||||||
|
End If
|
||||||
|
If Not AplicaVenta Then Exit Sub
|
||||||
|
End If
|
||||||
|
|
||||||
DvModalconceptoVenta.Visible = True
|
DvModalconceptoVenta.Visible = True
|
||||||
DdlVentasE.DataSource = Nothing
|
DdlVentasE.DataSource = Nothing
|
||||||
DdlVentasE.ClearSelection()
|
DdlVentasE.ClearSelection()
|
||||||
@@ -1661,16 +1671,9 @@ Partial Class ContabilidadC_RegPrePolizaS
|
|||||||
CargaComprasE(DdlProveedoresE.SelectedValue.ToEntero)
|
CargaComprasE(DdlProveedoresE.SelectedValue.ToEntero)
|
||||||
End Sub
|
End Sub
|
||||||
Private Sub DdlClientesE_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlClientesE.selectedindexchange
|
Private Sub DdlClientesE_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlClientesE.selectedindexchange
|
||||||
Dim tCveMoneda As Integer = 1
|
|
||||||
|
|
||||||
If DrConceptoContable IsNot Nothing Then
|
If DdlClientesE.SelectedValue.ToEntero > 0 Then CargaVentasE(DdlClientesE.SelectedValue.ToEntero)
|
||||||
Dim AplicaME = Boolean.Parse(DrConceptoContable("EsMonedaExtranjera").ToString)
|
|
||||||
If AplicaME Then
|
|
||||||
tCveMoneda = 2
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
|
|
||||||
CargaVentasE(DdlClientesE.SelectedValue.ToEntero, tCveMoneda)
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Function CargaValidacionesConcepto() As Boolean
|
Private Function CargaValidacionesConcepto() As Boolean
|
||||||
@@ -1853,7 +1856,7 @@ Partial Class ContabilidadC_RegPrePolizaS
|
|||||||
TxtTotalAbonos.Text = DtMovimientos.SUMD("Abono").ToString.FormatoNumero
|
TxtTotalAbonos.Text = DtMovimientos.SUMD("Abono").ToString.FormatoNumero
|
||||||
UpTotalCargo.Update()
|
UpTotalCargo.Update()
|
||||||
UpTotalAbono.Update()
|
UpTotalAbono.Update()
|
||||||
DdlClientesE.SelectedValue = "-1"
|
DdlClientesE.ddl.Items.Clear()
|
||||||
DdlClientesE.SelectedText = ""
|
DdlClientesE.SelectedText = ""
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|||||||
Reference in New Issue
Block a user