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/ClsPaginas.vb b/App_Code/ClsPaginas.vb index f833f851d..d2f18f913 100644 --- a/App_Code/ClsPaginas.vb +++ b/App_Code/ClsPaginas.vb @@ -5266,7 +5266,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/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/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..c3321d047 100644 --- a/Compras/Compras.aspx.vb +++ b/Compras/Compras.aspx.vb @@ -4335,7 +4335,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 +4471,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 +6307,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 +6645,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 +6690,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 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 +