diff --git a/Ventas/PVCobranza.aspx.vb b/Ventas/PVCobranza.aspx.vb index aed195921..0d6547e6f 100644 --- a/Ventas/PVCobranza.aspx.vb +++ b/Ventas/PVCobranza.aspx.vb @@ -460,7 +460,7 @@ Partial Class Ventas_PVCobranza End If End If - If e.Row.DBCampo("Fecha") <> Now.ToShortDateString Then + If e.Row.DBCampo("Fecha").ToDate.ToShortDateString <> Now.ToShortDateString Then e.Row.FCLinkButton("BtnPagar").Enabled = False e.Row.FCLinkButton("BtnPagar").Text = "Cobrar" 'e.Row.FCLinkButton("BtnPagar").CssClass = "btn btn-xs default" @@ -831,7 +831,7 @@ Partial Class Ventas_PVCobranza End Try If MsgError = "" Then - If ObjConta.ValidacionesPrePoliza(CvePrePoliza, UsuarioActual, Opcion:=5, CveVenta:=respFactura.CveVenta) Then + If ObjConta.ValidacionesPrePoliza(CvePrePoliza, UsuarioActual, Opcion:=5, CveVenta:=CveVenta) Then If ObjConta.ValorPolizaDescuadre > 0 Then GuardaLogAD($"Ventas/Ventas-NCGeneradas | Error:{ObjConta.MensajePolizaDescuadre} Diferencia:{ObjConta.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas") End If @@ -896,38 +896,36 @@ Partial Class Ventas_PVCobranza msBuild.AppendFormat("{0}", pdfNC) End If - If respNC IsNot Nothing Then - For Each dr As DataRow In respNC.Factura.DtAnticiposAplicados.Rows - msBuild.AppendLine($"
Imprimir Saldo Aplicado {dr("Folio").ToString}
") - Next - Else - For Each dr As DataRow In respFactura.Factura.DtAnticiposAplicados.Rows - msBuild.AppendLine($"
Imprimir Saldo Aplicado {dr("Folio").ToString}
") - Next - End If + If respNC IsNot Nothing Then + If respNC IsNot Nothing AndAlso respNC.Factura IsNot Nothing Then + For Each dr As DataRow In respNC.Factura.DtAnticiposAplicados.Rows + msBuild.AppendLine($"
Imprimir Saldo Aplicado {dr("Folio").ToString}
") + Next + End If + + Else + If respFactura IsNot Nothing AndAlso respFactura.Factura IsNot Nothing Then + For Each dr As DataRow In respFactura.Factura.DtAnticiposAplicados.Rows + msBuild.AppendLine($"
Imprimir Saldo Aplicado {dr("Folio").ToString}
") + Next + End If + End If If Not String.IsNullOrEmpty(MsgTimbrado) Then msBuild.AppendFormat("
{0}
", MsgTimbrado) End If - - - - - - - Else msBuild.Append($"Pago Registrado correctamente.

Imprimir ticket") End If @@ -948,7 +946,6 @@ Partial Class Ventas_PVCobranza If UsuarioActual.Empresa.Funcionalidad(109) = "1" Then ImpresionDirectaPDF(CveVenta) End If - LimpiarDatos() CargaDatos()