diff --git a/App_Code/ClsClasificaciones.vb b/App_Code/ClsClasificaciones.vb index 2be1a8152..212594b67 100644 --- a/App_Code/ClsClasificaciones.vb +++ b/App_Code/ClsClasificaciones.vb @@ -112,12 +112,12 @@ Public Class ClsClasificaciones Public Sub Commit() If SqlTransacc IsNot Nothing Then SqlTransacc.Commit() SqlTransacc = Nothing - End Sub - - + End Sub + + #Region "C L A S I F I C A C I O N E S" - - + + Public Function GetClasificaciones(Optional CveEmpresa As Integer = -1, Optional Tipo As Integer = 1) As Boolean Dim Retorno As Boolean = False @@ -134,6 +134,46 @@ Public Class ClsClasificaciones OnError("Ocurrió un error al consultar las Clasificaciones.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) End Try + Return Retorno + End Function + + Public Function GetClasificacionesComprobaciones(CveEmpresa As Integer, Optional Opcion As Integer = 1, Optional TipoComprobacion As Integer = -1) As Boolean + Dim Retorno As Boolean = False + + DataAdapter("PA_ClasificacionesComprobacionesGet") + + With SqlAdapter.SelectCommand.Parameters + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + .Add("@Opcion", SqlDbType.Int).Value = Opcion + .Add("@TipoComprobacion", SqlDbType.Int).Value = TipoComprobacion + End With + Try + SqlAdapter.Fill(Data) + Retorno = True + Catch ex As SqlException + OnError("Ocurrió un error al consultar las Clasificaciones de comprobaciones.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + End Try + + Return Retorno + End Function + + Public Function AddClasificacionesComprobaciones(CveClasificacion As Integer, CveEmpresa As Integer, TipoComprobacion As Integer) As Boolean + Dim Retorno As Boolean = False + + DataAdapter("PA_ClasificacionesComprobacionesAdd") + + With SqlAdapter.SelectCommand.Parameters + .Add("@CveClasificacion", SqlDbType.Int).Value = CveClasificacion + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + .Add("@TipoComprobacion", SqlDbType.Int).Value = TipoComprobacion + End With + Try + SqlAdapter.Fill(Data) + Retorno = True + Catch ex As SqlException + OnError("Ocurrió un error al modificar la clasificación.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + End Try + Return Retorno End Function diff --git a/App_Code/ClsClientes.vb b/App_Code/ClsClientes.vb index b1400d88a..5ec8dc12c 100644 --- a/App_Code/ClsClientes.vb +++ b/App_Code/ClsClientes.vb @@ -519,13 +519,14 @@ Public Class ClsClientes 'SqlAdapter.Dispose() Return Retorno End Function - Public Function GetHistorialVentas(CveCliente As Integer, Optional SelectTop As Integer = -1, Optional CveClienteSucursal As Integer = -1) As Boolean + Public Function GetHistorialVentas(CveCliente As Integer, Optional SelectTop As Integer = -1, Optional CveClienteSucursal As Integer = -1, Optional TipoDocto As String = "-1") As Boolean Dim Retorno As Boolean = False DataAdapter("PA_ClienteHistorialVentas") SqlAdapter.SelectCommand.Parameters.Add("@CveCliente", SqlDbType.Int).Value = CveCliente SqlAdapter.SelectCommand.Parameters.Add("@SelectTop", SqlDbType.Int).Value = SelectTop SqlAdapter.SelectCommand.Parameters.Add("@CveClienteSucursal", SqlDbType.Int).Value = CveClienteSucursal + SqlAdapter.SelectCommand.Parameters.Add("@TipoDocto", SqlDbType.VarChar).Value = TipoDocto Try SqlAdapter.Fill(Data) diff --git a/App_Code/ClsContabilidad.vb b/App_Code/ClsContabilidad.vb index 1f94c267d..14500b57d 100644 --- a/App_Code/ClsContabilidad.vb +++ b/App_Code/ClsContabilidad.vb @@ -6230,7 +6230,7 @@ Public Class ClsContabilidad .Add("@Opcion", SqlDbType.Int).Value = Opcion .Add("@Valor", SqlDbType.Int).Direction = ParameterDirection.Output .Add("@MsgSalida", SqlDbType.VarChar, 100).Direction = ParameterDirection.Output - .Add("@MsgPrePolizaSalida", SqlDbType.VarChar, 800).Direction = ParameterDirection.Output + .Add("@MsgPrePolizaSalida", SqlDbType.VarChar, 8000).Direction = ParameterDirection.Output .Add("@Diferencia", SqlDbType.Float).Direction = ParameterDirection.Output End With @@ -6366,8 +6366,10 @@ Public Class ClsContabilidad Return Retorno End Function - Public Function UpdatePeriodosBloqueo(CveEmpresa As Integer, Ejercicio As Integer, Mes1 As Integer, Mes2 As Integer, Mes3 As Integer, Mes4 As Integer, Mes5 As Integer, Mes6 As Integer, Mes7 As Integer, Mes8 As Integer, Mes9 As Integer, Mes10 As Integer, Mes11 As Integer, Mes12 As Integer, CveUsuario As Integer) As Boolean - Dim Retorno = False + Public Function UpdatePeriodosBloqueo(CveEmpresa As Integer, Ejercicio As Integer, Mes1 As Boolean, Mes2 As Boolean, Mes3 As Boolean, Mes4 As Boolean, Mes5 As Boolean, + Mes6 As Boolean, Mes7 As Boolean, Mes8 As Boolean, Mes9 As Boolean, Mes10 As Boolean, Mes11 As Boolean, Mes12 As Boolean, + CveUsuario As Integer) As String + Dim Retorno = "" DataAdapter("PA_Conta_EmpresasBloqueoMesesUpdate") With SqlAdapter.SelectCommand.Parameters @@ -6386,16 +6388,19 @@ Public Class ClsContabilidad .Add("@Mes11", SqlDbType.Bit).Value = Mes11 .Add("@Mes12", SqlDbType.Bit).Value = Mes12 .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario + .Add("@MensajeError", SqlDbType.VarChar, 500).Direction = ParameterDirection.Output End With Try SqlAdapter.Fill(Data) - Retorno = True + Retorno = SqlAdapter.SelectCommand.Parameters("@MensajeError").Value.ToString Catch ex As Exception Me.OnError("Ocurrió un error al actualizar el Periodo de Bloqueo.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + Retorno = "" End Try Return Retorno + End Function Public Function RemovePeriodosBloqueo(CveEmpresa As Integer, Ejercicio As Integer) As Boolean Dim Retorno = False diff --git a/App_Code/ClsInventarios.vb b/App_Code/ClsInventarios.vb index fcd8bcd3f..e0cc7a960 100644 --- a/App_Code/ClsInventarios.vb +++ b/App_Code/ClsInventarios.vb @@ -1241,7 +1241,7 @@ Public Class ClsInventarios Return Retorno End Function - Public Function GetMovimientosDetalleVirtual(CveMovimiento As Integer, CveEmpresa As Integer, Optional CveCompra As Integer = -1) As Boolean + Public Function GetMovimientosDetalleVirtual(CveMovimiento As Integer, CveEmpresa As Integer, Optional CveCompra As Integer = -1, Optional CveMovimientoRelacionado As Integer = -1) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Inv_MovimientosDetalleVirtualGet") @@ -1249,6 +1249,7 @@ Public Class ClsInventarios .Add("@CveMovimiento", SqlDbType.Int).Value = CveMovimiento .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa .Add("@CveCompra", SqlDbType.Int).Value = CveCompra + .Add("@CveMovimientoRelacionado", SqlDbType.Int).Value = CveMovimientoRelacionado End With Try SqlAdapter.Fill(Data) diff --git a/App_Code/ClsMovimientos.vb b/App_Code/ClsMovimientos.vb index 85846866e..fe4714eff 100644 --- a/App_Code/ClsMovimientos.vb +++ b/App_Code/ClsMovimientos.vb @@ -851,14 +851,16 @@ Public Class ClsMovimientos Return Retorno End Function - Public Function GetChequesFYE(CveEmpresa As Integer) As Boolean + Public Function GetChequesFYE(CveEmpresa As Integer, Optional FechaI As DateTime = ModExtensiones.MinFecha, Optional FechaF As DateTime = ModExtensiones.MaxFecha) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Banc_ReporteChequesFYEGet") With SqlAdapter.SelectCommand.Parameters - .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + .Add("@FechaI", SqlDbType.DateTime).Value = FechaI + .Add("@FechaF", SqlDbType.DateTime).Value = FechaF End With Try @@ -1278,14 +1280,16 @@ Public Class ClsMovimientos Return Retorno End Function - Public Function GetCxPPersonalCajaChica(CveEmpresa As Integer, CvePersonal As Integer, CveCajaChica As Integer, NumeroReembolso As String) As Boolean + Public Function GetCxPPersonalCajaChica(CveEmpresa As Integer, CvePersonal As Integer, CveCajaChica As Integer, NumeroReembolso As String, Optional FechaI As DateTime = ModExtensiones.MinFecha, Optional FechaF As DateTime = ModExtensiones.MaxFecha) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_CxPPersonalCajaChica") With SqlAdapter.SelectCommand.Parameters .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa .Add("@CvePersonal", SqlDbType.Int).Value = CvePersonal .Add("@CveCajaChica", SqlDbType.Int).Value = CveCajaChica - .Add("@NumeroReembolso", SqlDbType.VarChar).Value = NumeroReembolso + .Add("@NumeroReembolso", SqlDbType.VarChar).Value = NumeroReembolso + .Add("@FechaI", SqlDbType.DateTime).Value = FechaI + .Add("@FechaF", SqlDbType.DateTime).Value = FechaF End With Try diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb index cffe62b37..e5f944455 100644 --- a/App_Code/ClsPaginas.vb +++ b/App_Code/ClsPaginas.vb @@ -4183,6 +4183,7 @@ Public Class ClsPaginas 'GENERAL #Region "General" PaginaDict.Add("/General/CatClasificaciones.aspx".ToUpper(), 425) + PaginaDict.Add("/General/CatClasificacionesComprobaciones.aspx".ToUpper(), 1308) PaginaDict.Add("/General/CatPSCaracteristicas.aspx".ToUpper(), 101) PaginaDict.Add("/General/CatCategorias.aspx".ToUpper(), 233) PaginaDict.Add("/General/SaldosIniciales.aspx".ToUpper(), 526) @@ -5268,7 +5269,7 @@ Public Class ClsPaginas End If sw.Stop() - If sw.Elapsed.TotalSeconds > 1 Then + If sw.Elapsed.TotalSeconds > 5 Then GuardaLog($"Reporte:{RutaReporte} | Tiempo Renderizado Milisegundos: {sw.ElapsedMilliseconds},Total Segundos: {sw.Elapsed.TotalSeconds} ") End If diff --git a/App_Code/Modelos.vb b/App_Code/Modelos.vb index 6b853e4f4..bb508bd69 100644 --- a/App_Code/Modelos.vb +++ b/App_Code/Modelos.vb @@ -3186,8 +3186,9 @@ Namespace Modelos Next End If - 'Si es Facturacion de una remision cancelamos, traspasamos saldos y agregamos evento a la bitacora - If (DtRemisionesRelacionadas IsNot Nothing AndAlso DtRemisionesRelacionadas.Rows.Count > 0) OrElse ObjFactura.RemisionesLista.Count > 0 Then + 'SI ES FACTURACION DE UNA REMISION CANCELAMOS, TRASPASAMOS SALDOS Y AGREGAMOS EVENTO A LA BITACORA + 'NO DEBE ENTRAR SI SE ESTA CANCELANDO UNA FACTURA + If ValorMultiplicador <> -1 AndAlso (DtRemisionesRelacionadas IsNot Nothing AndAlso DtRemisionesRelacionadas.Rows.Count > 0) OrElse ObjFactura.RemisionesLista.Count > 0 Then If Not ObjFactura.TipoDocto.Contiene("Ing", "Ant") Then ErrorPrepoliza = True diff --git a/App_Code/Timbrado.vb b/App_Code/Timbrado.vb index bdc8f9635..88e4f9c15 100644 --- a/App_Code/Timbrado.vb +++ b/App_Code/Timbrado.vb @@ -1263,8 +1263,8 @@ Public Class Timbrado ObjCFDITimbre.Complementos.ComercioExterior11.Emisor.Pais, ObjCFDITimbre.Complementos.ComercioExterior11.Emisor.CP) 'RECEPTOR - cfdi.agregarComercioExterior11Receptor(ObjCFDITimbre.Complementos.ComercioExterior11.Receptor.NumRegIdTrib) - cfdi.agregarComercioExterior11DomicilioReceptor(ObjCFDITimbre.Complementos.ComercioExterior11.Receptor.Calle, + cfdi.agregarComercioExterior11Receptor(ObjCFDITimbre.Complementos.ComercioExterior11.Receptor.NumRegIdTrib, + ObjCFDITimbre.Complementos.ComercioExterior11.Receptor.Calle, ObjCFDITimbre.Complementos.ComercioExterior11.Receptor.NumeroExterior, ObjCFDITimbre.Complementos.ComercioExterior11.Receptor.NumeroInterior, ObjCFDITimbre.Complementos.ComercioExterior11.Receptor.Colonia, diff --git a/Ashx/SIGWeb.ashx b/Ashx/SIGWeb.ashx index 6b81beb8a..c4c0f3fcb 100644 --- a/Ashx/SIGWeb.ashx +++ b/Ashx/SIGWeb.ashx @@ -365,7 +365,7 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState Dim i As Integer = 0 While i < objInv.DtResultados.Columns.Count - If Not objInv.DtResultados.Columns(i).ColumnName.Contiene("CvePS", "PSCodigo", "PSCodigoClasificacion") AndAlso objInv.DtResultados.SUM(String.Format("[{0}]", objInv.DtResultados.Columns(i).ColumnName)) = 0 Then + If Not objInv.DtResultados.Columns(i).ColumnName.Contiene("CvePS", "PSCodigo", "PSCodigoClasificacion", "CveClasificacion") AndAlso objInv.DtResultados.SUM(String.Format("[{0}]", objInv.DtResultados.Columns(i).ColumnName)) = 0 Then objInv.DtResultados.Columns.RemoveAt(i) Else i = i + 1 @@ -460,8 +460,7 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState 'Try, generado para cuando el resultado no tiene valores(The source contains no DataRows.), no detenga la ejecucion, no se le puso un count previo, porque el costo se duplica, al preguntar y luego ordenar y convertir a datatable Try - DtPSRetorno = New DataView(DTPS.OrderBy(Function(a) a!PSCodigo).CopyToDataTable).ToTable(True, {"CvePS", "PSCodigo", "PSCodigoClasificacion"}) - + DtPSRetorno = New DataView(DTPS.OrderBy(Function(a) a!PSCodigo).CopyToDataTable).ToTable(True, {"CvePS", "PSCodigo", "PSCodigoClasificacion", "CveClasificacion"}) Catch ex As Exception DtPSRetorno = Nothing End Try @@ -469,7 +468,61 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState End If DTPS = Nothing End If + + + + + + If (usuario.TienePermisoProceso(300) Or usuario.TienePermisoProceso(301)) And (DtPSRetorno IsNot Nothing AndAlso DtPSRetorno.Rows.Count > 0) Then + + Dim ObjClasificaciones As New ClsClasificaciones() + Dim DTClasificacionesComprobaciones As DataTable + + Dim DTTmp As DataTable = DtPSRetorno.Clone + + + If ObjClasificaciones.GetClasificacionesComprobaciones(usuario.CveEmpresa) Then + + If usuario.TienePermisoProceso(300) And usuario.TienePermisoProceso(301) Then + DTClasificacionesComprobaciones = ObjClasificaciones.DtResultados + ElseIf usuario.TienePermisoProceso(300) Then 'TipoComprobacion 1 Biaticos + DTClasificacionesComprobaciones = ObjClasificaciones.DtResultados.FiltraParametros("TipoComprobacion = 1") + Else 'TipoComprobacion 2 Compreobacines + DTClasificacionesComprobaciones = ObjClasificaciones.DtResultados.FiltraParametros("TipoComprobacion = 2") + End If + + For Each pRow As DataRow In DtPSRetorno.Rows + + For Each drow As DataRow In DTClasificacionesComprobaciones.Rows + If pRow("CveClasificacion").ToString.ToEntero = drow("CveClasificacion").ToString.ToEntero Then + + Dim nRow As DataRow = DTTmp.NewRow + nRow("CvePS") = pRow("CvePS") + nRow("PSCodigo") = pRow("PSCodigo") + nRow("PSCodigoClasificacion") = pRow("PSCodigoClasificacion") + nRow("CveClasificacion") = pRow("CveClasificacion") + DTTmp.Rows.Add(nRow) + + + End If + Next + + Next + + DtPSRetorno = DTTmp.Copy + + Else + 'no regresar datos herror al consultar + DtPSRetorno.Clear() + End If + + End If + + + If DtPSRetorno IsNot Nothing AndAlso DtPSRetorno.Rows.Count > 0 Then + + DtPSRetorno.Columns("CvePS").ColumnName = "id" DtPSRetorno.Columns(PSCodigoDescripcion).ColumnName = "text" If PSCodigoDescripcion = "PSCodigo" Then @@ -477,8 +530,10 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState Else DtPSRetorno.Columns().Remove("PSCodigo") End If + retorno = JsonConvert.SerializeObject(DtPSRetorno).ToString context.Response.Write(retorno) + Else context.Response.Write("[]") End If diff --git a/Bancos/PopIEVentas.aspx.vb b/Bancos/PopIEVentas.aspx.vb index 1395d747c..6d65cb6d8 100644 --- a/Bancos/PopIEVentas.aspx.vb +++ b/Bancos/PopIEVentas.aspx.vb @@ -2090,54 +2090,82 @@ Partial Class Bancos_PopIEVentas IdCtaContable = UsuarioActual.Empresa.IdCuentaGananciaCambiaria CveCuenta = UsuarioActual.Empresa.CveCuentaGananciaCambiaria - Dim TCImpuestos As Decimal = If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioVenta) - TimpocambioGeneral = TCImpuestos + Dim tImporteVenta, tImportePago, Diferencia As Decimal + ImporteMovimiento = 0 - Dim Diferencia As Decimal = ((MovimientoPagar.Total * PorcentajePago) * tipoCambioVentaValuacion) - ((MovimientoPagar.Total * PorcentajePago) * tipoCambioPago) 'Añadimos la diferencia de perdida en la venta - Diferencia -= ((MovimientoPagar.IVA * PorcentajePago) * tipoCambioVenta) - ((MovimientoPagar.IVA * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el IVA - Diferencia += ((MovimientoPagar.RetIVA * PorcentajePago) * tipoCambioVenta) - ((MovimientoPagar.RetIVA * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el RetIVA - Diferencia += ((MovimientoPagar.RetISR * PorcentajePago) * tipoCambioVenta) - ((MovimientoPagar.RetISR * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el RetISR - Diferencia -= ((MovimientoPagar.IEPS * PorcentajePago) * tipoCambioVenta) - ((MovimientoPagar.IEPS * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el IEPS - Diferencia = Math.Round(Diferencia, 2) + If CveMonedaVenta = 1 And CveMoneda = 2 Then + 'factura pesos, pago en dolares + tImporteVenta = ((MovimientoPagar.Total * PorcentajePago) * tipoCambioVenta).RoundSQL + tImportePago = ((MovimientoPagar.Total * PorcentajePago) * tipoCambioVenta / tipoCambioPago).RoundSQL + ElseIf CveMonedaVenta = 2 And CveMoneda = 2 Then + 'factura dolares, pago en dolares + tImporteVenta = ((MovimientoPagar.Total * PorcentajePago) * tipoCambioVenta).RoundSQL + tImportePago = ((MovimientoPagar.Total * PorcentajePago) * tipoCambioPago).RoundSQL + ElseIf CveMonedaVenta = 2 And CveMoneda = 1 Then + 'factura dolares, pago en pesos + tImporteVenta = ((MovimientoPagar.Total * PorcentajePago) * tipoCambioVenta).RoundSQL + tImportePago = ((MovimientoPagar.Total * PorcentajePago) * tipoCambioPago).RoundSQL + End If + + If tImporteVenta <> tImportePago Then + If tImporteVenta < tImportePago Then + CveConcepto = 64 + Else + CveConcepto = 65 + End If + Diferencia = Math.Abs(tImporteVenta - tImportePago) + End If + + ' si tiene funcionalidad para que tome el TC de pago, que solo afecta a los impuestos + If FuncionalidadFluctuacionImpuestos Then + Dim TCImpuestos As Decimal = tipoCambioPago + TimpocambioGeneral = TCImpuestos + + Diferencia -= ((MovimientoPagar.IVA * PorcentajePago) * tipoCambioVenta) - ((MovimientoPagar.IVA * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el IVA + Diferencia += ((MovimientoPagar.RetIVA * PorcentajePago) * tipoCambioVenta) - ((MovimientoPagar.RetIVA * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el RetIVA + Diferencia += ((MovimientoPagar.RetISR * PorcentajePago) * tipoCambioVenta) - ((MovimientoPagar.RetISR * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el RetISR + Diferencia -= ((MovimientoPagar.IEPS * PorcentajePago) * tipoCambioVenta) - ((MovimientoPagar.IEPS * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el IEPS + Diferencia = Math.Round(Diferencia, 2) + End If '' se considera, las diferencias, y no el tipo de cambio, por el caso de las fluctuaciones '' si tiene funcionalidad de flucturación con ivas, tomar tipocambioventa - If Diferencia < 0 AndAlso CveMonedaVenta = 2 Then - ImporteMovimiento = Math.Abs(Diferencia) - ImporteMX = ImporteMovimiento - End If + 'If Diferencia < 0 AndAlso CveMonedaVenta = 2 Then + ' ImporteMovimiento = Math.Abs(Diferencia) + ' ImporteMX = ImporteMovimiento + 'End If Else ImporteMovimiento = 0 End If CveSubProyectoContabilizar = CveSubProyectoVenta - Case 65 'Perdida - If CveMoneda <> 1 OrElse CveMonedaVenta <> 1 Then - IdCtaContable = UsuarioActual.Empresa.IdCuentaPerdidaCambiaria - CveCuenta = UsuarioActual.Empresa.CveCuentaPerdidaCambiaria + 'Case 65 'Perdida + ' If CveMoneda <> 1 OrElse CveMonedaVenta <> 1 Then + ' IdCtaContable = UsuarioActual.Empresa.IdCuentaPerdidaCambiaria + ' CveCuenta = UsuarioActual.Empresa.CveCuentaPerdidaCambiaria - Dim TCImpuestos As Decimal = If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioVenta) - TimpocambioGeneral = TCImpuestos + ' Dim TCImpuestos As Decimal = If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioVenta) + ' TimpocambioGeneral = TCImpuestos - Dim Diferencia As Decimal = ((MovimientoPagar.Total * PorcentajePago) * tipoCambioVentaValuacion) - ((MovimientoPagar.Total * PorcentajePago) * tipoCambioPago) 'Añadimos la diferencia de perdida en la venta - Diferencia -= ((MovimientoPagar.IVA * PorcentajePago) * tipoCambioVenta) - ((MovimientoPagar.IVA * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el IVA - Diferencia += ((MovimientoPagar.RetIVA * PorcentajePago) * tipoCambioVenta) - ((MovimientoPagar.RetIVA * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el RetIVA - Diferencia += ((MovimientoPagar.RetISR * PorcentajePago) * tipoCambioVenta) - ((MovimientoPagar.RetISR * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el RetISR - Diferencia -= ((MovimientoPagar.IEPS * PorcentajePago) * tipoCambioVenta) - ((MovimientoPagar.IEPS * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el IEPS - Diferencia = Math.Round(Diferencia, 2) + ' Dim Diferencia As Decimal = ((MovimientoPagar.Total * PorcentajePago) * tipoCambioVentaValuacion) - ((MovimientoPagar.Total * PorcentajePago) * tipoCambioPago) 'Añadimos la diferencia de perdida en la venta + ' Diferencia -= ((MovimientoPagar.IVA * PorcentajePago) * tipoCambioVenta) - ((MovimientoPagar.IVA * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el IVA + ' Diferencia += ((MovimientoPagar.RetIVA * PorcentajePago) * tipoCambioVenta) - ((MovimientoPagar.RetIVA * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el RetIVA + ' Diferencia += ((MovimientoPagar.RetISR * PorcentajePago) * tipoCambioVenta) - ((MovimientoPagar.RetISR * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el RetISR + ' Diferencia -= ((MovimientoPagar.IEPS * PorcentajePago) * tipoCambioVenta) - ((MovimientoPagar.IEPS * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el IEPS + ' Diferencia = Math.Round(Diferencia, 2) - 'si la diferencia es negativa es pérdida, si es positiva es ganancia - If Diferencia > 0 AndAlso CveMonedaVenta = 2 Then - ImporteMovimiento = Math.Abs(Diferencia) - ImporteMX = ImporteMovimiento - End If - Else - ImporteMovimiento = 0 - End If - CveSubProyectoContabilizar = CveSubProyectoVenta + ' 'si la diferencia es negativa es pérdida, si es positiva es ganancia + ' If Diferencia > 0 AndAlso CveMonedaVenta = 2 Then + ' ImporteMovimiento = Math.Abs(Diferencia) + ' ImporteMX = ImporteMovimiento + ' End If + ' Else + ' ImporteMovimiento = 0 + ' End If + ' CveSubProyectoContabilizar = CveSubProyectoVenta Case 30 If RBLContado.SelectedValue = "1" Then diff --git a/Bin/RVCFDI33.dll b/Bin/RVCFDI33.dll index f05471ce4..446d82bd3 100644 Binary files a/Bin/RVCFDI33.dll and b/Bin/RVCFDI33.dll differ diff --git a/CRM/CatEtapasProceso.aspx b/CRM/CatEtapasProceso.aspx index 7143b56a1..27ce1e6dd 100644 --- a/CRM/CatEtapasProceso.aspx +++ b/CRM/CatEtapasProceso.aspx @@ -22,6 +22,10 @@ Excel + + + + diff --git a/CRM/CatProbabilidadAcercamiento.aspx b/CRM/CatProbabilidadAcercamiento.aspx index 9e7699641..a9c296f6f 100644 --- a/CRM/CatProbabilidadAcercamiento.aspx +++ b/CRM/CatProbabilidadAcercamiento.aspx @@ -22,6 +22,10 @@ Excel + + + + diff --git a/CRM/CatProbabilidadAcercamiento.aspx.cs b/CRM/CatProbabilidadAcercamiento.aspx.cs index 218417bfb..8bb776d9c 100644 --- a/CRM/CatProbabilidadAcercamiento.aspx.cs +++ b/CRM/CatProbabilidadAcercamiento.aspx.cs @@ -225,6 +225,6 @@ public partial class CRM_CatProbabilidadAcercamiento : ClsPaginas param.Add(new ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)); param.Add(new ReportParameter("FechaImpresion", DateTime.Today.ToString())); - ImprimirPDF("Empresas/Grales/Formatos/RepCatProbabilidadAcercamiento", TmpDT, param, "Report Cat Etapas Proceso", formato); + ImprimirPDF("Empresas/Grales/Formatos/RepCatProbabilidadAcercamiento.rdlc", TmpDT, param, "Report Cat Etapas Proceso", formato); } } \ No newline at end of file diff --git a/CRM/CatTipoProceso.aspx b/CRM/CatTipoProceso.aspx index 42989a142..8ce066a9f 100644 --- a/CRM/CatTipoProceso.aspx +++ b/CRM/CatTipoProceso.aspx @@ -22,6 +22,10 @@ Excel + + + + diff --git a/CRM/CatTipoProceso.aspx.cs b/CRM/CatTipoProceso.aspx.cs index 4d8c68f10..3645d3da6 100644 --- a/CRM/CatTipoProceso.aspx.cs +++ b/CRM/CatTipoProceso.aspx.cs @@ -194,7 +194,7 @@ public partial class CRM_CatTipoProceso : ClsPaginas Imprimir("EXCEL"); } - private void Imprimir(string formato) + public void Imprimir(string formato) { System.IO.FileInfo Image = new System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta)); string logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa); diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb index 25b4c4132..f2c5ad2e7 100644 --- a/Compras/Compras.aspx.vb +++ b/Compras/Compras.aspx.vb @@ -1008,6 +1008,7 @@ Partial Class Compras_Compras ViewState("CveFlete") = value End Set End Property + Private Property FleteImportacionOpcion As Integer Get Return IfNull(ViewState("FleteImportacionOpcion"), -1).ToString.ToEntero @@ -1017,6 +1018,22 @@ Partial Class Compras_Compras End Set End Property + Private Property DTClasificacionesComprobaciones As DataTable + Get + + If ViewState("DTClasificacionesComprobaciones") Is Nothing Then + Return New DataTable + Else + Return DirectCast(ViewState("DTClasificacionesComprobaciones"), DataTable) + End If + + End Get + Set(value As DataTable) + ViewState("DTClasificacionesComprobaciones") = value + End Set + End Property + + #End Region #Region " PROPIEDADES DE TOTALES " @@ -1603,6 +1620,10 @@ Partial Class Compras_Compras InicializaDevolucionAlmacen() HabilitaEdicionManualAgregar() InicializaActualizarTC() + + + + End If @@ -3412,6 +3433,7 @@ Partial Class Compras_Compras End Function Private Sub CargaPSAlias() + DdlPSAlias2.setEsWebService(UsuarioActual.Empresa.Funcionalidad(105) = "1") If UsuarioActual.CveEmpresa = 66 Then @@ -3424,9 +3446,39 @@ Partial Class Compras_Compras DdlPSAlias2.ddlWS.Attributes.Add("data-pagina", "Compras2") End If End If + If Not DdlPSAlias2.UsaWebService AndAlso CType(DdlPSAlias2.DataSource, DataTable) Is Nothing Then - DdlPSAlias2.DataSource = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa) - DdlPSAlias2.DataBind() + + If UsuarioActual.TienePermisoProceso(300) Or UsuarioActual.TienePermisoProceso(301) Then + + Dim DTTemp As New DataTable + DTTemp.Columns.Add("CvePS", GetType(Integer)) + DTTemp.Columns.Add("PSCodigoClasificacion", GetType(String)) + + For Each dRow As DataRow In GlobalDTPSSimplificado(UsuarioActual.CveEmpresa).Rows + For Each drowCla As DataRow In DTClasificacionesComprobaciones.Rows + + If drowCla("CveClasificacion").ToString.ToEntero = dRow("CveClasificacion").ToString.ToEntero Then + + Dim InRow As DataRow = DTTemp.NewRow + InRow("CvePS") = dRow("CvePS").ToString.ToEntero + InRow("PSCodigoClasificacion") = dRow("PSCodigoClasificacion").ToString + DTTemp.Rows.Add(InRow) + + End If + Next + Next + + + DdlPSAlias2.DataSource = DTTemp + DdlPSAlias2.DataBind() + + Else + DdlPSAlias2.DataSource = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa) + DdlPSAlias2.DataBind() + End If + + End If End Sub @@ -3763,6 +3815,37 @@ Partial Class Compras_Compras 'DtPSTemp.Dispose() End Sub + + + Private Sub CargaClasificacionesComprobaciones() + + If UsuarioActual.TienePermisoProceso(300) Or UsuarioActual.TienePermisoProceso(301) Then + + Dim ObjClasificaciones As New ClsClasificaciones() + + If ObjClasificaciones.GetClasificacionesComprobaciones(UsuarioActual.CveEmpresa) Then + + If UsuarioActual.TienePermisoProceso(300) And UsuarioActual.TienePermisoProceso(301) Then + DTClasificacionesComprobaciones = ObjClasificaciones.DtResultados + Else + + If UsuarioActual.TienePermisoProceso(300) Then 'TipoComprobacion = 1 Biaticos + DTClasificacionesComprobaciones = ObjClasificaciones.DtResultados.FiltraParametros("TipoComprobacion = 1") + ElseIf UsuarioActual.TienePermisoProceso(301) Then 'TipoComprobacion = 2 Comprobaciones + DTClasificacionesComprobaciones = ObjClasificaciones.DtResultados.FiltraParametros("TipoComprobacion = 2") + End If + + End If + End If + + ObjClasificaciones.Dispose() + + End If + + End Sub + + + #End Region #Region "Vinculacion De Servcios" @@ -4335,7 +4418,7 @@ Partial Class Compras_Compras Try Dim FolioFijo As Integer = 0 'cheque - If DdlTipoTransaccion.SelectedValue = "1" Then FolioFijo = TxtFolio.Text.ToEntero + If DdlTipoTransaccion.SelectedValue = "1" AndAlso UsuarioActual.CveEmpresa <> 119 Then FolioFijo = TxtFolio.Text.ToEntero CvePrePoliza = ObjConta.AddPrePolizas("Compras/Registrar", If(EsContado And CvePlantillaPrePoliza = 1, 2, CvePlantillaPrePoliza), ImporteCompra, TxtTotal.Text.ToDouble, DdlMoneda.SelectedValue.ToEntero, TxtFecha.Text.ToDate, ConceptoPoliza, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, FolioFijo:=FolioFijo, ReglaFolioPoliza:=ObjCompras.ObtenerReglaFolio(DdlTipoTransaccion.SelectedValue, DdlTipoTransaccionCaja.SelectedValue, UsuarioActual.CveEmpresa), CveTipoPoliza:=ObjConta.ObtenerTipoPoliza(DdlTipoTransaccion.SelectedValue, DdlTipoTransaccionCaja.SelectedValue, UsuarioActual.CveEmpresa)) @@ -4471,6 +4554,8 @@ Partial Class Compras_Compras 'End If End If + 'si el registro es manual, toma el mismo dato + If CveFactura <= 0 Then TotalOriginal = TxtTotal.Text.ToDecimal 'Compra If ObjCompras.AddCompra(DdlTipoComprobante.SelectedValue, TxtDescripcion.Text.Trim, TxtSerie.Text.Trim, TxtFolio.Text.Trim, TxtFolioSecundario.Text.Trim, CveProveedor, TxtSubTotal.Text.ToDouble, TxtDescuento.Text.ToDouble, @@ -6305,7 +6390,7 @@ Partial Class Compras_Compras Case 6 'Compra Dim AgregaMercanciaInventario As Boolean = UsuarioActual.CveEmpresa.Contiene(1, 72, 80, 119, 140, 141) AndAlso UsuarioActual.Empresa.UsaInventarios AndAlso Not UsuarioActual.Empresa.Funcionalidad(126) = "1" - Dim RegistraConcepto225 As Boolean = UsuarioActual.Empresa.UsaInventarios AndAlso DdlTipoComprobante.SelectedValue.Contiene("NC", "DEV") AndAlso Not UsuarioActual.Empresa.Funcionalidad(126) = "1" + Dim RegistraConcepto225 As Boolean = UsuarioActual.Empresa.UsaInventarios AndAlso DdlTipoComprobante.SelectedValue.Contiene("DEV") AndAlso Not UsuarioActual.Empresa.Funcionalidad(126) = "1" If RBLPago.SelectedValue.ToEntero = 4 Then Exit Select 'Es credito el concepto 6 se agrega en CASE 17 @@ -6643,18 +6728,22 @@ Partial Class Compras_Compras importeMN = importeMovimiento * tipoCambioActual * Multiplicador '[IPP] EL 6 DEBE SER POSITIVO 27/AGOSTO/2018 'CLASIFICACION - If Row2("CveClasificacion").ToString.ToEntero > 0 Then + If Row2("CveClasificacion").ToString.ToEntero > 0 AndAlso DdlTipoComprobante.SelectedValue = "FAC" Then + If ObjConta.GetRetCuenta(6, Row2("CveClasificacion").ToString.ToEntero, CveSubProyecto:=Row2("CveSubProyecto").ToString.ToEntero) Then If ObjConta.DtResultados.Rows.Count > 0 AndAlso ObjConta.DtResultados.Rows(0)("IdCuentaGasto").ToString.ToEntero > 0 Then IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCuentaGasto").ToString.ToEntero - CveCuenta = ObjConta.DtResultados.Rows(0)("IdCuentaGastoSIG").ToString.ToEntero + ' CveCuenta = ObjConta.DtResultados.Rows(0)("IdCuentaGastoSIG").ToString.ToEntero Else IdCtaContable = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaGasto", String.Format("CveClasificacion = {0}", Row2("CveClasificacion"))).ToString.ToEntero - CveCuenta = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaGastoSIG", String.Format("CveClasificacion = {0}", Row2("CveClasificacion"))).ToString.ToEntero + ' CveCuenta = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaGastoSIG", String.Format("CveClasificacion = {0}", Row2("CveClasificacion"))).ToString.ToEntero End If End If End If + + + 'SEGMENTO DE NEGOCIO Dim IdSegmentoNegocio As Integer = -1 Dim drT As DataRow = GlobalDTSubProyectos(-1, CveSubProyecto:=Row2("CveSubProyecto").ToString.ToEntero).FiltroPrimero(String.Format("CveSubProyecto = {0} ", Row2("CveSubProyecto").ToString.ToEntero)) @@ -6684,6 +6773,11 @@ Partial Class Compras_Compras If DdlMoneda.SelectedValue = "2" Then tidctacon = ViewState("CtaProveedorAnticiposExtranjera").ToString.ToEntero End If + + ElseIf DdlTipoComprobante.SelectedValue = "NC" Then + tcvecon = 259 + tidctacon = UsuarioActual.Empresa.Funcionalidad(405).ToEntero + End If Dim usacomplementariaProveedor As Boolean = False @@ -11154,6 +11248,7 @@ Partial Class Compras_Compras 'CargaEstatus() CargaTiposAF() CargaProyectoAsignado() + CargaClasificacionesComprobaciones() CargaClasificaciones() CargaPS(-1) CargaProyecto() @@ -17123,6 +17218,7 @@ Partial Class Compras_Compras UPPClasificacion.Update() End Sub Private Sub CargaPS(CveClasificacion As Integer) + DdlPS.setEsWebService(UsuarioActual.Empresa.Funcionalidad(105) = "1") If UsuarioActual.Empresa.Funcionalidad(105) = "1" Then @@ -17131,7 +17227,41 @@ Partial Class Compras_Compras DdlPS.SelectedValue = "-1" Else DdlPS.ddl.Items.Clear() - DdlPS.ddl.DataSource = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa, CveClasificacion:=CveClasificacion) + + 'DdlPS.ddl.DataSource = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa, CveClasificacion:=CveClasificacion) + + If UsuarioActual.TienePermisoProceso(300) Or UsuarioActual.TienePermisoProceso(301) Then + + Dim DTTemp As New DataTable + DTTemp.Columns.Add("CvePS", GetType(Integer)) + DTTemp.Columns.Add("PSCodigo", GetType(String)) + DTTemp.Columns.Add("CveClasificacion", GetType(Integer)) + + For Each dRow As DataRow In GlobalDTPSSimplificado(UsuarioActual.CveEmpresa).Rows + For Each drowCla As DataRow In DTClasificacionesComprobaciones.Rows + + If drowCla("CveClasificacion").ToString.ToEntero = dRow("CveClasificacion").ToString.ToEntero Then + + Dim InRow As DataRow = DTTemp.NewRow + InRow("CvePS") = dRow("CvePS").ToString.ToEntero + InRow("PSCodigo") = dRow("PSCodigo").ToString + InRow("CveClasificacion") = dRow("CveClasificacion").ToString.ToEntero + DTTemp.Rows.Add(InRow) + + End If + Next + Next + + + DdlPS.DataSource = If(CveClasificacion > 0, DTTemp.FiltraParametros($"CveClasificacion = {CveClasificacion}"), DTTemp) + + Else + DdlPS.DataSource = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa) + + End If + + + DdlPS.ddl.DataBind() DdlPS.ddl.Items.Insert(0, New ListItem("Seleccione el Producto", "-1")) End If @@ -17659,13 +17789,24 @@ Partial Class Compras_Compras #Region " RECLASIFICA PARTIDAS - CLASIFICACION - SUBPROYECTO " Private Sub CargaClasificaciones() + If UsuarioActual.Empresa.UsaAC Then DdlClasificacion.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltraParametros(" Codigo = '' OR Codigo IS NULL ", Orderby:="Clasificacion") DdlAplicaClasificacion.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltraParametros(" Codigo = '' OR Codigo IS NULL ", Orderby:="Clasificacion") Else + DdlClasificacion.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltraParametros("", Orderby:="Clasificacion") DdlAplicaClasificacion.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltraParametros("", Orderby:="Clasificacion") + + If UsuarioActual.TienePermisoProceso(300) Or UsuarioActual.TienePermisoProceso(301) Then + DdlClasificacion.DataSource = DTClasificacionesComprobaciones.FiltraParametros("", Orderby:="Clasificacion") + DdlAplicaClasificacion.DataSource = DTClasificacionesComprobaciones.FiltraParametros("", Orderby:="Clasificacion") + End If + End If + + + DdlClasificacion.DataBind() DdlAplicaClasificacion.DataBind() End Sub diff --git a/Compras/RepRembolsoComprobaciones.aspx b/Compras/RepRembolsoComprobaciones.aspx index 7d3509703..53a762efd 100644 --- a/Compras/RepRembolsoComprobaciones.aspx +++ b/Compras/RepRembolsoComprobaciones.aspx @@ -1,241 +1,279 @@ -<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepRembolsoComprobaciones.aspx.vb" Inherits="Compras_RepRembolsoComprobaciones" %> - - - - - - - - Reembolsos / Comprobaciones - - - - - - -
  • +<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepRembolsoComprobaciones.aspx.vb" Inherits="Compras_RepRembolsoComprobaciones" %> + + + + + + + + Reembolsos / Comprobaciones + + + + + + +
  • Exportar Excel - -
  • -
  • + +
  • +
  • Imprimir Reembolso - -
  • -
  • -
    - - - - -
    -
    - - - - - - -
    -
    -
    - - -
    -
    -
    - -
    - - - - - - - -
    - -
    -
    - -
    -
    - - - - - - - - - - - -
    -
    - - -
    - -
    -
    -
    -
    -
    -
    -
    - - - -
    -
    - - -
    - -
    - - -
    - - -
    - -
    + + +
  • + + + + + + + + + + + + + +
    +
    +
    + + +
    +
    +
    + +
    + + + + + + + +
    +
    +
    + +
    +
    + + + + + + + + + + + +
    +
    + +
    + +
    +
    +
    +
    + +
    +
    +
    + + + +
    +
    + + +
    + +
    + + +
    + + +
    + +
    Unificar - -
    - -
    - -
    - -
    -
    - -
    -
    - - -
    + +
    + +
    + +
    + +
    +
    + +
    +
    + + +
    +
    - - - - - - Compra - - - - - - Proveedor - -
    - -
    -
    -
    - - Fecha Compra - - - - - - Proyecto - - - - - - # R - + + + + + + Compra + + + + + + Proveedor + +
    + +
    +
    +
    + + Fecha Compra + + + + + + Proyecto + + + + + + # R +   - - - - Monto Compra (Saldo Orig.) - + + + + + Monto Compra (Saldo Orig.) +   - - - - Abonado - + + + + + Abonado +   - - - - Saldo - + + + + + Saldo +   - - - - - Excedente - + + + + + + Excedente +   - - - - - - Auxiliar - - - - - - CveCompra - - - - - - CveProveedor - - - - - - IdCtaContProveedores - - - - - -
    -
    -
    -
    - -
    - + + + + + + + Auxiliar + + + + + + CveCompra + + + + + + CveProveedor + + + + + + IdCtaContProveedores + + + + + + + + + + + + - - + +
    + diff --git a/Compras/RepRembolsoComprobaciones.aspx.vb b/Compras/RepRembolsoComprobaciones.aspx.vb index 77316d8e8..2fac7ecb7 100644 --- a/Compras/RepRembolsoComprobaciones.aspx.vb +++ b/Compras/RepRembolsoComprobaciones.aspx.vb @@ -257,7 +257,10 @@ Partial Class Compras_RepRembolsoComprobaciones GvCxP.Visible = True - ObjMovtos.GetCxPPersonalCajaChica(UsuarioActual.CveEmpresa, CvePersonal, CveCajaChica, If(TxtNumeroReembolso.Text.Trim = "", "-1", TxtNumeroReembolso.Text.Trim)) + Dim FechaI As DateTime = If(String.IsNullOrEmpty(txtFechaI.Text.Trim()), ModExtensiones.MinFecha, txtFechaI.Text.ToDateTime()) + Dim FechaF As DateTime = If(String.IsNullOrEmpty(txtFechaF.Text.Trim()), ModExtensiones.MaxFecha, txtFechaF.Text.ToDateTime()) + + ObjMovtos.GetCxPPersonalCajaChica(UsuarioActual.CveEmpresa, CvePersonal, CveCajaChica, If(TxtNumeroReembolso.Text.Trim = "", "-1", TxtNumeroReembolso.Text.Trim), FechaI:=FechaI, FechaF:=FechaF) DtDatos = ObjMovtos.DtResultados GvCxP.DataSource = DtDatos @@ -341,7 +344,8 @@ Partial Class Compras_RepRembolsoComprobaciones params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa)) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToString)) - + params.Add(New ReportParameter("FechaInicio", txtFechaI.Text)) + params.Add(New ReportParameter("FechaFin", txtFechaF.Text)) params.Add(New ReportParameter("CajaChica", If(DdlCajaChica.SelectedValue.ToEntero > 0, "Caja chica: " & DdlCajaChica.SelectedItem.Text, "Funcionario/Empleado: " & DdlPersonal.SelectedItem.Text))) If Imagen.Exists Then diff --git a/Contabilidad/CatPeriodosBloqueo.aspx.vb b/Contabilidad/CatPeriodosBloqueo.aspx.vb index 090f4d1c3..41dbb72f0 100644 --- a/Contabilidad/CatPeriodosBloqueo.aspx.vb +++ b/Contabilidad/CatPeriodosBloqueo.aspx.vb @@ -1,7 +1,6 @@ Imports System.Data Imports Extensiones - Partial Class Contabilidad_CatPeriodosBloqueo Inherits ClsPaginas @@ -129,8 +128,8 @@ Partial Class Contabilidad_CatPeriodosBloqueo Alert("Ocurrió un error al guardar el Periodo de Bloqueo", TipoMensaje.MsgError) End If Else - - If ObjConta.UpdatePeriodosBloqueo(UsuarioActual.CveEmpresa, TxtEjercicio.Text, ChkM1.Checked, ChkM2.Checked, ChkM3.Checked, ChkM4.Checked, ChkM5.Checked, ChkM6.Checked, ChkM7.Checked, ChkM8.Checked, ChkM9.Checked, ChkM10.Checked, ChkM11.Checked, ChkM12.Checked, UsuarioActual.CveUsuario) Then + Dim AplicarBloqueso As String = ObjConta.UpdatePeriodosBloqueo(UsuarioActual.CveEmpresa, TxtEjercicio.Text, ChkM1.Checked, ChkM2.Checked, ChkM3.Checked, ChkM4.Checked, ChkM5.Checked, ChkM6.Checked, ChkM7.Checked, ChkM8.Checked, ChkM9.Checked, ChkM10.Checked, ChkM11.Checked, ChkM12.Checked, UsuarioActual.CveUsuario) + If AplicarBloqueso.Length = 0 Then CargadatosGvPeriodosBloqueo() UpModalPeriodosBloqueo.Update() @@ -140,7 +139,8 @@ Partial Class Contabilidad_CatPeriodosBloqueo UpGral.Update() Alert("Bloqueo Actualizado Correctamente", TipoMensaje.MsgInformacion) Else - Alert("Ocurrió un error al Actualizar el Periodo de Bloqueo", TipoMensaje.MsgError) + Dim mensajeAlerta As String = AplicarBloqueso.Replace(";", Environment.NewLine) + Alert("Ocurrió un error al Actualizar el Periodo de Bloqueo " & Environment.NewLine & mensajeAlerta, TipoMensaje.MsgError) End If End If diff --git a/Contabilidad/ContabilizacionVentas.aspx.cs b/Contabilidad/ContabilizacionVentas.aspx.cs index 73e61b3ac..d73aa8739 100644 --- a/Contabilidad/ContabilizacionVentas.aspx.cs +++ b/Contabilidad/ContabilizacionVentas.aspx.cs @@ -412,6 +412,10 @@ public partial class Contabilidad_ContabilizacionVentas : ClsPaginas if (ObjMov.PrePolizaSimplificacion(CvePrePoliza, UsuarioActual.CveEmpresa)) { + if (ObjMov.ValidacionPrePolizaCuadre(CvePrePoliza,5))// por default manda la opcion 5, para ajustar a fluctuacion + { + + } Alert("Se ha simplificado la poliza correctamente", ModExtensiones.TipoMensaje.MsgInformacion); } else diff --git a/Contabilidad/RegPrePoliza1.aspx.vb b/Contabilidad/RegPrePoliza1.aspx.vb index 396eb55d9..0d84d4c48 100644 --- a/Contabilidad/RegPrePoliza1.aspx.vb +++ b/Contabilidad/RegPrePoliza1.aspx.vb @@ -158,6 +158,15 @@ Partial Class ContabilidadC_RegPrePoliza ViewState("IndiceGrid") = value End Set End Property + Public Property IdPoliza As Integer + Get + Return CType(ViewState("IdPoliza"), Integer) + End Get + Set(value As Integer) + ViewState("IdPoliza") = value + End Set + End Property + #End Region Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load @@ -174,6 +183,7 @@ Partial Class ContabilidadC_RegPrePoliza Observaciones = "-1" Beneficiario = "-1" Actualizar = False + IdPoliza = -1 If IfNull(Request("Tipo"), "").ToString = "NOMPROV" Then DivTipoGasto.Visible = True @@ -388,9 +398,15 @@ Partial Class ContabilidadC_RegPrePoliza LnkComplementoPago.Visible = True End If + IdPoliza = dr("IdPoliza").ToString.ToEntero If dr("IdPoliza").ToString.ToEntero > 0 Then HplContabilizada.NavigateUrl = String.Format("RegPoliza.aspx?IdPoliza={0}", dr("IdPoliza")) divContabilziada.Visible = True + BtnEliminar.Visible = False + If UsuarioActual.CveUsuario = 100 Then + BtnContabilizar.Visible = True + BtnContabilizar.Text = "Actualizar Poliza" + End If ElseIf TxtTotalCargos.Text.ToDouble = TxtTotalAbonos.Text.ToDouble Then 'sino está contabilizada, se activa el botón BtnContabilizar.Visible = True @@ -1622,7 +1638,11 @@ Partial Class ContabilidadC_RegPrePoliza Dim ObjConta As New ClsContabilidad - If ObjConta.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa) Then + If IdPoliza > 0 Then 'si está bloqueada, lo desbloqueaprimero + ObjConta.UpdatePrePolizasDetalleBloquear(CvePrePoliza, False) + End If + + If ObjConta.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa, pIDPoliza:=If(IdPoliza > 0, IdPoliza, -1), Concepto:=TxtConcepto.Text, Fecha:=TxtFechaDocumento.Text.ToDateTime) Then Alert(String.Format("Prepóliza contabilizada.

    Folio:Ver Póliza", ObjConta.ContaIdPoliza), ModExtensiones.TipoMensaje.MsgInformacion) Else diff --git a/Empresas/140/Formatos/RepUsadosEntradas.rdlc b/Empresas/140/Formatos/RepUsadosEntradas.rdlc new file mode 100644 index 000000000..260655dec --- /dev/null +++ b/Empresas/140/Formatos/RepUsadosEntradas.rdlc @@ -0,0 +1,1181 @@ + + + + + + + + + 2.06488cm + + + 2.6762cm + + + 7.61828cm + + + 3.04403cm + + + 2.24195cm + + + 2.21767cm + + + + + 0.42054cm + + + + + true + true + + + + + Cant. + + + + + + + Textbox7 + + + + Black + + 1pt + + + Black + + 1pt + + Silver + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Código + + + + + + + Textbox9 + + + + Black + + 1pt + + + Black + + 1pt + + Silver + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Descripción + + + + + + + Textbox11 + + + + Black + + 1pt + + + Black + + 1pt + + Silver + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Serie Lote + + + + + + + Textbox6 + + + + Black + + 1pt + + + Black + + 1pt + + Silver + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Lote + + + + + + + Textbox5 + + + + Black + + 1pt + + + Black + + 1pt + + Silver + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Batch + + + + + + + Textbox12 + + + + Black + + 1pt + + + Black + + 1pt + + Silver + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.69042cm + + + + + true + true + + + + + =Fields!Cantidad.Value + + + + + + + Cantidad + + + 2pt + 2pt + =IIf(RowNumber(Nothing)=1,"1pt","0pt") + + + + + + + + true + true + + + + + =Fields!Codigo.Value + + + + + + + Codigo + + + 2pt + 2pt + =IIf(RowNumber(Nothing)=1,"1pt","0pt") + + + + + + + + true + true + + + + + =Fields!PS.Value + + + + + + 2pt + 2pt + =IIf(RowNumber(Nothing)=1,"1pt","0pt") + + + + + + + + true + true + + + + + =Fields!SerieLote.Value + + + + + + 2pt + 2pt + =IIf(RowNumber(Nothing)=1,"1pt","0pt") + + + + + + + + true + true + + + + + =Fields!Lote.Value + + + + + + 2pt + 2pt + =IIf(RowNumber(Nothing)=1,"1pt","0pt") + + + + + + + + true + true + + + + + =Fields!Batch.Value + + + + + + 2pt + 2pt + =IIf(RowNumber(Nothing)=1,"1pt","0pt") + + + + + + + + + + + + + + + + + =IIF(String.IsNullOrEmpty(Fields!Lote.Value), True,False) + + + + + =IIF(String.IsNullOrEmpty(Fields!Batch.Value), True,False) + + + + + + + + After + + + + + + + DsInventarios + 1.05941cm + 0.2731cm + 1.11096cm + 19.86301cm + + + + + + true + true + + + + + Cliente: + + + + =Parameters!Cliente.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + 0.99032in + + + + + 8.2362in + + + 3.1764cm + true + true + + + Embedded + Logo + Fit + 0.09927in + 0.10752in + 0.99993in + 1.6045in + + + + + + true + true + + + + + BDH BATERÍAS DISTRIBUCIONES DE + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!FechaConFormato.Value + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Globals!PageNumber + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Entradas de Usados + + + + + + + Textbox37 + 2.19197cm + 4.52492cm + 0.6cm + 11.78833cm + 4 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + + 0.85929cm + true + true + + + 0.127cm + 0.01325cm + 0cm + 20.90669cm + + + + + + true + true + + + + + Fecha Impresión: + + + + + + + + =Today + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 27.94cm + 21.59cm + 0.5cm + 0cm + 0.5cm + 1cm + 0.13cm + - true @@ -997,7 +996,7 @@ 8.25256in - 4.30332cm + 5.09474cm true true @@ -1028,7 +1027,9 @@ - Textbox1 @@ -1408,6 +1409,39 @@ 2pt + + true + true + + + + + =IIF(Len(Parameters!FechaInicio.Value) > 0 and Len(Parameters!FechaFin.Value) > 0,"Desde el día "&Parameters!FechaInicio.Value &" a "&Parameters!FechaFin.Value,"") + + + + + + 2pt + 2pt + 2pt + 2pt + +