From f4ab75336418ee86e00d53964a245c9fd8b3131c Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Sat, 30 Apr 2022 15:32:53 -0700 Subject: [PATCH 1/5] Cancelar como refacturacion las que tienen el estatus de refacturacion en 4 --- App_Code/Modelos.vb | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/App_Code/Modelos.vb b/App_Code/Modelos.vb index e6fbe82fd..7a6893c9d 100644 --- a/App_Code/Modelos.vb +++ b/App_Code/Modelos.vb @@ -4668,6 +4668,13 @@ Namespace Modelos Dim TieneAlmacen As Boolean = False Dim AplicaRefacturacionConPagos As Boolean = False + Dim CveEstatusRefacturacion As Integer = If(ObjFactura.CveEstatusRefacturacion <= 0, 0, ObjFactura.CveEstatusRefacturacion) + + 'SI YA FUE MARCADA COMO REFACTURACION Y FUE SEPARADA, MANTENER EL COMPORTAMIENTO DE CANCELACION COMO REFACTURACION + If Not EsRefacturacion AndAlso CveEstatusRefacturacion = 4 Then + EsRefacturacion = True + End If + '1 NORMAL, 2 CON PAGOS Dim ModalidadRefacturacion As Integer = UsuarioActual.Empresa.Funcionalidad(586).ToEntero() @@ -4800,11 +4807,7 @@ Namespace Modelos Return Retorno End If - - Dim CveEstatusRefacturacion As Integer = If(ObjFactura.CveEstatusRefacturacion <= 0, 0, ObjFactura.CveEstatusRefacturacion) - - - If Not EsRefacturacion Then + If Not EsRefacturacion AndAlso CveEstatusRefacturacion <> 4 Then CveEstatusRefacturacion = 0 End If From a5e12e0544af7a3eddb0b46e9b6387fa9a4381ca Mon Sep 17 00:00:00 2001 From: rakcsle Date: Mon, 2 May 2022 13:00:41 -0700 Subject: [PATCH 2/5] Compras refacturacion, Nominas layout Banorte, RegPrepolizas --- App_Code/ClsContabilidad.vb | 4 ++- Compras/Compras.aspx | 2 +- Compras/Compras.aspx.vb | 39 +++++++++++++++++++---- Compras/Proveedores.aspx.vb | 5 --- Compras/eFacturas.aspx.vb | 49 ++++++++++++++++++----------- Contabilidad/RegPrePolizaS.aspx.vb | 8 ++++- Empresas/141/Formatos/CHQ-7452.rdlc | 10 +++--- Nomina/Nomina.aspx.cs | 7 +++-- 8 files changed, 83 insertions(+), 41 deletions(-) diff --git a/App_Code/ClsContabilidad.vb b/App_Code/ClsContabilidad.vb index 20a20bd32..2d0ab9c7d 100644 --- a/App_Code/ClsContabilidad.vb +++ b/App_Code/ClsContabilidad.vb @@ -1188,8 +1188,10 @@ Public Class ClsContabilidad Catch ex As Exception If ex.Message.Contains("50015;") Then OnError("No se puede actualizar una póliza en un ejercicio Cerrado", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + ElseIf ex.Message.Contains("IDX_UN_ContaPrePolizasCveEmpresaCveTipoPolizaFoliosAnioMes") Then + OnError($"El Folio {Folio} ya esta registrado.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) Else - OnError("Ocurrió un error al contabilizar las prepoliza detalle.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + OnError("Ocurrió un error al contabilizar las prepoliza detalle.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) End If End Try Return Retorno diff --git a/Compras/Compras.aspx b/Compras/Compras.aspx index 333a8f44d..4a67fbb34 100644 --- a/Compras/Compras.aspx +++ b/Compras/Compras.aspx @@ -5844,7 +5844,7 @@ } //var SaldoCompra = parseFloat(parseFloat($get('HdnCompraSaldo').value).toFixed(2)); - var SaldoCompra = (Total - FnSumaValoresAnt() + txtvalue).toFixed(2); // le agrego lo del valor actual para validarlo + var SaldoCompra = (TotalSaldo - FnSumaValoresAnt() + txtvalue).toFixed(2); // le agrego lo del valor actual para validarlo diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb index 399a06781..859abbf64 100644 --- a/Compras/Compras.aspx.vb +++ b/Compras/Compras.aspx.vb @@ -1025,6 +1025,21 @@ Partial Class Compras_Compras End Set End Property + Private Property SubTotalRefacturacion As Decimal + Get + + If ViewState("SubTotalRefacturacion") Is Nothing Then + ViewState("SubTotalRefacturacion") = 0.0D + End If + + Return ViewState("SubTotalRefacturacion").ToString.ToDecimal + + End Get + Set(value As Decimal) + ViewState("SubTotalRefacturacion") = value + End Set + End Property + Private Property IVAOriginal As Double Get @@ -2165,7 +2180,7 @@ Partial Class Compras_Compras DdlRetIVAConcepto.Items.Add(New ListItem("Arrendamiento", "4")) ''If UsuarioActual.Empresa.Funcionalidad(577).ToEntero = 1 Then - 'DdlRetIVAConcepto.Items.Add(New ListItem("Ret IVA Servicios", "5")) + DdlRetIVAConcepto.Items.Add(New ListItem("Ret IVA Servicios", "5")) ''End If End If @@ -5925,7 +5940,7 @@ Partial Class Compras_Compras Dim Concepto As String = ObjConta.ObtenerConceptoEmpresa(UsuarioActual.CveEmpresa, ConceptoContable, NombreProveedor, $"{TxtSerie.Text}-{TxtFolio.Text}", If(TxtDocumentoFolio.Visible, TxtDocumentoFolio.Text, If(TxtDocumentoFolioCaja.Visible, TxtDocumentoFolioCaja.Text, ConceptoPersonal))) Dim importeMN As Decimal = 0 - Dim Multiplicador As Integer = If(Row("Multiplicador").ToString.ToEntero = 1, -1, 1) + Dim Multiplicador As Integer = If(Row("Multiplicador").ToString.ToEntero = 1, 1, -1) Dim Referencia As String = $"{TxtSerie.Text}-{TxtFolio.Text}" ' concatenation interpolation @@ -6314,7 +6329,7 @@ Partial Class Compras_Compras Funcionalidad = 313 ConceptoContable = 248 ElseIf DdlRetIVAConcepto.SelectedValue.ToEntero = 5 Then - Funcionalidad = 577 + Funcionalidad = 578 ConceptoContable = 285 End If @@ -6517,7 +6532,14 @@ Partial Class Compras_Compras Exit Select 'Es credito el concepto 6 se agrega en CASE 17 End If - If Not CveCompraRefacturacion > 0 OrElse (ChkRefacNC.Checked) Then + + Dim DifSubTotatles As Decimal = 0D + + If CveCompraRefacturacion > 0 Then + DifSubTotatles = Math.Abs(SubTotalRefacturacion - TxtSubTotal2.Text.ToDecimal) + End If + + If DifSubTotatles > 0 Or (Not CveCompraRefacturacion > 0 OrElse (ChkRefacNC.Checked)) Then 'AF TipoAF 2 Es para las compras DT = TmpDT.FiltraParametros("ISNULL(TipoAF,0) = 2 And ISNULL(AplicaCostoIndirecto,0) <> 1 ") If DT.Rows.Count > 0 AndAlso Not DdlTipoComprobante.SelectedValue.Contiene("NC", "DEV", "Ant") Then @@ -8972,7 +8994,7 @@ Partial Class Compras_Compras IdCtaContable = 0 Dim Concepto As String = String.Format("{0}-{1}", TxtSerie.Text, TxtFolio.Text) Dim importeMN As Decimal = 0 - Dim Multiplicador As Integer = If(Row("Multiplicador").ToString.ToEntero = 1, -1, 1) + Dim Multiplicador As Integer = If(Row("Multiplicador").ToString.ToEntero = 1, 1, -1) Dim PorcentajeImpuesto As Decimal = 0 Dim ConceptoPartida As String = String.Format("{0}-{1}", TxtSerie.Text, TxtFolio.Text) @@ -10591,7 +10613,7 @@ Partial Class Compras_Compras Dim importeMovimiento As Decimal = 0 Dim IdCtaContable As Integer = 0 Dim importeMN As Decimal = 0 - Dim Multiplicador As Integer = If(Row("Multiplicador").ToString.ToEntero = 1, -1, 1) + Dim Multiplicador As Integer = If(Row("Multiplicador").ToString.ToEntero = 1, 1, -1) Dim Referencia As String = $"{TxtSerie.Text}-{TxtFolio.Text}" ' concatenation interpolation Select Case ConceptoContable @@ -14731,14 +14753,19 @@ Partial Class Compras_Compras Private Sub DdlRefacturacionFacturas_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlRefacturacionFacturas.SelectedIndexChanged + SubTotalRefacturacion = 0.0D + If DdlRefacturacionFacturas.SelectedValue.ToEntero > 0 Then Dim dr As DataRow = DtRefacturacion.FiltroPrimero(String.Format("CveCompra ={0}", DdlRefacturacionFacturas.SelectedValue)) If dr IsNot Nothing Then HdnRefacturacionConcepto.Value = dr("CveConceptoContableAlmacen").ToString ChkRefacturacionConAlmacen.Checked = If(dr("CveMovimientoAlmacen").ToString.ToEntero > 0, True, False) + SubTotalRefacturacion = dr("SubTotal").ToString.ToDecimal End If + + End If End Sub diff --git a/Compras/Proveedores.aspx.vb b/Compras/Proveedores.aspx.vb index d8176bb72..e06070550 100644 --- a/Compras/Proveedores.aspx.vb +++ b/Compras/Proveedores.aspx.vb @@ -728,15 +728,10 @@ Partial Class Compras_Proveedores cfdVer = "http://www.sat.gob.mx/cfd/4" End If - - 'If Prefijo.ToLower <> "cfdi" Then cfdVer = "http://www.sat.gob.mx/cfd/2" namespaces.AddNamespace(Prefijo, cfdVer) - - - Dim node As XmlNode node = XMLDoc.SelectSingleNode(String.Format("//{0}:Emisor", Prefijo), namespaces) If node IsNot Nothing Then diff --git a/Compras/eFacturas.aspx.vb b/Compras/eFacturas.aspx.vb index c73ff32d0..e50b0a6ec 100644 --- a/Compras/eFacturas.aspx.vb +++ b/Compras/eFacturas.aspx.vb @@ -2883,7 +2883,7 @@ Partial Class Compras_eFacturas DTDocumentosRelacionados.Columns.Add("Manual", GetType(Boolean)) - + Dim TieneRegistros As Boolean = False If IO.File.Exists(Archivo) Then @@ -3034,18 +3034,29 @@ Partial Class Compras_eFacturas End If End If + ObjCompraFolios.Dispose() + DTDocumentosRelacionados = DTDocumentosRelacionados.FiltraParametros("CveIE > 0 AND LEN(IdDocumento) > 0") GVPDocumentosRelacionadosPagos.DataSource = DTDocumentosRelacionados GVPDocumentosRelacionadosPagos.DataBind() DTGVPagosVinculacion = DTDocumentosRelacionados + BtnVincularPago.Visible = False + If DTDocumentosRelacionados.Rows.Count > 0 Then + SerieFolioIE = DTDocumentosRelacionados.Rows(0)("SerieFolio").ToString + DivVincularPagoManualmente.Visible = False + BtnVincularPago.Visible = True + TieneRegistros = True + Else + DivVincularPagoManualmente.Visible = True + BtnVincularPago.Visible = False + End If ComprasEnComplemento = DTGVPagosVinculacion.COUNT("CveCompra", " CveCompra > 0") - If DTDocumentosRelacionados.MAX("CveCompra").ToString.ToEntero > 0 Then TieneCompras = True Else @@ -3096,25 +3107,25 @@ Partial Class Compras_eFacturas Dim ObjCompras As New ClsCompras - Dim TieneRegistros As Boolean = False - If ObjCompras.GetCompararComplementoPago(gvRow.DataKey("CveProveedor").ToEntero, Monto, nodePagos2.InnerXml.Replace("pago10:", "").Replace("pagos10:", ""), UsuarioActual.CveEmpresa) Then - GvVincularPago.DataSource = ObjCompras.DtResultados - If ObjCompras.DtResultados.Rows.Count > 0 Then - SerieFolioIE = ObjCompras.DtResultados.Rows(0)("SerieFolio").ToString - DivVincularPagoManualmente.Visible = False - BtnVincularPago.Visible = True - TieneRegistros = True - Else - DivVincularPagoManualmente.Visible = True - BtnVincularPago.Visible = False - End If - 'ImportePago = ObjCompras.DtResultados.SUMD("Monto") - Else - DivVincularPagoManualmente.Visible = False - BtnVincularPago.Visible = False - End If + 'If ObjCompras.GetCompararComplementoPago(gvRow.DataKey("CveProveedor").ToEntero, Monto, nodePagos2.InnerXml.Replace("pago10:", "").Replace("pagos10:", ""), UsuarioActual.CveEmpresa) Then + ' GvVincularPago.DataSource = ObjCompras.DtResultados + + ' If ObjCompras.DtResultados.Rows.Count > 0 Then + ' SerieFolioIE = ObjCompras.DtResultados.Rows(0)("SerieFolio").ToString + ' DivVincularPagoManualmente.Visible = False + ' BtnVincularPago.Visible = True + ' TieneRegistros = True + ' Else + ' DivVincularPagoManualmente.Visible = True + ' BtnVincularPago.Visible = False + ' End If + ' 'ImportePago = ObjCompras.DtResultados.SUMD("Monto") + 'Else + ' DivVincularPagoManualmente.Visible = False + ' BtnVincularPago.Visible = False + 'End If For Each GvRowF As GridViewRow In GVPDocumentosRelacionadosPagos.Rows diff --git a/Contabilidad/RegPrePolizaS.aspx.vb b/Contabilidad/RegPrePolizaS.aspx.vb index 05f6994b1..9bf82bd72 100644 --- a/Contabilidad/RegPrePolizaS.aspx.vb +++ b/Contabilidad/RegPrePolizaS.aspx.vb @@ -2724,7 +2724,10 @@ Partial Class ContabilidadC_RegPrePolizaS TxtFolio.Text = ObjConta.ContaFolio.ToString() LnkFolioManual.Visible = False + BtnContabilizar.Visible = False + BtnDescontabilizar.Visible = True UpPoliza.Update() + UpGuardar.Update() End If @@ -3215,15 +3218,18 @@ Partial Class ContabilidadC_RegPrePolizaS If ObjConta.ContabilizaDesContabilizaPrePoliza(CvePrePoliza, False, UsuarioActual.CveEmpresa) Then + Alert("Descontabilizado Correctamente.", TipoMensaje.MsgInformacion) TxtFolio.Text = "" LnkFolioManual.Visible = True + BtnDescontabilizar.Visible = False + BtnContabilizar.Visible = True End If ObjConta.Dispose() UpPoliza.Update() - + UpGuardar.Update() diff --git a/Empresas/141/Formatos/CHQ-7452.rdlc b/Empresas/141/Formatos/CHQ-7452.rdlc index 3c26bcd98..77447f2a8 100644 --- a/Empresas/141/Formatos/CHQ-7452.rdlc +++ b/Empresas/141/Formatos/CHQ-7452.rdlc @@ -1,5 +1,5 @@ - + 0 @@ -93,9 +93,9 @@ Textbox1 3.15903cm - 2.98488cm + 0.58123cm 0.6cm - 14.64437cm + 17.04802cm 1 2 - true @@ -2081,7 +2080,7 @@ Hermosillo, Sonora, Mexico - $1.00 + $5.00 + true @@ -2866,6 +2866,12 @@ Hermosillo, Sonora, Mexico true ReportParameter1 + + String + true + true + ReportParameter1 + diff --git a/GPS/PalletEtiqueta2.rdlc b/GPS/PalletEtiqueta2.rdlc index e75b2bc6e..656ddb873 100644 --- a/GPS/PalletEtiqueta2.rdlc +++ b/GPS/PalletEtiqueta2.rdlc @@ -40,16 +40,16 @@ - 2.20952cm + 2.81806cm - 1.99728cm + 2.93411cm - 1.99728cm + 2.28832cm - 3.44561cm + 2.65186cm @@ -224,39 +224,11 @@ 2pt - 2 + 3 - - - - true - true - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - + @@ -323,39 +295,11 @@ 2pt - 2 + 3 - - - - true - true - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - + @@ -422,39 +366,11 @@ 2pt - 2 + 3 - - - - true - true - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - + @@ -522,39 +438,11 @@ 2pt - 2 + 3 - - - - true - true - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - + @@ -621,39 +509,11 @@ 2pt - 2 + 3 - - - - true - true - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - + @@ -1354,12 +1214,11 @@ - 0.38833cm + 0.45921cm - true true @@ -1390,7 +1249,6 @@ - true true @@ -2011,7 +1869,6 @@ - true true @@ -2042,7 +1899,6 @@ - true true @@ -2663,7 +2519,6 @@ - true true @@ -2694,7 +2549,6 @@ - true true @@ -3315,7 +3169,6 @@ - true true @@ -3346,7 +3199,6 @@ - true true @@ -3754,8 +3606,8 @@ 0.0762cm 0.10266cm - 12.50875cm - 9.64969cm + 12.57959cm + 10.69235cm @@ -3763,10 +3615,10 @@ - 4.95471in + 5.09718in