--Ferretera. facturar un ticket sobre una factura global.

This commit is contained in:
2024-04-20 16:20:57 -07:00
parent 581af28f3b
commit 09494417f1
3 changed files with 68 additions and 3 deletions

View File

@@ -286,10 +286,14 @@ Partial Class Ventas_PVCobranza
'e.Row.CssClass = "blue-madison"
End If
If e.Row.DBCampo("CveCondicionEntrega").ToEntero() = 9 Then
If e.Row.DBCampo("CveCondicionEntrega").ToEntero() = 9 OrElse e.Row.DBCampo("AplicaImpresionPorAnt").ToEntero() = 1 Then
e.Row.FCLinkButton("LnkImprimir").Visible = True
ScriptManager.GetCurrent(Me).RegisterPostBackControl(e.Row.FCLinkButton("LnkImprimir"))
End If
If e.Row.DBCampo("AplicaImpresionPorAnt").ToEntero() = 1 Then
e.Row.FCLinkButton("BtnPagar").Visible = False
End If
End If
End Sub
@@ -777,7 +781,19 @@ Partial Class Ventas_PVCobranza
pdf64 = Convert.ToBase64String(ms.ToArray())
End Using
RegistraScript($"impresionBase64('{pdf64}');", "Imprimir")
If Not String.IsNullOrEmpty(pdf64) Then
Using ObjVentas As New ClsVentas
If Not ObjVentas.UpdateVentaTicketImpreso(CveVenta, 0) Then
pdf64 = ""
Alert("No se pudo desmarcar la impresión", TipoMensaje.MsgError)
End If
End Using
End If
If Not String.IsNullOrEmpty(pdf64) Then
RegistraScript($"impresionBase64('{pdf64}');", "Imprimir")
End If
Else
Alert("No se pudo imprimir el pdf directamente. favor de descargar manualmente el pdf.", TipoMensaje.MsgAdvertencia)
End If
@@ -801,6 +817,7 @@ Partial Class Ventas_PVCobranza
If CveVenta > 0 Then
ImpresionDirectaPDF(CveVenta)
CargaDatos()
End If
End Sub