diff --git a/Contabilidad/ContabilizacionCompras.aspx b/Contabilidad/ContabilizacionCompras.aspx index 9f2eaf940..38d109764 100644 --- a/Contabilidad/ContabilizacionCompras.aspx +++ b/Contabilidad/ContabilizacionCompras.aspx @@ -191,7 +191,7 @@ - + diff --git a/Contabilidad/ContabilizacionCompras.aspx.cs b/Contabilidad/ContabilizacionCompras.aspx.cs index aed42c95a..1217aa139 100644 --- a/Contabilidad/ContabilizacionCompras.aspx.cs +++ b/Contabilidad/ContabilizacionCompras.aspx.cs @@ -144,6 +144,7 @@ public partial class Contabilidad_ContabilizacionCompras : ClsPaginas if (UsuarioActual.Empresa.TipoContabilidad == 1) // conta SIG { e.Row.FCHyperLink("HLPoliza").Visible = TienePermisoVerPoliza & e.Row.DBCampo("FolioPoliza").ToEntero() > 0; + e.Row.FCHyperLink("HLPoliza").Text = $"Póliza: {e.Row.DBCampo("FolioPoliza")}"; e.Row.FCHyperLink("HLPoliza").NavigateUrl = $"/Contabilidad/RegPrePolizas.aspx?CvePrePoliza={e.Row.DBCampo("CvePrePoliza")}"; } else diff --git a/Contabilidad/ContabilizacionVentas.aspx b/Contabilidad/ContabilizacionVentas.aspx index 3bd4788a6..cb4705728 100644 --- a/Contabilidad/ContabilizacionVentas.aspx +++ b/Contabilidad/ContabilizacionVentas.aspx @@ -158,7 +158,7 @@ - + diff --git a/Contabilidad/ContabilizacionVentas.aspx.cs b/Contabilidad/ContabilizacionVentas.aspx.cs index 42f262ef1..0a7d03748 100644 --- a/Contabilidad/ContabilizacionVentas.aspx.cs +++ b/Contabilidad/ContabilizacionVentas.aspx.cs @@ -129,7 +129,16 @@ public partial class Contabilidad_ContabilizacionVentas : ClsPaginas e.Row.FCHyperLink("HplEdicion").Visible = true; } - e.Row.FCHyperLink("HLPoliza").Visible = TienePermisoVerPoliza & e.Row.DBCampo("IdPoliza").ToEntero() > 0; + if (UsuarioActual.Empresa.TipoContabilidad == 1) + { + e.Row.FCHyperLink("HLPoliza").Visible = TienePermisoVerPoliza & e.Row.DBCampo("FolioPoliza").ToEntero() > 0; + e.Row.FCHyperLink("HLPoliza").Text = $"Póliza: {e.Row.DBCampo("FolioPoliza")}" ; + e.Row.FCHyperLink("HLPoliza").NavigateUrl = $"/Contabilidad/RegPrePolizas.aspx?CvePrePoliza={e.Row.DBCampo("CvePrePoliza")}"; + } + else + { + e.Row.FCHyperLink("HLPoliza").Visible = TienePermisoVerPoliza & e.Row.DBCampo("IdPoliza").ToEntero() > 0; + } contP.Dispose(); GvD.DataBind(); diff --git a/Inventarios/RecepcionAlmacen.aspx.vb b/Inventarios/RecepcionAlmacen.aspx.vb index 3ce600fa2..6c57c0feb 100644 --- a/Inventarios/RecepcionAlmacen.aspx.vb +++ b/Inventarios/RecepcionAlmacen.aspx.vb @@ -3,6 +3,7 @@ Option Explicit On Imports System.Data Imports System.IO +Imports System.Text Imports Extensiones Imports GemBox.Spreadsheet Imports Microsoft.Reporting.WebForms @@ -2299,36 +2300,41 @@ Partial Class Inventarios_RecepcionAlmacen 'VERIFICA EXISTENCIAS If TipoMovimiento > 1 Then - Dim MensajeExistencias As New StringBuilder - Dim ObjInventarios As New ClsInventarios - For Each gvr As GridViewRow In GvInv.Rows - Dim ExistenciaActual = DtInv.SUM("CantidadSurtidaPantalla", $"CvePS = {gvr.DataKey("CvePS").ToEntero} AND CveUM = {gvr.DataKey("CveUM").ToEntero} ") + Dim CveTipoAlmacen As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa, CveAlmacen:=DdlAlmacen.SelectedValue.ToEntero).FiltroPrimeroValor("CveTipoAlmacen", "").ToEntero + Dim ValidaExistencia As Boolean = True + If CveTipoAlmacen.Contiene(6, 21) AndAlso UsuarioActual.CveEmpresa = 140 Then ValidaExistencia = False ' si es garantia no valida existencia + If ValidaExistencia Then + Dim MensajeExistencias As New StringBuilder + Dim ObjInventarios As New ClsInventarios + For Each gvr As GridViewRow In GvInv.Rows + Dim ExistenciaActual = DtInv.SUM("CantidadSurtidaPantalla", $"CvePS = {gvr.DataKey("CvePS").ToEntero} AND CveUM = {gvr.DataKey("CveUM").ToEntero} ") - If TipoMovimiento = 2 Then - 'If gvr.DataKey("CantidadC").ToString.ToDecimal <> ExistenciaActual Then - ' Alert("La devolución debe de ser completa.", TipoMensaje.MsgAdvertencia) - ' Exit Sub - 'End If + If TipoMovimiento = 2 Then + 'If gvr.DataKey("CantidadC").ToString.ToDecimal <> ExistenciaActual Then + ' Alert("La devolución debe de ser completa.", TipoMensaje.MsgAdvertencia) + ' Exit Sub + 'End If - If DtExistencias.SUM("Existencia", $"CvePS = {gvr.DataKey("CvePS").ToEntero} AND CveUM = {gvr.DataKey("CveUM").ToEntero}") < ExistenciaActual Then + If DtExistencias.SUM("Existencia", $"CvePS = {gvr.DataKey("CvePS").ToEntero} AND CveUM = {gvr.DataKey("CveUM").ToEntero}") < ExistenciaActual Then + MensajeExistencias.Append($"Producto: {GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=gvr.DataKey("CvePS").ToString.ToEntero).FiltroPrimeroValor("PSCodigo")}.
") + Continue For + End If + End If + + Dim Existencia = ObjInventarios.GetExistenciasPS(gvr.DataKey("CvePS").ToEntero, gvr.DataKey("CveUM").ToEntero, UsuarioActual.CveEmpresa, DdlAlmacen.SelectedValue.ToEntero, FechaMovto:=(TxtFecha.Text & " " & Now.ToShortTimeString).ToDateTime.ToString("yyyy/MM/dd HH:mm")) + If Existencia < ExistenciaActual Then MensajeExistencias.Append($"Producto: {GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=gvr.DataKey("CvePS").ToString.ToEntero).FiltroPrimeroValor("PSCodigo")}.
") Continue For End If + Next + ObjInventarios.Dispose() + + If MensajeExistencias.ToString <> "" Then + Alert($"Los siguientes productos no cuentan con la existencia suficiente para hacer la devolución.

