Ferretera.
--Impresión del ticket solo en cobranza de caja, y el formato tamaño carta, normalmente --Ventas. en modal de anticipos, poner un filtrador --Poder cambiar el vendedor, para facturar si viene de cotización
This commit is contained in:
@@ -576,8 +576,12 @@ Partial Class Ventas_PVCobranza
|
||||
Dim ObjFactura As New Modelos.Factura(UsuarioActual, CveVenta, UsuarioActual.CveEmpresa, CargaDTDetalle:=False, CargaDatosCliente:=False, CargaDatosRelacionados:=False, VerificaAlmacen:=False)
|
||||
|
||||
Dim ExistePDF As Boolean = False
|
||||
Dim ArchivoPDF As String = String.Format("{0}/PDF/{1}/{2}.pdf", UsuarioActual.Empresa.Ruta, ObjFactura.TipoDocto, ObjFactura.SerieFolio)
|
||||
|
||||
Dim ArchivoPDF As String = ""
|
||||
If ObjFactura.TipoDocto = "Ing" Then
|
||||
ArchivoPDF = String.Format("{0}/PDF/{1}/{2}_Ticket.pdf", UsuarioActual.Empresa.Ruta, ObjFactura.TipoDocto, ObjFactura.SerieFolio)
|
||||
Else
|
||||
ArchivoPDF = String.Format("{0}/PDF/{1}/{2}.pdf", UsuarioActual.Empresa.Ruta, ObjFactura.TipoDocto, ObjFactura.SerieFolio)
|
||||
End If
|
||||
If File.Exists(ArchivoPDF) AndAlso ObjFactura.TipoDocto = "Rem" Then
|
||||
ExistePDF = True
|
||||
Else
|
||||
|
||||
@@ -4568,6 +4568,13 @@
|
||||
<br />
|
||||
|
||||
<div style="max-height: 300px; overflow-y: auto;">
|
||||
<div class="row" style="margin-left: 0px; text-align: right" align="left">
|
||||
<div style="margin-right: 15px">
|
||||
<input type="text" id="TxtBusquedaAnticipos" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusquedaAnticipos','{0}')", GVAnticipos.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusquedaAnticipos','{0}')", GVAnticipos.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
<asp:GridView ID="GVAnticipos" runat="server" AutoGenerateColumns="False" ClientIDMode="Static" EmptyDataText="No se encontraron Anticipos del Cliente"
|
||||
ToolTip="Listado de Anticipos" CssClass="GVAnticipos table table-striped table-hover Widthall" data-height="300" Style="text-align: center;" GridLines="None"
|
||||
DataKeyNames="ISTotal,Saldo,CveIE,Folio,Tipo,CveVenta,CveConceptoContable,CveConceptoContableAmor, TotalAnticipo, SubTotalAnticipo, IVAAnticipo,IEPS, ImpuestosLocalesAnticipo, SubTotalAmortizacion, SubTotal, Original, IVA, RetIVA, RetISR, FolioFiscal, CveClasificacionNC, TipoCambio,TipoCambioPago,TipoCambioHoy, CveMoneda,Fecha,SaldoSubTotal,SaldoConImpuestos,RegresarImpuesto,DevolucionImportePagado,CveCliente,Descuentos">
|
||||
|
||||
@@ -5599,6 +5599,11 @@ Partial Class Ventas
|
||||
DdlVendedor.Enabled = False
|
||||
End If
|
||||
|
||||
'PERMITIR EDITAR EL VENDEDOR ANTES DE FACTURAR
|
||||
If UsuarioActual.Empresa.Funcionalidad(109) = "1" AndAlso (CveVenta > 0 AndAlso DdlTipoComprobante.SelectedValue = "Cot" AndAlso TmpDT IsNot Nothing AndAlso TmpDT.SUM("CantidadFacturadaCot") = 0) Then
|
||||
DdlVendedor.Enabled = True
|
||||
End If
|
||||
|
||||
If CveVentaPadre > 0 Then
|
||||
If IsNothing(Request("CveDevolucion")) AndAlso IsNumeric(Request("CveDevolucion")) Then
|
||||
DdlNCFactura.Visible = True
|
||||
@@ -5802,6 +5807,10 @@ Partial Class Ventas
|
||||
'DdlSucursalEjecucion.Enabled = False
|
||||
'DdlSucursalCobranza.Enabled = False
|
||||
DdlVendedor.Enabled = False
|
||||
'PERMITIR EDITAR EL VENDEDOR ANTES DE FACTURAR
|
||||
If UsuarioActual.Empresa.Funcionalidad(109) = "1" AndAlso (CveVenta > 0 AndAlso DdlTipoComprobante.SelectedValue = "Cot" AndAlso TmpDT IsNot Nothing AndAlso TmpDT.SUM("CantidadFacturadaCot") = 0) Then
|
||||
DdlVendedor.Enabled = True
|
||||
End If
|
||||
DdlSucursalCliente.Enabled = False
|
||||
TxtTiempoEntrega.Enabled = False
|
||||
TxtAlfa1.ReadOnly = True
|
||||
@@ -18322,6 +18331,11 @@ Partial Class Ventas
|
||||
DdlVendedor.Enabled = True
|
||||
End If
|
||||
|
||||
'PERMITIR EDITAR EL VENDEDOR ANTES DE FACTURAR
|
||||
If UsuarioActual.Empresa.Funcionalidad(109) = "1" AndAlso (CveVenta > 0 AndAlso DdlTipoComprobante.SelectedValue = "Cot" AndAlso TmpDT IsNot Nothing AndAlso TmpDT.SUM("CantidadFacturadaCot") = 0) Then
|
||||
DdlVendedor.Enabled = True
|
||||
End If
|
||||
|
||||
UPPVentas.Update()
|
||||
'TxtCorreoNotificaciones.Text = GlobalDTUsuarios(UsuarioActual.CveUsuario).FiltroPrimeroValor("Correo")
|
||||
End Sub
|
||||
@@ -37690,22 +37704,7 @@ Partial Class Ventas
|
||||
End If
|
||||
|
||||
If ExistePDF Then
|
||||
Dim pdf64 As String = ""
|
||||
'DUPLICA EL PDF
|
||||
Using ms As New MemoryStream
|
||||
Using pdfdoc As New iText.Kernel.Pdf.PdfDocument(New iText.Kernel.Pdf.PdfWriter(ms))
|
||||
pdfdoc.InitializeOutlines()
|
||||
Dim reporteByte As New MemoryStream(System.IO.File.ReadAllBytes(ArchivoPDF))
|
||||
|
||||
Dim docPDF As New iText.Kernel.Pdf.PdfDocument(New iText.Kernel.Pdf.PdfReader(reporteByte))
|
||||
docPDF.CopyPagesTo(1, docPDF.GetNumberOfPages(), pdfdoc)
|
||||
docPDF.CopyPagesTo(1, docPDF.GetNumberOfPages(), pdfdoc)
|
||||
docPDF.Close()
|
||||
|
||||
pdfdoc.Close()
|
||||
End Using
|
||||
pdf64 = Convert.ToBase64String(ms.ToArray())
|
||||
End Using
|
||||
Dim pdf64 = Convert.ToBase64String(System.IO.File.ReadAllBytes(ArchivoPDF))
|
||||
|
||||
RegistraScript($"impresionBase64('{pdf64}');", "Imprimir")
|
||||
Else
|
||||
|
||||
Reference in New Issue
Block a user