Cambios BDH, ajuste y garantia
This commit is contained in:
@@ -6291,8 +6291,22 @@ Partial Class Ventas
|
||||
If ObjVentasAplciar.DtResultados.Rows.Count > 0 Then
|
||||
|
||||
If tCveSucursalCliente > 0 Then
|
||||
Retorno = ObjVentasAplciar.DtResultados(0)("LimiteRestanteSucursal").ToString().ToDecimal
|
||||
PorcentajeCredito = ObjVentasAplciar.DtResultados(0)("PorcentajeSaldoSucursal").ToString().ToDecimal
|
||||
|
||||
Dim LimiteRestanteSucursal As Decimal = ObjVentasAplciar.DtResultados(0)("LimiteRestanteSucursal").ToString().ToDecimal
|
||||
Dim PorcentajeSaldoSucursal As Decimal = ObjVentasAplciar.DtResultados(0)("PorcentajeSaldoSucursal").ToString().ToDecimal
|
||||
|
||||
Dim LimiteRestanteCliente As Decimal = ObjVentasAplciar.DtResultados(0)("LimiteRestanteCliente").ToString().ToDecimal
|
||||
Dim PorcentajeSaldoCliente As Decimal = ObjVentasAplciar.DtResultados(0)("PorcentajeSaldoCliente").ToString().ToDecimal
|
||||
|
||||
'SI EL LIMITE DE LA SUCURSAL ES MAYOR AL DEL CLIENTE DEBE LIMITAR AL DEL CLIENTE
|
||||
If LimiteRestanteSucursal > LimiteRestanteCliente Then
|
||||
Retorno = LimiteRestanteCliente
|
||||
PorcentajeCredito = PorcentajeSaldoCliente
|
||||
ElseIf LimiteRestanteSucursal < LimiteRestanteCliente Then
|
||||
Retorno = LimiteRestanteSucursal
|
||||
PorcentajeCredito = PorcentajeSaldoSucursal
|
||||
End If
|
||||
|
||||
Else
|
||||
Retorno = ObjVentasAplciar.DtResultados(0)("LimiteRestanteCliente").ToString().ToDecimal
|
||||
PorcentajeCredito = ObjVentasAplciar.DtResultados(0)("PorcentajeSaldoCliente").ToString().ToDecimal
|
||||
@@ -14402,7 +14416,7 @@ Partial Class Ventas
|
||||
' Alert("El importe registrado como descuento no coincide con el importe seleccionado de anticipo.", TipoMensaje.MsgAdvertencia)
|
||||
' Exit Sub
|
||||
'End If
|
||||
Dim TotalCalculableImpuestos As Decimal = 0
|
||||
Dim TotalCalculableImpuestos As Decimal = 0, TotalCalculableImpuestosIVA As Decimal = 0
|
||||
Dim TotalDescuentosRound As Decimal = 0
|
||||
Dim Cantidad, PU, Descuento, DescuentoRound As Decimal
|
||||
|
||||
@@ -14416,14 +14430,19 @@ Partial Class Ventas
|
||||
TotalDescuentosRound += DescuentoRound
|
||||
|
||||
TotalCalculableImpuestos = (Cantidad * (PU)) - Descuento
|
||||
TotalCalculableImpuestosIVA = TotalCalculableImpuestos * (1 + dr("PorcentajeIEPS").ToString().ToDecimal)
|
||||
|
||||
dr("Descuento") = DescuentoRound
|
||||
dr("TotalImporte") = Math.Round(Cantidad * PU, NumeroDecimales)
|
||||
dr("ImporteIVA") = Math.Round(dr("PorcentajeIVA").ToString().ToDecimal * TotalCalculableImpuestos, NumeroDecimales)
|
||||
dr("ImporteIEPS") = Math.Round(dr("PorcentajeIEPS").ToString().ToDecimal * TotalCalculableImpuestos, NumeroDecimales)
|
||||
dr("ImporteRetIVA") = Math.Round(ClienteRetIVA * TotalCalculableImpuestos, NumeroDecimales)
|
||||
dr("ImporteRetISR") = Math.Round(ClienteRetISR * TotalCalculableImpuestos, NumeroDecimales)
|
||||
|
||||
dr("Total") = (Cantidad * PU)
|
||||
dr("TotalImporte") = (Cantidad * PU).RoundSQL
|
||||
dr("ImporteIVA") = (dr("PorcentajeIVA").ToString().ToDecimal * TotalCalculableImpuestosIVA).RoundSQL(NumeroDecimales)
|
||||
dr("ImporteIEPS") = (dr("PorcentajeIEPS").ToString().ToDecimal * TotalCalculableImpuestos).RoundSQL(NumeroDecimales)
|
||||
dr("ImporteRetIVA") = (ClienteRetIVA * TotalCalculableImpuestos).RoundSQL(NumeroDecimales)
|
||||
dr("ImporteRetISR") = (ClienteRetISR * TotalCalculableImpuestos).RoundSQL(NumeroDecimales)
|
||||
dr("PorcentajeRetIVA") = ClienteRetIVA
|
||||
dr("PorcentajeRetISR") = ClienteRetISR
|
||||
|
||||
Next
|
||||
|
||||
'REVISA SI EXISTEN DIFERENCIAS ENTRE EL DESCUENTO Y LO AMORTIZADO PARA REALIZAR UN AJUSTE EN EL ULTIMO CONCEPTO AGREGADO
|
||||
@@ -15685,11 +15704,10 @@ Partial Class Ventas
|
||||
|
||||
End If
|
||||
|
||||
If DdlTipoComprobante.SelectedValue.Contiene("Rem") Then
|
||||
' IPP 15 Julio 2017 - ERA FALSE
|
||||
ImgAntiPend.Visible = False
|
||||
ElseIf Opcion <> "Op" Then
|
||||
If DdlTipoComprobante.SelectedValue.Contiene("Ing") Then
|
||||
ImgAntiPend.Visible = True
|
||||
Else
|
||||
ImgAntiPend.Visible = False
|
||||
End If
|
||||
|
||||
|
||||
@@ -15709,6 +15727,10 @@ Partial Class Ventas
|
||||
TrVistaPrevia.Visible = EstatusCliente
|
||||
End If
|
||||
|
||||
If DdlTipoComprobante.SelectedValue = "Ing" Then
|
||||
ImgAntiPend.Visible = True
|
||||
End If
|
||||
|
||||
MostrarOpcioensPaqueteria()
|
||||
|
||||
TrAtencionA.Visible = True
|
||||
@@ -15724,9 +15746,7 @@ Partial Class Ventas
|
||||
End Sub
|
||||
Protected Sub DdlSucursalCliente_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlSucursalCliente.SelectedIndexChanged
|
||||
CargaClienteSucursal(DdlSucursalCliente.SelectedValue.ToEntero())
|
||||
'If Me.CveVenta > 0 Then
|
||||
' CargaRestriccionesCreditoCliente(Alertas:=True)
|
||||
'End If
|
||||
CargaRestriccionesCreditoCliente(Alertas:=True, CveVenta:=Me.CveVenta)
|
||||
End Sub
|
||||
Protected Sub DdlCCEdit_SelectedIndexChanged(sender As Object, e As System.EventArgs)
|
||||
Dim gvr As GridViewRow = DirectCast(DirectCast(sender, DropDownList).BindingContainer, GridViewRow)
|
||||
@@ -27838,6 +27858,8 @@ Partial Class Ventas
|
||||
' BtnCrearApartirDe.Visible = False
|
||||
'End If
|
||||
|
||||
HdnCveVenta.Value = ""
|
||||
|
||||
BtnCrearApartirDe.Visible = False '[IPP-2Novimebre2018] REEMPLAZA LO COMENTADO ARRIBA
|
||||
EsCreaApartirDe = True
|
||||
ModalidadEdicion = True
|
||||
@@ -27885,6 +27907,7 @@ Partial Class Ventas
|
||||
'Cuando es cotización, Genera nueva cotizacion
|
||||
If DdlTipoComprobante.SelectedValue = "Cot" Then
|
||||
BtnEmitirImprimir.Text = "Cotizar"
|
||||
ImgAntiPend.Visible = False
|
||||
'TdReferencia.Style.Add("display", "none")
|
||||
End If
|
||||
|
||||
@@ -28015,6 +28038,8 @@ Partial Class Ventas
|
||||
|
||||
GvFacturasRelacionadas.Columns(2).Visible = True
|
||||
|
||||
CalculaTotalesVenta()
|
||||
|
||||
UpnTools.Update()
|
||||
UpCliente.Update()
|
||||
UpParametros.Update()
|
||||
|
||||
Reference in New Issue
Block a user