This commit is contained in:
RPimienta
2023-02-21 00:32:26 -06:00
34 changed files with 2121 additions and 1842 deletions

View File

@@ -10,9 +10,24 @@
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
Estado del Ejercicio del Presupuesto de Egresos - Mensual
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
<asp:ImageButton ID="ImgExcel" runat="server" ImageUrl="/Imagenes/IconoExcel.gif" Width="17px" Height="17px" />&nbsp;
<asp:ImageButton ID="BtnImprimir" OnClick="BtnImprimir_Click" runat="server" alt="Imprimir" src="/Imagenes/btnImprimir.gif" Style="cursor: pointer; height: 20px" />&nbsp;
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
<asp:UpdatePanel runat="server" ID="UpAcciones" >
<ContentTemplate>
<li>
<asp:LinkButton ID="ImgExcel" OnClick="ImgExcel_Click" Visible="false" runat="server"><i class="fa fa-file-excel-o"></i> Exporta Excel</asp:LinkButton>
</li>
<li>
<asp:LinkButton ID="BtnImprimir" OnClick="BtnImprimir_Click" Visible="false" runat="server"><i class="fa fa-file-pdf-o"></i> Imprimir</asp:LinkButton>
</li>
</ContentTemplate>
<Triggers>
<asp:PostBackTrigger ControlID="ImgExcel" />
<asp:PostBackTrigger ControlID="BtnImprimir" />
</Triggers>
</asp:UpdatePanel>
</asp:Content>
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">

View File

@@ -18,6 +18,8 @@ Partial Class AC_RepPresupuestoEgresosMensual
If Not Page.IsPostBack Then
CargaEjercicios()
CargaCombos()
End If
End Sub
@@ -68,6 +70,10 @@ Partial Class AC_RepPresupuestoEgresosMensual
Private Sub CargaDatos()
ImgExcel.Visible = False
BtnImprimir.Visible = False
Dim objAC As New ClsContPAQi(UsuarioActual.Empresa)
Dim Capitulo As String = If(DdlCapituloClasificaciones.SelectedValue.ToEntero = -1, "-1", GlobalDTACClasificadorObjetoGasto.FiltraParametros(String.Format("CveClasificacion = {0}", DdlCapituloClasificaciones.SelectedValue.ToEntero)).Rows(0)("Codigo").ToString.Substring(0, 1))
UPPDatos.Update()
@@ -83,6 +89,11 @@ Partial Class AC_RepPresupuestoEgresosMensual
End If
Gv.DataSource = DtPresupuestoEgresos
If DtPresupuestoEgresos IsNot Nothing AndAlso DtPresupuestoEgresos.Rows.Count > 0 Then
ImgExcel.Visible = True
BtnImprimir.Visible = True
End If
Else
Gv.DataSource = Nothing
DtPresupuestoEgresos = Nothing

File diff suppressed because it is too large Load Diff

View File

@@ -43,7 +43,7 @@
<asp:HyperLink NavigateUrl="#" data-toggle="modal" data-target="#DivPersonalizar" ID="ImgPersonalizar" runat="server"> <i class="fa fa-pencil"></i> Personalizar</asp:HyperLink>
</li>
<li>
<asp:LinkButton runat="server" ID="BtnDepreciacion" data-toggle="tooltip" data-placement="left" title="Generar Depreciacion" Text="<i class='fa fa-plus'></i> Generar Depreciacion"></asp:LinkButton>
<asp:LinkButton runat="server" ID="BtnDepreciacion" data-toggle="tooltip" data-placement="left" title="Generar Depreciación" Text="<i class='fa fa-plus'></i> Generar Depreciación"></asp:LinkButton>
</li>
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
@@ -97,7 +97,7 @@
<br />
<asp:UpdatePanel ID="UPDatos" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontró ningun Activo Fijo con depreciacion" DataKeyNames="CveActivoFijo, TipoActivoFijo, Descripcion, TasaDepreciacion" ToolTip="Reporte de Depreciacion" CssClass="table table-striped table-advance table-hover Widthall" Style="text-align: center; position: static" UseAccessibleHeader="false" GridLines="None">
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontró ningun Activo Fijo con depreciación" DataKeyNames="CveActivoFijo, TipoActivoFijo, Descripcion, TasaDepreciacion" ToolTip="Reporte de Depreciacion" CssClass="table table-striped table-advance table-hover Widthall" Style="text-align: center; position: static" UseAccessibleHeader="false" GridLines="None">
<Columns>
<asp:TemplateField>
<HeaderTemplate>
@@ -203,7 +203,7 @@
</div>
<div class="modal-footer">
<asp:Button ID="BtnGenerarDepreciacion" runat="server" class="btn btn-success" Text="Generar Depreciacion" ValidationGroup="GrpGuardar" />
<asp:Button ID="BtnGenerarDepreciacion" runat="server" class="btn btn-success" Text="Generar Depreciación" ValidationGroup="GrpGuardar" />
</div>
</ContentTemplate>
</asp:UpdatePanel>

View File

@@ -30,17 +30,15 @@ Partial Class AF_RepDepreciacion
Dim ObjInventario As New ClsInventarios
Dim ObjConta As New ClsContabilidad(ObjInventario.IniciaTransacSQL())
Dim ErrorMovInv As Boolean = False
Dim ConceptoPoliza As String = String.Format("Depreciacion - {0}", txtFechaI.Text)
Dim ConceptoPoliza As String = String.Format("Depreciación - {0}", txtFechaI.Text)
Dim CveSubProyecto As Integer = DdlSubProyecto.SelectedValue.ToEntero
Dim CvePrePoliza = ObjConta.AddPrePolizas("Depreciacion", 74, 0, 0, 1, txtFechaI.Text.ToDate, ConceptoPoliza, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
For Each RowsDt As GridViewRow In GvDatos.Rows
CveActivoFijo = RowsDt.DataKey("CveActivoFijo").ToEntero
Dim MontoDepreciacion As Decimal = RowsDt.FCLiteral("LtlDepreciacionMensual").Text.ToDecimal
If MontoDepreciacion > 0 And CveActivoFijo <> 0 Then
Dim ConceptoPolizaDetalle As String = String.Format("Depreciacion - {0} - {1}", txtFechaI.Text, RowsDt.FCLiteral("LtlDescripcion").Text)
Dim ConceptoPolizaDetalle As String = String.Format("Depreciación - {0} - {1}", txtFechaI.Text, RowsDt.FCLiteral("LtlDescripcion").Text)
If CvePrePoliza > 0 Then
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, -MontoDepreciacion, -MontoDepreciacion, 270, ConceptoPolizaDetalle, ConceptoPolizaDetalle, 0, CveActivoFijo:=CveActivoFijo, CveSubProyecto:=CveSubProyecto) Then

View File

@@ -30,12 +30,16 @@
</div>
<div class="titlefiltros caption">
<div class="row">
<label class="col-md-1 ">Marcas:</label>
<div class="col-md-1">
<asp:DropDownList ID="DdlMarcas" runat="server" DataValueField="CveMarca" DataTextField="Marca" class="select2me" Width="100%"></asp:DropDownList>
</div>
<label class="col-md-1 ">Clasificación:</label>
<div class="col-md-2">
<div class="col-md-1">
<asp:DropDownList ID="DdlClasificaciones" runat="server" DataValueField="CveClasificacion" DataTextField="Clasificacion" class="select2me" Width="100%"></asp:DropDownList>
</div>
<asp:Label runat="server" ID="LblSubProyecto" CssClass="col-md-1" Text="SubProyecto"></asp:Label>
<div class="col-md-2">
<div class="col-md-1">
<asp:DropDownList runat="server" ID="DdlSubProyecto" CssClass="select2me" Width="100%" DataTextField="SubProyecto" DataValueField="CveSubProyecto"></asp:DropDownList>
</div>
<label class="col-md-1 ">Fecha Inicial:</label>
@@ -92,7 +96,7 @@
<asp:BoundField DataField="Codigo" HeaderText="Código" />
<asp:BoundField DataField="PS" HeaderText="Producto/Servicio" />
<asp:BoundField DataField="Serie" HeaderText="Serie" />
<asp:BoundField DataField="Fecha" DataFormatString="{0:d}" HeaderText="Fecha" />
<asp:BoundField DataField="Fecha" DataFormatString="{0:d}" HeaderText="Fecha Compra" />
<asp:BoundField DataField="mesestranscurridos" HeaderText="M.Transc." />
</Columns>
</asp:GridView>

View File

@@ -61,10 +61,14 @@ public partial class Acumuladores_RepAcumuladoresVigencia : ClsPaginas
private void CargaCombos()
{
CargarCentrosDeCosto(null, DdlSubProyecto, null, LblSubProyecto);
DdlClasificaciones.DataSource = get_GlobalDTClasificaciones(UsuarioActual.CveEmpresa);
DdlClasificaciones.DataSource = get_GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltraParametros("Categoria = 'ACUMULADORES'");
DdlClasificaciones.DataBind();
DdlClasificaciones.Items.Insert(0, new ListItem("Todos", "-1"));
}
DdlMarcas.DataSource = get_GlobalDTGralMarcas(UsuarioActual.CveEmpresa);
DdlMarcas.DataBind();
DdlMarcas.Items.Insert(0, new ListItem("Todas", "-1"));
}
protected void BtnConsultar_Click(object sender, EventArgs e)
{
@@ -76,7 +80,7 @@ public partial class Acumuladores_RepAcumuladoresVigencia : ClsPaginas
{
ClsAcumuladores ObjAcum = new ClsAcumuladores();
if (ObjAcum.GetVigencias(txtFechaI.Text.ToDate(), txtFechaF.Text.ToDate(), DdlClasificaciones.SelectedValue.ToEntero(), UsuarioActual.CveEmpresa, DdlSubProyecto.SelectedValue.ToEntero()))
if (ObjAcum.GetVigencias(txtFechaI.Text.ToDate(), txtFechaF.Text.ToDate(), DdlMarcas.SelectedValue.ToEntero(), DdlClasificaciones.SelectedValue.ToEntero(), UsuarioActual.CveEmpresa, DdlSubProyecto.SelectedValue.ToEntero()))
{
GvAcum.DataSource = ObjAcum.DtResultados;
}

View File

@@ -1315,11 +1315,12 @@ Public Class ClsAcumuladores
End Function
#Region "VIGENCIA ACUMULADORES"
Public Function GetVigencias(FechaInicio As Date, FechaFin As Date, CveClasificacion As Integer, CveEmpresa As Integer, CveSubProyecto As Integer) As Boolean
Public Function GetVigencias(FechaInicio As Date, FechaFin As Date, CveMarca As Integer, CveClasificacion As Integer, CveEmpresa As Integer, CveSubProyecto As Integer) As Boolean
Dim Retorno As Boolean = False
SqlDataAdapter("PA_Inv_ProductosFechasComprasSerie")
With SqlAdapter.SelectCommand.Parameters
.Add("@CveMarca", SqlDbType.Int).Value = CveMarca
.Add("@CveClasificacion", SqlDbType.Int).Value = CveClasificacion
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
.Add("@FechaIni", SqlDbType.Date).Value = FechaInicio

View File

@@ -197,7 +197,7 @@ Public Class ClsCompras
Optional CveOC As Integer = -1, Optional CveCajaChica As Integer = -1, Optional CvePersonal As Integer = -1, Optional NumeroReembolso As String = "-1", Optional CveProveedorSucursal As Integer = -1,
Optional AplicoPromocion As Boolean = False, Optional PorcentajeIVA As Double = 0, Optional CveMetodoPago As Integer = -1, Optional CveRetIVAConcepto As Integer = -1, Optional CveConceptoContableAlmacen As Integer = -1,
Optional CveRetISRConcepto As Integer = -1, Optional NoDeducible As Boolean = False, Optional CveTipoCompra As Integer = -1, Optional TotalOriginal As Double = 0, Optional CveTipoConcepto As Integer = 1, Optional CveFactura As Integer = -1,
Optional CveContrato As Integer = -1, Optional EsImportacion As Boolean = False) As Boolean
Optional CveContrato As Integer = -1, Optional EsImportacion As Boolean = False, Optional CveSubProyecto As Integer = -1) As Boolean
Dim Retorno As Boolean = False
@@ -250,6 +250,7 @@ Public Class ClsCompras
.Add("@CveFactura", SqlDbType.Int).Value = CveFactura
.Add("@CveContrato", SqlDbType.Int).Value = CveContrato
.Add("@EsImportacion", SqlDbType.Bit).Value = EsImportacion
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
End With
@@ -274,7 +275,7 @@ Public Class ClsCompras
Public Function UpdateCompra(Descripcion As String, FolioSecundario As String, FechaVencimiento As Date, AplicaNotaCredito As Boolean, Observaciones As String, CveEstatusCompra As Integer,
Descuento As Double, SubTotal As Double, IVA As Double, Total As Double, CveUsuario As Integer, CveCompra As Integer, Optional CveCajaChica As Integer = -1, Optional CvePersonal As Integer = -1,
Optional CveProveedorSucursal As Integer = -1, Optional PorcentajeIVA As Double = 0, Optional NumeroReembolso As String = "", Optional CveTipoCompra As Integer = -1, Optional NoDeducible As Boolean = False,
Optional CveFactura As Integer = -1, Optional CveContrato As Integer = -1, Optional CveRetIVAConcepto As Integer = -1, Optional CveRetISRConcepto As Integer = -1) As Boolean
Optional CveFactura As Integer = -1, Optional CveContrato As Integer = -1, Optional CveRetIVAConcepto As Integer = -1, Optional CveRetISRConcepto As Integer = -1, Optional CveSubProyecto As Integer = -1) As Boolean
Dim Retorno As Boolean = False
@@ -307,6 +308,8 @@ Public Class ClsCompras
.Add("@CveRetIVAConcepto", SqlDbType.Int).Value = CveRetIVAConcepto
.Add("@CveRetISRConcepto", SqlDbType.Int).Value = CveRetISRConcepto
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
End With
Try
@@ -3273,3 +3276,4 @@ Public Class ClsCompras
End Class

View File

