diff --git a/AF/AF.aspx.vb b/AF/AF.aspx.vb index 2205fdfb2..0bc3e00f1 100644 --- a/AF/AF.aspx.vb +++ b/AF/AF.aspx.vb @@ -2394,10 +2394,10 @@ Partial Class AF_AF End If NewName = String.Format("{0}{1}", NewName, IO.Path.GetExtension(DirectorioOld.ToString())) DirectorioNew.Append(NewName) - If ObjActivosFijos.AddActivosFijosImagenes(CveActivoFijo, String.Format("AF/{0}", NewName), UsuarioActual.CveUsuario) Then + If ObjActivosFijos.AddActivosFijosImagenes(CveActivoFijo, String.Format("AF/{0}", NewName), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) > 0 Then CargarArchivo() - My.Computer.FileSystem.MoveFile(DirectorioOld.ToString, DirectorioNew.ToString) - Else + My.Computer.FileSystem.MoveFile(DirectorioOld.ToString, DirectorioNew.ToString) + End If Retorno = True Catch ex As Exception @@ -2409,8 +2409,6 @@ Partial Class AF_AF UpUpFotos.Update() Next - - End Sub Protected Sub BtnEliminarFoto_Click(sender As Object, e As System.EventArgs) diff --git a/App_Code/ClsAF.vb b/App_Code/ClsAF.vb index eb935027b..45ba33114 100644 --- a/App_Code/ClsAF.vb +++ b/App_Code/ClsAF.vb @@ -698,20 +698,21 @@ Public Class ClsAF Return Retorno End Function - Public Function AddActivosFijosImagenes(CveActivoFijo As Integer, URL As String, CveUsuario As Integer) As Boolean - Dim Retorno As Boolean = False + Public Function AddActivosFijosImagenes(CveActivoFijo As Integer, URL As String, CveUsuario As Integer, CveEmpresa As Integer) As Integer + Dim Retorno As Integer = 0 DataAdapter("PA_AF_ActivosFijosImagenesAdd") - With SqlAdapter.SelectCommand.Parameters .Add("@CveActivoFijo", SqlDbType.Int).Value = CveActivoFijo .Add("@URL", SqlDbType.VarChar).Value = URL .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + .Add("@CveImagenActivoFijo", SqlDbType.Int).Direction = ParameterDirection.Output End With Try SqlAdapter.Fill(Data) - Retorno = True + Retorno = SqlAdapter.SelectCommand.Parameters("@CveImagenActivoFijo").Value.ToString().ToEntero() Catch Ex1 As SqlException If Ex1.Message.Contains("Número: 2627;") Then Alert("Ya existe una Imagen en Fijo Imagenes con el mismo nombre: " & Descripcion & ".", TipoMensaje.MsgAdvertencia) diff --git a/App_Code/ClsContabilidad.vb b/App_Code/ClsContabilidad.vb index e21cb2136..cda545d68 100644 --- a/App_Code/ClsContabilidad.vb +++ b/App_Code/ClsContabilidad.vb @@ -437,19 +437,17 @@ Public Class ClsContabilidad Return Retorno End Function - Public Function GetClienteAuxiliar(CveCliente As Integer, CveConceptoContable As Integer, FechaInicio As Date, FechaFin As Date, CveEmpresa As Integer, Optional Opcion As Integer = 1) As Boolean + Public Function GetClienteAuxiliar(CveCliente As Integer, CveConceptoContable As Integer, CveSubProyecto As Integer, FechaInicio As Date, FechaFin As Date, CveEmpresa As Integer, Optional Opcion As Integer = 1) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Conta_ClienteAuxiliar") With SqlAdapter.SelectCommand.Parameters - .Add("@CveCliente", SqlDbType.Int).Value = CveCliente .Add("@CveConceptoContable", SqlDbType.Int).Value = CveConceptoContable - + .Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto .Add("@FechaInicio", SqlDbType.Date).Value = FechaInicio .Add("@FechaFin", SqlDbType.Date).Value = FechaFin - .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa .Add("@Opcion", SqlDbType.Int).Value = Opcion End With diff --git a/App_Code/ClsInventarios.vb b/App_Code/ClsInventarios.vb index 70e923f48..231b52111 100644 --- a/App_Code/ClsInventarios.vb +++ b/App_Code/ClsInventarios.vb @@ -1035,18 +1035,8 @@ Public Class ClsInventarios .Add("@CveClienteSucursal", SqlDbType.Int).Value = CveClienteSucursal .Add("@PedidoContrato", SqlDbType.VarChar).Value = PedidoContrato .Add("@GastoIndirecto", SqlDbType.Money).Value = GastoIndirecto - '.Add("@CveChofer", SqlDbType.Int).Value = CveChofer - '.Add("@CveCamion", SqlDbType.Int).Value = CveCamion - '.Add("@Placa", SqlDbType.VarChar).Value = Placa - '.Add("@FechaEntrega", SqlDbType.VarChar).Value = FechaEntrega - '.Add("@EspecifUnidad", SqlDbType.VarChar).Value = EspecifUnidad .Add("@ResponsableCarga", SqlDbType.VarChar).Value = ResponsableCarga .Add("@ResponsableRecibio", SqlDbType.VarChar).Value = ResponsableRecibio - '.Add("@Identificacion", SqlDbType.VarChar).Value = Identificacion - '.Add("@Domicilio", SqlDbType.VarChar).Value = Domicilio - '.Add("@Telefono", SqlDbType.VarChar).Value = Telefono - '.Add("@Ciudad", SqlDbType.VarChar).Value = Ciudad - '.Add("@Licencia", SqlDbType.VarChar).Value = Licencia .Add("@Modulo", SqlDbType.VarChar).Value = Modulo .Add("@CveOP", SqlDbType.Int).Value = CveOP .Add("@CveEntregaAlmacen", SqlDbType.Int).Value = CveEntregaAlmacen @@ -1077,7 +1067,6 @@ Public Class ClsInventarios CveVenta As Integer, CveSubProyecto As Integer, CveActivoFijo As Integer, Optional CvePersonal As Integer = -1, Optional Guia As String = "", Optional Observaciones As String = "", Optional Recibio As String = "", Optional TipoCambio As Decimal = -1, Optional CveCliente As Integer = -1, Optional CveProveedor As Integer = -1, Optional Remision As String = "") As Boolean Dim Retorno As Boolean = False - DataAdapter("PA_Inv_MovimientosUpdate") With SqlAdapter.SelectCommand.Parameters @@ -1118,7 +1107,6 @@ Public Class ClsInventarios Public Function UpdateMovimientoPoliza(IDPoliza As Integer, CveMovimiento As Integer, CveEmpresa As Integer) As Boolean Dim Retorno As Boolean = False - DataAdapter("PA_Inv_MovimientosPolizaUpdate") With SqlAdapter.SelectCommand.Parameters @@ -1140,7 +1128,6 @@ Public Class ClsInventarios Public Function UpdateMovimientoGuia(Guia As String, CveMovimiento As Integer, CveEmpresa As Integer) As Boolean Dim Retorno As Boolean = False - DataAdapter("PA_Inv_MovimientosPolizaUpdate") With SqlAdapter.SelectCommand.Parameters @@ -1162,7 +1149,6 @@ Public Class ClsInventarios Public Function MovimientoRemove(CveMovimiento As Integer, CveEmpresa As Integer, Optional CveUsuario As Integer = -1) As Boolean Dim Retorno As Boolean = False - DataAdapter("PA_Inv_MovimientosRemove") With SqlAdapter.SelectCommand.Parameters diff --git a/App_Code/ClsNominas.vb b/App_Code/ClsNominas.vb index 9aa7eb1a1..ecf2cdbd3 100644 --- a/App_Code/ClsNominas.vb +++ b/App_Code/ClsNominas.vb @@ -3787,6 +3787,19 @@ Public Class ClsNominas Return retorno End Function + Public Function SolicitudesDetalleSATGet(CveSolicitud As Integer, CveEmpresa As Integer, Estatus As Integer, CveTipoSolicitud As Integer, Optional CveSolicitudDetalle As Integer = -1) As Boolean + Dim retorno As Boolean = False + DataAdapter("PA_Gral_Sat_SolicitudesDetalleGet") + addParameters("@CveSolicitudDetalle", SqlDbType.Int, CveSolicitudDetalle) + addParameters("@CveSolicitud", SqlDbType.Int, CveSolicitud) + addParameters("@CveEmpresa", SqlDbType.Int, CveEmpresa) + addParameters("@Estatus", SqlDbType.Int, Estatus) + addParameters("@CveTipoSolicitud", SqlDbType.Int, CveTipoSolicitud) + + retorno = RunQuery("Ocurrió un error al cancelar la Solicitude.") + + Return retorno + End Function #End Region diff --git a/Bin/ja/Microsoft.ReportViewer.WebForms.resources.dll b/Bin/ja/Microsoft.ReportViewer.WebForms.resources.dll deleted file mode 100644 index 7a96469e4..000000000 Binary files a/Bin/ja/Microsoft.ReportViewer.WebForms.resources.dll and /dev/null differ diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb index 4c790a109..81eb592ba 100644 --- a/Compras/Compras.aspx.vb +++ b/Compras/Compras.aspx.vb @@ -11632,12 +11632,16 @@ Partial Class Compras_Compras If TmpDT.Rows(Indice)("PU").ToString.ToDecimal + tPU < 0 Then 'si es negativo, que tome el dato anterior Indice = Indice - 1 - If TmpDT.Rows(Indice)("Cantidad").ToString.ToDecimal > 0 Then - tPU = ImporteAjuste / TmpDT.Rows(Indice)("Cantidad").ToString.ToDecimal - Else - tPU = 0 + 'VALIDACION ADICIONAL DE OTRO PRODUCTO CON LA MISMA SITUACIÓN + If TmpDT.Rows(Indice)("PU").ToString.ToDecimal + tPU < 0 AndAlso Indice > 0 Then 'si es negativo, que tome el dato anterior + Indice = Indice - 1 End If End If + If TmpDT.Rows(Indice)("Cantidad").ToString.ToDecimal > 0 Then + tPU = ImporteAjuste / TmpDT.Rows(Indice)("Cantidad").ToString.ToDecimal + Else + tPU = 0 + End If TmpDT.Rows(Indice)("PU") = TmpDT.Rows(Indice)("PU").ToString.ToDecimal + tPU TmpDT.Rows(Indice)("Total") = TmpDT.Rows(Indice)("Total").ToString.ToDecimal + ImporteAjuste diff --git a/Contabilidad/PopUpAuxiliar.aspx.vb b/Contabilidad/PopUpAuxiliar.aspx.vb index 9cdaaff03..1f7a89315 100644 --- a/Contabilidad/PopUpAuxiliar.aspx.vb +++ b/Contabilidad/PopUpAuxiliar.aspx.vb @@ -219,6 +219,12 @@ Partial Class PopUpAuxiliar Else e.Row.FCLinkButton("LnkDesAplicar").CommandArgument = String.Format("{0}|{1}|{2}|{3}", e.Row.DBCampo("CvePrePoliza"), e.Row.DBCampo("CveCompraAmortizacion"), e.Row.DBCampo("CveCompra"), e.Row.DBCampo("CveIE")) End If + ElseIf e.Row.DBCampo("CveConceptoContable").Contiene("37") Then 'desaplicar Deudores Diversos- Compra + + e.Row.FCLinkButton("LnkDesAplicar").Visible = True + e.Row.FCLinkButton("LnkDesAplicar").CommandName = "DesAplicarDeudorDiversoCompra" + e.Row.FCLinkButton("imgD").Visible = False + e.Row.FCLinkButton("LnkDesAplicar").CommandArgument = String.Format("{0}|{1}|{2}", e.Row.DBCampo("CvePrePoliza"), e.Row.DBCampo("CveCompra"), e.Row.DBCampo("CveIE")) ElseIf e.Row.DBCampo("CveConceptoContable").Contiene("21") Then 'desaplicar anticipo de compra @@ -552,5 +558,40 @@ Partial Class PopUpAuxiliar End If + If e.CommandName = "DesAplicarDeudorDiversoCompra" Then + + Dim CvePrePoliza, CveCompra, CveIE As Integer + Dim TieneError As Boolean = False + + Dim St As String() = e.CommandArgument.ToString.Split("|"c) + If St.Length > 0 Then + CvePrePoliza = St(0).ToEntero + CveCompra = St(1).ToEntero + CveIE = St(2).ToEntero + End If + + If CvePrePoliza > 0 Then + Dim Conta As New ClsContabilidad() + Conta.IniciaTransacSQL() + + If Not Conta.UpdatePrePolizasDetalleBloquear(CvePrePoliza, False) Then + TieneError = True + End If + + If Not TieneError AndAlso Not Conta.DesAplicarPago(CvePrePoliza, 37, CveCompra, CveIE) Then + TieneError = True + End If + + If Not TieneError Then + Conta.Commit() + Alert("Pago Desaplicado.", TipoMensaje.ToastInformacion) + Else + Conta.RollBack() + Alert("Pago no fue desaplicado.", TipoMensaje.ToastError) + End If + End If + + End If + End Sub End Class diff --git a/General/SaldosIniciales.aspx.vb b/General/SaldosIniciales.aspx.vb index 786b351da..db74efea7 100644 --- a/General/SaldosIniciales.aspx.vb +++ b/General/SaldosIniciales.aspx.vb @@ -1799,6 +1799,21 @@ Partial Class General_SaldosIniciales Dim CveClasificacion As Integer = drr("CveClasificacion").ToString().ToEntero() Dim dtsubp As DataTable = GlobalDTSubProyectos(UsuarioActual.CveEmpresa) + If UsuarioActual.CveEmpresa = 189 Then + For Each Row As DataRow In dt.FiltraParametros("RFC <> ''").Rows + Dim SubTotal = Row("SubTotal").ToString().ToDecimal.RoundSQL + Dim IVA = Row("IVA").ToString().ToDecimal.RoundSQL + Dim Total = Row("Total").ToString().ToDecimal.RoundSQL + Dim Cantidad = Row("Cantidad").ToString.ToDecimal + Dim PU = Row("PU").ToString.ToDecimal + + If Total - SubTotal - IVA <> 0 Then + Row("PU") = (Total - IVA) / Cantidad + Row("SubTotal") = Row("PU").ToString.ToDecimal * Cantidad + End If + Next + End If + Dim CountRow As Integer = 1 Dim LastSerieFolioTipoDoc As String = String.Empty Dim EsDetalle As Boolean = False diff --git a/Inventarios/EntradasSalidas.aspx b/Inventarios/EntradasSalidas.aspx index 6a2dbe295..8f60930cd 100644 --- a/Inventarios/EntradasSalidas.aspx +++ b/Inventarios/EntradasSalidas.aspx @@ -1566,14 +1566,14 @@ -