From f4394b90bed8658154178cf0041a496abcb99ae7 Mon Sep 17 00:00:00 2001 From: JORGE LUIS CAUDILLO ESPARZA Date: Fri, 1 Mar 2024 23:46:31 -0700 Subject: [PATCH 001/170] modificar salario detectar cambios --- RH/CalculoSBC.aspx.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/RH/CalculoSBC.aspx.cs b/RH/CalculoSBC.aspx.cs index 75e090f23..5f0c0dddc 100644 --- a/RH/CalculoSBC.aspx.cs +++ b/RH/CalculoSBC.aspx.cs @@ -947,7 +947,10 @@ public partial class RH_CalculoSBC : ClsPaginas if (e.Row.RowType == DataControlRowType.DataRow) { - e.Row.FCCheckBox("chkUpdate").Checked = !(string.Format("{0:N2}", e.Row.DBCampo("SalarioDiarioSSNuevo")) == string.Format("{0:N2}", e.Row.DBCampo("SalarioDiarioSS"))); + decimal valueold = e.Row.DBCampo("SalarioDiarioSS").ToString().ToDecimal(); + decimal valuenew = e.Row.DBCampo("SalarioDiarioSSNuevo").ToString().ToDecimal(); + decimal diferencia = Math.Abs(valueold - valuenew); + e.Row.FCCheckBox("chkUpdate").Checked = diferencia > 0.01M; e.Row.FCLabel("lblsalarioDiarioSSf").Text = e.Row.FCCheckBox("chkUpdate").Checked ? "Si" : "No"; } From 37635a919b69abdcc4818e0be0b984e9929af4d5 Mon Sep 17 00:00:00 2001 From: JORGE LUIS CAUDILLO ESPARZA Date: Mon, 11 Mar 2024 07:28:15 -0700 Subject: [PATCH 002/170] --- App_Code/ClsNominas.vb | 3 ++- Nomina/CalculoISRAnual.aspx.cs | 16 ++++++++++++++-- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/App_Code/ClsNominas.vb b/App_Code/ClsNominas.vb index 587854f03..0e34fcd2f 100644 --- a/App_Code/ClsNominas.vb +++ b/App_Code/ClsNominas.vb @@ -308,7 +308,7 @@ Public Class ClsNominas End Try Return retorno End Function - Public Function AutorizaCalculoAnual(CveEmpresa As Integer, CveUsuario As Integer, PersonalXml As String, Optional Numpagos As Integer = 1) As Boolean + Public Function AutorizaCalculoAnual(CveEmpresa As Integer, CveUsuario As Integer, PersonalXml As String, Optional Numpagos As Integer = 1, Optional Ejercicio As Integer = 2023) As Boolean Dim retorno As Boolean = False DataAdapter("PA_Nom_AutorizaCalculoAnual", CommandType.StoredProcedure) With SqlAdapter.SelectCommand.Parameters @@ -316,6 +316,7 @@ Public Class ClsNominas .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario .Add("@PersonalXml", SqlDbType.Xml).Value = If(String.IsNullOrEmpty(PersonalXml), DBNull.Value, DirectCast(PersonalXml, Object)) .Add("@Numpagos", SqlDbType.Int).Value = Numpagos + .Add("@Ejercicio", SqlDbType.Int).Value = Ejercicio End With Try diff --git a/Nomina/CalculoISRAnual.aspx.cs b/Nomina/CalculoISRAnual.aspx.cs index 5202f795a..82dd5049d 100644 --- a/Nomina/CalculoISRAnual.aspx.cs +++ b/Nomina/CalculoISRAnual.aspx.cs @@ -7,10 +7,21 @@ using System.Web.UI; using System.Web.UI.WebControls; using System.Xml.Linq; using Extensiones; +using Profact.TimbraCFDI40; public partial class Nomina_CalculoISRAnual : ClsPaginas { + + protected int Ejercicio + { + get + { + if (ViewState["Ejercicio"] == null) { return 0; } + else { return ViewState["Ejercicio"].ToString().ToEntero(); } + } + set { ViewState["Ejercicio"] = value; } + } protected int CvePersonal { get @@ -51,7 +62,8 @@ public partial class Nomina_CalculoISRAnual : ClsPaginas { using (ClsNominas onom = new ClsNominas()) { - onom.CalculoISRAnual(DdlEjercicios.SelectedValue.ToEntero(), UsuarioActual.Empresa.CveEmpresa); + Ejercicio = DdlEjercicios.SelectedValue.ToEntero(); + onom.CalculoISRAnual(Ejercicio, UsuarioActual.Empresa.CveEmpresa); GVCalculoISRAnual.DataSource = onom.DtResultados; } @@ -250,7 +262,7 @@ public partial class Nomina_CalculoISRAnual : ClsPaginas using (ClsNominas onom = new ClsNominas()) { - continuar = onom.AutorizaCalculoAnual(UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario, xmlpeople, numpagos); + continuar = onom.AutorizaCalculoAnual(UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario, xmlpeople, numpagos, Ejercicio); } if (continuar) { From 7af55a8f05e0e895439e744ba8933b2ffa0e0ba7 Mon Sep 17 00:00:00 2001 From: rrene Date: Sat, 23 Mar 2024 14:10:56 -0700 Subject: [PATCH 003/170] =?UTF-8?q?--=20visualizar=20c=C3=B3digo=20+=20PS?= =?UTF-8?q?=20en=20FNC109?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Compras/Compras.aspx.vb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb index 407979093..a99e74ffd 100644 --- a/Compras/Compras.aspx.vb +++ b/Compras/Compras.aspx.vb @@ -9736,6 +9736,8 @@ Partial Class Compras_Compras e.Row.FCLabel("LtlUnidadMedida").Attributes.Add("title", "Unidad de medida SIN registrar") End If + If UsuarioActual.Empresa.Funcionalidad(109) = "1" Then e.Row.FCHyperLink("HplPS").Text = e.Row.DBCampo("PSCodigo") + 'EQUIVALENCIA If e.Row.DBCampo("CveUM").ToString.ToEntero > 0 And e.Row.DBCampo("CveTipoPS").ToString.ToEntero = 2 Then From 8070b0e6fe4d050e2a2eaba05489d4c9702729d9 Mon Sep 17 00:00:00 2001 From: rrene Date: Sat, 23 Mar 2024 15:54:37 -0700 Subject: [PATCH 004/170] - mejora en unitario --- App_Code/ClsProductosServicios.vb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/App_Code/ClsProductosServicios.vb b/App_Code/ClsProductosServicios.vb index 05d871ea6..c9bcb106e 100644 --- a/App_Code/ClsProductosServicios.vb +++ b/App_Code/ClsProductosServicios.vb @@ -906,8 +906,6 @@ Public Class ClsProductosServicios DataAdapter("PA_Inv_UltimoPrecioCompraGet") With SqlAdapter.SelectCommand.Parameters - - .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa .Add("@CvePS", SqlDbType.Int).Value = CvePS .Add("@PU", SqlDbType.Money).Direction = ParameterDirection.Output @@ -915,7 +913,7 @@ Public Class ClsProductosServicios Try SqlAdapter.Fill(Data) - Retorno = CDbl(SqlAdapter.SelectCommand.Parameters("@PU").Value) + Retorno = SqlAdapter.SelectCommand.Parameters("@PU").Value.ToString.ToDecimal Catch Ex1 As SqlException Me.OnError("Ocurrió un error al obtener el precio unitario.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) From a31674e67ce4f019527d2e93e4914a0c0f8194bd Mon Sep 17 00:00:00 2001 From: rrene Date: Sat, 23 Mar 2024 15:54:52 -0700 Subject: [PATCH 005/170] =?UTF-8?q?--=20correcci=C3=B3n=20msg=20de=20error?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App_Code/ClsVentas.vb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/App_Code/ClsVentas.vb b/App_Code/ClsVentas.vb index 5260ef910..9f00eb8e9 100644 --- a/App_Code/ClsVentas.vb +++ b/App_Code/ClsVentas.vb @@ -6066,7 +6066,7 @@ Public Class ClsVentas SqlAdapter.Fill(Data) Retorno = True Catch ex As Exception - OnError("Ocurrió un error al eliminar los datos de facturación.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + OnError("Ocurrió un error al actualizar el corte en la venta.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) End Try Return Retorno From 66c77de36814d52ee5e3828c3ff98e1dd667f993 Mon Sep 17 00:00:00 2001 From: rrene Date: Sun, 24 Mar 2024 09:29:56 -0700 Subject: [PATCH 006/170] - mejora en manejo de errores --- Ventas/PVCobranza.aspx.vb | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/Ventas/PVCobranza.aspx.vb b/Ventas/PVCobranza.aspx.vb index 6e73a915f..4f6cc4926 100644 --- a/Ventas/PVCobranza.aspx.vb +++ b/Ventas/PVCobranza.aspx.vb @@ -294,11 +294,17 @@ Partial Class Ventas_PVCobranza 'registrar pago 'validaciones - If TxtImporteEfectivo.Text.ToDecimal + TxtImporteCredito.Text.ToDecimal + TxtImporteDebito.Text.ToDecimal + TxtImporteCheque.Text.ToDecimal + TxtImporteTransferencia.Text.ToDecimal = 0 Then + Dim Pagado As Decimal = TxtImporteEfectivo.Text.ToDecimal + TxtImporteCredito.Text.ToDecimal + TxtImporteDebito.Text.ToDecimal + TxtImporteCheque.Text.ToDecimal + TxtImporteTransferencia.Text.ToDecimal + If Pagado = 0 Then Alert("Favor de especificar importe", TipoMensaje.ToastAdventencia) Exit Sub End If + If LtlSaldo.Text.ToDecimal > Pagado Then + Alert("Favor de especificar el saldo total de pagar", TipoMensaje.ToastAdventencia) + Exit Sub + End If + Dim CveVenta As Integer = HdnCveVenta.Value.ToEntero Dim DbRowVenta As DataRow = Nothing @@ -332,7 +338,7 @@ Partial Class Ventas_PVCobranza Dim Fecha As Date = NowADS() Dim PagoEfectivo As Decimal = TxtImporteEfectivo.Text.ToDecimal Dim MsgError As String = "" - Dim SaldoPendiente As Decimal = VentaActual.Total + Dim SaldoPendiente As Decimal = DbRowVenta("Saldo").ToString.ToDecimal Dim ObjConta As New ClsContabilidad Dim ObjIE As New ClsBancos(ObjConta.IniciaTransacSQL()) @@ -350,12 +356,12 @@ Partial Class Ventas_PVCobranza MsgError = RegistraIE(13, DdlCuentaEfectivo.SelectedValue.ToEntero, PagoEfectivo, Fecha, CvePrePoliza, VentaActual, ObjIE, ObjConta, ObjVentas2) End If SaldoPendiente -= PagoEfectivo - If SaldoPendiente > 0 AndAlso TxtImporteCredito.Text.ToDecimal > 0 Then + If MsgError = "" AndAlso SaldoPendiente > 0 AndAlso TxtImporteCredito.Text.ToDecimal > 0 Then MsgError = RegistraIE(12, DdlCuentaTarjetaCredito.SelectedValue.ToEntero, TxtImporteCredito.Text.ToDecimal, Fecha, CvePrePoliza, VentaActual, ObjIE, ObjConta, ObjVentas2) PagoEfectivo = TxtImporteCredito.Text.ToDecimal End If SaldoPendiente -= PagoEfectivo - If SaldoPendiente > 0 AndAlso TxtImporteDebito.Text.ToDecimal > 0 Then + If MsgError = "" AndAlso SaldoPendiente > 0 AndAlso TxtImporteDebito.Text.ToDecimal > 0 Then MsgError = RegistraIE(11, DdlCuentaTarjetaDebito.SelectedValue.ToEntero, TxtImporteDebito.Text.ToDecimal, Fecha, CvePrePoliza, VentaActual, ObjIE, ObjConta, ObjVentas2) PagoEfectivo = TxtImporteDebito.Text.ToDecimal End If @@ -364,12 +370,12 @@ Partial Class Ventas_PVCobranza PagoEfectivo = TxtImporteCheque.Text.ToDecimal End If - If SaldoPendiente > 0 AndAlso TxtImporteTransferencia.Text.ToDecimal > 0 Then + If MsgError = "" AndAlso SaldoPendiente > 0 AndAlso TxtImporteTransferencia.Text.ToDecimal > 0 Then MsgError = RegistraIE(8, DdlCuentaTransferencia.SelectedValue.ToEntero, TxtImporteTransferencia.Text.ToDecimal, Fecha, CvePrePoliza, VentaActual, ObjIE, ObjConta, ObjVentas2) PagoEfectivo = TxtImporteCheque.Text.ToDecimal End If - If Not ObjVentas2.UpdateVentaCorte(CveVenta, UsuarioActual.CveEmpresa, CveCorte) Then + If MsgError = "" AndAlso Not ObjVentas2.UpdateVentaCorte(CveVenta, UsuarioActual.CveEmpresa, CveCorte) Then MsgError = "Error al aplicar el corte" End If From 586ea182d4dd68f511c503a9cd24f31293e885e5 Mon Sep 17 00:00:00 2001 From: rrene Date: Sun, 24 Mar 2024 09:30:19 -0700 Subject: [PATCH 007/170] =?UTF-8?q?-visualizar=20quien=20registr=C3=B3=20l?= =?UTF-8?q?a=20venta=20FNC109?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Inventarios/EntregaAlmacen.aspx | 18 ++++++++++-------- Inventarios/EntregaAlmacen.aspx.vb | 5 +++++ 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/Inventarios/EntregaAlmacen.aspx b/Inventarios/EntregaAlmacen.aspx index 39ebbe52f..9d3e41e1a 100644 --- a/Inventarios/EntregaAlmacen.aspx +++ b/Inventarios/EntregaAlmacen.aspx @@ -130,22 +130,24 @@
- - + - + - diff --git a/Inventarios/EntregaAlmacen.aspx.vb b/Inventarios/EntregaAlmacen.aspx.vb index 56cf378a4..be1f33adf 100644 --- a/Inventarios/EntregaAlmacen.aspx.vb +++ b/Inventarios/EntregaAlmacen.aspx.vb @@ -382,6 +382,10 @@ Partial Class Inventarios_EntregaAlmacen End If + If UsuarioActual.Empresa.Funcionalidad(109) = "1" Then + divUsuarioRegistra.Visible = True + End If + End If End Sub @@ -697,6 +701,7 @@ Partial Class Inventarios_EntregaAlmacen LbCliente.Text = DtDatos.Rows(0)("Nombre").ToString() HLFolio.Text = drE("SerieFolio").ToString() + LtlRegistra.Text = drE("UsuarioRegistra").ToString If UsuarioActual.TienePermisoProceso(201) Then HLFolio.NavigateUrl = $"/Ventas/Ventas.aspx?CveVenta={CveVenta}" End If From 53a58611194224a201154075e1bc8a99afa651a8 Mon Sep 17 00:00:00 2001 From: rrene Date: Mon, 25 Mar 2024 07:02:02 -0700 Subject: [PATCH 008/170] =?UTF-8?q?---=20E140,=20saldado=20de=20garant?= =?UTF-8?q?=C3=ADa=20total,=20con=20dif=20de=200.01?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Ventas/Ventas.aspx | 4 ++-- Ventas/Ventas.aspx.vb | 43 +++++++++++++++++++++++++++++-------------- 2 files changed, 31 insertions(+), 16 deletions(-) diff --git a/Ventas/Ventas.aspx b/Ventas/Ventas.aspx index ca9215a39..8b1b1b8fa 100644 --- a/Ventas/Ventas.aspx +++ b/Ventas/Ventas.aspx @@ -386,7 +386,7 @@ Enviar Póliza Virtual
  • - Relacionar Facturas + Relacionar Facturas
  • Solicitar autorización de crédito @@ -1149,7 +1149,7 @@ -
    +
    <%----%> diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index 0c9d95a80..aa2fd43d7 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -2646,6 +2646,8 @@ Partial Class Ventas CargarAlmacenes() If UsuarioActual.Empresa.Funcionalidad(109) = "1" Then CargaFormaEntrega() + 'DdlClasificacion.Visible = False + 'brclasif.Visible = False End If CargaCuentasTerminal() @@ -2742,7 +2744,7 @@ Partial Class Ventas 'MUESTRA EL MODAL PARA PODER RELACIONAR FACTURAS If UsuarioActual.TienePermisoProceso(321) Then - HlFacturasRelaciondas.Visible = True + LnkFacturasRelacionadas.Visible = True End If If Request("CveOrdenProduccion") IsNot Nothing AndAlso IsNumeric(Request("CveOrdenProduccion")) AndAlso Request("CveOrdenProduccion").ToEntero() > 0 Then @@ -3322,7 +3324,7 @@ Partial Class Ventas End If 'CARGA VALORES INICIALES PARA AGREGAR PS DESDE MODAL - CargaMetodosPSModal() + 'CargaMetodosPSModal() 'CARGA VALORES DE ORDEN DE PRODUCCION Dim CveOrdenProduccion As Integer = IfNull(Request("CveOrdenProduccion"), "-1").ToString().ToEntero() @@ -3436,7 +3438,7 @@ Partial Class Ventas LnkAplicarRNCDevolucion.Visible = False HLPagar.Visible = False HLSaldarVenta.Visible = False - HlFacturasRelaciondas.Visible = False + LnkFacturasRelacionadas.Visible = False End If ''EN REALIDAD SE OCUPAN ESTAS COSAS DENTRO DEL POSTABCK ??? @@ -7108,7 +7110,7 @@ Partial Class Ventas CargaPorcentajeMarcas() End If - CargaFacturasARelacionar() + 'CargaFacturasARelacionar() UpFacturar.Update() UpEstatus.Update() @@ -15227,15 +15229,6 @@ Partial Class Ventas End If importeMovimiento = 0 - 'Case 103 'Descuento - ' 'si se amortiza anticipo por concepto de descuento, no debe de registrar esta partida. - ' If DdlTipoAmortizacionAnticipo.SelectedValue <> "1" Then - ' importeMovimiento = ObjFactura.Descuento * ValorMultiplicador - ' importeMX = Math.Round(importeMovimiento, 2) * tipoCambio * Multiplicador - ' FechaMovimiento = ObjFactura.FechaPago - ' If tipoCambio > 1 Then Concepto += $" TC:{tipoCambio} ${importeMovimiento.FormatoNumero(2)}" - ' End If - Case 8 'Ret IVA por Trasladar If Not ObjFactura.TipoDocto.Contiene("Rem", "RNC") AndAlso ObjFactura.CveTipoRetencion <> 4 Then 'SI NO ES RETENCION DE IVA DE SERVICIOS importeMovimiento = ObjFactura.RetIVA * ValorMultiplicador @@ -15481,6 +15474,18 @@ Partial Class Ventas End If Next + 'verificar si es garantía total y si el saldo es 0.01 + If Me.EsGarantia AndAlso ObjFactura.TipoDocto.Contiene("Ing") AndAlso HdnVentaSaldo.Value.ToDecimal = 0.01D Then + Dim SaldoaSaldar As Decimal = 0.01D + If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, False, SaldoaSaldar, SaldoaSaldar, 211, $"{ObjFactura.Serie}-{ObjFactura.Folio}", $"{NombreCliente} {ObjFactura.Serie}-{ObjFactura.Folio}", CveCliente:=ObjFactura.CveCliente, CveVenta:=ObjFactura.CveVenta, CveCuenta:=-1, TipoCambio:=ObjFactura.TipoCambio, TipoCambioPago:=TCPago, CveSubProyecto:=CveSubProyectoVenta) Then + ErrorPrepoliza = True + End If + + If Not ErrorPrepoliza AndAlso Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, True, SaldoaSaldar, SaldoaSaldar, 2, $"{ObjFactura.Serie}-{ObjFactura.Folio}", $"{NombreCliente} {ObjFactura.Serie}-{ObjFactura.Folio}", CveCliente:=ObjFactura.CveCliente, CveVenta:=ObjFactura.CveVenta, CveCuenta:=-1, TipoCambio:=ObjFactura.TipoCambio, TipoCambioPago:=TCPago, CveSubProyecto:=CveSubProyectoVenta) Then + ErrorPrepoliza = True + End If + End If + End If 'Si es Facturacion de una remision cancelamos, traspasamos saldos y agregamos evento a la bitacora @@ -25245,6 +25250,10 @@ Partial Class Ventas ChkDevAlm.Checked = True End If + If UsuarioActual.Empresa.Funcionalidad(109) = "1" AndAlso ObjFacturaCancelacion.TipoDocto = "Rem" Then + ChkDevAlm.Checked = True + End If + 'LOS PEDIDOS SE DEBE CANCELAR EN UN PROCESO DISTINTO If UsuarioActual.Empresa.Funcionalidad(578) = "1" AndAlso ObjFacturaCancelacion.TipoDocto = "Ped" Then ChkDevAlm.Checked = True @@ -26090,7 +26099,7 @@ Partial Class Ventas DdlMarca.SelectedIndex = 0 DdlMarcaPSDes.SelectedIndex = 0 CargaClasificacionesDetalles() - + CargaMetodosPSModal() UpAddPS.Update() RegistraScript(String.Format("$('#{0}').modal('show');", "DivAddPS")) End Sub @@ -37895,5 +37904,11 @@ Partial Class Ventas RegistraScript("$('#DivAplicaRNCDevolucion').modal('hide')") End Sub + + Protected Sub LnkFacturasRelacionadas_Click(sender As Object, e As EventArgs) + CargaFacturasARelacionar() + RegistraScript("$('#DivFacturasRelacionadas').modal('show')") + UpFacturasRelacionadas.Update() + End Sub End Class From 9dd21186dd2de8fff326064bd0b41f663794633c Mon Sep 17 00:00:00 2001 From: rrene Date: Mon, 25 Mar 2024 07:05:05 -0700 Subject: [PATCH 009/170] -- mejora en facturas relacionadas --- Ventas/Ventas.aspx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Ventas/Ventas.aspx b/Ventas/Ventas.aspx index 8b1b1b8fa..dd13947ba 100644 --- a/Ventas/Ventas.aspx +++ b/Ventas/Ventas.aspx @@ -386,7 +386,7 @@ Enviar Póliza Virtual
  • - Relacionar Facturas + Relacionar Facturas
  • Solicitar autorización de crédito @@ -6981,7 +6981,7 @@ -
  • - + @@ -7964,6 +7964,7 @@
    +
    @@ -7972,6 +7973,7 @@
    +
    diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index 83fec084d..e5164f720 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -6639,7 +6639,7 @@ Partial Class Ventas 'UpEmpresaCRM.Visible = True trNombreCliente.Visible = False - trsucursalciente.Visible = False + trsucursalcliente.Visible = False TrDireccion.Visible = False TrCiudad.Visible = False TrRFC.Visible = False @@ -6697,6 +6697,10 @@ Partial Class Ventas Me.PermiteCredito = ObjCliente.PermiteCredito LnkAgregarCliente.Visible = False + If UsuarioActual.Empresa.Funcionalidad(714) = "1" Then 'cuando inicia cargado con el cliente. publico general + LnkAgregarCliente.Visible = True + End If + ClienteEsDistribuidor = Boolean.Parse(ObjCliente.DtResultados.Rows(0)("EsDistribuidor").ToString()) TieneDiasVencidos = Boolean.Parse(ObjCliente.DtResultados.Rows(0)("TieneDiasVencidos").ToString()) DiasVencidosCliente = ObjCliente.DtResultados.Rows(0)("DiasVencidosCliente").ToString().ToEntero() @@ -7002,19 +7006,16 @@ Partial Class Ventas End If DdlSucursalCliente.Items.Clear() - If ObjCliente.GetSucursales(CveCliente) Then - DdlSucursalCliente.DataSource = ObjCliente.DtResultados - If ObjCliente.DtResultados.Rows.Count > 0 Then - trsucursalciente.Visible = True - Else - trsucursalciente.Visible = False - End If + Dim dtts As DataTable = GlobalDTClientesSucursales(UsuarioActual.CveEmpresa, CveCliente) + If dtts IsNot Nothing AndAlso dtts.Rows.Count > 0 Then + DdlSucursalCliente.DataSource = dtts + DdlSucursalCliente.Items.Insert(0, New ListItem("Matriz", "-1")) + trsucursalcliente.Visible = True + DdlSucursalCliente.DataBind() Else - trsucursalciente.Visible = False + trsucursalcliente.Visible = False DdlSucursalCliente.DataSource = Nothing End If - DdlSucursalCliente.Items.Insert(0, New ListItem("Matriz", "-1")) - DdlSucursalCliente.DataBind() 'SI UTILIZA EL RFC GENERICO PERMITE FACTURAR SUCURSAL If (Not UsuarioActual.Empresa.Funcionalidad(558) = "1") AndAlso (CveVenta <= 0 OrElse NuevaFactura = 1) AndAlso LblRFC.Text.Trim() = "XAXX010101000" Then @@ -20366,7 +20367,7 @@ Partial Class Ventas LblCP.Text = "00000" LblRFC.Text = "AAA010101AAA" LblTelefono.Text = "9999999999" - trsucursalciente.Visible = False + trsucursalcliente.Visible = False End If End If ObjClientes.Dispose() @@ -20380,7 +20381,7 @@ Partial Class Ventas End If End Sub Private Sub HabilitarFacturacionSucursal() - trsucursalciente.Visible = True + trsucursalcliente.Visible = True LnkAgregarSucursal.Visible = True LblSucursal.Text = "Cliente" If (CveVenta <= 0 OrElse NuevaFactura = 1) Then @@ -20432,12 +20433,12 @@ Partial Class Ventas If ObjCliente.GetSucursales(CveCliente) Then DdlSucursalCliente.DataSource = ObjCliente.DtResultados If ObjCliente.DtResultados.Rows.Count > 0 Then - trsucursalciente.Visible = True + trsucursalcliente.Visible = True Else - trsucursalciente.Visible = False + trsucursalcliente.Visible = False End If Else - trsucursalciente.Visible = False + trsucursalcliente.Visible = False DdlSucursalCliente.DataSource = Nothing End If DdlSucursalCliente.Items.Insert(0, New ListItem("Matriz", "-1")) @@ -20448,12 +20449,9 @@ Partial Class Ventas OnError("Ocurrió un error al agregar la sucursal", ex) End Try ObjCliente.Dispose() - End If - UpCliente.Update() RegistraScript("hideDivAgregarSucursal();") - End Sub @@ -23816,6 +23814,7 @@ Partial Class Ventas divRegimenCliente.Visible = False UpAgregarCliente.Update() CargaEstados() + TxtRFCCliente.Focus() RegistraScript("showDivEC();") End Sub @@ -23905,7 +23904,7 @@ Partial Class Ventas Dim RegimenFiscalCliente As String = "-1" If DdlRegimenFiscalCliente.SelectedValue.ToEntero() > 0 Then - RegimenFiscalCliente = GlobalDTRegimenesFiscales().FiltroPrimeroValor("CodigoRegimenFiscal", $"CveRegimenFiscal = {DdlRegimenFiscalCliente.SelectedValue.ToEntero()}") + RegimenFiscalCliente = GlobalDTRegimenesFiscales().FiltroPrimeroValor("CodigoRegimenFiscal", $"CveRegimenFiscal = {DdlRegimenFiscalCliente.SelectedValue}") End If DdlUsoCFDICliente.Items.Clear() @@ -35616,7 +35615,7 @@ Partial Class Ventas DivRazonSocial2.Attributes.Add("class", "col-md-12") DivRazonSocial2.Attributes.Add("class", "col-md-8") - DVRegimenSociedad.Visible = True + DVRegimenSociedad.Visible = RdTipoPersona.SelectedValue = "1" If TxtRFCCliente.Text.ToUpper = "XAXX010101000" Then DdlRegimenFiscalCliente.DataSource = GlobalDTRegimenesFiscales().FiltraParametros("CveRegimenFiscal = 11") @@ -35642,8 +35641,9 @@ Partial Class Ventas DdlRegimenFiscalCliente.Items.Insert(0, New ListItem("Seleccione", "-1")) - DdlUsoCFDICliente.Items.Clear() - DdlUsoCFDICliente.Items.Insert(0, New ListItem("Seleccione", "-1")) + 'DdlUsoCFDICliente.Items.Clear() + 'DdlUsoCFDICliente.Items.Insert(0, New ListItem("Seleccione", "-1")) + CargaComboCFDICliente() UpAgregarCliente.Update() End Sub From 6c75038e1c69a079c90b3f462dc36aa619457716 Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Wed, 27 Mar 2024 10:05:02 -0700 Subject: [PATCH 025/170] --FIX. Recargar global de sucursales de clientes en clientes.aspx. --FIX.Comentar facturacion de sucursales en ventas.aspx. --FIX. Filtro para sucursales de cliente en ventas.aspx --- Ventas/Clientes.aspx.vb | 9 +++++++-- Ventas/Ventas.aspx.vb | 8 ++++---- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/Ventas/Clientes.aspx.vb b/Ventas/Clientes.aspx.vb index 61a5959bd..758792a55 100644 --- a/Ventas/Clientes.aspx.vb +++ b/Ventas/Clientes.aspx.vb @@ -3176,6 +3176,8 @@ Partial Class Clientes ObjCliente.Dispose() + GlobalDTClientesSucursales(UsuarioActual.CveEmpresa, CveCliente) = Nothing + Else AddSucursalTemp() End If @@ -3190,8 +3192,9 @@ Partial Class Clientes Me.Actualizar = False Me.CveClienteSuc = -1 - RegistraScript("hideDivEC();") - + RegistraScript("hideDivEC();") + + End Sub Protected Sub LnkAgragarDireccion_Click(sender As Object, e As EventArgs) @@ -3232,6 +3235,8 @@ Partial Class Clientes GVSucursales.EditIndex = -1 ViewState("DTSucursalesCliente") = ObjCliente.DtResultados Alert("La Sucursal del Cliente se eliminó correctamente.", TipoMensaje.MsgInformacion) + + GlobalDTClientesSucursales(UsuarioActual.CveEmpresa, CveCliente) = Nothing End If Else TempDTSucursales.Rows.RemoveAt(e.RowIndex) diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index 1e82369c9..38fdec9d3 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -7006,7 +7006,7 @@ Partial Class Ventas End If DdlSucursalCliente.Items.Clear() - Dim dtts As DataTable = GlobalDTClientesSucursales(UsuarioActual.CveEmpresa, CveCliente) + Dim dtts As DataTable = GlobalDTClientesSucursales(UsuarioActual.CveEmpresa, CveCliente).FiltraParametros("CveClienteSucursal > 0") If dtts IsNot Nothing AndAlso dtts.Rows.Count > 0 Then DdlSucursalCliente.DataSource = dtts DdlSucursalCliente.Items.Insert(0, New ListItem("Matriz", "-1")) @@ -7018,9 +7018,9 @@ Partial Class Ventas End If 'SI UTILIZA EL RFC GENERICO PERMITE FACTURAR SUCURSAL - If (Not UsuarioActual.Empresa.Funcionalidad(558) = "1") AndAlso (CveVenta <= 0 OrElse NuevaFactura = 1) AndAlso LblRFC.Text.Trim() = "XAXX010101000" Then - HabilitarFacturacionSucursal() - End If + 'If (Not UsuarioActual.Empresa.Funcionalidad(558) = "1") AndAlso (CveVenta <= 0 OrElse NuevaFactura = 1) AndAlso LblRFC.Text.Trim() = "XAXX010101000" Then + ' HabilitarFacturacionSucursal() + 'End If 'CargaFolios() From 207790530104cce7ec460d8f4a15537eeebf63c3 Mon Sep 17 00:00:00 2001 From: rrene Date: Wed, 27 Mar 2024 13:13:36 -0700 Subject: [PATCH 026/170] =?UTF-8?q?--=20se=20quit=C3=B3=20el=20que=20no=20?= =?UTF-8?q?tenga=20terminal?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Ventas/PVCobranza.aspx.vb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Ventas/PVCobranza.aspx.vb b/Ventas/PVCobranza.aspx.vb index 453eaa541..438cd2e12 100644 --- a/Ventas/PVCobranza.aspx.vb +++ b/Ventas/PVCobranza.aspx.vb @@ -55,8 +55,8 @@ Partial Class Ventas_PVCobranza 'MOSTRAR SOLO CUENTAS DE CONTADO EN BDH 'If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then - DdlCuentaEfectivo.DataSource = DtCC.FiltraParametros(String.Format("CveMoneda = {0} AND CveTipoCuenta = 1 AND TieneTerminal = 0", CveMon)) - DdlCuentaCheque.DataSource = DtCC.FiltraParametros(String.Format("CveMoneda = {0} AND CveTipoCuenta = 1 AND TieneTerminal = 0", CveMon)) + DdlCuentaEfectivo.DataSource = DtCC.FiltraParametros(String.Format("CveMoneda = {0} AND CveTipoCuenta = 1", CveMon)) + DdlCuentaCheque.DataSource = DtCC.FiltraParametros(String.Format("CveMoneda = {0} AND CveTipoCuenta = 1", CveMon)) 'If UsuarioActual.Empresa.Funcionalidad(558) = "1" OrElse UsuarioActual.Empresa.Funcionalidad(531) = "1" Then From 469403b44ef6f21a3d8be19d0d2d61f650db2000 Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Wed, 27 Mar 2024 14:26:13 -0700 Subject: [PATCH 027/170] --FIX. Aplicacion de multiples metodos de pago en cobranza.aspx --- Ventas/PVCobranza.aspx.vb | 59 ++++++++++++++++++++++++++------------- 1 file changed, 40 insertions(+), 19 deletions(-) diff --git a/Ventas/PVCobranza.aspx.vb b/Ventas/PVCobranza.aspx.vb index 453eaa541..7c1c7fd05 100644 --- a/Ventas/PVCobranza.aspx.vb +++ b/Ventas/PVCobranza.aspx.vb @@ -55,8 +55,8 @@ Partial Class Ventas_PVCobranza 'MOSTRAR SOLO CUENTAS DE CONTADO EN BDH 'If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then - DdlCuentaEfectivo.DataSource = DtCC.FiltraParametros(String.Format("CveMoneda = {0} AND CveTipoCuenta = 1 AND TieneTerminal = 0", CveMon)) - DdlCuentaCheque.DataSource = DtCC.FiltraParametros(String.Format("CveMoneda = {0} AND CveTipoCuenta = 1 AND TieneTerminal = 0", CveMon)) + DdlCuentaEfectivo.DataSource = DtCC.FiltraParametros(String.Format("CveMoneda = {0} AND CveTipoCuenta = 1", CveMon)) + DdlCuentaCheque.DataSource = DtCC.FiltraParametros(String.Format("CveMoneda = {0} AND CveTipoCuenta = 1", CveMon)) 'If UsuarioActual.Empresa.Funcionalidad(558) = "1" OrElse UsuarioActual.Empresa.Funcionalidad(531) = "1" Then @@ -296,12 +296,19 @@ Partial Class Ventas_PVCobranza 'validaciones Dim Pagado As Decimal = TxtImporteEfectivo.Text.ToDecimal + TxtImporteCredito.Text.ToDecimal + TxtImporteDebito.Text.ToDecimal + TxtImporteCheque.Text.ToDecimal + TxtImporteTransferencia.Text.ToDecimal If Pagado = 0 Then - Alert("Favor de especificar importe", TipoMensaje.ToastAdventencia) + Alert("Favor de especificar importe", TipoMensaje.MsgAdvertencia) Exit Sub End If - If LtlSaldo.Text.ToDecimal > Pagado Then - Alert("Favor de especificar el saldo total de pagar", TipoMensaje.ToastAdventencia) + If LtlSaldo.Text.ToDecimal() > Pagado Then + Alert("Favor de especificar el saldo total de pagar", TipoMensaje.MsgAdvertencia) + Exit Sub + End If + + Dim PagadoSinEfectivo As Decimal = Pagado - TxtImporteEfectivo.Text.ToDecimal + + If PagadoSinEfectivo > LtlSaldo.Text.ToDecimal() Then + Alert("El pago con los metodos de pago actuales no puede ser mayor al importe de la venta", TipoMensaje.MsgAdvertencia) Exit Sub End If @@ -336,9 +343,10 @@ Partial Class Ventas_PVCobranza Dim CvePrePoliza As Integer Dim Fecha As Date = NowADS() - Dim PagoEfectivo As Decimal = TxtImporteEfectivo.Text.ToDecimal + Dim MsgError As String = "" Dim SaldoPendiente As Decimal = DbRowVenta("Saldo").ToString.ToDecimal + Dim PagoAplicado As Decimal = 0 Dim ObjConta As New ClsContabilidad Dim ObjIE As New ClsBancos(ObjConta.IniciaTransacSQL()) @@ -348,31 +356,44 @@ Partial Class Ventas_PVCobranza If CvePrePoliza > 0 Then - If PagoEfectivo > 0 Then - If PagoEfectivo > VentaActual.Total Then - TxtCambio.Text = (VentaActual.Total - PagoEfectivo).FormatoNumero - PagoEfectivo = VentaActual.Total - End If - MsgError = RegistraIE(13, DdlCuentaEfectivo.SelectedValue.ToEntero, PagoEfectivo, Fecha, CvePrePoliza, VentaActual, ObjIE, ObjConta, ObjVentas2) - End If - SaldoPendiente -= PagoEfectivo If MsgError = "" AndAlso SaldoPendiente > 0 AndAlso TxtImporteCredito.Text.ToDecimal > 0 Then MsgError = RegistraIE(12, DdlCuentaTarjetaCredito.SelectedValue.ToEntero, TxtImporteCredito.Text.ToDecimal, Fecha, CvePrePoliza, VentaActual, ObjIE, ObjConta, ObjVentas2) - PagoEfectivo = TxtImporteCredito.Text.ToDecimal + SaldoPendiente -= TxtImporteCredito.Text.ToDecimal + PagoAplicado += TxtImporteCredito.Text.ToDecimal End If - SaldoPendiente -= PagoEfectivo + If MsgError = "" AndAlso SaldoPendiente > 0 AndAlso TxtImporteDebito.Text.ToDecimal > 0 Then MsgError = RegistraIE(11, DdlCuentaTarjetaDebito.SelectedValue.ToEntero, TxtImporteDebito.Text.ToDecimal, Fecha, CvePrePoliza, VentaActual, ObjIE, ObjConta, ObjVentas2) - PagoEfectivo = TxtImporteDebito.Text.ToDecimal + SaldoPendiente -= TxtImporteDebito.Text.ToDecimal + PagoAplicado += TxtImporteDebito.Text.ToDecimal End If + If SaldoPendiente > 0 AndAlso TxtImporteCheque.Text.ToDecimal > 0 Then MsgError = RegistraIE(3, DdlCuentaCheque.SelectedValue.ToEntero, TxtImporteCheque.Text.ToDecimal, Fecha, CvePrePoliza, VentaActual, ObjIE, ObjConta, ObjVentas2) - PagoEfectivo = TxtImporteCheque.Text.ToDecimal + SaldoPendiente -= TxtImporteCheque.Text.ToDecimal + PagoAplicado += TxtImporteCheque.Text.ToDecimal End If If MsgError = "" AndAlso SaldoPendiente > 0 AndAlso TxtImporteTransferencia.Text.ToDecimal > 0 Then MsgError = RegistraIE(8, DdlCuentaTransferencia.SelectedValue.ToEntero, TxtImporteTransferencia.Text.ToDecimal, Fecha, CvePrePoliza, VentaActual, ObjIE, ObjConta, ObjVentas2) - PagoEfectivo = TxtImporteCheque.Text.ToDecimal + SaldoPendiente -= TxtImporteTransferencia.Text.ToDecimal + PagoAplicado += TxtImporteTransferencia.Text.ToDecimal + End If + + If MsgError = "" AndAlso SaldoPendiente > 0 AndAlso TxtImporteEfectivo.Text.ToDecimal > 0 Then + Dim PagoEfectivo As Decimal = TxtImporteEfectivo.Text.ToDecimal + + PagoAplicado += PagoEfectivo + If PagoAplicado > VentaActual.Total Then + TxtCambio.Text = (PagoAplicado - VentaActual.Total).FormatoNumero + PagoEfectivo = SaldoPendiente + End If + MsgError = RegistraIE(13, DdlCuentaEfectivo.SelectedValue.ToEntero, PagoEfectivo, Fecha, CvePrePoliza, VentaActual, ObjIE, ObjConta, ObjVentas2) + SaldoPendiente -= PagoEfectivo + End If + + If SaldoPendiente > 0 Then + MsgError = "Tiene saldo pendiente por aplicar" End If If MsgError = "" AndAlso Not ObjVentas2.UpdateVentaCorte(CveVenta, UsuarioActual.CveEmpresa, CveCorte) Then From 154b3bdb67d0281a5e774c48192876658b395938 Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Wed, 27 Mar 2024 17:42:44 -0700 Subject: [PATCH 028/170] FIX. Descuentos en factura global --- App_Code/Modelos.vb | 2 +- Ventas/FacturacionGlobal.aspx | 1 + Ventas/FacturacionGlobal.aspx.vb | 14 ++++++++++++-- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/App_Code/Modelos.vb b/App_Code/Modelos.vb index 03c0b9655..3a6b40a06 100644 --- a/App_Code/Modelos.vb +++ b/App_Code/Modelos.vb @@ -1670,7 +1670,7 @@ Namespace Modelos Me.IEPS = Me.DtDetalle.SUMD("ImporteIEPS") Me.Descuento = Me.DtDetalle.SUMD("Descuento") - Me.Total = Me.SubTotal + Me.IVA + Me.IEPS - (Me.RetIVA + Me.RetISR) + Me.Total = Me.SubTotal - Me.Descuento + Me.IVA + Me.IEPS - (Me.RetIVA + Me.RetISR) End Sub Public Sub PreparaTimbre() diff --git a/Ventas/FacturacionGlobal.aspx b/Ventas/FacturacionGlobal.aspx index ff74a30ee..60028d4a4 100644 --- a/Ventas/FacturacionGlobal.aspx +++ b/Ventas/FacturacionGlobal.aspx @@ -203,6 +203,7 @@ + diff --git a/Ventas/FacturacionGlobal.aspx.vb b/Ventas/FacturacionGlobal.aspx.vb index 5b0a90341..3d0392dde 100644 --- a/Ventas/FacturacionGlobal.aspx.vb +++ b/Ventas/FacturacionGlobal.aspx.vb @@ -106,6 +106,10 @@ Partial Class Ventas_FacturacionGlobal Public Sub CargaDatos() Me.CveSubProyecto = -1 + If UsuarioActual.CveRol = 1 Then + GvDatos.Columns(7).Visible = True + End If + Dim CveCliente As Integer = UsuarioActual.Empresa.Funcionalidad(714).ToEntero() Dim FechaI = If(IsDate(txtFechaI.Text.Trim()), txtFechaI.Text.Trim(), "-1") Dim FechaF = If(IsDate(txtFechaF.Text.Trim()), txtFechaF.Text.Trim(), "-1") @@ -213,15 +217,21 @@ Partial Class Ventas_FacturacionGlobal ObjFactura.DtRemisiones = DtRemisiones.FiltraParametros($"CveVenta IN ({SbRemisiones.ToString()})") ObjFactura.DtPagosFacturaGlobal = DtPagosFacturaGlobal - For Each Dr As DataRow In DtRemisionesPS.Rows + For Each Dr As DataRow In ObjFactura.DtRemisionesPS.Rows ObjFactura.AgregarPS(Dr("CvePS").ToString().ToEntero(), Dr("Cantidad").ToString().ToDecimal(), Dr("PU").ToString().ToDecimal(), Dr("Descuento").ToString().ToDecimal, Dr("Obs").ToString(), CveUM:=Dr("CveUM").ToString().ToEntero(), CveProyecto:=Dr("CveProyecto").ToString().ToEntero(), CveSubProyecto:=Dr("CveSubProyecto").ToString().ToEntero(), CveVentaDetallePadre:=Dr("CveVentaDetalle").ToString().ToEntero(), CveVentaDetalleRemision:=Dr("CveVentaDetalle").ToString().ToEntero()) Next ObjFactura.CalculaTotales() + + 'DEBE ESTAR DENTRO DE LA CLASE, COMENTAR UNA VEZ SE HAYA HECHO EL CAMBIO + 'If ObjFactura.Descuento > 0 Then + ' ObjFactura.Total = ObjFactura.Total - ObjFactura.Descuento + 'End If + ObjFactura.PreparaTimbre() - If ObjFactura.Total <> DtPagosFacturaGlobal.SUMD("Importe") Then + If Math.Abs(ObjFactura.Total.RoundSQL(2) - DtPagosFacturaGlobal.SUMD("Importe").RoundSQL(2)) > 0.01 Then Alert("Los pagos no coinciden con el total de la factura", TipoMensaje.MsgError) Exit Sub End If From a17229ee6ace1cf8d994266573b0b82c4d8a82a6 Mon Sep 17 00:00:00 2001 From: rrene Date: Thu, 28 Mar 2024 06:48:47 -0700 Subject: [PATCH 029/170] =?UTF-8?q?--=20b=C3=BAsqueda=20de=20productos,=20?= =?UTF-8?q?tambi=C3=A9n=20por=20numero=20parte?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Ashx/SIGWeb.ashx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Ashx/SIGWeb.ashx b/Ashx/SIGWeb.ashx index 9d6cd2c89..fdf93a213 100644 --- a/Ashx/SIGWeb.ashx +++ b/Ashx/SIGWeb.ashx @@ -1008,9 +1008,9 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState Name = Name.REPLACE(" ", "*") If Name <> "-1" Then If PSCodigoDescripcion = "PSCodigo" Then - DTPS = DTPS.Where((Function(a) a!PSCodigo.ToString.ToLower Like ("*" + Name.ToLower + "*"))) + DTPS = DTPS.Where((Function(a) a!PSCodigo.ToString.ToLower Like ("*" + Name.ToLower + "*") OrElse a!NumeroParte.ToString.ToLower Like ("*" + Name.ToLower + "*"))) Else - DTPS = DTPS.Where((Function(a) a!PSCodigoClasificacion.ToString.ToLower Like ("*" + Name.ToLower + "*"))) + DTPS = DTPS.Where((Function(a) a!PSCodigoClasificacion.ToString.ToLower Like ("*" + Name.ToLower + "*") OrElse a!NumeroParte.ToString.ToLower Like ("*" + Name.ToLower + "*"))) End If End If From 29e12878b065ad8a591d50d806530e7875bc0d4f Mon Sep 17 00:00:00 2001 From: rrene Date: Thu, 28 Mar 2024 17:30:20 -0700 Subject: [PATCH 030/170] --- pago por empleado --- Bancos/PopIEVentas.aspx.vb | 185 +++++++++++++++++++------------------ 1 file changed, 97 insertions(+), 88 deletions(-) diff --git a/Bancos/PopIEVentas.aspx.vb b/Bancos/PopIEVentas.aspx.vb index b7108b91a..fe4168ba0 100644 --- a/Bancos/PopIEVentas.aspx.vb +++ b/Bancos/PopIEVentas.aspx.vb @@ -1149,7 +1149,6 @@ Partial Class Bancos_PopIEVentas End If Dim MsgError As String = "" - Dim CveConceptoPrePoliza As Integer = -1 Dim Inserta As Boolean = True Dim ImportePagado As Decimal = 0 Dim Fecha As Date = TxtFechaDocumento.Text.Trim.ToDate @@ -1162,7 +1161,6 @@ Partial Class Bancos_PopIEVentas Case "2" 'FyE ImportePagado = TxtImporte.Text.Trim.ToDecimal Fecha = TxtFechaDocumento.Text.Trim.ToDate - CveConceptoPrePoliza = 29 CveIE = -1 Dim stringPersonal As String = DdlFuncionarioEmpleado.SelectedItem.ToString 'CvePersonal = DdlFuncionarioEmpleado.SelectedValue.ToEntero @@ -1252,108 +1250,118 @@ Partial Class Bancos_PopIEVentas Case "1" ' Banco CveIE = ObjIE.AddBancos_IE(DdlCuenta.SelectedValue.ToEntero, DdlTipoTransaccion.SelectedValue.ToEntero, Fecha, TxtFolio.Text.Trim, TxtPagueseA.Text.Trim, ImportePagado, CveMoneda, tipoCambioPago, TxtObservaciones.Text.Trim, "", True, True, -1, CvePrePoliza, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveCuentaTarjeta:=If(DivTarjeta.Visible, DdlTarjeta.SelectedValue.ToEntero, -1), CveCuentaDeposito:=CveCuentaDeposito, Referencia:=If(TxtReferenciaCIE.Visible, TxtReferenciaCIE.Text, "-1"), CveCorte:=CveCorte) If CveIE > 0 Then - If CveVenta > 0 Then - Pago.ImportePago = ImportePagado - Pago.ImportePagoVenta = ImportePagado - Pago.CveIE = CveIE - Pago.TipoPago = "B" - If MsgError = "" AndAlso AplicaPrePolizaPagoVenta(VentaActual, Pago, CvePrePoliza, ObjMov) Then - MsgError = "No se pudo insertar la póliza" - End If + Pago.ImportePago = ImportePagado + Pago.ImportePagoVenta = ImportePagado + Pago.CveIE = CveIE + Pago.TipoPago = "B" + + If MsgError = "" AndAlso AplicaPrePolizaPagoVenta(VentaActual, Pago, CvePrePoliza, ObjMov) Then + MsgError = "No se pudo insertar la póliza" End If + Else MsgError = "Ocurrio un Error al registrarse el movimiento bancario." Inserta = False End If + Case "2" ' FyE + + Pago.ImportePago = ImportePagado + Pago.ImportePagoVenta = ImportePagado + Pago.TipoPago = "FyE" + Pago.CvePersonal = DdlFuncionarioEmpleado.SelectedValue.ToEntero + Pago.Referencia = DdlFuncionarioEmpleado.SelectedItem.ToString + + If MsgError = "" AndAlso AplicaPrePolizaPagoVenta(VentaActual, Pago, CvePrePoliza, ObjMov) Then + MsgError = "No se pudo insertar la póliza" + End If + Case "3" 'Ingresos x Comprobar - If CveVenta > 0 Then - CveConceptoPrePoliza = 2 - CveCliente = DdlIngreso.SelectedValue.ToEntero - CveIE = -1 - ImportePagado = TxtImporte.Text.Trim.ToDecimal - Pago.ImportePago = ImportePagado - Pago.TipoPago = "I" - For Each rw As GridViewRow In GvIngresos.Rows - If rw.FCCheckBox("Chk").Checked Then - CveIE = rw.DataKey("CveIE").ToEntero - Pago.CveMonedaPago = rw.DataKey("CveMoneda").ToEntero - Pago.ImportePago = rw.FCTextBox("TxtSaldoDeudor").Text.ToDecimal - Pago.ImportePagoVenta = rw.FCTextBox("TxtSaldoDeudor").Text.ToDecimal - Pago.TCPago = rw.DataKey("TipoCambio").ToDecimal - Pago.FechaDocumentoRelacionado = rw.DataKey("FechaDocumento").ToDate - Pago.CveIE = CveIE - Pago.CveClientePago = rw.DataKey("CveCliente").ToEntero - If ChkPagarPesos.Checked Then Pago.TCPago = 1 / rw.DataKey("TipoCambio").ToDecimal - If ChkPagarDolares.Checked Then Pago.TCPago = rw.DataKey("TipoCambio").ToDecimal + CveCliente = DdlIngreso.SelectedValue.ToEntero + CveIE = -1 + ImportePagado = TxtImporte.Text.Trim.ToDecimal + Pago.ImportePago = ImportePagado + Pago.TipoPago = "I" - If AplicaPrePolizaPagoVenta(VentaActual, Pago, CvePrePoliza, ObjMov) Then - MsgError = "No se pudo insertar la póliza" - Else - Exit For - End If + For Each rw As GridViewRow In GvIngresos.Rows + If rw.FCCheckBox("Chk").Checked Then + CveIE = rw.DataKey("CveIE").ToEntero + Pago.CveMonedaPago = rw.DataKey("CveMoneda").ToEntero + Pago.ImportePago = rw.FCTextBox("TxtSaldoDeudor").Text.ToDecimal + Pago.ImportePagoVenta = rw.FCTextBox("TxtSaldoDeudor").Text.ToDecimal + Pago.TCPago = rw.DataKey("TipoCambio").ToDecimal + Pago.FechaDocumentoRelacionado = rw.DataKey("FechaDocumento").ToDate + Pago.CveIE = CveIE + Pago.CveClientePago = rw.DataKey("CveCliente").ToEntero + If ChkPagarPesos.Checked Then Pago.TCPago = 1 / rw.DataKey("TipoCambio").ToDecimal + If ChkPagarDolares.Checked Then Pago.TCPago = rw.DataKey("TipoCambio").ToDecimal + + If AplicaPrePolizaPagoVenta(VentaActual, Pago, CvePrePoliza, ObjMov) Then + MsgError = "No se pudo insertar la póliza" + Else + Exit For End If - Next - End If - Case "4" 'Deudores Diversos - If CveVenta > 0 Then - ImportePagado = TxtImporte.Text.Trim.ToDecimal - CveConceptoPrePoliza = 2 - 'CveProveedor2 = DdlDeudor.SelectedValue.ToEntero - CveIE = -1 - If DdlDeudor.SelectedValue.ToEntero <= 0 Then - Alert("Debe especificar el deudor.", TipoMensaje.MsgAdvertencia) - Exit Sub End If + Next - For Each rw As GridViewRow In GvDeudores.Rows - If rw.FCCheckBox("Chk").Checked AndAlso rw.FCTextBox("TxtSaldoDeudor").Text.ToDecimal <> 0 Then - Pago.CveIE = rw.DataKey("CveIE").ToEntero - Pago.CveMonedaPago = rw.DataKey("CveMoneda").ToEntero - Pago.ImportePago = rw.FCTextBox("TxtSaldoDeudor").Text.ToDecimal - Pago.TCPago = rw.DataKey("TipoCambio").ToDecimal - 'Pago.CveProveedor = DdlDeudor.SelectedValue.ToEntero - Pago.TipoPago = "DD" - If AplicaPrePolizaPagoVenta(VentaActual, Pago, CvePrePoliza, ObjMov) Then - MsgError = "No se pudo insertar la póliza" - Else - Exit For - End If - End If - Next + Case "4" 'Deudores Diversos + + ImportePagado = TxtImporte.Text.Trim.ToDecimal + 'CveProveedor2 = DdlDeudor.SelectedValue.ToEntero + CveIE = -1 + If DdlDeudor.SelectedValue.ToEntero <= 0 Then + Alert("Debe especificar el deudor.", TipoMensaje.MsgAdvertencia) + Exit Sub End If + + For Each rw As GridViewRow In GvDeudores.Rows + If rw.FCCheckBox("Chk").Checked AndAlso rw.FCTextBox("TxtSaldoDeudor").Text.ToDecimal <> 0 Then + Pago.CveIE = rw.DataKey("CveIE").ToEntero + Pago.CveMonedaPago = rw.DataKey("CveMoneda").ToEntero + Pago.ImportePago = rw.FCTextBox("TxtSaldoDeudor").Text.ToDecimal + Pago.TCPago = rw.DataKey("TipoCambio").ToDecimal + 'Pago.CveProveedor = DdlDeudor.SelectedValue.ToEntero + Pago.TipoPago = "DD" + If AplicaPrePolizaPagoVenta(VentaActual, Pago, CvePrePoliza, ObjMov) Then + MsgError = "No se pudo insertar la póliza" + Else + Exit For + End If + End If + Next + Case "5" 'Compras - If CveVenta > 0 Then - ImportePagado = TxtImporte.Text.Trim.ToDecimal - CveIE = -1 - For Each rw As GridViewRow In GvCompras.Rows - If rw.FCCheckBox("Chk").Checked AndAlso rw.FCTextBox("TxtSaldoDeudor").Text.ToDecimal <> 0 Then - Pago.CveMonedaPago = 1 - Pago.ImportePago = rw.FCTextBox("TxtSaldoDeudor").Text.ToDecimal - Pago.ImportePagoVenta = rw.FCTextBox("TxtSaldoDeudor").Text.ToDecimal - Pago.TipoPago = "Compra" - If AplicaPrePolizaPagoVenta(VentaActual, Pago, CvePrePoliza, ObjMov) Then + + ImportePagado = TxtImporte.Text.Trim.ToDecimal + CveIE = -1 + For Each rw As GridViewRow In GvCompras.Rows + If rw.FCCheckBox("Chk").Checked AndAlso rw.FCTextBox("TxtSaldoDeudor").Text.ToDecimal <> 0 Then + Pago.CveMonedaPago = 1 + Pago.ImportePago = rw.FCTextBox("TxtSaldoDeudor").Text.ToDecimal + Pago.ImportePagoVenta = rw.FCTextBox("TxtSaldoDeudor").Text.ToDecimal + Pago.TipoPago = "Compra" + If AplicaPrePolizaPagoVenta(VentaActual, Pago, CvePrePoliza, ObjMov) Then + MsgError = "No se pudo insertar la póliza" + End If + If MsgError = "" Then + Dim CompraActual As New Compra() With {.CveCompra = rw.DataKey("CveCompra").ToEntero, .ProveedorNombre = NombreCliente, .SerieFolio = rw.DataKey("SerieFolio"), .CveProveedor = rw.DataKey("CveProveedor").ToEntero, .IVA = rw.DataKey("IVA").ToDecimal, .IEPS = rw.DataKey("IEPS").ToDecimal, .RetIVA = rw.DataKey("RetIVA").ToDecimal, .RetISR = rw.DataKey("RetISR").ToDecimal, .Total = rw.DataKey("Total").ToDecimal, .PorcentajeIVA = rw.DataKey("PorcentajeIVA").ToDecimal, .CveSubProyecto = rw.DataKey("CveSubProyecto").ToEntero, .CveMoneda = rw.DataKey("CveMoneda").ToEntero, .CveTipoConceptoProveedor = rw.DataKey("CveTipoConcepto").ToEntero} + Dim PagoCompra As New CompraPago + + PagoCompra.CveMonedaPago = rw.DataKey("CveMoneda").ToEntero + PagoCompra.ImportePago = rw.FCTextBox("TxtSaldoDeudor").Text.ToDecimal + PagoCompra.TCPago = rw.DataKey("TipoCambio").ToDecimal + PagoCompra.CveProveedor = rw.DataKey("CveProveedor").ToEntero + PagoCompra.CveVentaRelacionada = CveVenta + PagoCompra.TipoPago = "Venta" + If AplicaPrePolizaPagoCompra(CompraActual, PagoCompra, CvePrePoliza, ObjMov) Then MsgError = "No se pudo insertar la póliza" End If - If MsgError = "" Then - Dim CompraActual As New Compra() With {.CveCompra = rw.DataKey("CveCompra").ToEntero, .ProveedorNombre = NombreCliente, .SerieFolio = rw.DataKey("SerieFolio"), .CveProveedor = rw.DataKey("CveProveedor").ToEntero, .IVA = rw.DataKey("IVA").ToDecimal, .IEPS = rw.DataKey("IEPS").ToDecimal, .RetIVA = rw.DataKey("RetIVA").ToDecimal, .RetISR = rw.DataKey("RetISR").ToDecimal, .Total = rw.DataKey("Total").ToDecimal, .PorcentajeIVA = rw.DataKey("PorcentajeIVA").ToDecimal, .CveSubProyecto = rw.DataKey("CveSubProyecto").ToEntero, .CveMoneda = rw.DataKey("CveMoneda").ToEntero, .CveTipoConceptoProveedor = rw.DataKey("CveTipoConcepto").ToEntero} - Dim PagoCompra As New CompraPago - - PagoCompra.CveMonedaPago = rw.DataKey("CveMoneda").ToEntero - PagoCompra.ImportePago = rw.FCTextBox("TxtSaldoDeudor").Text.ToDecimal - PagoCompra.TCPago = rw.DataKey("TipoCambio").ToDecimal - PagoCompra.CveProveedor = rw.DataKey("CveProveedor").ToEntero - PagoCompra.CveVentaRelacionada = CveVenta - PagoCompra.TipoPago = "Venta" - If AplicaPrePolizaPagoCompra(CompraActual, PagoCompra, CvePrePoliza, ObjMov) Then - MsgError = "No se pudo insertar la póliza" - End If - End If - End If - Next - End If + + End If + Next + Case Else 'NO SE HA DEFINIDO PARA FUNCIONARIO Y EMPLEADO If RBLContado.SelectedValue <> "2" Then @@ -1372,7 +1380,8 @@ Partial Class Bancos_PopIEVentas MsgError = "No se pudo insertar la poliza detalle" End If End If - + Else + MsgError = "venta no identificada" End If Else MsgError = "No se pudo insertar la póliza" From 2d98625aef87883902389ef1c32126df918f2755 Mon Sep 17 00:00:00 2001 From: rrene Date: Fri, 29 Mar 2024 10:11:49 -0700 Subject: [PATCH 031/170] -- mejora. --- facturaglobal. considerar de todos los clientes para emitir --- Ventas/FacturacionGlobal.aspx.vb | 8 ++++---- Ventas/PVCobranza.aspx.vb | 5 +++-- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/Ventas/FacturacionGlobal.aspx.vb b/Ventas/FacturacionGlobal.aspx.vb index 3d0392dde..44508a862 100644 --- a/Ventas/FacturacionGlobal.aspx.vb +++ b/Ventas/FacturacionGlobal.aspx.vb @@ -110,7 +110,7 @@ Partial Class Ventas_FacturacionGlobal GvDatos.Columns(7).Visible = True End If - Dim CveCliente As Integer = UsuarioActual.Empresa.Funcionalidad(714).ToEntero() + Dim CveCliente As Integer = -1 'UsuarioActual.Empresa.Funcionalidad(714).ToEntero() Dim FechaI = If(IsDate(txtFechaI.Text.Trim()), txtFechaI.Text.Trim(), "-1") Dim FechaF = If(IsDate(txtFechaF.Text.Trim()), txtFechaF.Text.Trim(), "-1") @@ -152,7 +152,7 @@ Partial Class Ventas_FacturacionGlobal End Sub Protected Sub BtnGuardar_Click(sender As Object, e As EventArgs) - Dim CveCliente As Integer = UsuarioActual.Empresa.Funcionalidad(714).ToEntero() + Dim CveCliente As Integer = -1 'UsuarioActual.Empresa.Funcionalidad(714).ToEntero() Dim CveMoneda As Integer = 1 Dim SbRemisiones As New StringBuilder() @@ -231,8 +231,8 @@ Partial Class Ventas_FacturacionGlobal ObjFactura.PreparaTimbre() - If Math.Abs(ObjFactura.Total.RoundSQL(2) - DtPagosFacturaGlobal.SUMD("Importe").RoundSQL(2)) > 0.01 Then - Alert("Los pagos no coinciden con el total de la factura", TipoMensaje.MsgError) + If Math.Abs(ObjFactura.Total.RoundSQL(2) - DtPagosFacturaGlobal.SUMD("Importe").RoundSQL(2)) > 0.1 Then + Alert($"Los pagos no coinciden con el total de la factura [{ObjFactura.Total.RoundSQL(2)}-{ DtPagosFacturaGlobal.SUMD("Importe").RoundSQL(2)}]", TipoMensaje.MsgError) Exit Sub End If diff --git a/Ventas/PVCobranza.aspx.vb b/Ventas/PVCobranza.aspx.vb index 7c1c7fd05..df3f633dd 100644 --- a/Ventas/PVCobranza.aspx.vb +++ b/Ventas/PVCobranza.aspx.vb @@ -346,6 +346,7 @@ Partial Class Ventas_PVCobranza Dim MsgError As String = "" Dim SaldoPendiente As Decimal = DbRowVenta("Saldo").ToString.ToDecimal + Dim SaldoTotalInicial As Decimal = DbRowVenta("Saldo").ToString.ToDecimal Dim PagoAplicado As Decimal = 0 Dim ObjConta As New ClsContabilidad @@ -384,8 +385,8 @@ Partial Class Ventas_PVCobranza Dim PagoEfectivo As Decimal = TxtImporteEfectivo.Text.ToDecimal PagoAplicado += PagoEfectivo - If PagoAplicado > VentaActual.Total Then - TxtCambio.Text = (PagoAplicado - VentaActual.Total).FormatoNumero + If PagoAplicado >= SaldoTotalInicial Then + TxtCambio.Text = (PagoAplicado - SaldoTotalInicial).FormatoNumero PagoEfectivo = SaldoPendiente End If MsgError = RegistraIE(13, DdlCuentaEfectivo.SelectedValue.ToEntero, PagoEfectivo, Fecha, CvePrePoliza, VentaActual, ObjIE, ObjConta, ObjVentas2) From bfde4b48e3baa191b827ba4eac1a780eabb56bf8 Mon Sep 17 00:00:00 2001 From: rakcsle Date: Mon, 1 Apr 2024 16:30:05 -0700 Subject: [PATCH 032/170] Compras Pronto Pago --- AF/CatAF.aspx | 3 +- App_Code/ClsCompras.vb | 7 +- Compras/Compras.aspx | 51 +++++ Compras/Compras.aspx.vb | 263 ++++++++++++++++++++++--- Compras/RepNotasCredito.aspx | 320 +++++++++++++++++++++---------- Compras/RepNotasCredito.aspx.vb | 173 ++++++++++++----- General/SaldosIniciales.aspx.vb | 4 +- Ventas/FacturacionGlobal.aspx.vb | 1 + 8 files changed, 647 insertions(+), 175 deletions(-) diff --git a/AF/CatAF.aspx b/AF/CatAF.aspx index 34ad4ee76..393b4fbb2 100644 --- a/AF/CatAF.aspx +++ b/AF/CatAF.aspx @@ -209,7 +209,8 @@ - + <%----%> + diff --git a/App_Code/ClsCompras.vb b/App_Code/ClsCompras.vb index e09c65bf0..c3f151af4 100644 --- a/App_Code/ClsCompras.vb +++ b/App_Code/ClsCompras.vb @@ -1630,7 +1630,7 @@ Public Class ClsCompras #Region "N O T A S - C R E D I T O" - Public Function GetNotasCreditoRep(CveProveedor As Integer, Opcion As Integer, FechaI As String, FechaF As String, CveEmpresa As Integer) As Boolean + Public Function GetNotasCreditoRep(CveProveedor As Integer, Opcion As Integer, FechaI As String, FechaF As String, CveEmpresa As Integer, Optional TipoReporte As Integer = 1) As Boolean Dim Retorno As Boolean = False @@ -1642,6 +1642,8 @@ Public Class ClsCompras .Add("@FechaI", SqlDbType.VarChar).Value = FechaI .Add("@FechaF", SqlDbType.VarChar).Value = FechaF .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + .Add("@TipoReporte", SqlDbType.Int).Value = TipoReporte + End With Try @@ -1656,6 +1658,9 @@ Public Class ClsCompras #End Region + + + #Region "F A C T U R A S " Public Function GetFacturas(CveFactura As Integer, Folio As String, FechaFacturaI As Date, FechaFacturaF As Date, RFC As String, Proveedor As String, FueValidado As Integer, CveResponsable As Integer, CveProveedorClasificacion As Integer, CveTipoProveedor As Integer, TipoComprobante As String, CveEmpresa As Integer, Optional Opcion As Integer = 1) As Boolean diff --git a/Compras/Compras.aspx b/Compras/Compras.aspx index 6de031337..3214eed66 100644 --- a/Compras/Compras.aspx +++ b/Compras/Compras.aspx @@ -499,6 +499,7 @@ <%----%> + <%-- Ocuado se carga con funcionalidad 574 --%>
    @@ -534,6 +535,19 @@
    + +
    + Remisión Nota de Crédito +
    + + + + <%----%> +
    +
    + + + @@ -5512,6 +5526,43 @@ + + + + + diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb index 6aa638695..cecb271b0 100644 --- a/Compras/Compras.aspx.vb +++ b/Compras/Compras.aspx.vb @@ -1118,6 +1118,8 @@ Partial Class Compras_Compras End Set End Property + +#Region "PROPIEDADES PRONTO PAGO" ''' ''' Descuento por pronto pago proveedor ''' @@ -1192,6 +1194,38 @@ Partial Class Compras_Compras End Set End Property + Private Property ImporteRNCSaldar As Decimal + Get + If ViewState("ImporteRNCSaldar") Is Nothing Then + ViewState("ImporteRNCSaldar") = 0D + End If + Return ViewState("ImporteRNCSaldar").ToString.ToDecimal + End Get + Set(value As Decimal) + ViewState("ImporteRNCSaldar") = value + End Set + End Property + + Private Property DTRemisionesNotaDeCredito As DataTable + Get + + If ViewState("DTRemisionesNotaDeCredito") Is Nothing Then + ViewState("DTRemisionesNotaDeCredito") = New DataTable + End If + + Return DirectCast(ViewState("DTRemisionesNotaDeCredito"), DataTable) + + End Get + Set(value As DataTable) + ViewState("DTRemisionesNotaDeCredito") = value + End Set + End Property + + +#End Region + + + @@ -1596,6 +1630,9 @@ Partial Class Compras_Compras DdlTipoComprobante.SelectedValueExist("DEV") End If + If UsuarioActual.Empresa.Funcionalidad(574).ToEntero = 1 Then + DdlTipoCompra.Items.Add(New ListItem("Remision Nota De Crédito", "13")) + End If End If @@ -6907,6 +6944,37 @@ Partial Class Compras_Compras End If Next + + If UsuarioActual.Empresa.Funcionalidad(574).ToEntero = 1 AndAlso DdlRemisionNotaCredito.SelectedValue.ToEntero > 0 AndAlso ImporteRNCSaldar > 0 Then + + 'Dim importeMovimientoNC As Decimal = Gvr.FCTextBox("TxtImporte").Text.ToDecimal + + Dim Pago As New CompraPago + Pago.ImportePago = ImporteRNCSaldar + Pago.CveMonedaPago = CompraActual.CveMoneda + Pago.CveCompraAmortizacion = CompraActual.CveCompra + Pago.Referencia = CompraActual.SerieFolio + Pago.TCPago = CompraActual.TC + Pago.AplicaAcreditable = False + Pago.TipoPago = "NC" + Pago.Fecha = CompraActual.Fecha 'toma la misma fecha de la provisión en el pago de NC + + Dim CompraPago As New Compra + ''datos de la compra tipodocto:Fac, para sobreescribirlos + 'CompraPago.CveCompra = DdlRemisionNotaCredito.SelectedValue.ToEntero + 'CompraPago.CveProveedor = DdlProveedor.SelectedValue.ToEntero + 'CompraPago.SerieFolio = Gvr.DataKey("SerieFolio") + 'CompraPago.TC = Gvr.DataKey("TipoCambio").ToDecimal + 'CompraPago.Fecha = Gvr.DataKey("Fecha").ToDate + 'CompraPago.CveMoneda = Gvr.DataKey("CveMoneda").ToEntero + 'CompraPago.Total = Gvr.DataKey("Total").ToDecimal + 'CompraPago.CveTipoConceptoProveedor = CveTipoConcepto + CompraPago.CveSubProyecto = CompraActual.CveSubProyecto + + ErrorPrepoliza = AplicaPrePolizaPagoCompra(CompraPago, Pago, CvePrePoliza, ObjConta) + + End If + If ErrorPrepoliza Then ErrorMovtosCxP = True Exit Select @@ -7475,7 +7543,7 @@ Partial Class Compras_Compras If UsuarioActual.Empresa.Funcionalidad(574).ToEntero = 1 AndAlso (ImporteRNC > 0 Or ImporteRNCProntoPago > 0) Then - If Not GeneraRemisionsNotadeCredito(ObjCompras.IniciaTransacSQL) Then + If Not GeneraRemisionsNotadeCredito(ObjCompras.IniciaTransacSQL, CveCompra) Then TieneError = True End If End If @@ -14354,7 +14422,7 @@ Partial Class Compras_Compras End Sub Protected Sub BtnVincularOC_Click(sender As Object, e As EventArgs) - + VincularOcProntoPago = False AjusteProntoPagoPorcentajeIVA = 0D AjusteProntoPagoConIVA = 0D AjusteProntoPagoSinIVA = 0D @@ -14435,10 +14503,14 @@ Partial Class Compras_Compras Next AjusteProntoPagoPorcentajeIVA = TmpDT.MAX("IVAPorcentaje").ToDecimal - AjusteProntoPagoConIVA = (ImporteCompraConIVA - ImporteOCConIVA) '+ ((ImporteCompraConIVA) * PorcentajeProntoPago) - AjusteProntoPagoSinIVA = (ImporteCompraSinIVA - ImporteOCSinIVA) '+ ((ImporteCompraSinIVA) * PorcentajeProntoPago) + AjusteProntoPagoConIVA = (ImporteCompraConIVA - ImporteOCConIVA) + AjusteProntoPagoSinIVA = (ImporteCompraSinIVA - ImporteOCSinIVA) + + If ConfirmaVinculacionOCProntoPago() Then + Vinculacion() + End If + - Vinculacion() Else LbSubTotalDif.Visible = True @@ -14453,6 +14525,7 @@ Partial Class Compras_Compras UpEstatus.Update() End Sub Protected Sub BtnVincularOCCompleta_Click(sender As Object, e As EventArgs) + VincularOcProntoPago = False Vinculacion(True) End Sub Private Sub Vinculacion(Optional VinculacionCompleta As Boolean = False) @@ -15356,6 +15429,9 @@ Partial Class Compras_Compras Protected Sub DdlProveedores_SelectedIndexChanged(sender As Object, e As EventArgs) CargarFacturas() + If UsuarioActual.Empresa.Funcionalidad(574).ToEntero = 1 Then + CargaDdlRemisionNotaCredito() + End If End Sub Private Sub CargarFacturas() @@ -19327,6 +19403,7 @@ Partial Class Compras_Compras dr("CveMetodoInventario") = 1 Next CargaGvInv() + End If ElseIf DdlTipoComprobante.SelectedValue.Contiene("Fac") Then If DdlTipoCompra.SelectedValue.Contiene("14") Then 'Recolección @@ -19342,9 +19419,24 @@ Partial Class Compras_Compras End If End If + If DdlTipoCompra.SelectedValue = "13" Then 'Remisión de nota de crédito + + If DdlTipoComprobante.SelectedValue = "NC" Then + CargaDdlRemisionNotaCredito() + Else + Alert("Para elegir Remisión de Nota de Crédito el tipo de documento debe de ser Nota de Crédito.", TipoMensaje.MsgAdvertencia) + DdlRemisionNotaCredito.SelectedValueExist(-1) + DdlTipoCompra.SelectedValueExist(-1) + End If + + + End If + End Sub + + #End Region #Region "GARANTÍAS" @@ -20514,24 +20606,7 @@ Partial Class Compras_Compras If resultadosFiltrados.Count > 0 Then - Dim EnumAgrupado = (From row In TmpDT.AsEnumerable() - Group row By - SubProyecto = row.Field(Of String)("SubProyecto"), - CveSubProyecto = row.Field(Of Integer)("CveSubProyecto"), - Clasificacion = row.Field(Of String)("Clasificacion"), - CveClasificacion = row.Field(Of Integer)("CveClasificacion"), - TipoGasto = row.Field(Of String)("TipoGasto"), - CveTipoGasto = row.Field(Of Integer)("CveTipoGasto") - Into Group - Select New With { - .SubProyecto = SubProyecto, - .CveSubProyecto = CveSubProyecto, - .Clasificacion = Clasificacion, - .CveClasificacion = CveClasificacion, - .CveTipoGasto = CveTipoGasto, - .TipoGasto = TipoGasto, - .TotalSum = Group.Sum(Function(r) If(IsDBNull(r("Total")), 0D, Convert.ToDecimal(r("Total")))) - }).ToList() + ''.TotalSum = Group.Sum(Function(r) r.Field(Of Decimal)("Total")) If Opcion = 1 Then @@ -20568,6 +20643,48 @@ Partial Class Compras_Compras Else + + 'Dim EnumAgrupado = (From row In TmpDT.AsEnumerable() + ' Group row By + ' SubProyecto = row.Field(Of String)("SubProyecto"), + ' CveSubProyecto = row.Field(Of Integer)("CveSubProyecto"), + ' Clasificacion = row.Field(Of String)("Clasificacion"), + ' CveClasificacion = row.Field(Of Integer)("CveClasificacion"), + ' TipoGasto = row.Field(Of String)("TipoGasto"), + ' CveTipoGasto = row.Field(Of Integer)("CveTipoGasto") + ' Into Group + ' Select New With { + ' .SubProyecto = SubProyecto, + ' .CveSubProyecto = CveSubProyecto, + ' .Clasificacion = Clasificacion, + ' .CveClasificacion = CveClasificacion, + ' .CveTipoGasto = CveTipoGasto, + ' .TipoGasto = TipoGasto, + ' .TotalSum = Group.Sum(Function(r) If(IsDBNull(r("Total")), 0D, Convert.ToDecimal(r("Total")))) + ' }).ToList() + + Dim EnumAgrupado = ( + From row In TmpDT.AsEnumerable() + Group row By + SubProyecto = If(row.IsNull("SubProyecto"), String.Empty, row.Field(Of String)("SubProyecto")), + CveSubProyecto = If(row.IsNull("CveSubProyecto"), -1, row.Field(Of Integer)("CveSubProyecto")), + Clasificacion = If(row.IsNull("Clasificacion"), String.Empty, row.Field(Of String)("Clasificacion")), + CveClasificacion = If(row.IsNull("CveClasificacion"), -1, row.Field(Of Integer)("CveClasificacion")), + TipoGasto = If(row.IsNull("TipoGasto"), String.Empty, row.Field(Of String)("TipoGasto")), + CveTipoGasto = If(row.IsNull("CveTipoGasto"), -1, row.Field(Of Integer)("CveTipoGasto")) + Into Group + Select New With { + .SubProyecto = SubProyecto, + .CveSubProyecto = CveSubProyecto, + .Clasificacion = Clasificacion, + .CveClasificacion = CveClasificacion, + .CveTipoGasto = CveTipoGasto, + .TipoGasto = TipoGasto, + .TotalSum = Group.Sum(Function(r) If(IsDBNull(r("Total")), 0D, Convert.ToDecimal(r("Total")))) + } + ).ToList() + + For Each item In EnumAgrupado @@ -20633,7 +20750,7 @@ Partial Class Compras_Compras #Region "PRONTO PAGO" - Public Function GeneraRemisionsNotadeCredito(ByRef trasaccion As SqlTransaction) As Boolean + Public Function GeneraRemisionsNotadeCredito(ByRef trasaccion As SqlTransaction, CveCompraRegistrada As Integer) As Boolean Dim respuesta As Boolean = True Dim CvePS_RNC As Integer = UsuarioActual.Empresa.Funcionalidad(580).ToEntero @@ -20669,6 +20786,8 @@ Partial Class Compras_Compras CompraRNC.CveMoneda = DdlMoneda.SelectedValue.ToEntero CompraRNC.Serie = TxtSerie.Text CompraRNC.Folio = TxtFolio.Text + CompraRNC.CveCompraAmortizacion = CveCompraRegistrada + @@ -20703,6 +20822,7 @@ Partial Class Compras_Compras CompraRNCProntoPAgo.CveMoneda = DdlMoneda.SelectedValue.ToEntero CompraRNCProntoPAgo.Serie = $"{TxtSerie.Text}_P" CompraRNCProntoPAgo.Folio = $"{TxtFolio.Text}_P" + CompraRNCProntoPAgo.CveCompraAmortizacion = CveCompraRegistrada CompraRNCProntoPAgo.ConfiguraRegistroRapidoRNC(CvePS_RNC, CveUM, UM, CveClasificacion, Clasificacion, PS, CveSubProyectoPrincipal, SubProyecto, ImporteRNCProntoPago, ImporteRNCProntoPago) If Not CompraRNCProntoPAgo.AddCompraRNC(trasaccion) Then @@ -20719,8 +20839,99 @@ Partial Class Compras_Compras Return respuesta End Function + + Public Property VincularOcProntoPago As Boolean + Get + If ViewState("VincularOcProntoPago") Is Nothing Then + ViewState("VincularOcProntoPago") = False + End If + Return Boolean.Parse(ViewState("VincularOcProntoPago").ToString) + End Get + Set(value As Boolean) + ViewState("VincularOcProntoPago") = value + End Set + End Property + + Public Function ConfirmaVinculacionOCProntoPago() As Boolean + + If VincularOcProntoPago Then + Return True + Else + + If ImporteRNCProntoPago > 0 Then + LblModalConfirmaVinculacionProntoPago.Text = $"Existe una diferencia de ${(ImporteRNC + ImporteRNCProntoPago).ToString("###,###,###.00")} entre la compra y la Orden de Compra, se generararan dos Remisiones de Nota de Crédito una por descuento de ${ImporteRNC.ToString("###,###,###.00")} y otra por pronto pago de ${ImporteRNCProntoPago.ToString("###,###,###.00")}" + Else + LblModalConfirmaVinculacionProntoPago.Text = $"Existe una diferencia de ${(ImporteRNC).ToString("###,###,###.00")} entre la compra y la Orden de Compra, se generara una Remision de Nota de Crédito una por descuento de ${ImporteRNC.ToString("###,###,###.00")}" + End If + + RegistraScript("$('#DVModalConfirmaVinculacionProntoPago').modal('show');") + UpModalConfirmaVinculacionProntoPago.Update() + + Return False + End If + + End Function + + Protected Sub BtnModalConfirmaVinculacionProntoPago_Click(sender As Object, e As EventArgs) + + RegistraScript("$('#DVModalConfirmaVinculacionProntoPago').modal('hide');") + VincularOcProntoPago = True + BtnVincularOC_Click(Nothing, Nothing) + + End Sub + + Private Sub CargaDdlRemisionNotaCredito() + DvDdlRemisionNotaCredito.Visible = True + DTRemisionesNotaDeCredito = New DataTable + + Dim ObjCompras As New ClsCompras + + If ObjCompras.GetNotasCreditoRep(DdlProveedor.SelectedValue.ToEntero, 0, "-1", "-1", UsuarioActual.CveEmpresa, 2) Then + DdlRemisionNotaCredito.DataSource = ObjCompras.DtResultados + DTRemisionesNotaDeCredito = ObjCompras.DtResultados + Else + Alert("Ocurrió un error al obtener el catálogo de Notas de Crédito", Extensiones.TipoMensaje.MsgError) + End If + + ObjCompras.Dispose() + + DdlRemisionNotaCredito.DataBind() + DdlRemisionNotaCredito.Items.Insert(0, New ListItem("-", "-1")) + + UpEstatus.Update() + + End Sub + Protected Sub DdlRemisionNotaCredito_SelectedIndexChanged(sender As Object, e As EventArgs) + + 'ImporteRNCSaldar = 0 + + 'If DdlRemisionNotaCredito.SelectedValue.ToEntero > 0 Then + ' ImporteRNCSaldar = DTRemisionesNotaDeCredito.FiltroPrimeroValor("Saldo", $" CveCompra = {DdlRemisionNotaCredito.SelectedValue.ToEntero} ").ToDecimal + ' SerieFolioProntoPago = DTRemisionesNotaDeCredito.FiltroPrimeroValor("Saldo", $" CveCompra = {DdlRemisionNotaCredito.SelectedValue.ToEntero} ").ToDecimal + ' TipoCambioProntoPago = DTRemisionesNotaDeCredito.FiltroPrimeroValor("Saldo", $" CveCompra = {DdlRemisionNotaCredito.SelectedValue.ToEntero} ").ToDecimal + ' FechaProntoPago = DTRemisionesNotaDeCredito.FiltroPrimeroValor("Saldo", $" CveCompra = {DdlRemisionNotaCredito.SelectedValue.ToEntero} ").ToDecimal + ' CveMonedaProntoPago = DTRemisionesNotaDeCredito.FiltroPrimeroValor("Saldo", $" CveCompra = {DdlRemisionNotaCredito.SelectedValue.ToEntero} ").ToDecimal + ' ProntoPago = DTRemisionesNotaDeCredito.FiltroPrimeroValor("Saldo", $" CveCompra = {DdlRemisionNotaCredito.SelectedValue.ToEntero} ").ToDecimal + 'End If + + ''Alert(ImporteRNCSaldar.ToString) + 'CompraPago.SerieFolio = Gvr.DataKey("SerieFolio") + 'CompraPago.TC = Gvr.DataKey("TipoCambio").ToDecimal + 'CompraPago.Fecha = Gvr.DataKey("Fecha").ToDate + 'CompraPago.CveMoneda = Gvr.DataKey("CveMoneda").ToEntero + + 'CompraPago.Total = Gvr.DataKey("Total").ToDecimal + 'CompraPago.CveTipoConceptoProveedor = CveTipoConcepto + + + End Sub + #End Region + + + + End Class @@ -22734,14 +22945,14 @@ Public Class ClsCompraManagerCompras If ES_RNC Then - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Me.Total, Me.Total, 370, Referencia, Concepto, CveCompra:=CveCompra, CveProveedor:=Me.CveProveedor, ImporteME:=If(TipoCambio = 1, 0, Me.Total), TipoCambio:=TipoCambio, + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Me.Total, Me.Total, 370, Referencia, Concepto, CveCompra:=CveCompra, CveCompraAmortizacion:=Me.CveCompraAmortizacion, CveProveedor:=Me.CveProveedor, ImporteME:=If(TipoCambio = 1, 0, Me.Total), TipoCambio:=TipoCambio, CveClasificacion:=-1, CveSubProyecto:=Me.CveSubProyecto, Contabilizable:=True) Then respuesta = False End If If respuesta Then - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Me.Total, Me.Total, 372, Referencia, Concepto, CveCompra:=CveCompra, CveProveedor:=Me.CveProveedor, ImporteME:=If(TipoCambio = 1, 0, Me.Total), TipoCambio:=TipoCambio, + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Me.Total, Me.Total, 372, Referencia, Concepto, CveCompra:=CveCompra, CveCompraAmortizacion:=Me.CveCompraAmortizacion, CveProveedor:=Me.CveProveedor, ImporteME:=If(TipoCambio = 1, 0, Me.Total), TipoCambio:=TipoCambio, CveClasificacion:=-1, CveSubProyecto:=Me.CveSubProyecto, Contabilizable:=True) Then respuesta = False diff --git a/Compras/RepNotasCredito.aspx b/Compras/RepNotasCredito.aspx index d7f55adc9..81a7980dc 100644 --- a/Compras/RepNotasCredito.aspx +++ b/Compras/RepNotasCredito.aspx @@ -104,108 +104,224 @@ - - - - - - - - - - - - <%-- --%> - Serie Folio - <%-- --%> - <%-- --%> - - - - - - - - - <%----%> - Fecha - <%-- --%> - <%----%> - - - - - - - - - <%----%> - Proveedor - <%-- --%> - <%-- --%> - - - - - - - - - <%----%> - Moneda - <%----%> - <%----%> - - - - - - - - - <%----%> - Original - <%----%> - <%----%> - - - - - - - - - <%-- --%> - Abonado - <%----%> - <%-- --%> - - - - - - - - - <%-- --%> - Saldo - <%----%> - <%----%> - - - - - - - - - - - - - + + + + + + +
    +
    + + + + + + + + + + + + + + <%-- --%> + Serie Folio + <%-- --%> + <%-- --%> + + + + + + + + + <%----%> + Fecha + <%-- --%> + <%----%> + + + + + + + + + <%----%> + Proveedor + <%-- --%> + <%-- --%> + + + + + + + + + <%----%> + Moneda + <%----%> + <%----%> + + + + + + + + + <%----%> + Original + <%----%> + <%----%> + + + + + + + + + <%-- --%> + Abonado + <%----%> + <%-- --%> + + + + + + + + + <%-- --%> + Saldo + <%----%> + <%----%> + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    + + + + + + + + + + + + + Serie Folio + + + + + + + + + Fecha + + + + + + + + + Proveedor + + + + + + + + + Moneda + + + + + + + + + Original + + + + + + + + + Abonado + + + + + + + + + Saldo + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + +
    + + +
    +
    + +
    + +
    +
    + + +
    +
    +
    + +
    +
    @@ -179,20 +194,7 @@
    -
    -
    - -
    - -
    -
    - - -
    -
    -
    - -
    +
    diff --git a/AF/CatModelos.aspx.vb b/AF/CatModelos.aspx.vb index 10b5fe558..30134ec70 100644 --- a/AF/CatModelos.aspx.vb +++ b/AF/CatModelos.aspx.vb @@ -3,10 +3,11 @@ Option Strict On Imports System.Data Imports System.Linq +Imports CFDi Imports Extensiones Partial Class AF_CatModelos - Inherits ClsPaginas + Inherits ClsPaginas #Region " PROPIEDADES" @@ -71,7 +72,13 @@ Partial Class AF_CatModelos CargaDatos() ObjAF.Dispose() UpDatos.Update() + RegarGlobalDT() End Sub + + Private Sub RegarGlobalDT() + GlobalDTModeloActivoFijo(UsuarioActual.CveEmpresa, -1) = Nothing + End Sub + Public Sub Edit_Click(sender As Object, e As EventArgs) Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow) HdnModalidad.Value = "U" @@ -101,6 +108,7 @@ Partial Class AF_CatModelos End If ObjAF.Dispose() UpDatos.Update() + RegarGlobalDT() End Sub Private Sub GvModelo_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvModelos.RowDataBound If e.Row.RowType = DataControlRowType.DataRow Then From cf49867ede2a02d3f80afe56b67cf7ae6ac3798e Mon Sep 17 00:00:00 2001 From: rrene Date: Tue, 2 Apr 2024 07:06:28 -0700 Subject: [PATCH 038/170] - cambio de columna de recolecciones a referencias, concatenadas --- Compras/Compras.aspx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Compras/Compras.aspx b/Compras/Compras.aspx index 6de031337..49e734911 100644 --- a/Compras/Compras.aspx +++ b/Compras/Compras.aspx @@ -528,7 +528,7 @@
    Recolección
    - + From 9a62c8ba735b741f452d653ddff3513956a0af4d Mon Sep 17 00:00:00 2001 From: JORGE LUIS CAUDILLO ESPARZA Date: Tue, 2 Apr 2024 12:16:16 -0700 Subject: [PATCH 039/170] nominas --- App_Code/ClsRH.vb | 10 +- Nomina/Nomina.aspx | 1 + Nomina/Nomina.aspx.cs | 165 ++++++++++++++++++++++++- RH/CatAsistenciasInasistencias.aspx | 17 ++- RH/CatAsistenciasInasistencias.aspx.vb | 11 +- RH/Personal.aspx | 1 + 6 files changed, 189 insertions(+), 16 deletions(-) diff --git a/App_Code/ClsRH.vb b/App_Code/ClsRH.vb index e0ee2474c..8ef0812c4 100644 --- a/App_Code/ClsRH.vb +++ b/App_Code/ClsRH.vb @@ -340,7 +340,7 @@ Public Class ClsRH Public Function AddAsistenciasInasistencias(Tipo As String, AplicaFalta As Boolean, AplicaAsistencia As Boolean, CveUsuario As Integer, CveEmpresa As Integer, chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo As Boolean, chkAplicaAguinaldo As Boolean, - chkAplicaUtilidades As Boolean, aplicaPago As Integer, aplicaPagoDoble As Integer, aplicaPrimaVac As Integer, Optional TipoCorto As String = "-1") As Boolean + chkAplicaUtilidades As Boolean, aplicaPago As Integer, aplicaPagoDoble As Integer, aplicaPrimaVac As Integer, Optional TipoCorto As String = "-1", Optional AplicaPrimaDominical As Integer = -1) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_RH_AsistenciasInasistenciasAdd") @@ -361,6 +361,7 @@ Public Class ClsRH .Add("@AplicaPago", SqlDbType.Int).Value = aplicaPago .Add("@AplicaPagoDoble", SqlDbType.Int).Value = aplicaPagoDoble .Add("@AplicaPrimaVac", SqlDbType.Int).Value = aplicaPrimaVac + .Add("@AplicaPrimaDominical", SqlDbType.Int).Value = AplicaPrimaDominical End With @@ -382,7 +383,7 @@ Public Class ClsRH Public Function UpdateAsistenciasInasistencias(Tipo As String, AplicaFalta As Boolean, AplicaAsistencia As Boolean, Estatus As Boolean, CveAI As Integer, chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo As Boolean, chkAplicaAguinaldo As Boolean, chkAplicaUtilidades As Boolean, - aplicaPago As Integer, aplicaPagoDoble As Integer, aplicaPrimaVac As Integer, Optional TipoCorto As String = "-1") As Boolean + aplicaPago As Integer, aplicaPagoDoble As Integer, aplicaPrimaVac As Integer, Optional TipoCorto As String = "-1", Optional AplicaPrimaDominical As Integer = -1) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_RH_AsistenciasInasistenciasUpdate") @@ -403,8 +404,9 @@ Public Class ClsRH .Add("@AplicaPago", SqlDbType.Int).Value = aplicaPago .Add("@AplicaPagoDoble", SqlDbType.Int).Value = aplicaPagoDoble .Add("@AplicaPrimaVac", SqlDbType.Int).Value = aplicaPrimaVac - End With - + .Add("@AplicaPrimaDominical", SqlDbType.Int).Value = AplicaPrimaDominical + End With + Try SqlAdapter.Fill(Data) Retorno = True diff --git a/Nomina/Nomina.aspx b/Nomina/Nomina.aspx index 187ee7301..57d521871 100644 --- a/Nomina/Nomina.aspx +++ b/Nomina/Nomina.aspx @@ -1132,6 +1132,7 @@ +
    diff --git a/Nomina/Nomina.aspx.cs b/Nomina/Nomina.aspx.cs index 9285ca71e..18ab63109 100644 --- a/Nomina/Nomina.aspx.cs +++ b/Nomina/Nomina.aspx.cs @@ -749,6 +749,16 @@ public partial class Nomina_Nomina2 : ClsPaginas GvNominas.Columns[CurrentColumn].Visible = true; CurrentColumn++; + field = (BoundField)GvNominas.Columns[CurrentColumn]; + field.HeaderText = "Especie"; + field.DataField = "SumaEspecie"; + field.ItemStyle.BackColor = System.Drawing.Color.LightGray; + GvNominas.Columns[CurrentColumn].ItemStyle.CssClass = " "; + GvNominas.Columns[CurrentColumn].HeaderStyle.CssClass = " "; + GvNominas.Columns[CurrentColumn].Visible = (dtempleados.SUM("SumaEspecie") != 0); + CurrentColumn++; + + field = (BoundField)GvNominas.Columns[CurrentColumn]; field.HeaderText = "Total"; field.DataField = "Total"; @@ -1118,6 +1128,8 @@ public partial class Nomina_Nomina2 : ClsPaginas dr["SubProyecto"] = drow["SubProyecto"]; dr["SumaPercepciones"] = dtempleados.SUM("SumaPercepciones", filtrogrupo); dr["SumaDeducciones"] = dtempleados.SUM("SumaDeducciones", filtrogrupo); + dr["SumaEspecie"] = dtempleados.SUM("SumaEspecie", filtrogrupo); + dr["Total"] = dtempleados.SUM("Total", filtrogrupo); dr["SumaObligaciones"] = dtempleados.SUM("SumaObligaciones", filtrogrupo); @@ -1142,6 +1154,8 @@ public partial class Nomina_Nomina2 : ClsPaginas dr["Departamento"] = drow["Departamento"]; dr["SumaPercepciones"] = dtempleados.SUM("SumaPercepciones", filtrogrupo); dr["SumaDeducciones"] = dtempleados.SUM("SumaDeducciones", filtrogrupo); + dr["SumaEspecie"] = dtempleados.SUM("SumaEspecie", filtrogrupo); + dr["Total"] = dtempleados.SUM("Total", filtrogrupo); dr["SumaObligaciones"] = dtempleados.SUM("SumaObligaciones", filtrogrupo); @@ -1166,6 +1180,8 @@ public partial class Nomina_Nomina2 : ClsPaginas dr["Turno"] = drow["Turno"]; dr["SumaPercepciones"] = dtempleados.SUM("SumaPercepciones", filtrogrupo); dr["SumaDeducciones"] = dtempleados.SUM("SumaDeducciones", filtrogrupo); + dr["SumaEspecie"] = dtempleados.SUM("SumaEspecie", filtrogrupo); + dr["Total"] = dtempleados.SUM("Total", filtrogrupo); dr["SumaObligaciones"] = dtempleados.SUM("SumaObligaciones", filtrogrupo); @@ -4338,6 +4354,12 @@ public partial class Nomina_Nomina2 : ClsPaginas SubTotales.EstatusD = -2; SubTotales.ImporteD = dtPerEmpleados.SUM("SumaDeducciones", string.Format("CvePersonal = {0}", SRCvePersonal)); + + NConcepto especie = new NConcepto(); + especie.CveConceptoD = 0; + especie.ConceptoD = "Especie"; + especie.EstatusD = -3; + especie.ImporteD = dtPerEmpleados.SUM("SumaEspecie", string.Format("CvePersonal = {0}", SRCvePersonal)); NConcepto Totales = new NConcepto(); Totales.CveConceptoD = 0; Totales.ConceptoD = "Total"; @@ -4345,6 +4367,10 @@ public partial class Nomina_Nomina2 : ClsPaginas Totales.ImporteD = dtPerEmpleados.SUM("Total", string.Format("CvePersonal = {0}", SRCvePersonal)); lconc.Add(SubTotales); + if (especie.ImporteD > 0) + { + lconc.Add(especie); + } lconc.Add(Totales); GvConceptos.DataSource = lconc; GvConceptos.DataBind(); @@ -4455,6 +4481,12 @@ public partial class Nomina_Nomina2 : ClsPaginas SubTotales.EstatusD = -2; SubTotales.ImporteD = dtPerEmpleados.SUM("SumaDeducciones", string.Format("CvePersonal = {0}", SRCvePersonal)); + NConcepto especie = new NConcepto(); + especie.CveConceptoD = 0; + especie.ConceptoD = "Especie"; + especie.EstatusD = -3; + especie.ImporteD = dtPerEmpleados.SUM("SumaEspecie", string.Format("CvePersonal = {0}", SRCvePersonal)); + NConcepto Totales = new NConcepto(); Totales.CveConceptoD = 0; Totales.ConceptoD = "Total"; @@ -4462,6 +4494,10 @@ public partial class Nomina_Nomina2 : ClsPaginas Totales.ImporteD = dtPerEmpleados.SUM("Total", string.Format("CvePersonal = {0}", SRCvePersonal)); lconc.Add(SubTotales); + if (especie.ImporteD > 0) + { + lconc.Add(especie); + } lconc.Add(Totales); DataTable dtCon = new DataTable(); @@ -4969,6 +5005,10 @@ public partial class Nomina_Nomina2 : ClsPaginas libro.Range(filainicio + 1, iniciotipe + 1, filainicio + 1, column).Merge().Value = "Deducciones"; } + column++; + libro.Cell(filainicio + 1, column).Value = " "; + libro.Range(filainicio + 2, column, filainicio + 3, column).Merge().Value = "Despensa"; + libro.Column(column).Width = 15; column++; libro.Cell(filainicio + 1, column).Value = " "; libro.Range(filainicio + 2, column, filainicio + 3, column).Merge().Value = "Total"; @@ -5084,7 +5124,13 @@ public partial class Nomina_Nomina2 : ClsPaginas { libro.Cell(Fila - 3, column).Value = dtempleados.SUM("SumaDeducciones", string.Format("CveSubProyecto ={0} AND CvePersonal > 0 ", oldcveSupProyecto)); } - + column++; + libro.Cell(Fila, column).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(166, 166, 166)); + libro.Cell(Fila, column).Value = erow["SumaEspecie"]; + if (newsubproyecto) + { + libro.Cell(Fila - 3, column).Value = dtempleados.SUM("SumaEspecie", string.Format("CveSubProyecto ={0} AND CvePersonal > 0 ", oldcveSupProyecto)); + } column++; libro.Cell(Fila, column).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(166, 166, 166)); libro.Cell(Fila, column).Value = erow["Total"]; @@ -5352,7 +5398,14 @@ public partial class Nomina_Nomina2 : ClsPaginas { libro.Cell(Fila - 3, column).Value = dtempleados.SUM("SumaDeducciones", string.Format("CveSubProyecto ={0} AND CvePersonal > 0 ", oldcveSupProyecto)); } - + column++; + libro.Cell(Fila, column).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(166, 166, 166)); + libro.Cell(Fila, column).Value = erow["SumaEspecie"]; + if (newsubproyecto) + { + libro.Cell(Fila - 3, column).Value = dtempleados.SUM("SumaEspecie", string.Format("CveSubProyecto ={0} AND CvePersonal > 0 ", oldcveSupProyecto)); + } + column++; libro.Cell(Fila, column).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(166, 166, 166)); libro.Cell(Fila, column).Value = erow["Total"]; @@ -5898,8 +5951,51 @@ public partial class Nomina_Nomina2 : ClsPaginas cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(11, GemBox.Document.Tables.TableWidthUnit.Percentage); paragraphh = new GemBox.Document.Paragraph(document, string.Format("${0:N2}", drow2["SumaDeducciones"])); cellx.Blocks.Add(paragraphh); paragraphh.ParagraphFormat.Alignment = GemBox.Document.HorizontalAlignment.Right; paragraphh.ParagraphFormat.Style = styilostrong; + + } + } + if(drow2["SumaEspecie"].ToString().ToDecimal()>0) + { + rowx = new GemBox.Document.Tables.TableRow(document); + tconeptos.Rows.Add(rowx); + { + cellx = new GemBox.Document.Tables.TableCell(document); rowx.Cells.Add(cellx); + cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(3, GemBox.Document.Tables.TableWidthUnit.Percentage); + paragraphh = new GemBox.Document.Paragraph(document, ""); cellx.Blocks.Add(paragraphh); + paragraphh.ParagraphFormat.Style = styilo; + cellx = new GemBox.Document.Tables.TableCell(document); rowx.Cells.Add(cellx); + cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(30, GemBox.Document.Tables.TableWidthUnit.Percentage); + paragraphh = new GemBox.Document.Paragraph(document, ""); cellx.Blocks.Add(paragraphh); paragraphh.ParagraphFormat.Alignment = GemBox.Document.HorizontalAlignment.Right; + paragraphh.ParagraphFormat.Style = styilo; + cellx = new GemBox.Document.Tables.TableCell(document); rowx.Cells.Add(cellx); + cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(6, GemBox.Document.Tables.TableWidthUnit.Percentage); + paragraphh = new GemBox.Document.Paragraph(document, ""); cellx.Blocks.Add(paragraphh); paragraphh.ParagraphFormat.Alignment = GemBox.Document.HorizontalAlignment.Right; + paragraphh.ParagraphFormat.Style = styilo; + cellx = new GemBox.Document.Tables.TableCell(document); rowx.Cells.Add(cellx); + cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(11, GemBox.Document.Tables.TableWidthUnit.Percentage); + paragraphh = new GemBox.Document.Paragraph(document, ""); cellx.Blocks.Add(paragraphh); paragraphh.ParagraphFormat.Alignment = GemBox.Document.HorizontalAlignment.Right; + paragraphh.ParagraphFormat.Style = styilo; } + + { + cellx = new GemBox.Document.Tables.TableCell(document); rowx.Cells.Add(cellx); + cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(3, GemBox.Document.Tables.TableWidthUnit.Percentage); + paragraphh = new GemBox.Document.Paragraph(document, ""); cellx.Blocks.Add(paragraphh); + paragraphh.ParagraphFormat.Style = styilo; + cellx = new GemBox.Document.Tables.TableCell(document); rowx.Cells.Add(cellx); + cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(30, GemBox.Document.Tables.TableWidthUnit.Percentage); + paragraphh = new GemBox.Document.Paragraph(document, "Especie"); cellx.Blocks.Add(paragraphh); paragraphh.ParagraphFormat.Alignment = GemBox.Document.HorizontalAlignment.Right; + paragraphh.ParagraphFormat.Style = styilo; + cellx = new GemBox.Document.Tables.TableCell(document); rowx.Cells.Add(cellx); + cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(6, GemBox.Document.Tables.TableWidthUnit.Percentage); + paragraphh = new GemBox.Document.Paragraph(document, ""); cellx.Blocks.Add(paragraphh); paragraphh.ParagraphFormat.Alignment = GemBox.Document.HorizontalAlignment.Right; + paragraphh.ParagraphFormat.Style = styilostrong; + cellx = new GemBox.Document.Tables.TableCell(document); rowx.Cells.Add(cellx); + cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(11, GemBox.Document.Tables.TableWidthUnit.Percentage); + paragraphh = new GemBox.Document.Paragraph(document, string.Format("${0:N2}", drow2["SumaEspecie"])); cellx.Blocks.Add(paragraphh); paragraphh.ParagraphFormat.Alignment = GemBox.Document.HorizontalAlignment.Right; + paragraphh.ParagraphFormat.Style = styilostrong; + } } { rowx = new GemBox.Document.Tables.TableRow(document); @@ -6225,10 +6321,60 @@ public partial class Nomina_Nomina2 : ClsPaginas cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(11, GemBox.Document.Tables.TableWidthUnit.Percentage); paragraphh = new GemBox.Document.Paragraph(document, string.Format("${0:N2}", dtempleados.SUM("SumaDeducciones", string.Format("CvePersonal > 0 AND CveSubProyecto={0}", CveSubProyecto)))); cellx.Blocks.Add(paragraphh); paragraphh.ParagraphFormat.Alignment = GemBox.Document.HorizontalAlignment.Right; paragraphh.ParagraphFormat.Style = styilostrong; - + } } + if(dtempleados.SUM("SumaEspecie", string.Format("CvePersonal > 0 AND CveSubProyecto={0}", CveSubProyecto))>0) + { + rowx = new GemBox.Document.Tables.TableRow(document); + tconeptos.Rows.Add(rowx); + { + cellx = new GemBox.Document.Tables.TableCell(document); rowx.Cells.Add(cellx); + cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(3, GemBox.Document.Tables.TableWidthUnit.Percentage); + paragraphh = new GemBox.Document.Paragraph(document, ""); cellx.Blocks.Add(paragraphh); + paragraphh.ParagraphFormat.Style = styilo; + cellx = new GemBox.Document.Tables.TableCell(document); rowx.Cells.Add(cellx); + cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(30, GemBox.Document.Tables.TableWidthUnit.Percentage); + paragraphh = new GemBox.Document.Paragraph(document, ""); cellx.Blocks.Add(paragraphh); paragraphh.ParagraphFormat.Alignment = GemBox.Document.HorizontalAlignment.Right; + paragraphh.ParagraphFormat.Style = styilo; + cellx = new GemBox.Document.Tables.TableCell(document); rowx.Cells.Add(cellx); + cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(6, GemBox.Document.Tables.TableWidthUnit.Percentage); + paragraphh = new GemBox.Document.Paragraph(document, ""); cellx.Blocks.Add(paragraphh); paragraphh.ParagraphFormat.Alignment = GemBox.Document.HorizontalAlignment.Right; + paragraphh.ParagraphFormat.Style = styilo; + cellx = new GemBox.Document.Tables.TableCell(document); rowx.Cells.Add(cellx); + cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(11, GemBox.Document.Tables.TableWidthUnit.Percentage); + paragraphh = new GemBox.Document.Paragraph(document, ""); cellx.Blocks.Add(paragraphh); paragraphh.ParagraphFormat.Alignment = GemBox.Document.HorizontalAlignment.Right; + paragraphh.ParagraphFormat.Style = styilo; + + } + + { + cellx = new GemBox.Document.Tables.TableCell(document); rowx.Cells.Add(cellx); + cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(3, GemBox.Document.Tables.TableWidthUnit.Percentage); + paragraphh = new GemBox.Document.Paragraph(document, ""); cellx.Blocks.Add(paragraphh); + paragraphh.ParagraphFormat.Style = styilostrong; + + + cellx = new GemBox.Document.Tables.TableCell(document); rowx.Cells.Add(cellx); + cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(30, GemBox.Document.Tables.TableWidthUnit.Percentage); + paragraphh = new GemBox.Document.Paragraph(document, "Especie"); cellx.Blocks.Add(paragraphh); paragraphh.ParagraphFormat.Alignment = GemBox.Document.HorizontalAlignment.Right; + paragraphh.ParagraphFormat.Style = styilo; + + + cellx = new GemBox.Document.Tables.TableCell(document); rowx.Cells.Add(cellx); + cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(6, GemBox.Document.Tables.TableWidthUnit.Percentage); + paragraphh = new GemBox.Document.Paragraph(document, ""); cellx.Blocks.Add(paragraphh); paragraphh.ParagraphFormat.Alignment = GemBox.Document.HorizontalAlignment.Right; + paragraphh.ParagraphFormat.Style = styilostrong; + + + cellx = new GemBox.Document.Tables.TableCell(document); rowx.Cells.Add(cellx); + cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(11, GemBox.Document.Tables.TableWidthUnit.Percentage); + paragraphh = new GemBox.Document.Paragraph(document, string.Format("${0:N2}", dtempleados.SUM("SumaEspecie", string.Format("CvePersonal > 0 AND CveSubProyecto={0}", CveSubProyecto)) )); cellx.Blocks.Add(paragraphh); paragraphh.ParagraphFormat.Alignment = GemBox.Document.HorizontalAlignment.Right; + paragraphh.ParagraphFormat.Style = styilostrong; + //SumaEspecie + } + } //no empleados { @@ -6579,7 +6725,7 @@ public partial class Nomina_Nomina2 : ClsPaginas cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(11, GemBox.Document.Tables.TableWidthUnit.Percentage); paragraphh = new GemBox.Document.Paragraph(document, string.Format("${0:N2}", dtempleados.SUM("SumaDeducciones", "CvePersonal > 0 "))); cellx.Blocks.Add(paragraphh); paragraphh.ParagraphFormat.Alignment = GemBox.Document.HorizontalAlignment.Right; paragraphh.ParagraphFormat.Style = styilostrong; - + //SumaEspecie } } { @@ -7918,7 +8064,12 @@ public partial class Nomina_Nomina2 : ClsPaginas SubTotales.ConceptoD = "Total Deducciones"; SubTotales.EstatusD = -2; SubTotales.ImporteD = dtempleadosSimula.SUM("SumaDeducciones", string.Format("CvePersonal = {0}", SRCvePersonal)); - + + NConcepto especie = new NConcepto(); + especie.CveConceptoD = 0; + especie.ConceptoD = "Especie"; + especie.EstatusD = -3; + especie.ImporteD = dtempleadosSimula.SUM("SumaEspecie", string.Format("CvePersonal = {0}", SRCvePersonal)); NConcepto Totales = new NConcepto(); Totales.CveConceptoD = 0; Totales.ConceptoD = "Total"; @@ -7926,6 +8077,10 @@ public partial class Nomina_Nomina2 : ClsPaginas Totales.ImporteD = dtempleadosSimula.SUM("Total", string.Format("CvePersonal = {0}", SRCvePersonal)); lconc.Add(SubTotales); + if (especie.ImporteD > 0) + { + lconc.Add(especie); + } lconc.Add(Totales); DataTable dtCon = new DataTable(); diff --git a/RH/CatAsistenciasInasistencias.aspx b/RH/CatAsistenciasInasistencias.aspx index 4b27fd759..9a89935e4 100644 --- a/RH/CatAsistenciasInasistencias.aspx +++ b/RH/CatAsistenciasInasistencias.aspx @@ -31,7 +31,7 @@ - + @@ -95,6 +95,11 @@ + + + + + a @@ -200,7 +205,7 @@
    -
    +

    @@ -211,8 +216,12 @@
    -
    - +
    + +
    +
    +
    +
    diff --git a/RH/CatAsistenciasInasistencias.aspx.vb b/RH/CatAsistenciasInasistencias.aspx.vb index 6f2ff753a..e280abb9a 100644 --- a/RH/CatAsistenciasInasistencias.aspx.vb +++ b/RH/CatAsistenciasInasistencias.aspx.vb @@ -69,6 +69,9 @@ Partial Class RH_CatAsistenciasInasistencias AplicaRetardo.Checked = False AplicaAguinaldo.Checked = False AplicaUtilidades.Checked = False + ChkAplicaPagoDoble.Checked = False + ChkAplicaPrimaDominical.Checked = False + TipoTxt.Text = "" TxtTipoCorto.Text = "" UpModalTiposD.Update() @@ -88,10 +91,11 @@ Partial Class RH_CatAsistenciasInasistencias Dim aplicaPago As Integer = If(ChkAplicaPago.Checked, 1, 0) Dim aplicaPagoDoble As Integer = If(ChkAplicaPagoDoble.Checked, 1, 0) Dim aplicaPrimaVac As Integer = If(ChkAplicaPrimaVac.Checked, 1, 0) + Dim AplicaPrimaDominical As Integer = If(ChkAplicaPrimaDominical.Checked, 1, 0) If ObjAsistenciasInasistencias.AddAsistenciasInasistencias(TipoTxt.Text.Trim, chkAplicaFalta, chkAplicaNoAplica, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, - chkAplicaVacacion, chkAplicaIncapacidad, chkAplicaRetardo, chkAplicaAguinaldo, chkAplicaUtilidades, aplicaPago, aplicaPagoDoble, aplicaPrimaVac, TxtTipoCorto.Text) Then + chkAplicaVacacion, chkAplicaIncapacidad, chkAplicaRetardo, chkAplicaAguinaldo, chkAplicaUtilidades, aplicaPago, aplicaPagoDoble, aplicaPrimaVac, TxtTipoCorto.Text, AplicaPrimaDominical) Then TipoTxt.Text = "" Alert("El nuevo Tipo Asistencias/Inasistencias se guardó correctamente.", TipoMensaje.MsgInformacion) UpTitulos.Update() @@ -136,7 +140,7 @@ Partial Class RH_CatAsistenciasInasistencias ChkAplicaPago.Checked = If(GvRow.DataKey("AplicaPago") = "Aplica", True, False) ChkAplicaPagoDoble.Checked = If(GvRow.DataKey("AplicaPagoDoble") = "Aplica", True, False) ChkAplicaPrimaVac.Checked = If(GvRow.DataKey("AplicaPrimaVac") = "Aplica", True, False) - + ChkAplicaPrimaDominical.Checked = If(GvRow.DataKey("AplicaPrimaDominical") = "Aplica", True, False) ChkEstatus.Checked = If(GvRow.DataKey("Estatus") = "Activo", True, False) CveTipoAsisAEditar = Convert.ToInt32(GvRow.DataKey("CveAsistenciasInasistencias")) 'Guardamos en una propiedad el id del registro del cual haremos cambios, se guarda y se utiliza en el metodo "GvDatos_RowUpdating" @@ -170,12 +174,13 @@ Partial Class RH_CatAsistenciasInasistencias Dim aplicaPagoDoble As Integer = If(ChkAplicaPagoDoble.Checked, 1, 0) Dim aplicaPrimaVac As Integer = If(ChkAplicaPrimaVac.Checked, 1, 0) + Dim AplicaPrimaDominical As Integer = If(ChkAplicaPrimaDominical.Checked, 1, 0) If ObjAsistenciasInasistencias.UpdateAsistenciasInasistencias(Tipo, ckAplicaFalta, AplicaAsistencia, Estatus, CveAsistenciasInasistencias, chkAplicaVacacion, chkAplicaIncapacidad, chkAplicaRetardo, chkAplicaAguinaldo, chkAplicaUtilidades, aplicaPago, aplicaPagoDoble, - aplicaPrimaVac, TxtTipoCorto.Text) Then + aplicaPrimaVac, TxtTipoCorto.Text, AplicaPrimaDominical) Then GvDatos.EditIndex = -1 ViewState("DTAsistenciasInasistencias") = ObjAsistenciasInasistencias.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa) GlobalDTAsistenciasInasistencias(UsuarioActual.CveEmpresa) = Nothing diff --git a/RH/Personal.aspx b/RH/Personal.aspx index 9053f04f4..eeef32c5e 100644 --- a/RH/Personal.aspx +++ b/RH/Personal.aspx @@ -2177,6 +2177,7 @@ +
    From 881f4a80b343e5c7ff136c9d909ba3d20d789c6b Mon Sep 17 00:00:00 2001 From: rrene Date: Tue, 2 Apr 2024 13:28:36 -0700 Subject: [PATCH 040/170] =?UTF-8?q?--actvac=C3=B3n=20para=20visualza=20cue?= =?UTF-8?q?nta=20de=20caja=20chica,=20cuando=20tiene=20funcionaldad=20de?= =?UTF-8?q?=20cobro=20en=20caja.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Bancos/IE.aspx.vb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Bancos/IE.aspx.vb b/Bancos/IE.aspx.vb index 836808ff2..7a7dfdde6 100644 --- a/Bancos/IE.aspx.vb +++ b/Bancos/IE.aspx.vb @@ -1637,7 +1637,7 @@ Partial Class Bancos_IE DdlCuenta.Items.Clear() Dim dt As DataTable - If UsuarioActual.Empresa.Funcionalidad(127) = "1" Then + If UsuarioActual.Empresa.Funcionalidad(127) = "1" OrElse UsuarioActual.Empresa.Funcionalidad(109) = "1" Then dt = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveEmpresa:=UsuarioActual.CveEmpresa) Else dt = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveEmpresa:=UsuarioActual.CveEmpresa).FiltraParametros("CveTipoCuenta <> 1") ' quito las cajas chicas From cac60140e01292e9f17969bae8322096e1112825 Mon Sep 17 00:00:00 2001 From: rakcsle Date: Tue, 2 Apr 2024 18:57:23 -0700 Subject: [PATCH 041/170] Corrcciones AF, Compras CodigoPS en GV --- AF/CatAF.aspx | 5 +++-- AF/CatAF.aspx.vb | 20 ++++++++++++++++---- Compras/Compras.aspx | 2 +- Compras/Compras.aspx.vb | 21 ++++++++++++++++++--- 4 files changed, 38 insertions(+), 10 deletions(-) diff --git a/AF/CatAF.aspx b/AF/CatAF.aspx index 393b4fbb2..b32f78b85 100644 --- a/AF/CatAF.aspx +++ b/AF/CatAF.aspx @@ -72,7 +72,7 @@ -
    +
    @@ -131,7 +131,8 @@
    Cliente:
    - + <%----%> +
    Grupo:
    diff --git a/AF/CatAF.aspx.vb b/AF/CatAF.aspx.vb index a9dac3d27..239c3235c 100644 --- a/AF/CatAF.aspx.vb +++ b/AF/CatAF.aspx.vb @@ -95,9 +95,20 @@ Partial Class AF_CatAF 'DdlProyecto.DataBind() 'DdlProyecto.Items.Insert(0, New ListItem("Todos", "-1")) - DdlCliente.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa) - DdlCliente.DataBind() - DdlCliente.Items.Insert(0, New ListItem("Todos", "-1")) + 'DdlCliente.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa) + 'DdlCliente.DataBind() + 'DdlCliente.Items.Insert(0, New ListItem("Todos", "-1")) + + 'CargaClientes + Dim EsWS As Boolean = If(UsuarioActual.Empresa.Funcionalidad(105) = "1" Or UsuarioActual.Empresa.Funcionalidad(141) = "1", True, False) + If EsWS Then + DdlClientes.setEsWebService(True) + Else + DdlClientes.setEsWebService(False) + DdlClientes.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa, -1) + DdlClientes.DataBind() + DdlClientes.ddl.Items.Insert(0, New ListItem("Todos", "-1")) + End If CargarTipoActivoFijo() CargaGrupos() @@ -234,7 +245,8 @@ Partial Class AF_CatAF If intContador > 0 Then strSQL1.AppendFormat(" group by CveActivoFijo having count(*)={0}", intContador) - If ObjAF.GetActivosFijos(-1, UsuarioActual.CveEmpresa, Codigo, Descripcion, DdlTipoActivo.SelectedValue.ToEntero, DdlSubTipoActivo.SelectedValue.ToEntero, NoSerie, Año, CvePersonaResponsable, DdlProyecto.SelectedValue.ToEntero, DdlSubProyecto.SelectedValue.ToEntero, DdlEstatus.SelectedValue.ToEntero, strSQL1.ToString, -1, CveGrupo:=DdlGrupo.SelectedValue.ToEntero) Then + Dim Cvecliente As Integer = If(DdlClientes.SelectedValue.ToEntero > 0, DdlClientes.SelectedValue.ToEntero, -1) + If ObjAF.GetActivosFijos(-1, UsuarioActual.CveEmpresa, Codigo, Descripcion, DdlTipoActivo.SelectedValue.ToEntero, DdlSubTipoActivo.SelectedValue.ToEntero, NoSerie, Año, CvePersonaResponsable, DdlProyecto.SelectedValue.ToEntero, DdlSubProyecto.SelectedValue.ToEntero, DdlEstatus.SelectedValue.ToEntero, strSQL1.ToString, CveCliente:=CveCliente, CveGrupo:=DdlGrupo.SelectedValue.ToEntero) Then If ObjAF.DtResultados.Rows.Count > 0 Then DtActivosFijos = ObjAF.DtResultados 'GvDatos.DataSource = ObjAF.DtResultados diff --git a/Compras/Compras.aspx b/Compras/Compras.aspx index 45aff2651..5b9c971a6 100644 --- a/Compras/Compras.aspx +++ b/Compras/Compras.aspx @@ -775,7 +775,7 @@
    - +
    diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb index cecb271b0..7342b296b 100644 --- a/Compras/Compras.aspx.vb +++ b/Compras/Compras.aspx.vb @@ -17044,6 +17044,8 @@ Partial Class Compras_Compras ' End If 'End If + + Select Case Modalidad Case "A" 'ADD @@ -17058,11 +17060,13 @@ Partial Class Compras_Compras Else IVA = Math.Round(DdlIVA.SelectedValue.ToDecimal - 1, 2) End If + + AddPS(TxtCantidad.Text.Trim.ToDecimal, ddlUM.SelectedValue.ToEntero, ddlUM.SelectedItem.Text, DdlClasificacion.SelectedValue.ToEntero, DdlClasificacion.SelectedItem.Text, DdlPS.SelectedValue.ToEntero, DdlPS.SelectedText, HdnTipoPS.Value.ToEntero, DdlSubProyecto.SelectedValue.ToString, DdlSubProyecto.SelectedItem.Text, DdlProyecto.SelectedItem.Text, DdlProyecto.SelectedValue.ToString, TxtObsPS.Text.Trim, TxtPrecio.Text.Trim.ToDecimal, Total, IVA, TxtRetIVAModal.Text.ToDecimal / 100, TxtRetISRModal.Text.ToDecimal / 100, TxtIEPSModal.Text.ToDecimal / 100, 0, TxtDescuentoModal.Text.ToDecimal, OtrosGastos:=0, CveTipoGasto:=DdlTipoGasto.SelectedValue.ToEntero, TipoGasto:=DdlTipoGasto.SelectedItem.Text, NoDeducible:=ChkEsNoDeduciblePS.Checked, CveSATPS:=SATClavePS, CveContratoDetalle:=CveContratoDetalle, - CveCultivoCuadroDetalle:=If(DdlCultivosCuadro.SelectedValue.ToEntero > 0, DdlCultivosCuadro.SelectedValue.ToEntero, -1), TemporadaCuadro:=If(DdlCultivosCuadro.SelectedValue.ToEntero > 0, DdlCultivosCuadro.SelectedItem.Text, "")) + CveCultivoCuadroDetalle:=If(DdlCultivosCuadro.SelectedValue.ToEntero > 0, DdlCultivosCuadro.SelectedValue.ToEntero, -1), TemporadaCuadro:=If(DdlCultivosCuadro.SelectedValue.ToEntero > 0, DdlCultivosCuadro.SelectedItem.Text, ""), CodigoPS:=CodigoPS) AddPS2() LimpiaAgregar() @@ -17135,11 +17139,13 @@ Partial Class Compras_Compras Optional PSCodigo As String = "-", Optional PSDescripcion As String = "-", Optional CantidadF As Double = -1, Optional EntregaDirecta As Integer = -1, Optional OtrosGastos As Decimal = 0, Optional CveSATPS As Integer = -1, Optional CargaXml As Boolean = False, Optional CveTipoGasto As Integer = -1, Optional TipoGasto As String = "", Optional PorcentajeIVA As Decimal = 0, Optional PorcentajeIEPS As Decimal = 0, Optional PorcentajeRetIVA As Decimal = 0, Optional PorcentajeRetISR As Decimal = 0, Optional NoDeducible As Boolean = False, Optional CveContratoDetalle As Integer = -1, Optional CveCultivoCuadroDetalle As Integer = -1, - Optional CveSATPSActualizado As Boolean = False, Optional TemporadaCuadro As String = "") As Integer + Optional CveSATPSActualizado As Boolean = False, Optional TemporadaCuadro As String = "", Optional CodigoPS As String = "") As Integer Dim Row As DataRow = Nothing - + If Not TmpDT.Columns.Contains("CodigoPS") Then + TmpDT.Columns.Add("CodigoPS") + End If Row = TmpDT.NewRow() Dim Retorno As Integer = 0 @@ -17224,6 +17230,12 @@ Partial Class Compras_Compras Row("Clasificacion") = Clasificacion Row("CvePS") = CvePS Row("PS") = PS + + If CodigoPS.Trim = "" Then + CodigoPS = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePS).FiltroPrimeroValor("CodigoPS") + End If + Row("CodigoPS") = CodigoPS + Row("CveTipoPS") = CveTipoPS Row("PSDescripcion") = PSDescripcion @@ -17407,6 +17419,9 @@ Partial Class Compras_Compras DrPS("Clasificacion") = PSRow("Clasificacion").ToString DrPS("CvePS") = DdlPS.SelectedValue DrPS("PS") = PSRow("PS").ToString + + DrPS("CodigoPS") = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=DdlPS.SelectedValue.ToEntero).FiltroPrimeroValor("CodigoPS") + DrPS("CveTipoPS") = CveTipoPS DrPS("CveSATPS") = PSRow("CveSATPS").ToString.ToEntero DrPS("SATClaveProductoServicio") = PSRow("SATClaveProductoServicio").ToString From 161cbdd3ff3bdfc6068e6218ba0314c45d628f6e Mon Sep 17 00:00:00 2001 From: rrene Date: Wed, 3 Apr 2024 08:36:46 -0700 Subject: [PATCH 042/170] =?UTF-8?q?--=20cambio=20en=20tipo=20de=20p=C3=B3l?= =?UTF-8?q?iza=20y=20plantillapoliza?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Ventas/PVCobranza.aspx.vb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Ventas/PVCobranza.aspx.vb b/Ventas/PVCobranza.aspx.vb index df3f633dd..7062626f0 100644 --- a/Ventas/PVCobranza.aspx.vb +++ b/Ventas/PVCobranza.aspx.vb @@ -353,7 +353,7 @@ Partial Class Ventas_PVCobranza Dim ObjIE As New ClsBancos(ObjConta.IniciaTransacSQL()) Dim ObjVentas2 As New ClsVentas(ObjConta.IniciaTransacSQL()) Try - CvePrePoliza = ObjConta.AddPrePolizas("PVCobranza", 5, 0, 0, 1, Fecha, $"Pago {VentaActual.SerieFolio}", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) + CvePrePoliza = ObjConta.AddPrePolizas("PVCobranza", 11, 0, 0, 1, Fecha, $"Pago {VentaActual.SerieFolio}", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) If CvePrePoliza > 0 Then From cc25a413a6562dddadfb702e93cadffed0cf8dce Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Wed, 3 Apr 2024 13:06:38 -0700 Subject: [PATCH 043/170] =?UTF-8?q?--Pagos=20en=20ventas,=20si=20se=20usa?= =?UTF-8?q?=20m=C3=B3dulo=20de=20cobranza?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Ventas/Ventas.aspx.vb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index c7b10cc0c..1283449f3 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -23180,7 +23180,7 @@ Partial Class Ventas TxtImporteContado.Text = TxtTotal.Text 'SI ES MODALIDAD COBRANZA, NO MOSTRAR If (UsuarioActual.Empresa.Funcionalidad(109) = "1") Then - DivContado.Visible = False + DivContado.Visible = UsuarioActual.TienePermisoProceso(375) End If End If TxtFechaPago.Text = NowADS().ToShortDateString From a0a735a6e415ee463f8196acf02e3baff3f6c67a Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Wed, 3 Apr 2024 18:13:08 -0700 Subject: [PATCH 044/170] --Impresion directa, deposito de caja PA; --PA_Banc_IEMovimientosDepositosGet --- Bancos/DepositosCaja.aspx | 994 +++++++++++---------- Bancos/DepositosCaja.aspx.vb | 431 +++++---- Compras/PopUpVerFactura.aspx.vb | 28 +- Empresas/Grales/Formatos/DepositoCaja.rdlc | 195 +++- 4 files changed, 974 insertions(+), 674 deletions(-) diff --git a/Bancos/DepositosCaja.aspx b/Bancos/DepositosCaja.aspx index 0c7bb3ea1..db0f577d6 100644 --- a/Bancos/DepositosCaja.aspx +++ b/Bancos/DepositosCaja.aspx @@ -1,401 +1,403 @@ -<%@ Page Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="DepositosCaja.aspx.vb" Inherits="Bancos_DepositosCaja" %> - - - - - - - - - - - - -   - - - - <%--
  • +<%@ Page Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="DepositosCaja.aspx.vb" Inherits="Bancos_DepositosCaja" %> + + + + + + + + + + + + +   + + + + <%--
  • Imprimir -
  • --%> -
    - - - - - -
    -
    -
    - - -
    -
    -
    - - -
    - - -
    - - - -
    -
    - - - - - - - - -
    -
    - - - -
    -
    - - - - - - - - -
    - -
    - - -
    -
    - - - - - - - - - - - MSI - 3M - 6M - 9M - 12M - -
    -
    - -
    - -
    -
    - -
    - -
    - -
    -
    - - - -
    - -
    - -
    -
    - -
    - -
    - -
    -
    - -
    - - - - - - - - - - -
    -
    -
    -
    - -
    -
    -
    - -
    -
    - - - -
    - - -
    - Seleccionado: $ - 0.00 - -
    -
    -
    -
    - - -
    -
    - -
    - - - - - -
    -
    -
    - -
    - - -
    -
    - -
    - -
    - -
    - -
    -
    - - - -
    -
    - - - - - - - - - - - - - > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - -
    -
    - - - -
    -
    -
    -
    - - -
    -
    -
    -
    - - -
    - - + --%> + + + + + + +
    +
    +
    + + +
    +
    +
    + + +
    + + +
    + + + +
    +
    + + + + + + + + +
    +
    + + + +
    +
    + + + + + + + + +
    + +
    + + +
    +
    + + + + + + + + + + + MSI + 3M + 6M + 9M + 12M + +
    +
    + +
    + +
    +
    + +
    + +
    + +
    +
    + + + +
    + +
    + +
    +
    + +
    + +
    + +
    +
    + +
    + + + + + + + + + + +
    +
    +
    +
    + +
    +
    +
    + +
    +
    + + + +
    + + +
    + Seleccionado: $ + 0.00 + +
    +
    +
    +
    + + +
    +
    + +
    + + + + + +
    +
    +
    + +
    + + +
    +
    + +
    + +
    + +
    + +
    +
    + + + +
    +
    + + + + + + + + + + + + + > + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + +
    +
    + + + +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    + + + - - - - + + + + + diff --git a/Bancos/DepositosCaja.aspx.vb b/Bancos/DepositosCaja.aspx.vb index b3150609e..4f69cf666 100644 --- a/Bancos/DepositosCaja.aspx.vb +++ b/Bancos/DepositosCaja.aspx.vb @@ -2,6 +2,8 @@ Option Strict On Imports System.Data +Imports System.IO +Imports System.Net.Http Imports Extensiones Partial Class Bancos_DepositosCaja Inherits ClsPaginas @@ -148,8 +150,9 @@ Partial Class Bancos_DepositosCaja Dim Comision As Decimal = TxtComision.Text.ToDecimal Dim Descuento As Decimal = TxtDescuento.Text.ToDecimal Dim IVA As Decimal = TxtIVA.Text.ToDecimal - Dim ImporteInter As Decimal = TxtComisionIntermediario.Text.ToDecimal - + Dim ImporteInter As Decimal = TxtComisionIntermediario.Text.ToDecimal + + Dim MsgError As String = "Ocurrió un error al realizar los depositos" For Each Gvr As GridViewRow In GvFacturas.Rows If Gvr.FCCheckBox("ChkFactura").Checked Then TotalImporte += Gvr.DataKey("Importe").ToDecimal @@ -184,197 +187,226 @@ Partial Class Bancos_DepositosCaja TotalImporte = TotalImporte - TxtComisionIntermediario.Text.ToDecimal - IVA End If - Dim OcurrioError As Boolean = False - Dim ObjConta As New ClsContabilidad() + Dim OcurrioError As Boolean = False + Dim NuevaCvePrePoliza As Integer + + Dim pdf64 As String = "" + Dim documentos As String = "Los Depósitos se realizaron exitosamente

    " + + Dim CveIEOrigen As Integer = -1 'CajaChica + Dim CveIEDestino As Integer = -1 'Banco + + Dim ObjConta As New ClsContabilidad() Dim ObjBancos As New ClsBancos(ObjConta.IniciaTransacSQL()) - Dim CveIEOrigen As Integer 'CajaChica - Dim CveIEDestino As Integer 'Banco - Dim NuevaCvePrePoliza As Integer - Dim FolioIE As Long = -1 - Dim CveMoneda As Integer = 1 - Dim TipoCambio As Decimal = 1 - Dim Fecha As Date = TxtFecha.Text.ToDate - Dim drOrigen As DataRow = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveCuenta:=DdlCajaChica.SelectedValue.ToEntero, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimero("") - Dim drDestino As DataRow = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveCuenta:=DdlCuentaDeposito.SelectedValue.ToEntero, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimero("") - Dim CveSubProyecto As Integer = DdlSubProyectos.SelectedValue.ToEntero - Dim CveClasificacion As Integer = -1 - - Dim CveSubProyectoComision As Integer - Dim CveClasificacionComision As Integer - - Dim CveSubProyectoDescuento As Integer - Dim CveClasificacionDescuento As Integer - - Dim documentos As String = "Los Depósitos se realizaron exitosamente

    " - Dim imprimirFolios As String = "" - Dim CveSubProyectoIntermediario As Integer - Dim CveClasificacionIntermediario As Integer - Dim CveProveedorIntermediario As Integer = -1 - - If drOrigen IsNot Nothing Then - CveMoneda = drOrigen("CveMoneda").ToString.ToEntero - End If - - If drDestino IsNot Nothing Then - CveMoneda = drDestino("CveMoneda").ToString.ToEntero - End If - - NuevaCvePrePoliza = ObjConta.AddPrePolizas("DepCaja", 13, TotalImportePrePoliza, TotalImportePrePoliza, CveMoneda, Fecha, "Depósito Bancario", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveTipoPoliza:=1) - - Dim IntermediarioFactura As Boolean = False - If UsuarioActual.CveEmpresa = 145 Then IntermediarioFactura = True - If ChkIntermediario.Checked Then - - CveSubProyectoIntermediario = DdlSubProyectoIntermediario.SelectedValue.ToEntero - CveClasificacionIntermediario = DdlClasificacionIntermediario.SelectedValue.ToEntero - CveProveedorIntermediario = DdlProveedorIntermediario.SelectedValue.ToEntero - - If UsuarioActual.Empresa.Funcionalidad(558) = "1" Then ' empresa llantera - If Not ObjConta.AddPrePolizasDetalle(NuevaCvePrePoliza, False, TotalImporte, TotalImporte, 95, DdlClasificacionIntermediario.SelectedItem.Text, DdlClasificacionIntermediario.SelectedItem.Text, CveClasificacion:=CveClasificacionIntermediario, CveSubProyecto:=CveSubProyectoIntermediario, CveProveedor:=CveProveedorIntermediario, CveCuenta:=57619) Then - OcurrioError = True - End If - If Not ObjConta.AddPrePolizasDetalle(NuevaCvePrePoliza, True, TotalImporte, TotalImporte, 95, DdlClasificacionIntermediario.SelectedItem.Text, DdlClasificacionIntermediario.SelectedItem.Text, CveClasificacion:=CveClasificacionIntermediario, CveSubProyecto:=CveSubProyectoIntermediario, CveProveedor:=CveProveedorIntermediario, CveCuenta:=57619) Then - OcurrioError = True - End If + Try + Dim FolioIE As Long = -1 + Dim CveMoneda As Integer = 1 + Dim TipoCambio As Decimal = 1 + Dim Fecha As Date = TxtFecha.Text.ToDate + Dim drOrigen As DataRow = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveCuenta:=DdlCajaChica.SelectedValue.ToEntero, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimero("") + Dim drDestino As DataRow = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveCuenta:=DdlCuentaDeposito.SelectedValue.ToEntero, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimero("") + Dim CveSubProyecto As Integer = DdlSubProyectos.SelectedValue.ToEntero + Dim CveClasificacion As Integer = -1 + + Dim CveSubProyectoComision As Integer + Dim CveClasificacionComision As Integer + + Dim CveSubProyectoDescuento As Integer + Dim CveClasificacionDescuento As Integer + + + Dim imprimirFolios As String = "" + Dim CveSubProyectoIntermediario As Integer + Dim CveClasificacionIntermediario As Integer + Dim CveProveedorIntermediario As Integer = -1 + + If drOrigen IsNot Nothing Then + CveMoneda = drOrigen("CveMoneda").ToString.ToEntero End If - If Not IntermediarioFactura Then ' si factura no se manda al gasto sino se disminuye solo lo depositado - If Not ObjConta.AddPrePolizasDetalle(NuevaCvePrePoliza, False, ImporteInter, ImporteInter, 51, DdlClasificacionIntermediario.SelectedItem.Text, DdlClasificacionIntermediario.SelectedItem.Text, CveClasificacion:=CveClasificacionIntermediario, CveSubProyecto:=CveSubProyectoIntermediario) Then - OcurrioError = True - End If + If drDestino IsNot Nothing Then + CveMoneda = drDestino("CveMoneda").ToString.ToEntero End If - If IVA <> 0 Then - If Not OcurrioError AndAlso Not ObjConta.AddPrePolizasDetalle(NuevaCvePrePoliza, False, IVA, IVA, 14, DdlClasificacionIntermediario.SelectedItem.Text, DdlClasificacionIntermediario.SelectedItem.Text, CveClasificacion:=CveClasificacionIntermediario, CveSubProyecto:=CveSubProyectoIntermediario, PorcentajeImpuesto:=0.16D) Then - OcurrioError = True - End If - End If - - End If - Dim CveTransaccionBanco As Integer = 13 - - If TotalImporte < 0 Then 'que es una devolución, entonces como es negativo, se cambia el concetpo de bancos, por condición de trigger - CveTransaccionBanco = 6 - End If + NuevaCvePrePoliza = ObjConta.AddPrePolizas("DepCaja", 13, TotalImportePrePoliza, TotalImportePrePoliza, CveMoneda, Fecha, "Depósito Bancario", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveTipoPoliza:=1) - 'código temporal, para claudia y toñita, monge, anadelia, alba,patricia - If UsuarioActual.CveUsuario.Contiene(1937, 2452, 3358, 3033, 2897, 2560) Then - FolioIE = TxtFolio.Text.ToEntero - End If - - If FolioIE <= 0 Then - 'Entrada a bancos - FolioIE = ObjBancos.GetNextFolio(DdlCuentaDeposito.SelectedValue.ToEntero, CveTransaccionBanco) - End If + Dim IntermediarioFactura As Boolean = False + If UsuarioActual.CveEmpresa = 145 Then IntermediarioFactura = True + If ChkIntermediario.Checked Then - If CveSubProyecto <= 0 Then 'sino se seleccionó del combo, busca en el listado el primero + CveSubProyectoIntermediario = DdlSubProyectoIntermediario.SelectedValue.ToEntero + CveClasificacionIntermediario = DdlClasificacionIntermediario.SelectedValue.ToEntero + CveProveedorIntermediario = DdlProveedorIntermediario.SelectedValue.ToEntero - For Each Gvr As GridViewRow In GvFacturas.Rows - If Gvr.FCCheckBox("ChkFactura").Checked Then - CveSubProyecto = Gvr.DataKey("CveSubProyecto").ToEntero - Exit For + If UsuarioActual.Empresa.Funcionalidad(558) = "1" Then ' empresa llantera + If Not ObjConta.AddPrePolizasDetalle(NuevaCvePrePoliza, False, TotalImporte, TotalImporte, 95, DdlClasificacionIntermediario.SelectedItem.Text, DdlClasificacionIntermediario.SelectedItem.Text, CveClasificacion:=CveClasificacionIntermediario, CveSubProyecto:=CveSubProyectoIntermediario, CveProveedor:=CveProveedorIntermediario, CveCuenta:=57619) Then + OcurrioError = True + End If + If Not ObjConta.AddPrePolizasDetalle(NuevaCvePrePoliza, True, TotalImporte, TotalImporte, 95, DdlClasificacionIntermediario.SelectedItem.Text, DdlClasificacionIntermediario.SelectedItem.Text, CveClasificacion:=CveClasificacionIntermediario, CveSubProyecto:=CveSubProyectoIntermediario, CveProveedor:=CveProveedorIntermediario, CveCuenta:=57619) Then + OcurrioError = True + End If End If - Next - End If - If FolioIE <= 0 Then - OcurrioError = True - End If - CveIEOrigen = ObjBancos.AddBancos_IE(DdlCuentaDeposito.SelectedValue.ToEntero, CveTransaccionBanco, Fecha, FolioIE.ToString, "Depósito Bancario", TotalImporte, CveMoneda, 1, TxtObservaciones.Text, "", False, False, -1, NuevaCvePrePoliza, "-1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveProveedorIntermediario:=CveProveedorIntermediario) - - documentos += String.Format("Depósito: {1}    
    ", CveIEOrigen, FolioIE) - - If Not OcurrioError AndAlso ObjConta.AddPrePolizasDetalle(NuevaCvePrePoliza, False, TotalImporte, TotalImporte * TipoCambio, 30, "Depósito Bancario", "Depósito Bancario", CveClasificacion:=CveClasificacion, CveSubProyecto:=CveSubProyecto, CveIE:=CveIEOrigen) Then - - If ChkFaltante.Checked Then - CveSubProyectoComision = DdlSubProyectoDeposito.SelectedValue.ToEntero - CveClasificacionComision = DdlClasificacion.SelectedValue.ToEntero - If Comision <> 0 Then - If Not ObjConta.AddPrePolizasDetalle(NuevaCvePrePoliza, True, Comision, Comision * TipoCambio, 78, DdlClasificacion.SelectedItem.Text, DdlClasificacion.SelectedItem.Text, CveClasificacion:=CveClasificacionComision, CveSubProyecto:=CveSubProyectoComision) Then - OcurrioError = True - End If + If Not IntermediarioFactura Then ' si factura no se manda al gasto sino se disminuye solo lo depositado + If Not ObjConta.AddPrePolizasDetalle(NuevaCvePrePoliza, False, ImporteInter, ImporteInter, 51, DdlClasificacionIntermediario.SelectedItem.Text, DdlClasificacionIntermediario.SelectedItem.Text, CveClasificacion:=CveClasificacionIntermediario, CveSubProyecto:=CveSubProyectoIntermediario) Then + OcurrioError = True + End If End If - End If - - If Not OcurrioError AndAlso ChkDescuento.Checked Then - CveSubProyectoDescuento = DdlSubProyectoDescuento.SelectedValue.ToEntero - CveClasificacionDescuento = DdlClasificacionDescuento.SelectedValue.ToEntero - - If Not ObjConta.AddPrePolizasDetalle(NuevaCvePrePoliza, False, Descuento, Descuento * TipoCambio, 51, DdlClasificacionDescuento.SelectedItem.Text, DdlClasificacionDescuento.SelectedItem.Text & " " & DdlPersonal.SelectedItem.Text, CveClasificacion:=CveClasificacionDescuento, CveSubProyecto:=CveSubProyectoDescuento, CvePersonal:=DdlPersonal.SelectedValue.ToEntero) Then - OcurrioError = True - End If + + If IVA <> 0 Then + If Not OcurrioError AndAlso Not ObjConta.AddPrePolizasDetalle(NuevaCvePrePoliza, False, IVA, IVA, 14, DdlClasificacionIntermediario.SelectedItem.Text, DdlClasificacionIntermediario.SelectedItem.Text, CveClasificacion:=CveClasificacionIntermediario, CveSubProyecto:=CveSubProyectoIntermediario, PorcentajeImpuesto:=0.16D) Then + OcurrioError = True + End If + End If + End If - Else - OcurrioError = True - End If - If Not OcurrioError Then - Dim i As Integer = 0 - For Each Gvr As GridViewRow In GvFacturas.Rows + Dim CveTransaccionBanco As Integer = 13 - If Gvr.FCCheckBox("ChkFactura").Checked Then - 'Datos de las Nuevas PrePolizas - 'Entrada a Bancos + If TotalImporte < 0 Then 'que es una devolución, entonces como es negativo, se cambia el concetpo de bancos, por condición de trigger + CveTransaccionBanco = 6 + End If - Dim Importe As Decimal = Gvr.DataKey("Importe").ToDecimal - Dim SerieFolio As String = Gvr.DataKey("SerieFolio").ToString + 'código temporal, para claudia y toñita, monge, anadelia, alba,patricia + If UsuarioActual.CveUsuario.Contiene(1937, 2452, 3358, 3033, 2897, 2560) Then + FolioIE = TxtFolio.Text.ToEntero + End If - 'si es el primero, se descuenta la "comisión" - If i = 0 AndAlso IntermediarioFactura Then - Importe = Importe - ImporteInter - i += 1 - End If + If FolioIE <= 0 Then + 'Entrada a bancos + FolioIE = ObjBancos.GetNextFolio(DdlCuentaDeposito.SelectedValue.ToEntero, CveTransaccionBanco) + End If - 'Datos de las Prepolizas A Cancelar - Dim CveIE As Integer = Gvr.DataKey("CveIE").ToEntero - Dim CveVenta As Integer = Gvr.DataKey("CveVenta").ToEntero - Dim CveCuentaBancaria As Integer = Gvr.DataKey("CveCuenta").ToEntero - Dim tCveSubProyecto As Integer = Gvr.DataKey("CveSubProyecto").ToEntero + If CveSubProyecto <= 0 Then 'sino se seleccionó del combo, busca en el listado el primero - FolioIE = ObjBancos.GetNextFolio(CveCuentaBancaria, 2) - If Not FolioIE > 0 Then - OcurrioError = True + For Each Gvr As GridViewRow In GvFacturas.Rows + If Gvr.FCCheckBox("ChkFactura").Checked Then + CveSubProyecto = Gvr.DataKey("CveSubProyecto").ToEntero Exit For End If - CveIEDestino = ObjBancos.AddBancos_IE(CveCuentaBancaria, 2, Fecha, FolioIE.ToString, String.Format("Depósito Bancario: {0}", SerieFolio), Importe, CveMoneda, 1, TxtObservaciones.Text, "", False, False, -1, NuevaCvePrePoliza, "-1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) + Next + End If - If Not OcurrioError AndAlso Not ObjConta.AddPrePolizasDetalle(NuevaCvePrePoliza, True, Importe, Importe * TipoCambio, 30, SerieFolio, String.Format("Depósito Bancario: {0}", SerieFolio), CveClasificacion:=CveClasificacion, CveSubProyecto:=tCveSubProyecto, CveVenta:=CveVenta, CveIE:=CveIEDestino) Then - OcurrioError = True - Exit For - End If - - 'Asignamos la cuenta Deposito - If Not OcurrioError AndAlso Not ObjBancos.UpdateBancos_IECuentaDeposito(CveIEOrigen, CveIE) Then - OcurrioError = True - Exit For - End If - End If - Next - Dim StrEncript As String = Encripta($"OP=DC&CveIE={CveIEOrigen}&CuentaCaja={DdlCajaChica.SelectedItem.Text}&CuentaDepo={DdlCuentaDeposito.SelectedItem.Text}") - - documentos += String.Format("
    Imprimir {1}

    ", StrEncript, "Depósito Bancario") - - End If - - If Not OcurrioError AndAlso ObjConta.ValidacionesPrePoliza(NuevaCvePrePoliza, UsuarioActual, Opcion:=1) Then - If ObjConta.ValorPolizaDescuadre > 0 Then - GuardaLogAD($"Bancos/DepositoCaja | Error{ObjConta.MensajePolizaDescuadre} Diferencia{ObjConta.ValorDiferencia} | CvePrePoliza:{NuevaCvePrePoliza}", "LogPrePolizas") + If FolioIE <= 0 Then OcurrioError = True End If - End If + CveIEOrigen = ObjBancos.AddBancos_IE(DdlCuentaDeposito.SelectedValue.ToEntero, CveTransaccionBanco, Fecha, FolioIE.ToString, "Depósito Bancario", TotalImporte, CveMoneda, 1, TxtObservaciones.Text, "", False, False, -1, NuevaCvePrePoliza, "-1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveProveedorIntermediario:=CveProveedorIntermediario) + + documentos += String.Format("Depósito: {1}    
    ", CveIEOrigen, FolioIE) + + If Not OcurrioError AndAlso ObjConta.AddPrePolizasDetalle(NuevaCvePrePoliza, False, TotalImporte, TotalImporte * TipoCambio, 30, "Depósito Bancario", "Depósito Bancario", CveClasificacion:=CveClasificacion, CveSubProyecto:=CveSubProyecto, CveIE:=CveIEOrigen) Then + + If ChkFaltante.Checked Then + CveSubProyectoComision = DdlSubProyectoDeposito.SelectedValue.ToEntero + CveClasificacionComision = DdlClasificacion.SelectedValue.ToEntero + If Comision <> 0 Then + If Not ObjConta.AddPrePolizasDetalle(NuevaCvePrePoliza, True, Comision, Comision * TipoCambio, 78, DdlClasificacion.SelectedItem.Text, DdlClasificacion.SelectedItem.Text, CveClasificacion:=CveClasificacionComision, CveSubProyecto:=CveSubProyectoComision) Then + OcurrioError = True + End If + End If + End If + + If Not OcurrioError AndAlso ChkDescuento.Checked Then + CveSubProyectoDescuento = DdlSubProyectoDescuento.SelectedValue.ToEntero + CveClasificacionDescuento = DdlClasificacionDescuento.SelectedValue.ToEntero + + If Not ObjConta.AddPrePolizasDetalle(NuevaCvePrePoliza, False, Descuento, Descuento * TipoCambio, 51, DdlClasificacionDescuento.SelectedItem.Text, DdlClasificacionDescuento.SelectedItem.Text & " " & DdlPersonal.SelectedItem.Text, CveClasificacion:=CveClasificacionDescuento, CveSubProyecto:=CveSubProyectoDescuento, CvePersonal:=DdlPersonal.SelectedValue.ToEntero) Then + OcurrioError = True + End If + End If + Else + OcurrioError = True + End If + If Not OcurrioError Then + Dim i As Integer = 0 + For Each Gvr As GridViewRow In GvFacturas.Rows + + If Gvr.FCCheckBox("ChkFactura").Checked Then + 'Datos de las Nuevas PrePolizas + 'Entrada a Bancos + + Dim Importe As Decimal = Gvr.DataKey("Importe").ToDecimal + Dim SerieFolio As String = Gvr.DataKey("SerieFolio").ToString + + 'si es el primero, se descuenta la "comisión" + If i = 0 AndAlso IntermediarioFactura Then + Importe = Importe - ImporteInter + i += 1 + End If + + 'Datos de las Prepolizas A Cancelar + Dim CveIE As Integer = Gvr.DataKey("CveIE").ToEntero + Dim CveVenta As Integer = Gvr.DataKey("CveVenta").ToEntero + Dim CveCuentaBancaria As Integer = Gvr.DataKey("CveCuenta").ToEntero + Dim tCveSubProyecto As Integer = Gvr.DataKey("CveSubProyecto").ToEntero + + FolioIE = ObjBancos.GetNextFolio(CveCuentaBancaria, 2) + If Not FolioIE > 0 Then + OcurrioError = True + Exit For + End If + CveIEDestino = ObjBancos.AddBancos_IE(CveCuentaBancaria, 2, Fecha, FolioIE.ToString, String.Format("Depósito Bancario: {0}", SerieFolio), Importe, CveMoneda, 1, TxtObservaciones.Text, "", False, False, -1, NuevaCvePrePoliza, "-1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) + + If Not OcurrioError AndAlso Not ObjConta.AddPrePolizasDetalle(NuevaCvePrePoliza, True, Importe, Importe * TipoCambio, 30, SerieFolio, String.Format("Depósito Bancario: {0}", SerieFolio), CveClasificacion:=CveClasificacion, CveSubProyecto:=tCveSubProyecto, CveVenta:=CveVenta, CveIE:=CveIEDestino) Then + OcurrioError = True + Exit For + End If + + 'Asignamos la cuenta Deposito + If Not OcurrioError AndAlso Not ObjBancos.UpdateBancos_IECuentaDeposito(CveIEOrigen, CveIE) Then + OcurrioError = True + Exit For + End If + End If + Next + Dim StrEncript As String = Encripta($"OP=DC&CveIE={CveIEOrigen}&CuentaCaja={DdlCajaChica.SelectedItem.Text}&CuentaDepo={DdlCuentaDeposito.SelectedItem.Text}") + + documentos += String.Format("
    Imprimir {1}

    ", StrEncript, "Depósito Bancario") + + End If + + If Not OcurrioError AndAlso ObjConta.ValidacionesPrePoliza(NuevaCvePrePoliza, UsuarioActual, Opcion:=1) Then + If ObjConta.ValorPolizaDescuadre > 0 Then + GuardaLogAD($"Bancos/DepositoCaja | Error{ObjConta.MensajePolizaDescuadre} Diferencia{ObjConta.ValorDiferencia} | CvePrePoliza:{NuevaCvePrePoliza}", "LogPrePolizas") + OcurrioError = True + End If + End If + + If Not OcurrioError Then + documentos += String.Format("Prepóliza

    ", NuevaCvePrePoliza) + End If + + Catch ex As Exception + OcurrioError = True + OnError("Ocurrió un error al procesar los datos", ex) + End Try If OcurrioError Then ObjConta.RollBack() - Alert("Ocurrio un error al realizar los depositos", TipoMensaje.MsgError) + Alert(MsgError, TipoMensaje.MsgError) Else - ObjConta.Commit() - documentos += String.Format("Prepóliza

    ", NuevaCvePrePoliza) - + + If UsuarioActual.Empresa.Funcionalidad(109) = "1" Then + Try + pdf64 = ImpresionDirectaPDF(CveIEOrigen, NuevaCvePrePoliza) + Catch ex As Exception + pdf64 = "" + GuardaLog(ex.ToString()) + End Try + + If Not String.IsNullOrEmpty(pdf64) Then + RegistraScript($"impresionBase64('{pdf64}');", "Imprimir") + Else + Alert("No se pudo imprimir el pdf", TipoMensaje.MsgAdvertencia) + End If + End If + Alert(documentos.ToString) CargaDatos() End If + TxtComision.Text = "" TxtDescuento.Text = "" TxtIVA.Text = "" @@ -462,5 +494,80 @@ Partial Class Bancos_DepositosCaja DDlMesesSinIntereses.Visible = False End If DDlMesesSinIntereses.SelectedValue = "-1" - End Sub + End Sub + + Private Function ImpresionDirectaPDF(CveIEOrigen As Integer, CvePrePoliza As Integer) As String + + Dim PDFPago As Byte() = Nothing + Dim PDFPrePoliza As Byte() = Nothing + + Dim ParametrosPago As String = Encripta($"OP=DC&CveIE={CveIEOrigen}&CuentaCaja={DdlCajaChica.SelectedItem.Text}&CuentaDepo={DdlCuentaDeposito.SelectedItem.Text}&TipoPago={DdlTipoPago.SelectedItem.Text}") + Dim ParametrosPrePoliza As String = Encripta($"OP=PREPO&CvePrePoliza={CvePrePoliza}") + + Try + PDFPago = DescargarPDF(ParametrosPago, UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario) + If PDFPago IsNot Nothing Then + PDFPrePoliza = DescargarPDF(ParametrosPrePoliza, UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario) + End If + + Catch ex As Exception + GuardaLog(ex.ToString()) + + PDFPago = Nothing + PDFPrePoliza = Nothing + End Try + + If PDFPago IsNot Nothing AndAlso PDFPrePoliza IsNot Nothing Then + Dim pdf64 As String = "" + 'UNIFICAR LOS 2 PDF + Using ms As New MemoryStream + Using pdfdoc As New iText.Kernel.Pdf.PdfDocument(New iText.Kernel.Pdf.PdfWriter(ms)) + pdfdoc.InitializeOutlines() + + Dim docPago As New iText.Kernel.Pdf.PdfDocument(New iText.Kernel.Pdf.PdfReader(New MemoryStream(PDFPago))) + docPago.CopyPagesTo(1, docPago.GetNumberOfPages(), pdfdoc) + docPago.Close() + + Dim docPrePoliza As New iText.Kernel.Pdf.PdfDocument(New iText.Kernel.Pdf.PdfReader(New MemoryStream(PDFPrePoliza))) + docPrePoliza.CopyPagesTo(1, docPrePoliza.GetNumberOfPages(), pdfdoc) + docPrePoliza.Close() + + pdfdoc.Close() + End Using + pdf64 = Convert.ToBase64String(ms.ToArray()) + End Using + + Return pdf64 + Else + Return "" + End If + + End Function + Private Function DescargarPDF(Parametros As String, CveEmpresa As Integer, CveUsuarioCreo As Integer, Optional GetBytes As Boolean = True, Optional strURLHOST As String = "") As Byte() + + If String.IsNullOrEmpty(strURLHOST) Then + strURLHOST = String.Format("{0}://{1}:{2}", HttpContext.Current.Request.Url.Scheme, HttpContext.Current.Request.Url.Host, HttpContext.Current.Request.Url.Port) + End If + + Dim Url As New Uri(String.Format("{0}/Compras/PopUpVerFactura.aspx?P={1}", strURLHOST, Parametros)) + Dim File As Byte() = Nothing + Try + Using httpClient As New HttpClient() + httpClient.Timeout = New TimeSpan(0, 0, 40) + Using request As New HttpRequestMessage(HttpMethod.Get, Url) + request.Headers.Add("ADSToken", Encripta(String.Format("CVEEMPRESA={0}&TICKS={1}&CveUsuario={2}", CveEmpresa, DateTime.UtcNow.Ticks, CveUsuarioCreo))) + Dim response = httpClient.SendAsync(request).Result + If GetBytes AndAlso response.StatusCode = Net.HttpStatusCode.OK Then + File = response.Content.ReadAsByteArrayAsync().Result + End If + End Using + End Using + Catch ex As Exception + File = Nothing + OnError("Ocurrió un error al descargar la factura", ex) + End Try + + Return File + End Function + End Class \ No newline at end of file diff --git a/Compras/PopUpVerFactura.aspx.vb b/Compras/PopUpVerFactura.aspx.vb index e06c25bd5..2eadec52f 100644 --- a/Compras/PopUpVerFactura.aspx.vb +++ b/Compras/PopUpVerFactura.aspx.vb @@ -1418,7 +1418,11 @@ Partial Class PopUpVerFactura 'IMPRIME DEPOSITOS CAJA If UrlParametros("OP").ToString = "DC" Then If UrlParametros("CVEIE") IsNot Nothing AndAlso UrlParametros("CVEIE").ToString.ToEntero > 0 Then - CargaDepositosCaja(UrlParametros("CVEIE").ToString.ToEntero, UrlParametros("CUENTACAJA").ToString, UrlParametros("CUENTADEPO").ToString) + Dim TipoPago As String = "" + If UrlParametros("TIPOPAGO") IsNot Nothing Then + TipoPago = UrlParametros("TIPOPAGO").ToString() + End If + CargaDepositosCaja(UrlParametros("CVEIE").ToString.ToEntero, UrlParametros("CUENTACAJA").ToString, UrlParametros("CUENTADEPO").ToString, TipoPago) End If End If @@ -5261,22 +5265,25 @@ Partial Class PopUpVerFactura #End Region #Region "OP = 'DC' - DEPOSITOS CAJA" - Private Sub CargaDepositosCaja(CveIE As Integer, CuentaCaja As String, CuentaDeposito As String) + Private Sub CargaDepositosCaja(CveIE As Integer, CuentaCaja As String, CuentaDeposito As String, TipoPago As String) Dim Archivo As New System.IO.FileInfo(String.Format("{0}Formatos/DepositoCaja.rdlc", UsuarioActual.Empresa.Ruta)) + Dim Tabla As DataTable = Nothing + Dim ObjIE As New ClsBancos() - Dim Tabla As DataTable - ObjIE.GetBancosIEMovimientosDepositos(CveIE, UsuarioActual.CveEmpresa) + If ObjIE.GetBancosIEMovimientosDepositos(CveIE, UsuarioActual.CveEmpresa) Then + Tabla = ObjIE.DtResultados.Copy() + End If + ObjIE.Dispose() - - If ObjIE.DtResultados IsNot Nothing AndAlso ObjIE.DtResultados.Rows.Count > 0 Then - Tabla = ObjIE.DtResultados + If Tabla IsNot Nothing AndAlso Tabla.Rows.Count > 0 Then Dim params As New List(Of ReportParameter) params.Add(New ReportParameter("Fecha", NowADS().ToDateTime.ToString)) - params.Add(New ReportParameter("FechaIE", ObjIE.DtResultados(0)("FechaDocumento").ToString.ToDate.ToShortDateString)) + params.Add(New ReportParameter("FechaIE", Tabla(0)("FechaDocumento").ToString.ToDate.ToShortDateString)) params.Add(New ReportParameter("CuentaCaja", CuentaCaja)) params.Add(New ReportParameter("CuentaDeposito", CuentaDeposito)) + params.Add(New ReportParameter("TipoPago", TipoPago)) If Archivo.Exists Then params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) @@ -5287,11 +5294,6 @@ Partial Class PopUpVerFactura End If End If - - - - ObjIE.Dispose() - End Sub #End Region diff --git a/Empresas/Grales/Formatos/DepositoCaja.rdlc b/Empresas/Grales/Formatos/DepositoCaja.rdlc index e86dcb813..1295c3fbc 100644 --- a/Empresas/Grales/Formatos/DepositoCaja.rdlc +++ b/Empresas/Grales/Formatos/DepositoCaja.rdlc @@ -12,7 +12,10 @@ 0.96697in - 4.66607in + 3.81815in + + + 0.98425in 0.84873in @@ -158,6 +161,50 @@ + + + + true + true + + + + + Tipo Pago + + + + + + + Textbox9 + + + + DimGray + + 1pt + + + DimGray + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + @@ -346,6 +393,49 @@ + + + + true + true + + + + + =Fields!TipoPago.Value + + + + + + + TipoPago + + + + DimGray + + 1pt + + + DimGray + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + @@ -401,6 +491,7 @@ + @@ -417,7 +508,7 @@ DataSet1 1.43975in 0.43in - 7.75822in + 7.89456in @@ -876,11 +967,99 @@ 2pt + + true + true + + + + + Tipo Pago: + + + + + + + + + + + + + + + + Textbox12 + 2.96905cm + 12.49038cm + 0.53299cm + 2.14725cm + 13 + + =(Parameters!TipoPago.Value = "") + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!TipoPago.Value + + + + + + + Textbox12 + 2.96905cm + 15.61669cm + 0.53299cm + 3.76632cm + 14 + + + 2pt + 2pt + 2pt + 2pt + + 5.34917cm + + + + + + Textbox3 + + + DimGray + 2pt + 2pt + 2pt + 2pt + + + 3 + + + + + + + + 0.52063cm + + + + + true + true + + + + + Clave + + + + + + + Textbox175 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + + + + + Concepto + + + + + + + Textbox34 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + + + + + Importe + + + + + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.4148cm + + + + + true + true + + + + + =Fields!Codigo.Value + + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Concepto.Value + + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Importe.Value + + + + + + + Importe + + + + + + + + + 2pt + 2pt + 2pt + 2pt + es-MX + + + + + + + + 0.43657cm + + + + + true + true + + + + + + + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + TOTAL PERCEPCIONES + + + + + + + Textbox226 + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =SUM(Fields!Importe.Value) + + + + + + + Textbox227 + + + + + + 2pt + 2pt + 2pt + 2pt + es-MX + + + + + + + + 0.07938cm + + + + + true + true + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + + + + + + + + + After + + + After + + + + + + Before + + + Before + + + + DsOC + 7.70215cm + 0.15979cm + 2.05138cm + 10.0953cm + + + + + + + + + 1.69328cm + + + 6.23048cm + + + 1.87118cm + + + + + 0.6cm + + + + + true + true + + + + + DEDUCCIONES + + + + + + + Textbox6 + + + DimGray + 2pt + 2pt + 2pt + 2pt + + + 3 + + + + + + + + 0.52063cm + + + + + true + true + + + + + Clave + + + + + + + Textbox175 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + + + + + Concepto + + + + + + + Textbox34 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + + + + + Importe + + + + + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.4148cm + + + + + true + true + + + + + =Fields!Codigo.Value + + + + + + + + + + + + + Black + + + Black + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Concepto.Value + + + + + + + + + + + + + Black + + + Black + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Importe.Value + + + + + + + Textbox214 + + + + + + + + + + Black + + + Black + + 2pt + 2pt + 2pt + 2pt + es-MX + + + + + + + + 0.44125cm + + + + + true + true + + + + + + + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + TOTAL DEDUCCIONES + + + + + + + Textbox229 + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Parameters!ImporteDeducciones.Value + + + + + + + Textbox4 + + + + + + 2pt + 2pt + 2pt + 2pt + es-MX + + + + + + + + 0.07938cm + + + + + true + true + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + + + + + + + + + After + + + After + + + + + + Before + + + Before + + + + DataSet1 + 7.70435cm + 10.2551cm + 2.05606cm + 9.79494cm + 1 + + + + + + true + true + + + + + HECTOR ADRIAN DIAZ CASTILLO + + + + + + + + + DICH7409082KA + + + + + + + + + Registro Patronal + + + + + + + + + =Parameters!RegistroPatronal.Value + + + + + + + + + 601 Régimen General de Ley Personas Morales +Lugar de expedición: 83190 Hermosillo + + + + + + + Textbox2 + 0.12976cm + 4.80311cm + 2.24428cm + 8.10317cm + 2 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + 3.71238cm + + + 7.38712cm + + + 4.59571cm + + + 4.19504cm + + + + + 0.38834cm + + + + + true + true + + + + + + + + + + + + Textbox232 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + SubTotal + + + + + + + Textbox124 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Parameters!SubTotal.Value + + + + + + + Textbox126 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.44125cm + + + + + true + true + + + + + Folio Fiscal + + + + + + + Textbox120 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Parameters!FolioFiscal.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Descuentos + + + + + + + Textbox130 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Parameters!Descuentos.Value + + + + + + + Textbox131 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.44125cm + + + + + true + true + + + + + No. Certificado del SAT + + + + + + + Textbox128 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Parameters!CertificadoSAT.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Retenciones + + + + + + + Textbox134 + + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Parameters!ISR.Value + + + + + + + Textbox135 + + + + + + 2pt + 2pt + 2pt + 2pt + es-MX + + + + + + + + 0.44125cm + + + + + true + true + + + + + Fecha de certificación + + + + + + + Textbox132 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Parameters!FechaCertificacion.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + TOTAL + + + + + + + Textbox138 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Parameters!Total.Value + + + + + + + Textbox139 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + + + + + + + + + + + + + + + DsOC + 9.86624cm + 0.15979cm + 1.71209cm + 19.89025cm + 3 + + + + + + Embedded + Logo + FitProportional + 0.19855cm + 0.33984cm + 2.01901cm + 3.94122cm + 4 + + + + + + + + + 3.31842cm + + + 3.75478cm + + + + + 0.51659cm + + + + + true + true + + + + + Recibo Nómina + + + + + + + Textbox218 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Parameters!ReciboNomina.Value + + + + + + + Textbox216 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.50702cm + + + + + true + true + + + + + Serie + + + + + + + Textbox220 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Parameters!Serie.Value + + + + + + + Textbox221 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.6cm + + + + + true + true + + + + + Fecha + + + + + + + Textbox223 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Parameters!Fecha.Value + + + + + + + Textbox224 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.6cm + + + + + true + true + + + + + Tipo de comprobante + + + + + + + Textbox219 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + N + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + + + + + + + + + + + + + DsOC + 0.05745cm + 12.97684cm + 2.22361cm + 7.0732cm + 5 + + + + + + + + + 11.53918cm + + + 2.5cm + + + 5.85106cm + + + + + 0.6cm + + + + + true + true + + + + + Recibí de la empresa arriba mencionada, la cantidad neta a que este documento, se refiere, estando conforme con las Percepciones y deducciones que en el aparecen especificados. + + + + + + 2pt + 2pt + 2pt + 2pt + + + 2 + + + + + + + true + true + + + + + + + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.52062cm + + + + + true + true + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Parameters!NombreCompleto.Value + + + + + + + Textbox17 + + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + + + + + + + + + + + + DsOC + 17.07534cm + 0.15979cm + 1.12062cm + 19.89024cm + 6 + + + + + + Database + =First(Fields!ImagenByte.Value, "dsImagenes") + image/png + FitProportional + 4.64173in + 0.068in + 1.30194in + 1.48366in + 7 + + + + + + + + + 7.90238cm + + + 8.04297cm + + + + + 0.6cm + + + + + true + true + + + + + Éste documento es una representación impresa de un CFDi + + + + + + + Textbox258 + + + DimGray + 2pt + 2pt + 2pt + 2pt + + + 2 + + + + + + + 0.6cm + + + + + true + true + + + + + Sello digital del emisor + + + + + + 2pt + 2pt + 2pt + 2pt + + + 2 + + + + + + + 0.6cm + + + + + true + true + + + + + =Parameters!SelloDigitalEmisor.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + 2 + + + + + + + 0.6cm + + + + + true + true + + + + + Sello dígital del SAT: + + + + + + 2pt + 2pt + 2pt + 2pt + + + 2 + + + + + + + 0.6cm + + + + + true + true + + + + + =Parameters!SelloDigitalSAT.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + 2 + + + + + + + 0.6cm + + + + + true + true + + + + + Cadena Original del timbre + + + + + + 2pt + 2pt + 2pt + 2pt + + + 2 + + + + + + + 0.57354cm + + + + + true + true + + + + + =Parameters!CadenaOriginal.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + 2 + + + + + + + 0.44125cm + + + + + true + true + + + + + Versión del comprobante: + + + + =Parameters!CFDIVersion.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Versión del complemento: 1.2 + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.6cm + + + + + true + true + + + + + Usos del CFDI: + + + + =Parameters!UsoCFDI.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + 2 + + + + + + + + + + + + + + + + + + + + + + + + + + + dsImagenes + 11.78999cm + 4.13053cm + 5.21479cm + 15.94535cm + 8 + + + + + + + + + 2.2642cm + + + 2.11107cm + + + 2.2102cm + + + 2.57342cm + + + 2.70756cm + + + 2.08963cm + + + 2.633cm + + + 3.2606cm + + + + + 0.49417cm + + + + + true + true + + + + + DATOS DEL EMPLEADO + + + + + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + 8 + + + + + + + + + + + + + 0.41479cm + + + + + true + true + + + + + No Empleado + + + + + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Parameters!NoEmpleado.Value + + + + + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Nombre + + + + + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Parameters!NombreCompleto.Value + + + + + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + 2 + + + + + + + true + true + + + + + NSS + + + + + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Parameters!NSS.Value + + + + + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.38834cm + + + + + true + true + + + + + RFC + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Parameters!RFC.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + 2 + + + + + + + true + true + + + + + Régimen + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Parameters!Regimen.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + 2 + + + + + + + true + true + + + + + Departamento + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Parameters!Departamento.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.38834cm + + + + + true + true + + + + + CURP + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Parameters!CURP.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + 2 + + + + + + + true + true + + + + + Riesgo Puesto + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Parameters!RiesgoPuesto.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + 2 + + + + + + + true + true + + + + + Puesto + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Parameters!Puesto.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.49417cm + + + + + true + true + + + + + INFORMACION LABORAL + + + + + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + 8 + + + + + + + + + + + + + 0.38832cm + + + + + true + true + + + + + Jornada + + + + + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Parameters!Jornada.Value + + + + + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + 2 + + + + + + + true + true + + + + + Contrato + + + + + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Parameters!Contrato.Value + + + + + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + 2 + + + + + + + true + true + + + + + Periodo + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Parameters!Periodo.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.38833cm + + + + + true + true + + + + + Dias Pagados + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Parameters!DiasPagados.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Fecha ingreso + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Parameters!FechaIngreso.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Salario Base + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Parameters!SalarioBase.Value + + + + + + + Textbox166 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Salario Diario Int + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Parameters!SalarioDiarioInt.Value + + + + + + + Textbox159 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.44124cm + + + + + true + true + + + + + PAGO + + + + + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + 8 + + + + + + + + + + + + + 0.36187cm + + + + + true + true + + + + + Banco + + + + + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Parameters!Banco.Value + + + + + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + 2 + + + + + + + true + true + + + + + Método de Pago + + + + + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + PUE + + + + + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + 2 + + + + + + + true + true + + + + + Fecha Inicio + + + + + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Parameters!FechaInicio.Value + + + + + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.38834cm + + + + + true + true + + + + + CLABE + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Parameters!CLABE.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + 2 + + + + + + + true + true + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + 2 + + + + + + + true + true + + + + + Fecha Fin + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Parameters!FechaFin.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.38833cm + + + + + true + true + + + + + Clave + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Cantidad + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Unidad + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Moneda + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Descripción + + + + + + 2pt + 2pt + 2pt + 2pt + + + 2 + + + + + + + true + true + + + + + Precio Unit. + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Importe + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.49416cm + + + + + true + true + + + + + =Parameters!Clave.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Parameters!Cantidad.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Parameters!Unidad.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + MXN + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Parameters!Descripcion.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + 2 + + + + + + + true + true + + + + + =Parameters!PU.Value + + + + + + + Textbox103 + + + 2pt + 2pt + 2pt + 2pt + es-MX + + + + + + + + true + true + + + + + =Parameters!Importe.Value + + + + + + + Textbox110 + + + 2pt + 2pt + 2pt + 2pt + es-MX + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + DsOC + 2.51578cm + 0.15979cm + 5.0304cm + 19.84968cm + 9 + + + + + + 18.41425cm + + + + + + + + =Today + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 27.94cm + 21.59cm + 0.5cm + 0.5cm + 1cm + 0.5cm + 1.27cm + + + + + + + Textbox3 + + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + #e36c09 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + U. M. + + + + + + + Textbox7 + + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + #e36c09 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Producto o Servicio + + + + + + + Textbox9 + + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + #e36c09 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Observaciones + + + + + + + Textbox68 + + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + #e36c09 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + P. U. + + + + + + + Textbox2 + + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + #e36c09 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Total + + + + + + + Textbox1 + + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + #e36c09 + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.473cm + + + + + true + true + + + + + =Fields!Cantidad.Value + + + + + + + Cantidad + + + 2pt + 2pt + 1pt + + + + + + + + true + true + + + + + =Fields!UM.Value + + + + + + + UM + + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + 2pt + 2pt + 1pt + + + + + + + + true + true + + + + + =Fields!PS.Value + + + + + + + PS + + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + 2pt + 2pt + 1pt + + + + + + + + true + true + + + + + =Fields!Observacion.Value + + + + + + + Observacion + + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + 2pt + 2pt + 1pt + + + + + + + + true + true + + + + + =Fields!Importe.Value + + + + + + + Importe + + + 2pt + 2pt + 1pt + + + + + + + + true + true + + + + + =Fields!Total.Value + + + + + + + Total + + + 2pt + 2pt + 1pt + + + + + + + + + + + + + + + + + =IIF(Parameters!TipoProveedor.Value = "1",true,false) + + + + + =IIF(Parameters!TipoProveedor.Value = "1",true,false) + + + + + + + + After + + + + + + + DsOC + 4.58198cm + 0.20457cm + 0.96717cm + 20.25842cm + + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + + + true + true + + + + + ORDEN DE COMPRA DE MATERIALES Y SERVICIOS + + + + + + + Textbox8 + 0.12484cm + 4.03472cm + 0.5365cm + 11.69962cm + 1 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!TipoOC.Value + + + + + + + Textbox12 + 0.12484cm + 16.1331cm + 0.44478cm + 4.32987cm + 2 + + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + #e36c09 + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!Folio.Value + + + + + + + Textbox12 + 0.56962cm + 16.1331cm + 0.44478cm + 4.32987cm + 3 + + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Fecha + + + + + + + Textbox12 + 1.0144cm + 16.13311cm + 0.44478cm + 4.32987cm + 4 + + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + #e36c09 + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =CDate(replace(Parameters!FechaSolicitud.Value, "T" ," ")).ToString("dd/MM/yyyy") + + + + + + + Textbox12 + 1.45918cm + 16.13312cm + 0.44478cm + 4.32987cm + 5 + + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Proveedor + + + + + + + Textbox12 + 2.53982cm + 0.20457cm + 0.44478cm + 2.34596cm + 6 + + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + #e36c09 + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Descripción + + + + + + + Textbox12 + 2.9846cm + 0.20457cm + 0.44478cm + 2.34596cm + 7 + + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + #e36c09 + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Justificación + + + + + + + Textbox12 + 3.42938cm + 0.20457cm + 0.44478cm + 2.34596cm + 8 + + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + #e36c09 + Middle + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Fecha Entrega + + + + + + + Textbox12 + 2.9846cm + 13.61054cm + 0.44478cm + 2.52258cm + 9 + + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + #e36c09 + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Lugar de Entrega + + + + + + + Textbox12 + 3.42938cm + 13.61054cm + 0.44478cm + 2.52258cm + 10 + + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + #e36c09 + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Estatus + + + + + + + Textbox12 + 2.53982cm + 13.61054cm + 0.44478cm + 2.52258cm + 11 + + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + #e36c09 + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =iif(Parameters!FechaEntrega.Value="01/01/0001","",Parameters!FechaEntrega.Value) + + + + + + + Textbox12 + 2.9846cm + 16.1331cm + 0.44478cm + 4.32987cm + 12 + + + White + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!ProveedorLugar.Value + + + + + + + Textbox12 + 3.42938cm + 16.1331cm + 0.44478cm + 4.32987cm + 13 + + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + White + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!Estatus.Value + + + + + + + Textbox12 + 2.53982cm + 16.1331cm + 0.44478cm + 4.32987cm + 14 + + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + White + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!Descripcion.Value + + + + + + + Textbox12 + 2.9846cm + 2.55053cm + 0.44478cm + 11.06001cm + 15 + + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + White + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!Asunto.Value + + + + + + + Textbox12 + 3.42938cm + 2.55053cm + 0.44478cm + 11.06001cm + 16 + + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + White + Middle + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!ProveedorNombre.Value + + + + + + + Textbox12 + 2.53982cm + 2.55053cm + 0.44478cm + 11.06001cm + 17 + + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + White + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + HECTOR ADRIAN DIAZ CASTILLO + + + + + + + Textbox8 + 0.92326cm + 4.03472cm + 0.76228cm + 11.69962cm + 18 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Autorizó + + + + + + + Textbox12 + 8.30549cm + 7.33306cm + 0.44478cm + 5.83844cm + 19 + + + #e36c09 + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + + + + + + + + Textbox12 + 8.75027cm + 7.33306cm + 0.4095cm + 5.83844cm + 20 + + + + Black + + 1pt + + Top + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!NombreAutorizo.Value + + + + + + + Textbox12 + 9.19505cm + 7.33306cm + 0.44478cm + 5.83844cm + 21 + + + White + 2pt + 2pt + 2pt + 2pt + + + + External + =Parameters!FirmaAutorizo.Value + Fit + 6.73531cm + 8.35229cm + 3.5cm + 3.5cm + 22 + + =iif(Parameters!FirmaAutorizo.Value <> "", False, True) + + + + + + + true + true + + + + + Uso CFDI 3.3: + + + + + + + Textbox12 + 3.87416cm + 0.20457cm + 0.44478cm + 2.34596cm + 23 + + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + #e36c09 + Middle + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!UsoCFDI.Value + + + + + + + Textbox12 + 3.87416cm + 2.55053cm + 0.44478cm + 11.06001cm + 24 + + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + White + Middle + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Sucursal + + + + + + + Textbox12 + 3.87416cm + 13.61054cm + 0.44478cm + 2.55786cm + 25 + + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + #e36c09 + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!Proyecto.Value + + + + + + + Textbox12 + 3.87416cm + 16.13312cm + 0.44478cm + 4.32987cm + 26 + + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + White + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + ="Total " & Parameters!Moneda.Value + + + + + + + Textbox20 + 7.3465cm + 16.7985cm + 0.45183cm + 1.8653cm + 27 + + =IIF(Parameters!TipoProveedor.Value = "1",true,false) + + + + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + SubTotal + + + + + + + Textbox20 + 5.54915cm + 16.7985cm + 0.42361cm + 1.8653cm + 28 + + =IIF(Parameters!TipoProveedor.Value = "1",true,false) + + + + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + =Parameters!Total.Value + + + + + + + Textbox20 + 7.3465cm + 18.6638cm + 0.45183cm + 1.80228cm + 29 + + =IIF(Parameters!TipoProveedor.Value = "1",true,false) + + + + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + =Parameters!SubTotal.Value + + + + + + + Textbox20 + 5.54915cm + 18.6638cm + 0.42361cm + 1.7992cm + 30 + + =IIF(Parameters!TipoProveedor.Value = "1",true,false) + + + + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + IVA + + + + + + + Textbox20 + 6.90659cm + 16.7985cm + 0.45183cm + 1.8653cm + 31 + + =IIF(Parameters!TipoProveedor.Value = "1",true,false) + + + + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + =Parameters!IVA.Value + + + + + + + Textbox20 + 6.90659cm + 18.6638cm + 0.45183cm + 1.80228cm + 32 + + =IIF(Parameters!TipoProveedor.Value = "1",true,false) + + + + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + Descuento + + + + + + + Textbox20 + 6.00293cm + 16.7985cm + 0.45183cm + 1.8653cm + 33 + + =IIF(Parameters!TipoProveedor.Value = "1",true,false) + + + + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + =Parameters!Descuento.Value + + + + + + + Textbox20 + 6.00293cm + 18.6638cm + 0.45183cm + 1.80228cm + 34 + + =IIF(Parameters!TipoProveedor.Value = "1",true,false) + + + + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + Sub Total 2 + + + + + + + Textbox20 + 6.45476cm + 16.7985cm + 0.45183cm + 1.8653cm + 35 + + =IIF(Parameters!TipoProveedor.Value = "1",true,false) + + + + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + =Parameters!SubTotal2.Value + + + + + + + Textbox20 + 6.45476cm + 18.6638cm + 0.45183cm + 1.80228cm + 36 + + =IIF(Parameters!TipoProveedor.Value = "1",true,false) + + + + 2pt + 2pt + 2pt + 2pt + + + + Embedded + Logo + FitProportional + 0.12484cm + 0.05822cm + 2.01901cm + 3.94122cm + 37 + + + + + + 4.17138in + + + + + + + + =Today + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 27.94cm + 21.59cm + 0.5cm + 0cm + 1cm + 1cm + 0.13cm + + + + + + + Textbox24 + + + #e36c09 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + U.M. + + + + + + + Textbox27 + + + #e36c09 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + DESCRIPCIÓN + + + + + + + Textbox26 + + + #e36c09 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + P/U + + + + + + + Textbox36 + + + #e36c09 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + IMPORTE + + + + + + + Textbox38 + + + #e36c09 + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.6cm + + + + + true + true + + + + + =Parameters!Cantidad.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Parameters!UnidadMedida.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Parameters!Descripcion.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Parameters!PU.Value + + + + + + + Textbox37 + + + 2pt + 2pt + 2pt + 2pt + es-MX + + + + + + + + true + true + + + + + =Parameters!Importe.Value + + + + + + + Textbox39 + + + 2pt + 2pt + 2pt + 2pt + es-MX + + + + + + + + + + + + + + + + + + + + + + + + DataSet2 + 2.59417cm + 1.09cm + 20.53564cm + + + + + + + + + 2.13038cm + + + 1.64459cm + + + 1.80415cm + + + 1.76995cm + + + 1.8cm + + + 1.8cm + + + 1.8cm + + + 1.99576cm + + + 2.49576cm + + + 3.2908cm + + + + + 0.56938cm + + + + + true + true + + + + + UUID + + + + + + #e36c09 + 2pt + 2pt + 2pt + 2pt + + + 4 + + + + + + + + + true + true + + + + + SERIE + + + + + + #e36c09 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + FOLIO + + + + + + #e36c09 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + MONEDA + + + + + + #e36c09 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + NO.PARC. + + + + + + #e36c09 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + SALDO ANT. + + + + + + #e36c09 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + MONTO PAGADO + + + + + + #e36c09 + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.43188cm + + + + + true + true + + + + + =Fields!IdDocumento.Value + + + + + + + + 4 + + + + + + + + + true + true + + + + + =Fields!Serie.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Folio.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!MonedaDR.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!NumParcialidad.Value + + + + + + + NumParcialidad + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!ImpSaldoAnt.Value + + + + + + + ImpSaldoAnt + + + 2pt + 2pt + 2pt + 2pt + es-MX + + + + + + + + true + true + + + + + =Fields!ImpPagado.Value + + + + + + + ImpPagado + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.07938cm + + + + + true + true + + + + + Impuesto + + + + + + + Textbox108 + + = IIF( + Fields!Tra001BaseDR.Value > 0 + OR Fields!Tra002BaseDR.Value > 0 + OR Fields!Tra003BaseDR.Value > 0 + OR Fields!Ret001BaseDR.Value > 0 + OR Fields!Ret002BaseDR.Value > 0 + OR Fields!Ret003BaseDR.Value > 0 + ,False,true) + + + + Top + + + + + + + + true + true + + + + + Tipo + + + + + + + Textbox109 + + = IIF( + Fields!Tra001BaseDR.Value > 0 + OR Fields!Tra002BaseDR.Value > 0 + OR Fields!Tra003BaseDR.Value > 0 + OR Fields!Ret001BaseDR.Value > 0 + OR Fields!Ret002BaseDR.Value > 0 + OR Fields!Ret003BaseDR.Value > 0 + ,False,true) + + + + Top + + + + + + + + true + true + + + + + Base + + + + + + + Textbox110 + + = IIF( + Fields!Tra001BaseDR.Value > 0 + OR Fields!Tra002BaseDR.Value > 0 + OR Fields!Tra003BaseDR.Value > 0 + OR Fields!Ret001BaseDR.Value > 0 + OR Fields!Ret002BaseDR.Value > 0 + OR Fields!Ret003BaseDR.Value > 0 + ,False,true) + + + + Top + + + + + + + + true + true + + + + + Tipo Factor + + + + + + + Textbox111 + + = IIF( + Fields!Tra001BaseDR.Value > 0 + OR Fields!Tra002BaseDR.Value > 0 + OR Fields!Tra003BaseDR.Value > 0 + OR Fields!Ret001BaseDR.Value > 0 + OR Fields!Ret002BaseDR.Value > 0 + OR Fields!Ret003BaseDR.Value > 0 + ,False,true) + + + + Top + + + + + + + + true + true + + + + + Tasa/Cuota + + + + + + + Textbox112 + + = IIF( + Fields!Tra001BaseDR.Value > 0 + OR Fields!Tra002BaseDR.Value > 0 + OR Fields!Tra003BaseDR.Value > 0 + OR Fields!Ret001BaseDR.Value > 0 + OR Fields!Ret002BaseDR.Value > 0 + OR Fields!Ret003BaseDR.Value > 0 + ,False,true) + + + + Top + + + + + + + + true + true + + + + + Importe + + + + + + + Textbox113 + + = IIF( + Fields!Tra001BaseDR.Value > 0 + OR Fields!Tra002BaseDR.Value > 0 + OR Fields!Tra003BaseDR.Value > 0 + OR Fields!Ret001BaseDR.Value > 0 + OR Fields!Ret002BaseDR.Value > 0 + OR Fields!Ret003BaseDR.Value > 0 + ,False,true) + + + + Top + + + + + + + + true + true + + + + + + + + + + + + Textbox114 + + = IIF( + Fields!Tra001BaseDR.Value > 0 + OR Fields!Tra002BaseDR.Value > 0 + OR Fields!Tra003BaseDR.Value > 0 + OR Fields!Ret001BaseDR.Value > 0 + OR Fields!Ret002BaseDR.Value > 0 + OR Fields!Ret003BaseDR.Value > 0 + ,False,true) + + + + Top + + + + + + + + true + true + + + + + + + + + + + + Textbox115 + + = IIF( + Fields!Tra001BaseDR.Value > 0 + OR Fields!Tra002BaseDR.Value > 0 + OR Fields!Tra003BaseDR.Value > 0 + OR Fields!Ret001BaseDR.Value > 0 + OR Fields!Ret002BaseDR.Value > 0 + OR Fields!Ret003BaseDR.Value > 0 + ,False,true) + + + + Top + + + + + + + + true + true + + + + + + + + + + + Top + + + + + + + + true + true + + + + + + + + + + + Top + + + + + + + + 0.07938cm + + + + + true + true + + + + + ISR + + + + + + + Textbox61 + + = IIF( + Fields!Tra001BaseDR.Value > 0 + ,False,True) + + + + + + + + + + + true + true + + + + + Traslado + + + + + + + Textbox204 + + = IIF( + Fields!Tra001BaseDR.Value > 0 + ,False,True) + + + + + + + + + + + true + true + + + + + =Fields!ImpPagado.Value + + + + + + + ImpPagado + + = IIF( + Fields!Tra001BaseDR.Value > 0 + ,False,True) + + + + + + + + + + + true + true + + + + + =Fields!Tra001TipoFactorDR.Value + + + + + + + ImpPagado + + = IIF( + Fields!Tra001BaseDR.Value > 0 + ,False,True) + + + + + + + + + + + true + true + + + + + =Fields!Tra001TasaOCuotaDR.Value + + + + + + + ImpPagado + + = IIF( + Fields!Tra001BaseDR.Value > 0 + ,False,True) + + + + + + + + + + + true + true + + + + + =Fields!Tra001ImporteDR.Value + + + + + + + ImpPagado + + = IIF( + Fields!Tra001BaseDR.Value > 0 + ,False,True) + + + + + + + + + + + true + true + + + + + + + + + + + + Textbox4 + + = IIF( + Fields!Tra001BaseDR.Value > 0 + ,False,True) + + + + + + + + + + + true + true + + + + + + + + + + + + Textbox13 + + = IIF( + Fields!Tra001BaseDR.Value > 0 + ,False,True) + + + + + + + + + + + true + true + + + + + + + + + + + + + + + + + + true + true + + + + + + + + + + + + + + + + + + 0.07938cm + + + + + true + true + + + + + IVA + + + + + + + Textbox61 + + = IIF( + Fields!Tra002BaseDR.Value > 0 + ,False,True) + + + + + + + + + + + true + true + + + + + Traslado + + + + + + + Textbox204 + + = IIF( + Fields!Tra002BaseDR.Value > 0 + ,False,True) + + + + + + + + + + + true + true + + + + + =Fields!ImpPagado.Value + + + + + + + ImpPagado + + = IIF( + Fields!Tra002BaseDR.Value > 0 + ,False,True) + + + + + + + + + + + true + true + + + + + =Fields!Tra002TipoFactorDR.Value + + + + + + + ImpPagado + + = IIF( + Fields!Tra002BaseDR.Value > 0 + ,False,True) + + + + + + + + + + + true + true + + + + + =Fields!Tra002TasaOCuotaDR.Value + + + + + + + ImpPagado + + = IIF( + Fields!Tra002BaseDR.Value > 0 + ,False,True) + + + + + + + + + + + true + true + + + + + =Fields!Tra002ImporteDR.Value + + + + + + + ImpPagado + + = IIF( + Fields!Tra002BaseDR.Value > 0 + ,False,True) + + + + + + + + + + + true + true + + + + + + + + + + + + Textbox67 + + = IIF( + Fields!Tra002BaseDR.Value > 0 + ,False,True) + + + + + + + + + + + true + true + + + + + + + + + + + + Textbox68 + + = IIF( + Fields!Tra002BaseDR.Value > 0 + ,False,True) + + + + + + + + + + + true + true + + + + + + + + + + + + + + + + + + true + true + + + + + + + + + + + + + + + + + + 0.07938cm + + + + + true + true + + + + + IEPS + + + + + + + Textbox61 + + = IIF( + Fields!Tra003BaseDR.Value > 0 + ,False,True) + + + + + + + + + + + true + true + + + + + Traslado + + + + + + + Textbox204 + + = IIF( + Fields!Tra003BaseDR.Value > 0 + ,False,True) + + + + + + + + + + + true + true + + + + + =Fields!ImpPagado.Value + + + + + + + ImpPagado + + = IIF( + Fields!Tra003BaseDR.Value > 0 + ,False,True) + + + + + + + + + + + true + true + + + + + =Fields!Tra003TipoFactorDR.Value + + + + + + + ImpPagado + + = IIF( + Fields!Tra003BaseDR.Value > 0 + ,False,True) + + + + + + + + + + + true + true + + + + + =Fields!Tra003TasaOCuotaDR.Value + + + + + + + ImpPagado + + = IIF( + Fields!Tra003BaseDR.Value > 0 + ,False,True) + + + + + + + + + + + true + true + + + + + =Fields!Tra003ImporteDR.Value + + + + + + + ImpPagado + + = IIF( + Fields!Tra003BaseDR.Value > 0 + ,False,True) + + + + + + + + + + + true + true + + + + + + + + + + + + Textbox51 + + = IIF( + Fields!Tra003BaseDR.Value > 0 + ,False,True) + + + + + + + + + + + true + true + + + + + + + + + + + + Textbox55 + + = IIF( + Fields!Tra003BaseDR.Value > 0 + ,False,True) + + + + + + + + + + + true + true + + + + + + + + + + + + + + + + + + true + true + + + + + + + + + + + + + + + + + + 0.07938cm + + + + + true + true + + + + + ISR + + + + + + + Textbox61 + + = IIF( + Fields!Ret001BaseDR.Value > 0 + ,False,True) + + + + + + + + + + + true + true + + + + + Retención + + + + + + + Textbox207 + + = IIF( + Fields!Ret001BaseDR.Value > 0 + ,False,True) + + + + + + + + + + + true + true + + + + + =Fields!ImpPagado.Value + + + + + + + ImpPagado + + = IIF( + Fields!Ret001BaseDR.Value > 0 + ,False,True) + + + + + + + + + + + true + true + + + + + =Fields!Ret001TipoFactorDR.Value + + + + + + + ImpPagado + + = IIF( + Fields!Ret001BaseDR.Value > 0 + ,False,True) + + + + + + + + + + + true + true + + + + + =Fields!Ret001TasaOCuotaDR.Value + + + + + + + ImpPagado + + = IIF( + Fields!Ret001BaseDR.Value > 0 + ,False,True) + + + + + + + + + + + true + true + + + + + =Fields!Ret001ImporteDR.Value + + + + + + + ImpPagado + + = IIF( + Fields!Ret001BaseDR.Value > 0 + ,False,True) + + + + + + + + + + + true + true + + + + + + + + + + + + Textbox75 + + = IIF( + Fields!Ret001BaseDR.Value > 0 + ,False,True) + + + + + + + + + + + true + true + + + + + + + + + + + + Textbox76 + + = IIF( + Fields!Ret001BaseDR.Value > 0 + ,False,True) + + + + + + + + + + + true + true + + + + + + + + + + + + + + + + + + true + true + + + + + + + + + + + + + + + + + + 0.07939cm + + + + + true + true + + + + + IVA + + + + + + + Textbox61 + + = IIF( + Fields!Ret002BaseDR.Value > 0 + ,False,True) + + + + + + + + + + + true + true + + + + + Retención + + + + + + + Textbox207 + + = IIF( + Fields!Ret002BaseDR.Value > 0 + ,False,True) + + + + + + + + + + + true + true + + + + + =Fields!ImpPagado.Value + + + + + + + ImpPagado + + = IIF( + Fields!Ret002BaseDR.Value > 0 + ,False,True) + + + + + + + + + + + true + true + + + + + =Fields!Ret002TipoFactorDR.Value + + + + + + + ImpPagado + + = IIF( + Fields!Ret002BaseDR.Value > 0 + ,False,True) + + + + + + + + + + + true + true + + + + + =Fields!Ret002TasaOCuotaDR.Value + + + + + + + ImpPagado + + = IIF( + Fields!Ret002BaseDR.Value > 0 + ,False,True) + + + + + + + + + + + true + true + + + + + =Fields!Ret002ImporteDR.Value + + + + + + + ImpPagado + + = IIF( + Fields!Ret002BaseDR.Value > 0 + ,False,True) + + + + + + + + + + + true + true + + + + + + + + + + + + Textbox85 + + = IIF( + Fields!Ret002BaseDR.Value > 0 + ,False,True) + + + + + + + + + + + true + true + + + + + + + + + + + + Textbox86 + + = IIF( + Fields!Ret002BaseDR.Value > 0 + ,False,True) + + + + + + + + + + + true + true + + + + + + + + + + + + + + + + + + true + true + + + + + + + + + + + + + + + + + + 0.07938cm + + + + + true + true + + + + + IEPS + + + + + + + Textbox59 + + = IIF( + Fields!Ret003BaseDR.Value > 0 + ,False,True) + + + + + + + + + + + true + true + + + + + Retención + + + + + + + Textbox207 + + = IIF( + Fields!Ret003BaseDR.Value > 0 + ,False,True) + + + + + + + + + + + true + true + + + + + =Fields!ImpPagado.Value + + + + + + + ImpPagado + + = IIF( + Fields!Ret003BaseDR.Value > 0 + ,False,True) + + + + + + + + + + + true + true + + + + + =Fields!Ret003TipoFactorDR.Value + + + + + + + ImpPagado + + = IIF( + Fields!Ret003BaseDR.Value > 0 + ,False,True) + + + + + + + + + + + true + true + + + + + =Fields!Ret003TasaOCuotaDR.Value + + + + + + + ImpPagado + + = IIF( + Fields!Ret003BaseDR.Value > 0 + ,False,True) + + + + + + + + + + + true + true + + + + + =Fields!Ret003ImporteDR.Value + + + + + + + ImpPagado + + = IIF( + Fields!Ret003BaseDR.Value > 0 + ,False,True) + + + + es-MX + + + + + + + + true + true + + + + + + + + + + + + Textbox95 + + = IIF( + Fields!Ret003BaseDR.Value > 0 + ,False,True) + + + + + + + + + + + true + true + + + + + + + + + + + + Textbox96 + + = IIF( + Fields!Ret003BaseDR.Value > 0 + ,False,True) + + + + + + + + + + + true + true + + + + + + + + + + + + + + + + + + true + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + After + + + + + + + + + + + + + + + + + DataSet2 + 4.62704cm + 1.55693cm + 20.53139cm + 1 + + + + + + + + + 4.5cm + + + 1.74905cm + + + 1.5cm + + + 2.96606cm + + + 6.82934cm + + + 2.98695cm + + + + + 0.49cm + + + + + true + true + + + + + FECHA Y HORA DE PAGO + + + + + + #e36c09 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + MONEDA + + + + + + #e36c09 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + TC + + + + + + #e36c09 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + CTA ORDENANTE + + + + + + #e36c09 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + FORMA DE PAGO + + + + + + #e36c09 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + TOTAL DE PAGO + + + + + + #e36c09 + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.6cm + + + + + true + true + + + + + =Fields!FechaPago.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!MonedaP.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!TipoCambioP.Value + + + + + + 2pt + 2pt + 2pt + 2pt + es-MX + + + + + + + + true + true + + + + + =Fields!CtaOrdenante.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!FormaDePagoP.Value + + + + + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Monto.Value + + + + + + + Monto + + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + es-MX + + + + + + + + 0.6cm + + + + + true + true + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Parameters!CantidadLetra.Value + + + + + + + Textbox53 + + + + #e36c09 + 3pt + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + 2 + + + + + + + + + + + + + + + + + + + + + After + + + + + + Before + + + + DataSet1 + 6.51414cm + 1.69cm + 20.5314cm + 2 + + + + + + true + true + + + + + CFDI Relacionados + + + + + + + Textbox5 + 4.01644cm + 0.49cm + 20.5314cm + 3 + + + #e36c09 + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Datos del Cliente: + + + + + + + + + Cliente + + + + : + + + + =Parameters!Cliente.Value + + + + + + + + + Dirección: + + + + =Parameters!ClienteDireccion.Value + + + + , + + + + =Parameters!ClienteColonia.Value + + + + + + + + + Ciudad: + + + + =Parameters!ClienteCiudad.Value + + + + + + + + + CP: + + + + =Parameters!ClienteCP.Value + + + + + + + + + RFC Ordenante: + + + + + + + + =Parameters!RFCOrdenante.Value + + + + + + + + + = IIF( Parameters!RegimenFiscalCodigo.Value <> "ND-", "<b>Reg. Fiscal:</b> " & Parameters!RegimenFiscalCodigo.Value,"") + HTML + + + + + + + Textbox2 + 0.03528cm + 0.99355in + 5.01932in + 4 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + "Este documento es una representación impresa de un CFDI" + + + + + + + + + Cadena original del complemento de certificación digital del SAT: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + =Parameters!UUIDPago.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + + + + #e36c09 + 2pt + 2pt + 2pt + 2pt + + + + External + =Parameters!QR.Value + FitProportional + 3.3896in + 6.51771in + 1.3in + 1.5in + 7 + + + + + + true + true + + + + + + + + #e36c09 + 2pt + 2pt + 2pt + 2pt + + + + 12.1432cm + + + + + + + + + Folio: + + + + =Parameters!SerieFolio.Value + + + + + + + + + Fecha Timbre: + + + + =Parameters!FechaTimbre.Value + + + + + + + + + + + + + + + + + + Régimen Fiscal: + + + + + + + + + + + + + Regimen General de Ley Personas Morales + + + + + + + Textbox1 + 12.95686cm + 2.84197cm + 7.57454cm + + + White + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Domicilio Fiscal: + + + + + + + + + + + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + Embedded + Logo + FitProportional + 2.53cm + 4.13cm + 2 + + + + + + + + + + + 0.45509cm + true + true + + + true + true + + + + + ="Página " & Globals.PageNumber & " de " & Globals.TotalPages + + + + + + + Textbox35 + 17.09769cm + 0.41981cm + 2.94979cm + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Usuario: + + + + + + + + =Parameters!UsuarioImprimio.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Fecha Impresión: + + + + + + + + =Parameters!FechaImpresion.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 27.94cm + 21.59cm + 0.5cm + 0.5cm + 0.5cm + 0.5cm + 1.27cm + @@ -761,8 +761,8 @@ Textbox2 - 4.74917cm - 15.02042cm + 5.31361cm + 15.35404cm 0.6cm 2.53175cm 7 @@ -795,8 +795,8 @@ Textbox4 - 4.74917cm - 17.56276cm + 5.31361cm + 17.89638cm 0.6cm 2.14313cm 8 @@ -999,10 +999,10 @@ Textbox12 - 2.96905cm - 12.49038cm + 3.44148cm + 0.12912cm 0.53299cm - 2.14725cm + 3.12013cm 13 =(Parameters!TipoPago.Value = "") @@ -1039,8 +1039,8 @@ Textbox12 - 2.96905cm - 15.61669cm + 3.44148cm + 3.28453cm 0.53299cm 3.76632cm 14 @@ -1056,10 +1056,10 @@ - 5.34917cm + 6.09cm - - - - -
  • - Generar EXCEL -
  • -
  • - Generar PDF -
  • -
    -
    - Personalizar -
    - - - - - - - - - - -
    -
    -
    - - "> - -<%-- --%> -
    -
    -
    -
    - - <%--SubProyecto--%> -
    -
    - - -
    -
    - F.I.: -
    -
    -
    - - - - - - - - - - -
    -
    -
    - F.F.: -
    -
    -
    - - - - - - - - - - -
    -
    -
    -
    -
    -
    -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Cliente: + Cliente: - - -
    Folio: + <%----%> - + +
    +
    Registró:
    +
    +
    +
    :
    - - - - - - - - - -
    -
    -
    -
    - - - - - - - - -
    -
    -
    -
    - Detalles del Corte - - - - - - +<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepCortes.aspx.vb" Inherits="Bancos_RepCortes" %> + + + + + + + + + +
  • + Generar EXCEL +
  • +
  • + Generar PDF +
  • +
    +
    + Personalizar +
    + + + + + + + + + + +
    +
    +
    + + "> + + <%-- --%>
    -
    - - - - - - - -
    -
    - - - - +
    +
    +
    + + <%--SubProyecto--%> +
    +
    + + +
    +
    + F.I.: + +
    +
    +
    + + + + + + + + + + +
    +
    +
    + F.F.: + +
    +
    +
    + + + + + + + + + + +
    +
    +
    +
    +
    + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <%----%> + + + + + + + + + + + + + + +
    +
    +
    +
    + Detalles del Corte + + + + + + +
    +
    + + + + + + + +
    +
    + + + + Serie - Folio - - - - - - + + + + + + + + + + + + - + - - <%----%> - - - - - - -
    -
    -
    - - - + + <%----%> + + + + + + +
    + + + + + - + + - + + - - + + + - + + diff --git a/Bancos/RepCortes.aspx.vb b/Bancos/RepCortes.aspx.vb index 41d2ada37..8ea467c4e 100644 --- a/Bancos/RepCortes.aspx.vb +++ b/Bancos/RepCortes.aspx.vb @@ -87,7 +87,7 @@ Partial Class Bancos_RepCortes If UsuarioActual.Empresa.Funcionalidad(109) = "1" Then GvDatos.Columns(3).Visible = True GvDatos.Columns(4).Visible = True - GvDatos.Columns(12).Visible = True + GvDatos.Columns(13).Visible = True End If GvDatos.DataSource = DtCortes diff --git a/Compras/PopUpVerFactura.aspx.vb b/Compras/PopUpVerFactura.aspx.vb index f97eb6abc..a3fde73da 100644 --- a/Compras/PopUpVerFactura.aspx.vb +++ b/Compras/PopUpVerFactura.aspx.vb @@ -1602,7 +1602,14 @@ Partial Class PopUpVerFactura If DtCortesVentas.Rows.Count > 0 Or DtCortesVentasResumen.Rows.Count > 0 Then Dim lrds As New List(Of ReportDataSource) - Dim rds As New ReportDataSource With {.Name = "DataSet1", .Value = DtCortesVentasResumen} + Dim DtMetodosPago = DtCortesVentasResumen.Copy() + + 'MOVER EL VENTAS CREDITO DE LA DERECHA A LA IZQUIERDA EN EL PDF + If UsuarioActual.Empresa.Funcionalidad(109) = "1" Then + DtMetodosPago = DtCortesVentasResumen.FiltraParametros("MetodoPago <> 'Crédito'") + End If + + Dim rds As New ReportDataSource With {.Name = "DataSet1", .Value = DtMetodosPago} lrds.Add(rds) Dim rds2 As New ReportDataSource With {.Name = "DataSet2", .Value = DtCortesVentas} lrds.Add(rds2) @@ -1689,6 +1696,14 @@ Partial Class PopUpVerFactura End If Next + Dim TotalCredito As Decimal = DtCortesVentasResumen.SUMD("Importe", "MetodoPago = 'Crédito'") + + Dim rowCredito = DtDatosResumen.NewRow() + rowCredito("Columna") = "Crédito" + rowCredito("Importe") = TotalCredito + rowCredito("Orden") = 4 + DtDatosResumen.Rows.Add(rowCredito) + Dim rds3 As New ReportDataSource With {.Name = "DataSet3", .Value = DtDatosResumen.FiltraParametros("Orden > 0", "Orden")} lrds.Add(rds3) diff --git a/Ventas/PVCobranza.aspx b/Ventas/PVCobranza.aspx index 6007e8cf2..cbf9cb318 100644 --- a/Ventas/PVCobranza.aspx +++ b/Ventas/PVCobranza.aspx @@ -11,7 +11,7 @@ width: 200px; } - .btn-xs { + .btn-xs { padding: 0px 5px; } @@ -294,15 +294,15 @@ CssClass="ScrollAD table table-striped table-hover Widthall" data-heighterror="320" data-freezecols="0" data-freezerows="0" GridLines="None" DataKeyNames="CveVenta,TipoDocto,Saldo,AtencionA,CveFormaPago33,SerieFolio"> - + - +   @@ -317,13 +317,17 @@
    Nombre:
             
    - -
    Folio:
    -
      
    - -
    -
    -
    + +
    Folio:
    +
      
    + +
    +
    +
    + +
    +
    +
    @@ -521,7 +525,7 @@ - +     @@ -664,15 +668,25 @@