/cambios en globalDT separados por Empresa

This commit is contained in:
janeth arvizu
2019-12-26 17:30:11 -07:00
parent fdb3abf583
commit 2bb4c47c92
32 changed files with 601 additions and 482 deletions

View File

@@ -1615,6 +1615,8 @@ Partial Class PV
If (Boolean.Parse(ObjCliente.DtResultados(0)("EsDistribuidor").ToString)) Then
TrEsDistribuidor.Visible = True
LbVendedor.Text = GlobalDTVendedores(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Vendedor", $"CveVendedor = {ObjCliente.Vendedor}")
Else
TrEsDistribuidor.Visible = False
End If
ViewState("CliNoExt") = ObjCliente.NoExt
@@ -1643,8 +1645,14 @@ Partial Class PV
End If
If CveVenta <= 0 Then
CveMetodoPagoCliente = ObjCliente.DtResultados.Rows(0)("CveMetodoPago").ToString.ToEntero
DdlUsoCFDI.SelectedValueExist(ObjCliente.CveUsoCFDI.ToString)
DdlMetodoPago.SelectedValueExist(ObjCliente.CveMetodoPago.ToString)
DdlMetodoPago33.SelectedValueExist(ObjCliente.DtResultados.Rows(0)("CveMetodoPago33").ToString)
DdlMetodoPago33_SelectedIndexChanged(DdlMetodoPago33, EventArgs.Empty)
DdlFormaPago33.SelectedValueExist(ObjCliente.DtResultados.Rows(0)("CveFormaPago33").ToString)
DdlUsoCFDI.SelectedValueExist(ObjCliente.DtResultados.Rows(0)("CveUsoCFDI").ToString)
End If
TxtFechaPago.Text = (Now.AddDays(ObjCliente.PlazoCobranza)).ToShortDateString
@@ -1969,7 +1977,7 @@ Partial Class PV
End If
Catch ex As Exception
Alert("No se pudo verificar la fecha del certificado", TipoMensaje.MsgError)
Alert("No se pudo verificar la fecha del certificado", TipoMensaje.ToastError)
End Try
End Sub
@@ -2800,7 +2808,7 @@ Partial Class PV
DdlUnidadMedida.Items.Clear()
If UsuarioActual.Empresa.UsaInventarios Then
DdlUnidadMedida.DataSource = GlobalDTProductosServiciosEquivalencias(CvePSParametro, -1)
DdlUnidadMedida.DataSource = GlobalDTProductosServiciosEquivalencias(CvePSParametro, -1, UsuarioActual.CveEmpresa)
Else
DdlUnidadMedida.DataSource = GlobalDTUnidadesMedida(UsuarioActual.CveEmpresa)
End If
@@ -4890,17 +4898,19 @@ Partial Class PV
Hilo.Start()
End Sub
Private Sub GeneraGlobalDT()
Dim ObjPS As New ClsProductosServicios
GlobalDTProductosServiciosEquivalencias(-1, -1, UsuarioActual.CveEmpresa) = Nothing
GlobalDTPSSimplificado(UsuarioActual.CveEmpresa) = Nothing
'Dim ObjPS As New ClsProductosServicios
If (ObjPS.GetPSSimplificado(-1)) Then
Application("GlobalDTPSSimplificado") = ObjPS.DtResultados.AsEnumerable 'Cargamos el GlobalDTPSSimplificado
End If
'If (ObjPS.GetPSSimplificado(-1)) Then
' Application("GlobalDTPSSimplificado") = ObjPS.DtResultados.AsEnumerable 'Cargamos el GlobalDTPSSimplificado
'End If
If ObjPS.GetPSEquivalencias(-1, -1) Then
GlobalDTProductosServiciosEquivalencias(-1, -1) = ObjPS.DtResultados
End If
'If ObjPS.GetPSEquivalencias(-1, -1) Then
' GlobalDTProductosServiciosEquivalencias(-1, -1) = ObjPS.DtResultados
'End If
ObjPS.Dispose()
'ObjPS.Dispose()
End Sub
Private Sub RecargaGlobalCliente()
@@ -5020,8 +5030,6 @@ Partial Class PV
GvRecepcionUsados.DataBind()
GvRecepcionUsadosModal.DataBind()
CargaPSAjuste()
CreaDTmpDTAjustes()
CreaDTmpDTRecepcionUsados()
CargaBCIAjuste()
@@ -5216,10 +5224,11 @@ Partial Class PV
Private Sub CalculaPorcentajeAjuste()
If DdlPS.SelectedValue.ToEntero <= 0 Then
'Alert("No se ha especificado producto a entregar")
Alert("No se ha especificado producto a entregar")
Exit Sub
End If
Try
TxtImporteAjuste.Text = "0.00"
If DdlTipoUso.SelectedValue.ToEntero > 0 AndAlso DdlPSAjuste.SelectedValue.ToEntero > 0 AndAlso TxtMesesUso.Text <> "" AndAlso DdlPS.SelectedValue.ToEntero > 0 Then
Dim CveMarca As Integer = -1
@@ -5267,10 +5276,13 @@ Partial Class PV
TxtImporteAjuste.Text = ((TxtPUFactura.Text.ToDouble - TxtImporteAjuste.Text.ToDouble) - (CargoVendido - CargoGarantia)).FormatoNumero
Else
Alert("El producto no tiene ajuste en ese periodo", TipoMensaje.MsgAdvertencia)
'cuando no está registrada, no da ajuste
TxtImporteAjuste.ToolTip = "El producto no tiene ajuste en ese periodo"
TxtImporteAjuste.Text = "0.00"
End If
Else
Alert("No se tiene especificado tabla de garantía")
End If
ObjAcum.Dispose()
End If
@@ -5430,8 +5442,8 @@ Partial Class PV
Protected Sub DdlFolioGarantia_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlFolioGarantia.SelectedIndexChanged
Dim ObjAcumuladores As New ClsAcumuladores
If ObjAcumuladores.GetNuevoConsecutivoFolio(DdlFolioGarantia.SelectedValue.ToEntero) Then
Dim resultado As String = ObjAcumuladores.DtResultados.FiltroPrimeroValor("NuevoConsecutivo")
TxtConsecutivoAjuste.Text = resultado
Dim resultado As Integer = ObjAcumuladores.DtResultados.FiltroPrimeroValor("NuevoConsecutivo").ToEntero
TxtConsecutivoAjuste.Text = resultado.ToString
UpAjuste.Update()
End If
ObjAcumuladores.Dispose()