Correcion de fechas de vencimiento y aplicacion de descuento por pronto pago
This commit is contained in:
@@ -9490,7 +9490,7 @@ Partial Class Ventas
|
||||
End If
|
||||
|
||||
'VERIFICA QUE EL SALDO DISPONIBLE SEA MENOR AL IMPORTE
|
||||
If ObjFactura.TipoDocto = "Rem" AndAlso Me.SaldoLineaAdicional <= ObjFactura.Total Then
|
||||
If ObjFactura.TipoDocto = "Rem" AndAlso Me.SaldoLineaAdicional < ObjFactura.Total Then
|
||||
TmpDT = TmpDTError.Copy()
|
||||
CalculaTotalesVenta(RecalcularTotalOriginal:=False)
|
||||
Alert("El saldo de la linea adicional debe ser mayor o igual al de la remisión", TipoMensaje.MsgAdvertencia)
|
||||
@@ -9504,7 +9504,7 @@ Partial Class Ventas
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
If ObjFactura.TipoDocto = "Ing" AndAlso Me.SaldoIngresosLineaAdicional <= ObjFactura.Total Then
|
||||
If ObjFactura.TipoDocto = "Ing" AndAlso Me.SaldoIngresosLineaAdicional < ObjFactura.Total Then
|
||||
TmpDT = TmpDTError.Copy()
|
||||
CalculaTotalesVenta(RecalcularTotalOriginal:=False)
|
||||
Alert("El saldo de la linea adicional debe ser mayor o igual al de la factura", TipoMensaje.MsgAdvertencia)
|
||||
@@ -17727,6 +17727,7 @@ Partial Class Ventas
|
||||
Private Sub CambiaTipoComprobante()
|
||||
CambiaTipoDocto()
|
||||
LimpiaEscondeContado()
|
||||
|
||||
End Sub
|
||||
Private Sub CambiaTipoDocto()
|
||||
CargaNC(IfNull(Request("CveDevolucion"), "-1").ToString().ToEntero())
|
||||
@@ -17884,6 +17885,8 @@ Partial Class Ventas
|
||||
|
||||
TxtFechaPago.Text = Now.AddDays(PlazoCobranza).ToShortDateString
|
||||
|
||||
DdlLineaAdicional_SelectedIndexChanged(DdlLineaAdicional, EventArgs.Empty)
|
||||
|
||||
TabAlmacen.Enabled = DdlTipoComprobante.SelectedValue <> "Ant"
|
||||
|
||||
'VALIDA ESTATUS CLIENTE - SOLO SE PUEDE USAR EL CLIENTE PARA COTIZAR EN CASO DE ESTAR INACTIVO
|
||||
@@ -18688,7 +18691,9 @@ Partial Class Ventas
|
||||
|
||||
'SI TIENE PRONTO PAGO CALCULA EL IMPORTE
|
||||
If DdlTipoComprobante.SelectedValue = "Ing" AndAlso RowPorcentaje("ProntoPago").ToString().ToDecimal() > 0 Then
|
||||
Dim TotalProntoPago As Decimal = (Cantidad * (PU)) - Descuento
|
||||
Dim SubTotalProntoPago As Decimal = (Cantidad * (PU)) - Descuento
|
||||
Dim TotalProntoPago As Decimal = SubTotalProntoPago * (1 + PorcentajeIVA)
|
||||
|
||||
Dim PorcentajeProntoPago = RowPorcentaje("ProntoPago").ToString().ToDecimal() / 100D
|
||||
|
||||
ObjDescuento.ImporteProntoPago = (TotalProntoPago * PorcentajeProntoPago).RoundSQL(2)
|
||||
@@ -22649,6 +22654,8 @@ Partial Class Ventas
|
||||
imgCalendario.Visible = False
|
||||
End If
|
||||
|
||||
DdlLineaAdicional_SelectedIndexChanged(DdlLineaAdicional, EventArgs.Empty)
|
||||
|
||||
UpContado.Update()
|
||||
UPCondicionesPago.Update()
|
||||
End Sub
|
||||
@@ -32063,6 +32070,8 @@ Partial Class Ventas
|
||||
|
||||
TxtFechaPago.Text = If(EsDiasCreditoFijo, Now.AddDays(DiasCredito).ToShortDateString, TxtFechaPago.Text)
|
||||
|
||||
DdlLineaAdicional_SelectedIndexChanged(DdlLineaAdicional, EventArgs.Empty)
|
||||
|
||||
UpRemisionesFacturas.Update()
|
||||
UpFacturar.Update()
|
||||
UpPS.Update()
|
||||
@@ -32734,9 +32743,12 @@ Partial Class Ventas
|
||||
ObjCliente.Dispose()
|
||||
DdlTipoRetencion_SelectedIndexChanged(DdlTipoRetencion, EventArgs.Empty)
|
||||
|
||||
|
||||
TrVistaPrevia.Visible = True
|
||||
TxtFechaVencimientoCotizacion.Text = Now.ToShortDateString
|
||||
|
||||
DdlLineaAdicional_SelectedIndexChanged(DdlLineaAdicional, EventArgs.Empty)
|
||||
|
||||
'HABILITA EDITAR Y ELIMINAR DEL GV
|
||||
GvPS.Columns(17).Visible = True
|
||||
GvPS.Columns(18).Visible = True
|
||||
@@ -32968,6 +32980,8 @@ Partial Class Ventas
|
||||
TxtFechaPago.Text = If(TipoDoctoViejo = "Rem" AndAlso EsDiasCreditoFijo, Now.AddDays(DiasCredito), If(DdlTipoComprobante.SelectedValue = "Rem", Now.AddDays(PlazoCobranzaRemision), Now.AddDays(PlazoCobranza))).ToShortDateString
|
||||
TxtFechaEjecucion.Text = Now.ToString()
|
||||
|
||||
DdlLineaAdicional_SelectedIndexChanged(DdlLineaAdicional, EventArgs.Empty)
|
||||
|
||||
'VALIDAR QUE NO SE HAYA REMISIONADO
|
||||
If TipoDoctoViejo = "PA" Then
|
||||
Dim RowVenta As DataRow = Nothing
|
||||
@@ -36318,6 +36332,8 @@ Partial Class Ventas
|
||||
|
||||
|
||||
Protected Sub DdlLineaAdicional_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(705) = "1" Then
|
||||
TxtFechaPago.Enabled = True
|
||||
imgCalendario.Visible = True
|
||||
|
||||
@@ -36336,9 +36352,12 @@ Partial Class Ventas
|
||||
'AL FACTURAR CON LINEA ADICIONAL TIPO PO, SE SUMARÁN LOS DIAS DE VENCIMIENTO A LA FECHA ACTUAL
|
||||
If RowLinea("TipoLinea").ToString() = "2" Then
|
||||
TxtFechaPago.Text = Now.AddDays(RowLinea("DiasVencimiento").ToString().ToEntero()).ToString("dd/MM/yyyy")
|
||||
Else
|
||||
TxtFechaPago.Text = RowLinea("FechaVencimiento").ToString().ToDateTime().ToString("dd/MM/yyyy")
|
||||
End If
|
||||
|
||||
TxtFechaPago.Enabled = False
|
||||
imgCalendario.Visible = False
|
||||
End If
|
||||
|
||||
TxtOrdenCompra.Text = RowLinea("LineaAdicionalComercializador").ToString()
|
||||
End If
|
||||
@@ -36396,6 +36415,8 @@ Partial Class Ventas
|
||||
UpParametros.Update()
|
||||
UPCondicionesPago.Update()
|
||||
UPObservaciones.Update()
|
||||
End If
|
||||
|
||||
End Sub
|
||||
Protected Sub LnkUpdateLineaAdicional_Click(sender As Object, e As EventArgs)
|
||||
'VALIDAR LINEAS ADICIONALES
|
||||
@@ -36432,7 +36453,7 @@ Partial Class Ventas
|
||||
End If
|
||||
|
||||
'VERIFICA QUE EL SALDO DISPONIBLE SEA MENOR AL IMPORTE
|
||||
If Me.SaldoLineaAdicional <= TxtTotal.Text.ToDecimal() Then
|
||||
If Me.SaldoLineaAdicional < TxtTotal.Text.ToDecimal() Then
|
||||
Alert("El saldo de la linea adicional debe ser mayor o igual al de la factura", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
Reference in New Issue
Block a user