@@ -1576,7 +1576,7 @@ Public Class ClsGenerales
Return Retorno
End Function
Public Function AddCuentasDepositos(BancoNombre As String, Plaza As String, Sucursal As String, Cuenta As String, CLABE As String, CIE As String, SWIFT As String, Referencia As String, RefCrediProveedor As String, CveUsuario As Integer, CveMoneda As Integer,
Public Function AddCuentasDepositos(BancoNombre As String, Plaza As String, Sucursal As String, Cuenta As String, CLABE As String, CIE As String, SWIFT As String, Referencia As String, RefCrediProveedor As String, CveUsuario As Integer, CveMoneda As Integer, CveEmpresa As Integer,
Optional CveProveedor As Integer = -1, Optional CveCliente As Integer = -1, Optional CvePersonal As Integer = -1, Optional CveColectiva As Integer = -1, Optional CveUsuarioModifico As Integer = -1,
Optional Correo As String = "", Optional BBVAAlias As String = "-1", Optional EstatusPagoElectronico As Boolean = False, Optional EstatusPagoElectronicoGrupos As Boolean = False, Optional CveSATBanco As Integer = -1,
Optional ConceptoCIE As String = "-1") As Boolean
@@ -1585,6 +1585,7 @@ Public Class ClsGenerales
DataAdapter("PA_Gral_CuentasDepositosAdd")
With SqlAdapter.SelectCommand.Parameters
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@CveProveedor", SqlDbType.Int).Value = CveProveedor
.Add("@CveColectiva", SqlDbType.Int).Value = CveColectiva
.Add("@CvePersonal", SqlDbType.Int).Value = CvePersonal
@@ -1626,14 +1627,16 @@ Public Class ClsGenerales
Return Retorno
End Function
Public Function RemoveCuentasDepositos(CveCuentaDeposito As Integer, Optional CveUsuarioModifico As Integer = -1) As Boolean
Public Function RemoveCuentasDepositos(CveCuentaDeposito As Integer, CveEmpresa As Integer, CveUsuarioModifico As Integer) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Gral_CuentasDepositosRemove")
SqlAdapter.SelectCommand.Parameters.Add("@CveCuentaDeposito", SqlDbType.Int).Value = CveCuentaDeposito
SqlAdapter.SelectCommand.Parameters.Add("@CveUsuarioModifico", SqlDbType.Int).Value = CveUsuarioModifico
DataAdapter("PA_Gral_CuentasDepositosRemove")
With SqlAdapter.SelectCommand.Parameters
.Add("@CveCuentaDeposito", SqlDbType.Int).Value = CveCuentaDeposito
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@CveUsuarioModifico", SqlDbType.Int).Value = CveUsuarioModifico
End With
Try
SqlAdapter.Fill(Data)
Retorno = True
@@ -1655,8 +1658,9 @@ Public Class ClsGenerales
DataAdapter("PA_Gral_CuentasDepositosPersonalUpdate")
With SqlAdapter.SelectCommand.Parameters
.Add("@CveCuentaDeposito", SqlDbType.Int).Value = CveCuentaDeposito
With SqlAdapter.SelectCommand.Parameters
.Add("@CveCuentaDeposito", SqlDbType.Int).Value = CveCuentaDeposito
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@BancoNombre", SqlDbType.VarChar).Value = BancoNombre
.Add("@Cuenta", SqlDbType.VarChar).Value = Cuenta
.Add("@CLABE", SqlDbType.VarChar).Value = CLABE
@@ -1685,14 +1689,15 @@ Public Class ClsGenerales
End Function
Public Function UpdateCuentasDepositos(CveCuentaDeposito As Integer, BancoNombre As String, Plaza As String, Sucursal As String, Cuenta As String, CLABE As String, CIE As String, SWIFT As String, Referencia As String,
RefCrediProveedor As String, Predeterminada As Boolean, Estatus As Boolean, CveMoneda As Integer, Optional CveUsuarioModifico As Integer = -1, Optional Correo As String = "",
RefCrediProveedor As String, Predeterminada As Boolean, Estatus As Boolean, CveMoneda As Integer, CveEmpresa As Integer, Optional CveUsuarioModifico As Integer = -1, Optional Correo As String = "",
Optional BBVAAlias As String = "-1", Optional EstatusPagoElectronico As Boolean = False, Optional EstatusPagoElectronicoGrupos As Boolean = False, Optional CveSATBanco As Integer = -1,
Optional ConceptoCIE As String = "-1") As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Gral_CuentasDepositosUpdate")
With SqlAdapter.SelectCommand.Parameters
With SqlAdapter.SelectCommand.Parameters
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@BancoNombre", SqlDbType.VarChar).Value = BancoNombre
.Add("@Plaza", SqlDbType.VarChar).Value = Plaza
.Add("@Sucursal", SqlDbType.VarChar).Value = Sucursal

View File

@@ -136,6 +136,7 @@ Public Class ClsInventarios
Public Property Modulo As String
Public Property ConAplicacion As Boolean
Public Property CveInventarioFisicoPadre As Integer
Public Property CveFolioGarantia As Integer
@@ -875,7 +876,7 @@ Public Class ClsInventarios
ResponsableCarga = dr("ResponsableCarga").ToString
ResponsableRecibio = dr("ResponsableRecibio").ToString
Modulo = dr("Modulo").ToString
CveFolioGarantia = dr("CveFolioGarantia").ToString.ToEntero
Retorno = True
End If
@@ -985,7 +986,7 @@ Public Class ClsInventarios
Optional CveMovimientoRelacionado As Integer = -1, Optional TipoCambio As Double = -1, Optional CveVendedor As Integer = -1, Optional CveCliente As Integer = -1, Optional MovimientoFijo As Boolean = False, Optional CveContrato As Integer = -1,
Optional CveProveedor As Integer = -1, Optional Remision As String = "", Optional CveClienteSucursal As Integer = -1, Optional DepartamentoEntrega As String = "", Optional PedidoContrato As String = "", Optional GastoIndirecto As Double = -1, Optional CveChofer As Integer = -1, Optional CveCamion As Integer = -1, Optional Placa As String = "",
Optional FechaEntrega As String = "", Optional EspecifUnidad As String = "", Optional ResponsableCarga As String = "", Optional ResponsableRecibio As String = "", Optional Identificacion As String = "", Optional Domicilio As String = "",
Optional Telefono As String = "", Optional Ciudad As String = "", Optional Licencia As String = "", Optional Modulo As String = "", Optional CveOP As Integer = -1) As Integer
Optional Telefono As String = "", Optional Ciudad As String = "", Optional Licencia As String = "", Optional Modulo As String = "", Optional CveOP As Integer = -1, Optional CveFolioGarantia As Integer = -1) As Integer
Dim Retorno As Integer = -1
@@ -1045,6 +1046,7 @@ Public Class ClsInventarios
.Add("@Licencia", SqlDbType.VarChar).Value = Licencia
.Add("@Modulo", SqlDbType.VarChar).Value = Modulo
.Add("@CveOP", SqlDbType.Int).Value = CveOP
.Add("@CveFolioGarantia", SqlDbType.Int).Value = CveFolioGarantia
End With
Try

View File

@@ -577,7 +577,7 @@ Public Class ClsPaginas
Dim AppNombre As String = $"GlobalDTProveedoresCuentas-{CveEmpresa}"
If HttpContext.Current.Application(AppNombre) Is Nothing Then
Using ObjProveedoresBancos As New ClsGenerales
If ObjProveedoresBancos.GetCuentasDepositos(CveEmpresa:=CveEmpresa, CveProveedor:=-1, CveCliente:=-2, CvePersonal:=-2) Then Application(AppNombre) = ObjProveedoresBancos.DtResultados
If ObjProveedoresBancos.GetCuentasDepositos(CveEmpresa:=CveEmpresa, CveProveedor:=-2) Then Application(AppNombre) = ObjProveedoresBancos.DtResultados
End Using
End If
Dim filtros As New List(Of String)
@@ -602,7 +602,7 @@ Public Class ClsPaginas
Dim AppNombre As String = $"GlobalDTCuentasDepositosClientes-{CveEmpresa}"
If Application(AppNombre) Is Nothing Then
Dim P As New ClsGenerales
If P.GetCuentasDepositos(CveEmpresa:=CveEmpresa, CveCliente:=-1, CveProveedor:=-2, CvePersonal:=-2) Then Application(AppNombre) = P.DtResultados
If P.GetCuentasDepositos(CveEmpresa:=CveEmpresa, CveCliente:=-2) Then Application(AppNombre) = P.DtResultados
P.Dispose()
End If
Dim Str As New StringBuilder
@@ -834,7 +834,7 @@ Public Class ClsPaginas
End If
Dim filtros As New List(Of String)
If CveCategoria <> -1 Then filtros.Add($"CveCategoria = {CveCategoria}")
If UsoClasificacion <> -1 Then filtros.Add($"UsoClasificacion = {UsoClasificacion}")
If UsoClasificacion <> -1 Then filtros.Add($"UsoClasificacion IN ({UsoClasificacion},3) ")
If CveClasificacion <> -1 Then filtros.Add($"CveClasificacion = {CveClasificacion}")
If filtros.Count > 0 Then
Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), String.Join(" AND ", filtros), "", DataViewRowState.CurrentRows)

View File

@@ -1146,20 +1146,17 @@ Partial Class Bancos_IE
Else
If DdlTipoTransaccion.SelectedValue = "9" Then
Dim Dep As New ClsGenerales
If Dep.GetCuentasDepositos(CveProveedor:=ObjIE.CveProveedor) Then
DdlCuentaDeposito.DataSource = Dep.DtResultados.FiltraParametros(" Estatus = 'True' ")
If Dep.DtResultados.Rows.Count > 0 Then
Dim dtc As DataTable = GlobalDTProveedoresCuentas(UsuarioActual.CveEmpresa, CveProveedor:=CveProveedor)
If dtc IsNot Nothing Then
DdlCuentaDeposito.DataSource = dtc.FiltraParametros(" Estatus = 'True' ")
If dtc.Rows.Count > 0 Then
trCuentaDeposito.Visible = True
DdlCuentaDeposito.Items.Insert(0, New ListItem("Seleccione una cuenta", "-1"))
'ElseIf Dep.DtResultados.Rows.Count = 1 Then
' TrCuentaDepositado.Visible = True
' LitTextoDepositado.Text = "Cuenta Depósito"
' LitDepositado.Text = Dep.DtResultados.Rows(0)("CuentaDeposito").ToString
'End If
End If
End If
Dep.Dispose()
DdlCuentaDeposito.DataBind()
UpCuentaDeposito.Update()
End If
@@ -1167,9 +1164,6 @@ Partial Class Bancos_IE
End If
LnkComplementoPago.Visible = True
If ObjIE.CveEstatusIE = 1 AndAlso ObjIE.CveIECancelado > 0 Then
'cuando es cheque devuelto
TabCancelacion.Visible = True
@@ -1185,8 +1179,6 @@ Partial Class Bancos_IE
End If
'DATOS DE CANCELACION
If ObjIE.CveEstatusIE = 2 OrElse (ObjIE.CveEstatusIE = 1 AndAlso ObjIE.CveIECancelacion > 0) Then
TabCancelacion.Visible = True
@@ -1327,8 +1319,6 @@ Partial Class Bancos_IE
End If
RecargaGlobalCuentasBancarias()
ObjIE.Dispose()
ObjIE2.Dispose()
UPPP.Update()
@@ -3968,7 +3958,6 @@ Partial Class Bancos_IE
End If
Msg.Clear()
RecargaGlobalCuentasBancarias()
ObjIE.Dispose()
ObjMov.Dispose()
If ObjComp IsNot Nothing Then ObjComp.Dispose()
@@ -5206,15 +5195,23 @@ Partial Class Bancos_IE
'If DdlTipoTransaccion.SelectedValue.Contiene("2", "9") Then ' transferencias y layout
trCuentaDeposito.Visible = False
Dim dtc As DataTable = Nothing
Dim Dep As New ClsGenerales
If Dep.GetCuentasDepositos(CveProveedor:=CveProveedor, CveCliente:=CveCliente, CvePersonal:=CvePersonal) Then
If CveProveedor > 0 Then
dtc = GlobalDTProveedoresCuentas(UsuarioActual.CveEmpresa, CveProveedor:=CveProveedor)
ElseIf CveCliente > 0 Then
dtc = GlobalDTCuentasDepositosClientes(UsuarioActual.CveEmpresa, CveCliente:=CveCliente)
End If
' If Dep.GetCuentasDepositos(CveProveedor:=CveProveedor, CveCliente:=CveCliente, CvePersonal:=CvePersonal) Then
If dtc IsNot Nothing Then
If DdlTipoTransaccion.SelectedValue = "9" And CveIE <= -1 Then
DdlCuentaDeposito.DataSource = Dep.DtResultados.FiltraParametros("EstatusPagoElectronico = 'True' AND Estatus ='True'")
DdlCuentaDeposito.DataSource = dtc.FiltraParametros("EstatusPagoElectronico = 'True' AND Estatus ='True'")
If Dep.DtResultados.FiltraParametros("EstatusPagoElectronico = 'True' AND Estatus ='True'").Rows.Count > 0 Then
If dtc.FiltraParametros("EstatusPagoElectronico = 'True' AND Estatus ='True'").Rows.Count > 0 Then
trCuentaDeposito.Visible = True
DdlCuentaDeposito.Items.Insert(0, New ListItem("Seleccione una cuenta", "-1"))
Else
@@ -5223,10 +5220,9 @@ Partial Class Bancos_IE
DdlCuentaDeposito.Items.Insert(0, New ListItem("Seleccione una cuenta", "-1"))
ElseIf DdlTipoTransaccion.SelectedValue = "17" And CveIE <= -1 Then
If dtc.Rows.Count > 0 Then
If Dep.DtResultados.Rows.Count > 0 Then
DdlCuentaDeposito.DataSource = Dep.DtResultados.FiltraParametros(" Estatus = 'True' ")
DdlCuentaDeposito.DataSource = dtc.FiltraParametros(" Estatus = 'True' ")
trCuentaDeposito.Visible = True
BtnGuardar.ToolTip = ""
@@ -5242,15 +5238,14 @@ Partial Class Bancos_IE
UpGuardar.Update()
Else
DdlCuentaDeposito.DataSource = Dep.DtResultados.FiltraParametros("Estatus ='True'")
If Dep.DtResultados.Rows.Count > 0 Then
DdlCuentaDeposito.DataSource = dtc.FiltraParametros("Estatus ='True'")
If dtc.Rows.Count > 0 Then
trCuentaDeposito.Visible = True
DdlCuentaDeposito.Items.Insert(0, New ListItem("Seleccione una cuenta", "-1"))
End If
End If
Else
If DdlTipoTransaccion.SelectedValue.Contiene("9", "17") And CveIE <= -1 Then
@@ -5265,9 +5260,8 @@ Partial Class Bancos_IE
UpGuardar.Update()
End If
Dep.Dispose()
'If DdlTipoTransaccion.SelectedValue = "9" AndAlso DdlCuentaDeposito.Items.Count = 0 Then
' BtnIEGuardar.Enabled = False
@@ -5280,7 +5274,7 @@ Partial Class Bancos_IE
' trCuentaDeposito.Visible = False
' DdlCuentaDeposito.Items.Clear()
'End If
RecargaGlobalCuentasBancarias()
UpCuentaDeposito.Update()
UpDatos.Update()
End Sub
@@ -5305,18 +5299,6 @@ Partial Class Bancos_IE
End Sub
'Recaga CuentasBancarias de Proveedor
Private Sub RecargaGlobalCuentasBancarias(Optional ByVal CveCuenta As Integer = -1)
If CveProveedor > 0 Then
GlobalDTProveedoresCuentas(UsuarioActual.CveEmpresa, -1) = Nothing
'Dim ObjCuentasBancos As New ClsGenerales
'If ObjCuentasBancos.GetCuentasDepositos(CveEmpresa:=UsuarioActual.CveEmpresa) Then
' GlobalDTProveedoresCuentas(-1, True) = ObjCuentasBancos.DtResultados
'End If
'ObjCuentasBancos.Dispose()
End If
End Sub
Protected Sub DdlCuentaDeposito_SelectedIndexChanged(sender As Object, e As EventArgs)
Dim Dep As New ClsGenerales
@@ -6640,7 +6622,6 @@ Partial Class Bancos_IE
trCuentaDeposito.Visible = True
DdlCuentaDeposito.Enabled = True
Dim Dep As New ClsGenerales
If Dep.GetCuentasDepositos(CveCliente:=CveCliente) Then
@@ -6651,15 +6632,12 @@ Partial Class Bancos_IE
DdlCuentaDeposito.Items.Insert(0, New ListItem("Seleccione una cuenta", "-1"))
End If
End If
Dep.Dispose()
DdlCuentaDeposito.DataBind()
UpCuentaDeposito.Update()
End If
End Sub

