Cambios de BDH
This commit is contained in:
@@ -933,6 +933,14 @@ Partial Class PV
|
||||
ViewState("DtPUFacturas") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property DtModelosAuto As DataTable
|
||||
Get
|
||||
Return CType(ViewState("DtModelosAuto"), DataTable)
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
ViewState("DtModelosAuto") = value
|
||||
End Set
|
||||
End Property
|
||||
#End Region
|
||||
|
||||
#Region "PROPIEDADES ACUMULADORES"
|
||||
@@ -2779,10 +2787,8 @@ Partial Class PV
|
||||
DivRecepcionUsados.Visible = True
|
||||
If DdlTipoComprobante.SelectedValue <> "Rem" Then
|
||||
GvRecepcionUsados.Columns(2).Visible = False
|
||||
GvRecepcionUsados.Columns(3).Visible = False
|
||||
Else
|
||||
GvRecepcionUsados.Columns(2).Visible = True
|
||||
GvRecepcionUsados.Columns(3).Visible = True
|
||||
End If
|
||||
End If
|
||||
|
||||
@@ -4939,6 +4945,7 @@ Partial Class PV
|
||||
|
||||
Dim DtTamanios = GlobalDTAcumTamaños.FiltraParametros($"CveEmpresa = {UsuarioActual.CveEmpresa} AND CvePSCargo > 0")
|
||||
|
||||
CargaModelos()
|
||||
GvRecepcionUsados.DataSource = DtTamanios
|
||||
GvRecepcionUsadosModal.DataSource = DtTamanios
|
||||
|
||||
@@ -4958,6 +4965,15 @@ Partial Class PV
|
||||
DivChkAjuste.Visible = True
|
||||
End Sub
|
||||
|
||||
Private Sub CargaModelos()
|
||||
Dim ObjGral As New ClsGenerales
|
||||
If ObjGral.ModelosAutosGet(UsuarioActual.CveEmpresa) Then
|
||||
DtModelosAuto = ObjGral.DtResultados
|
||||
DdlModeloAuto.DataSource = DtModelosAuto
|
||||
End If
|
||||
DdlModeloAuto.DataBind()
|
||||
End Sub
|
||||
|
||||
Protected Sub GvRecepcionUsados_RowDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvRecepcionUsados.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
@@ -4970,10 +4986,6 @@ Partial Class PV
|
||||
e.Row.FCDropDownList("DdlBCIUsado").DataBind()
|
||||
'e.Row.FCDropDownList("DdlBCIUsado").SelectedValue = e.Row.DBCampo("CveBCIUsado")
|
||||
|
||||
If ObjGral.ModelosAutosGet(UsuarioActual.CveEmpresa) Then
|
||||
e.Row.FCDropDownList("DdlModeloAuto").DataSource = ObjGral.DtResultados
|
||||
End If
|
||||
e.Row.FCDropDownList("DdlModeloAuto").DataBind()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -5006,7 +5018,7 @@ Partial Class PV
|
||||
LimpiaAjuste()
|
||||
If TmpDTAjustes IsNot Nothing AndAlso TmpDTAjustes.FiltraParametros($"ConsecutivoVenta = {ConsecutivoVenta}").Rows.Count > 0 Then
|
||||
ModalidadAjuste = "U"
|
||||
TxtPrecio.Attributes.Add("onKeyUp", $"CambiaAjuste(this,{TxtPUFactura.ClientID});")
|
||||
TxtPrecio.Attributes.Add("onKeyUp", $"CambiaAjuste(this,{TxtPrecio.ClientID});")
|
||||
ChkAjuste.Checked = True
|
||||
DivAjuste.Visible = True
|
||||
CargaAjusteDetalle()
|
||||
@@ -5022,7 +5034,7 @@ Partial Class PV
|
||||
TxtCodEnsamble.Text = ""
|
||||
DdlTipoUso.SelectedIndex = -1
|
||||
TxtCodLinea.Text = ""
|
||||
TxtPUFactura.Text = ""
|
||||
TxtPrecio.Text = ""
|
||||
TxtFechaAjuste.Text = Now.ToShortDateString
|
||||
CEEFechaAjuste.EndDate = Now
|
||||
TxtCodInspeccion.Text = ""
|
||||
@@ -5064,8 +5076,8 @@ Partial Class PV
|
||||
CargaPSAjuste()
|
||||
DdlPSAjuste.SelectedValueExist(Dr("CvePS").ToString)
|
||||
TxtFechaAjuste.Text = Dr("FechaAjuste").ToString.ToDate.ToShortDateString
|
||||
TxtPUFactura.Text = Dr("PUFactura").ToString.ToDecimal.FormatoNumero(2)
|
||||
TxtPUFactura.Enabled = Not Dr("CveVenta").ToString.ToEntero > 0
|
||||
TxtPrecio.Text = Dr("PUFactura").ToString.ToDecimal.FormatoNumero(2)
|
||||
TxtPrecio.Enabled = Not Dr("CveVenta").ToString.ToEntero > 0
|
||||
End If
|
||||
End Sub
|
||||
Protected Sub BtnCalculaMesesUso_Click(sender As Object, e As EventArgs)
|
||||
@@ -5073,7 +5085,7 @@ Partial Class PV
|
||||
End Sub
|
||||
|
||||
Private Sub CalculaMesesUso()
|
||||
Dim FechaI = TxtFechaAjuste.Text.ToDate
|
||||
Dim FechaI = TxtFechaAjuste.Text.ToDate.AddDays(1)
|
||||
Dim FechaF = Now
|
||||
'Dim NumDiasAlMes As Double = (365 / 12)
|
||||
|
||||
@@ -5126,7 +5138,7 @@ Partial Class PV
|
||||
If ObjAcum.GarantiasMesesGet(-1, UsuarioActual.CveEmpresa, CveMarca, DdlTipoUso.SelectedValue.ToEntero, TxtMesesUso.Text.ToEntero) Then
|
||||
If ObjAcum.DtResultados.Rows.Count > 0 Then
|
||||
TxtPorcentajeAjuste.Text = (ObjAcum.DtResultados.Rows(0)("Valor").ToString.ToDouble / 100).ToString
|
||||
TxtImporteAjuste.Text = (TxtPorcentajeAjuste.Text.ToDouble * TxtPUFactura.Text.ToDouble).FormatoNumero
|
||||
TxtImporteAjuste.Text = (TxtPorcentajeAjuste.Text.ToDouble * TxtPrecio.Text.ToDouble).FormatoNumero
|
||||
|
||||
Dim CargoActual As Decimal = 0
|
||||
Dim CargoAnterior As Decimal = 0
|
||||
@@ -5155,8 +5167,8 @@ Partial Class PV
|
||||
End If
|
||||
End If
|
||||
|
||||
TxtDescuentoAjuste.Text = ((TxtPUFactura.Text.ToDouble - TxtImporteAjuste.Text.ToDouble) - (CargoActual - CargoAnterior)).FormatoNumero
|
||||
TxtDescuentoAjuste.ToolTip = $"La diferencia de ajuste fue: {(TxtPUFactura.Text.ToDouble - TxtImporteAjuste.Text.ToDouble).FormatoNumero()}. La diferencia de tamaños fue: {(CargoActual - CargoAnterior).FormatoNumero}."
|
||||
TxtDescuentoAjuste.Text = ((TxtPrecio.Text.ToDouble - TxtImporteAjuste.Text.ToDouble) - (CargoActual - CargoAnterior)).FormatoNumero
|
||||
TxtDescuentoAjuste.ToolTip = $"La diferencia de ajuste fue: {(TxtPrecio.Text.ToDouble - TxtImporteAjuste.Text.ToDouble).FormatoNumero()}. La diferencia de tamaños fue: {(CargoActual - CargoAnterior).FormatoNumero}."
|
||||
End If
|
||||
End If
|
||||
ObjAcum.Dispose()
|
||||
@@ -5190,7 +5202,7 @@ Partial Class PV
|
||||
'End Function
|
||||
|
||||
Private Sub GuardaAjuste()
|
||||
TxtPUFactura.Text = TxtPrecio.Text
|
||||
TxtPrecio.Text = TxtPrecio.Text
|
||||
UpAjuste.Update()
|
||||
|
||||
Dim CargoAnterior As Double = 0
|
||||
@@ -5214,7 +5226,7 @@ Partial Class PV
|
||||
Row("CvePS") = DdlPSAjuste.SelectedValue
|
||||
Row("PS") = DdlPSAjuste.SelectedItem.Text
|
||||
Row("CveVenta") = DdlFacturas.SelectedValue
|
||||
Row("PUFactura") = TxtPUFactura.Text.ToDouble
|
||||
Row("PUFactura") = TxtPrecio.Text.ToDouble
|
||||
Row("Cantidad") = 1
|
||||
Dim CveUM As Integer = -1
|
||||
If DdlPSAjuste.SelectedValue.ToEntero > 0 Then
|
||||
@@ -5244,7 +5256,7 @@ Partial Class PV
|
||||
TmpDTAjustes.Rows(IndexAjuste)("CvePS") = DdlPSAjuste.SelectedValue
|
||||
TmpDTAjustes.Rows(IndexAjuste)("PS") = DdlPSAjuste.SelectedItem.Text
|
||||
TmpDTAjustes.Rows(IndexAjuste)("CveVenta") = DdlFacturas.SelectedValue
|
||||
TmpDTAjustes.Rows(IndexAjuste)("PUFactura") = TxtPUFactura.Text.ToDouble
|
||||
TmpDTAjustes.Rows(IndexAjuste)("PUFactura") = TxtPrecio.Text.ToDouble
|
||||
TmpDTAjustes.Rows(IndexAjuste)("Cantidad") = 1
|
||||
Dim CveUM As Integer = -1
|
||||
If DdlPSAjuste.SelectedValue.ToEntero > 0 Then
|
||||
@@ -5271,7 +5283,7 @@ Partial Class PV
|
||||
End If
|
||||
End If
|
||||
|
||||
Dr("Descuento") = Math.Round((TxtPUFactura.Text.ToDouble - TxtImporteAjuste.Text.ToDouble) - (CargoActual - CargoAnterior), NumeroDecimales)
|
||||
Dr("Descuento") = Math.Round((TxtPrecio.Text.ToDouble - TxtImporteAjuste.Text.ToDouble) - (CargoActual - CargoAnterior), NumeroDecimales)
|
||||
|
||||
Dim TotalCalculableImpuestos As Decimal = (Dr("Cantidad").ToString.ToDecimal * (Dr("PU").ToString.ToDecimal)) - Dr("Descuento").ToString.ToDecimal
|
||||
Dr("ImporteIVA") = Math.Round(Dr("PorcentajeIVA").ToString.ToDecimal * TotalCalculableImpuestos, NumeroDecimales)
|
||||
@@ -5308,8 +5320,8 @@ Partial Class PV
|
||||
DivAjuste.Attributes.Add("class", "col-md-6")
|
||||
DivDatosVenta.Attributes.Remove("class")
|
||||
DivDatosVenta.Attributes.Add("class", "col-md-6")
|
||||
TxtPrecio.Attributes.Add("onKeyUp", $"CambiaAjuste(this,{TxtPUFactura.ClientID});")
|
||||
TxtPUFactura.Text = TxtPrecio.Text
|
||||
TxtPrecio.Attributes.Add("onKeyUp", $"CambiaAjuste(this,{TxtPrecio.ClientID});")
|
||||
TxtPrecio.Text = TxtPrecio.Text
|
||||
Else
|
||||
For Each Gvr As GridViewRow In GvRecepcionUsados.Rows
|
||||
If Gvr.RowType = DataControlRowType.DataRow Then
|
||||
@@ -5390,7 +5402,7 @@ Partial Class PV
|
||||
Row("CveVentaDetalle") = -1
|
||||
Row("PU") = Gvr.DataKey("Cargo").ToDouble
|
||||
Row("CveBCIUsado") = Gvr.FCDropDownList("DdlBCIUsado").SelectedValue.ToEntero
|
||||
Row("CveModeloAuto") = Gvr.FCDropDownList("DdlModeloAuto").SelectedValue.ToEntero
|
||||
Row("CveModeloAuto") = DdlModeloAuto.SelectedValue.ToEntero
|
||||
TmpDTRecepcionUsados.Rows.Add(Row)
|
||||
|
||||
End If
|
||||
@@ -5677,14 +5689,16 @@ Partial Class PV
|
||||
params.Add(New ReportParameter("PorcentajeAjuste", TxtPorcentajeAjuste.Text.Trim))
|
||||
|
||||
'Informacion Acumulador
|
||||
|
||||
params.Add(New ReportParameter("CodEnsamble", If(TxtCodEnsamble.Text.Length > 7, TxtCodEnsamble.Text.Trim.Substring(0, 7), "")))
|
||||
params.Add(New ReportParameter("CodLinea", TxtCodLinea.Text.Trim))
|
||||
params.Add(New ReportParameter("CodInspeccion", TxtCodInspeccion.Text.Trim))
|
||||
|
||||
'Informacion Vehiculo
|
||||
params.Add(New ReportParameter("MarcaAuto", ""))
|
||||
params.Add(New ReportParameter("TipoAuto", ""))
|
||||
params.Add(New ReportParameter("MarcaAuto", If(DdlPS.SelectedValue.ToEntero > 0, DtModelosAuto.FiltroPrimeroValor("Marca", $"CveModeloAuto ={DdlModeloAuto.SelectedValue}"), "")))
|
||||
params.Add(New ReportParameter("TipoAuto", If(DdlPS.SelectedValue.ToEntero > 0, DtModelosAuto.FiltroPrimeroValor("Modelo", $"CveModeloAuto ={DdlModeloAuto.SelectedValue}"), "")))
|
||||
|
||||
'Informacion Consumidor
|
||||
|
||||
params.Add(New ReportParameter("Direccion", LblDireccion.Text))
|
||||
|
||||
If Imagen.Exists Then
|
||||
params.Add(New ReportParameter("LogoPath", logouri))
|
||||
|
||||
Reference in New Issue
Block a user