Correcion de folios de garantias
This commit is contained in:
@@ -1560,7 +1560,7 @@ Partial Class PV
|
||||
End If
|
||||
DdlSubProyectoDatos.SelectedValueExistInsert(DbRowVenta("CveSubProyecto").ToString, DbRowVenta("SubProyecto").ToString)
|
||||
CargarAlmacenes()
|
||||
|
||||
CargaFoliosGarantia()
|
||||
|
||||
CargaClienteSucursal(DbRowVenta("CveClienteSucursal").ToString.ToEntero)
|
||||
|
||||
@@ -2042,13 +2042,12 @@ Partial Class PV
|
||||
|
||||
End If
|
||||
|
||||
|
||||
'GUARDA USADOS
|
||||
If Not OcurrioError AndAlso Not ObjVentas.EliminarUsados(CveVenta) Then
|
||||
OcurrioError = True
|
||||
End If
|
||||
If Not OcurrioError AndAlso TmpDTRecepcionUsados IsNot Nothing AndAlso TmpDTRecepcionUsados.Rows.Count > 0 Then
|
||||
If Not OcurrioError AndAlso Not ObjVentas.EliminarUsados(CveVenta) Then
|
||||
OcurrioError = True
|
||||
End If
|
||||
|
||||
If Not OcurrioError AndAlso TmpDTRecepcionUsados IsNot Nothing Then
|
||||
For Each drow As DataRow In TmpDTRecepcionUsados.Rows
|
||||
If Not ObjVentas.AddVentaUsado(CveVenta, drow("CvePS").ToString.ToEntero, drow("Cantidad").ToString.ToDecimal, drow("PU").ToString.ToDecimal, drow("CveBCIUsado").ToString.ToEntero, drow("CveModeloAuto").ToString.ToEntero) Then
|
||||
OcurrioError = True
|
||||
@@ -2057,12 +2056,12 @@ Partial Class PV
|
||||
Next
|
||||
End If
|
||||
|
||||
'GUARDAR AJUSTES'
|
||||
If Not OcurrioError AndAlso Not ObjAcum.EliminarGarantiasDetalle(CveVenta) Then
|
||||
OcurrioError = True
|
||||
End If
|
||||
|
||||
'GUARDAR AJUSTES
|
||||
If Not OcurrioError AndAlso TmpDTAjustes IsNot Nothing AndAlso TmpDTAjustes.Rows.Count > 0 Then
|
||||
If Not OcurrioError AndAlso Not ObjAcum.EliminarGarantiasDetalle(CveVenta) Then
|
||||
OcurrioError = True
|
||||
End If
|
||||
|
||||
For Each Dr As DataRow In TmpDTAjustes.Rows
|
||||
If Not ObjAcum.AddGarantiasDetalle(Dr("CveVentaDetalle").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("CveFolioGarantia").ToString.ToEntero, Dr("CveTipoUso").ToString.ToEntero,
|
||||
Dr("CodigoEnsamble").ToString, Dr("CodigoLinea").ToString, Dr("CodigoInspeccion").ToString, Dr("CveTipoDefecto").ToString.ToEntero, Dr("CodigoTD").ToString, Dr("TipoComprobante").ToString.ToEntero,
|
||||
@@ -2075,11 +2074,12 @@ Partial Class PV
|
||||
End If
|
||||
|
||||
'GUARDAR POLIZA VIRTUAL
|
||||
If Not OcurrioError AndAlso Not ObjAcum.EliminarPolizaVirtual(CveVenta) Then
|
||||
OcurrioError = True
|
||||
End If
|
||||
If Not OcurrioError AndAlso TmpDTPolizaVirtual IsNot Nothing AndAlso TmpDTPolizaVirtual.Rows.Count > 0 Then
|
||||
|
||||
If Not OcurrioError AndAlso Not ObjAcum.EliminarPolizaVirtual(CveVenta) Then
|
||||
OcurrioError = True
|
||||
End If
|
||||
|
||||
If Not OcurrioError AndAlso TmpDTPolizaVirtual IsNot Nothing Then
|
||||
For Each drow As DataRow In TmpDTPolizaVirtual.Rows
|
||||
If ObjAcum.AddPolizaVirtual(CveVenta, drow("CveVentaDetalle").ToString().ToEntero(), drow("CvePS").ToString.ToEntero, drow("Cantidad").ToString.ToDecimal, drow("PU").ToString.ToDecimal, drow("Descuento").ToString.ToDecimal,
|
||||
drow("Total").ToString.ToDecimal, drow("TipoServicio").ToString.ToEntero, drow("TipoPoliza").ToString.ToEntero, drow("CveModeloAuto").ToString.ToEntero, drow("AnioVehiculo").ToString.ToEntero, CBool(drow("TieneUsado").ToString),
|
||||
@@ -2711,6 +2711,8 @@ Partial Class PV
|
||||
UpParametros.Update()
|
||||
End If
|
||||
|
||||
CargaFoliosGarantia()
|
||||
|
||||
If ObjCliente.GetSucursales(CveCliente) Then
|
||||
DdlSucursalCliente.DataSource = ObjCliente.DtResultados
|
||||
If ObjCliente.DtResultados.Rows.Count > 0 Then
|
||||
@@ -3000,7 +3002,7 @@ Partial Class PV
|
||||
'SELECCIONA VENDEDOR DEL USUARIO CUANDO SEA VENTA NUEVA Y SIN CLIENTE
|
||||
If UsuarioActual.CveVendedor > 0 Then
|
||||
If CveVenta <= 0 AndAlso Not DdlVendedor.SelectedValue.ToEntero() > 0 Then DdlVendedor.SelectedValueExist(UsuarioActual.CveVendedor.ToString())
|
||||
If DdlVendedor.SelectedValue.ToEntero() > 0 AndAlso Not UsuarioActual.TienePermisoProceso(161) Then
|
||||
If Not UsuarioActual.TienePermisoProceso(161) Then
|
||||
DdlVendedor.Enabled = False
|
||||
End If
|
||||
'multiples vendedores visible
|
||||
@@ -4395,11 +4397,17 @@ Partial Class PV
|
||||
End Sub
|
||||
Private Sub DdlSubProyectoDatos_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlSubProyectoDatos.SelectedIndexChanged
|
||||
CambiaSucursalGeneral()
|
||||
CargaFoliosGarantia()
|
||||
|
||||
UpAjuste.Update()
|
||||
UpModalVenta.Update()
|
||||
End Sub
|
||||
|
||||
Private Sub CargaFoliosGarantia()
|
||||
If UsuarioActual.Empresa.Funcionalidad(531).ToString = "1" Then
|
||||
Dim ObjAcum As New ClsAcumuladores
|
||||
If ObjAcum.FoliosGarantiaGet(-1, UsuarioActual.CveEmpresa, Estatus:=1, Area:=1) Then
|
||||
DdlFolioGarantia.DataSource = ObjAcum.DtResultados.FiltraParametros($"CveSubProyecto={DdlSubProyectoDatos.SelectedValue}")
|
||||
If ObjAcum.FoliosGarantiaGet(-1, UsuarioActual.CveEmpresa, Estatus:=1, CveSubProyecto:=DdlSubProyectoDatos.SelectedValue.ToEntero(), Area:=1) Then
|
||||
DdlFolioGarantia.DataSource = ObjAcum.DtResultados
|
||||
End If
|
||||
ObjAcum.Dispose()
|
||||
DdlFolioGarantia.DataBind()
|
||||
@@ -7045,6 +7053,7 @@ Partial Class PV
|
||||
|
||||
DdlBCIAjuste.Items.Clear()
|
||||
If DTBCIUsados IsNot Nothing AndAlso CveTamanio > 0 Then
|
||||
DdlBCIAjuste.SelectedValue = Nothing
|
||||
DdlBCIAjuste.DataSource = DTBCIUsados.FiltraParametros($"CveTamaño={CveTamanio}")
|
||||
DdlBCIAjuste.DataBind()
|
||||
DdlBCIAjuste.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
@@ -7295,7 +7304,7 @@ Partial Class PV
|
||||
|
||||
Protected Sub ChkAjuste_CheckedChanged(sender As Object, e As EventArgs)
|
||||
If ChkAjuste.Checked Then
|
||||
|
||||
CargaFoliosGarantia()
|
||||
'For Each Gvr As GridViewRow In GvRecepcionUsados.Rows
|
||||
' If Gvr.RowType = DataControlRowType.DataRow Then
|
||||
' Gvr.FCTextBox("TxtCantidad").Text = ""
|
||||
|
||||
Reference in New Issue
Block a user