From 766e9bff661107f0057b8734059e5f10ede3cf08 Mon Sep 17 00:00:00 2001 From: rrene Date: Tue, 19 Nov 2024 16:00:54 -0700 Subject: [PATCH] =?UTF-8?q?--=20emisi=C3=B3n=20con=20c=C3=B3digo=20y=20PS?= =?UTF-8?q?=20Alterno?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Ventas/Ventas.aspx.vb | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index 7910d3c62..6bd5b7bd1 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -807,6 +807,13 @@ Partial Class Ventas End Get End Property + Private ReadOnly Property ClienteUsaProductoAlterno As Boolean + Get + Return CType(IfNull(ViewState("ClienteUsaProductoAlterno"), "false").ToString(), Boolean) + End Get + End Property + + 'Cliente Private ReadOnly Property NombreCliente As String Get @@ -6986,6 +6993,7 @@ Partial Class Ventas LtlClienteMsg.Text += "
Cálculo sin desglose de IVA" End If ViewState("CargoUsado") = ObjCliente.CargoUsados + ViewState("ClienteUsaProductoAlterno") = ObjCliente.UsaProductoAlterno Dim dr As DataRow = Nothing dr = GlobalDTSubProyectos(UsuarioActual.CveEmpresa).FiltroPrimero("TipoSucursal = 1 And Estatus = 'Activo' ") @@ -13651,13 +13659,13 @@ Partial Class Ventas Dim totRetIVA As Decimal = Obj.RetIVA Dim totRetISR As Decimal = Obj.RetISR Dim i As Integer = 1 - Dim tPS As String + Dim tPS, tCodigo As String 'detalles For Each drr As DataRow In Obj.DtDetalle.Rows - If drr("PS").ToString().Length = 1 Then + If drr("PS").ToString.Length = 1 Then tPS = drr("Obs").ToString() Else - If drr("PS").ToString().Length = 0 Then + If drr("PS").ToString.Length = 0 Then tPS = "" Else tPS = String.Format("{0} {1}", drr("PS"), drr("Obs")) @@ -13665,6 +13673,12 @@ Partial Class Ventas End If tPS = tPS.Replace("|", " ") + tCodigo = drr("Noidentificacion").ToString() + + If ClienteUsaProductoAlterno AndAlso drr("CodigoAlterno").ToString <> "" Then + tPS = drr("PSAlterno").ToString() + tCodigo = drr("CodigoAlterno").ToString() + End If If tPS.Length >= 1000 Then Dim tPSRecortado As String = tPS.Remove(999, tPS.Length - 999) @@ -13682,7 +13696,7 @@ Partial Class Ventas .Unidad = drr("UM").ToString(), .ClaveUnidad = drr("SATClaveUM").ToString(), .ClaveProdServ = drr("SATClaveProdServ").ToString(), - .Noidentificacion = drr("Noidentificacion").ToString(), + .Noidentificacion = tCodigo, .CuentaPredial = drr("CuentaPredial").ToString(), .ImporteGravaIVAAdicional = drr("ImporteIEPS").ToString().ToDecimal, .ObjetoImpuesto = drr("CodigoObjetoImpuesto").ToString(),