From 83e2a5021317dd3826603dd8e9181230eb80e760 Mon Sep 17 00:00:00 2001 From: rrene Date: Thu, 15 Sep 2022 16:01:49 -0700 Subject: [PATCH 01/28] -- codigo proviiosal, filtrar todas las cuentas --- Bancos/DepositosCaja.aspx.vb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Bancos/DepositosCaja.aspx.vb b/Bancos/DepositosCaja.aspx.vb index 069a5dd6c..c7f7bd75f 100644 --- a/Bancos/DepositosCaja.aspx.vb +++ b/Bancos/DepositosCaja.aspx.vb @@ -42,8 +42,12 @@ Partial Class Bancos_DepositosCaja DdlCuentaDeposito.DataBind() DdlCajaChica.DataSource = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveEmpresa:=UsuarioActual.CveEmpresa).FiltraParametros(" CveTipoCuenta = 1", "", {"CveCuenta", "NumCuentaMoneda"}) - DdlCajaChica.DataBind() - + DdlCajaChica.DataBind() + 'código temporal, para claudia y toñita + If UsuarioActual.CveUsuario.Contiene(1937, 2452) Then + DdlCajaChica.Items.Add(New ListItem("Todas", "-1")) + End If + DdlSubProyectos.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa) DdlSubProyectos.DataBind() DdlSubProyectos.Items.Insert(0, New ListItem("Todos", "-1")) From 4dbffc7a51e8a2acfaef6de6f2b03f1042665478 Mon Sep 17 00:00:00 2001 From: rrene Date: Sat, 17 Sep 2022 11:53:10 -0700 Subject: [PATCH 02/28] -- que tome de datakey las cvecuentas afectadas --- Bancos/DepositosCaja.aspx | 2 +- Bancos/DepositosCaja.aspx.vb | 13 +++---------- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/Bancos/DepositosCaja.aspx b/Bancos/DepositosCaja.aspx index 70b809ca8..e073494dc 100644 --- a/Bancos/DepositosCaja.aspx +++ b/Bancos/DepositosCaja.aspx @@ -295,7 +295,7 @@
- + diff --git a/Bancos/DepositosCaja.aspx.vb b/Bancos/DepositosCaja.aspx.vb index c7f7bd75f..7cbb67f23 100644 --- a/Bancos/DepositosCaja.aspx.vb +++ b/Bancos/DepositosCaja.aspx.vb @@ -106,19 +106,14 @@ Partial Class Bancos_DepositosCaja GvFacturas.DataSource = ObjBancos.DtResultados - If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then lblValorTotal.Text = ObjBancos.DtResultados.SUM("Importe").ToString("###,###,###.00") RegistraScript($" ValorTotalSeleccionado = {ObjBancos.DtResultados.SUM("Importe")};") End If - - - ObjBancos.Dispose() - GvFacturas.DataBind() ChkFaltante.Checked = False ChkDescuento.Checked = False @@ -137,9 +132,6 @@ Partial Class Bancos_DepositosCaja UpParametros.Update() UpComisiones.Update() - - - End Sub Private Sub BtnDepositar_Click(sender As Object, e As EventArgs) Handles BtnDepositar.Click @@ -309,13 +301,14 @@ Partial Class Bancos_DepositosCaja Dim CveIE As Integer = Gvr.DataKey("CveIE").ToEntero Dim CveVenta As Integer = Gvr.DataKey("CveVenta").ToEntero Dim CvePrePoliza As Integer = Gvr.DataKey("CvePrePoliza").ToEntero + Dim CveCuentaBancaria As Integer = Gvr.DataKey("CveCuenta").ToEntero - FolioIE = ObjBancos.GetNextFolio(DdlCajaChica.SelectedValue.ToEntero, 2) + FolioIE = ObjBancos.GetNextFolio(CveCuentaBancaria, 2) If Not FolioIE > 0 Then OcurrioError = True Exit For End If - CveIEDestino = ObjBancos.AddBancos_IE(DdlCajaChica.SelectedValue.ToEntero, 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) + 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 ObjContabilidad.AddPrePolizasDetalle(NuevaCvePrePoliza, True, Importe, SerieFolio, 30, String.Format("Depósito Bancario: {0}", SerieFolio), Fecha, IdCuentaBancariaDestino, -1, CveClasificacion:=CveClasificacion, CveSubProyecto:=CveSubProyecto, CveVenta:=CveVenta, CveIE:=CveIEDestino, ImporteMX:=Importe * TipoCambio) Then From a10190aaceab1bd9450cf8d6de998d9ba8716cfd Mon Sep 17 00:00:00 2001 From: rrene Date: Sat, 17 Sep 2022 11:53:26 -0700 Subject: [PATCH 03/28] =?UTF-8?q?--=20entradas=20por=20pr=C3=A9stamo=20que?= =?UTF-8?q?=20se=20contabilicen?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Inventarios/EntradasSalidas.aspx.vb | 71 ++--------------------------- 1 file changed, 5 insertions(+), 66 deletions(-) diff --git a/Inventarios/EntradasSalidas.aspx.vb b/Inventarios/EntradasSalidas.aspx.vb index 6c3071161..296498ec3 100644 --- a/Inventarios/EntradasSalidas.aspx.vb +++ b/Inventarios/EntradasSalidas.aspx.vb @@ -1720,16 +1720,6 @@ Partial Class Inventarios_EntradasSalidas Mensaje = "Error al guardar los movimientos" ErrorMovInv = True Exit For - 'Else - 'If ObjInventario.CveMovimientoDetalle > 0 AndAlso DtSeccionAlmacen.Rows.Count > 0 Then - ' For Each Dr2 As DataRow In DtSeccionAlmacen.FiltraParametros($"IndexSeccionAlmacen = {Cont}").Rows - ' If Not ObjInventario.AddMovimientosDetalleSeccionesAlmacen(ObjInventario.CveMovimientoDetalle, Dr2("CveSeccionAlmacen").ToString.ToEntero, Dr2("CantidadSeccionAlmacen").ToString.ToDecimal * Tipo) Then - ' ErrorMovInv = True - ' Mensaje = "Ocurrió un error al procesar las secciones de almacen. Por favor vuelva a intentar." - ' Exit For - ' End If - ' Next - 'End If End If Else @@ -1817,8 +1807,10 @@ Partial Class Inventarios_EntradasSalidas '[IPP] PARCHE CTA CONTABLE PARA SALIDA DE DEMOSTRACION If DdlConcepto.SelectedValue.ToEntero = 31 Then IdCtaContableOtro = 1319 + Else ''cuando es 28, es otros ingresos.78 + CveConceptoContable = 78 End If - EsContabilizable = False + EsContabilizable = True Case 30 CveConceptoContable = 181 TipoMovtoOtro = False @@ -1836,17 +1828,14 @@ Partial Class Inventarios_EntradasSalidas IdCtaContableOtro = drr("IdCuentaCostos").ToString.ToEntero End If - End Select If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovtoAlmacen, tValorInventario, TxtObservaciones.Text.Trim, 68, TxtObservaciones.Text.Trim, TxtFecha.Text.ToDate, idCtaContable, -1, CveMovimientoAlmacen:=CveMovimiento, ImporteMX:=tValorInventario, CveClasificacion:=CveClasificacion, Contabilizable:=EsContabilizable) Then ErrorMovInv = True Else - 'Select Case DdlConcepto.SelectedValue.ToEntero - ' Case 30 'Dim Total As Decimal = 0 - If CveConceptoContable = 181 Then + If CveConceptoContable.Contiene(181, 78) Then Dim Dt As DataTable = ObjInventario.DtResultados.FiltraParametros("", "", {"CveClasificacion"}).Copy 'Dim IdCuentaGasto As Integer = 0 For Each Dr As DataRow In Dt.Rows @@ -1856,13 +1845,8 @@ Partial Class Inventarios_EntradasSalidas ErrorMovInv = True End If Next - Else End If - - 'Case Else - - 'End Select End If Else ErrorMovInv = True @@ -1908,12 +1892,6 @@ Partial Class Inventarios_EntradasSalidas If drA IsNot Nothing Then CuentaAbonoAlmacen = drA("IdCtaContable").ToString.ToEntero - ''For Each gvr As GridViewRow In GvAC.Rows - 'For Each Dr As DataRow In DtII.Rows - ' Importe = Dr("Cantidad").ToString.ToDouble * Dr("PU").ToString.ToDouble ' gvr.FCTextBox("TxtImporte").Text.ToDouble - ' TotalDetalle += Importe - - 'saco de que partida se va a descontar y se enviara a gasto ' Dim drP As DataRow = DtPresupuestos.FiltroPrimero(String.Format("CveClasificacion = {0}", Dr("CveClasificacion"))) ' If drP IsNot Nothing Then CuentaCargoCOG = drP("IdCuentaMatriz").ToString.ToEntero @@ -1943,8 +1921,6 @@ Partial Class Inventarios_EntradasSalidas End If End If End If - - End If End If @@ -1957,44 +1933,7 @@ Partial Class Inventarios_EntradasSalidas Mensaje = "No se pudo insertar la poliza" End If End If - 'TERMINA: DEVENGAR - - - ''PREPOLIZA - SE CAMBIO DE LUGAR EL USO DE ESTA PARTE - 'If EsConsumoInterno Then - ' If Not ErrorAC And Not ErrorMovInv Then - ' Dim DtCostos As DataTable = Nothing - ' Dim ValorInventario As Decimal = 0 - - ' If ObjInventario.GetMovimientosDetalle(CveMovimiento, UsuarioActual.CveEmpresa) Then - ' DtCostos = ObjInventario.DtResultados - ' Dim tmpCostos As DataTable = DtCostos.FiltraParametros("", "", {"CveClasificacion"}) - ' Dim IdCtaContable As Integer = 0 - - ' If tmpCostos.Rows.Count > 0 Then - ' Dim Concepto As String = $"Consumo Interno: {ObjInventario.Folio} - {TxtObservaciones.Text}" - ' Dim CvePrePoliza = ObjConta.AddPrePolizas("Inv/ConsumoInterno", 53, DtCostos.SUM("Total"), DtCostos.SUM("Total"), 1, TxtFecha.Text.ToDate, $"Consumo Interno: {TxtObservaciones.Text}", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) - - ' For Each RowInv As DataRow In tmpCostos.Rows - ' ValorInventario = DtCostos.SUM("Total", $"CveClasificacion = {RowInv("CveClasificacion")}").ToString.ToDecimal - ' IdCtaContable = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaGasto", $"CveClasificacion = {RowInv("CveClasificacion")}").ToEntero - - ' If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, ValorInventario, Concepto, 6, Concepto, TxtFecha.Text.ToDate, IdCtaContable, -1, CveClasificacion:=RowInv("CveClasificacion").ToString.ToEntero, CveMovimientoAlmacen:=CveMovimiento, ImporteMX:=ValorInventario) Then - ' ErrorMovInv = True - ' Exit For - ' End If - - ' Next - - ' IdCtaContable = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", $"CveAlmacen={DdlAlmacen.SelectedValue.ToEntero}").ToEntero - ' If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, DtCostos.SUM("Total"), Concepto, 68, Concepto, TxtFecha.Text.ToDate, IdCtaContable, -1, CveMovimientoAlmacen:=CveMovimiento, ImporteMX:=DtCostos.SUM("Total")) Then - ' ErrorMovInv = True - ' End If - ' End If - ' End If - - ' End If - 'End If + 'TERMINA: DEVENGAR Dim RetornoVirtual As MMovimientoVirtual = Nothing If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then From 90f8ad042e9ecd9772a7d58e648a80f3ed793a9f Mon Sep 17 00:00:00 2001 From: rrene Date: Sat, 17 Sep 2022 11:54:02 -0700 Subject: [PATCH 04/28] -- pago de compra, que sea acreditable o no, segun la forma de pago --- App_Code/ClsPaginas.vb | 42 ++++++++++++++++++++++++------------------ 1 file changed, 24 insertions(+), 18 deletions(-) diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb index 386b71e15..3ac099c3d 100644 --- a/App_Code/ClsPaginas.vb +++ b/App_Code/ClsPaginas.vb @@ -9634,8 +9634,10 @@ Public Class ClsPaginas End If - 'si tiene iva y su proporcion - If Not ErrorMovtos AndAlso CompraActual.IVA <> 0 Then + If Pago.AplicaAcreditable Then + + 'si tiene iva y su proporcion + If Not ErrorMovtos AndAlso CompraActual.IVA <> 0 Then ImporteMovimiento = (PorcentajePago * CompraActual.IVA).RoundSQL ImporteMN = (ImporteMovimiento * CompraActual.TC).RoundSQL If CompraActual.CveMoneda > 1 Then ImporteME = ImporteMovimiento @@ -9701,27 +9703,29 @@ Public Class ClsPaginas End If - 'si tiene IEPS y su proporcion - If Not ErrorMovtos AndAlso CompraActual.IEPS > 0 Then - ImporteMovimiento = (PorcentajePago * CompraActual.IEPS).RoundSQL - ImporteMN = (ImporteMovimiento * CompraActual.TC).RoundSQL - If CompraActual.CveMoneda > 1 Then ImporteME = ImporteMovimiento + 'si tiene IEPS y su proporcion + If Not ErrorMovtos AndAlso CompraActual.IEPS > 0 Then + ImporteMovimiento = (PorcentajePago * CompraActual.IEPS).RoundSQL + ImporteMN = (ImporteMovimiento * CompraActual.TC).RoundSQL + If CompraActual.CveMoneda > 1 Then ImporteME = ImporteMovimiento - Dim Ret As New ConceptosRetenciones - If UsuarioActual.Empresa.TipoContabilidad = 2 Then - If ObjConta.GetRetCuenta(26, UsuarioActual.CveEmpresa) AndAlso ObjConta.DtResultados.Rows.Count > 0 Then Ret.IdCtaContableAcreditable = ObjConta.DtResultados.Rows(0)("IdCuentaIEPSAcreditable").ToString.ToEntero + Dim Ret As New ConceptosRetenciones + If UsuarioActual.Empresa.TipoContabilidad = 2 Then + If ObjConta.GetRetCuenta(26, UsuarioActual.CveEmpresa) AndAlso ObjConta.DtResultados.Rows.Count > 0 Then Ret.IdCtaContableAcreditable = ObjConta.DtResultados.Rows(0)("IdCuentaIEPSAcreditable").ToString.ToEntero - If ObjConta.GetRetCuenta(25, UsuarioActual.CveEmpresa) AndAlso ObjConta.DtResultados.Rows.Count > 0 Then Ret.IdCtaContablexAcreditar = ObjConta.DtResultados.Rows(0)("IdCuentaIEPSxAcreditar").ToString.ToEntero + If ObjConta.GetRetCuenta(25, UsuarioActual.CveEmpresa) AndAlso ObjConta.DtResultados.Rows.Count > 0 Then Ret.IdCtaContablexAcreditar = ObjConta.DtResultados.Rows(0)("IdCuentaIEPSxAcreditar").ToString.ToEntero + + End If + + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, ImporteMovimiento, ImporteMN, 25, CompraActual.SerieFolio, Concepto, Ret.IdCtaContablexAcreditar, CveCompra:=CompraActual.CveCompra, CveProveedor:=CompraActual.CveProveedor, CveIE:=Pago.CveIE, CvePersonal:=Pago.CvePersonal, TipoCambio:=CompraActual.TC, TipoCambioPago:=Pago.TCPago, ImporteME:=ImporteME, CveSubProyecto:=CompraActual.CveSubProyecto) Then ErrorMovtos = True + + 'si tiene funcionalidad para tomar el TC de pago. se recalcula el importe + If FuncionalidadFluctuacionImpuestos Then ImporteMN = (ImporteMovimiento * Pago.TCPago).RoundSQL + + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, ImporteMovimiento, ImporteMN, 26, CompraActual.SerieFolio, Concepto, Ret.IdCtaContableAcreditable, CveCompra:=CompraActual.CveCompra, CveProveedor:=CompraActual.CveProveedor, CveIE:=Pago.CveIE, CvePersonal:=Pago.CvePersonal, TipoCambio:=CompraActual.TC, TipoCambioPago:=Pago.TCPago, ImporteME:=ImporteME, CveSubProyecto:=CompraActual.CveSubProyecto) Then ErrorMovtos = True End If - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, ImporteMovimiento, ImporteMN, 25, CompraActual.SerieFolio, Concepto, Ret.IdCtaContablexAcreditar, CveCompra:=CompraActual.CveCompra, CveProveedor:=CompraActual.CveProveedor, CveIE:=Pago.CveIE, CvePersonal:=Pago.CvePersonal, TipoCambio:=CompraActual.TC, TipoCambioPago:=Pago.TCPago, ImporteME:=ImporteME, CveSubProyecto:=CompraActual.CveSubProyecto) Then ErrorMovtos = True - - 'si tiene funcionalidad para tomar el TC de pago. se recalcula el importe - If FuncionalidadFluctuacionImpuestos Then ImporteMN = (ImporteMovimiento * Pago.TCPago).RoundSQL - - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, ImporteMovimiento, ImporteMN, 26, CompraActual.SerieFolio, Concepto, Ret.IdCtaContableAcreditable, CveCompra:=CompraActual.CveCompra, CveProveedor:=CompraActual.CveProveedor, CveIE:=Pago.CveIE, CvePersonal:=Pago.CvePersonal, TipoCambio:=CompraActual.TC, TipoCambioPago:=Pago.TCPago, ImporteME:=ImporteME, CveSubProyecto:=CompraActual.CveSubProyecto) Then ErrorMovtos = True - End If 'si tiene otros gastos/ingresos @@ -9779,6 +9783,7 @@ Public Class ClsPaginas Public Class CompraPago + Public Property TipoPago As String = "B" ' B - Bancos, A - Anticipos, E - ExC, NC - Nota de crédito Public Fecha As Date Public Property CveIE As Integer = -1 Public Property CvePersonal As Integer = -1 @@ -9789,6 +9794,7 @@ Public Class ClsPaginas Public Property OtroGastoIngreso As Decimal = 0 Public Property CveConceptoPago As Integer = -1 'no definido de inicio Public Property CveCreditoDetalle As Integer = -1 + Public Property AplicaAcreditable As Boolean = True End Class From 28bab97862dafe75f5e55987d159e9650365bfe0 Mon Sep 17 00:00:00 2001 From: rrene Date: Sat, 17 Sep 2022 12:16:10 -0700 Subject: [PATCH 05/28] -- RSCO vencimiento --- Inicio.aspx.vb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Inicio.aspx.vb b/Inicio.aspx.vb index 971d81b2e..dd2069a47 100644 --- a/Inicio.aspx.vb +++ b/Inicio.aspx.vb @@ -357,7 +357,7 @@ Partial Class Inicio Dim ObjInventarios As New ClsInventarios - If ObjInventarios.RepCompuestosVigencia(-1, -1, MinFecha, Now.AddYears(1), 1, UsuarioActual.CveEmpresa, -1, UsuarioActual.CveUsuario, True) Then + If ObjInventarios.RepCompuestosVigencia(-1, -1, MinFecha, Now.AddMonths(1), 1, UsuarioActual.CveEmpresa, -1, UsuarioActual.CveUsuario, True) Then If ObjInventarios.DtResultados.Rows.Count > 0 Then GvModalRSCOPorCaducar.DataSource = ObjInventarios.DtResultados From c4034624ef49a2f0c485845fe97dac026a6a0b86 Mon Sep 17 00:00:00 2001 From: Oscar Irigoyen Date: Mon, 19 Sep 2022 10:12:23 -0700 Subject: [PATCH 06/28] Consignaciones Lote Fecha de caducidad, rep Recuperacion por Periodo --- Compras/Compras.aspx.vb | 88 ++++++++++++++++++------- Inventarios/Consignaciones.aspx | 26 +++++++- Inventarios/Consignaciones.aspx.vb | 95 +++++++++++++++++++++++---- Inventarios/ResguardoMaterial.aspx.vb | 7 +- Ventas/RepRecuperacionPeriodo.aspx | 18 ++--- 5 files changed, 189 insertions(+), 45 deletions(-) diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb index 5e4a0eedb..ef493259e 100644 --- a/Compras/Compras.aspx.vb +++ b/Compras/Compras.aspx.vb @@ -1135,9 +1135,16 @@ Partial Class Compras_Compras End Set End Property + Public Property FechaCompraOriginal As Date + Get + Return ViewState("FechaCompraOriginal").ToString.ToDate + End Get + Set(value As Date) + ViewState("FechaCompraOriginal") = value + End Set - + End Property Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load If Not IsPostBack Then @@ -2537,6 +2544,8 @@ Partial Class Compras_Compras TxtFolio.Text = dr("Folio").ToString TxtFolioSecundario.Text = dr("FolioSecundario").ToString TxtFecha.Text = dr("Fecha").ToString.ToDate.ToShortDateString + FechaCompraOriginal = dr("Fecha").ToString.ToDate + TxtDescripcion.Text = dr("Descripcion").ToString CvePrePoliza = dr("CvePrePoliza").ToString.ToEntero EstatusAlmacen = dr("EstatusAlmacen").ToString.ToEntero @@ -19966,39 +19975,74 @@ Partial Class Compras_Compras Protected Sub LnkActualziarFechadecompra_Click(sender As Object, e As EventArgs) - Dim ObjCompra As New ClsCompras + Dim ProcesoError As Boolean = True + + If FechaCompraOriginal <> TxtFecha.Text.ToDate Then + + + Dim ObjCompra As New ClsCompras + ObjCompra.IniciaTransacSQL() + + Dim ObjEventos As New ClsOIEventos(ObjCompra.IniciaTransacSQL()) + + If ObjEventos.AddEventoBitacora($"Cambio de Fecha de compra de { FechaCompraOriginal.ToString("dd/MM/yyyy")} a {TxtFecha.Text}", "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveCompra:=CveCompra) Then + ProcesoError = False + Else + ProcesoError = True + End If + + If ProcesoError = False And ObjCompra.UpdateFechaCompra(CveCompra, TxtFecha.Text.ToDate, UsuarioActual.CveEmpresa) Then + ProcesoError = False + Else + ProcesoError = True + End If + + + If Not ProcesoError Then + ObjCompra.Commit() + FechaCompraOriginal = TxtFecha.Text.ToDate + Alert("Fecha Actualizada Correctamente.") + Else + ObjCompra.RollBack() + End If + + ObjCompra.Dispose() + + If Not ProcesoError Then + CargaEventoBitacora() + UPEventoBitacora.Update() + End If + - If ObjCompra.UpdateFechaCompra(CveCompra, TxtFecha.Text.ToDate, UsuarioActual.CveEmpresa) Then - Alert("Fecha Actualizada Correctamente") End If - ObjCompra.Dispose() + End Sub Private Function ValidaSeleccionAnticipo() As Boolean - Dim Respuesta As Boolean + Dim Respuesta As Boolean = True - If UsuarioActual.CveEmpresa.Contiene(13, 83) Then - If GVAnticipos.Rows.Count > 0 Then + 'If UsuarioActual.CveEmpresa.Contiene(13, 83) Then + ' If GVAnticipos.Rows.Count > 0 Then - For Each GVRow As GridViewRow In GVAnticipos.Rows - If GVRow.FCCheckBox("Chk").Checked AndAlso GVRow.FCTextBox("TxtAnticipo").Text.ToDecimal > 0 Then - Respuesta = True - Exit For - Else - Respuesta = False - End If - Next + ' For Each GVRow As GridViewRow In GVAnticipos.Rows + ' If GVRow.FCCheckBox("Chk").Checked AndAlso GVRow.FCTextBox("TxtAnticipo").Text.ToDecimal > 0 Then + ' Respuesta = True + ' Exit For + ' Else + ' Respuesta = False + ' End If + ' Next - Else - Respuesta = True - End If + ' Else + ' Respuesta = True + ' End If - Else - Respuesta = True - End If + 'Else + ' Respuesta = True + 'End If Return Respuesta diff --git a/Inventarios/Consignaciones.aspx b/Inventarios/Consignaciones.aspx index 29ec3f198..3661be63e 100644 --- a/Inventarios/Consignaciones.aspx +++ b/Inventarios/Consignaciones.aspx @@ -69,7 +69,7 @@
  • Almacén: - +
  • @@ -508,8 +508,32 @@ + + + + + + + + + +
    + + + + + + + + +
    +
    +
    + + + diff --git a/Inventarios/Consignaciones.aspx.vb b/Inventarios/Consignaciones.aspx.vb index 7c48b41bf..b98da3d05 100644 --- a/Inventarios/Consignaciones.aspx.vb +++ b/Inventarios/Consignaciones.aspx.vb @@ -72,6 +72,19 @@ Partial Class Inventarios_Consignaciones End If End Sub + Private Property ValidaLoteCaducidad As Boolean + Get + If ViewState("ValidaLoteCaducidad") Is Nothing Then + ViewState("ValidaLoteCaducidad") = False + End If + Return CType(ViewState("ValidaLoteCaducidad"), Boolean) + End Get + Set(value As Boolean) + ViewState("ValidaLoteCaducidad") = value + End Set + End Property + + #Region "Inicializa Valores" @@ -364,6 +377,32 @@ Partial Class Inventarios_Consignaciones CargaDatos(DdlRemisiones.SelectedValue.ToEntero) End Sub Private Sub CargaDatos(CveConsignacionTemp As Integer) + + If DdlConcepto.SelectedValue.ToEntero.Contiene(12, 8) Then + Dim CveSubProyectoValidaCaducidad As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa, CveAlmacen:=DdlAlmacenFiltro.SelectedValue.ToEntero).FiltroPrimeroValor("CveSubProyecto").ToEntero + 'RMF condición temporal + If UsuarioActual.CveEmpresa = 119 AndAlso CveSubProyectoValidaCaducidad.ToString.Contiene(UsuarioActual.Empresa.Funcionalidad(347).Split(","c)) Then + ValidaLoteCaducidad = True + + 'activa lote + ThLote.Visible = True + ThCaducidad.Visible = True + + + Else + ValidaLoteCaducidad = False + + 'activa lote + ThLote.Visible = False + ThCaducidad.Visible = False + + + End If + End If + + + + Dim ObjInventario As New ClsInventarios If ObjInventario.ConsignacionesDetalle(CveConsignacionTemp, DdlAlmacenFiltro.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then @@ -538,6 +577,24 @@ Partial Class Inventarios_Consignaciones e.Row.FCTextBox("TxtPU").Attributes.Add("onkeyup", String.Format("RecalculaEdit({0},this,{1});", e.Row.FCTextBox("TxtCantidad").ClientID, e.Row.FCLabel("LbTotal").ClientID)) End If + If (ValidaLoteCaducidad) OrElse (UsuarioActual.CveEmpresa <> 119) Then + If CBool(e.Row.DBCampo("AplicaCaducidad")) Then + e.Row.FCTextBox("TxtCaducidad").Visible = True + e.Row.FCLinkButton("LnkCaducidad").Visible = True + Else + e.Row.FCTextBox("TxtCaducidad").Visible = False + e.Row.FCLinkButton("LnkCaducidad").Visible = False + End If + + If CBool(e.Row.DBCampo("AplicaLote")) Then + e.Row.FCTextBox("TxtLote").Visible = True + Else + e.Row.FCTextBox("TxtLote").Visible = False + End If + + End If + + End If End Sub @@ -940,8 +997,14 @@ Partial Class Inventarios_Consignaciones Exit For End If + + Dim Lote As String = "-1" + Dim FechaCaducidad As Date = MinFecha + If Gvr.FCTextBox("TxtLote").Text.Trim <> "" Then Lote = Gvr.FCTextBox("TxtLote").Text.Trim + If Gvr.FCTextBox("TxtCaducidad").Text.ToDate > MinFecha Then FechaCaducidad = Gvr.FCTextBox("TxtCaducidad").Text.ToDate + 'AGREGAMOS MOVTOS DETALLE - If Not ObjInventario.AddMovimientoDetalle(CveMovimiento, Gvr.FCTextBox("TxtCantidadDevolucion").Text.ToString.ToDouble, Gvr.DataKey("CveUM").ToString.ToEntero, Gvr.DataKey("CvePS").ToString.ToEntero, Gvr.DataKey("PU").ToString.ToDecimal, -1, -1, Gvr.DataKey("Serie").ToString, Gvr.DataKey("Lote").ToString) Then + If Not ObjInventario.AddMovimientoDetalle(CveMovimiento, Gvr.FCTextBox("TxtCantidadDevolucion").Text.ToString.ToDouble, Gvr.DataKey("CveUM").ToString.ToEntero, Gvr.DataKey("CvePS").ToString.ToEntero, Gvr.DataKey("PU").ToString.ToDecimal, -1, -1, Gvr.DataKey("Serie").ToString, Lote, FechaCaducidad:=FechaCaducidad) Then ErrorMovInv = True TextoError = "Ocurrió un Error al guardar los movimientos" Exit For @@ -1126,20 +1189,26 @@ Partial Class Inventarios_Consignaciones FolioSalida = ObjInventario.Folio End If - If CveMovimientoSalida > 0 Then - If MovtoNew Then - CveMovtosSalida.Add(CveMovimientoSalida) - FoliosSalida.Add(FolioSalida) - MovtoNew = False - End If - Else - TextoError = "No se pudo generar el movimiento de salida correctamente" - ErrorMovInv = True - Exit For + If CveMovimientoSalida > 0 Then + If MovtoNew Then + CveMovtosSalida.Add(CveMovimientoSalida) + FoliosSalida.Add(FolioSalida) + MovtoNew = False End If + Else + TextoError = "No se pudo generar el movimiento de salida correctamente" + ErrorMovInv = True + Exit For + End If + + + Dim Lote As String = "-1" + Dim FechaCaducidad As Date = MinFecha + If Gvr.FCTextBox("TxtLote").Text.Trim <> "" Then Lote = Gvr.FCTextBox("TxtLote").Text.Trim + If Gvr.FCTextBox("TxtCaducidad").Text.ToDate > MinFecha Then FechaCaducidad = Gvr.FCTextBox("TxtCaducidad").Text.ToDate 'AGREGAMOS MOVTOS DETALLE - If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, Gvr.FCTextBox("TxtCantidadDevolucion").Text.ToString.ToDouble, Gvr.DataKey("CveUM").ToString.ToEntero, Gvr.DataKey("CvePS").ToString.ToEntero, Gvr.DataKey("PU").ToString.ToDecimal, -1, -1, "", "") Then + If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, Gvr.FCTextBox("TxtCantidadDevolucion").Text.ToString.ToDouble, Gvr.DataKey("CveUM").ToString.ToEntero, Gvr.DataKey("CvePS").ToString.ToEntero, Gvr.DataKey("PU").ToString.ToDecimal, -1, -1, "", Lote, FechaCaducidad:=FechaCaducidad) Then ErrorMovInv = True TextoError = "Ocurrió un Error al guardar los movimientos detalle de la salida" Exit For @@ -1744,4 +1813,6 @@ Partial Class Inventarios_Consignaciones + + End Class diff --git a/Inventarios/ResguardoMaterial.aspx.vb b/Inventarios/ResguardoMaterial.aspx.vb index 74e36dff3..2771700f8 100644 --- a/Inventarios/ResguardoMaterial.aspx.vb +++ b/Inventarios/ResguardoMaterial.aspx.vb @@ -956,8 +956,9 @@ Partial Class Inventarios_ResguardoMaterial If Gvr.FCTextBox("TxtCantidad").Text.ToDouble > 0 Then Dim Lote As String = "-1" Dim FechaCaducidad As Date = MinFecha - If Gvr.datakey("Lote") <> "" Then Lote = Gvr.datakey("Lote") - If Gvr.datakey("FechaCaducidad").todate > MinFecha Then FechaCaducidad = Gvr.datakey("FechaCaducidad").todate + If Gvr.FCTextBox("TxtLote").Text.Trim <> "" Then Lote = Gvr.FCTextBox("TxtLote").Text.Trim + 'If Gvr.datakey("FechaCaducidad").todate > MinFecha Then FechaCaducidad = Gvr.datakey("FechaCaducidad").todate + If Gvr.FCTextBox("TxtCaducidad").Text.ToDate > MinFecha Then FechaCaducidad = Gvr.FCTextBox("TxtCaducidad").Text.ToDate If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, Gvr.FCTextBox("TxtCantidad").Text.ToDouble, Gvr.DataKey("CveUM").ToString.ToEntero, Gvr.DataKey("CvePS").ToString.ToEntero, Gvr.DataKey("PU").ToString.ToDecimal, -1, CveSeccionAlmacen:=Gvr.DataKey("CveSeccionAlmacen").ToEntero, Serie:=Gvr.DataKey("Serie").ToString, Lote:=Lote, FechaCaducidad:=FechaCaducidad, Observaciones:=Gvr.DataKey("Observaciones").ToString, CveMovimientoDetalleEntrada:=Gvr.DataKey("CveMovimientoDetalle").toentero) Then MensajeError = "Ocurrió un error al guardar los detalles del movimiento de salida. Por favor vuelva a intentar." @@ -968,6 +969,8 @@ Partial Class Inventarios_ResguardoMaterial DiccionarioLote.Add(ObjInventario.CveMovimientoDetalle, Gvr.FCTextBox("TxtLote").Text) DiccionarioCaducidad.Add(ObjInventario.CveMovimientoDetalle, Gvr.FCTextBox("TxtCaducidad").Text.todate) End If + + End If Cont += 1 Next diff --git a/Ventas/RepRecuperacionPeriodo.aspx b/Ventas/RepRecuperacionPeriodo.aspx index cb4068856..0579aedcd 100644 --- a/Ventas/RepRecuperacionPeriodo.aspx +++ b/Ventas/RepRecuperacionPeriodo.aspx @@ -16,22 +16,24 @@ + +
  • + PDF +
  • +
  • + Excel +
  • Ver Dlls en pesos
  • - Ver Grafica + Ver Grafica
  • -
  • - Generar PDF -
  • -
  • - Generar Excel -
  • +
    @@ -212,7 +214,7 @@ - +
    From cdde0bd3356d2ed5ca54096eeb190a8e69194c6f Mon Sep 17 00:00:00 2001 From: rrene Date: Mon, 19 Sep 2022 11:32:30 -0700 Subject: [PATCH 07/28] -- mejora decode --- Compras/Compras.aspx.vb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb index 12d5338e8..fcf376230 100644 --- a/Compras/Compras.aspx.vb +++ b/Compras/Compras.aspx.vb @@ -1806,7 +1806,7 @@ Partial Class Compras_Compras Xml.Append(Replace(Replace(Replace(Replace(nodeconceptos.OuterXml, " Date: Mon, 19 Sep 2022 11:37:19 -0700 Subject: [PATCH 08/28] =?UTF-8?q?--=20focus=20en=20el=20escaneo=20de=20la?= =?UTF-8?q?=20recepci=C3=B3n?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Inventarios/TraspasoAlmacen.aspx.vb | 1 + 1 file changed, 1 insertion(+) diff --git a/Inventarios/TraspasoAlmacen.aspx.vb b/Inventarios/TraspasoAlmacen.aspx.vb index 1e5b27130..8db91b075 100644 --- a/Inventarios/TraspasoAlmacen.aspx.vb +++ b/Inventarios/TraspasoAlmacen.aspx.vb @@ -2428,6 +2428,7 @@ Partial Class Inventarios_TraspasoAlmacen TxtCodigoPSRecepcion.Text = "" TdSeriePSRecepcion.Visible = False TxtSeriePSRecepcion.Text = "" + TxtCodigoPSRecepcion.Focus() UpDatosRecepcion.Update() Exit Sub End If From ba03b6b7ff5d1280735ff62aad4167015ad5167b Mon Sep 17 00:00:00 2001 From: rrene Date: Mon, 19 Sep 2022 12:18:03 -0700 Subject: [PATCH 09/28] mejora en decode. comillas --- Compras/Compras.aspx.vb | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb index fcf376230..a08e800de 100644 --- a/Compras/Compras.aspx.vb +++ b/Compras/Compras.aspx.vb @@ -1804,32 +1804,24 @@ Partial Class Compras_Compras Dim nodeconceptos As XmlNode = XMLDoc.SelectSingleNode(String.Format("//{0}:Conceptos", Prefijo), namespaces) - Xml.Append(Replace(Replace(Replace(Replace(nodeconceptos.OuterXml, "", drr("PS")) - Next If ProductosCodigoSATNoPermitidos.ToString.Length > 0 Then Dim mensajeAdvertencia As String = String.Format("El comprobante contiene productos con código SAT '01010101', revise los productos:

    {0}", ProductosCodigoSATNoPermitidos.ToString) Alert(mensajeAdvertencia, TipoMensaje.MsgAdvertencia) - End If End If From 9b78041c022fc6d44714f837b588def13fc9c1ed Mon Sep 17 00:00:00 2001 From: rrene Date: Tue, 20 Sep 2022 09:26:36 -0700 Subject: [PATCH 10/28] -- --- App_Code/ClsPaginas.vb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb index 3ac099c3d..51c7abcef 100644 --- a/App_Code/ClsPaginas.vb +++ b/App_Code/ClsPaginas.vb @@ -10101,7 +10101,7 @@ Public Class ClsPaginas 'concepto pago Concepto = String.Format("{0} NC:{1}", VentaActual.ClienteNombre, Pago.Referencia) - If Pago.TipoPago = "A" AndAlso Not ErrorMovtos Then 'A N T I C I P O + If Pago.TipoPago = "A" AndAlso Not ErrorMovtos Then ' A N T I C I P O Dim Ret As New ConceptosRetenciones If Pago.CveMonedaPago > 1 Then 'Agregamos la Extranjera @@ -10117,14 +10117,14 @@ Public Class ClsPaginas End If - If Pago.TipoPago = "NC" AndAlso Not ErrorMovtos Then ' N O T A D E C R E D I T O + If Pago.TipoPago = "NC" AndAlso Not ErrorMovtos Then ' N O T A D E C R E D I T O Dim Ret As New ConceptosRetenciones If Pago.CveMonedaPago > 1 Then 'Agregamos la Extranjera - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Pago.ImportePago, Pago.ImportePago, 91, Pago.Referencia, Concepto, VentaActual.IdCtaContableCliente, CveVenta:=Pago.CveVentaAmortizacion, CveVentaAmortizacion:=VentaActual.CveVenta, CveCliente:=VentaActual.CveCliente, CveIE:=Pago.CveIE, ImporteME:=Pago.ImportePago, TipoCambio:=TCValuacionPago, CveSubProyecto:=VentaActual.CveSubProyecto) Then ErrorMovtos = True + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Pago.ImportePago, Pago.ImportePago, 294, Pago.Referencia, Concepto, VentaActual.IdCtaContableCliente, CveVenta:=Pago.CveVentaAmortizacion, CveVentaAmortizacion:=VentaActual.CveVenta, CveCliente:=VentaActual.CveCliente, CveIE:=Pago.CveIE, ImporteME:=Pago.ImportePago, TipoCambio:=TCValuacionPago, CveSubProyecto:=VentaActual.CveSubProyecto) Then ErrorMovtos = True ImporteMN = (Pago.ImportePago * TCValuacionPago - Pago.ImportePago).RoundSQL - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Pago.ImportePago, ImporteMN, 203, Pago.Referencia, Concepto, VentaActual.IdCtaContableClienteComplementaria, CveVenta:=Pago.CveVentaAmortizacion, CveVentaAmortizacion:=VentaActual.CveVenta, CveCliente:=VentaActual.CveCliente, CveIE:=Pago.CveIE, ImporteME:=Pago.ImportePago, TipoCambio:=TCValuacionPago, CveSubProyecto:=VentaActual.CveSubProyecto) Then ErrorMovtos = True + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Pago.ImportePago, ImporteMN, 207, Pago.Referencia, Concepto, VentaActual.IdCtaContableClienteComplementaria, CveVenta:=Pago.CveVentaAmortizacion, CveVentaAmortizacion:=VentaActual.CveVenta, CveCliente:=VentaActual.CveCliente, CveIE:=Pago.CveIE, ImporteME:=Pago.ImportePago, TipoCambio:=TCValuacionPago, CveSubProyecto:=VentaActual.CveSubProyecto) Then ErrorMovtos = True Else 'Agregamos Nacional If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Pago.ImportePago, Pago.ImportePago, 91, Pago.Referencia, Concepto, VentaActual.IdCtaContableCliente, CveVenta:=Pago.CveVentaAmortizacion, CveVentaAmortizacion:=VentaActual.CveVenta, CveCliente:=VentaActual.CveCliente, CveIE:=Pago.CveIE, CvePersonal:=Pago.CvePersonal) Then ErrorMovtos = True @@ -10133,7 +10133,7 @@ Public Class ClsPaginas End If - If Pago.TipoPago = "I" AndAlso Not ErrorMovtos Then 'I N G R E S O S X C O M P R O B A R + If Pago.TipoPago = "I" AndAlso Not ErrorMovtos Then ' I N G R E S O S X C O M P R O B A R Dim Ret As New ConceptosRetenciones If UsuarioActual.Empresa.TipoContabilidad = 2 Then If ObjConta.GetRetCuenta(66, UsuarioActual.CveEmpresa) AndAlso ObjConta.DtResultados.Rows.Count > 0 Then Ret.IdCtaContableAcreditable = ObjConta.DtResultados.Rows(0)("IdCuentaIEPSAcreditable").ToString.ToEntero From 12ba098e91f569dd4da9468c55a9bec757556c80 Mon Sep 17 00:00:00 2001 From: Oscar Irigoyen Date: Tue, 20 Sep 2022 12:06:41 -0700 Subject: [PATCH 11/28] Compras no deducible, Clientes lineas de adicionales --- App_Code/ClsVentas.vb | 118 +++++++++++++++++ Compras/Compras.aspx.vb | 86 ++++++++----- Contratos/Contrato.aspx.vb | 2 +- Inventarios/Consignaciones.aspx.vb | 7 +- Inventarios/RepAnomalias.aspx.vb | 6 +- Ventas/Clientes.aspx | 195 +++++++++++++++++++++++++++++ Ventas/Clientes.aspx.vb | 182 +++++++++++++++++++++++++++ 7 files changed, 557 insertions(+), 39 deletions(-) diff --git a/App_Code/ClsVentas.vb b/App_Code/ClsVentas.vb index 3f820e8d0..e5ad7c6c9 100644 --- a/App_Code/ClsVentas.vb +++ b/App_Code/ClsVentas.vb @@ -5575,6 +5575,124 @@ Public Class ClsVentas End Function + Public Function GetLineasAdicionales(CveLineaAdicional As Integer, CveCliente As Integer, CveProveedor As Integer, TipoLinea As Integer, CveMoneda As Integer, + FechaI As Date, FechaF As Date, CveEstatus As Integer, CveEmpresa As Integer) As Boolean + + Dim Retorno As Boolean = False + DataAdapter("PA_Vta_LineasAdicionalesGet") + With SqlAdapter.SelectCommand.Parameters + + .Add("@CveLineaAdicional", SqlDbType.Int).Value = CveLineaAdicional + .Add("@CveCliente", SqlDbType.Int).Value = CveCliente + .Add("@CveProveedor", SqlDbType.Int).Value = CveProveedor + .Add("@TipoLinea", SqlDbType.Int).Value = TipoLinea + .Add("@CveMoneda", SqlDbType.Int).Value = CveMoneda + .Add("@FechaI", SqlDbType.Date).Value = FechaI + .Add("@FechaF", SqlDbType.Date).Value = FechaF + .Add("@CveEstatus", SqlDbType.Int).Value = CveEstatus + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + End With + Try + SqlAdapter.Fill(Data) + Retorno = True + Catch ex As Exception + OnError("Ocurrió un error obtener las lineas de adicionales.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + End Try + Return Retorno + + + End Function + + Public Function AddLineasAdicionales(LineaAdicional As String, CveCliente As Integer, CveProveedor As Integer, TipoLinea As Integer, Importe As Decimal, + CveMoneda As Integer, FechaVencimiento As Date, CveUsuario As Integer, CveClasificacionPS As Integer, CveEstatus As Integer) As Boolean + + Dim Retorno As Boolean = False + DataAdapter("PA_Vta_LineasAdicionalesAdd") + With SqlAdapter.SelectCommand.Parameters + + + .Add("@LineaAdicional", SqlDbType.VarChar).Value = LineaAdicional + .Add("@CveCliente", SqlDbType.Int).Value = CveCliente + .Add("@CveProveedor", SqlDbType.Int).Value = CveProveedor + .Add("@TipoLinea", SqlDbType.Int).Value = TipoLinea + .Add("@Importe", SqlDbType.Money).Value = Importe + .Add("@CveMoneda", SqlDbType.Int).Value = CveMoneda + .Add("@FechaVencimiento", SqlDbType.Date).Value = FechaVencimiento + .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario + .Add("@CveClasificacionPS", SqlDbType.Int).Value = CveClasificacionPS + .Add("@CveEstatus", SqlDbType.Int).Value = CveEstatus + + + End With + Try + SqlAdapter.Fill(Data) + Retorno = True + Catch ex As Exception + OnError("Ocurrió un error agregar la linea adicional.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + End Try + Return Retorno + + + End Function + + + Public Function UpdateLineasAdicionales(CveLineaAdicional As Integer, LineaAdicional As String, CveCliente As Integer, CveProveedor As Integer, TipoLinea As Integer, Importe As Decimal, + CveMoneda As Integer, FechaVencimiento As Date, CveUsuario As Integer, CveClasificacionPS As Integer, CveEstatus As Integer, CveEmpresa As Integer, Optional Comprobante As String = "-1") As Boolean + + Dim Retorno As Boolean = False + DataAdapter("PA_Vta_LineasAdicionalesUpdate") + With SqlAdapter.SelectCommand.Parameters + + .Add("@CveLineaAdicional", SqlDbType.Int).Value = CveLineaAdicional + .Add("@LineaAdicional", SqlDbType.VarChar).Value = LineaAdicional + .Add("@CveCliente", SqlDbType.Int).Value = CveCliente + .Add("@CveProveedor", SqlDbType.Int).Value = CveProveedor + .Add("@TipoLinea", SqlDbType.Int).Value = TipoLinea + .Add("@Importe", SqlDbType.Money).Value = Importe + .Add("@CveMoneda", SqlDbType.Int).Value = CveMoneda + .Add("@FechaVencimiento", SqlDbType.Date).Value = FechaVencimiento + .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario + .Add("@CveClasificacionPS", SqlDbType.Int).Value = CveClasificacionPS + .Add("@CveEstatus", SqlDbType.Int).Value = CveEstatus + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + .Add("@Comprobante", SqlDbType.VarChar).Value = Comprobante + + + End With + Try + SqlAdapter.Fill(Data) + Retorno = True + Catch ex As Exception + OnError("Ocurrió un error agregar la linea adicional.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + End Try + Return Retorno + + + End Function + + Public Function RemoveLineasAdicionales(CveLineaAdicional As Integer, CveEmpresa As Integer) As Boolean + + Dim Retorno As Boolean = False + DataAdapter("PA_Vta_LineasAdicionalesRemove") + With SqlAdapter.SelectCommand.Parameters + + .Add("@CveLineaAdicional", SqlDbType.Int).Value = CveLineaAdicional + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + + + End With + Try + SqlAdapter.Fill(Data) + Retorno = True + Catch ex As Exception + OnError("Ocurrió un error eliminar la linea adicional.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + End Try + Return Retorno + + + End Function + + #Region "IDisposable Support" diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb index 6471c5364..a0cccfad0 100644 --- a/Compras/Compras.aspx.vb +++ b/Compras/Compras.aspx.vb @@ -7,6 +7,7 @@ Imports System.IO Imports System.Threading.Tasks Imports System.Xml Imports Extensiones +Imports Microsoft.ReportingServices.DataProcessing Imports Newtonsoft.Json Partial Class Compras_Compras @@ -7318,35 +7319,35 @@ Partial Class Compras_Compras If TxtTotal.Text.ToDouble > 0 AndAlso TieneAnticiposXML = False Then - Dim Pago As New CompraPago - Pago.ImportePago = importeMovimiento - Pago.CveIE = Ant.CveIE - Pago.TCPago = Ant.TCCompra - Pago.CveMonedaPago = If(Ant.TCCompra > 1, 2, 1) - Pago.OtroGastoIngreso = ImporComisionAnticipo + Dim Pago As New CompraPago + Pago.ImportePago = importeMovimiento + Pago.CveIE = Ant.CveIE + Pago.TCPago = Ant.TCCompra + Pago.CveMonedaPago = If(Ant.TCCompra > 1, 2, 1) + Pago.OtroGastoIngreso = ImporComisionAnticipo - ErrorPrepoliza = AplicaPrePolizaPagoCompra(CompraActual, Pago, CvePrePoliza, ObjConta) - - End If + ErrorPrepoliza = AplicaPrePolizaPagoCompra(CompraActual, Pago, CvePrePoliza, ObjConta) End If - '** PRUEBA CUANDO SE AMORTIZA NC ANTES DE QUE SE REGISTRE NO DEBE TENER CONCEPTO 19 ** JM 01/06/2017 SE HIZO ESTO PARA LA FACTURA HRFA-8012831 DE VIGILANCIA - '[IPP] NC NO DEBE REGISTRAR IMPUESTOS EN AMORTIZACIÓN 27/Agosto/2018 - - 'If Not Ant.TipoMovto.Contiene("NC", "DEV") Then - - ' Dim Pago As New CompraPago - ' Pago.ImportePago = importeMovimiento - ' Pago.CveIE = Ant.CveIE - ' Pago.CveMonedaPago = 1 - - ' ErrorPrepoliza = AplicaPrePolizaPago(CompraActual, Pago, ObjConta) - - 'End If - End If + '** PRUEBA CUANDO SE AMORTIZA NC ANTES DE QUE SE REGISTRE NO DEBE TENER CONCEPTO 19 ** JM 01/06/2017 SE HIZO ESTO PARA LA FACTURA HRFA-8012831 DE VIGILANCIA + '[IPP] NC NO DEBE REGISTRAR IMPUESTOS EN AMORTIZACIÓN 27/Agosto/2018 + + 'If Not Ant.TipoMovto.Contiene("NC", "DEV") Then + + ' Dim Pago As New CompraPago + ' Pago.ImportePago = importeMovimiento + ' Pago.CveIE = Ant.CveIE + ' Pago.CveMonedaPago = 1 + + ' ErrorPrepoliza = AplicaPrePolizaPago(CompraActual, Pago, ObjConta) + + 'End If + + End If + If UsuarioActual.CveEmpresa.Contiene(83) Then 'Unificacion de PrePolizas If UsuarioActual.Empresa.Funcionalidad(219) = "1" Then @@ -8567,8 +8568,20 @@ Partial Class Compras_Compras Protected Sub BtnActualizar_Click(sender As Object, e As EventArgs) Handles BtnActualizar.Click + If CveFactura > 0 Then + If Not AjustaCombustibles() Then + Exit Sub + End If + End If + + + 'VALIDA IMPORTES If CveFactura > 0 Then 'SI NO VIENE DE FACTURA/XML NO VALIDA TOTALES + + + + If Not ValidaTotalesGuardar() Then Exit Sub End If @@ -9315,15 +9328,15 @@ Partial Class Compras_Compras End If 'Removemos los conceptos de la prepoliza - ObjConta.RemovePrePolizasDetalle(CvePrePoliza, 6, CveCompra, 1) 'GASTO - ObjConta.RemovePrePolizasDetalle(CvePrePoliza, 68, CveCompra, 1) 'ALMACEN - ObjConta.RemovePrePolizasDetalle(CvePrePoliza, 49, CveCompra, 1) 'AF - ObjConta.RemovePrePolizasDetalle(CvePrePoliza, 205, CveCompra, 1) 'PS YA RECIBIDO - ObjConta.RemovePrePolizasDetalle(CvePrePoliza, 230, CveCompra, 1) 'PS YA RECIBIDO - ObjConta.RemovePrePolizasDetalle(CvePrePoliza, 231, CveCompra, 1) 'PS YA RECIBIDO - ObjConta.RemovePrePolizasDetalle(CvePrePoliza, 176, CveCompra, 1) 'PS NO RECIBIDO - ObjConta.RemovePrePolizasDetalle(CvePrePoliza, 228, CveCompra, 1) 'PS NO RECIBIDO - ObjConta.RemovePrePolizasDetalle(CvePrePoliza, 229, CveCompra, 1) 'PS NO RECIBIDO + If Not ObjConta.RemovePrePolizasDetalle(CvePrePoliza, 6, CveCompra, 1) Then ErrorPrepoliza = True 'GASTO + If Not ObjConta.RemovePrePolizasDetalle(CvePrePoliza, 68, CveCompra, 1) Then ErrorPrepoliza = True 'ALMACEN + If Not ObjConta.RemovePrePolizasDetalle(CvePrePoliza, 49, CveCompra, 1) Then ErrorPrepoliza = True 'AF + If Not ObjConta.RemovePrePolizasDetalle(CvePrePoliza, 205, CveCompra, 1) Then ErrorPrepoliza = True 'PS YA RECIBIDO + If Not ObjConta.RemovePrePolizasDetalle(CvePrePoliza, 230, CveCompra, 1) Then ErrorPrepoliza = True 'PS YA RECIBIDO + If Not ObjConta.RemovePrePolizasDetalle(CvePrePoliza, 231, CveCompra, 1) Then ErrorPrepoliza = True 'PS YA RECIBIDO + If Not ObjConta.RemovePrePolizasDetalle(CvePrePoliza, 176, CveCompra, 1) Then ErrorPrepoliza = True 'PS NO RECIBIDO + If Not ObjConta.RemovePrePolizasDetalle(CvePrePoliza, 228, CveCompra, 1) Then ErrorPrepoliza = True 'PS NO RECIBIDO + If Not ObjConta.RemovePrePolizasDetalle(CvePrePoliza, 229, CveCompra, 1) Then ErrorPrepoliza = True 'PS NO RECIBIDO 'OBTIENE METODO DE CONTABILIZACIÓN AL GUARDAR Dim ConceptoContabilizacionAlmacen = 0 @@ -16163,7 +16176,14 @@ Partial Class Compras_Compras RetIVA = TmpDT.SUM("RetIVA") RetISR = TmpDT.SUM("RetISR") IEPSPS = TmpDT.SUM("IEPSPS") - IVA = If(TmpDT.SUM("IVA") > 0, SubTotalIVA + SubTotalIEPSIVA, 0) + + If CveCompra > 0 AndAlso CveFactura > 0 Then + IVA = TxtIVA.Text.ToDecimal + Else + IVA = If(TmpDT.SUM("IVA") > 0, SubTotalIVA + SubTotalIEPSIVA, 0) + End If + + 'If CalculaIVA Then IVA = TxtIVA.Text.ToDouble Descuentos = TmpDT.SUM("Descuento") diff --git a/Contratos/Contrato.aspx.vb b/Contratos/Contrato.aspx.vb index c4049ee0c..15e7d3ea7 100644 --- a/Contratos/Contrato.aspx.vb +++ b/Contratos/Contrato.aspx.vb @@ -1050,7 +1050,7 @@ Partial Class Contratos_Default TxtFechaInicial.Text = ObjContratos.FechaInicial.ToShortDateString TxtUbicacion.Text = ObjContratos.Ubicacion TxtResponsable.Text = ObjContratos.Responsable - TxtPorAnticipo.Text = ObjContratos.PorAmortizacionAnticipo.FormatoNumero + TxtPorAnticipo.Text = ObjContratos.PorAnticipo.FormatoNumero TxtPorAmortizacionAnticipo.Text = ObjContratos.PorAmortizacionAnticipo.FormatoNumero TxtPorGarantia.Text = ObjContratos.PorGarantia.FormatoNumero 'DdlProyecto.SelectedValue = ObjContratos.CveProyecto.ToString diff --git a/Inventarios/Consignaciones.aspx.vb b/Inventarios/Consignaciones.aspx.vb index b98da3d05..8dabb49f5 100644 --- a/Inventarios/Consignaciones.aspx.vb +++ b/Inventarios/Consignaciones.aspx.vb @@ -956,8 +956,7 @@ Partial Class Inventarios_Consignaciones Dim ObjInventario As New ClsInventarios ObjInventario.IniciaTransacSQL() 'Inicia la transacción - Dim CveMovimiento = 0 - Dim Folio = 0 + Dim ErrorMovInv As Boolean = False Dim TextoError = "" Dim Fecha As Date = TxtFechaDevolucion.Text.ToDate @@ -972,6 +971,10 @@ Partial Class Inventarios_Consignaciones Dim MovtoNew = False For Each Gvr As GridViewRow In GvDatos.Rows + + Dim CveMovimiento = 0 + Dim Folio = 0 + If Gvr.FCTextBox("TxtCantidadDevolucion").Text.ToString.ToDouble > 0 Then If CveAlmacen = -1 Or CveAlmacen <> Gvr.DataKey("CveAlmacen").ToString.ToEntero Then diff --git a/Inventarios/RepAnomalias.aspx.vb b/Inventarios/RepAnomalias.aspx.vb index f45738156..c2947b235 100644 --- a/Inventarios/RepAnomalias.aspx.vb +++ b/Inventarios/RepAnomalias.aspx.vb @@ -244,9 +244,9 @@ Partial Class Inventarios_RepAnomalias ImgExcelProdcutosCoinciden.Visible = True LnkDescarExcelGrupos.Visible = False - If Not String.IsNullOrWhiteSpace(UsuarioActual.Empresa.Funcionalidad(147)) Then GvS.Columns(8).HeaderText = UsuarioActual.Empresa.Funcionalidad(147) - If Not String.IsNullOrWhiteSpace(UsuarioActual.Empresa.Funcionalidad(147)) Then GvF.Columns(8).HeaderText = UsuarioActual.Empresa.Funcionalidad(147) - If Not String.IsNullOrWhiteSpace(UsuarioActual.Empresa.Funcionalidad(147)) Then GvC.Columns(8).HeaderText = UsuarioActual.Empresa.Funcionalidad(147) + 'If Not String.IsNullOrWhiteSpace(UsuarioActual.Empresa.Funcionalidad(147)) Then GvS.Columns(8).HeaderText = UsuarioActual.Empresa.Funcionalidad(147) + 'If Not String.IsNullOrWhiteSpace(UsuarioActual.Empresa.Funcionalidad(147)) Then GvF.Columns(8).HeaderText = UsuarioActual.Empresa.Funcionalidad(147) + 'If Not String.IsNullOrWhiteSpace(UsuarioActual.Empresa.Funcionalidad(147)) Then GvC.Columns(8).HeaderText = UsuarioActual.Empresa.Funcionalidad(147) GvS.DataSource = dt.FiltraParametros("Diferencia > 0") Dim DtS As DataTable = dt.FiltraParametros("Diferencia > 0") diff --git a/Ventas/Clientes.aspx b/Ventas/Clientes.aspx index 221571f13..521cfb842 100644 --- a/Ventas/Clientes.aspx +++ b/Ventas/Clientes.aspx @@ -308,6 +308,17 @@ + + +
  • + +
  • +
    + +
    + + +   @@ -4538,6 +4549,67 @@ + + + + + + + +
    +
    + +
    +
    + " style="display: inline-block; margin-right: -20px; width: 150px;" /> + " style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"> +
    +
    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    +
    +
    +
    +
    + + + @@ -6624,6 +6696,129 @@
    + + + + + + diff --git a/Ventas/Clientes.aspx.vb b/Ventas/Clientes.aspx.vb index 7a7a9a74b..dff5190cb 100644 --- a/Ventas/Clientes.aspx.vb +++ b/Ventas/Clientes.aspx.vb @@ -501,6 +501,22 @@ Partial Class Clientes End Set End Property + Private Property CveLineaAdicional As Integer + Get + If ViewState("CveLineaAdicional") Is Nothing Then + ViewState("CveLineaAdicional") = -1 + End If + + Return ViewState("CveLineaAdicional").ToString.ToEntero + + End Get + Set(value As Integer) + ViewState("CveLineaAdicional") = value + End Set + End Property + + + #End Region #Region "Documentacion" @@ -917,6 +933,18 @@ Partial Class Clientes LtlTareaNueva.Text = String.Format(" Tarea", CveCliente) MostrarTxtDireccionesClienteEnvio() + + + If CveCliente > 0 AndAlso UsuarioActual.CveEmpresa.Contiene(119, 1) Then + CargaCombosLineasAdicionales() + TabLineasAdicionales.Visible = True + LnkAgregarLineaAdicional.Visible = True + GetLineasAdicionales() + + End If + + + End If 'EN SERIO SE OCUPA EN CADA POSTBACK ??? IPP 7 SEPTIEMNRE 2017 @@ -926,6 +954,8 @@ Partial Class Clientes End Sub + + #Region " PERMISOS PAGINAS " Private Sub MostrarTxtDireccionesClienteEnvio() @@ -10308,5 +10338,157 @@ Partial Class Clientes UpDatos.Update() End Sub + + + Private Sub CargaCombosLineasAdicionales() + + If (UsuarioActual.Empresa.Funcionalidad(105) = "1") Then + DdlProveedorLineaAdicionalModal.setEsWebService(True) + DdlProveedorLineaAdicionalModal.Attributes.Add("data-metodo", "getproveedores") + DdlProveedorLineaAdicionalModal.SelectedText = "Todos" + DdlProveedorLineaAdicionalModal.SelectedValue = "-1" + Else + DdlProveedorLineaAdicionalModal.setEsWebService(False) + DdlProveedorLineaAdicionalModal.ddl.DataSource = GlobalDTCompProveedores(UsuarioActual.CveEmpresa) + DdlProveedorLineaAdicionalModal.ddl.DataBind() + DdlProveedorLineaAdicionalModal.ddl.Items.Insert(0, New ListItem("Todos", "-1")) + End If + + + + DdlClasificacionLienaAdicionalModal.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa) + DdlClasificacionLienaAdicionalModal.DataBind() + DdlClasificacionLienaAdicionalModal.Items.Insert(0, New ListItem("Seleccione", "-1")) + + + + End Sub + + Private Sub GetLineasAdicionales() + + Dim ObjVentas As New ClsVentas + + If ObjVentas.GetLineasAdicionales(-1, CveCliente, -1, -1, -1, MinFecha, MaxFecha, -1, UsuarioActual.CveEmpresa) Then + GvLineasAdicionales.DataSource = ObjVentas.DtResultados + End If + + ObjVentas.Dispose() + GvLineasAdicionales.DataBind() + UpLineasAdicionales.Update() + + + End Sub + + Protected Sub LnkAgregarLineaAdicional_Click(sender As Object, e As EventArgs) + CveLineaAdicional = -1 + RegistraScript("$('#DVLineasAdicionales').modal('show')") + LtlLineasAdicionalesTotuloModal.Text = "Agregar Linea Adicional" + AgregarLineaAdicionalLimpiarControles() + UpLineaAdicionalmodal.Update() + End Sub + + Private Sub AgregarLineaAdicionalLimpiarControles() + + TxtLineaAdicionalModal.Text = "" + DdlProveedorLineaAdicionalModal.txtText.Value = "" + DdlProveedorLineaAdicionalModal.txtValue.Value = "" + DdlTipoLineaAdicionalModal.SelectedValueExist(-1) + TxtFechaVencimientoLineaAdicionalModal.Text = "" + DdlClasificacionLienaAdicionalModal.SelectedValueExist(-1) + TxtImporteLineaAdicionalModal.Text = "" + DdlMonedaLineAdicionalModal.SelectedValueExist(-1) + + UpLineaAdicionalmodal.Update() + + End Sub + + Protected Sub LnkAgregarLineaAdicionalModal_Click(sender As Object, e As EventArgs) + Dim ErrorAgregar As Boolean = False + + If DdlProveedorLineaAdicionalModal.SelectedValue.ToEntero <= 0 Then + Alert("El proveedor es requerido", TipoMensaje.MsgAdvertencia) + Exit Sub + End If + + + Dim ObjVentas As New ClsVentas + + + If CveLineaAdicional > 0 Then + If Not ObjVentas.UpdateLineasAdicionales(CveLineaAdicional, TxtLineaAdicionalModal.Text, CveCliente, DdlProveedorLineaAdicionalModal.SelectedValue.ToEntero, DdlTipoLineaAdicionalModal.SelectedValue.ToEntero, TxtImporteLineaAdicionalModal.Text.ToDecimal, + DdlMonedaLineAdicionalModal.SelectedValue.ToEntero, TxtFechaVencimientoLineaAdicionalModal.Text.ToDate, UsuarioActual.CveUsuario, DdlClasificacionLienaAdicionalModal.SelectedValue.ToEntero, 0, UsuarioActual.CveEmpresa) Then + ErrorAgregar = True + Else + Alert("Linea Adicional Actualizada Correctamente") + End If + Else + If Not ObjVentas.AddLineasAdicionales(TxtLineaAdicionalModal.Text, CveCliente, DdlProveedorLineaAdicionalModal.SelectedValue.ToEntero, DdlTipoLineaAdicionalModal.SelectedValue.ToEntero, TxtImporteLineaAdicionalModal.Text.ToDecimal, + DdlMonedaLineAdicionalModal.SelectedValue.ToEntero, TxtFechaVencimientoLineaAdicionalModal.Text.ToDate, UsuarioActual.CveUsuario, DdlClasificacionLienaAdicionalModal.SelectedValue.ToEntero, 0) Then + ErrorAgregar = True + Else + Alert("Linea Adicional Agregada Correctamente") + End If + End If + + ObjVentas.Dispose() + + If Not ErrorAgregar Then + RegistraScript("$('#DVLineasAdicionales').modal('hide')") + GetLineasAdicionales() + End If + + End Sub + + Protected Sub LnkEditarLineaAdicional_Click(sender As Object, e As EventArgs) + + LtlLineasAdicionalesTotuloModal.Text = "Editar Linea Adicional" + Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow) + Dim ErrorEdicion As Boolean = False + + CveLineaAdicional = GvRow.DataKey("CveLineaAdicional").ToEntero + + TxtLineaAdicionalModal.Text = GvRow.DataKey("LineaAdicional") + DdlProveedorLineaAdicionalModal.txtText.Value = GvRow.DataKey("Proveedor") + DdlProveedorLineaAdicionalModal.txtValue.Value = GvRow.DataKey("CveProveedor") + DdlTipoLineaAdicionalModal.SelectedValueExist(GvRow.DataKey("TipoLinea").ToEntero) + TxtFechaVencimientoLineaAdicionalModal.Text = GvRow.DataKey("FechaVencimiento").ToDate.ToString("dd/MM/yyyy") + DdlClasificacionLienaAdicionalModal.SelectedValueExist(GvRow.DataKey("CveClasificacionPS").ToEntero) + TxtImporteLineaAdicionalModal.Text = GvRow.DataKey("Importe").ToDecimal.ToString("###,###,###.00") + DdlMonedaLineAdicionalModal.SelectedValueExist(GvRow.DataKey("CveMoneda").ToEntero) + + RegistraScript("$('#DVLineasAdicionales').modal('show')") + + UpLineaAdicionalmodal.Update() + + End Sub + + + + Protected Sub LnkEliminarLineaAdicional_Click(sender As Object, e As EventArgs) + Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow) + Dim CveLineaAdicionalEliminar = GvRow.DataKey("CveLineaAdicional").ToEntero + Dim ErrorEliminacion As Boolean = False + + Dim ObjVentas As New ClsVentas + + If Not ObjVentas.RemoveLineasAdicionales(CveLineaAdicionalEliminar, UsuarioActual.CveEmpresa) Then + ErrorEliminacion = True + Else + Alert("Linea Adicional Eliminada Correctamente") + End If + + ObjVentas.Dispose() + + If Not ErrorEliminacion Then + GetLineasAdicionales() + End If + + End Sub + + + + + + End Class From 8a601da15042252a083d04eb77d54688bf0e7348 Mon Sep 17 00:00:00 2001 From: rrene Date: Tue, 20 Sep 2022 16:58:32 -0700 Subject: [PATCH 12/28] -- htmldoce en xml. y caracteres especiales --- Compras/Compras.aspx.vb | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb index 5b1539e65..95498367e 100644 --- a/Compras/Compras.aspx.vb +++ b/Compras/Compras.aspx.vb @@ -1782,7 +1782,7 @@ Partial Class Compras_Compras CargaComprobanteXML(XMLDoc) If NuevaValidacionXML = 1 Or (Version = "3.3" Or Version = "4.0") Then - Dim Xml As New StringBuilder + Dim Xml As String Dim nodo As XmlNode = XMLDoc.DocumentElement Dim Version = ValorXML(nodo, "version") @@ -1810,10 +1810,17 @@ Partial Class Compras_Compras namespaces.AddNamespace("registrofiscal", "http://www.sat.gob.mx/registrofiscal") Dim nodeconceptos As XmlNode = XMLDoc.SelectSingleNode(String.Format("//{0}:Conceptos", Prefijo), namespaces) + Xml = Replace(nodeconceptos.OuterXml, " Date: Tue, 20 Sep 2022 16:58:46 -0700 Subject: [PATCH 13/28] - cvepersonal, en comprobaciones5 --- Compras/ReembolsosComprobaciones.aspx.vb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Compras/ReembolsosComprobaciones.aspx.vb b/Compras/ReembolsosComprobaciones.aspx.vb index 3bcb32ef6..914246a36 100644 --- a/Compras/ReembolsosComprobaciones.aspx.vb +++ b/Compras/ReembolsosComprobaciones.aspx.vb @@ -736,6 +736,7 @@ Partial Class Compras_ReembolsosComprobaciones Pago.CveIE = CveIEPago Pago.CveMonedaPago = CveMonedaPago Pago.TCPago = TipoCambioPago + Pago.CvePersonal =CvePersonal 'Otros Ingresos If MsgError = "" AndAlso (ChkAjusteOI.Checked Or ChkOtrosIngresosCheque.Checked) AndAlso gvr.FCTextBox("TxtComision").Text.ToDecimal <> 0 Then @@ -808,7 +809,7 @@ Partial Class Compras_ReembolsosComprobaciones Pago.ImportePago = ImporteMovto Pago.CveIE = CveIEExcedente Pago.CveMonedaPago = CveMoneda - + Pago.CvePersonal = CvePersonal If Not ObjMov.AddPrePolizasDetalle(CvePrePolizaExcedente, True, ImporteMovto, Referencia, 30, ConceptoMovimiento, gvr.FCLiteral("LtlFecha").Text.ToDate, IdCuentaBancaria, -1, CveIE:=CveIEExcedente, CveCompra:=gvr.FCHyperLink("HplF2").Text.ToEntero, CveProveedor:=gvr.FCHyperLink("HLProv").Text.ToEntero, ImporteME:=If(tipoCambio = 1, 0, ImporteMovto), ImporteMX:=ImporteMovto * tipoCambio, CveCuenta:=CveCuentaBancaria) Then MsgError = "no se pudo insertar el detalle de la poliza" From f36027d3def1bafbc7fbafec9a48e2756769612b Mon Sep 17 00:00:00 2001 From: rrene Date: Tue, 20 Sep 2022 16:58:52 -0700 Subject: [PATCH 14/28] -- concepto de gasto --- Contabilidad/RegPrePolizaS.aspx.vb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Contabilidad/RegPrePolizaS.aspx.vb b/Contabilidad/RegPrePolizaS.aspx.vb index 2b6a245a2..1e0a49b93 100644 --- a/Contabilidad/RegPrePolizaS.aspx.vb +++ b/Contabilidad/RegPrePolizaS.aspx.vb @@ -1660,7 +1660,7 @@ Partial Class ContabilidadC_RegPrePolizaS End If End If - If AplicaBancos Then + If AplicaBancos AndAlso Not AplicaComplementaria Then If DdlModalConceptoTipoTransaccion.SelectedValue.ToEntero <= 0 Then Alert("seleccione las opciones de bancos ") Retorno = False From e0b8968264f1ecf194c262e41019fcaee4df6be2 Mon Sep 17 00:00:00 2001 From: rrene Date: Tue, 20 Sep 2022 16:59:00 -0700 Subject: [PATCH 15/28] - --- Contabilidad2/CatCuentasAsignaciones.aspx.vb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Contabilidad2/CatCuentasAsignaciones.aspx.vb b/Contabilidad2/CatCuentasAsignaciones.aspx.vb index 083e76f5e..3e26bae19 100644 --- a/Contabilidad2/CatCuentasAsignaciones.aspx.vb +++ b/Contabilidad2/CatCuentasAsignaciones.aspx.vb @@ -205,9 +205,10 @@ Partial Class Contabilidad2_CatCuentasAsignaciones If CveConceptoContable = 51 Then divTipoGasto.Visible = True + DdlTipoGasto.Items.Clear() DdlTipoGasto.DataSource = GlobalDTTiposGastos(UsuarioActual.CveEmpresa) DdlTipoGasto.DataBind() - ' DdlActivoFijo.SelectedValueExist(GvRow.DataKey("CveActivoFijo")) + DdlTipoGasto.Items.Add(New ListItem("-", "-1")) End If If Dr("CveTipoSaldo").ToString = "1" Then divRegeneraCuenta.Visible = True From dcbff66a3be4cf5101c11079980e3f9af39bd5e2 Mon Sep 17 00:00:00 2001 From: Oscar Irigoyen Date: Tue, 20 Sep 2022 18:33:53 -0700 Subject: [PATCH 16/28] RepLienasAdicionales --- App_Code/ClsPaginas.vb | 3 + Compras/Compras.aspx.vb | 2 +- Ventas/Clientes.aspx | 89 ++++++---- Ventas/Clientes.aspx.vb | 18 +- Ventas/RepLineasAdicionales.aspx | 208 +++++++++++++++++++++++ Ventas/RepLineasAdicionales.aspx.cs | 254 ++++++++++++++++++++++++++++ 6 files changed, 529 insertions(+), 45 deletions(-) create mode 100644 Ventas/RepLineasAdicionales.aspx create mode 100644 Ventas/RepLineasAdicionales.aspx.cs diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb index 51c7abcef..7a15cb5e1 100644 --- a/App_Code/ClsPaginas.vb +++ b/App_Code/ClsPaginas.vb @@ -5663,6 +5663,9 @@ Public Class ClsPaginas PaginaDict.Add("/Acumuladores/RepPolizasVirtuales.aspx".ToUpper(), 1322) + PaginaDict.Add("/Ventas/RepLineasAdicionales.aspx".ToUpper(), -1) + PaginaDict.Add("/Ventas/RepLineasAdicionales.aspx?OP=LI".ToUpper(), -1) + PaginaDict.Add("/Ventas/RepLineasAdicionales.aspx?OP=OP".ToUpper(), -1) 'Antes de aquí. diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb index 52b2f120a..40961615d 100644 --- a/Compras/Compras.aspx.vb +++ b/Compras/Compras.aspx.vb @@ -6133,7 +6133,7 @@ Partial Class Compras_Compras ConceptoContable = 333 End If - importeMovimiento = CompraActual.retiva + importeMovimiento = CompraActual.RetIVA importeMN = (importeMovimiento * tipoCambioActual * Multiplicador).RoundSQL If tipoCambioActual > 1 Then Concepto += $" TC{tipoCambioActual} ${importeMovimiento.FormatoNumero(2)}" diff --git a/Ventas/Clientes.aspx b/Ventas/Clientes.aspx index 521cfb842..f33de6445 100644 --- a/Ventas/Clientes.aspx +++ b/Ventas/Clientes.aspx @@ -4585,7 +4585,7 @@ - + @@ -6723,8 +6723,8 @@
    -
    - +
    +
    @@ -6732,7 +6732,7 @@
    - + @@ -6741,61 +6741,76 @@
    -
    - - +
    +
    +
    +
    + + + + -
    - +
    +
    +
    - - - - -
    - -
    - - - - - - - +
    + + + + + + + +
    +
    -
    - -
    - - - - + + + + + +
    +
    + +
    + + + + +
    + + +
    +
    + + +
    +
    -
    +
    - + <%----%>
    diff --git a/Ventas/Clientes.aspx.vb b/Ventas/Clientes.aspx.vb index dff5190cb..46b242070 100644 --- a/Ventas/Clientes.aspx.vb +++ b/Ventas/Clientes.aspx.vb @@ -10345,20 +10345,24 @@ Partial Class Clientes If (UsuarioActual.Empresa.Funcionalidad(105) = "1") Then DdlProveedorLineaAdicionalModal.setEsWebService(True) DdlProveedorLineaAdicionalModal.Attributes.Add("data-metodo", "getproveedores") - DdlProveedorLineaAdicionalModal.SelectedText = "Todos" + DdlProveedorLineaAdicionalModal.SelectedText = "-" DdlProveedorLineaAdicionalModal.SelectedValue = "-1" + DdlProveedorLineaAdicionalModal.txtText.Value = "-" + DdlProveedorLineaAdicionalModal.txtValue.Value = "-1" + + Else DdlProveedorLineaAdicionalModal.setEsWebService(False) DdlProveedorLineaAdicionalModal.ddl.DataSource = GlobalDTCompProveedores(UsuarioActual.CveEmpresa) DdlProveedorLineaAdicionalModal.ddl.DataBind() - DdlProveedorLineaAdicionalModal.ddl.Items.Insert(0, New ListItem("Todos", "-1")) + DdlProveedorLineaAdicionalModal.ddl.Items.Insert(0, New ListItem("-", "-1")) End If DdlClasificacionLienaAdicionalModal.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa) DdlClasificacionLienaAdicionalModal.DataBind() - DdlClasificacionLienaAdicionalModal.Items.Insert(0, New ListItem("Seleccione", "-1")) + DdlClasificacionLienaAdicionalModal.Items.Insert(0, New ListItem("-", "-1")) @@ -10405,10 +10409,10 @@ Partial Class Clientes Protected Sub LnkAgregarLineaAdicionalModal_Click(sender As Object, e As EventArgs) Dim ErrorAgregar As Boolean = False - If DdlProveedorLineaAdicionalModal.SelectedValue.ToEntero <= 0 Then - Alert("El proveedor es requerido", TipoMensaje.MsgAdvertencia) - Exit Sub - End If + 'If DdlProveedorLineaAdicionalModal.SelectedValue.ToEntero <= 0 Then + ' Alert("El proveedor es requerido", TipoMensaje.MsgAdvertencia) + ' Exit Sub + 'End If Dim ObjVentas As New ClsVentas diff --git a/Ventas/RepLineasAdicionales.aspx b/Ventas/RepLineasAdicionales.aspx new file mode 100644 index 000000000..099f0709d --- /dev/null +++ b/Ventas/RepLineasAdicionales.aspx @@ -0,0 +1,208 @@ +<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="RepLineasAdicionales.aspx.cs" Inherits="Ventas_RepLineasAdicionales" %> + + + + + + + + + + + + + + + + + + +
  • + Excel +
  • +
    + + + +
    + +
    + + + + + + +
    +
    +
    + + +
    +
    +
    + +
    Proveedor:
    +
    + +
    + +
    Cliente:
    +
    + +
    + +
    Fecha Inicio:
    +
    +
    + + + + +
    + + + + + + +
    +
    Fecha Fin:
    +
    +
    + + + + +
    + + + + + + +
    + +
    +
    +
    + +
    +
    +
    + + + + +
    +
    + +
    +
    + " style="display: inline-block; margin-right: -20px; width: 150px;" /> + " style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"> +
    +
    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    +
    +
    + + + + + <%-- MODAL COMPROBANTE --%> + + <%-- FIN MODAL COMPROBANTE --%> + + + + + + +
    + + + + + + diff --git a/Ventas/RepLineasAdicionales.aspx.cs b/Ventas/RepLineasAdicionales.aspx.cs new file mode 100644 index 000000000..51f634d90 --- /dev/null +++ b/Ventas/RepLineasAdicionales.aspx.cs @@ -0,0 +1,254 @@ +using System; using System.Web.UI.WebControls; using Extensiones; using System.Data; using static Extensiones.ModExtensiones; +using System.Collections.Generic; +using System.IO; +using ListItem = System.Web.UI.WebControls.ListItem; + +public partial class Ventas_RepLineasAdicionales : ClsPaginas +{ + #region PROPIEDADES + + private int CveLineaAdicional + { + get { return (ViewState["CveLineaAdicional"] == null) ? 0 : int.Parse(ViewState["CveLineaAdicional"].ToString()); } + set { ViewState["CveLineaAdicional"] =(int) value; } + } + + private string Comprobante + { + get { + + if(ViewState["Comprobante"] == null) + { + ViewState["Comprobante"] = ""; + } + + return ViewState["Comprobante"].ToString(); + } + set { ViewState["Comprobante"] = value; } + } + + #endregion + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + InicializaValores(); + } + } + + private void InicializaValores() + { + + if (Request["OP"] != null && Request["OP"].ToString() == "PO") + { + DVProveedor1.Visible = true; + DVProveedor2.Visible = true; + GvLineasAdicionales.Columns[9].Visible = true; + } + + //Carga Clientes + DdlClientes.DataSource = get_GlobalDTCliente(UsuarioActual.CveEmpresa, -1); + DdlClientes.DataBind(); + + + + if(UsuarioActual.Empresa.Funcionalidad(105) == "1") { + DdlProveedor.setEsWebService(true); + DdlProveedor.Attributes.Add("data-metodo", "getproveedores"); + DdlProveedor.SelectedText = "Todos"; + DdlProveedor.SelectedValue = "-1"; + + + + }else { + DdlProveedor.setEsWebService(false); + DdlProveedor.ddl.DataSource = get_GlobalDTCompProveedores(UsuarioActual.CveEmpresa); + DdlProveedor.ddl.DataBind(); + DdlProveedor.ddl.Items.Insert(0, new ListItem("-", "-1")); + } + + DdlClientes.setEsWebService(true); + DdlClientes.Attributes.Add("data-metodo", "getcliente"); + DdlClientes.SelectedText = "Todos"; + DdlClientes.SelectedValue = "-1"; + + txtFechaI.Text = DateTime.Now.FirstDayOfMonth().ToShortDateString(); + txtFechaF.Text = DateTime.Now.ToShortDateString(); + + } + + + protected void BtnConsultar_Click(object sender, EventArgs e) + { + CargaDatos(); + } + + private void CargaDatos() + { + LnkDescargaExcel.Visible = false; + + ClsVentas objVentas = new ClsVentas(); + + int CveProveedor = DdlProveedor.SelectedValue.ToEntero() > 0 ? DdlProveedor.SelectedValue.ToEntero() : -1; + + if(objVentas.GetLineasAdicionales(-1,DdlClientes.SelectedValue.ToEntero(),CveProveedor,-1,-1,txtFechaI.Text.ToDate(), txtFechaF.Text.ToDate(), -1, UsuarioActual.CveEmpresa)){ + GvLineasAdicionales.DataSource = objVentas.DtResultados; + + if( objVentas.DtResultados.Rows.Count > 0) + { + LnkDescargaExcel.Visible = true; + UpAcciones.Update(); + } + } + else + { + GvLineasAdicionales.DataSource = null; + } + + objVentas.Dispose(); + + GvLineasAdicionales.DataBind(); + UpLineasAdicionales.Update(); + } + + + protected void LnkCargarComprobante_Click(object sender, EventArgs e) + { + GridViewRow GvRow = (GridViewRow) ((LinkButton) sender).NamingContainer; + + CveLineaAdicional = GvRow.DataKey("CveLineaAdicional").ToString().ToEntero(); + Comprobante = GvRow.DataKey("Comprobante").ToString(); + + RegistraScript("$('#ModalComprobante').modal('show');",""); + } + + protected void BtnAddComprobante_Click(object sender, EventArgs e) + { + bool errorCargaComprobante = false; + string FileExtension = "-1"; + List filesgral = Anexo.getfiles().Archivos; + string filemove = ""; + FileInfo fiNuevo; + + DirectoryInfo df = new DirectoryInfo($@"{UsuarioActual.Empresa.Ruta}\LineasAdicionales\"); + + + //Crea directorio si no existe + if (!df.Exists) + { + try + { + Directory.CreateDirectory(df.FullName); + } + catch + { + errorCargaComprobante = true; + } + } + + //borrar archivo anterior + if((!errorCargaComprobante) && Comprobante.Length > 0) + { + FileInfo fiAnterior = new FileInfo($@"{df.FullName}{Comprobante}"); + if (fiAnterior.Exists) + { + try + { + File.Delete(fiAnterior.FullName); + } + catch + { + errorCargaComprobante = true; + } + } + } + + if(!errorCargaComprobante){ + + string RutaArchivoTemp = ""; + foreach (Archivo fileItem in filesgral) + { + FileExtension = System.IO.Path.GetExtension(string.Format(@"{0}Temp\{1}", AppDomain.CurrentDomain.BaseDirectory, fileItem.filename)).Replace(".", ""); + filemove = fileItem.filename; + RutaArchivoTemp = $@"{AppDomain.CurrentDomain.BaseDirectory}\Temp\{fileItem.filename}"; + + break; + } + + if((!errorCargaComprobante) && RutaArchivoTemp.Length > 0) + { + fiNuevo = new FileInfo(RutaArchivoTemp); + + if (fiNuevo.Exists) + { + try + { + + if (File.Exists($@"{df.FullName}\{CveLineaAdicional}{fiNuevo.Extension}")) + { + File.Delete($@"{df.FullName}\{CveLineaAdicional}{fiNuevo.Extension}"); + } + + File.Move(fiNuevo.FullName, $@"{df.FullName}\{CveLineaAdicional}{fiNuevo.Extension}"); + errorCargaComprobante = false; + } + catch + { + errorCargaComprobante = true; + } + + if (!errorCargaComprobante) + { + ClsVentas objVentas = new ClsVentas(); + if (!objVentas.UpdateLineasAdicionales(CveLineaAdicional, "-1", -1, -1, -1, -1, -1, MinFecha, 100, -1, -1, UsuarioActual.CveEmpresa, Comprobante: $@"{CveLineaAdicional}{fiNuevo.Extension}")) + { + errorCargaComprobante = true; + } + objVentas.Dispose(); + } + } + } + + } + + + if (!errorCargaComprobante) + { + CargaDatos(); + Anexo.Text = "[]"; + RegistraScript("$('#ModalComprobante').modal('hide');", ""); + Alert("Comprbante actualizado correctamente."); + } + + UpAddComprobancte.Update(); + } + + protected void LnkCambiarEstatus_Click(object sender, EventArgs e) + { + GridViewRow GvRow = (GridViewRow)((LinkButton)sender).NamingContainer; + int CveLineaAdicionalActualzarEstatus = GvRow.DataKey("CveLineaAdicional").ToString().ToEntero(); + bool errorCambioEstatus = false; + + ClsVentas objVentas = new ClsVentas(); + + if (!objVentas.UpdateLineasAdicionales(CveLineaAdicionalActualzarEstatus, "-1", -1, -1, -1, -1, -1, MinFecha, 100, -1, 3, UsuarioActual.CveEmpresa)) + { + errorCambioEstatus = true; + } + + if (!errorCambioEstatus) + { + CargaDatos(); + } + + objVentas.Dispose(); + } + + + protected void LnkDescargaExcel_Click(object sender, EventArgs e) + { + GvLineasAdicionales.ExportToExcel2("RepLineas"); + } + + +} \ No newline at end of file From f9377a751f3278210ecd810c5470ba390e7e4dcc Mon Sep 17 00:00:00 2001 From: rrene Date: Wed, 21 Sep 2022 10:03:26 -0700 Subject: [PATCH 17/28] -- manejo de caracteres especiales --- Compras/Compras.aspx.vb | 1 + 1 file changed, 1 insertion(+) diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb index 2dbd7800f..61f2e8b7f 100644 --- a/Compras/Compras.aspx.vb +++ b/Compras/Compras.aspx.vb @@ -1819,6 +1819,7 @@ Partial Class Compras_Compras Xml = System.Web.HttpUtility.HtmlDecode(Xml.ToString) Xml = Xml.Replace(Chr(13), "") 'salto de linea Xml = Xml.Replace(Chr(10), "") + Xml = Xml.Replace("
    ", "") 'adicional, si hay otros Xml = Xml.Replace("&", "") 'adicional, si hay otros If ObjeFacturas.GetFacturasComparacionXML(Version, Xml, UsuarioActual.CveEmpresa) Then From 84cfd6afbb275f3ba5e3dbeee53be302b991cb17 Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Wed, 21 Sep 2022 12:18:12 -0700 Subject: [PATCH 18/28] Autogenerar cuenta de proveedor, cuando el global es tipo 2 --- App_Code/ClsContabilidad.vb | 6 ++++++ Contabilidad2/CatCuentasAsignaciones.aspx | 1 + 2 files changed, 7 insertions(+) diff --git a/App_Code/ClsContabilidad.vb b/App_Code/ClsContabilidad.vb index 2e545adf1..52e092126 100644 --- a/App_Code/ClsContabilidad.vb +++ b/App_Code/ClsContabilidad.vb @@ -1000,6 +1000,12 @@ Public Class ClsContabilidad ElseIf ex1.Message.Contains("UK_Vw_Val_Conta_CuentasResultados_SubProyectos") Then Dim Concepto3 As String = DirectCast(HttpContext.Current.Application("GlobalDTContaConceptosContables"), DataTable).FiltroPrimeroValor("ConceptoContable", String.Format("CveConceptoContable = {0}", CveConceptoContable)) OnError(String.Format("El concepto '{0}' requiere centro de costo", Concepto3), ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + ElseIf ex1.Message.Contains("50025;") Then + OnError("La empresa no tiene un formato de cuenta asignado.", ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + ElseIf ex1.Message.Contains("50026;") Then + OnError("El proveedor ya tiene asignada una cuenta.", ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + ElseIf ex1.Message.Contains("50027;") Then + OnError("No se pudo asignar la cuenta al proveedor.", ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) Else OnError("Ocurrió un error al Guardar", ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) End If ' diff --git a/Contabilidad2/CatCuentasAsignaciones.aspx b/Contabilidad2/CatCuentasAsignaciones.aspx index da44a42c5..5018a16cf 100644 --- a/Contabilidad2/CatCuentasAsignaciones.aspx +++ b/Contabilidad2/CatCuentasAsignaciones.aspx @@ -235,6 +235,7 @@
    +
    From 40b745c6147707891010aec155f7f5d7532c942f Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Wed, 21 Sep 2022 14:00:53 -0700 Subject: [PATCH 19/28] Factura E32 --- Empresas/32/Formatos/Factura.rdlc | 9196 +++++++++++++++-------------- 1 file changed, 4910 insertions(+), 4286 deletions(-) diff --git a/Empresas/32/Formatos/Factura.rdlc b/Empresas/32/Formatos/Factura.rdlc index 3bab794d6..a82a05f52 100644 --- a/Empresas/32/Formatos/Factura.rdlc +++ b/Empresas/32/Formatos/Factura.rdlc @@ -1,4287 +1,4911 @@ - - - - - - true - - - - - Tipo - - - - - - - Textbox3 - 0.90692in - 5.662in - 0.5cm - 2.24597in - - - #686868 - 2pt - 2pt - 2pt - 2pt - - - - true - - - - - Fecha y hora de emisión - - - - - - - - - - - - - - - - Textbox3 - 0.46414in - 5.662in - 0.5cm - 2.24597in - 1 - - - #686868 - 2pt - 2pt - 2pt - 2pt - - - - true - - - - - =IIF(Parameters!Serie.Value.ToString="",Parameters!Folio.Value,Parameters!Serie.Value & "-" &Parameters!Folio.Value) - - - - - - - Textbox3 - 0.22455in - 5.662in - 0.60856cm - 2.24597in - 2 - - - 2pt - 2pt - 2pt - 2pt - - - - true - - - - - =Parameters!TipoDocumento.Value - - - - - - - Textbox3 - 0.0412cm - 5.662in - 0.5cm - 2.24597in - 3 - - - #686868 - 2pt - 2pt - 2pt - 2pt - - - - true - - - - - Rosa Amada Ozuna Laborin - - - - - - - - - R.F.C. OULR780610S27 - - - - 0cm - 0cm - - - - Textbox4 - 1.93416in - 0.50583in - 3.62386in - 4 - - - 2pt - 2pt - 2pt - 2pt - - - - true - - - - - SON: ( - - - - =Microsoft.VisualBasic.Strings.UCase(Parameters!ImporteLetra.Value) - - - - ) - - - - - - - ImporteLetra - 2.57737in - 1.40437in - 0.2053in - 4.28167in - 5 - - - 2pt - 2pt - 2pt - 2pt - - - - true - - - - - =Parameters!SelloCFDI.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - - - - - =Parameters!SelloSAT.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - - - - - =Parameters!CadenaOriginal.Value - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - External - =Parameters!QR.Value - FitProportional - 5.15805in - 0.04026in - 1.3497in - 1.5531in - 9 - - - - - - true - - - - - =Parameters!Fecha.Value - - - - - - - Textbox3 - 0.66099in - 5.662in - 0.25114in - 2.24597in - 10 - - - 2pt - 2pt - 2pt - 2pt - - - - true - - - - - =Parameters!Tipo.Value & Parameters!Ref.Value - - - - - - - Textbox3 - 1.10364in - 5.662in - 0.25635in - 2.24597in - 11 - - - 2pt - 2pt - 2pt - 2pt - - - - true - - - - - Domicilio Fiscal - - - - - - - - - Cerrada Rosales, #81, - - - - 0cm - 0cm - - - - - - Col. Rosales, C.P. 83288 - - - - 0cm - 0cm - - - - - - Hermosillo, Sonora, México. - - - - 0cm - 0cm - - - - Textbox10 - 0.51102in - 1.93416in - 0.65513in - 1.79619in - 12 - - - 2pt - 2pt - 2pt - 2pt - - - - true - - - - - Lugar de Expedición - - - - - - - - - =Parameters!DomicilioSucursal.Value - - - - - - - Textbox10 - 0.51102in - 3.77202in - 0.65513in - 1.786in - 13 - - - Top - - - - true - true - - - - - Nombre - - - - - - - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - - - - - =Parameters!ClienteNombre.Value - - - - - - - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Dirección - - - - - - - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - - - - - =Parameters!ClienteDireccion.Value - - - - - - - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Cuidad - - - - - - - - 1.25pt - - 2pt - 2pt - 2pt - 2pt - - - - true - - - - - =Parameters!ClienteLugar.Value - - - - - - - - - - - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - - - - - Sub Total 1 - - - - - - - Textbox19 - 2.34473in - 5.68604in - 0.21875in - 0.99552in - 20 - - - - White - - 1pt - - #686868 - 2pt - 2pt - 2pt - 2pt - - - - true - - - - - Descuento - - - - - - - Textbox19 - 2.56348in - 5.68499in - 0.21875in - 0.99552in - 21 - - - - White - - 1pt - - #686868 - 2pt - 2pt - 2pt - 2pt - - - - true - - - - - Amort. Ant - - - - - - - Textbox19 - 2.78223in - 5.68604in - 0.20535in - 0.99552in - 22 - - - - White - - 1pt - - #686868 - 2pt - 2pt - 2pt - 2pt - - - - true - - - - - Sub Total 2 - - - - - - - Textbox19 - 2.98758in - 5.68604in - 0.23803in - 0.99552in - 23 - - - - White - - 1pt - - #686868 - 2pt - 2pt - 2pt - 2pt - - - - true - - - - - IVA (16%) - - - - - - - Textbox19 - 3.2395in - 5.68499in - 0.21875in - 0.99552in - 24 - - - - White - - 1pt - - #686868 - 2pt - 2pt - 2pt - 2pt - - - - true - - - - - Ret. IVA - - - - - - - Textbox19 - 3.45825in - 5.68499in - 0.21875in - 0.99552in - 25 - - - - White - - 1pt - - #686868 - 2pt - 2pt - 2pt - 2pt - - - - true - - - - - =IIF(Parameters!SubTotal.Value= 0 ,"-",Parameters!SubTotal.Value) - - - - - - - Textbox42 - 2.34473in - 6.68156in - 0.21875in - 1.24179in - 26 - - - 2pt - 2pt - 2pt - 2pt - es-MX - - - - true - - - - - =IIF(Parameters!Amortizacion.Value = 0,"-",Parameters!Amortizacion.Value) - - - - - - - Textbox42 - 2.78272in - 6.6805in - 0.20535in - 1.24179in - 27 - - - 2pt - 2pt - 2pt - 2pt - es-MX - - - - true - - - - - =iif(Parameters!Descuento.Value= 0, "-",Parameters!Descuento.Value) - - - - - - - Textbox42 - 2.56392in - 6.6805in - 0.21875in - 1.24179in - 28 - - - 2pt - 2pt - 2pt - 2pt - es-MX - - - - true - - - - - =IIF(Parameters!SubTotal2.Value = 0,"-",Parameters!SubTotal2.Value) - - - - - - - Textbox42 - 2.98758in - 6.68156in - 0.23803in - 1.24179in - 29 - - - 2pt - 2pt - 2pt - 2pt - es-MX - - - - true - - - - - =iif(Parameters!IVA.Value = 0,"-",Parameters!IVA.Value) - - - - - - - Textbox42 - 3.22561in - 6.68156in - 0.21875in - 1.24179in - 30 - - - 2pt - 2pt - 2pt - 2pt - es-MX - - - - true - - - - - =Parameters!RetIVA.Value - - - - - - - Textbox42 - 3.44436in - 6.68156in - 0.21875in - 1.24179in - 31 - - - 2pt - 2pt - 2pt - 2pt - - - - true - - - - - Importe con letra: - - - - - - - Textbox19 - 2.57737in - 0.04458in - 0.2053in - 1.35979in - 32 - - - #686868 - 2pt - 2pt - 2pt - 2pt - - - - true - - - - - Forma de pago: - - - - - - - Textbox19 - 2.78272in - 0.04458in - 0.22222in - 1.35979in - 33 - - - #686868 - 2pt - 2pt - 2pt - 2pt - - - - true - - - - - - - - - - - - - - - - - - - - - - - Sello digital del CFDI: - - - - - - - Textbox19 - 3.00494in - 0.04458in - 0.61916in - 1.35979in - 34 - - - #686868 - 2pt - 2pt - 2pt - 2pt - - - - true - - - - - - - - - - - - - - Sello del SAT: - - - - - - - Textbox19 - 3.6241in - 0.04515in - 0.61916in - 1.36417in - 35 - - - #686868 - 2pt - 2pt - 2pt - 2pt - - - - true - - - - - Cadena original del complemento de certificación digital del SAT: - - - - - - - Textbox19 - 4.27104in - 0.02417in - 0.21875in - 5.66187in - 36 - - - #686868 - 2pt - 2pt - 2pt - 2pt - - - - true - - - - - =Parameters!FormaPago.Value - - - - - - - ImporteLetra - 2.78272in - 1.40437in - 0.22222in - 4.28167in - 37 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Folio Fiscal: - - - - - - - Textbox54 - 5.15882in - 1.64412in - 0.18056in - 4.03672in - 38 - - - - - - - White - - - - - - - - #686868 - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - No. Serie del Certificado del SAT: - - - - - - - Textbox54 - 5.35327in - 1.64412in - 0.18056in - 4.03672in - 39 - - - #686868 - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Fecha y Hora de certificación: - - - - - - - Textbox54 - 5.56432in - 1.64412in - 0.19444in - 4.03672in - 40 - - - #686868 - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Certificado del Contribuyente: - - - - - - - Textbox54 - 5.76993in - 1.64412in - 0.19445in - 4.03672in - 41 - - - #686868 - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!FolioFiscal.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!SerieCertificadoSAT.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!FechaCertificacion.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!CertificadoContribuyente.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Regímen: Regímen General de Ley Personas Morales; Condiciones de pago: - - - - =IIF(Parameters!CondicionPago.Value.ToString="","No Identificado",Parameters!CondicionPago.Value) - - - - ; Método de Pago: - - - - =IIF(Parameters!MetodoPago.Value.ToString="","No Identificado",Parameters!MetodoPago.Value) - - - - ; Num. Cta Pago: - - - - =IIF(Parameters!NumCta.Value=0,"No Identificado",Parameters!NumCta.Value) - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Éste documento es una representacion impresa de un CFDi - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - true - true - - - - - P A G A R E con Folio - - - - =Parameters!Serie.Value - - - - - - - - - =Parameters!Folio.Value - - - - Por éste pagare prometo (emos) pagar incondicionalmente a la orden de Rosa Amanda Ozuna Laborin, a su vencimiento el - - - - =Parameters!Vencimiento.Value - - - - , en Hermosillo, Sonora o en el domicilio señalado a elección del acreedor o tenedor la cantidad de $ - - - - =Parameters!Total.Value - - - - SON: ( - - - - =Microsoft.VisualBasic.Strings.UCase(Parameters!ImporteLetra.Value) - - - - ). Valor recibido a mi (nuestra) entera satisfacción. la falta de pago de éste documento a su vencimiento dará derecho aRosa Amanda Ozuna Laborin o tenedor, desde el día siguiente a cobrar el 10% mensual de interes moratorios hasta su total liquidación y los gastos judiciales que se ocasionen. Lugar y Fecha de Suscripción: Hermosillo, Sonora a - - - - =CDATE(Parameters!Fecha.Value).ToString("dd/MM/yyyy") - - - - - - - - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Nombre: - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Dirección: - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!ClienteNombre.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!ClienteDireccion.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - - - - - White - - - Black - - - White - - - White - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Acepto de conformidad - - - - - - 2pt - 2pt - 2pt - 2pt - - - - 0.29357cm - 0.08375cm - 0cm - 0.57653cm - 7 - - - - - - 0.29357cm - 0.71971cm - 0cm - 0.57653cm - 8 - - - - - - 0.29357cm - 1.35545cm - 0cm - 0.57653cm - 9 - - - - - - 0.29357cm - 1.66152cm - 0cm - 0.57653cm - 10 - - - - - - 0.29357cm - 2.29748cm - 0cm - 0.57653cm - 11 - - - - - - 0.29357cm - 2.93322cm - 0cm - 0.57653cm - 12 - - - - - - 0.29357cm - 3.60266cm - 0cm - 0.57653cm - 13 - - - - - - 0.29357cm - 4.23862cm - 0cm - 0.57653cm - 14 - - - - - - 0.29357cm - 4.87436cm - 0cm - 0.57653cm - 15 - - - - - - 0.29357cm - 5.18043cm - 0cm - 0.57653cm - 16 - - - - - - 0.29357cm - 5.81639cm - 0cm - 0.57653cm - 17 - - - - - - 0.29357cm - 6.45213cm - 0cm - 0.57653cm - 18 - - - - - - 0.29357cm - 7.13239cm - 0cm - 0.57653cm - 19 - - - - - - 0.29357cm - 7.76835cm - 0cm - 0.57653cm - 20 - - - - - - 0.29357cm - 8.40409cm - 0cm - 0.57653cm - 21 - - - - - - 0.29357cm - 8.71016cm - 0cm - 0.57653cm - 22 - - - - - - 0.29357cm - 9.34612cm - 0cm - 0.57653cm - 23 - - - - - - 0.29357cm - 9.98186cm - 0cm - 0.57653cm - 24 - - - - - - 0.29357cm - 14.06281cm - 0cm - 0.57653cm - 25 - - - - - - 0.29357cm - 14.69877cm - 0cm - 0.57653cm - 26 - - - - - - 0.29357cm - 15.33451cm - 0cm - 0.57653cm - 27 - - - - - - 0.29357cm - 15.64058cm - 0cm - 0.57653cm - 28 - - - - - - 0.29357cm - 16.27654cm - 0cm - 0.57653cm - 29 - - - - - - 0.29357cm - 16.91228cm - 0cm - 0.57653cm - 30 - - - - - - 0.29357cm - 10.60588cm - 0cm - 0.57653cm - 31 - - - - - - 0.29357cm - 11.24184cm - 0cm - 0.57653cm - 32 - - - - - - 0.29357cm - 11.87758cm - 0cm - 0.57653cm - 33 - - - - - - 0.29357cm - 12.18365cm - 0cm - 0.57653cm - 34 - - - - - - 0.29357cm - 12.81961cm - 0cm - 0.57653cm - 35 - - - - - - 0.29357cm - 13.45535cm - 0cm - 0.57653cm - 36 - - - - - - 0.29357cm - 18.40663cm - 0cm - 0.57653cm - 37 - - - - - - 0.29357cm - 19.04259cm - 0cm - 0.57653cm - 38 - - - - - - 0.29357cm - 17.74353cm - 0cm - 0.57653cm - 39 - - - - - - true - 16.45911cm - 0.05078cm - 7.41243cm - 20.06179cm - 48 - - = (Parameters!AplicaPagare.Value="0") - - - - - - - true - - - - - =Parameters!Observaciones.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - 2.12527cm - - - 2.02474cm - - - 10.17786cm - - - 2.52862cm - - - 3.15415cm - - - - - 0.6cm - - - - - true - true - - - - - Cantidad - - - - - - - Textbox34 - - - #686868 - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Unidad - - - - - - - Textbox53 - - - #686868 - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Descripción - - - - - - - Textbox79 - - - #686868 - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - P. Unitario - - - - - - - Textbox84 - - - #686868 - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Importe - - - - - - - - - - - - - - - #686868 - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.49417cm - - - - - true - true - - - - - =Fields!Cantidad.Value - - - - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!UM.Value - - - - - - - UM1 - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!PS.Value & " " & Parameters!Observaciones.Value - - - - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!PU.Value - - - - - - - PU1 - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!Cantidad.Value*Fields!PU.Value - - - - - - - Textbox88 - - - - - - - - - - #686868 - - - #686868 - - 2pt - 2pt - 2pt - 2pt - es-MX - - - - - - - - 0.16344cm - - - - - true - true - - - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - - - - - #686868 - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - - - - - #686868 - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - - - - - - - - - - - - - - After - - - - - - Before - - - - DsOC - 4.5569cm - 0.11468cm - 1.25761cm - 20.01064cm - 50 - - - - - - true - - - - - RFC: - - - - =Parameters!ClienteRFC.Value - - - - - - - - - - - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - - - - - Ret. ISR - - - - - - - Textbox19 - 3.677in - 5.68755in - 0.21875in - 0.99552in - 52 - - - - White - - 1pt - - #686868 - 2pt - 2pt - 2pt - 2pt - - - - true - - - - - =Parameters!RetISR.Value - - - - - - - Textbox42 - 3.66311in - 6.68412in - 0.21875in - 1.24179in - 53 - - - 2pt - 2pt - 2pt - 2pt - - - - true - - - - - Total - - - - - - - Textbox19 - 3.91658in - 5.69622in - 0.21875in - 0.99552in - 54 - - - - White - - 1pt - - #686868 - 2pt - 2pt - 2pt - 2pt - - - - true - - - - - =Parameters!Total.Value - - - - - - - Textbox42 - 3.90269in - 6.69279in - 0.21875in - 1.24179in - 55 - - - 2pt - 2pt - 2pt - 2pt - - - - 23.93683cm - - - - - - - - =Today - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - 27.94cm - 21.59cm - 0.5cm - 0.5cm - 1cm - 0.5cm - 1.27cm - + + + + + + Textbox15 + + + #686868 + Middle + 2pt + 2pt + + + + + + + + true + true + + + + + Unidad + + + + + + + Textbox33 + + + #686868 + Middle + 2pt + 2pt + + + + + + + + true + true + + + + + Descripción + + + + + + + Textbox17 + + + #686868 + Middle + 2pt + 2pt + + + + + + + + true + true + + + + + P/U + + + + + + + Textbox21 + + + #686868 + Middle + 2pt + 2pt + + + + + + + + true + true + + + + + Importe + + + + + + + Textbox23 + + + #686868 + Middle + 2pt + 2pt + + + + + + + + 0.25521in + + + + + true + true + + + + + =Fields!Cantidad.Value + + + + + + + Cantidad + + + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!UM.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!PS.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!PU.Value + + + + + + + PU + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Cantidad.Value*Fields!PU.Value + + + + + + + PU2 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.03125in + + + + + true + true + + + + + + + + + + + + Textbox71 + + + + #686868 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + #686868 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + #686868 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + Textbox74 + + + + #686868 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + Textbox75 + + + + #686868 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + + + + + + + + + + + After + + + + + + Before + + + + DsOC + 2.02937in + 0.07745cm + 0.5in + 7.87749in + + + + + + true + true + + + + + Tipo + + + + + + + Textbox3 + 0.912in + 5.662in + 0.5cm + 2.24597in + 1 + + + #686868 + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Fecha y hora de emisión + + + + + + + + + + + + + + + + Textbox3 + 0.46414in + 5.662in + 0.5cm + 2.24597in + 2 + + + #686868 + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!Serie.Value + + + + - + + + + =Parameters!Folio.Value + + + + + + + Textbox3 + 0.22455in + 5.662in + 0.60856cm + 2.24597in + 3 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + FACTURA + + + + + + + Textbox3 + 0.0412cm + 5.662in + 0.5cm + 2.24597in + 4 + + + #686868 + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Rosa Amada Ozuna Laborin + + + + + + + + + R.F.C. OULR780610S27 + + + + 0cm + 0cm + + + + Textbox4 + 1.78362in + 0.46414in + 3.96172in + 5 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + SON: ( + + + + =Microsoft.VisualBasic.Strings.UCase(Parameters!ImporteLetra.Value) + + + + ) + + + + + + + ImporteLetra + 2.53743in + 1.39103in + 0.23264in + 4.73657in + 6 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!SelloCFDI.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!SelloSAT.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!CadenaOriginal.Value + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + External + =Parameters!QR.Value + FitProportional + 4.61035in + 0.03124in + 1.46528in + 1.56699in + 10 + + + + + + true + true + + + + + =Parameters!Fecha.Value + + + + + + + Textbox3 + 0.66099in + 5.662in + 0.25114in + 2.24597in + 11 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!Tipo.Value + + + + + + + Textbox3 + 1.10885in + 5.662in + 0.20721in + 2.24597in + 12 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Domicilio Fiscal + + + + + + + + + Cerrada Rosales, #81, + + + + 0cm + 0cm + + + + + + Col. Rosales, C.P. 83288 + + + + 0cm + 0cm + + + + + + Hermosillo, Sonora, México. + + + + 0cm + 0cm + + + + Textbox10 + 0.46414in + 1.87861in + 0.64471in + 1.65152in + 13 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Lugar de Expedición + + + + + + + + + =Parameters!DomicilioExpedicion.Value + + + + + + + Textbox10 + 0.46414in + 3.84822in + 0.64471in + 1.786in + 14 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Nombre + + + + + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!ClienteNombre.Value + + + + + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Dirección + + + + + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!ClienteDireccion.Value + + + + + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Cuidad + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!ClienteLugar.Value + + + + RFC: + + + + =Parameters!ClienteRFC.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Sub Total 1 + + + + + + + Textbox19 + 2.57038in + 6.15538in + 0.21875in + 0.84815in + 21 + + + #686868 + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Descuento + + + + + + + Textbox19 + 2.77396in + 6.15538in + 0.21875in + 0.84815in + 22 + + + #686868 + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Amort. Ant + + + + + + + Textbox19 + 2.99271in + 6.15538in + 0.21875in + 0.84815in + 23 + + + #686868 + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Sub Total 2 + + + + + + + Textbox19 + 3.21146in + 6.15538in + 0.21875in + 0.84815in + 24 + + + #686868 + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + IVA (16%) + + + + + + + Textbox19 + 3.43021in + 6.15538in + 0.21875in + 0.84815in + 25 + + + #686868 + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Total + + + + + + + Textbox19 + 3.63334in + 6.15538in + 0.21875in + 0.84815in + 26 + + + #686868 + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =IIF(Parameters!SubTotal.Value.ToString="","-",Parameters!SubTotal.Value) + + + + + + + Textbox42 + 2.5756in + 7.00353in + 0.19253in + 0.89055in + 27 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =IIF(Parameters!Amortizacion.Value.ToString="","-",Parameters!Amortizacion.Value) + + + + + + + Textbox42 + 2.97299in + 7.00353in + 0.22222in + 0.89054in + 28 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =iif(Parameters!Descuento.Value.ToString = "", "-",Parameters!Descuento.Value) + + + + + + + Textbox42 + 2.76813in + 7.00353in + 0.20486in + 0.89054in + 29 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =IIF(Parameters!SubTotal2.Value.ToString="","-",Parameters!SubTotal2.Value) + + + + + + + Textbox42 + 3.19521in + 7.00353in + 0.23803in + 0.89054in + 30 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =iif(Parameters!IVA.Value.ToString="","-",Parameters!IVA.Value) + + + + + + + Textbox42 + 3.43324in + 7.00353in + 0.2126in + 0.89054in + 31 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!Total.Value + + + + + + + Textbox42 + 3.64584in + 7.00353in + 0.19375in + 0.89054in + 32 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Importe con letra: + + + + + + + Textbox19 + 2.53316in + 0.03124in + 0.2053in + 1.37616in + 33 + + + #686868 + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Forma de pago: + + + + + + + Textbox19 + 2.73851in + 0.03124in + 0.22222in + 1.37616in + 34 + + + #686868 + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Sello digital del CFDI: + + + + + + + Textbox19 + 2.96073in + 0.03124in + 0.61916in + 1.37616in + 35 + + + #686868 + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Sello del SAT: + + + + + + + Textbox19 + 3.56739in + 0.03124in + 0.30208in + 1.37616in + 36 + + + #686868 + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Cadena original del complemento de certificación digital del SAT: + + + + + + + Textbox19 + 3.92015in + 0.03056in + 0.21875in + 7.87741in + 37 + + + #686868 + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!FormaPago.Value + + + + + + + ImporteLetra + 2.73851in + 1.39103in + 0.20833in + 4.73657in + 38 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Folio Fiscal: + + + + + + + Textbox54 + 4.60896in + 1.66767in + 0.18056in + 4.34634in + 39 + + + + + + + White + + + + + + + + #686868 + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + No. Serie del Certificado del SAT: + + + + + + + Textbox54 + 4.80341in + 1.66767in + 0.18056in + 4.34634in + 40 + + + #686868 + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Fecha y Hora de certificación: + + + + + + + Textbox54 + 5.00196in + 1.66767in + 0.18056in + 4.34634in + 41 + + + #686868 + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Certificado del Contribuyente: + + + + + + + Textbox54 + 5.19507in + 1.66767in + 0.18056in + 4.34634in + 42 + + + #686868 + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!FolioFiscal.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!SerieCertificadoSAT.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!FechaCertificacion.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!CertificadoContribuyente.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Regímen: Regímen General de Ley Personas Morales; Condiciones de pago: + + + + =Parameters!CondicionPago.Value + + + + ; Método de Pago: + + + + =Parameters!MetodoPago.Value + + + + ; Num. Cta Pago: + + + + =Parameters!NumCta.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Éste documento es una representacion impresa de un CFDi + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + true + true + + + + + P A G A R E con Folio + + + + =Parameters!Serie.Value + + + + - + + + + =Parameters!Folio.Value + + + + Por éste pagare prometo (emos) pagar incondicionalmente a la orden de + + + + =Parameters!Empresa.Value + + + + a su vencimiento el + + + + =Parameters!Vencimiento.Value + + + + , en Hermosillo, Sonora o en el domicilio señalado a elección del acreedor o tenedor la cantidad de $ + + + + =Parameters!Total.Value + + + + SON: ( + + + + =Microsoft.VisualBasic.Strings.UCase(Parameters!ImporteLetra.Value) + + + + ). Valor recibido a mi (nuestra) entera satisfaccion. la falta de pago de éste documento a su vencimiento dará derecho a + + + + =Parameters!Empresa.Value + + + + o tenedor, desde el dia siguiente a cobrar el 10% mensual de interes moratorios hasta su total liquidación y los gastos judiciales que se ocasionén. Lugar y Fecha de Suscripcion: Hermosillo, Sonora a + + + + =Parameters!Fecha.Value + + + + + + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Nombre: + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Dirección: + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!ClienteNombre.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!ClienteDireccion.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Acepto de conformidad + + + + + + 2pt + 2pt + 2pt + 2pt + + + + 0.26711cm + 0.05457cm + 0cm + 0.57653cm + 7 + + + + + + 0.26711cm + 0.69053cm + 0cm + 0.57653cm + 8 + + + + + + 0.26711cm + 1.32627cm + 0cm + 0.57653cm + 9 + + + + + + 0.26711cm + 1.63234cm + 0cm + 0.57653cm + 10 + + + + + + 0.26711cm + 2.2683cm + 0cm + 0.57653cm + 11 + + + + + + 0.26711cm + 2.90404cm + 0cm + 0.57653cm + 12 + + + + + + 0.26711cm + 3.57348cm + 0cm + 0.57653cm + 13 + + + + + + 0.26711cm + 4.20944cm + 0cm + 0.57653cm + 14 + + + + + + 0.26711cm + 4.84518cm + 0cm + 0.57653cm + 15 + + + + + + 0.26711cm + 5.15125cm + 0cm + 0.57653cm + 16 + + + + + + 0.26711cm + 5.78721cm + 0cm + 0.57653cm + 17 + + + + + + 0.26711cm + 6.42295cm + 0cm + 0.57653cm + 18 + + + + + + 0.26711cm + 7.10321cm + 0cm + 0.57653cm + 19 + + + + + + 0.26711cm + 7.73917cm + 0cm + 0.57653cm + 20 + + + + + + 0.26711cm + 8.37491cm + 0cm + 0.57653cm + 21 + + + + + + 0.26711cm + 8.68098cm + 0cm + 0.57653cm + 22 + + + + + + 0.26711cm + 9.31694cm + 0cm + 0.57653cm + 23 + + + + + + 0.26711cm + 9.95268cm + 0cm + 0.57653cm + 24 + + + + + + 0.26711cm + 14.03363cm + 0cm + 0.57653cm + 25 + + + + + + 0.26711cm + 14.66959cm + 0cm + 0.57653cm + 26 + + + + + + 0.26711cm + 15.30533cm + 0cm + 0.57653cm + 27 + + + + + + 0.26711cm + 15.6114cm + 0cm + 0.57653cm + 28 + + + + + + 0.26711cm + 16.24736cm + 0cm + 0.57653cm + 29 + + + + + + 0.26711cm + 16.8831cm + 0cm + 0.57653cm + 30 + + + + + + 0.26711cm + 10.5767cm + 0cm + 0.57653cm + 31 + + + + + + 0.26711cm + 11.21266cm + 0cm + 0.57653cm + 32 + + + + + + 0.26711cm + 11.8484cm + 0cm + 0.57653cm + 33 + + + + + + 0.26711cm + 12.15447cm + 0cm + 0.57653cm + 34 + + + + + + 0.26711cm + 12.79043cm + 0cm + 0.57653cm + 35 + + + + + + 0.26711cm + 13.42617cm + 0cm + 0.57653cm + 36 + + + + + + 0.26711cm + 18.37745cm + 0cm + 0.57653cm + 37 + + + + + + 0.26711cm + 19.01341cm + 0cm + 0.57653cm + 38 + + + + + + 0.26711cm + 17.71435cm + 0cm + 0.57653cm + 39 + + + + + + true + 18.57368cm + 0.09423cm + 4.36819cm + 20.04854cm + 49 + + + + + + + + true + true + + + + + CFDI Relacionados + + + + + + + Textbox5 + 0.11382cm + 0.05336cm + 0.54004cm + 20.00281cm + + + #686868 + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Tipo Relación: + + + + + + + Textbox29 + 0.83025cm + 4.33636cm + 0.41981cm + 5.31841cm + 1 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!TipoRelacionTexto.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + 2.42456cm + + + 2.05585cm + + + 3.03631cm + + + 7.7847cm + + + + + 0.44125cm + + + + + true + true + + + + + Folio + + + + + + + Textbox10 + + + #686868 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Fecha + + + + + + + Textbox12 + + + #686868 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Importe + + + + + + + Textbox21 + + + #686868 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Folio Fiscal + + + + + + + Textbox11 + + + #686868 + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.41479cm + + + + + true + true + + + + + =Fields!SerieFolio.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Fecha.Value + + + + + + + Fecha + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Importe.Value + + + + + + + Importe1 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!FolioFiscal.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + + + + + + + + + + After + + + + + + + DataSet4 + 1.39643cm + 2.83462cm + 0.85604cm + 15.30142cm + 3 + + + + + + true + true + + + + + VERSION 3.3 + + + + + + + Textbox5 + 2.28775cm + 17.08931cm + 0.6cm + 3.06609cm + 4 + + + 2pt + 2pt + 2pt + 2pt + + + + true + 15.56744cm + 0.07745cm + 2.97096cm + 20.1554cm + 50 + + =Microsoft.VisualBasic.Interaction.IIF(First(Fields!SerieFolio.Value, "DataSet4") <> "", False, True) + + + + + + + 22.94187cm + + + + =Today + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 27.94cm + 21.59cm + 0.5cm + 0.5cm + 1cm + 0.5cm + 1.27cm + - + @@ -91,7 +91,19 @@
    -
    @@ -120,6 +132,7 @@ DataKeyNames="CveLineaAdicional,LineaAdicional,CveCliente,CveProveedor,TipoLinea,Importe,CveMoneda,FechaVencimiento,CveUsuario,CveClasificacionPS,FechaIng,CveEstatus,Proveedor,Comprobante" CssClass="table table-striped table-advance table-hover ScrollAD " ShowHeader="True" EmptyDataText="No se encontraron resultados." ShowHeaderWhenEmpty="true" AutoGenerateColumns="False" AllowPaging="False" ShowFooter="False" + OnRowDataBound="GvLineasAdicionales_RowDataBound" > @@ -129,15 +142,24 @@ - - - + + - + - - +
    +
    + +
    +
    + +
    +
    + +
    +
    diff --git a/Ventas/RepLineasAdicionales.aspx.cs b/Ventas/RepLineasAdicionales.aspx.cs index 51f634d90..c02b8cf93 100644 --- a/Ventas/RepLineasAdicionales.aspx.cs +++ b/Ventas/RepLineasAdicionales.aspx.cs @@ -2,6 +2,8 @@ using System.Collections.Generic; using System.IO; using ListItem = System.Web.UI.WebControls.ListItem; +using DocumentFormat.OpenXml.Spreadsheet; +using System.Web.UI; public partial class Ventas_RepLineasAdicionales : ClsPaginas { @@ -13,6 +15,25 @@ public partial class Ventas_RepLineasAdicionales : ClsPaginas set { ViewState["CveLineaAdicional"] =(int) value; } } + private int TipoLinea + { + get { return (ViewState["TipoLinea"] == null) ? 1: int.Parse(ViewState["TipoLinea"].ToString()); } + set { ViewState["TipoLinea"] = (int)value; } + } + + private DataTable DTDatosGvLineasAdicionales + { + get + { + if (ViewState["DTDatosGvLineasAdicionales"] == null) + { + ViewState["DTDatosGvLineasAdicionales"] = new DataTable(); + } + return (DataTable)ViewState["DTDatosGvLineasAdicionales"]; + } + set { ViewState["DTDatosGvLineasAdicionales"] = (DataTable)value; } + } + private string Comprobante { get { @@ -33,6 +54,7 @@ public partial class Ventas_RepLineasAdicionales : ClsPaginas if (!IsPostBack) { InicializaValores(); + CargaDatos(); } } @@ -43,23 +65,20 @@ public partial class Ventas_RepLineasAdicionales : ClsPaginas { DVProveedor1.Visible = true; DVProveedor2.Visible = true; - GvLineasAdicionales.Columns[9].Visible = true; + GvLineasAdicionales.Columns[8].Visible = true; + TipoLinea = 2; + LtlEncabezado.Text = "Reporte PO"; } //Carga Clientes DdlClientes.DataSource = get_GlobalDTCliente(UsuarioActual.CveEmpresa, -1); DdlClientes.DataBind(); - - if(UsuarioActual.Empresa.Funcionalidad(105) == "1") { DdlProveedor.setEsWebService(true); DdlProveedor.Attributes.Add("data-metodo", "getproveedores"); DdlProveedor.SelectedText = "Todos"; DdlProveedor.SelectedValue = "-1"; - - - }else { DdlProveedor.setEsWebService(false); DdlProveedor.ddl.DataSource = get_GlobalDTCompProveedores(UsuarioActual.CveEmpresa); @@ -85,17 +104,19 @@ public partial class Ventas_RepLineasAdicionales : ClsPaginas private void CargaDatos() { + DTDatosGvLineasAdicionales = new DataTable(); LnkDescargaExcel.Visible = false; ClsVentas objVentas = new ClsVentas(); int CveProveedor = DdlProveedor.SelectedValue.ToEntero() > 0 ? DdlProveedor.SelectedValue.ToEntero() : -1; - if(objVentas.GetLineasAdicionales(-1,DdlClientes.SelectedValue.ToEntero(),CveProveedor,-1,-1,txtFechaI.Text.ToDate(), txtFechaF.Text.ToDate(), -1, UsuarioActual.CveEmpresa)){ + if(objVentas.GetLineasAdicionales(-1,DdlClientes.SelectedValue.ToEntero(),CveProveedor, TipoLinea, -1,txtFechaI.Text.ToDate(), txtFechaF.Text.ToDate(), DdlEstatus.SelectedValue.ToEntero(), UsuarioActual.CveEmpresa)){ GvLineasAdicionales.DataSource = objVentas.DtResultados; if( objVentas.DtResultados.Rows.Count > 0) { + DTDatosGvLineasAdicionales = objVentas.DtResultados; LnkDescargaExcel.Visible = true; UpAcciones.Update(); } @@ -240,15 +261,62 @@ public partial class Ventas_RepLineasAdicionales : ClsPaginas { CargaDatos(); } - objVentas.Dispose(); } protected void LnkDescargaExcel_Click(object sender, EventArgs e) - { - GvLineasAdicionales.ExportToExcel2("RepLineas"); + { + GridView gvTemp = GvLineasAdicionales; + gvTemp.Columns[8].Visible = false; + gvTemp.ExportToExcelx( TipoLinea == 1 ? "RepLienasAdicionales":"RepPO"); } - + + + protected void GvLineasAdicionales_RowDataBound(object sender, GridViewRowEventArgs e) + { + if(e.Row.RowType == DataControlRowType.DataRow) + { + if(e.Row.DataKey("CveEstatus").ToEntero().Contiene(2)) + { + e.Row.FCLinkButton("LnkCambiarEstatus").Visible = true; + } + + if (e.Row.DataKey("CveEstatus").ToEntero() == 3) + { + e.Row.FCLinkButton("LnkCargarComprobante").Visible = false; + } + + if (e.Row.DataKey("Comprobante").Length > 0) + { + FileInfo fi = new FileInfo($@"{UsuarioActual.Empresa.Ruta}\LineasAdicionales\{e.Row.DataKey("Comprobante")}"); + LinkButton LnkDescargaComprobante = e.Row.FCLinkButton("LnkDescargaComprobante"); + + if (fi.Exists) + { + LnkDescargaComprobante.Visible = true; + ScriptManager.GetCurrent(this).RegisterPostBackControl(LnkDescargaComprobante); + } + } + } + } + + protected void LnkDescargaComprobante_Click(object sender, EventArgs e) + { + GridViewRow GvRow = (GridViewRow)((LinkButton)sender).NamingContainer; + string Comprobante = GvRow.DataKey("Comprobante"); + FileInfo fi = new FileInfo($@"{UsuarioActual.Empresa.Ruta}\LineasAdicionales\{Comprobante}"); + + if (fi.Exists) + { + Response.Clear(); + Response.AddHeader("Content-Disposition", "attachment; filename=" + fi.Name); + Response.AddHeader("Content-Length", fi.Length.ToString()); + Response.ContentType = "text/octet-stream"; + Response.Flush(); + Response.TransmitFile(fi.FullName); + Response.End(); + } + } } \ No newline at end of file From 29d852495043b43f472b13337261da8d3ab359fa Mon Sep 17 00:00:00 2001 From: rrene Date: Thu, 22 Sep 2022 19:47:25 -0700 Subject: [PATCH 25/28] -- mejoras pago compra --- App_Code/ClsPaginas.vb | 3 ++- Bancos/ProveedoresAbonar.aspx.vb | 1 + Compras/Compras.aspx | 2 +- Compras/Compras.aspx.vb | 26 ++++++++++++++++-------- Compras/ReembolsosComprobaciones.aspx.vb | 1 + Scripts/funciones.js | 7 ++++--- 6 files changed, 26 insertions(+), 14 deletions(-) diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb index 51c7abcef..88c21703a 100644 --- a/App_Code/ClsPaginas.vb +++ b/App_Code/ClsPaginas.vb @@ -9605,7 +9605,7 @@ Public Class ClsPaginas Dim UltimaFluctuacion As MTipoCambioFluctuacion = GlobalTipoCambioUltimaFluctuacion(tFecha) If UsuarioActual.Empresa.Funcionalidad(703) = "1" AndAlso UltimaFluctuacion IsNot Nothing Then - If UltimaFluctuacion.FechaFluctuacion <= tFecha Then + If UltimaFluctuacion.FechaFluctuacion <= tFecha AndAlso CompraActual.Fecha <= UltimaFluctuacion.FechaFluctuacion Then 'FechaUltimaFluctuacion = UltimaFluctuacion.FechaFluctuacion TCValuacion = UltimaFluctuacion.TCFluctuacion End If @@ -9803,6 +9803,7 @@ Public Class ClsPaginas Public Property CveProveedor As Integer Public Property CveTipoConceptoProveedor As Integer Public Property CveMoneda As Integer + Public Property Fecha As Date Public Property SerieFolio As String = "" Public Property ProveedorNombre As String = "" Public Property EsImportacion As Boolean = False diff --git a/Bancos/ProveedoresAbonar.aspx.vb b/Bancos/ProveedoresAbonar.aspx.vb index 710d7e509..e406742b0 100644 --- a/Bancos/ProveedoresAbonar.aspx.vb +++ b/Bancos/ProveedoresAbonar.aspx.vb @@ -829,6 +829,7 @@ Partial Class Bancos_ProveedoresAbonar CompraActual.CveTipoConceptoProveedor = gvr.DataKey("CveTipoConcepto").ToEntero CompraActual.CveProveedor = gvr.DataKey("CveProveedor").ToEntero CompraActual.CveMoneda = gvr.DataKey("CveMoneda").ToEntero + CompraActual.Fecha = gvr.DataKey("Fecha").ToDate CompraActual.SerieFolio = gvr.DataKey("SerieFolio").ToString CompraActual.ProveedorNombre = HplProveedor.Text CompraActual.TC = gvr.DataKey("TipoCambioOriginal").ToDecimal diff --git a/Compras/Compras.aspx b/Compras/Compras.aspx index 535bfd2ea..a2b031560 100644 --- a/Compras/Compras.aspx +++ b/Compras/Compras.aspx @@ -4102,7 +4102,7 @@
    - diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb index 61f2e8b7f..347adce03 100644 --- a/Compras/Compras.aspx.vb +++ b/Compras/Compras.aspx.vb @@ -1819,7 +1819,7 @@ Partial Class Compras_Compras Xml = System.Web.HttpUtility.HtmlDecode(Xml.ToString) Xml = Xml.Replace(Chr(13), "") 'salto de linea Xml = Xml.Replace(Chr(10), "") - Xml = Xml.Replace("
    ", "") 'adicional, si hay otros + Xml = Xml.Replace("
    ", "") 'salto de linea html Xml = Xml.Replace("&", "") 'adicional, si hay otros If ObjeFacturas.GetFacturasComparacionXML(Version, Xml, UsuarioActual.CveEmpresa) Then @@ -4834,6 +4834,7 @@ Partial Class Compras_Compras CompraActual.CveTipoConceptoProveedor = CveTipoConcepto CompraActual.CveProveedor = CveProveedor CompraActual.CveMoneda = DdlMoneda.SelectedValue.ToEntero + CompraActual.Fecha = TxtFecha.Text.ToDate CompraActual.SerieFolio = TxtSerie.Text.Trim & "-" & TxtFolio.Text.Trim CompraActual.ProveedorNombre = HplProveedor.Text CompraActual.TC = TipoCambio @@ -5753,7 +5754,6 @@ Partial Class Compras_Compras Dim FechaMovimiento As Date = TxtFecha.Text.ToDate Dim DT As DataTable = Nothing Dim CuentasContablesInvalidas As New StringBuilder - Dim CuentasContablesInvalidasSIG As New StringBuilder Dim ConceptoPersonal As String = "" Dim IdCtaIVAXAcreditar As Integer = 0 ' Dim IdCtaIVAAcreditable As Integer = 0 @@ -6945,9 +6945,14 @@ Partial Class Compras_Compras If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveIE:=rw.DataKey("CveIE").ToString.ToEntero, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMN, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), Contabilizable:=SeContabiliza) Then ErrorPrepoliza = True + Exit For End If End If + Dim Pago As New CompraPago With {.ImportePago = importeMovimiento, .CveIE = CveIE} + 'Pago.CveMonedaPago = CveMonedaAnticipo 'pdte + AplicaPrePolizaPagoCompra(CompraActual, Pago, CvePrePoliza, ObjConta) Next + Else For Each rw As GridViewRow In GvDeudores.Rows If rw.FCCheckBox("Chk").Checked Then @@ -6957,7 +6962,11 @@ Partial Class Compras_Compras If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, 254, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveIE:=rw.DataKey("CveIE").ToString.ToEntero, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMN, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), Contabilizable:=SeContabiliza) Then ErrorPrepoliza = True + Exit For End If + Dim Pago As New CompraPago With {.ImportePago = importeMovimiento, .CveIE = CveIE} + 'Pago.CveMonedaPago = CveMonedaAnticipo 'pdte + AplicaPrePolizaPagoCompra(CompraActual, Pago, CvePrePoliza, ObjConta) End If Next End If @@ -8423,7 +8432,7 @@ Partial Class Compras_Compras Dim ImporteAnt As Decimal = gvr.FCTextBox("TxtAnticipo").Text.ToDecimal Dim ImporComisionAnticipo As Decimal = gvr.FCTextBox("TxtComision").Text.ToDecimal - Dim CvemonedaAnticipo As Integer = gvr.DataKey("CveMoneda").ToEntero + Dim CveMonedaAnticipo As Integer = gvr.DataKey("CveMoneda").ToEntero Dim TipoCambioAnt As Decimal = gvr.DataKey("TCCompra").ToDecimal If ImporComisionAnticipo = 0 Then @@ -8442,7 +8451,7 @@ Partial Class Compras_Compras Dim Pago As New CompraPago Pago.ImportePago = ImporteAnt Pago.CveIE = CveIE - Pago.CveMonedaPago = CvemonedaAnticipo + Pago.CveMonedaPago = CveMonedaAnticipo Pago.CveCompraAmortizacion = CveCompraNC Pago.CveCreditoDetalle = -1 Pago.OtroGastoIngreso = ImporComisionAnticipo @@ -8453,6 +8462,7 @@ Partial Class Compras_Compras CompraActual.CveTipoConceptoProveedor = CveTipoConcepto CompraActual.CveProveedor = CveProveedor CompraActual.CveMoneda = DdlMoneda.SelectedValue.ToEntero + CompraActual.Fecha = TxtFecha.Text.ToDate CompraActual.SerieFolio = TxtSerie.Text.Trim & "-" & TxtFolio.Text.Trim CompraActual.ProveedorNombre = HplProveedor.Text CompraActual.TC = TipoCambio @@ -8472,9 +8482,7 @@ Partial Class Compras_Compras CompraActual.EsImportacion = chkImportacion.Checked AplicaPrePolizaPagoCompra(CompraActual, pago, CvePrePoliza, ObjConta) - End If - End If Next @@ -9329,7 +9337,7 @@ Partial Class Compras_Compras End If 'Removemos los conceptos de la prepoliza - If Not ObjConta.RemovePrePolizasDetalle(CvePrePoliza, 6, CveCompra, 1) Then ErrorPrepoliza = True 'GASTO + If Not ObjConta.RemovePrePolizasDetalle(CvePrePoliza, 6, CveCompra, 1) Then ErrorPrepoliza = True 'GASTO If Not ObjConta.RemovePrePolizasDetalle(CvePrePoliza, 68, CveCompra, 1) Then ErrorPrepoliza = True 'ALMACEN If Not ObjConta.RemovePrePolizasDetalle(CvePrePoliza, 49, CveCompra, 1) Then ErrorPrepoliza = True 'AF If Not ObjConta.RemovePrePolizasDetalle(CvePrePoliza, 205, CveCompra, 1) Then ErrorPrepoliza = True 'PS YA RECIBIDO @@ -10606,8 +10614,8 @@ Partial Class Compras_Compras End Sub Protected Sub GVINV_RowUpdating(sender As Object, e As GridViewUpdateEventArgs) Handles GvInv.RowUpdating - Dim Cantidad As Double = DirectCast(GvInv.Rows(e.RowIndex).FindControl("txtECantidad"), TextBox).Text.ToDouble - Dim CveUnidadMedida As Integer = DirectCast(GvInv.Rows(e.RowIndex).FindControl("ddlEUnidad"), DropDownList).SelectedValue.ToString.ToEntero + Dim Cantidad As Double = GvInv.Rows(e.RowIndex).FCTextBox("txtECantidad").Text.ToDouble + Dim CveUnidadMedida As Integer = GvInv.Rows(e.RowIndex).FCDropDownList("ddlEUnidad").SelectedValue.ToString.ToEntero DtInv.Rows.Item(e.RowIndex)("Cantidad") = Cantidad DtInv.Rows.Item(e.RowIndex)("CveUM") = CveUnidadMedida diff --git a/Compras/ReembolsosComprobaciones.aspx.vb b/Compras/ReembolsosComprobaciones.aspx.vb index 914246a36..ea30d6a2b 100644 --- a/Compras/ReembolsosComprobaciones.aspx.vb +++ b/Compras/ReembolsosComprobaciones.aspx.vb @@ -690,6 +690,7 @@ Partial Class Compras_ReembolsosComprobaciones CompraActual.CveTipoConceptoProveedor = gvr.DataKey("CveTipoConcepto").ToEntero CompraActual.CveProveedor = gvr.DataKey("CveProveedor").ToEntero CompraActual.CveMoneda = gvr.DataKey("CveMoneda").ToEntero + CompraActual.Fecha = gvr.DataKey("Fecha").ToDate CompraActual.SerieFolio = gvr.DataKey("SerieFolio").ToString CompraActual.ProveedorNombre = gvr.DataKey("Proveedor") CompraActual.TC = gvr.DataKey("TipoCambio").ToDecimal diff --git a/Scripts/funciones.js b/Scripts/funciones.js index 1135fd9a1..c28864b85 100644 --- a/Scripts/funciones.js +++ b/Scripts/funciones.js @@ -1093,9 +1093,10 @@ function FormatoNumero(Importe, Decimales) { if (isNaN(parseInt(Importe))) return "NaN"; Decimales = Decimales || 2; // parametro opcional, toma el valor 2 por default // var tmpNum = Importe; - - - var tmpNum = parseFloat(Importe).toFixed(Decimales) + + + //var tmpNum = parseFloat(Importe).toFixed(Decimales) //se comenta por el redondeo de $3037.095 + var tmpNum = +(Math.round(Importe + "e+" + Decimales) + "e-" + Decimales); tmpNum = Number(tmpNum).toLocaleString('en'); //tmpNum = tmpNum.toFixed(2).replace(/./g, function (c, i, a) { From ae8494e69e6ae024af56a4b837c0972856b93ea5 Mon Sep 17 00:00:00 2001 From: rrene Date: Thu, 22 Sep 2022 19:47:35 -0700 Subject: [PATCH 26/28] --mejora --- Bancos/PagoDeudor.aspx.cs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Bancos/PagoDeudor.aspx.cs b/Bancos/PagoDeudor.aspx.cs index 611b02810..eb2d25f4c 100644 --- a/Bancos/PagoDeudor.aspx.cs +++ b/Bancos/PagoDeudor.aspx.cs @@ -361,13 +361,13 @@ public partial class Bancos_PagoDeudor : ClsPaginas if (UsaComplementaria) { // BANCOS - COMPLEMENTARIA - if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, true, 0, Ref, 204, Conc, IDCtaContableBancosComplementariaPrestamo, CveIE, CveProveedor: DdlProveedorPrestamo.SelectedValue.ToEntero(), ImporteMX: (TxtImportePrestamo.Text.ToDecimal() * tipoCambio) - TxtImportePrestamo.Text.ToDecimal(), ImporteME: TxtImportePrestamo.Text.ToDecimal(), TipoCambio: tipoCambio, CveSubProyecto: DdlSubProyecto.SelectedValue.ToEntero())) + if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, true, 0, (TxtImportePrestamo.Text.ToDecimal() * tipoCambio) - TxtImportePrestamo.Text.ToDecimal(), 204, Ref, Conc, IDCtaContableBancosComplementariaPrestamo, CveIEDevolucion: CveIE, CveProveedor: DdlProveedorPrestamo.SelectedValue.ToEntero(), ImporteME: TxtImportePrestamo.Text.ToDecimal(), TipoCambio: tipoCambio, CveSubProyecto: DdlSubProyecto.SelectedValue.ToEntero())) { MsgError = "No se pudo insertar concepto de bancos complementaria"; } // BANCOS - if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, true, TxtImportePrestamo.Text.ToDecimal(), Ref, CveConceptoContableBanco, Conc, IDCtaContableBancosPrestamo, CveIE, CveProveedor: DdlProveedorPrestamo.SelectedValue.ToEntero(), ImporteMX: TxtImportePrestamo.Text.ToDecimal(), ImporteME: TxtImportePrestamo.Text.ToDecimal(), TipoCambio: tipoCambio, CveSubProyecto: DdlSubProyecto.SelectedValue.ToEntero())) + if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, true, TxtImportePrestamo.Text.ToDecimal(), TxtImportePrestamo.Text.ToDecimal(),CveConceptoContableBanco, Ref, Conc, IDCtaContableBancosPrestamo, CveIE, CveProveedor: DdlProveedorPrestamo.SelectedValue.ToEntero(), ImporteME: TxtImportePrestamo.Text.ToDecimal(), TipoCambio: tipoCambio, CveSubProyecto: DdlSubProyecto.SelectedValue.ToEntero())) { MsgError = "No se pudo insertar concepto de bancos"; } @@ -375,7 +375,7 @@ public partial class Bancos_PagoDeudor : ClsPaginas else { // BANCOS - if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, true, TxtImportePrestamo.Text.ToDecimal(), Ref, CveConceptoContableBanco, Conc, IDCtaContableBancosPrestamo, CveIE, CveProveedor: DdlProveedorPrestamo.SelectedValue.ToEntero(), ImporteMX: TxtImportePrestamo.Text.ToDecimal() * tipoCambio, ImporteME: TxtImportePrestamo.Text.ToDecimal(), TipoCambio: tipoCambio, CveSubProyecto: DdlSubProyecto.SelectedValue.ToEntero())) + if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, true, TxtImportePrestamo.Text.ToDecimal(), TxtImportePrestamo.Text.ToDecimal() * tipoCambio, CveConceptoContableBanco, Ref, Conc, IDCtaContableBancosPrestamo, CveIE, CveProveedor: DdlProveedorPrestamo.SelectedValue.ToEntero(), ImporteME: TxtImportePrestamo.Text.ToDecimal(), TipoCambio: tipoCambio, CveSubProyecto: DdlSubProyecto.SelectedValue.ToEntero())) { MsgError = "No se pudo insertar concepto de bancos"; } @@ -385,13 +385,13 @@ public partial class Bancos_PagoDeudor : ClsPaginas if (UsaComplementaria) //(IDCtaContableDeudorCompPrestamo > 0) { // DEUDOR COMPLEMENTARIA - if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, false, 0, Ref, 256, Conc, IDCtaContableDeudorCompPrestamo, CveIE, CveProveedor: DdlProveedorPrestamo.SelectedValue.ToEntero(), ImporteMX: (TxtImportePrestamo.Text.ToDecimal() * tipoCambio) - TxtImportePrestamo.Text.ToDecimal(), ImporteME: TxtImportePrestamo.Text.ToDecimal(), TipoCambio: tipoCambio, CveSubProyecto: DdlSubProyecto.SelectedValue.ToEntero())) + if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, false, 0, (TxtImportePrestamo.Text.ToDecimal() * tipoCambio) - TxtImportePrestamo.Text.ToDecimal(), 256, Ref, Conc, IDCtaContableDeudorCompPrestamo, CveIE, CveProveedor: DdlProveedorPrestamo.SelectedValue.ToEntero(), ImporteME: TxtImportePrestamo.Text.ToDecimal(), TipoCambio: tipoCambio, CveSubProyecto: DdlSubProyecto.SelectedValue.ToEntero())) { MsgError = "No se pudo insertar concepto de deudor complementaria"; } // DEUDOR - if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, false, TxtImportePrestamo.Text.ToDecimal(), Ref, CveConceptoContablePrestamo, Conc, IDCtaContableDeudorPrestamo, CveIE, CveProveedor: DdlProveedorPrestamo.SelectedValue.ToEntero(), ImporteMX: TxtImportePrestamo.Text.ToDecimal(), ImporteME: TxtImportePrestamo.Text.ToDecimal(), TipoCambio: tipoCambio, CveSubProyecto: DdlSubProyecto.SelectedValue.ToEntero())) + if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, false, TxtImportePrestamo.Text.ToDecimal(), TxtImportePrestamo.Text.ToDecimal(), CveConceptoContablePrestamo, Ref, Conc, IDCtaContableDeudorPrestamo, CveIE, CveProveedor: DdlProveedorPrestamo.SelectedValue.ToEntero(), ImporteME: TxtImportePrestamo.Text.ToDecimal(), TipoCambio: tipoCambio, CveSubProyecto: DdlSubProyecto.SelectedValue.ToEntero())) { MsgError = "No se pudo insertar concepto de deudor"; } @@ -399,7 +399,7 @@ public partial class Bancos_PagoDeudor : ClsPaginas else { // DEUDOR - if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, false, TxtImportePrestamo.Text.ToDecimal(), Ref, CveConceptoContablePrestamo, Conc, IDCtaContableDeudorPrestamo, CveIE, CveProveedor: DdlProveedorPrestamo.SelectedValue.ToEntero(), ImporteMX: TxtImportePrestamo.Text.ToDecimal() * tipoCambio, ImporteME: TxtImportePrestamo.Text.ToDecimal(), TipoCambio: tipoCambio, CveSubProyecto: DdlSubProyecto.SelectedValue.ToEntero())) + if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, false, TxtImportePrestamo.Text.ToDecimal(), TxtImportePrestamo.Text.ToDecimal() * tipoCambio, CveConceptoContablePrestamo, Ref, Conc, IDCtaContableDeudorPrestamo, CveIE, CveProveedor: DdlProveedorPrestamo.SelectedValue.ToEntero(), ImporteME: TxtImportePrestamo.Text.ToDecimal(), TipoCambio: tipoCambio, CveSubProyecto: DdlSubProyecto.SelectedValue.ToEntero())) { MsgError = "No se pudo insertar concepto de deudor"; } @@ -409,13 +409,13 @@ public partial class Bancos_PagoDeudor : ClsPaginas else { // BANCOS - if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, true, TxtImportePrestamo.Text.ToDecimal(), Ref, CveConceptoContableBanco, Conc, IDCtaContableBancosPrestamo, CveIE, CveProveedor: DdlProveedorPrestamo.SelectedValue.ToEntero(), ImporteMX: TxtImportePrestamo.Text.ToDecimal(), TipoCambio: tipoCambio, CveSubProyecto: DdlSubProyecto.SelectedValue.ToEntero())) + if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, true, TxtImportePrestamo.Text.ToDecimal(), TxtImportePrestamo.Text.ToDecimal(), CveConceptoContableBanco, Ref, Conc, IDCtaContableBancosPrestamo, CveIE, CveProveedor: DdlProveedorPrestamo.SelectedValue.ToEntero(), TipoCambio: tipoCambio, CveSubProyecto: DdlSubProyecto.SelectedValue.ToEntero())) { MsgError = "No se pudo insertar concepto de bancos"; } // DEUDOR - if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, false, TxtImportePrestamo.Text.ToDecimal(), Ref, CveConceptoContablePrestamo, Conc, IDCtaContableDeudorPrestamo, CveIE, CveProveedor: DdlProveedorPrestamo.SelectedValue.ToEntero(), ImporteMX: TxtImportePrestamo.Text.ToDecimal(), TipoCambio: tipoCambio, CveSubProyecto: DdlSubProyecto.SelectedValue.ToEntero())) + if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, false, TxtImportePrestamo.Text.ToDecimal(), TxtImportePrestamo.Text.ToDecimal(), CveConceptoContablePrestamo, Ref, Conc, IDCtaContableDeudorPrestamo, CveIE, CveProveedor: DdlProveedorPrestamo.SelectedValue.ToEntero(), TipoCambio: tipoCambio, CveSubProyecto: DdlSubProyecto.SelectedValue.ToEntero())) { MsgError = "No se pudo insertar concepto de deudor"; } From 21fa645d5cc787f486b30e18b5cc6d07f28fb3b5 Mon Sep 17 00:00:00 2001 From: rrene Date: Thu, 22 Sep 2022 19:47:56 -0700 Subject: [PATCH 27/28] --fecha de saldado --- Compras/RepNotasCredito.aspx.vb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Compras/RepNotasCredito.aspx.vb b/Compras/RepNotasCredito.aspx.vb index 23f1151b2..61f5b6979 100644 --- a/Compras/RepNotasCredito.aspx.vb +++ b/Compras/RepNotasCredito.aspx.vb @@ -143,7 +143,7 @@ Partial Class Compras_RepNotasCredito TCCompra = gr.DataKey("TipoCambio").ToDecimal CveMoneda = gr.DataKey("CveMoneda").ToEntero - CvePrePoliza = ObjConta.AddPrePolizas("Compras/RepNotasCredito", 103, gr.DataKey("Saldo").ToDecimal, gr.DataKey("Saldo").ToDecimal, gr.DataKey("CveMoneda").ToEntero, Now, "Saldado manual", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) + CvePrePoliza = ObjConta.AddPrePolizas("Compras/RepNotasCredito", 103, gr.DataKey("Saldo").ToDecimal, gr.DataKey("Saldo").ToDecimal, gr.DataKey("CveMoneda").ToEntero, TxtFechaSaldar.Text.ToDate, "Saldado manual", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) If CveMoneda > 1 Then From 52c498d33175f83304f121d291b71e52dee9a858 Mon Sep 17 00:00:00 2001 From: rrene Date: Fri, 23 Sep 2022 16:23:00 -0700 Subject: [PATCH 28/28] considear la serie --- Inventarios/TraspasoAlmacen.aspx.vb | 255 +++------------------------- 1 file changed, 23 insertions(+), 232 deletions(-) diff --git a/Inventarios/TraspasoAlmacen.aspx.vb b/Inventarios/TraspasoAlmacen.aspx.vb index 8db91b075..0506df4ff 100644 --- a/Inventarios/TraspasoAlmacen.aspx.vb +++ b/Inventarios/TraspasoAlmacen.aspx.vb @@ -593,9 +593,6 @@ Partial Class Inventarios_TraspasoAlmacen End If End If - 'codigo provisional. - Dim CveSubP As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa, CveAlmacen:=DdlAlmacenOrigen.SelectedValue.ToEntero).FiltroPrimeroValor("CveSubProyecto", "").ToEntero - If DrPS("AplicaCaducidad").ToString = "True" Then If Not ChkSugiereFechaCaducidad.Checked AndAlso (TxtnFechaCaducidad.Text = "" OrElse TxtnLote.Text = "") Then Alert("Falta Especificar lote/Fecha del producto", TipoMensaje.MsgAdvertencia) @@ -790,10 +787,10 @@ Partial Class Inventarios_TraspasoAlmacen Private Sub LimpiaAgregar() 'DdlClasificacion.SelectedValue = "-1" 'DdlClasificacion_SelectedIndexChanged(DdlClasificacion, EventArgs.Empty) - txtCantidad.Text = "" + txtCantidad.Text = "1" TxtnObservaciones.Text = "" TxtnSerie.Text = "" - TxtnSerie.Visible = False + 'TxtnSerie.Visible = False TxtnLote.Text = "" TxtnFechaCaducidad.Text = "" @@ -951,14 +948,33 @@ Partial Class Inventarios_TraspasoAlmacen If ObjInventario.GetExistenciasProducto(gvr.DataKey("CvePS").ToEntero, gvr.DataKey("CveUM").ToEntero, UsuarioActual.CveEmpresa, DdlAlmacenOrigen.SelectedValue.ToEntero, FechaMovto:=TxtFecha.Text.ToDate.ToString("yyyy/MM/dd 23:59"), CveSeccionAlmacen:=CveSeccionAlmacen, Serie:=Serie, Lote:=Lote, Caducidad:=FechaCaducidad) Then 'si hay existencia en almacen costeado, lo tengo que sacar + ' si tiene serie el producto, debe de Existencia = ObjInventario.DtResultados.FiltroPrimeroValor("ExistenciaFinal", String.Format("CveAlmacen = {0}", DdlAlmacenOrigen.SelectedValue)).ToDecimal + Dim ExistenciaSinPendiente As Decimal = ObjInventario.DtResultados.FiltroPrimeroValor("Existencia", String.Format("CveAlmacen = {0}", DdlAlmacenOrigen.SelectedValue)).ToDecimal + Dim PendienteporSurtir As Decimal = ObjInventario.DtResultados.FiltroPrimeroValor("PendientePorSurtir", String.Format("CveAlmacen = {0}", DdlAlmacenOrigen.SelectedValue)).ToDecimal + + ' si la existencia es negativa y tiene serie ó lote, quiere decir que la consulta es específica, y si hay pendientes por surtir. puede generar negativos + ' para asegurarnos que lo pendiente por surtir se pueda surtir con otras series, consultamos de nuevo, pero a nivel producto, para checar existencia + + If ExistenciaSinPendiente > 0 AndAlso Existencia < 0 AndAlso PendienteporSurtir > 0 Then + If ObjInventario.GetExistenciasProducto(gvr.DataKey("CvePS").ToEntero, gvr.DataKey("CveUM").ToEntero, UsuarioActual.CveEmpresa, DdlAlmacenOrigen.SelectedValue.ToEntero, FechaMovto:=TxtFecha.Text.ToDateTime.ToString("yyyy/MM/dd 23:59")) Then + 'si hay existencia en almacen costeado, lo tengo que sacar + Existencia = ObjInventario.DtResultados.FiltroPrimeroValor("ExistenciaFinal", String.Format("CveAlmacen = {0}", DdlAlmacenOrigen.SelectedValue)).ToDecimal + 'si la existencia del producto en general, supera a lo pendiente, entonces la serie si se puede sacar. + If Existencia > PendienteporSurtir Then + Existencia = ExistenciaSinPendiente + Else + Existencia = ExistenciaSinPendiente - PendienteporSurtir + End If + + End If + End If + End If Existencia -= gvr.FCTextBox("TxtCantidad2").Text.ToEntero() If Existencia < 0 Then ErrorExistencia = True - - 'gvr.FCTextBox("TxtCantidad2").Text = (Existencia + gvr.FCTextBox("TxtCantidad2").Text.ToEntero).ToString TextoExistencia.AppendFormat("-#{0} {1} {2}   Existencia: {3}
    ", gvr.DataKey("No"), gvr.DataKey("PS"), If(gvr.DataKey("Serie").ToString().Trim().Length > 0, $"   Serie: {gvr.DataKey("Serie")}", ""), (Existencia + gvr.FCTextBox("TxtCantidad2").Text.ToEntero)) End If Next @@ -1224,8 +1240,6 @@ Partial Class Inventarios_TraspasoAlmacen RegistraScript("playsonidito(''142608__autistic-lucario__error.wav'')") End If - ' If ObjContaAC IsNot Nothing Then ObjContaAC.Dispose() - 'SI OCURRIO UN ERROR EN LA EXISTENCIA RECARGAMOS EL GRID PARA COLOREAR LOS DETALLES CON ERROR If ErrorExistencia Then CargaGvDatos() @@ -1234,98 +1248,6 @@ Partial Class Inventarios_TraspasoAlmacen ObjInventario.Dispose() End Sub - 'Function ConsumoInterno(TipoAlmacenOrigen As Integer, TipoAlmacenDestino As Integer) As Boolean - ' Dim Retorno As Boolean = False - ' Dim ErrorMovInv As Boolean = False - ' Dim TextoError As String = "" - ' Dim Fecha As Date = TxtFecha.Text.ToDate - - ' Dim ObjInventario As New ClsInventarios - ' Dim ObjConta As New ClsContabilidad(ObjInventario.IniciaTransacSQL()) - ' Dim CveMovimiento As Integer = 0 - ' Dim TipoMovto = If(TipoAlmacenOrigen = 14, -1, 1) - ' Dim CveConceptoInventario As Integer = 8 - - - ' Dim CveAlmacenCI = If(TipoAlmacenOrigen = 14, DdlAlmacenOrigen.SelectedValue.ToEntero, DdlAlmacenDestino.SelectedValue.ToEntero) - ' Dim DtCostos As DataTable = Nothing - ' Dim ValorInventario As Decimal = 0 - - ' 'AGREGAMOS LA SALIDA DEL ALMACEN ORIGEN - ' CveMovimiento = ObjInventario.AddMovimiento(DdlAlmacenOrigen.SelectedValue.ToEntero, CveConceptoInventario, 1, Fecha, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, - ' Observaciones:=TxtObservaciones.Text.Trim, Recibio:=If(ChkTransitorio.Checked, TxtResponsable.Text.Trim, ""), - ' GastoIndirecto:=If(ChkTransitorio.Checked And TxtGastoIndirecto.Text.ToDouble > 0, TxtGastoIndirecto.Text, "-1").ToDouble, Modulo:="TA/G4") - ' Dim FolioMov As Integer = ObjInventario.Folio - - ' If CveMovimiento <= 0 Then - ' TextoError = "No se pudo generar el movimiento de salida correctamente" - ' ErrorMovInv = True - ' Else - - ' For Each Dr As DataRow In DtMovimientos.Rows - ' If Not ObjInventario.AddMovimientoDetalle(CveMovimiento, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, 0, Dr("CveAF").ToString.ToEntero, -1, Dr("Serie").ToString, Lote:=Dr("Lote").ToString, FechaCaducidad:=Dr("FechaCaducidad").ToString.ToDate) Then - ' ErrorMovInv = True - ' TextoError = "Ocurrió un error al guardar los movimientos de salida" - ' Exit For - ' End If - ' Next - ' End If - - ' If ObjInventario.GetMovimientosDetalle(CveMovimiento, UsuarioActual.CveEmpresa) Then - ' DtCostos = ObjInventario.DtResultados - ' Dim tmpCostos As DataTable = DtCostos.FiltraParametros("", "", {"CveClasificacion"}) - ' Dim IdCtaContable As Integer = 0 - ' Dim CveCuenta As Integer = 0 - - ' If tmpCostos.Rows.Count > 0 Then - ' Dim Concepto As String = $"Consumo Interno: {ObjInventario.Folio} - {TxtObservaciones.Text}" - ' Dim CvePrePoliza = ObjConta.AddPrePolizas("Inv/ConsumoInterno", 53, DtCostos.SUM("Total") * TipoMovto, DtCostos.SUM("Total") * TipoMovto, 1, TxtFecha.Text.ToDate, $"Consumo Interno: {TxtObservaciones.Text}", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) - - ' For Each RowInv As DataRow In tmpCostos.Rows - ' ValorInventario = DtCostos.SUM("Total", $"CveClasificacion = {RowInv("CveClasificacion")}").ToString.ToDecimal - ' IdCtaContable = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaGasto", $"CveClasificacion = {RowInv("CveClasificacion")}").ToEntero - ' CveCuenta = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaGastoSIG", $"CveClasificacion = {RowInv("CveClasificacion")}").ToEntero - ' If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, ValorInventario * TipoMovto, Concepto, 181, Concepto, TxtFecha.Text.ToDate, IdCtaContable, -1, CveClasificacion:=RowInv("CveClasificacion").ToString.ToEntero, CveMovimientoAlmacen:=CveMovimiento, ImporteMX:=ValorInventario * TipoMovto, CveCuenta:=CveCuenta) Then - ' ErrorMovInv = True - ' Exit For - ' End If - ' Next - - ' IdCtaContable = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", $"CveAlmacen={CveAlmacenCI}").ToEntero - - ' If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, DtCostos.SUM("Total").ToDecimal * TipoMovto, Concepto, 68, Concepto, TxtFecha.Text.ToDate, IdCtaContable, -1, CveMovimientoAlmacen:=CveMovimiento, ImporteMX:=DtCostos.SUM("Total").ToDecimal * TipoMovto) Then - ' ErrorMovInv = True - ' End If - - ' End If - ' End If - - ' If Not ErrorMovInv Then - - ' ObjInventario.Commit() - ' Dim Mensaje As StringBuilder = New StringBuilder - - ' Mensaje.Append("Se realizó el consumo interno.") - - ' Mensaje.AppendFormat("
    Folio: {0}", FolioMov, CveMovimiento) - - ' Alert(Mensaje.ToString, TipoMensaje.MsgInformacion) - ' Mensaje.Clear() - - ' LimpiaMovimiento() - - ' Else - ' ObjInventario.RollBack() - ' Alert(TextoError, TipoMensaje.MsgError) - ' RegistraScript("playsonidito(''142608__autistic-lucario__error.wav'')") - ' End If - - - - ' Return Retorno - - 'End Function - #End Region @@ -1463,42 +1385,6 @@ Partial Class Inventarios_TraspasoAlmacen TdFechaCaducidad.Visible = GvDatos.Columns(7).Visible : ThFechaCaducidad.Visible = GvDatos.Columns(7).Visible GvDatos.Columns(8).Visible = DtTemp.MAX("CveSeccionAlmacen").ToString.ToEntero > 0 - ''TxtnSerie.Visible = False - ''ThSerie.Visible = False - ''TdSerie.Visible = False - 'GvDatos.Columns(5).Visible = False - - 'TxtnLote.Visible = False - 'ThLote.Visible = False - 'TdLote.Visible = False - 'GvDatos.Columns(6).Visible = False - - 'TxtnFechaCaducidad.Visible = False - 'ThFechaCaducidad.Visible = False - 'TdFechaCaducidad.Visible = False - 'GvDatos.Columns(7).Visible = False - - - 'If DtTemp.MAX("Serie").ToString <> "" Then - ' TxtnSerie.Visible = True - ' ThSerie.Visible = True - ' TdSerie.Visible = True - ' GvDatos.Columns(5).Visible = True - 'End If - 'If DtTemp.MAX("Lote").ToString <> "" Then - ' TxtnLote.Visible = True - ' ThLote.Visible = True - ' TdLote.Visible = True - ' GvDatos.Columns(6).Visible = True - 'End If - 'If DtTemp.MAX("FechaCaducidad").ToString.ToDate > MinFecha Then - ' TxtnFechaCaducidad.Visible = True - ' ThFechaCaducidad.Visible = True - ' TdFechaCaducidad.Visible = True - ' GvDatos.Columns(7).Visible = True - - 'End If - End Sub Protected Sub GvDatos_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvDatos.RowDataBound @@ -1514,47 +1400,6 @@ Partial Class Inventarios_TraspasoAlmacen e.Row.FCTextBox("TxtCantidad2").Attributes.Add("onblur", String.Format("ValidaCantidad(this,{0})", e.Row.DBCampo("Cantidad"))) End If - 'If If(e.Row.DBCampo("Serie").ToString = "", "-1", e.Row.DBCampo("Serie").ToString) <> "-1" Then - ' TxtnSerie.Visible = True - ' ThSerie.Visible = True - ' TdSerie.Visible = True - ' GvDatos.Columns(4).Visible = True - ' e.Row.Cells(4).Text = e.Row.DBCampo("Serie").ToString - 'Else - ' e.Row.Cells(4).Text = "" - 'End If - - 'If If(e.Row.DBCampo("Lote").ToString = "", "-1", e.Row.DBCampo("Lote").ToString) <> "-1" Then - ' TxtnLote.Visible = True - ' ThLote.Visible = True - ' TdLote.Visible = True - ' GvDatos.Columns(5).Visible = True - ' e.Row.Cells(5).Text = e.Row.DBCampo("Lote").ToString - - ' TxtnBatch.Visible = True - ' ThBatch.Visible = True - ' TdBatch.Visible = True - ' GvDatos.Columns(6).Visible = True - - 'Else - ' e.Row.Cells(5).Text = "" - ' e.Row.Cells(6).Text = "" - 'End If - - 'If e.Row.RowState = DataControlRowState.Edit Then - ' e.Row.FCDropDownList("DdlUnidad").DataSource = GlobalDTUnidadesMedida(UsuarioActual.CveEmpresa) - ' e.Row.FCDropDownList("DdlUnidad").DataBind() - ' e.Row.FCDropDownList("DdlUnidad").SelectedValue = e.Row.DBCampo("CveUM") - - ' e.Row.FCDropDownList("DdlClasificacion").DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa) - ' e.Row.FCDropDownList("DdlClasificacion").DataBind() - ' e.Row.FCDropDownList("DdlClasificacion").SelectedValue = e.Row.DBCampo("CveClasificacion") - - ' e.Row.FCDropDownList("DdlProducto").DataSource = GlobalDTProductosServicios(UsuarioActual.CveEmpresa) - ' e.Row.FCDropDownList("DdlProducto").DataBind() - ' e.Row.FCDropDownList("DdlProducto").SelectedValue = e.Row.DBCampo("CvePS") - 'End If - End If End Sub Protected Sub GvPS_RowDeleting(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles GvDatos.RowDeleting @@ -1566,60 +1411,6 @@ Partial Class Inventarios_TraspasoAlmacen CargaGvDatos() End Sub - 'Protected Sub GvM_RowEditing(sender As Object, e As GridViewEditEventArgs) Handles GvDatos.RowEditing - ' GvDatos.EditIndex = e.NewEditIndex - - ' CargaGvDatos() - 'End Sub - 'Protected Sub GvM_RowUpdating(sender As Object, e As GridViewUpdateEventArgs) Handles GvDatos.RowUpdating - ' Dim dr = GvDatos.Rows(e.RowIndex) - - ' Dim Cantidad = dr.FCTextBox("TxtCantidad").Text.ToDouble - ' Dim CveUM = dr.FCDropDownList("DdlUnidad").SelectedValue.ToEntero - ' Dim CveClasificacion = dr.FCDropDownList("DdlClasificacion").SelectedValue.ToEntero - ' Dim CvePS = dr.FCDropDownList("DdlProducto").SelectedValue.ToEntero - ' Dim No = dr.DataKey("No").ToEntero - ' Dim Serie As String = dr.FCTextBox("TxtSerie").Text - - ' 'VALIDA EXISTENCIA - ' Dim Valido = True - ' Dim Inv As New ClsInventarios - ' Dim Existencia As Double = Inv.GetExistenciasPS(CvePS, CveUM, UsuarioActual.CveEmpresa, DdlAlmacenOrigen.SelectedValue.ToEntero, -1, TxtFecha.Text.ToDate.ToString("yyyy/MM/dd 23:59"), If(Serie = "", "-1", Serie)) - ' Inv.Dispose() - - ' If Existencia - txtCantidad.Text.ToDouble < 0 Then - ' If Existencia <= 0 Then - ' Alert("No hay existencia del producto", TipoMensaje.MsgError) - ' Else - ' Alert(String.Format("Solo hay en existencia: {0}", Existencia), TipoMensaje.MsgError) - ' End If - ' Valido = False - ' End If - - ' If Valido Then - - ' Dim Drs As DataRow() = DtMovimientos.Select(String.Format("No = {0}", No)) - ' If Drs.Count = 1 Then - - ' Drs(0)("Cantidad") = Cantidad - ' Drs(0)("CveUM") = CveUM - ' Drs(0)("CveClasificacion") = CveClasificacion - ' Drs(0)("CvePS") = CvePS - ' Drs(0)("EstatusExistencia") = "1" - ' End If - - - ' DtMovimientos.AcceptChanges() - ' GvDatos.EditIndex = -1 - ' End If - ' CargaGvDatos() - - 'End Sub - 'Protected Sub GvM_RowCancelingEdit(sender As Object, e As GridViewCancelEditEventArgs) Handles GvDatos.RowCancelingEdit - ' GvDatos.EditIndex = -1 - ' CargaGvDatos() - 'End Sub - Protected Sub ChkSugiereFechaCaducidad_CheckedChanged(sender As Object, e As EventArgs) TxtnFechaCaducidad.Visible = Not ChkSugiereFechaCaducidad.Checked