This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -269,3 +269,5 @@ paket-files/
|
||||
__pycache__/
|
||||
*.pyc
|
||||
/Utilerias
|
||||
/Default.aspx
|
||||
/Default.aspx.cs
|
||||
|
||||
@@ -149,6 +149,24 @@ Public Class ClsContabilidad
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
Public Function CuentasContablesSigGet(cveEmpresa As Int32) As Boolean
|
||||
Dim retorno As Boolean = False
|
||||
DataAdapter("PA_Conta_CuentasContablesSigGet", CommandType.StoredProcedure)
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = cveEmpresa
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
retorno = True
|
||||
Catch ex1 As SqlException
|
||||
OnError("Ocurrió un error al obtener las Cuentas Contables", ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al obtener las Cuentas Contables", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End Try
|
||||
Return retorno
|
||||
End Function
|
||||
|
||||
#Region " C O N T A B I L I D A D - P R E P O L I Z A"
|
||||
Public Function ObtenerTipoPoliza(Valor1 As String, Valor2 As String, CveEmpresa As Integer) As Integer
|
||||
Dim Retorno As Integer = -1
|
||||
|
||||
@@ -355,7 +355,7 @@ Public Class ClsInventarios
|
||||
End Function
|
||||
|
||||
|
||||
Public Function AddAlmacen(Almacen As String, CveTipoAlmacen As Integer, IdCtaContable As Integer, Modalidad As Integer, CveUsuario As Integer, CveEmpresa As Integer, Inventariable As Byte, CveSubProyecto As Integer, Optional Orden As Integer = -1) As Boolean
|
||||
Public Function AddAlmacen(Almacen As String, CveTipoAlmacen As Integer, IdCtaContable As Integer, Modalidad As Integer, CveUsuario As Integer, CveEmpresa As Integer, Inventariable As Byte, CveSubProyecto As Integer, Optional Orden As Integer = -1, Optional CveCuenta As Integer = -1) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_Inv_AlmacenesAdd")
|
||||
@@ -370,6 +370,7 @@ Public Class ClsInventarios
|
||||
.Add("@Inventariable", SqlDbType.Bit).Value = Inventariable
|
||||
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
|
||||
.Add("@Orden", SqlDbType.SmallInt).Value = Orden
|
||||
.Add("@CveCuenta", SqlDbType.Int).Value = CveCuenta
|
||||
End With
|
||||
|
||||
Try
|
||||
@@ -388,7 +389,7 @@ Public Class ClsInventarios
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function UpdateAlmacen(Almacen As String, CveTipoAlmacen As Integer, IdCtaContable As Integer, Modalidad As Integer, Estatus As Boolean, CveAlmacen As Integer, Inventariable As Byte, CveSubProyecto As Integer, Optional Orden As Integer = -1) As Boolean
|
||||
Public Function UpdateAlmacen(Almacen As String, CveTipoAlmacen As Integer, IdCtaContable As Integer, Modalidad As Integer, Estatus As Boolean, CveAlmacen As Integer, Inventariable As Byte, CveSubProyecto As Integer, Optional Orden As Integer = -1, Optional CveCuenta As Integer = -1) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_Inv_AlmacenesUpdate")
|
||||
@@ -403,6 +404,7 @@ Public Class ClsInventarios
|
||||
.Add("@Inventariable", SqlDbType.Bit).Value = Inventariable
|
||||
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
|
||||
.Add("@Orden", SqlDbType.SmallInt).Value = Orden
|
||||
.Add("@CveCuenta", SqlDbType.Int).Value = CveCuenta
|
||||
End With
|
||||
|
||||
Try
|
||||
|
||||
@@ -76,6 +76,7 @@ Public Class MyhubUserIdProvider
|
||||
|
||||
Private Function IUserIdProvider_GetUserId(request As IRequest) As String Implements IUserIdProvider.GetUserId
|
||||
Dim userId = Decripta(request.User.Identity.Name) 'MyCustomUserClass.FindUserId(request.User.Identity.Name)
|
||||
GuardaLog(String.Format("userId:{0}", userId))
|
||||
Return userId.ToString()
|
||||
End Function
|
||||
End Class
|
||||
@@ -31,4 +31,8 @@ Public Class Notificaciones
|
||||
Clients.Users(Para).AlertaVentana(Titulo, Message, DirectCast(Tipo, Integer), timeoutseconds)
|
||||
End Sub
|
||||
|
||||
'Public Shared Sub AlertaVentana(Message As String, Para As List(Of String), Optional Titulo As String = "", Optional timeoutseconds As Integer = 5, Optional Tipo As TipoNotificacion = TipoNotificacion.AlertaVentanaNoOcultar)
|
||||
' Dim Clients As Hubs.IHubConnectionContext(Of Object) = GlobalHost.ConnectionManager.GetHubContext(Of Notificaciones)().Clients
|
||||
' Clients.Users(Para).AlertaVentana(Titulo, Message, DirectCast(Tipo, Integer), timeoutseconds)
|
||||
'End Sub
|
||||
End Class
|
||||
|
||||
@@ -151,7 +151,7 @@
|
||||
</div>
|
||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CveAlmacen,IdCtaContable,Inventariable,Modalidad,CveTipoAlmacen,Almacen,Estatus,CveSubProyecto,Orden" EmptyDataText="No se encontraron Almacenes" CssClass="table table-striped table-advance table-hover Widthall ScrollAD" data-sort="true" data-heighterror="300px" data-freezerows="1" GridLines="None">
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CveAlmacen,IdCtaContable,Inventariable,Modalidad,CveTipoAlmacen,Almacen,Estatus,CveSubProyecto,Orden,CveCuenta" EmptyDataText="No se encontraron Almacenes" CssClass="table table-striped table-advance table-hover Widthall ScrollAD" data-sort="true" data-heighterror="300px" data-freezerows="1" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField ItemStyle-Width="15%" HeaderText="Almacen">
|
||||
<ItemTemplate>
|
||||
@@ -233,7 +233,7 @@
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtAlmacen" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="50"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVAlmacen" runat="server" CssClass="help-block errorimput" ControlToValidate="TxtAlmacen" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Almacen''</b> es necesario, por favor ingréselo." ValidationGroup="GrpObligatorio"></asp:RequiredFieldValidator>
|
||||
<label for="<%= TxtAlmacen.ClientID.ToString()%>">Almacen:</label>
|
||||
<asp:Label AssociatedControlID="TxtAlmacen" runat="server" Text="Almacen:"></asp:Label>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
@@ -244,13 +244,13 @@
|
||||
</div>--%>
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlSubProyecto" runat="server" AppendDataBoundItems="true" DataValueField="CveSubProyecto" DataTextField="SubProyecto" ValidationGroup="GrpObligatorio" Width="100%" CssClass="form-control input-sm select2me"></asp:DropDownList>
|
||||
<label for="<%= DdlSubProyecto.ClientID.ToString()%>">SubProyecto:</label>
|
||||
<asp:Label AssociatedControlID="DdlSubProyecto" runat="server" Text="SubProyecto:"></asp:Label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlTipoAlmacen" runat="server" AppendDataBoundItems="true" DataValueField="CveTipoAlmacen" DataTextField="TipoAlmacen" ValidationGroup="GrpObligatorio" Width="100%" CssClass="form-control input-sm select2me"></asp:DropDownList>
|
||||
<label for="<%= DdlTipoAlmacen.ClientID.ToString()%>">Tipo de Almacen:</label>
|
||||
<asp:Label AssociatedControlID="DdlTipoAlmacen" runat="server" Text="Tipo de Almacen:"></asp:Label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -261,14 +261,21 @@
|
||||
<asp:ListItem Text="Contable" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Selected="True" Text="Solo Existencia" Value="0"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<label for="<%= DdlModalidad.ClientID.ToString()%>">Modalidad:</label>
|
||||
<asp:Label AssociatedControlID="DdlModalidad" runat="server" Text="Modalidad:"></asp:Label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright" id="divddlcc" visible="false" runat="server">
|
||||
<asp:DropDownList ID="DdlCuentasContables" runat="server" AppendDataBoundItems="true" DataTextField="CtaCodigo" DataValueField="Id" Width="100%" ValidationGroup="GrpObligatorio" CssClass="form-control input-sm select2me"></asp:DropDownList>
|
||||
<label for="<%= DdlCuentasContables.ClientID.ToString()%>">Cuenta Contable:</label>
|
||||
</div>
|
||||
<asp:Panel CssClass="" ID="divddlcc" Visible="false" runat="server">
|
||||
<asp:Panel CssClass="form-group form-md-line-input input-iconright" ID="divCuentasCompac" Visible="false" runat="server">
|
||||
<asp:DropDownList ID="DdlCuentasContables" runat="server" AppendDataBoundItems="true" DataTextField="CtaCodigo" DataValueField="Id" Width="100%" ValidationGroup="GrpObligatorio" CssClass="form-control input-sm select2me"></asp:DropDownList>
|
||||
<asp:Label AssociatedControlID="DdlCuentasContables" runat="server" Text="Cuenta Contable:"></asp:Label>
|
||||
</asp:Panel>
|
||||
|
||||
<asp:Panel CssClass="form-group form-md-line-input input-iconright" ID="pnlCuentassig" Visible="false" runat="server">
|
||||
<asp:DropDownList ID="DdlCuentasSig" runat="server" AppendDataBoundItems="true" DataTextField="CtaCodigo" DataValueField="CveCuenta" Width="100%" ValidationGroup="GrpObligatorio" CssClass="form-control input-sm select2me"></asp:DropDownList>
|
||||
<asp:Label AssociatedControlID="DdlCuentasSig" runat="server" Text="Cuenta Contable:"></asp:Label>
|
||||
</asp:Panel>
|
||||
</asp:Panel>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
@@ -278,14 +285,14 @@
|
||||
<asp:ListItem Selected="True" Text="Si" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="No" Value="0"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<label for="<%= DdlInventariable.ClientID.ToString()%>">Inventariable:</label>
|
||||
<asp:Label AssociatedControlID="DdlInventariable" runat="server" Text="Inventariable:"></asp:Label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright" style="width: 250px!important">
|
||||
<asp:TextBox ID="TxtOrden" CssClass="form-control " Width="250px" runat="server" MaxLength="10" CausesValidation="true" Style="text-align: right!important" OnKeyup="FormatoMoneda(this);"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RfvTxtOrden" runat="server" ControlToValidate="TxtOrden" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Orden''</b> es necesario, por favor ingréselo." ValidationGroup="GrpObligatorio"></asp:RequiredFieldValidator>
|
||||
<label for="<%= TxtOrden.ClientID.ToString()%>">Orden:</label>
|
||||
<asp:Label AssociatedControlID="TxtOrden" runat="server" Text="Orden:"></asp:Label>
|
||||
<i></i>
|
||||
</div>
|
||||
</div>
|
||||
@@ -293,7 +300,7 @@
|
||||
<br />
|
||||
<div class="form-group form-md-line-input input-iconright" id="divEstatus" runat="server">
|
||||
<asp:CheckBox ID="ChkEstatus" runat="server" CssClass="form-control" />
|
||||
<label for="<%= ChkEstatus.ClientID.ToString()%>">Estatus:</label>
|
||||
<asp:Label AssociatedControlID="ChkEstatus" runat="server" Text="Estatus:"></asp:Label>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
@@ -84,17 +84,33 @@ Partial Class Inventarios_CatAlmacenes
|
||||
End Sub
|
||||
|
||||
Private Sub CargaCuentasContables()
|
||||
Dim ObjContabilidad As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
'UsuarioActual.Empresa.Funcionalidad(208).ToEntero
|
||||
If ObjContabilidad.GetCuentasRecursiva(UsuarioActual.Empresa.Funcionalidad(208).ToEntero, 1) Then
|
||||
DtCuentasContables = ObjContabilidad.DtResultados
|
||||
If UsuarioActual.Empresa.TipoContabilidad = 1 Then
|
||||
divCuentasCompac.Visible = False
|
||||
pnlCuentassig.Visible = True
|
||||
Using ObjContabilidad As New ClsContabilidad
|
||||
'UsuarioActual.Empresa.Funcionalidad(208).ToEntero
|
||||
If ObjContabilidad.CuentasContablesSigGet(UsuarioActual.CveEmpresa) Then
|
||||
DdlCuentasSig.DataSource = ObjContabilidad.DtResultados
|
||||
DdlCuentasSig.DataBind()
|
||||
DdlCuentasSig.Items.Insert(0, New ListItem("Selecione", "-1"))
|
||||
End If
|
||||
End Using
|
||||
Else
|
||||
DtCuentasContables = Nothing
|
||||
divCuentasCompac.Visible = True
|
||||
pnlCuentassig.Visible = False
|
||||
Using ObjContabilidad As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
'UsuarioActual.Empresa.Funcionalidad(208).ToEntero
|
||||
If ObjContabilidad.GetCuentasRecursiva(UsuarioActual.Empresa.Funcionalidad(208).ToEntero, 1) Then
|
||||
DtCuentasContables = ObjContabilidad.DtResultados
|
||||
Else
|
||||
DtCuentasContables = Nothing
|
||||
End If
|
||||
End Using
|
||||
|
||||
DdlCuentasContables.DataSource = DtCuentasContables
|
||||
DdlCuentasContables.DataBind()
|
||||
End If
|
||||
ObjContabilidad.Dispose()
|
||||
|
||||
DdlCuentasContables.DataSource = DtCuentasContables
|
||||
DdlCuentasContables.DataBind()
|
||||
UpAddAlmacen.Update()
|
||||
End Sub
|
||||
|
||||
@@ -207,12 +223,17 @@ Partial Class Inventarios_CatAlmacenes
|
||||
Dim TieneError = False
|
||||
Dim Estatus = 0
|
||||
If ChkEstatus.Checked Then Estatus = 1
|
||||
Dim CuentaContable = DdlCuentasContables.SelectedValue.ToEntero
|
||||
If divddlcc.Visible = False Then
|
||||
CuentaContable = 0
|
||||
Dim CuentaContable As Integer = 0
|
||||
Dim CveCuenta As Integer = 0
|
||||
If divddlcc.Visible Then
|
||||
If pnlCuentassig.Visible Then
|
||||
CveCuenta = DdlCuentasSig.SelectedValue.ToEntero()
|
||||
Else
|
||||
CuentaContable = DdlCuentasContables.SelectedValue.ToEntero()
|
||||
End If
|
||||
End If
|
||||
If HdnModalidad.Value = "A" Then
|
||||
If ObjAlmacen.AddAlmacen(TxtAlmacen.Text.Trim, DdlTipoAlmacen.SelectedValue.ToEntero, CuentaContable, DdlModalidad.SelectedValue.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CByte(DdlInventariable.SelectedValue), DdlSubProyecto.SelectedValue.ToEntero, TxtOrden.Text.ToEntero) Then
|
||||
If ObjAlmacen.AddAlmacen(TxtAlmacen.Text.Trim, DdlTipoAlmacen.SelectedValue.ToEntero, CuentaContable, DdlModalidad.SelectedValue.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CByte(DdlInventariable.SelectedValue), DdlSubProyecto.SelectedValue.ToEntero, TxtOrden.Text.ToEntero, CveCuenta) Then
|
||||
Alert("El nuevo Almacen se guardó correctamente.", TipoMensaje.MsgInformacion)
|
||||
UpDatos.Update()
|
||||
ViewState("DTAlmacenes") = ObjAlmacen.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||
@@ -222,7 +243,7 @@ Partial Class Inventarios_CatAlmacenes
|
||||
Else
|
||||
TieneError = True
|
||||
End If
|
||||
ElseIf ObjAlmacen.UpdateAlmacen(TxtAlmacen.Text.Trim, DdlTipoAlmacen.SelectedValue.ToEntero, CuentaContable, DdlModalidad.SelectedValue.ToEntero, (CByte(Estatus)), HdnID.Value.ToEntero, CByte(DdlInventariable.SelectedValue), DdlSubProyecto.SelectedValue.ToEntero, TxtOrden.Text.ToEntero) Then
|
||||
ElseIf ObjAlmacen.UpdateAlmacen(TxtAlmacen.Text.Trim, DdlTipoAlmacen.SelectedValue.ToEntero, CuentaContable, DdlModalidad.SelectedValue.ToEntero, (CByte(Estatus)), HdnID.Value.ToEntero, CByte(DdlInventariable.SelectedValue), DdlSubProyecto.SelectedValue.ToEntero, TxtOrden.Text.ToEntero, CveCuenta) Then
|
||||
Alert("El Almacen se actualizo correctamente.", TipoMensaje.MsgInformacion)
|
||||
UpDatos.Update()
|
||||
ViewState("DTAlmacenes") = ObjAlmacen.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||
@@ -280,6 +301,8 @@ Partial Class Inventarios_CatAlmacenes
|
||||
DdlModalidad.SelectedValue = If((GvRow.DataKey("Modalidad")) = "Solo Existencia", 0, 1)
|
||||
divddlcc.Visible = If((DdlModalidad.SelectedValue) = 1, True, False)
|
||||
DdlCuentasContables.SelectedValueExist(GvRow.DataKey("IdCtaContable"))
|
||||
DdlCuentasSig.SelectedValueExist(-1)
|
||||
DdlCuentasSig.SelectedValueExist(GvRow.DataKey("CveCuenta"))
|
||||
DdlSubProyecto.SelectedValueExist(GvRow.DataKey("CveSubProyecto"))
|
||||
DdlTipoAlmacen.SelectedValueExist(GvRow.DataKey("CveTipoAlmacen"))
|
||||
TxtAlmacen.Text = GvRow.DataKey("Almacen")
|
||||
|
||||
@@ -28,6 +28,8 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user