View File

@@ -277,7 +277,7 @@ public partial class Bancos_PagoAcreedor : ClsPaginas
int CveConceptoContablePago = 42;
int CveConceptoContableBancoComplementario = 204;
int CveConceptoContablePrestamoComplementario = 202;
int CvePlantillaPoliza = 21;
int CvePlantillaPoliza = 43;
int CvePrePoliza = 0;
int CveMonedaPago = get_GlobalDTBancosCuentas(-1, CveEmpresa: UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveMoneda", $"CveEmpresa = {UsuarioActual.CveEmpresa} AND CveCuenta = {DdlCuenta.SelectedValue.ToEntero()}").ToEntero();
int FolioFijo = 0;
@@ -704,7 +704,7 @@ public partial class Bancos_PagoAcreedor : ClsPaginas
int CveConceptoContablePrestamo = 41;
int CveConceptoContableBancoComplementario = 204;
int CveConceptoContablePrestamoComplementario = 202;
int CvePlantillaPoliza = 45;
int CvePlantillaPoliza = 44;
int CvePrePoliza = 0;
int CveMoneda = get_GlobalDTBancosCuentas(-1, CveEmpresa: UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveMoneda", $"CveEmpresa = {UsuarioActual.CveEmpresa} AND CveCuenta = {DdlCuentaPrestamo.SelectedValue.ToEntero()}").ToEntero();
int FolioFijo = 0;

View File

@@ -650,16 +650,14 @@ Partial Class Bancos_ProveedoresAbonar
Exit Sub
End If
Dim Dep As New ClsGenerales
If Dep.GetCuentasDepositos(CveProveedor:=CveProveedor) Then
Dim Row = Dep.DtResultados.FiltroPrimero(String.Format("CveCuentaDeposito = {0}", DdlCuentaDeposito.SelectedValue.ToEntero))
Dim dtc As DataTable = GlobalDTProveedoresCuentas(UsuarioActual.CveEmpresa, CveProveedor:=CveProveedor)
If dtc IsNot Nothing Then
Dim Row = dtc.FiltroPrimero(String.Format("CveCuentaDeposito = {0}", DdlCuentaDeposito.SelectedValue.ToEntero))
If Row IsNot Nothing AndAlso Row("Estatus").ToString = "False" Then
Alert("La cuenta depósito del proveedor esta inactiva.", TipoMensaje.MsgAdvertencia)
Dep.Dispose()
Exit Sub
End If
End If
Dep.Dispose()
'proceso que restringue solo el pago de apartir del dia de hoy y como limite fin de mes
If UsuarioActual.TienePermisoProceso(105) AndAlso (TxtFechaDocumento.Text.ToDate < Now.Date Or TxtFechaDocumento.Text.ToDate > Now.LastDayOfMonth) Then
@@ -1310,22 +1308,22 @@ Partial Class Bancos_ProveedoresAbonar
#Region " CUENTAS DEPOSITOS"
Private Sub CargaCuentasDepositos()
DdlCuentaDeposito.Items.Clear()
' If DdlTipoTransaccion.SelectedValue.Contiene("2", "9") Then ' transferencias y layout
trCuentaDeposito.Visible = False
Dim Dep As New ClsGenerales
If Dep.GetCuentasDepositos(CveProveedor:=CveProveedor) Then
Dim dtc As DataTable = GlobalDTProveedoresCuentas(UsuarioActual.CveEmpresa, CveProveedor:=CveProveedor)
If dtc IsNot Nothing Then
If Dep.DtResultados.FiltraParametros("Estatus ='True'").Rows.Count > 0 Then
If dtc.FiltraParametros("Estatus ='True'").Rows.Count > 0 Then
If DdlTipoTransaccion.SelectedValue = "9" Then
If Dep.DtResultados.Rows.Count > 0 Then
DdlCuentaDeposito.DataSource = Dep.DtResultados.FiltraParametros("EstatusPagoElectronico = 'True' AND Estatus ='True'")
If dtc.Rows.Count > 0 Then
DdlCuentaDeposito.DataSource = dtc.FiltraParametros("EstatusPagoElectronico = 'True' AND Estatus ='True'")
DdlCuentaDeposito.Items.Insert(0, New ListItem("Seleccione una cuenta", "-1"))
End If
If Dep.DtResultados.FiltraParametros("EstatusPagoElectronico = 'True' AND Estatus ='True'").Rows.Count > 0 Then
If dtc.FiltraParametros("EstatusPagoElectronico = 'True' AND Estatus ='True'").Rows.Count > 0 Then
trCuentaDeposito.Visible = True
DdlCuentaDeposito.Items.Insert(0, New ListItem("Seleccione una cuenta", "-1"))
Else
@@ -1335,45 +1333,28 @@ Partial Class Bancos_ProveedoresAbonar
ElseIf DdlTipoTransaccion.SelectedValue = "17" Then
If Dep.DtResultados.Rows.Count > 0 Then
DdlCuentaDeposito.DataSource = Dep.DtResultados.FiltraParametros(" Estatus ='True'")
If dtc.Rows.Count > 0 Then
DdlCuentaDeposito.DataSource = dtc.FiltraParametros(" Estatus ='True'")
DdlCuentaDeposito.Items.Insert(0, New ListItem("Seleccione una cuenta", "-1"))
trCuentaDeposito.Visible = True
BtnIEGuardar.ToolTip = ""
Else
BtnIEGuardar.Enabled = False
BtnIEGuardar.ToolTip = "El proveedor no tiene cuentas deposito"
Alert("El proveedor no tiene cuentas deposito.", TipoMensaje.MsgAdvertencia)
End If
UpGuardar.Update()
Else
DdlCuentaDeposito.DataSource = Dep.DtResultados.FiltraParametros("Estatus ='True'")
If Dep.DtResultados.Rows.Count > 0 Then
DdlCuentaDeposito.DataSource = dtc.FiltraParametros("Estatus ='True'")
If dtc.Rows.Count > 0 Then
trCuentaDeposito.Visible = True
DdlCuentaDeposito.Items.Insert(0, New ListItem("Seleccione una cuenta", "-1"))
End If
End If
DdlCuentaDeposito.DataBind()
'If DdlCuentaDeposito.Items.Count > 1 Then
' DdlCuentaDeposito.SelectedIndex = 1
'End If
Else
If DdlTipoTransaccion.SelectedValue.Contiene("9", "17") Then
BtnIEGuardar.Enabled = False
BtnIEGuardar.ToolTip = "El proveedor no tiene cuentas deposito"
Alert("El proveedor no tiene cuentas deposito.", TipoMensaje.MsgAdvertencia)
@@ -1382,17 +1363,11 @@ Partial Class Bancos_ProveedoresAbonar
BtnIEGuardar.Enabled = True
BtnIEGuardar.ToolTip = ""
End If
UpGuardar.Update()
End If
Else
If DdlTipoTransaccion.SelectedValue = "17" Then
BtnIEGuardar.Enabled = False
BtnIEGuardar.ToolTip = "El proveedor no tiene cuentas deposito"
Else
@@ -1402,11 +1377,8 @@ Partial Class Bancos_ProveedoresAbonar
End If
UpGuardar.Update()
End If
Dep.Dispose()
'Else
' trCuentaDeposito.Visible = False
' DdlCuentaDeposito.Items.Clear()
@@ -1428,28 +1400,27 @@ Partial Class Bancos_ProveedoresAbonar
Protected Sub DdlCuentaDeposito_SelectedIndexChanged(sender As Object, e As EventArgs)
Dim Dep As New ClsGenerales
Dim dtc As DataTable = GlobalDTProveedoresCuentas(UsuarioActual.CveEmpresa, CveProveedor:=CveProveedor)
If dtc IsNot Nothing AndAlso dtc.Rows.Count = 1 Then
If Dep.GetCuentasDepositos(CveProveedor:=CveProveedor, CveCuentaDeposito:=DdlCuentaDeposito.SelectedValue.ToEntero) AndAlso Dep.DtResultados.Rows.Count = 1 Then
If dtc.Rows.Count > 0 Then
If Dep.DtResultados.Rows.Count > 0 Then
If Dep.DtResultados.Rows(0)("TieneCIE").ToString.ToEntero = 1 Then
If dtc.Rows(0)("TieneCIE").ToString.ToEntero = 1 Then
TrReferenciaCIE.Visible = True
TxtReferenciaCIE.Text = Dep.DtResultados.Rows(0)("Referencia").ToString
TxtConceptoCIE.Text = Dep.DtResultados.Rows(0)("ConceptoCIE").ToString
TxtReferenciaCIE.Text = dtc.Rows(0)("Referencia").ToString
TxtConceptoCIE.Text = dtc.Rows(0)("ConceptoCIE").ToString
OriReferenciaCIE = Dep.DtResultados.Rows(0)("Referencia").ToString
OriConceptoCIE = Dep.DtResultados.Rows(0)("ConceptoCIE").ToString
OriReferenciaCIE = dtc.Rows(0)("Referencia").ToString
OriConceptoCIE = dtc.Rows(0)("ConceptoCIE").ToString
Else
TrReferenciaCIE.Visible = False
End If
If Boolean.Parse(Dep.DtResultados.Rows(0)("EstatusPagoElectronicoGrupos").ToString) = True AndAlso Dep.DtResultados.Rows(0)("CveSATBanco").ToString.ToEntero <= 0 Then
If Boolean.Parse(dtc.Rows(0)("EstatusPagoElectronicoGrupos").ToString) = True AndAlso dtc.Rows(0)("CveSATBanco").ToString.ToEntero <= 0 Then
Alert("Es necesario establecer el banco de la cuenta deposito", TipoMensaje.MsgAdvertencia)
BtnIEGuardar.Enabled = False
@@ -1466,7 +1437,6 @@ Partial Class Bancos_ProveedoresAbonar
TrReferenciaCIE.Visible = False
End If
Dep.Dispose()
UpCuentaDeposito.Update()
UpGuardar.Update()
End Sub

View File

@@ -5521,6 +5521,7 @@
</div>
@@ -6789,6 +6790,9 @@
$('#TxtDeudoresOtrosGastosIngresos').val(txtOtrIngEgs.value);
}
</script>
</asp:Content>

View File

@@ -11,6 +11,7 @@ Imports Newtonsoft.Json
Imports Extensiones
Imports System.Activities.Expressions
Imports iText.Barcodes.Dmcode
Imports Microsoft.Reporting.WebForms
Partial Class Compras_Compras
Inherits ClsPaginas
@@ -3199,10 +3200,10 @@ Partial Class Compras_Compras
'Tiene Importacion
If dr("EsImportacion").ToString = "True" Then
chkImportacion.Checked = True
Else
chkImportacion.Checked = False
End If
chkImportacion.Checked = True
Else
chkImportacion.Checked = False
End If
CargaComplementosPago()
CargaGvBitacora()
InventarioMov()
@@ -7415,7 +7416,7 @@ Partial Class Compras_Compras
Else
Dim usacomplementariaAnticipo As Boolean = False
usacomplementariaAnticipo = If(Ant.TCCompra > 1 And not UsuarioActual.CveEmpresa.Contiene(13,83), True, False)
usacomplementariaAnticipo = If(Ant.TCCompra > 1 And Not UsuarioActual.CveEmpresa.Contiene(13, 83), True, False)
Dim TipoCambioAnt As Decimal = Ant.TCCompra
Dim ImporteAnt As Decimal = importeMovimiento
@@ -8116,7 +8117,12 @@ Partial Class Compras_Compras
End If
If UsuarioActual.TienePermisoProceso(354) Then 'visualizar la póliza al registros
Msg.AppendFormat("<br/><br/><a Class=""Texto"" target='_blank' href=""/Contabilidad/RegPrePolizaS.aspx?CvePrePoliza={0}"">Ver Póliza</a>", CvePrePoliza)
Msg.AppendFormat("<br/><br/><a Class=""Texto"" target='_blank' href=""/Contabilidad/RegPrePolizaS.aspx?CvePrePoliza={0}"">Ver Póliza</a>. ", CvePrePoliza)
Dim TempParametros = Encripta(String.Format("OP=PREPO&CvePrePoliza={0}", CvePrePoliza))
Msg.Append($" <a class='Texto' target='_blank' href=""/Compras/PopUpVerFactura.aspx?P={TempParametros}""> Descargar PDF <i class='fa fa-file-pdf-o' aria-hidden='true'></i></a>")
End If
If CveMovimientoInventario > 0 Then
@@ -8125,8 +8131,10 @@ Partial Class Compras_Compras
Msg.AppendFormat("</br><a class=""Texto"" target='_blank' href=""/Compras/PopUpVerFactura.aspx?P={0}"">Imprimir Entrada Almacen</a>", TempParametros)
End If
If Not ObjCompras.UpdateCompraPrePoliza(TxtFecha.Text.ToDate, PolizaFolio.ToString, IdPoliza, CvePrePoliza, CveCompra, 0) Then
TieneError = True
If UsuarioActual.Empresa.TipoContabilidad = 2 Then
If Not ObjCompras.UpdateCompraPrePoliza(TxtFecha.Text.ToDate, PolizaFolio.ToString, IdPoliza, CvePrePoliza, CveCompra, 0) Then
TieneError = True
End If
End If
If EntregaDirecta Then
@@ -13503,10 +13511,10 @@ Partial Class Compras_Compras
For Each Dr As GridViewRow In GVDevolucion.Rows
'CveAlmacen = Dr.DataKey("CveAlmacen").ToString.ToEntero
cantidad = Dr.FCTextBox("TxtCantidad").Text.ToDecimal
If cantidad > 0 Then
Cantidad = Dr.FCTextBox("TxtCantidad").Text.ToDecimal
If Cantidad > 0 Then
realizadevolucion = True
subtotaldevolucion += Dr.DataKey("PU").ToString.ToDecimal * cantidad
subtotaldevolucion += Dr.DataKey("PU").ToString.ToDecimal * Cantidad
End If
Next
'si no esta vinculado a nc simplemente me lo brinco
@@ -20600,6 +20608,9 @@ Partial Class Compras_Compras
'End Function
End Class

View File

@@ -1442,6 +1442,16 @@ Partial Class PopUpVerFactura
End If
End If
'IMPRIME VALE
If UrlParametros("OP").ToString = "PREPO" Then
If UrlParametros("CVEPREPOLIZA") IsNot Nothing AndAlso UrlParametros("CVEPREPOLIZA").ToString.ToEntero > 0 Then
ImprimeImPrimePrePolizaS(UrlParametros("CVEPREPOLIZA").ToString.ToEntero)
End If
End If
End Sub
Private Function Parametros(Cadena As String) As Hashtable
@@ -6866,4 +6876,177 @@ Partial Class PopUpVerFactura
End Sub
#End Region
#Region "OP PREPO"
Public Sub ImprimeImPrimePrePolizaS(CvePrePoliza As Integer)
If Not CvePrePoliza > 0 Then
Exit Sub
End If
'ObjContabilidad.Dispose()
Dim rutaArchivo As String = ""
Dim params As New List(Of ReportParameter)
Dim Bytes As Byte() = Nothing
Dim DtDetalle As New DataTable
Dim CveTipoPolizaImp As Integer = 0
Dim FolioPoliza As String = ""
Dim ConceptoPolizaImp As String = ""
Dim CveMonedaImp As Integer = 0
Dim TipoPolizaString = ""
Dim ObjContabilidad As New ClsContabilidad
Dim TipoPolImp As String = ""
If ObjContabilidad.GetPrePoliza(CvePrePoliza, UsuarioActual.CveEmpresa) Then
Dim dr As DataRow = ObjContabilidad.DtResultados.FiltroPrimero("")
If dr IsNot Nothing Then
TipoPolImp = If(dr("CveTipoPoliza").ToString.ToEntero = 1, "Ingreso", If(dr("CveTipoPoliza").ToString.ToEntero = 2, "Egreso", "Diario"))
CveTipoPolizaImp = dr("CveTipoPoliza").ToString.ToEntero
ConceptoPolizaImp = dr("Concepto").ToString
FolioPoliza = dr("FolioPoliza").ToString
CveMonedaImp = dr("CveMoneda").ToString.ToEntero
Else
Alert("El documento solicitado no existe, favor de revisar su búsqueda.", TipoMensaje.MsgAdvertencia)
End If
End If
ObjContabilidad.Dispose()
Select Case CveTipoPolizaImp
Case 1
TipoPolizaString = "I"
Exit Select
Case 2
TipoPolizaString = "E"
Exit Select
Case Else
TipoPolizaString = "D"
Exit Select
End Select
If UsuarioActual.Empresa.Funcionalidad(282).ToEntero = 1 Then
Dim Archivo As System.IO.FileInfo
Dim ImpresionPersonalizada As Integer = UsuarioActual.Empresa.Funcionalidad(282).ToEntero
Archivo = New System.IO.FileInfo(String.Format("{0}Formatos/PolizasResumen.rdlc", UsuarioActual.Empresa.Ruta))
Dim Logo As New System.IO.FileInfo(String.Format("{0}Logo.png", UsuarioActual.Empresa.Ruta))
Dim ObjConta As New ClsContabilidad
If ObjConta.GetPrePolizasDetalleResumen(CvePrePoliza, UsuarioActual.CveEmpresa, ImpresionPersonalizada) AndAlso ObjConta.DtResultados.Rows.Count > 0 Then
Dim dr As DataRow
DtDetalle = ObjConta.DtResultados '.FiltraParametros("Contabilizable = 1", "Orden")
dr = DtDetalle.Rows(0)
params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa))
params.Add(New ReportParameter("TipoPoliza", TipoPolImp))
params.Add(New ReportParameter("Finicio", dr("Fecha").ToString.ToDate().ToString("dd/MM/yyyy")))
params.Add(New ReportParameter("FFin", dr("Fecha").ToString.ToDate().ToString("dd/MM/yyyy")))
params.Add(New ReportParameter("Fecha", dr("Fecha").ToString.ToDate().ToString("dd/MM/yyyy")))
params.Add(New ReportParameter("Numero", FolioPoliza))
params.Add(New ReportParameter("Moneda", If(CveMonedaImp = 2, "Dolar", "Peso Mexicano")))
params.Add(New ReportParameter("CodigoPostal", ""))
params.Add(New ReportParameter("UsuarioRegistro", UsuarioActual.Usuario))
params.Add(New ReportParameter("ConceptoPoliza", ConceptoPolizaImp))
params.Add(New ReportParameter("Folio", FolioPoliza))
If Logo.Exists Then
params.Add(New ReportParameter("pImg", $"file://{Logo.FullName}"))
Else
params.Add(New ReportParameter("pImg", ""))
End If
If Archivo.Exists Then
rutaArchivo = Archivo.FullName
Else
rutaArchivo = $"{DirectorioEmpresas}Grales\Formatos\PolizasResumen.rdlc"
End If
End If
ObjConta.Dispose()
Else
Dim Archivo = New System.IO.FileInfo(String.Format("{0}Formatos/Polizas.rdlc", UsuarioActual.Empresa.Ruta))
params = New List(Of ReportParameter)
Dim ObjConta As New ClsContabilidad
'If ObjPoliza.GetPoliza(IdPoliza, -1, -1, -1, -1) AndAlso ObjPoliza.DtResultados.Rows.Count > 0 Then
If ObjConta.GetPrePolizasDetalle(CvePrePoliza, UsuarioActual.CveEmpresa) AndAlso ObjConta.DtResultados.Rows.Count > 0 Then
Dim dr As DataRow
DtDetalle = ObjConta.DtResultados.FiltraParametros("Contabilizable = 1", "Orden")
dr = DtDetalle.Rows(0)
Dim ruta As String = ""
params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa))
params.Add(New ReportParameter("TipoPoliza", dr("TipoPoliza").ToString))
params.Add(New ReportParameter("Finicio", dr("Fecha").ToString.ToDate.ToShortDateString))
params.Add(New ReportParameter("FFin", dr("Fecha").ToString.ToDate.ToShortDateString))
If UsuarioActual.CveEmpresa.Contiene(141) Then
params.Add(New ReportParameter("Fecha", dr("Fecha").ToString.ToDate.ToString("dd/MM/yyyy hh:mm:ss")))
Else
params.Add(New ReportParameter("Fecha", dr("Fecha").ToString.ToDate.ToShortDateString))
End If
FolioPoliza = dr("FolioPoliza").ToString
params.Add(New ReportParameter("Numero", dr("FolioPoliza").ToString))
params.Add(New ReportParameter("Moneda", If(CveMonedaImp = 2, "Dolar", "Peso Mexicano")))
params.Add(New ReportParameter("CodigoPostal", ""))
If UsuarioActual.CveEmpresa.Contiene(119, 141) Then
params.Add(New ReportParameter("UsuarioRegistro", GlobalDTUsuarios(dr("CveUsuario").ToString.ToEntero).FiltroPrimeroValor("Nombre")))
End If
If UsuarioActual.CveEmpresa.Contiene(140, 141) Then
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
End If
If Archivo.Exists Then
rutaArchivo = UsuarioActual.Empresa.Ruta & "Formatos/Polizas.rdlc"
Else
rutaArchivo = "Empresas/Grales/Formatos/Polizas.rdlc"
End If
End If
ObjConta.Dispose()
End If
ImprimirPDF(rutaArchivo, DtDetalle, params, $"P{TipoPolizaString}{FolioPoliza}", Formato:="PDF")
End Sub
#End Region
End Class

