Merge branch 'master' of http://adsistemasof.sytes.net:8383/SIG
This commit is contained in:
@@ -5887,21 +5887,21 @@ Public Class ClsContabilidad
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function AddContaEjercicio(FechaIng As String, CveUsuario As Integer, CveEmpresa As Integer, Optional Ejercicio As Integer = -1, Optional PeriodoActual As Integer = -1,
|
||||
Public Function AddContaEjercicio(FechaIng As String, CveUsuario As Integer, CveEmpresa As Integer, Optional Ejercicio As Integer = -1, Optional PeriodoActual As Integer = 0,
|
||||
Optional CveCuentaCierre As Integer = -1, Optional CvePoliza As Integer = -1, Optional CvePrePoliza As Integer = -1,
|
||||
Optional Estatus As Integer = -1) As Boolean
|
||||
Optional Estatus As Boolean = False) As Boolean
|
||||
Dim Retorno = False
|
||||
|
||||
DataAdapter("PA_Conta_ContaEjerciciosAdd")
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@Ejercicio", SqlDbType.Int).Value = Ejercicio
|
||||
.Add("@PeriodoActual", SqlDbType.Int).Value = PeriodoActual
|
||||
.Add("@PeriodoActual", SqlDbType.TinyInt).Value = PeriodoActual
|
||||
.Add("@CveCuentaCierre", SqlDbType.Int).Value = CveCuentaCierre
|
||||
.Add("@CvePoliza", SqlDbType.Int).Value = CvePoliza
|
||||
.Add("@CvePrePoliza", SqlDbType.Int).Value = CvePrePoliza
|
||||
.Add("@Estatus", SqlDbType.Int).Value = Estatus
|
||||
.Add("@FechaIng", SqlDbType.Int).Value = FechaIng
|
||||
.Add("@Estatus", SqlDbType.Bit).Value = Estatus
|
||||
.Add("@FechaIng", SqlDbType.DateTime).Value = FechaIng
|
||||
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
End With
|
||||
@@ -5916,20 +5916,20 @@ Public Class ClsContabilidad
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function UpdateContaEjercicio(CveEjercicio As Integer, Optional Ejercicio As Integer = -1, Optional PeriodoActual As Integer = -1, Optional CveCuentaCierre As Integer = -1,
|
||||
Optional CvePoliza As Integer = -1, Optional CvePrePoliza As Integer = -1, Optional Estatus As Integer = -1) As Boolean
|
||||
Public Function UpdateContaEjercicio(CveEjercicio As Integer, Optional Ejercicio As Integer = -1, Optional PeriodoActual As Integer = 0, Optional CveCuentaCierre As Integer = -1,
|
||||
Optional CvePoliza As Integer = -1, Optional CvePrePoliza As Integer = -1, Optional Estatus As Boolean = False) As Boolean
|
||||
Dim Retorno = False
|
||||
|
||||
DataAdapter("PA_Conta_ContaEjerciciosAdd")
|
||||
DataAdapter("PA_Conta_ContaEjerciciosUpdate")
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveEjercicio", SqlDbType.Int).Value = CveEjercicio
|
||||
.Add("@Ejercicio", SqlDbType.Int).Value = Ejercicio
|
||||
.Add("@PeriodoActual", SqlDbType.Int).Value = PeriodoActual
|
||||
.Add("@PeriodoActual", SqlDbType.TinyInt).Value = PeriodoActual
|
||||
.Add("@CveCuentaCierre", SqlDbType.Int).Value = CveCuentaCierre
|
||||
.Add("@CvePoliza", SqlDbType.Int).Value = CvePoliza
|
||||
.Add("@CvePrePoliza", SqlDbType.Int).Value = CvePrePoliza
|
||||
.Add("@Estatus", SqlDbType.Int).Value = Estatus
|
||||
.Add("@Estatus", SqlDbType.Bit).Value = Estatus
|
||||
End With
|
||||
|
||||
Try
|
||||
@@ -5942,13 +5942,13 @@ Public Class ClsContabilidad
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function RemoveContaEjercicio(CveEmpresa As Integer) As Boolean
|
||||
Public Function RemoveContaEjercicio(CveEjercicio As Integer) As Boolean
|
||||
Dim Retorno = False
|
||||
|
||||
DataAdapter("PA_Conta_ContaEjerciciosDelete")
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
.Add("@CveEjercicio", SqlDbType.Int).Value = CveEjercicio
|
||||
End With
|
||||
|
||||
Try
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
<asp:UpdatePanel runat="server" ID="UpAgregar">
|
||||
<ContentTemplate>
|
||||
<li>
|
||||
<asp:LinkButton runat="server" ID="BtnAgregarMotivoD" data-toggle="tooltip" data-placement="left" title="Agregar un Defecto" Text="<i class='fa fa-plus'></i>Agregar Motivo Baja"></asp:LinkButton>
|
||||
<asp:LinkButton runat="server" ID="BtnAgregarMotivoD" data-toggle="tooltip" data-placement="left" title="Agregar un Defecto" Text="<i class='fa fa-plus'></i>Agregar Contabilidad Ejercicio"></asp:LinkButton>
|
||||
</li>
|
||||
|
||||
</ContentTemplate>
|
||||
@@ -23,8 +23,67 @@
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
<asp:UpdatePanel runat="server" ID="UpDatos" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView runat="server" ID="GvDatos" EmptyDataText="No se encontraron Motivo de Baja Registrados" ToolTip="Listado de Motivo de Baja" CssClass="table table-striped table-advance table-hover ScrollAD"
|
||||
DataKeyNames="CveEjercicio,Ejercicio,PeriodoActual,CuentaNombre,PolizoFolio,PrePolizaCierreFolio,Estatus" AutoGenerateColumns="False"
|
||||
Style="text-align: center; width: 100%" GridLines="None">
|
||||
<Columns>
|
||||
<asp:BoundField DataField="Ejercicio" HeaderText="Ejercicio" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField DataField="PeriodoActual" HeaderText="Periodo Actual" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField DataField="CuentaNombre" HeaderText="Cuenta Nombre" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField DataField="PolizoFolio" HeaderText="Póliza Folio" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField DataField="PrePolizaCierreFolio" HeaderText="PrePóliza Cierre Folio" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField DataField="Estatus" HeaderText="Estatus" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:TemplateField ItemStyle-Width="99px">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="ImgE" runat="server" AlternateText="Editar" CausesValidation="False" OnClick="ActualizaModulo" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-pencil'></i>" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField ItemStyle-Width="83px">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="ImgEE" runat="server" AlternateText="Eliminar" CausesValidation="False" OnClick="EliminarRow" CommandName="Delete" CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="confirmar" data-btn-ok-label="si" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<asp:UpdatePanel runat="server" UpdateMode="Conditional" ID="UpModal">
|
||||
<ContentTemplate>
|
||||
<div id="ModalCat" class="modal ADS fade" role="dialog">
|
||||
<div class="modal-dialog" style="width: 150px;">
|
||||
<asp:UpdatePanel runat="server" class="modal-content" ID="UpModalModulos" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="modal-header ">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">
|
||||
<asp:Literal ID="LtlTituloModalTiposD" runat="server">Conta Ejercicios</asp:Literal>
|
||||
</h4>
|
||||
</div>
|
||||
<div class="modal-body" style="text-align: left">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtEjercicio" CssClass="form-control " runat="server" MaxLength="50" CausesValidation="true" Style="width: 100%"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVClave" runat="server" ControlToValidate="TxtEjercicio" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>'¨Ejercicio''</b> es necesario, por favor ingréselo." ValidationGroup="GrpModulo"></asp:RequiredFieldValidator>
|
||||
<label for="<%= TxtEjercicio.ClientID.ToString()%>">Ejercicio:</label>
|
||||
</div>
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:CheckBox ID="ChkPeriodoActual" runat="server" data-toggle="toggle"/>
|
||||
<label for="<%= ChkPeriodoActual.ClientID.ToString()%>">Periodo Actual:</label>
|
||||
</div>
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:CheckBox ID="ChkEstatus" runat="server" data-toggle="toggle"/>
|
||||
<label for="<%= ChkEstatus.ClientID.ToString()%>">Estatus:</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<asp:LinkButton ID="LbAgregar" runat="server" class="btn btn-success" Text="Agregar" ValidationGroup="GrpModulo" />
|
||||
<button id="BtnCancelarProyecto" runat="server" type="button" class="btn default" data-dismiss="modal">Cancelar</button>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
</asp:Content>
|
||||
</asp:Content>
|
||||
|
||||
@@ -5,9 +5,86 @@ Imports Extensiones
|
||||
Partial Class Contabilidad2_CatContaEjercicios
|
||||
Inherits ClsPaginas
|
||||
|
||||
Private Property CveEjercicio() As Integer 'Guardamos el ID de registro para saber cual registro Editar
|
||||
Get
|
||||
Return If(IsNothing(ViewState("CveEjercicio")), -1, CInt(ViewState("CveEjercicio")))
|
||||
End Get
|
||||
Set
|
||||
ViewState("CveEjercicio") = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
|
||||
CargaDatos()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub CargaDatos()
|
||||
Dim ObjConta As New ClsContabilidad
|
||||
If ObjConta.GetContaEjercicio(UsuarioActual.CveEmpresa) Then
|
||||
GvDatos.DataSource = ObjConta.DtResultados
|
||||
End If
|
||||
ObjConta.Dispose()
|
||||
GvDatos.DataBind()
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnAgregarMotivoD_Click(sender As Object, e As EventArgs) Handles BtnAgregarMotivoD.Click
|
||||
TxtEjercicio.Text = ""
|
||||
ChkEstatus.Checked = 0
|
||||
ChkPeriodoActual.Checked = 0
|
||||
UpModalModulos.Update()
|
||||
RegistraScript("$('#ModalCat').modal();")
|
||||
End Sub
|
||||
|
||||
Protected Sub LbAgregar_Click(sender As Object, e As EventArgs) Handles LbAgregar.Click
|
||||
Dim ObjConta As New ClsContabilidad
|
||||
Dim errorString As String = ""
|
||||
If LbAgregar.Text = "Agregar" Then
|
||||
If Not ObjConta.AddContaEjercicio(DateTime.Today, UsuarioActual.CvePersonal, UsuarioActual.CveEmpresa, Ejercicio:=TxtEjercicio.Text,
|
||||
PeriodoActual:=If(ChkPeriodoActual.Checked, 1, 0), Estatus:=ChkEstatus.Checked) Then
|
||||
errorString = "Error al agregar"
|
||||
End If
|
||||
ElseIf LbAgregar.Text = "Actualizar" Then
|
||||
If Not ObjConta.UpdateContaEjercicio(CveEjercicio, Ejercicio:=TxtEjercicio.Text,
|
||||
PeriodoActual:=If(ChkPeriodoActual.Checked, 1, 0), Estatus:=ChkEstatus.Checked) Then
|
||||
errorString = "Error al actualizar"
|
||||
End If
|
||||
End If
|
||||
ObjConta.Dispose()
|
||||
RegistraScript("$('#ModalCat').modal('hide');")
|
||||
CargaDatos()
|
||||
UpDatos.Update()
|
||||
If errorString.Length > 0 Then
|
||||
Alert(errorString)
|
||||
Else
|
||||
If LbAgregar.Text = "Agregar" Then
|
||||
Alert("Agregado correctamente")
|
||||
ElseIf LbAgregar.Text = "Actualizar" Then
|
||||
Alert("Actualizado correctamente")
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub ActualizaModulo(sender As Object, e As EventArgs)
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
CveEjercicio = GvRow.DataKey("CveEjercicio").ToEntero
|
||||
TxtEjercicio.Text = GvRow.DataKey("Ejercicio")
|
||||
ChkEstatus.Checked = GvRow.DataKey("Estatus")
|
||||
ChkPeriodoActual.Checked = If(GvRow.DataKey("PeriodoActual").ToEntero > 0, True, False)
|
||||
LbAgregar.Text = "Actualizar"
|
||||
UpModalModulos.Update()
|
||||
RegistraScript("$('#ModalCat').modal();")
|
||||
End Sub
|
||||
|
||||
Protected Sub EliminarRow(sender As Object, e As EventArgs)
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
Dim ObjConta As New ClsContabilidad
|
||||
If ObjConta.RemoveContaEjercicio(GvRow.DataKey("CveEjercicio").ToEntero) Then
|
||||
Alert("eliminado correctamente")
|
||||
End If
|
||||
ObjConta.Dispose()
|
||||
CargaDatos()
|
||||
UpDatos.Update()
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
<asp:UpdatePanel runat="server" ID="UpAgregar">
|
||||
<ContentTemplate>
|
||||
<li>
|
||||
<asp:LinkButton runat="server" ID="BtnAgregarMotivoD" data-toggle="tooltip" data-placement="left" title="Agregar un Defecto" Text="<i class='fa fa-plus'></i>Agregar Motivo Baja"></asp:LinkButton>
|
||||
<asp:LinkButton runat="server" ID="BtnAgregarMotivoD" data-toggle="tooltip" data-placement="left" title="Agregar un Defecto" Text="<i class='fa fa-plus'></i>Agregar Cuenta Asignación"></asp:LinkButton>
|
||||
</li>
|
||||
|
||||
</ContentTemplate>
|
||||
|
||||
@@ -260,6 +260,15 @@ Partial Class Inventarios_RecepcionEntrega
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property EsDevolucionDirecta As Boolean
|
||||
Get
|
||||
Return CBool(If(ViewState("EsDevolucionDirecta") Is Nothing, 0, ViewState("EsDevolucionDirecta")))
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
ViewState("EsDevolucionDirecta") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
@@ -639,6 +648,19 @@ Partial Class Inventarios_RecepcionEntrega
|
||||
Alert("La Venta original de la Devolución no tiene salida de Almacén.", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
|
||||
If TipoDocto.Contiene("Ing") AndAlso TipoMovimiento = 2 Then
|
||||
Dim DtMov As DataTable = DtExistencias.FiltraParametros("CveConcepto = 40", "", {"CveAlmacen"})
|
||||
If DtMov.Rows.Count > 0 Then
|
||||
Dim CveAlmacenDev As Integer = DtMov.Rows(0)("CveAlmacen").ToString().ToEntero()
|
||||
DdlAlmacen.Items.Clear()
|
||||
DdlAlmacen.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1).FiltraParametros($"CveAlmacen = {CveAlmacenDev}")
|
||||
DdlAlmacen.DataBind()
|
||||
|
||||
DdlAlmacen.SelectedValueExist(CveAlmacenDev)
|
||||
EsDevolucionDirecta = True
|
||||
End If
|
||||
End If
|
||||
|
||||
Else
|
||||
Alert("Ocurrió un error al cargar los datos de devolución. Por favor vuelva a intentar.", TipoMensaje.MsgError)
|
||||
End If
|
||||
@@ -1896,6 +1918,11 @@ Partial Class Inventarios_RecepcionEntrega
|
||||
CveAlmacenTraspasoDestino = DdlAlmacen.SelectedValue.ToEntero
|
||||
End If
|
||||
|
||||
'DEVOLUCION DIRECTA A ENTREGA POR ADELANTADO
|
||||
If TipoMovimiento = 2 And ConceptoMovimiento = 18 AndAlso EsDevolucionDirecta Then
|
||||
ConceptoMovimiento = 41
|
||||
End If
|
||||
|
||||
CveMovimiento = ObjInventario.AddMovimiento(Almacen1, ConceptoMovimiento, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVentaSurtir, -1, -1, Observaciones:=TxtObservaciones.Text.Trim, Guia:=TxtGuia.Text,
|
||||
CveContrato:=CveContrato, CveAlmacenDestino:=CveAlmacenTraspasoDestino, Modulo:="RE/G7")
|
||||
Folio = ObjInventario.Folio
|
||||
|
||||
Reference in New Issue
Block a user