-cambios BDH
This commit is contained in:
@@ -4654,6 +4654,7 @@ Partial Class PV
|
||||
DivCorreoCuentaCliente.Visible = False
|
||||
DivBotonesAgregarCliente.Visible = False
|
||||
DivFormaCliente.Visible = False
|
||||
TxtRFCCliente.Text = "XAXX010101000"
|
||||
UpAgregarCliente.Update()
|
||||
|
||||
RegistraScript("showDivEC();")
|
||||
@@ -5244,6 +5245,16 @@ Partial Class PV
|
||||
DdlTipoUso.DataSource = GlobalDTAcumGarantiasMesesTipoUso(UsuarioActual.CveEmpresa, CveMarca)
|
||||
DdlTipoUso.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
DdlTipoUso.DataBind()
|
||||
|
||||
'si la marca es optima, el codigo cambia a solo numerico
|
||||
If CveMarca = 1086 Then
|
||||
REVCodEnsamble.ValidationExpression = "^[0-9]$"
|
||||
REVCodLinea.ValidationExpression = "^[0-9]$"
|
||||
Else
|
||||
REVCodEnsamble.ValidationExpression = "^[0-9][A-HJ-M]([[0-2][0-9]|3[0-1])[0-9A-Z][ACEN][2-5]$"
|
||||
REVCodLinea.ValidationExpression = "^[*]$"
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
If Not DdlPSAjuste.SelectedValue.ToEntero > 0 AndAlso DdlFacturas.SelectedValue.ToEntero > 0 Then
|
||||
@@ -5272,13 +5283,14 @@ Partial Class PV
|
||||
Dim CveMarca As Integer = -1
|
||||
|
||||
CveMarca = GlobalDTPS(UsuarioActual.CveEmpresa, DdlPSAjuste.SelectedValue.ToEntero).FiltroPrimeroValor("CveMarca", "").ToEntero
|
||||
|
||||
Dim ImportePagarCliente As Decimal = 0
|
||||
Dim ObjAcum As New ClsAcumuladores
|
||||
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.ToDecimal * TxtPUFactura.Text.ToDecimal).FormatoNumero
|
||||
ImportePagarCliente = TxtImporteAjuste.Text.ToDecimal
|
||||
|
||||
Dim CargoVendido As Decimal = 0
|
||||
Dim CargoGarantia As Decimal = 0
|
||||
@@ -5310,10 +5322,13 @@ Partial Class PV
|
||||
|
||||
TxtImporteAjuste.Text = "0.00"
|
||||
CargoGarantia = CargoVendido
|
||||
ImportePagarCliente = 0
|
||||
End If
|
||||
ImportePagarCliente = (TxtPrecio.Text.ToDouble - ((TxtPUFactura.Text.ToDouble - TxtImporteAjuste.Text.ToDouble) - (CargoVendido - CargoGarantia))).ToDecimal
|
||||
|
||||
TxtImporteAjuste.ToolTip = $"La diferencia de ajuste fue: {(TxtPrecio.Text.ToDouble - TxtImporteAjuste.Text.ToDouble).FormatoNumero()}. La diferencia de tamaños fue: {(CargoVendido - CargoGarantia).FormatoNumero}."
|
||||
TxtImporteAjuste.Text = ((TxtPUFactura.Text.ToDouble - TxtImporteAjuste.Text.ToDouble) - (CargoVendido - CargoGarantia)).FormatoNumero
|
||||
|
||||
TxtPagarCliente.Text = ImportePagarCliente.FormatoNumero
|
||||
Else
|
||||
Alert("El producto no tiene ajuste en ese periodo", TipoMensaje.MsgAdvertencia)
|
||||
'cuando no está registrada, no da ajuste
|
||||
@@ -5324,6 +5339,10 @@ Partial Class PV
|
||||
Alert("No se tiene especificado tabla de garantía")
|
||||
End If
|
||||
ObjAcum.Dispose()
|
||||
Else
|
||||
If DdlPSAjuste.SelectedValue.ToEntero <= 0 Then
|
||||
Alert("Especificar el producto a recibir")
|
||||
End If
|
||||
End If
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al recalcular el costo", ex)
|
||||
|
||||
Reference in New Issue
Block a user