Merge branch 'master' of http://jperez@192.168.10.111:8383/SIG.git
This commit is contained in:
@@ -76,7 +76,7 @@
|
||||
<asp:HiddenField ID="HiddenField2" runat="server" ClientIDMode="Static" Value="0" />
|
||||
<div>
|
||||
<asp:GridView ID="GvDatos" runat="server" data-sort="true" AutoGenerateColumns="False"
|
||||
DataKeyNames="CveClasificacion, CveCategoria, Clasificacion, UsoClasificacion, CuentaGasto, CuentaCostos, CuentaIngresos, IdCuentaGasto, IdCuentaCostos, IdCuentaIngresos,RequiereSerieLote,CveSATPS,SATClaveProductoServicio, RequiereAFCompra, RequiereAFInsumo, RequierePersonal, Estatus,EsAcumulador,TopVentas,TopCompras,PrecioBaseCosto,CveCuentaAsignacionGasto" EmptyDataText="No se encontraron Clasificaciones Registradas" ToolTip="Listado de Clasificaciones" CssClass="table table-striped table-advance table-hover Widthall ScrollAD mysmallbtn" GridLines="None">
|
||||
DataKeyNames="CveClasificacion, CveCategoria, Clasificacion, UsoClasificacion, CuentaGasto, CuentaCostos, CuentaIngresos, IdCuentaGasto, IdCuentaCostos, IdCuentaIngresos,RequiereSerieLote,CveSATPS,SATClaveProductoServicio, RequiereAFCompra, RequiereAFInsumo, RequierePersonal, Estatus,EsAcumulador,TopVentas,TopCompras,PrecioBaseCosto,CveCuentaAsignacionGasto, CveCuentaGasto" EmptyDataText="No se encontraron Clasificaciones Registradas" ToolTip="Listado de Clasificaciones" CssClass="table table-striped table-advance table-hover Widthall ScrollAD mysmallbtn" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Clasificación">
|
||||
<ItemTemplate>
|
||||
@@ -233,13 +233,13 @@
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group input-iconright" id="DivCuentaCostos" runat="server">
|
||||
<div class="form-group input-iconright" id="DivCuentaCostos" visible="false" runat="server">
|
||||
<label for="<%= DdlCuentaCostos.ClientID.ToString()%>" style="color: #888888; font-size: 13px;">Cuenta Costos:</label>
|
||||
<asp:DropDownList ID="DdlCuentaCostos" CssClass="form-control input-sm js-cuenta-programmatic" runat="server" AppendDataBoundItems="true" DataTextField="CtaCodigo" DataValueField="Id" Width="340px"></asp:DropDownList>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group input-iconright" id="DivCuentaIngresos" runat="server">
|
||||
<div class="form-group input-iconright" id="DivCuentaIngresos" visible="false" runat="server">
|
||||
<label for="<%= DdlCuentaIngresos.ClientID.ToString()%>" style="color: #888888; font-size: 13px;">Cuenta Ingresos:</label>
|
||||
<asp:DropDownList ID="DdlCuentaIngresos" CssClass="form-control input-sm js-cuenta-programmatic" runat="server" AppendDataBoundItems="true" DataTextField="CtaCodigo" DataValueField="Id" Width="340px"></asp:DropDownList>
|
||||
</div>
|
||||
|
||||
@@ -109,25 +109,15 @@ Partial Class CatClasificaciones
|
||||
End If
|
||||
UpModalClasif.Update()
|
||||
|
||||
If UsuarioActual.Empresa.TipoContabilizacion = 1 Then
|
||||
|
||||
''COMENTADO DF 30 JUNIO 2017
|
||||
'Dim Cuenta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
'If Cuenta.GetCuentas(-1, "-1", 1, 20000) Then
|
||||
' DtCuentas = Cuenta.DtResultados
|
||||
'End If
|
||||
'Cuenta.Dispose()
|
||||
Else
|
||||
If UsuarioActual.Empresa.TipoContabilidad = 2 Then
|
||||
DivCuentaIngresos.Visible = False
|
||||
DivCuentaCostos.Visible = False
|
||||
DivCuentaGasto.Visible = False
|
||||
|
||||
GvDatos.Columns(1).Visible = False
|
||||
GvDatos.Columns(2).Visible = False
|
||||
GvDatos.Columns(3).Visible = False
|
||||
End If
|
||||
If UsuarioActual.Empresa.TipoContabilidad = 1 Then
|
||||
DivCuentaIngresos.Visible = False
|
||||
DivCuentaCostos.Visible = False
|
||||
'DivCuentaGasto.Visible = False
|
||||
|
||||
' GvDatos.Columns(1).Visible = False
|
||||
GvDatos.Columns(2).Visible = False
|
||||
GvDatos.Columns(3).Visible = False
|
||||
End If
|
||||
|
||||
DdlCuentaGasto.Items.Insert(0, New ListItem("-", "-1"))
|
||||
@@ -174,6 +164,7 @@ Partial Class CatClasificaciones
|
||||
If DdlCuentaCostos.SelectedValue.ToEntero > 0 Then objConta.AddCuentasAsignaciones(69, UsuarioActual.CveEmpresa, DdlCuentaCostos.SelectedValue.ToEntero, CveClasificacion:=ObjClasificaciones.CveClasificacion)
|
||||
If DdlCuentaIngresos.SelectedValue.ToEntero > 0 Then objConta.AddCuentasAsignaciones(4, UsuarioActual.CveEmpresa, DdlCuentaIngresos.SelectedValue.ToEntero, CveClasificacion:=ObjClasificaciones.CveClasificacion)
|
||||
End If
|
||||
ObjClasificaciones.Commit()
|
||||
TxtClasificacion.Text = ""
|
||||
TxtPrecioBaseCosto.Text = ""
|
||||
DdlCuentaGasto.SelectedValueExist("0")
|
||||
@@ -181,6 +172,9 @@ Partial Class CatClasificaciones
|
||||
DdlCuentaIngresos.SelectedValueExist("0")
|
||||
RegistraScript(String.Format("$('#{0}').modal('hide');", "ModalClasificaciones"))
|
||||
Alert("La nueva Clasificación se guardó correctamente.", TipoMensaje.MsgInformacion)
|
||||
Else
|
||||
Alert("Ocurrió un error al agregar la clasificación. Por favor vuelva a intentar.", TipoMensaje.MsgError)
|
||||
ObjClasificaciones.RollBack()
|
||||
End If
|
||||
|
||||
ElseIf HdnModalidadClasificacion.Value = "U" Then
|
||||
@@ -226,14 +220,12 @@ Partial Class CatClasificaciones
|
||||
|
||||
DdlCuentaGasto.DataValueField = "CveCuenta"
|
||||
DdlCuentaGasto.DataTextField = "Cuenta"
|
||||
Dim ObjContabilidad As New ClsContabilidad
|
||||
If ObjContabilidad.GetCuentas(-1, "-1", 1, UsuarioActual.CveEmpresa) Then
|
||||
DtCuentasContables = ObjContabilidad.DtResultados
|
||||
'Cuenta, CtaCodigo
|
||||
DtCuentasContables.Columns("CtaCodigo").ColumnName = "Cuenta"
|
||||
End If
|
||||
ObjContabilidad.Dispose()
|
||||
ElseIf UsuarioActual.Empresa.TipoContabilidad = 1 Then
|
||||
|
||||
DtCuentasContables = GlobalDTContaCuentasContables(UsuarioActual.CveEmpresa, Afectable:=1)
|
||||
'Cuenta, CtaCodigo
|
||||
DtCuentasContables.Columns("CtaCodigo").ColumnName = "Cuenta"
|
||||
|
||||
ElseIf UsuarioActual.Empresa.TipoContabilidad = 2 Then
|
||||
|
||||
Dim ObjEmpresa As New ClsSisEmpresas
|
||||
Dim Empresa As Empresa = Nothing
|
||||
@@ -319,7 +311,7 @@ Partial Class CatClasificaciones
|
||||
If e.Row.DBCampo("CuentaIngresos") = "Seleccione" Or e.Row.DBCampo("CuentaIngresos") = "" Then e.Row.FCLabel("LtlCuentaIngresos").Text = "-"
|
||||
e.Row.Cells(0).HorizontalAlign = HorizontalAlign.Left
|
||||
|
||||
If UsuarioActual.Empresa.UsaContabilidad Then
|
||||
If UsuarioActual.CveEmpresa.Contiene(13, 83) Then
|
||||
e.Row.FCLabel("LtlClasificacion").Text = String.Format("<a Class='Texto' href='/Ventas/CatClasificacionesDetalle.aspx?CveClasificacion={0}'>{1}</a>", e.Row.DBCampo("CveClasificacion"), e.Row.DBCampo("Clasificacion"))
|
||||
End If
|
||||
|
||||
@@ -328,18 +320,15 @@ Partial Class CatClasificaciones
|
||||
|
||||
Protected Sub GvDatos_RowDeleting(sender As Object, e As System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles GvDatos.RowDeleting
|
||||
Dim ObjClasificaciones As New ClsClasificaciones
|
||||
|
||||
If ObjClasificaciones.RemoveClasificacion(GvDatos.DataKeys(e.RowIndex).Value.ToString.ToEntero) Then
|
||||
GvDatos.EditIndex = -1
|
||||
ViewState("DTClasificaciones") = ObjClasificaciones.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||
GlobalDTClasificaciones(UsuarioActual.CveEmpresa) = Nothing
|
||||
CargaDatos()
|
||||
Alert("La Clasificación se eliminó correctamente.", TipoMensaje.MsgInformacion)
|
||||
Else
|
||||
Alert("Ocurrió un error al eliminar la clasificación. Por favor vuelva a intentar.", TipoMensaje.MsgError)
|
||||
End If
|
||||
|
||||
ObjClasificaciones.Dispose()
|
||||
CargaGrid()
|
||||
|
||||
End Sub
|
||||
|
||||
@@ -420,7 +409,14 @@ Partial Class CatClasificaciones
|
||||
If CuentaGasto.Length > 1 And CargaGastos Then
|
||||
DdlCuentaGasto.Items.Insert(0, New ListItem(CuentaGasto, CveCuentaGastoActual.ToString))
|
||||
DdlCuentaGasto.SelectedIndex = 0
|
||||
CargaGastos = False
|
||||
|
||||
If UsuarioActual.Empresa.TipoContabilidad = 1 Then
|
||||
DdlCuentaGasto.Items.Clear() : DdlCuentaGasto.Items.Add(New ListItem("-", "-1"))
|
||||
'DdlCuentaGasto.Text = ""
|
||||
DdlCuentaGasto.DataSource = GlobalDTContaCuentasContables(UsuarioActual.CveEmpresa, Afectable:=1) : DdlCuentaGasto.DataBind()
|
||||
DdlCuentaGasto.SelectedValueExist(GvRow.DataKey("CveCuentaGasto"))
|
||||
End If
|
||||
|
||||
Else
|
||||
DdlCuentaGasto.SelectedValueExist(CveCuentaGastoActual)
|
||||
End If
|
||||
|
||||
Reference in New Issue
Block a user