View File

@@ -3629,67 +3629,97 @@
<h4 class="modal-title" id="H2" runat="server">Cuenta Bancaria</h4>
</div>
<div class="modal-body">
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtNombreBanco" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="100" ValidationGroup="GrpAgregarBanco"></asp:TextBox>
<asp:RequiredFieldValidator ID="RFVNombreBanco" runat="server" ControlToValidate="TxtNombreBanco" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Banco''</b> es necesario, por favor ingréselo." ValidationGroup="GrpAgregarBanco"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCENombreBanco" runat="server" HighlightCssClass="vco" TargetControlID="RFVNombreBanco" Width="300px"></ajax:ValidatorCalloutExtender>
<label for="<%= TxtNombreBanco.ClientID.ToString()%>">Nombre del Banco:</label>
</div>
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtNumeroSucursal" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10" ValidationGroup="GrpAgregarBanco"></asp:TextBox>
<label for="<%= TxtNumeroSucursal.ClientID.ToString()%>">Numero de la Sucursal:</label>
</div>
<div class="row">
<div class="col-md-6">
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtNombreBanco" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="100" ValidationGroup="GrpAgregarBanco"></asp:TextBox>
<asp:RequiredFieldValidator ID="RFVNombreBanco" runat="server" ControlToValidate="TxtNombreBanco" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Banco''</b> es necesario, por favor ingréselo." ValidationGroup="GrpAgregarBanco"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCENombreBanco" runat="server" HighlightCssClass="vco" TargetControlID="RFVNombreBanco" Width="300px"></ajax:ValidatorCalloutExtender>
<label for="<%= TxtNombreBanco.ClientID.ToString()%>">Nombre del Banco:</label>
</div>
</div>
<div class="col-md-6">
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtNumeroSucursal" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10" ValidationGroup="GrpAgregarBanco"></asp:TextBox>
<label for="<%= TxtNumeroSucursal.ClientID.ToString()%>">Numero de la Sucursal:</label>
</div>
</div>
</div>
<div class="row">
<div class="col-md-6">
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtNumeroCuenta" runat="server" CssClass="form-control" CausesValidation="true" ValidationGroup="GrpAgregarBanco"></asp:TextBox>
<ajax:FilteredTextBoxExtender ID="SoloNumeros" runat="server" TargetControlID="TxtNumeroCuenta" FilterType="Numbers" />
<label for="<%= TxtNumeroCuenta.ClientID.ToString()%>">Numero de Cuenta:</label>
</div>
</div>
<div class="col-md-6">
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtCLABE" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="18" ValidationGroup="GrpAgregarBanco"></asp:TextBox>
<ajax:FilteredTextBoxExtender ID="SoloNumeros2" runat="server" TargetControlID="TxtCLABE" FilterType="Numbers" />
<label for="<%= TxtCLABE.ClientID.ToString()%>">CLABE:</label>
</div>
</div>
</div>
<div class="row">
<div class="col-md-6">
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtSWIFT" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="100" ValidationGroup="GrpAgregarBanco"></asp:TextBox>
<label for="<%= TxtSWIFT.ClientID.ToString()%>">SWIFT:</label>
</div>
</div>
<div class="col-md-6">
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtPlaza" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="100" ValidationGroup="GrpAgregarBanco"></asp:TextBox>
<label for="<%= TxtPlaza.ClientID.ToString()%>">Plaza:</label>
</div>
</div>
</div>
<div class="row">
<div class="col-md-6">
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtConvenioCIE" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="8" ValidationGroup="GrpAgregarBanco"></asp:TextBox>
<%--<ajax:FilteredTextBoxExtender ID="SoloNumeros3" runat="server" TargetControlID="TxtConvenioCIE" FilterType="Numbers" />--%>
<label for="<%= TxtConvenioCIE.ClientID.ToString()%>">CIE:</label>
</div>
</div>
<div class="col-md-6">
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtReferencia" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="20" ValidationGroup="GrpAgregarBanco"></asp:TextBox>
<ajax:FilteredTextBoxExtender ID="SoloNumeros3" runat="server" TargetControlID="TxtReferencia" FilterType="UppercaseLetters,LowercaseLetters,Numbers" />
<label for="<%= TxtReferencia.ClientID.ToString()%>">Referencia:</label>
</div>
</div>
</div>
<div class="row">
<div class="col-md-6">
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtConceptoCIE" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="30" ></asp:TextBox>
<ajax:FilteredTextBoxExtender ID="FilAlfanumerico" runat="server" TargetControlID="TxtConceptoCIE" FilterType="UppercaseLetters,LowercaseLetters,Numbers" />
<label for="<%= TxtReferencia.ClientID.ToString()%>">Concepto CIE:</label>
</div>
</div>
<div class="col-md-6">
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtRefCrediProveedor" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="5" ValidationGroup="GrpAgregarBanco"></asp:TextBox>
<label for="<%= TxtRefCrediProveedor.ClientID.ToString()%>">Credito Proveedor:</label>
</div>
</div>
</div> <div class="row">
<div class="col-md-6">
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtCorreoCuenta" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="100" ValidationGroup="GrpAgregarBanco"></asp:TextBox>
<label for="<%= TxtCorreoCuenta.ClientID.ToString()%>">Correo:</label>
</div>
</div>
<div class="col-md-6">
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtBBVAAlias" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="30" ValidationGroup="GrpAgregarBanco"></asp:TextBox>
<ajax:FilteredTextBoxExtender ID="Flter" runat="server" TargetControlID="TxtBBVAAlias" FilterType="UppercaseLetters,LowercaseLetters,Numbers" InvalidChars="-+.," />
<label for="<%= TxtCorreoCuenta.ClientID.ToString()%>">BBVA Alias:</label>
</div>
</div>
</div>
<div class="row">
<div class="col-md-6">
<div class="form-group form-md-line-input input-iconright">

View File

