This commit is contained in:
Luis Quijada
2025-04-23 19:08:16 -07:00
5 changed files with 43 additions and 6 deletions

View File

@@ -78,6 +78,7 @@ Public Class ClsPaginas
If Dominio.Contains("VYA".ToUpper()) Then Retorno = "VYA"
If Dominio.Contains("GRUPODIAZ".ToUpper()) Then Retorno = "GRUPODIAZ"
If Dominio.Contains("FERRETERA".ToUpper()) Then Retorno = "FERRETERA"
If Dominio.Contains("JUMBOLON".ToUpper()) Then Retorno = "JUMBOLON"
Return Retorno
End Get
End Property

View File

@@ -223,8 +223,6 @@ table.adssigscroll {
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="True" EmptyDataText=""
CssClass="table table-striped table-advance table-hover Widthall adssigrid-scroll adssigrid-order" data-cols="1" data-rows="2"
data-sort="true" GridLines="None">
<HeaderStyle CssClass="Titulos" />
<RowStyle CssClass="Texto" />
<AlternatingRowStyle CssClass="TextoAlterno" />
</asp:GridView>

View File

@@ -244,6 +244,7 @@
<ReportParameter Name="Lote">
<DataType>String</DataType>
<Prompt>ReportParameter1</Prompt>
<AllowBlank>true</AllowBlank>
</ReportParameter>
<ReportParameter Name="FechaCad">
<DataType>String</DataType>

View File

@@ -4,7 +4,6 @@
Imports System.Data
Imports ADSTimbrado
Imports Extensiones
Imports Org.BouncyCastle.Ocsp
Partial Class Ventas_ClientesAbonar
Inherits ClsPaginas
@@ -743,6 +742,36 @@ Partial Class Ventas_ClientesAbonar
Exit Sub
End If
If UsuarioActual.Empresa.Funcionalidad(382) = "1" AndAlso RblTipoPago.SelectedValue = "3" Then
Dim DtSaldo As DataTable = Nothing
Dim ObjMovto As New ClsMovimientos
If ObjMovto.GetIngresosSaldosDetalle(CveCliente, -1, UsuarioActual.CveEmpresa) Then
DtSaldo = ObjMovto.DtResultados.FiltraParametros($"CveIE={DdlIngreso.SelectedValue.ToEntero()}")
End If
ObjMovto.Dispose()
If DtSaldo IsNot Nothing AndAlso DtSaldo.Rows.Count = 1 Then
Dim ImporteRef As Decimal = DtSaldo.SUM("Saldo", $"CveIE={DdlIngreso.SelectedValue.ToEntero()}")
Dim ImporteAbonar As Decimal = 0
For Each gvr As GridViewRow In GvCxC.Rows
If gvr.FCCheckBox("Chk").Checked Then
ImporteAbonar += gvr.FCTextBox("TxtAbonar").Text.ToDecimal()
End If
Next
ImporteAbonar += TxtAnticipo.Text.ToDecimal()
If ImporteRef.RoundSQL(2) <> ImporteAbonar.RoundSQL(2) Then
Alert("El importe abonado es diferente al saldo del ingreso", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
Else
Alert("No se pudieron validar los saldos", TipoMensaje.MsgError)
Exit Sub
End If
End If
Dim Cuenta As String = ""
Dim CuentaDeposito As String = ""

View File

@@ -674,6 +674,12 @@ Partial Class Ventas_PVCobranza
End If
Dim tCveCorte As Integer = CveCorte
If tCveCorte <= 0 Then
Alert("No se puede realizar el pago. Debe tener un corte activo", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
Dim CveVenta As Integer = HdnCveVenta.Value.ToEntero
Dim CveVentaRemision As Integer = -1
@@ -712,7 +718,7 @@ Partial Class Ventas_PVCobranza
Dim PedidoContrato = DbRowVenta("PedidoContrato").ToString()
Dim OrdenCompra = DbRowVenta("OrdenCompra").ToString()
If tCveCorte <= 0 AndAlso DbRowVenta("CveCorte").ToString.ToEntero > 0 Then tCveCorte = DbRowVenta("CveCorte").ToString.ToEntero
'If tCveCorte <= 0 AndAlso DbRowVenta("CveCorte").ToString.ToEntero > 0 Then tCveCorte = DbRowVenta("CveCorte").ToString.ToEntero
Dim CvePrePoliza As Integer = -1
Dim Fecha As Date = DbRowVenta("Fecha").ToString.ToDate 'NowADS()
@@ -741,7 +747,7 @@ Partial Class Ventas_PVCobranza
CveVentaRemision = HdnCveVenta.Value.ToEntero
respFactura = GenerarFactura(CveVendedor, VentaActual, ObjVentas2, ObjClientes, ObservacionesAlmacen, VentaContado, PlazoCobranza, Observaciones, PedidoContrato, OrdenCompra)
respFactura = GenerarFactura(tCveCorte, CveVendedor, VentaActual, ObjVentas2, ObjClientes, ObservacionesAlmacen, VentaContado, PlazoCobranza, Observaciones, PedidoContrato, OrdenCompra)
If respFactura Is Nothing Then
MsgError = "Ocurrió un error al generar la factura"
@@ -1275,7 +1281,7 @@ Partial Class Ventas_PVCobranza
UpL.Update()
End Sub
Private Function GenerarFactura(CveVendedor As Integer, ByRef VentaRemision As Venta, ByRef ObjVentas As ClsVentas, ByRef ObjClientes As ClsClientes, ObservacionesAlmacen As String, VentaConta As Boolean, PlazoCobranza As Integer, Observaciones As String, PedidoContrato As String, OrdenCompra As String) As Modelos.Factura.MMensajeFactura
Private Function GenerarFactura(CveCorte As Integer, CveVendedor As Integer, ByRef VentaRemision As Venta, ByRef ObjVentas As ClsVentas, ByRef ObjClientes As ClsClientes, ObservacionesAlmacen As String, VentaConta As Boolean, PlazoCobranza As Integer, Observaciones As String, PedidoContrato As String, OrdenCompra As String) As Modelos.Factura.MMensajeFactura
Dim Retorno As Modelos.Factura.MMensajeFactura = Nothing
Dim SbAlert As New StringBuilder()
Dim SBAmortizaciones As New StringBuilder
@@ -1460,6 +1466,8 @@ Partial Class Ventas_PVCobranza
End If
End If
ObjFactura.CveCorte = CveCorte
Retorno = ObjFactura.EmitirFactura(False, Transac:=ObjVentas.IniciaTransacSQL(), Modulo:="Cobranza/GuardarVenta", MostrarURL:=True)
Retorno.Factura = ObjFactura