{MensajeExistencias.ToString}", TipoMensaje.MsgAdvertencia) + Return False End If - Dim Existencia = ObjInventarios.GetExistenciasPS(gvr.DataKey("CvePS").ToEntero, gvr.DataKey("CveUM").ToEntero, UsuarioActual.CveEmpresa, DdlAlmacen.SelectedValue.ToEntero, FechaMovto:= (TxtFecha.Text & " " & Now.ToShortTimeString).ToDateTime.ToString("yyyy/MM/dd HH:mm")) - If Existencia < ExistenciaActual Then - MensajeExistencias.Append($"Producto: {GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=gvr.DataKey("CvePS").ToString.ToEntero).FiltroPrimeroValor("PSCodigo")}.
") - Continue For - End If - Next - ObjInventarios.Dispose() - - If MensajeExistencias.ToString <> "" Then - Alert($"Los siguientes productos no cuentan con la existencia suficiente para hacer la devolución.

{MensajeExistencias.ToString}", TipoMensaje.MsgAdvertencia) - Return False End If - End If Return True @@ -3926,7 +3932,6 @@ Partial Class Inventarios_RecepcionAlmacen Dim ObjCompras As New ClsCompras(ObjInventario.IniciaTransacSQL()) Dim ObjConta As New ClsContabilidad(ObjInventario.IniciaTransacSQL()) Dim ObjOC As New ClsOC(ObjInventario.IniciaTransacSQL()) - Dim ObjContaAC As ClsContPAQi = Nothing 'ENTRADA ALMACÉN CveMovimiento = ObjInventario.AddMovimiento(DdlAlmacen.SelectedValue.ToEntero, 2, 1, FechaMovto, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveImportacionCompra, -1, -1, -1, Observaciones:=TxtObservaciones.Text.Trim, TipoCambio:=-1, Remision:=TxtRemision.Text, Modulo:="RA/G6") @@ -4075,9 +4080,6 @@ Partial Class Inventarios_RecepcionAlmacen ImporteAbono = SubTotalPartida ImporteAbonoME = (SubTotalPartida * dr("TipoCambio").ToString.ToDecimal) - SubTotalPartida End If - - - If ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, ImporteAbono, ConceptoPartida, CveConceptoCostoIndirecto, ConceptoPartida, FechaMovto, IdCtaContableCostoInd, -1, CveCompra:=CveComp, CveProveedor:=dr("CveProveedor").ToString.ToEntero, CveMovimientoAlmacen:=CveMovimiento, ImporteMX:=ImporteAbono, CveSubProyecto:=CveSubProyecto) Then ' si tiene valor es que hay complementaria If ImporteAbonoME > 0 Then @@ -4092,7 +4094,6 @@ Partial Class Inventarios_RecepcionAlmacen End If End If - 'DOCUMENTOS RELACIONADOS AL MOVIMIENTO If Not ErrorMovInv AndAlso UsuarioActual.Empresa.Funcionalidad(594) = "1" AndAlso Not UsuarioActual.TienePermisoProceso(314) Then If Not ErrorMovInv AndAlso Not GuardaDocumentoBitacora(ObjBitacora, CveMovimiento) Then @@ -4100,8 +4101,6 @@ Partial Class Inventarios_RecepcionAlmacen Alert("Ocurrió un error al guardar los datos adjuntos de la bitácora", TipoMensaje.MsgError) End If End If - - Else ErrorMovInv = True End If @@ -4114,16 +4113,16 @@ Partial Class Inventarios_RecepcionAlmacen End If End If - If Not ErrorMovInv AndAlso UsuarioActual.Empresa.Funcionalidad(200) = "1" Then - ObjContaAC = New ClsContPAQi(UsuarioActual.Empresa) - ObjContaAC.IniciaTransacSQL() - If ObjConta.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa, ObjConta:=ObjContaAC) Then - MensajeError = $"
Movimiento contabilizado en el folio: {ObjConta.ContaFolio}
" - Else - ErrorMovInv = True - MensajeError = "Error al contabilizar los conceptos contables" - End If - End If + 'If Not ErrorMovInv AndAlso UsuarioActual.Empresa.Funcionalidad(200) = "1" Then + ' ObjContaAC = New ClsContPAQi(UsuarioActual.Empresa) + ' ObjContaAC.IniciaTransacSQL() + ' If ObjConta.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa, ObjConta:=ObjContaAC) Then + ' MensajeError = $"
Movimiento contabilizado en el folio: {ObjConta.ContaFolio}
" + ' Else + ' ErrorMovInv = True + ' MensajeError = "Error al contabilizar los conceptos contables" + ' End If + 'End If If Not ErrorMovInv AndAlso CveImportacionSeleccionada > 0 Then @@ -4145,7 +4144,7 @@ Partial Class Inventarios_RecepcionAlmacen 'FINAL If Not ErrorMovInv Then ObjInventario.Commit() ' aplica los movimientos insertados - If ObjContaAC IsNot Nothing Then ObjContaAC.Commit() + ' If ObjContaAC IsNot Nothing Then ObjContaAC.Commit() RegistraScript("playsonidito('beep-07.wav')") Dim Msg As New StringBuilder @@ -4158,14 +4157,14 @@ Partial Class Inventarios_RecepcionAlmacen Limpia() Else ObjInventario.RollBack() - If ObjContaAC IsNot Nothing Then ObjContaAC.RollBack() + ' If ObjContaAC IsNot Nothing Then ObjContaAC.RollBack() RegistraScript("playsonidito('142608__autistic-lucario__error.wav')") GuardaLog(MensajeError) Alert("Error al guardar el movimiento de almacen. Por favor vuelva a intentar.", TipoMensaje.MsgError) End If ObjInventario.Dispose() - If ObjContaAC IsNot Nothing Then ObjContaAC.Dispose() + ' If ObjContaAC IsNot Nothing Then ObjContaAC.Dispose() End Sub Private Sub Limpia() CveCompraSurtir = -1 diff --git a/Planeacion/CatSubProyectos.aspx b/Planeacion/CatSubProyectos.aspx index fb428da68..90295d72b 100644 --- a/Planeacion/CatSubProyectos.aspx +++ b/Planeacion/CatSubProyectos.aspx @@ -224,7 +224,7 @@
- +
diff --git a/Ventas/ClientesAbonar.aspx.vb b/Ventas/ClientesAbonar.aspx.vb index ec9df92c6..2286cfb44 100644 --- a/Ventas/ClientesAbonar.aspx.vb +++ b/Ventas/ClientesAbonar.aspx.vb @@ -1010,7 +1010,7 @@ Partial Class Ventas_ClientesAbonar End If tipoCambioPago = Pago.TCPago - If gvr.FCTextBox("TxtComision").Text.ToDecimal <> 0 Then Pago.OtroGastoIngreso = gvr.FCTextBox("TxtComision").Text.ToDecimal + If gvr.FCTextBox("TxtComision").Text.ToDecimal <> 0 Then Pago.OtroGastoIngreso = gvr.FCTextBox("TxtComision").Text.ToDecimal * Pago.TCPago 'If gvr.DataKey("TipoDocto") = "Ant" AndAlso UsuarioActual.CveEmpresa.Contiene(1, 119, 158) Then ' EsAnticipoEspecial = True diff --git a/Ventas/RepVentaDetalle.aspx b/Ventas/RepVentaDetalle.aspx index 670edb5c3..91ec23517 100644 --- a/Ventas/RepVentaDetalle.aspx +++ b/Ventas/RepVentaDetalle.aspx @@ -379,7 +379,7 @@ - + @@ -580,8 +580,7 @@ - - + @@ -592,8 +591,7 @@ - - + @@ -605,8 +603,7 @@ - - + @@ -618,8 +615,7 @@ - - + @@ -630,8 +626,7 @@ - - + @@ -642,8 +637,7 @@ - - + @@ -654,8 +648,7 @@ - - + @@ -665,23 +658,16 @@ - - - + + - - + - - - - -