@@ -506,6 +506,7 @@ Partial Class Compras_Proveedores
CargaAnticipos(CveProveedorSucursal)
CargaBancos(CveProveedorSucursal)
CargaProveedorSucursales()
CargaCuentasBancarias()
CargaOC()
CargaDocs()
@@ -1729,7 +1730,7 @@ Partial Class Compras_Proveedores
''Agregar Cuentas Bancarias
If TempDTCuentasBancos.Rows.Count > 0 Then
For Each row As DataRow In TempDTCuentasBancos.Rows
If Not ObjCuentasDeposito.AddCuentasDepositos(row("BancoNombre").ToString, row("Plaza").ToString, row("Sucursal").ToString, row("Cuenta").ToString, row("CLABE").ToString, row("CIE").ToString, row("SWIFT").ToString, row("Referencia").ToString, row("RefCrediProveedor").ToString, UsuarioActual.CveUsuario, row("CveMoneda").ToString.ToEntero,
If Not ObjCuentasDeposito.AddCuentasDepositos(row("BancoNombre").ToString, row("Plaza").ToString, row("Sucursal").ToString, row("Cuenta").ToString, row("CLABE").ToString, row("CIE").ToString, row("SWIFT").ToString, row("Referencia").ToString, row("RefCrediProveedor").ToString, UsuarioActual.CveUsuario, row("CveMoneda").ToString.ToEntero, UsuarioActual.CveEmpresa,
CveProveedor:=NuevoCveProveedor, Correo:=row("Correo").ToString, BBVAAlias:=row("BBVAAlias").ToString,
EstatusPagoElectronico:=Boolean.Parse(row("EstatusPagoElectronico").ToString), EstatusPagoElectronicoGrupos:=Boolean.Parse(row("EstatusPagoElectronicoGrupos").ToString), CveSATBanco:=row("CveSATBanco").ToString.ToEntero) Then
ErrorBancos = True
@@ -3091,37 +3092,30 @@ Partial Class Compras_Proveedores
' CargaCuentasBancarias()
'End Sub
Private Sub CargaCuentasBancarias()
Dim ObjCuentasBancos As New ClsGenerales
ViewState("OrdenCuentasBancos") = ""
DTCuentasBancos = New DataTable
TempDTCuentasBancos = New DataTable
If ObjCuentasBancos.GetCuentasDepositos(CveProveedor) Then
DTCuentasBancos.Merge(ObjCuentasBancos.DtResultados)
Else
Alert("No se pudieron cargar las cuentas bancarias. Por favor intente nuevamente.", TipoMensaje.MsgAdvertencia)
If CveProveedor > 0 Then
Dim ObjCuentasBancos As New ClsGenerales
If ObjCuentasBancos.GetCuentasDepositos(CveProveedor, CveEmpresa:=UsuarioActual.CveEmpresa) Then
DTCuentasBancos.Merge(ObjCuentasBancos.DtResultados)
Else
Alert("No se pudieron cargar las cuentas bancarias. Por favor intente nuevamente.", TipoMensaje.MsgAdvertencia)
End If
ObjCuentasBancos.Dispose()
End If
If CveProveedor < 0 Then
'Alert("No hay proveedor", TipoMensaje.MsgInformacion)
TempDTCuentasBancos = DTCuentasBancos.Clone
'Esconde columna estatus
'THEstatus.Visible = False
'THEstatusTexto.Visible = False
'GvBancosCuentas.Columns(11).Visible = False 'Es la columna estatus CheckBox
'Mexicanada para acomadar las columnas'
'TDEstatusLayout.Visible = False
'TDEstatusTexto.Visible = False
End If
ObjCuentasBancos.Dispose()
CargaPSGridCuentasBancos(ViewState("OrdenCuentasBancos").ToString)
RecargaGlobalCuentasBancarias()
End Sub
Protected Sub LbAgregarCuentaBanco_Click(sender As Object, e As EventArgs)
@@ -3213,21 +3207,22 @@ Partial Class Compras_Proveedores
CveMoneda As Integer, Moneda As String, Estatus As Boolean, Correo As String, BBVAAlias As String, EstatusPagoElectronico As Boolean, EstatusPagoElectronicoGrupos As Boolean, CveSATBanco As Integer,
ConceptoCIE As String)
Dim ObjCuentasBancos As New ClsGenerales
If Modalidad = "A" Then
If CveProveedor > 0 Then
If ObjCuentasBancos.AddCuentasDepositos(NombreBanco, Plaza, NumeroSucursal, NumeroCuenta, CLABE, ConvenioCIE, SWIFT, Referencia, RefCrediProveedor, UsuarioActual.CveUsuario, CveMoneda, CveProveedor:=CveProveedor,
Dim ObjCuentasBancos As New ClsGenerales
If ObjCuentasBancos.AddCuentasDepositos(NombreBanco, Plaza, NumeroSucursal, NumeroCuenta, CLABE, ConvenioCIE, SWIFT, Referencia, RefCrediProveedor, UsuarioActual.CveUsuario, CveMoneda, UsuarioActual.CveEmpresa, CveProveedor:=CveProveedor,
Correo:=Correo, BBVAAlias:=BBVAAlias, EstatusPagoElectronico:=EstatusPagoElectronico, EstatusPagoElectronicoGrupos:=EstatusPagoElectronicoGrupos, CveSATBanco:=CveSATBanco, ConceptoCIE:=ConceptoCIE) Then
DTCuentasBancos.Clear()
DTCuentasBancos.Merge(ObjCuentasBancos.DtResultados.FiltraParametros(String.Format("CveProveedor = {0}", CveProveedor)))
Alert("Cuenta Bancaria agregada con éxito.", TipoMensaje.MsgInformacion)
RegistraScript(String.Format("$('#{0}').modal('hide');", "DivAddCuentasBancarias"))
CargaCuentasBancarias()
Else
Alert("Error al registrar la cuenta bancaria. Por favor intente nuevamente", TipoMensaje.MsgError)
End If
ObjCuentasBancos.Dispose()
Else
Dim Row As DataRow
Row = TempDTCuentasBancos.NewRow
@@ -3261,17 +3256,19 @@ Partial Class Compras_Proveedores
If CveProveedor > 0 Then
Dim ObjCuentasBancos As New ClsGenerales
If ObjCuentasBancos.UpdateCuentasDepositos(GvBancosCuentas.DataKeys(CveCuentaBancaria)("CveCuentaDeposito").ToString.ToEntero, NombreBanco, Plaza, NumeroSucursal, NumeroCuenta, CLABE, ConvenioCIE, SWIFT, Referencia, RefCrediProveedor,
False, Estatus, CveMoneda, Correo:=Correo, BBVAAlias:=BBVAAlias, EstatusPagoElectronico:=EstatusPagoElectronico, EstatusPagoElectronicoGrupos:=EstatusPagoElectronicoGrupos, CveSATBanco:=CveSATBanco,
False, Estatus, CveMoneda, UsuarioActual.CveEmpresa, Correo:=Correo, BBVAAlias:=BBVAAlias, EstatusPagoElectronico:=EstatusPagoElectronico, EstatusPagoElectronicoGrupos:=EstatusPagoElectronicoGrupos, CveSATBanco:=CveSATBanco,
ConceptoCIE:=ConceptoCIE) Then
DTCuentasBancos.Clear()
DTCuentasBancos.Merge(ObjCuentasBancos.DtResultados.FiltraParametros(String.Format("CveProveedor = {0}", CveProveedor)))
Alert("Cuenta actualizada con éxito.", TipoMensaje.MsgInformacion)
RegistraScript(String.Format("$('#{0}').modal('hide');", "DivAddCuentasBancarias"))
CargaCuentasBancarias()
Else
Alert("Error al actualizar la cuenta bancaria. Por favor intente nuevamente.", TipoMensaje.MsgError)
End If
ObjCuentasBancos.Dispose()
Else
@@ -3301,7 +3298,7 @@ Partial Class Compras_Proveedores
End If
End If
ObjCuentasBancos.Dispose()
LimpiaCuentasBancarias()
CargaPSGridCuentasBancos(ViewState("OrdenCuentasBancos").ToString)
RecargaGlobalCuentasBancarias()
@@ -3387,166 +3384,12 @@ Partial Class Compras_Proveedores
End If
End Sub
''Protected Sub GvBancosCuentas_RowEditing(sender As Object, e As System.Web.UI.WebControls.GridViewEditEventArgs) Handles GvBancosCuentas.RowEditing
'' Dim id As Integer = e.NewEditIndex
'' GvBancosCuentas.EditIndex = id
'' CargaPSGridCuentasBancos(ViewState("OrdenCuentasBancos").ToString)
'' 'Dim x As String = GvBancosCuentas.SelectedRowStyle("EstatusPagoElectronico")
'' 'If CBool(e.Row.DBCampo("EstatusPagoElectronico")) AndAlso e.Row.DBCampo("Referencia").ToString <> "" Then
'' 'End If
''End Sub
'Protected Sub GvBancosCuentas_RowCancelingEdit(sender As Object, e As System.Web.UI.WebControls.GridViewCancelEditEventArgs) Handles GvBancosCuentas.RowCancelingEdit
' GvBancosCuentas.EditIndex = -1
' CargaPSGridCuentasBancos(ViewState("OrdenCuentasBancos").ToString)
'End Sub
'Protected Sub GvBancosCuentas_RowUpdating(sender As Object, e As System.Web.UI.WebControls.GridViewUpdateEventArgs) Handles GvBancosCuentas.RowUpdating
' Dim NombreBanco = GvBancosCuentas.Rows(e.RowIndex).FCTextBox("TxtNombreBanco").Text.Trim
' Dim NumeroSucursal = GvBancosCuentas.Rows(e.RowIndex).FCTextBox("TxtNumeroSucursal").Text.Trim
' Dim CLABE = GvBancosCuentas.Rows(e.RowIndex).FCTextBox("TxtCLABE").Text.Trim
' Dim SWIFT = GvBancosCuentas.Rows(e.RowIndex).FCTextBox("TxtSWIFT").Text.Trim
' Dim Plaza = GvBancosCuentas.Rows(e.RowIndex).FCTextBox("TxtPlaza").Text.Trim
' Dim NumeroCuenta = GvBancosCuentas.Rows(e.RowIndex).FCTextBox("TxtNumeroCuenta").Text.Trim
' Dim ConvenioCIE = GvBancosCuentas.Rows(e.RowIndex).FCTextBox("TxtConvenioCIE").Text.Trim
' Dim Referencia = GvBancosCuentas.Rows(e.RowIndex).FCTextBox("TxtReferencia").Text.Trim
' Dim RefCrediProveedor = GvBancosCuentas.Rows(e.RowIndex).FCTextBox("TxtRefCrediProveedor").Text.Trim
' Dim CveMoneda = GvBancosCuentas.Rows(e.RowIndex).FCDropDownList("DdlMoneda").SelectedValue.ToString.ToEntero
' Dim Moneda = GvBancosCuentas.Rows(e.RowIndex).FCDropDownList("DdlMoneda").SelectedItem.Text
' Dim Estatus = GvBancosCuentas.Rows(e.RowIndex).FCCheckBox("ChkEstatus").Checked
' Dim EsBancomer = False
' If NombreBanco.ToUpper.Contains("BBVA") Or NombreBanco.ToUpper.Contains("BANCOMER") Or (CLABE.Length = 18 AndAlso CLABE.Substring(0, 3) = "012") Then
' EsBancomer = True
' End If
' ''COMENTADO PARA PERMITIR ENTRADA DE UNA CUENTA A PROVEEDOR, 22 DE SEPTIEMBRE, ISRAEL PIÑA
' 'If EsBancomer AndAlso (CLABE.Length <> 18 AndAlso Not CLABE.Substring(0, 3) = "012") Then
' ' Alert("La CLABE ingresada no pertenece a BANCOMER.", TipoMensaje.MsgAdvertencia)
' ' Exit Sub
' 'End If
' ''CLABE SIEMPRE OBLIGATORIA CUANDO NO ES BANCOMER CON CIE
' 'If (CLABE.Trim.Length <> 18 And Not EsBancomer) Or (EsBancomer And ConvenioCIE.Trim.Length <> 6 And CLABE.Trim.Length <> 18) Then
' ' Alert("La CLABE es obligatoria y debe tener una longitud de 18 dígitos. Por favor rectifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia)
' ' Exit Sub
' 'End If
' 'QUE TENGA ALGUN DATO DE TIPO DE CUENTA
' If NumeroCuenta.Length = 0 AndAlso CLABE.Length = 0 AndAlso SWIFT.Length = 0 AndAlso ConvenioCIE.Length = 0 Then
' Alert("Debe especificar al menos un numero de cuenta.", TipoMensaje.MsgAdvertencia)
' Exit Sub
' End If
' 'SI CLABE TIENE ALGO DEBE TENER UNA LOGITUD EXACTA DE 18
' If CLABE.Trim.Length <> 0 AndAlso CLABE.Trim.Length <> 18 Then
' Alert("La CLABE debe tener una longitud de 18 dígitos. Por favor rectifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia)
' Exit Sub
' End If
' If UsuarioActual.CveEmpresa = 66 Then
' 'CLABE SIEMPRE OBLIGATORIA SI NO ES BANCOMER
' If CLABE.Trim.Length <> 18 And CLABE.Trim.Length = 0 And Not EsBancomer And SWIFT.Length = 0 Then
' Alert("La CLABE es obligatoria y debe tener una longitud de 18 dígitos. Por favor rectifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia)
' Exit Sub
' End If
' 'SI CUENTA TIENE ALGO Y BANCO BANCOMER DEBE TENER UNA LOGITUD EXACTA DE 10
' If NumeroCuenta.Trim.Length <> 0 AndAlso NumeroCuenta.Trim.Length <> 10 AndAlso EsBancomer Then
' Alert("El número de cuenta debe tener una longitud de 10 dígitos. Por favor rectifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia)
' Exit Sub
' End If
' 'SI CIE TIENE ALGO REFERENCIA OBLIGATORIA
' If ConvenioCIE.Trim.Length <> 0 And Referencia.Trim.Length < 3 Then
' Alert("Cuando se ingresa Convenio CIE se debe especificar una referencia. Por favor rectifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia)
' Exit Sub
' End If
' 'CUANDO SEA "BBVA" O "BANCOMER" DEBE TENER "CIE" O "CUENTA"
' If EsBancomer AndAlso Not (NumeroCuenta.Trim.Length = 10 Or ConvenioCIE.Trim.Length <> 0) Then
' Alert("Para cuentas BBVA BANCOMER es obligatorio el Número de Cuenta o CIE.", TipoMensaje.MsgAdvertencia)
' Exit Sub
' End If
' Else
' 'SI CIE TIENE ALGO DEBE TENER UNA LOGITUD MINIMA DE 5
' If ConvenioCIE.Trim.Length <> 0 And ConvenioCIE.Trim.Length < 5 Then
' Alert("El Convenio CIE debe tener una longitud de al menos 5 dígitos. Por favor rectifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia)
' Exit Sub
' End If
' End If
' Dim ObjCuentasBancos As New ClsGenerales
' If CveProveedor > 0 Then
' If ObjCuentasBancos.UpdateCuentasDepositos(GvBancosCuentas.DataKeys(e.RowIndex)("CveCuentaDeposito").ToString.ToEntero, NombreBanco, Plaza, NumeroSucursal, NumeroCuenta, CLABE, ConvenioCIE, SWIFT, Referencia, RefCrediProveedor, False, Estatus, CveMoneda) Then
' DTCuentasBancos.Clear()
' DTCuentasBancos.Merge(ObjCuentasBancos.DtResultados.FiltraParametros(String.Format("CveProveedor = {0}", CveProveedor)))
' Alert("Cuenta actualizada con éxito.", TipoMensaje.MsgInformacion)
' Else
' Alert("Error al actualizar la cuenta bancaria. Por favor intente nuevamente.", TipoMensaje.MsgError)
' End If
' Else
' Dim index = GvBancosCuentas.Rows(e.RowIndex).DataKey("CveCuentaDeposito").ToString.ToEntero - 1
' Dim Row As DataRow = TempDTCuentasBancos.Rows(index)
' Row("BancoNombre") = NombreBanco
' Row("Sucursal") = NumeroSucursal
' Row("CLABE") = CLABE
' Row("SWIFT") = SWIFT
' Row("Plaza") = Plaza
' Row("Cuenta") = NumeroCuenta
' Row("CIE") = ConvenioCIE
' Row("Referencia") = Referencia
' Row("RefCrediProveedor") = RefCrediProveedor
' Row("CveMoneda") = CveMoneda
' Row("Moneda") = Moneda
' Row("Estatus") = Estatus
' TempDTCuentasBancos.AcceptChanges()
' End If
' ObjCuentasBancos.Dispose()
' GvBancosCuentas.EditIndex = -1
' CargaPSGridCuentasBancos(ViewState("OrdenCuentasBancos").ToString)
' RecargaGlobalCuentasBancarias()
'End Sub
'Protected Sub GvBancosCuentas_RowDeleting(sender As Object, e As System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles GvBancosCuentas.RowDeleting
' Dim ObjCuentasBancos As New ClsGenerales
' If CveProveedor > 0 Then
' If ObjCuentasBancos.RemoveCuentasDepositos(GvBancosCuentas.DataKeys(e.RowIndex)("CveCuentaDeposito").ToString.ToEntero) Then
' DTCuentasBancos.Clear()
' DTCuentasBancos.Merge(ObjCuentasBancos.DtResultados.FiltraParametros(String.Format("CveProveedor = {0}", CveProveedor)))
' Alert("Cuenta Bancaria borrada con éxito.", TipoMensaje.MsgInformacion)
' Else
' Alert("No se pudo borrar la Cuenta Bancaria. Por favor intente nuevamente.", TipoMensaje.MsgError)
' End If
' Else
' Dim index = GvBancosCuentas.Rows(e.RowIndex).DataKey("CveCuentaDeposito").ToString.ToEntero - 1
' TempDTCuentasBancos.Rows.RemoveAt(index)
' End If
' If ObjCuentasBancos.GetCuentasDepositos Then
' GlobalDTProveedoresCuentas(CveProveedor, True) = ObjCuentasBancos.DtResultados
' End If
' CargaPSGridCuentasBancos(ViewState("OrdenCuentasBancos").ToString)
' ObjCuentasBancos.Dispose()
' RecargaGlobalCuentasBancarias()
'End Sub
Public Sub Delete_Click(sender As Object, e As EventArgs)
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
Dim ObjCuentasBancos As New ClsGenerales
If CveProveedor > 0 Then
If ObjCuentasBancos.RemoveCuentasDepositos(GvRow.DataKey("CveCuentaDeposito").ToEntero) Then
If ObjCuentasBancos.RemoveCuentasDepositos(GvRow.DataKey("CveCuentaDeposito").ToEntero, UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario) Then
DTCuentasBancos.Clear()
DTCuentasBancos.Merge(ObjCuentasBancos.DtResultados.FiltraParametros(String.Format("CveProveedor = {0}", CveProveedor)))
@@ -3567,12 +3410,7 @@ Partial Class Compras_Proveedores
Private Sub RecargaGlobalCuentasBancarias(Optional ByVal CveCuenta As Integer = -1)
If CveProveedor > 0 Then
GlobalDTProveedoresCuentas(UsuarioActual.CveEmpresa, -1) = Nothing
'Dim ObjCuentasBancos As New ClsGenerales
'If ObjCuentasBancos.GetCuentasDepositos() Then
' GlobalDTProveedoresCuentas(UsuarioActual.CveEmpresa, -1, True) = ObjCuentasBancos.DtResultados
'End If
'ObjCuentasBancos.Dispose()
End If
End Sub
@@ -6277,7 +6115,7 @@ Partial Class Compras_Proveedores
Protected Sub ChkPagoElectronico_CheckedChanged(sender As Object, e As EventArgs)
If ChkPagoElectronico.Checked Then
Alert("Se está activando manualmente el pago por Layout BBVA. Recuerde que la alta se realiza directo en la platoforma", TipoMensaje.MsgAdvertencia)
Alert("Se está activando manualmente el pago por Layout BBVA. Recuerde que la alta se realiza directo en la plataforma", TipoMensaje.MsgAdvertencia)
End If
End Sub

View File

@@ -1,6 +1,7 @@

Imports System.Data
Imports System.Net.NetworkInformation
Imports ADSNetLibrary.SIGAPI.Models.OC.Response
'Imports DocumentFormat.OpenXml
Imports Extensiones
Imports GemBox.Spreadsheet
@@ -309,6 +310,7 @@ Partial Class ContabilidadC_RegPrePolizaS
End If
ImprimeImPrimePrePolizaS(CvePrePoliza)
Exit Sub
@@ -2734,8 +2736,8 @@ Partial Class ContabilidadC_RegPrePolizaS
End If
End Sub
Private Sub ImprimirPolizaPDF(IdPoliza As Integer)
'Dim ObjPoliza As New ClsContPAQi(UsuarioActual.Empresa)
@@ -2787,12 +2789,6 @@ Partial Class ContabilidadC_RegPrePolizaS
End If
'Return String.Format("{0}\{1}\{2}.pdf", AppDomain.CurrentDomain.BaseDirectory, Tick, IdPoliza.ToString)
ObjConta.Dispose()
@@ -3246,8 +3242,6 @@ Partial Class ContabilidadC_RegPrePolizaS
Dim Logo As New System.IO.FileInfo(String.Format("{0}Logo.png", UsuarioActual.Empresa.Ruta))
Dim ObjConta As New ClsContabilidad
'If ObjPoliza.GetPoliza(IdPoliza, -1, -1, -1, -1) AndAlso ObjPoliza.DtResultados.Rows.Count > 0 Then
If ObjConta.GetPrePolizasDetalleResumen(CvePrePoliza, UsuarioActual.CveEmpresa, ImpresionPersonalizada) AndAlso ObjConta.DtResultados.Rows.Count > 0 Then
@@ -3327,5 +3321,172 @@ Partial Class ContabilidadC_RegPrePolizaS
'End Sub
Public Sub ImprimeImPrimePrePolizaS(CvePrePoliza As Integer)
If Not CvePrePoliza > 0 Then
Exit Sub
End If
'ObjContabilidad.Dispose()
Dim rutaArchivo As String = ""
Dim params As New List(Of ReportParameter)
Dim Bytes As Byte() = Nothing
Dim DtDetalle As New DataTable
Dim CveTipoPolizaImp As Integer = 0
Dim FolioPoliza As String = ""
Dim ConceptoPolizaImp As String = ""
Dim CveMonedaImp As Integer = 0
Dim TipoPolizaString = ""
Dim ObjContabilidad As New ClsContabilidad
Dim TipoPolImp As String = ""
If ObjContabilidad.GetPrePoliza(CvePrePoliza, UsuarioActual.CveEmpresa) Then
Dim dr As DataRow = ObjContabilidad.DtResultados.FiltroPrimero("")
If dr IsNot Nothing Then
TipoPolImp = If(dr("CveTipoPoliza").ToString.ToEntero = 1, "Ingreso", If(dr("CveTipoPoliza").ToString.ToEntero = 2, "Egreso", "Diario"))
CveTipoPolizaImp = dr("CveTipoPoliza").ToString.ToEntero
ConceptoPolizaImp = dr("Concepto")
FolioPoliza = dr("FolioPoliza").ToString
CveMonedaImp = dr("CveMoneda").ToString.ToEntero
Else
Alert("El documento solicitado no existe, favor de revisar su búsqueda.", TipoMensaje.MsgAdvertencia)
End If
End If
ObjContabilidad.Dispose()
Select Case CveTipoPolizaImp
Case 1
TipoPolizaString = "I"
Exit Select
Case 2
TipoPolizaString = "E"
Exit Select
Case Else
TipoPolizaString = "D"
Exit Select
End Select
If UsuarioActual.Empresa.Funcionalidad(282).ToEntero = 1 Then
Dim Archivo As System.IO.FileInfo
Dim ImpresionPersonalizada As Integer = UsuarioActual.Empresa.Funcionalidad(282).ToEntero
Archivo = New System.IO.FileInfo(String.Format("{0}Formatos/PolizasResumen.rdlc", UsuarioActual.Empresa.Ruta))
Dim Logo As New System.IO.FileInfo(String.Format("{0}Logo.png", UsuarioActual.Empresa.Ruta))
Dim ObjConta As New ClsContabilidad
If ObjConta.GetPrePolizasDetalleResumen(CvePrePoliza, UsuarioActual.CveEmpresa, ImpresionPersonalizada) AndAlso ObjConta.DtResultados.Rows.Count > 0 Then
Dim dr As DataRow
DtDetalle = ObjConta.DtResultados '.FiltraParametros("Contabilizable = 1", "Orden")
dr = DtDetalle.Rows(0)
params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa))
params.Add(New ReportParameter("TipoPoliza", TipoPolImp))
params.Add(New ReportParameter("Finicio", dr("Fecha").ToString.ToDate().ToString("dd/MM/yyyy")))
params.Add(New ReportParameter("FFin", dr("Fecha").ToString.ToDate().ToString("dd/MM/yyyy")))
params.Add(New ReportParameter("Fecha", dr("Fecha").ToString.ToDate().ToString("dd/MM/yyyy")))
params.Add(New ReportParameter("Numero", FolioPoliza))
params.Add(New ReportParameter("Moneda", If(CveMonedaImp = 2, "Dolar", "Peso Mexicano")))
params.Add(New ReportParameter("CodigoPostal", ""))
params.Add(New ReportParameter("UsuarioRegistro", UsuarioActual.Usuario))
params.Add(New ReportParameter("ConceptoPoliza", ConceptoPolizaImp))
params.Add(New ReportParameter("Folio", FolioPoliza))
If Logo.Exists Then
params.Add(New ReportParameter("pImg", $"file://{Logo.FullName}"))
Else
params.Add(New ReportParameter("pImg", ""))
End If
If Archivo.Exists Then
rutaArchivo = Archivo.FullName
Else
rutaArchivo = $"{DirectorioEmpresas}Grales\Formatos\PolizasResumen.rdlc"
End If
End If
ObjConta.Dispose()
Else
Dim Archivo = New System.IO.FileInfo(String.Format("{0}Formatos/Polizas.rdlc", UsuarioActual.Empresa.Ruta))
params = New List(Of ReportParameter)
Dim ObjConta As New ClsContabilidad
'If ObjPoliza.GetPoliza(IdPoliza, -1, -1, -1, -1) AndAlso ObjPoliza.DtResultados.Rows.Count > 0 Then
If ObjConta.GetPrePolizasDetalle(CvePrePoliza, UsuarioActual.CveEmpresa) AndAlso ObjConta.DtResultados.Rows.Count > 0 Then
Dim dr As DataRow
DtDetalle = ObjConta.DtResultados.FiltraParametros("Contabilizable = 1", "Orden")
dr = DtDetalle.Rows(0)
Dim ruta As String = ""
params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa))
params.Add(New ReportParameter("TipoPoliza", dr("TipoPoliza").ToString))
params.Add(New ReportParameter("Finicio", dr("Fecha").ToString.ToDate.ToShortDateString))
params.Add(New ReportParameter("FFin", dr("Fecha").ToString.ToDate.ToShortDateString))
If UsuarioActual.CveEmpresa.Contiene(141) Then
params.Add(New ReportParameter("Fecha", dr("Fecha").ToString.ToDate.ToString("dd/MM/yyyy hh:mm:ss")))
Else
params.Add(New ReportParameter("Fecha", dr("Fecha").ToString.ToDate.ToShortDateString))
End If
FolioPoliza = dr("FolioPoliza").ToString
params.Add(New ReportParameter("Numero", dr("FolioPoliza").ToString))
params.Add(New ReportParameter("Moneda", If(CveMonedaImp = 2, "Dolar", "Peso Mexicano")))
params.Add(New ReportParameter("CodigoPostal", ""))
If UsuarioActual.CveEmpresa.Contiene(119, 141) Then
params.Add(New ReportParameter("UsuarioRegistro", GlobalDTUsuarios(dr("CveUsuario").ToString.ToEntero).FiltroPrimeroValor("Nombre")))
End If
If UsuarioActual.CveEmpresa.Contiene(140, 141) Then
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
End If
If Archivo.Exists Then
rutaArchivo = UsuarioActual.Empresa.Ruta & "Formatos/Polizas.rdlc"
Else
rutaArchivo = "Empresas/Grales/Formatos/Polizas.rdlc"
End If
End If
ObjConta.Dispose()
End If
ImprimirPDF(rutaArchivo, DtDetalle, params, $"P{TipoPolizaString}{FolioPoliza}", Formato:="PDF")
End Sub
End Class

