merge en ventas.pv

This commit is contained in:
2020-01-27 13:33:20 -07:00
32 changed files with 1686 additions and 1310 deletions

View File

@@ -4654,6 +4654,7 @@ Partial Class PV
DivCorreoCuentaCliente.Visible = False
DivBotonesAgregarCliente.Visible = False
DivFormaCliente.Visible = False
TxtRFCCliente.Text = "XAXX010101000"
UpAgregarCliente.Update()
RegistraScript("showDivEC();")
@@ -5246,6 +5247,7 @@ Partial Class PV
DdlTipoUso.DataBind()
HdnPSAjusteMarca.Value = CveMarca.ToString()
End If
If Not DdlPSAjuste.SelectedValue.ToEntero > 0 AndAlso DdlFacturas.SelectedValue.ToEntero > 0 Then
@@ -5276,13 +5278,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
@@ -5314,10 +5317,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
@@ -5328,6 +5334,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)