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