View File

@@ -201,17 +201,17 @@ public partial class Contabilidad_RepIVA : ClsPaginas
if (GvT.Rows.Count > 0 || GvA.Rows.Count > 0)
{
System.IO.FileInfo Imagen;
String logouri = "";
// String logouri = "";
if (UsuarioActual.CveEmpresa.Contiene(119))
{
Imagen = new System.IO.FileInfo(String.Format("{0}/Logo.jpg", UsuarioActual.Empresa.Ruta));
logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.jpg", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa);
//logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.jpg", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa);
}
else
{
Imagen = new System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png");
logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa);
//logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa);
}
List<CrystalParametro> para = new List<CrystalParametro>();
@@ -220,7 +220,7 @@ public partial class Contabilidad_RepIVA : ClsPaginas
para.Add(new CrystalParametro("Filtros", $"<b>Filtros:</b> {FechaI}{FechaF}{TipoMov}"));
if (Imagen.Exists)
{
para.Add(new CrystalParametro("LogoPath", logouri));
para.Add(new CrystalParametro("LogoPath", Imagen.FullName));
}
else
{

View File

@@ -159,7 +159,10 @@
</ContentTemplate>
</asp:UpdatePanel>
<ajax:TabContainer ID="Tab" runat="server" ActiveTabIndex="0" Width="100%" OnActiveTabChanged="Tab_ActiveTabChanged" AutoPostBack="true">
<asp:UpdatePanel runat="server" ID="UpGeneral" UpdateMode="Always">
<ContentTemplate>
<ajax:TabContainer ID="Tab" runat="server" ActiveTabIndex="0" Width="100%" OnActiveTabChanged="Tab_ActiveTabChanged" AutoPostBack="true">
<ajax:TabPanel ID="TabMes" runat="server" HeaderText="Mensual">
<ContentTemplate>
@@ -1413,6 +1416,11 @@
</ContentTemplate>
</ajax:TabPanel>
</ajax:TabContainer>
</ContentTemplate>
</asp:UpdatePanel>

View File

@@ -458,8 +458,8 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal
LblTri.Visible = False
DVTri.Visible = False
LiPeriodoDdl.Visible = False
LiPeriodoLbl.Visible = False
LiPeriodoDdl.Visible = True
LiPeriodoLbl.Visible = True
DdlPeriodo.SelectedValueExist(12)
End If
@@ -1655,7 +1655,12 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal
IndexData = 13
For IndexData = 13 To IndexMax
Row.Item(IndexData) = DtIngresosAnualH.SUM($"[{DtIngresosAnualH.Columns(IndexData).ColumnName}]", "NOT CtaMayor in (3,4)")
Row.Item($"Porcentaje{DtIngresosAnualH.Columns(IndexData).ColumnName}") = DtIngresosAnualH.SUM($"[{DtIngresosAnualH.Columns(IndexData).ColumnName}]", "NOT CtaMayor in (3,4)") * 100 / DtIngresosAnualH.SUM("ImporteAcumulado", "NOT CtaMayor in (3,4)")
If DtIngresosAnualH.SUM($"[{DtIngresosAnualH.Columns(IndexData).ColumnName}]", "NOT CtaMayor in (3,4)") > 0 Then
Row.Item($"Porcentaje{DtIngresosAnualH.Columns(IndexData).ColumnName}") = DtIngresosAnualH.SUM($"[{DtIngresosAnualH.Columns(IndexData).ColumnName}]", "NOT CtaMayor in (3,4)") * 100 / DtIngresosAnualH.SUM("ImporteAcumulado", "NOT CtaMayor in (3,4)")
Else
Row.Item($"Porcentaje{DtIngresosAnualH.Columns(IndexData).ColumnName}") = "0"
End If
Next
@@ -1730,7 +1735,16 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal
IndexData = 13
For IndexData = 13 To IndexMax
Row.Item(IndexData) = DtGastosAnualH.SUM($"[{DtGastosAnualH.Columns(IndexData).ColumnName}]", "Not CtaMayor In (3,4)")
Row.Item($"Porcentaje{DtGastosAnualH.Columns(IndexData).ColumnName}") = DtGastosAnualH.SUM($"[{DtGastosAnualH.Columns(IndexData).ColumnName}]", "NOT CtaMayor in (3,4)") * 100 / DtGastosAnualH.SUM("ImporteAcumulado", "NOT CtaMayor in (3,4)")
If DtGastosAnualH.SUM($"[{DtGastosAnualH.Columns(IndexData).ColumnName}]", "NOT CtaMayor in (3,4)") > 0 Then
Row.Item($"Porcentaje{DtGastosAnualH.Columns(IndexData).ColumnName}") = DtGastosAnualH.SUM($"[{DtGastosAnualH.Columns(IndexData).ColumnName}]", "NOT CtaMayor in (3,4)") * 100 / DtGastosAnualH.SUM("ImporteAcumulado", "NOT CtaMayor in (3,4)")
Else
Row.Item($"Porcentaje{DtGastosAnualH.Columns(IndexData).ColumnName}") = "0"
End If
Next
Row.Item("Nombre") = "TOTAL GASTOS"
@@ -1757,7 +1771,16 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal
IndexData = 13
For IndexData = 13 To IndexMax
Row.Item(IndexData) = DtIngresosAnualH.SUM($"[{DtIngresosAnualH.Columns(IndexData).ColumnName}]", "Not CtaMayor In (-1,3,4)") - DtGastosAnualH.SUM($"[{DtGastosAnualH.Columns(IndexData).ColumnName}]", "Not CtaMayor In (-1,3,4)")
Row.Item($"Porcentaje{DtIngresosAnualH.Columns(IndexData).ColumnName}") = DtIngresosAnualH.SUM($"[{DtIngresosAnualH.Columns(IndexData).ColumnName}]", "NOT CtaMayor in (-1,3,4)") * 100 / DtIngresosAnualH.SUM("ImporteAcumulado", "NOT CtaMayor in (-1,3,4)")
If DtIngresosAnualH.SUM($"[{DtIngresosAnualH.Columns(IndexData).ColumnName}]", "NOT CtaMayor in (-1,3,4)") > 0 Then
Row.Item($"Porcentaje{DtIngresosAnualH.Columns(IndexData).ColumnName}") = DtIngresosAnualH.SUM($"[{DtIngresosAnualH.Columns(IndexData).ColumnName}]", "NOT CtaMayor in (-1,3,4)") * 100 / DtIngresosAnualH.SUM("ImporteAcumulado", "NOT CtaMayor in (-1,3,4)")
Else
Row.Item($"Porcentaje{DtIngresosAnualH.Columns(IndexData).ColumnName}") = "0"
End If
Next
Row.Item("Nombre") = "Resultados del Ejercicio"
@@ -2131,11 +2154,6 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal
Row.Item("CtaMayor") = -1
DtIngresosSubProyectoH.Rows.Add(Row)
Row.Item("Nombre") = "TOTAL INGRESOS "
Row.Item("ImporteActual") = "0.00"
Row.Item("ImporteAcumulado") = "0.00"
Row.Item("CtaMayor") = -1
DtIngresosSubProyectoH.Rows.Add(Row)
End If
Dim T1 = TotalActual, T2 = TotalAnterior

View File

@@ -112,7 +112,7 @@ Partial Class General_ColectivasDetalle
If TempDTCuentasBancos.Rows.Count > 0 Then
For Each row As DataRow In TempDTCuentasBancos.Rows
If Not ObjCuentasDeposito.AddCuentasDepositos(row("BancoNombre").ToString, row("Plaza").ToString, row("Sucursal").ToString, row("Cuenta").ToString, row("CLABE").ToString, row("CIE").ToString, row("SWIFT").ToString, row("Referencia").ToString, "", UsuarioActual.CveUsuario, 1, CveColectiva:=NuevoCveColectiva) Then
If Not ObjCuentasDeposito.AddCuentasDepositos(row("BancoNombre").ToString, row("Plaza").ToString, row("Sucursal").ToString, row("Cuenta").ToString, row("CLABE").ToString, row("CIE").ToString, row("SWIFT").ToString, row("Referencia").ToString, "", UsuarioActual.CveUsuario, 1, UsuarioActual.CveEmpresa, CveColectiva:=NuevoCveColectiva) Then
ErrorBancos = True
End If
Next
@@ -205,7 +205,7 @@ Partial Class General_ColectivasDetalle
Dim Row As DataRow
If CveColectiva > 0 Then
If ObjCuentasBancos.AddCuentasDepositos(NombreBanco, Plaza, NumeroSucursal, NumeroCuenta, CLABE, ConvenioCIE, SWIFT, Referencia, "", UsuarioActual.CveUsuario, 1, CveColectiva:=CveColectiva) Then
If ObjCuentasBancos.AddCuentasDepositos(NombreBanco, Plaza, NumeroSucursal, NumeroCuenta, CLABE, ConvenioCIE, SWIFT, Referencia, "", UsuarioActual.CveUsuario, 1, UsuarioActual.CveEmpresa, CveColectiva:=CveColectiva) Then
DTCuentasBancos.Clear()
DTCuentasBancos.Merge(ObjCuentasBancos.DtResultados.FiltraParametros(String.Format("CveColectiva = {0}", CveColectiva)))
@@ -294,7 +294,7 @@ Partial Class General_ColectivasDetalle
Dim ObjCuentasBancos As New ClsGenerales
If CveColectiva > 0 Then
If ObjCuentasBancos.UpdateCuentasDepositos(GvBancosCuentas.DataKeys(e.RowIndex)("CveCuentaDeposito").ToString.ToEntero, NombreBanco, Plaza, NumeroSucursal, NumeroCuenta, CLABE, ConvenioCIE, SWIFT, Referencia, "", False, True, 1) Then
If ObjCuentasBancos.UpdateCuentasDepositos(GvBancosCuentas.DataKeys(e.RowIndex)("CveCuentaDeposito").ToString.ToEntero, NombreBanco, Plaza, NumeroSucursal, NumeroCuenta, CLABE, ConvenioCIE, SWIFT, Referencia, "", False, True, 1, UsuarioActual.CveEmpresa) Then
DTCuentasBancos.Clear()
DTCuentasBancos.Merge(ObjCuentasBancos.DtResultados.FiltraParametros(String.Format("CveColectiva = {0}", CveColectiva)))
Alert("Cuenta actualizada con éxito.", TipoMensaje.MsgInformacion)
@@ -322,7 +322,7 @@ Partial Class General_ColectivasDetalle
Dim ObjCuentasBancos As New ClsGenerales
If CveColectiva > 0 Then
If ObjCuentasBancos.RemoveCuentasDepositos(GvBancosCuentas.DataKeys(e.RowIndex)("CveCuentaDeposito").ToString.ToEntero) Then
If ObjCuentasBancos.RemoveCuentasDepositos(GvBancosCuentas.DataKeys(e.RowIndex)("CveCuentaDeposito").ToString.ToEntero, UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario) Then
DTCuentasBancos.Clear()
DTCuentasBancos.Merge(ObjCuentasBancos.DtResultados.FiltraParametros(String.Format("CveColectiva = {0}", CveColectiva)))
Alert("Cuenta Bancaria borrada con éxito.", TipoMensaje.MsgInformacion)

View File

@@ -1170,7 +1170,7 @@ Partial Class General_SaldosIniciales
If Not ErrorCuentaDeposito Then
Dim ObjGrales As New ClsGenerales(ObjProv.IniciaTransacSQL)
If Not ObjGrales.AddCuentasDepositos(Banco, "-1", "-1", NumeroCuenta, ClabeInter, "-1", "-1", "-1", "-1", UsuarioActual.CveUsuario, 1, CveProveedor:=ObjProv.CveProveedor) Then
If Not ObjGrales.AddCuentasDepositos(Banco, "-1", "-1", NumeroCuenta, ClabeInter, "-1", "-1", "-1", "-1", UsuarioActual.CveUsuario, 1, UsuarioActual.CveEmpresa, CveProveedor:=ObjProv.CveProveedor) Then
'ErrorProv = True
End If
End If
@@ -1811,6 +1811,9 @@ Partial Class General_SaldosIniciales
If Not dt.Columns.Contains("CveCuentaContable") Then
dt.Columns.Add("CveCuentaContable", GetType(Integer))
End If
If Not dt.Columns.Contains("CveCuentaContableDepreciacion") Then
dt.Columns.Add("CveCuentaContableDepreciacion", GetType(Integer))
End If
Dim sbErrores As New StringBuilder
For Each Row As DataRow In dt.Rows
@@ -1830,6 +1833,18 @@ Partial Class General_SaldosIniciales
ErrorAF = True
End If
End If
CuentaContable = Row("Cuenta Depreciación").ToString().Trim.Replace("-", "").Replace(" ", "")
If CuentaContable.Length > 0 Then
Dim CveCuentaContable As Integer = DTCuentasContables.FiltroPrimeroValor("CveCuenta", $"Codigo ='{CuentaContable}'").ToEntero()
If CveCuentaContable > 0 Then
Row("CveCuentaContableDepreciacion") = CveCuentaContable
Else
sbErrores.AppendLine($"Activo Fijo {Codigo} {Descripcion} cuenta {CuentaContable} no encontrada.<br>")
ErrorAF = True
End If
End If
Next
If Not ErrorAF Then
@@ -1840,9 +1855,11 @@ Partial Class General_SaldosIniciales
End If
Dim ObjAF As New ClsAF
ObjAF.IniciaTransacSQL()
Dim ObjConta As New ClsContabilidad(ObjAF.IniciaTransacSQL)
Try
ObjAF.IniciaTransacSQL()
Dim Contador As Integer = 0
Dim NumRow As Integer = 0
@@ -1872,7 +1889,7 @@ Partial Class General_SaldosIniciales
Dim CveEstadoActivoFijo As Integer = GlobalDTEstadoActivoFijo().FiltroPrimeroValor("CveEstadoActivoFijo", $"EstadoActivoFijo = '{Estado}'").ToString().ToEntero()
Dim CveCliente As Integer = GlobalDTCliente(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveCliente", $"Nombre = '{Cliente}'").ToString().ToEntero()
Dim CveCuentaContable As Integer = Row("CveCuentaContable").ToString().ToEntero()
Dim CveCuentaContableDepreciacion As Integer = Row("CveCuentaContable").ToString().ToEntero()
'VALIDACIONES
If Not CveSubTipoAF > 0 Then Alert($"No se encontró el SubTipo: {TipoAF} Descripcion: {Descripcion} Renglón: {NumRow}: ", TipoMensaje.MsgAdvertencia) : ErrorAF = True : Exit For
@@ -1890,27 +1907,27 @@ Partial Class General_SaldosIniciales
If CveAF > 0 Then
If CveCuentaContable > 0 Then
Dim ObjConta As New ClsContabilidad(ObjAF.IniciaTransacSQL)
If Not ObjConta.AddCuentasAsignaciones(49, UsuarioActual.CveEmpresa, CveCuentaContable, -1,
-1, -1, -1, -1, -1, 0, CveBancoCuenta:=-1, CveConceptoNomina:=-1, CveSubProyecto:=-1, CveActivoFijo:=CveAF,
CveTipoGasto:=-1, RegeneraCuenta:=False) Then
ErrorAF = True
End If
End If
If CveCuentaContableDepreciacion > 0 Then
If Not ObjConta.AddCuentasAsignaciones(101, UsuarioActual.CveEmpresa, CveCuentaContableDepreciacion, -1,
-1, -1, -1, -1, -1, 0, CveBancoCuenta:=-1, CveConceptoNomina:=-1, CveSubProyecto:=-1, CveActivoFijo:=CveAF,
CveTipoGasto:=-1, RegeneraCuenta:=False) Then
ErrorAF = True
End If
End If
Else
ErrorAF = True
Exit For
End If
End If
NumRow = NumRow + 1
Next
If Not ErrorAF Then
If Contador > 0 Then
Alert(String.Format("Se agregaron: <b>{0}</b> Activos Fijos correctamente. <br>Se Omitieron: <b>{1}</b> Activos Fijos ya que ya se encontraban registrados.", NumRows - Contador, Contador), TipoMensaje.MsgInformacion)
@@ -1933,19 +1950,17 @@ Partial Class General_SaldosIniciales
Finally
ObjAF.Dispose()
ObjConta.Dispose()
End Try
#End Region
' C U E N T A S C O N T A B L E S
ElseIf RblFormato.SelectedValue = "8" Then
Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa)
ObjConta.IniciaTransacSQL()
Try
Dim TieneError As Boolean = False
Dim ContadorUpdate As Integer = 0
Dim ContadorError As Integer = 0

View File

@@ -77,7 +77,7 @@ Partial Class Inventarios_Default
DivEquivalentes.Visible = True
DivPS.Visible = False
End If
If UsuarioActual.CveEmpresa = 119 AndAlso UsuarioActual.CveUsuario.Contiene(1703, 100) Then
If UsuarioActual.CveEmpresa = 119 Then
TrCompuesto.Visible = True
End If
Dim Txt As String = IfNull(Request("Txt"), "").ToString
@@ -98,7 +98,7 @@ Partial Class Inventarios_Default
If UsuarioActual.Empresa.Funcionalidad(558) = "1" Then
CargarDatosMedRin()
CargaEquivalencia()
ElseIf UsuarioActual.CveEmpresa = 119 AndAlso UsuarioActual.CveUsuario.Contiene(1703, 100) Then
ElseIf UsuarioActual.CveEmpresa = 119 Then
CargaDatosCompuesto()
Else
CargaDatos(DDlPS.SelectedValue.ToEntero, 1)

View File

@@ -1006,13 +1006,15 @@ Partial Class Inventarios_TraspasoAlmacen
Dim CveConceptoEntrada As Integer = 27
If Not ChkTransitorio.Checked Then CveConceptoEntrada = 27 Else CveConceptoEntrada = 9
Dim CveFolioGarantia As Integer = Request.QueryString("CveFolioGarantia").ToEntero
'AGREGAMOS LA SALIDA DEL ALMACEN ORIGEN
CveMovimientoSalida = ObjInventario.AddMovimiento(DdlAlmacenOrigen.SelectedValue.ToEntero, TipoMovimientoSalida, 1, Fecha, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1,
Observaciones:=TxtObservaciones.Text.Trim, Recibio:=If(ChkTransitorio.Checked, TxtResponsable.Text.Trim, "-1"),
CveAlmacenDestino:=DdlAlmacenDestino.SelectedValue.ToEntero, GastoIndirecto:=If(ChkTransitorio.Checked And TxtGastoIndirecto.Text.ToDouble > 0, TxtGastoIndirecto.Text, "-1").ToDouble,
CveChofer:=If(ChkTransitorio.Checked, DdlChofer.SelectedValue.ToEntero, -1), Placa:="", FechaEntrega:=If(ChkTransitorio.Checked, TxtFechaEntrega.Text.Trim.ToDateTime.ToString("dd/MM/yyyy"), "-1"), EspecifUnidad:="",
ResponsableCarga:="", ResponsableRecibio:="", Identificacion:="", Domicilio:="",
Telefono:="", Ciudad:="", Licencia:="", Modulo:="TA/G2")
Telefono:="", Ciudad:="", Licencia:="", Modulo:="TA/G2", CveFolioGarantia:=If(CveFolioGarantia > 0, CveFolioGarantia, -1))
FolioSalida = ObjInventario.Folio
Folio = ObjInventario.Folio
If CveMovimientoSalida <= 0 Then
@@ -1033,7 +1035,7 @@ Partial Class Inventarios_TraspasoAlmacen
'ENTRADA
CveMovimientoEntrada = ObjInventario.AddMovimiento(CveAlmacenEntrada, CveConceptoEntrada, 1, Fecha, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, -1, -1,
Observaciones:=TxtObservaciones.Text.Trim, Recibio:=If(ChkTransitorio.Checked, TxtResponsable.Text.Trim, "-1"),
CveAlmacenDestino:=If(ChkTransitorio.Checked, DdlAlmacenDestino.SelectedValue.ToEntero, -1), CveMovimientoRelacionado:=CveMovimientoSalida, Modulo:="TA/G3")
CveAlmacenDestino:=If(ChkTransitorio.Checked, DdlAlmacenDestino.SelectedValue.ToEntero, -1), CveMovimientoRelacionado:=CveMovimientoSalida, Modulo:="TA/G3", CveFolioGarantia:=If(CveFolioGarantia > 0, CveFolioGarantia, -1))
FolioEntrada = ObjInventario.Folio
If CveMovimientoEntrada <= 0 Then
TextoError = "Ocurrió un error al generar el movimiento de entrada"

View File

@@ -69,7 +69,7 @@
</asp:TemplateField>
<asp:TemplateField HeaderText="Sucursal">
<ItemTemplate>
<asp:Literal ID="LtSucursal" runat="server" Text='<%# Eval("Sucursal")%>'></asp:Literal>
<asp:Literal ID="LtSucursal" runat="server" Text='<%# Eval("SubProyecto")%>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Vendedor">

View File

@@ -17,7 +17,7 @@ Partial Class OC_RepOCSinFactura
Private Sub CargaCombos()
'CargaSucursales
DdlSucursal.DataSource = GlobalDTSubProyectos(UsuarioActual.CveEmpresa)
DdlSucursal.DataSource = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa)
DdlSucursal.DataBind()
'Vendedor

View File

@@ -1999,7 +1999,7 @@ Partial Class RH_Personal
If TempDTCuentasBancos.Rows.Count > 0 Then
For Each row As DataRow In TempDTCuentasBancos.Rows
If Not ObjCuentasDeposito.AddCuentasDepositos(row("BancoNombre").ToString(), row("Plaza").ToString(), row("Sucursal").ToString(), row("Cuenta").ToString(), row("CLABE").ToString(), row("CIE").ToString(), row("SWIFT").ToString(), row("Referencia").ToString(), "", UsuarioActual.CveUsuario, row("CveMoneda").ToString().ToEntero(), CvePersonal:=CvePersonal, CveUsuarioModifico:=UsuarioActual.CveUsuario, BBVAAlias:=row("BBVAAlias").ToString()) Then
If Not ObjCuentasDeposito.AddCuentasDepositos(row("BancoNombre").ToString(), row("Plaza").ToString(), row("Sucursal").ToString(), row("Cuenta").ToString(), row("CLABE").ToString(), row("CIE").ToString(), row("SWIFT").ToString(), row("Referencia").ToString(), "", UsuarioActual.CveUsuario, row("CveMoneda").ToString().ToEntero(), UsuarioActual.CveEmpresa, CvePersonal:=CvePersonal, CveUsuarioModifico:=UsuarioActual.CveUsuario, BBVAAlias:=row("BBVAAlias").ToString()) Then
TieneError = True
Exit For
End If
@@ -3353,7 +3353,7 @@ Partial Class RH_Personal
If CvePersonal > 0 Then
Dim ObjCuentasBancos As New ClsGenerales
If ObjCuentasBancos.AddCuentasDepositos(NombreBanco, Plaza, NumeroSucursal, NumeroCuenta, CLABE, ConvenioCIE, SWIFT, Referencia, "", UsuarioActual.CveUsuario, CveMoneda, CvePersonal:=CvePersonal, CveUsuarioModifico:=UsuarioActual.CveUsuario, BBVAAlias:=BBVAAlias, CveSATBanco:=CveSATBanco, EstatusPagoElectronico:=EstatusPagoElectronico) Then
If ObjCuentasBancos.AddCuentasDepositos(NombreBanco, Plaza, NumeroSucursal, NumeroCuenta, CLABE, ConvenioCIE, SWIFT, Referencia, "", UsuarioActual.CveUsuario, CveMoneda, UsuarioActual.CveEmpresa, CvePersonal:=CvePersonal, CveUsuarioModifico:=UsuarioActual.CveUsuario, BBVAAlias:=BBVAAlias, CveSATBanco:=CveSATBanco, EstatusPagoElectronico:=EstatusPagoElectronico) Then
DTCuentasBancos.Clear()
DTCuentasBancos.Merge(ObjCuentasBancos.DtResultados.FiltraParametros(String.Format("CvePersonal = {0}", CvePersonal)))
@@ -3539,7 +3539,7 @@ Partial Class RH_Personal
End If
Dim ObjCuentasBancos As New ClsGenerales
If CvePersonal > 0 Then
If ObjCuentasBancos.UpdateCuentasDepositos(GvBancosCuentas.DataKeys(e.RowIndex)("CveCuentaDeposito").ToString().ToEntero(), NombreBanco, Plaza, NumeroSucursal, NumeroCuenta, CLABE, ConvenioCIE, SWIFT, Referencia, RefCrediProveedor, False, Estatus, CveMoneda, CveUsuarioModifico:=UsuarioActual.CveUsuario, BBVAAlias:=BBVAAlias, EstatusPagoElectronico:=EstatusPagoElectronico) Then
If ObjCuentasBancos.UpdateCuentasDepositos(GvBancosCuentas.DataKeys(e.RowIndex)("CveCuentaDeposito").ToString().ToEntero(), NombreBanco, Plaza, NumeroSucursal, NumeroCuenta, CLABE, ConvenioCIE, SWIFT, Referencia, RefCrediProveedor, False, Estatus, CveMoneda, UsuarioActual.CveEmpresa, CveUsuarioModifico:=UsuarioActual.CveUsuario, BBVAAlias:=BBVAAlias, EstatusPagoElectronico:=EstatusPagoElectronico) Then
DTCuentasBancos.Clear()
DTCuentasBancos.Merge(ObjCuentasBancos.DtResultados.FiltraParametros(String.Format("CvePersonal = {0}", CvePersonal)))
Alert("Cuenta actualizada con exito.", TipoMensaje.MsgInformacion)
@@ -3570,7 +3570,7 @@ Partial Class RH_Personal
Dim ObjCuentasBancos As New ClsGenerales
If CvePersonal > 0 Then
If ObjCuentasBancos.RemoveCuentasDepositos(GvBancosCuentas.DataKeys(e.RowIndex)("CveCuentaDeposito").ToString().ToEntero(), CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
If ObjCuentasBancos.RemoveCuentasDepositos(GvBancosCuentas.DataKeys(e.RowIndex)("CveCuentaDeposito").ToString().ToEntero(), UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario) Then
DTCuentasBancos.Clear()
DTCuentasBancos.Merge(ObjCuentasBancos.DtResultados.FiltraParametros(String.Format("CvePersonal = {0}", CvePersonal)))
Alert("Cuenta Bancaria borrada con exito.", TipoMensaje.MsgInformacion)

View File

@@ -6615,7 +6615,7 @@ Partial Class Clientes
If CveCliente > 0 Then
If ObjCuentasBancos.AddCuentasDepositos(NombreBanco, Plaza, NumeroSucursal, NumeroCuenta, CLABE, ConvenioCIE, SWIFT, Referencia, RefCrediProveedor, UsuarioActual.CveUsuario, CveMoneda, CveCliente:=CveCliente) Then
If ObjCuentasBancos.AddCuentasDepositos(NombreBanco, Plaza, NumeroSucursal, NumeroCuenta, CLABE, ConvenioCIE, SWIFT, Referencia, RefCrediProveedor, UsuarioActual.CveUsuario, CveMoneda, UsuarioActual.CveEmpresa, CveCliente:=CveCliente) Then
DTCuentasBancos.Clear()
DTCuentasBancos.Merge(ObjCuentasBancos.DtResultados.FiltraParametros(String.Format("CveCliente = {0}", CveCliente)))
Alert("Cuenta Bancaria agregada con éxito.", TipoMensaje.MsgInformacion)
@@ -6645,14 +6645,13 @@ Partial Class Clientes
Alert("Cuenta Bancaria agregada con éxito.", TipoMensaje.MsgInformacion)
RegistraScript(String.Format("$('#{0}').modal('hide');", "DivAddCuentasBancarias"))
End If
End If
Else
If CveCliente > 0 Then
If ObjCuentasBancos.UpdateCuentasDepositos(GvBancosCuentas.DataKeys(CveCuentaBancaria)("CveCuentaDeposito").ToString().ToEntero(), NombreBanco, Plaza, NumeroSucursal, NumeroCuenta, CLABE, ConvenioCIE, SWIFT, Referencia, "", False, Estatus, CveMoneda) Then
If ObjCuentasBancos.UpdateCuentasDepositos(GvBancosCuentas.DataKeys(CveCuentaBancaria)("CveCuentaDeposito").ToString().ToEntero(), NombreBanco, Plaza, NumeroSucursal, NumeroCuenta, CLABE, ConvenioCIE, SWIFT, Referencia, "", False, Estatus, CveMoneda, UsuarioActual.CveEmpresa) Then
DTCuentasBancos.Clear()
DTCuentasBancos.Merge(ObjCuentasBancos.DtResultados.FiltraParametros(String.Format("CveCliente = {0}", CveCliente)))
Alert("Cuenta actualizada con éxito.", TipoMensaje.MsgInformacion)
@@ -6725,7 +6724,7 @@ Partial Class Clientes
Dim ObjCuentasBancos As New ClsGenerales
If CveCliente > 0 Then
If ObjCuentasBancos.RemoveCuentasDepositos(GvRow.DataKey("CveCuentaDeposito").ToEntero()) Then
If ObjCuentasBancos.RemoveCuentasDepositos(GvRow.DataKey("CveCuentaDeposito").ToEntero(), UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario) Then
DTCuentasBancos.Clear()
DTCuentasBancos.Merge(ObjCuentasBancos.DtResultados.FiltraParametros(String.Format("CveCliente = {0}", CveCliente)))

View File

@@ -7685,7 +7685,7 @@ Partial Class Ventas
DdlClasificacion.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa, UsoClasificacion:=1).FiltraParametros(" Codigo = '' OR Codigo IS NULL ", Orderby:="Clasificacion")
DdlClasificacionPyME.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa, UsoClasificacion:=1).FiltraParametros(" Codigo = '' OR Codigo IS NULL ", Orderby:="Clasificacion")
Else
DdlClasificacion.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa, UsoClasificacion:=1).FiltraParametros("Estado = 1", Orderby:="Clasificacion")
DdlClasificacion.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltraParametros("UsoClasificacion IN (1,3) and Estado = 1", Orderby:="Clasificacion")
DdlClasificacionPyME.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa, UsoClasificacion:=1).FiltraParametros("", Orderby:="Clasificacion")
End If
'DdlClasificacion.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa)