This commit is contained in:
HECTOR RODRIGUEZ
2021-07-15 15:02:58 -07:00
11 changed files with 242 additions and 138 deletions

View File

@@ -950,7 +950,7 @@ Public Class ClsContabilidad
OnError("No se puede registrar una póliza en un ejercicio Cerrado", ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) OnError("No se puede registrar una póliza en un ejercicio Cerrado", ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
ElseIf ex1.Message.Contains("50024; La Cuenta no fue detectada") Then ElseIf ex1.Message.Contains("50024; La Cuenta no fue detectada") Then
Dim Concepto1 As String = DirectCast(HttpContext.Current.Application("GlobalDTContaConceptosContables"), DataTable).FiltroPrimeroValor("ConceptoContable", String.Format("CveConceptoContable = {0}", CveConceptoContable)) Dim Concepto1 As String = DirectCast(HttpContext.Current.Application("GlobalDTContaConceptosContables"), DataTable).FiltroPrimeroValor("ConceptoContable", String.Format("CveConceptoContable = {0}", CveConceptoContable))
OnError(String.Format("El concepto '{0}' no tiene especificada la cuenta", Concepto1), ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) OnError(String.Format("El concepto '{0}' no tiene especificada la cuenta. Favor de especificarla en la asignación de cuentas.", Concepto1), ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
ElseIf ex1.Message.Contains("Vw_Val_Conta_CuentasResultados_SubProyectos") Then ElseIf ex1.Message.Contains("Vw_Val_Conta_CuentasResultados_SubProyectos") Then
Dim Concepto2 As String = DirectCast(HttpContext.Current.Application("GlobalDTContaConceptosContables"), DataTable).FiltroPrimeroValor("ConceptoContable", String.Format("CveConceptoContable = {0}", CveConceptoContable)) Dim Concepto2 As String = DirectCast(HttpContext.Current.Application("GlobalDTContaConceptosContables"), DataTable).FiltroPrimeroValor("ConceptoContable", String.Format("CveConceptoContable = {0}", CveConceptoContable))
OnError(String.Format("El concepto '{0}' requiere centro de costo", Concepto2), ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) OnError(String.Format("El concepto '{0}' requiere centro de costo", Concepto2), ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
@@ -5747,6 +5747,26 @@ Public Class ClsContabilidad
Return Retorno Return Retorno
End Function End Function
Public Function GetCuentasAsignacionesSistema(CveEmpresa As Integer, Tipo As Integer) As Boolean
Dim Retorno = False
DataAdapter("PA_Conta_CuentasAsignacionesSistemaGet")
With SqlAdapter.SelectCommand.Parameters
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@Tipo", SqlDbType.Int).Value = Tipo
End With
Try
SqlAdapter.Fill(Data)
Retorno = True
Catch ex As Exception
Me.OnError("Ocurrió un error al obtener el catálogo de cuentas asignación2", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End Try
Return Retorno
End Function
Public Function AddCuentasAsignaciones(Optional CveConceptoContable As Integer = -1, Optional CveEmpresa As Integer = -1, Optional CveCuenta As Integer = -1, Optional IdCtaContable As Integer = -1, Public Function AddCuentasAsignaciones(Optional CveConceptoContable As Integer = -1, Optional CveEmpresa As Integer = -1, Optional CveCuenta As Integer = -1, Optional IdCtaContable As Integer = -1,
Optional CveProveedor As Integer = -1, Optional CveCliente As Integer = -1, Optional CvePersonal As Integer = -1, Optional CveClasificacion As Integer = -1, Optional CveProveedor As Integer = -1, Optional CveCliente As Integer = -1, Optional CvePersonal As Integer = -1, Optional CveClasificacion As Integer = -1,
Optional CveAlmacen As Integer = -1, Optional PorcentajeIVA As Decimal = -1, Optional CveConceptoNomina As Decimal = -1, Optional CveBancoCuenta As Integer = -1) As Boolean Optional CveAlmacen As Integer = -1, Optional PorcentajeIVA As Decimal = -1, Optional CveConceptoNomina As Decimal = -1, Optional CveBancoCuenta As Integer = -1) As Boolean

View File

@@ -3079,16 +3079,17 @@ Public Class ClsPaginas
Property GlobalDTContaConceptosContables(CvePlantillaPoliza As Integer) As DataTable Property GlobalDTContaConceptosContables(CveConceptoContable As Integer) As DataTable
Get Get
If CvePlantillaPoliza <> -1 Then If CveConceptoContable <> -1 Then
Dim Dv As New DataView(DirectCast(Application("GlobalDTContaConceptosContables"), DataTable), String.Format("CvePlantillaPoliza = {0}", CvePlantillaPoliza), "", DataViewRowState.CurrentRows) Dim Dv As New DataView(DirectCast(Application("GlobalDTContaConceptosContables"), DataTable), String.Format("CveConceptoContable = {0}", CveConceptoContable), "", DataViewRowState.CurrentRows)
GlobalDTContaConceptosContables = Dv.ToTable GlobalDTContaConceptosContables = Dv.ToTable
Dv.Dispose() Dv.Dispose()
Else Else
GlobalDTContaConceptosContables = DirectCast(Application("GlobalDTContaConceptosContables"), DataTable) GlobalDTContaConceptosContables = DirectCast(Application("GlobalDTContaConceptosContables"), DataTable)
End If End If
End Get End Get
Set(value As DataTable) Set(value As DataTable)
Application("GlobalDTContaConceptosContables") = value Application("GlobalDTContaConceptosContables") = value

View File

@@ -34,9 +34,9 @@ Public Class E48 : Implements IHttpHandler, IRequiresSessionState
Private Function Salida(ByVal context As HttpContext) As String Private Function Salida(ByVal context As HttpContext) As String
Dim retorno As String = "" Dim retorno As String = ""
Dim ObjInv As New ClsInventarios
Dim Respuesta As New FidelityAppsResponse Dim Respuesta As New APHAppsResponse
Dim RespuestaError As New FidelityAppsResponseError Dim RespuestaError As New APHAppResponseError
Dim TieneError As Boolean = False Dim TieneError As Boolean = False
Dim JsonRequest As JObject = Nothing Dim JsonRequest As JObject = Nothing
Dim ObjInventario As New ClsInventarios Dim ObjInventario As New ClsInventarios
@@ -46,8 +46,8 @@ Public Class E48 : Implements IHttpHandler, IRequiresSessionState
Dim SinExistencia As String = "No hay existencias suficientes del producto: " Dim SinExistencia As String = "No hay existencias suficientes del producto: "
Dim ObjUsuarios As New ClsSisUsuarios Dim ObjUsuarios As New ClsSisUsuarios
Dim CveUsuario As Integer Dim CveUsuario As Integer
Dim UsuarioActual As Usuario = ValidaUsuarioSistema(100, CveEmpresa) Dim UsuarioActual As Usuario = Nothing 'ValidaUsuarioSistema(100, CveEmpresa)
Dim FolioSalida As Integer = 0
Dim ErrorAC As Boolean = False Dim ErrorAC As Boolean = False
Dim ErrorMovInv As Boolean = False Dim ErrorMovInv As Boolean = False
@@ -72,12 +72,10 @@ Public Class E48 : Implements IHttpHandler, IRequiresSessionState
End If End If
If Not TieneError AndAlso Not String.IsNullOrEmpty(JsonRequest("fecha")) Then If Not TieneError AndAlso Not String.IsNullOrEmpty(JsonRequest("fecha")) Then
Dim Inv As New ClsInventarios
Dim ObjProductosServicios As New ClsProductosServicios()
Dim ObjContaAC As ClsContPAQi = Nothing Dim ObjContaAC As ClsContPAQi = Nothing
Dim tFolio As Integer = Inv.GetFolioSiguiente(3, CveEmpresa)
Dim observaciones As String = IIf(JsonRequest("observaciones").ToString() <> "", JsonRequest("observaciones").ToString(), "Salida Almacen") Dim observaciones As String = IIf(JsonRequest("observaciones").ToString() <> "", JsonRequest("observaciones").ToString(), "Salida Almacen")
Dim CveAlmacen As Integer = 7
Dim IDPoliza As Integer = 0 Dim IDPoliza As Integer = 0
Dim usuario As String = JsonRequest("usuario").ToString() Dim usuario As String = JsonRequest("usuario").ToString()
If ObjUsuarios.GetUsuariosEmpresas(-1) Then If ObjUsuarios.GetUsuariosEmpresas(-1) Then
@@ -88,14 +86,24 @@ Public Class E48 : Implements IHttpHandler, IRequiresSessionState
Mensaje = "No se encontro el usuario ingresado" Mensaje = "No se encontro el usuario ingresado"
TieneError = True TieneError = True
End If End If
Else
Mensaje = "No se encontro el usuario ingresado"
TieneError = True
End If End If
Dim Fecha As Date = JsonRequest("fecha").ToString().ToDate
Dim almacen As String = JsonRequest("almacen").ToString()
Dim Recibe As String = JsonRequest("entrega").ToString()
Dim GlobalDTInvConceptos As DataTable
Dim EsContabilizable As Boolean = True
If Inv.GetConceptos Then GlobalDTInvConceptos = Inv.DtResultados Else GlobalDTInvConceptos = Nothing
If Not TieneError Then If Not TieneError Then
Dim GlobalDTInvConceptos As DataTable
If ObjInventario.GetConceptos Then GlobalDTInvConceptos = ObjInventario.DtResultados Else GlobalDTInvConceptos = Nothing
Dim Fecha As Date = JsonRequest("fecha").ToString().ToDate
Dim almacen As String = JsonRequest("almacen").ToString()
Dim Recibe As String = JsonRequest("entrega").ToString()
Dim CveAlmacen As Integer = GlobalDTAlmacen(CveEmpresa).FiltroPrimeroValor("CveAlmacen", String.Format(" Almacen = '{0}'", almacen)).ToEntero
Dim EsContabilizable As Boolean = True
Dim tFolio As Integer = ObjInventario.GetFolioSiguiente(3, CveEmpresa)
Try Try
Dim CvePrePoliza As Integer = ObjConta.AddPrePolizas("ASHX/E48", 53, 0, 0, 1, Fecha, observaciones, UsuarioActual.CveUsuario, CveEmpresa, CveTipoPoliza:=3) Dim CvePrePoliza As Integer = ObjConta.AddPrePolizas("ASHX/E48", 53, 0, 0, 1, Fecha, observaciones, UsuarioActual.CveUsuario, CveEmpresa, CveTipoPoliza:=3)
CveMovimiento = ObjInventario.AddMovimiento(CveAlmacen, 3, 1, Fecha, tFolio, UsuarioActual.CveUsuario, CveEmpresa, -1, -1, -1, -1, Observaciones:=observaciones, Recibio:=Recibe, Modulo:="ASHX/E48") CveMovimiento = ObjInventario.AddMovimiento(CveAlmacen, 3, 1, Fecha, tFolio, UsuarioActual.CveUsuario, CveEmpresa, -1, -1, -1, -1, Observaciones:=observaciones, Recibio:=Recibe, Modulo:="ASHX/E48")
@@ -115,26 +123,16 @@ Public Class E48 : Implements IHttpHandler, IRequiresSessionState
For Each JsonPS As JObject In ListaPS For Each JsonPS As JObject In ListaPS
Dim Cantidad As Double = JsonPS("cantidad").ToString.ToDouble() Dim Cantidad As Double = JsonPS("cantidad").ToString.ToDouble()
Dim CvePS As Integer = GlobalDTPSSimplificado(Codigo:=JsonPS("codigo").ToString()).FiltroPrimeroValor("CvePS").ToEntero() Dim dtt As DataTable = GlobalDTPSSimplificado(Codigo:=JsonPS("codigo").ToString())
Dim DrPS As DataRow = GlobalDTPS(CveEmpresa, CvePS:=CvePS).FiltroPrimero("") Dim CvePS As Integer = dtt.FiltroPrimeroValor("CvePS").ToEntero()
Dim CveUM As Integer Dim CveUM As Integer = dtt.FiltroPrimeroValor("CveUnidadMedida").ToEntero()
If ObjProductosServicios.GetPS(CvePS, -1, CveEmpresa) Then
If ObjProductosServicios.DtResultados.Rows.Count > 0 Then
CveUM = ObjProductosServicios.CveUnidadMedida.ToString.ToEntero
End If
End If
If ObjInventario.GetExistenciasPS(CvePS, CveUM, CveEmpresa, CveAlmacen, FechaMovto:=String.Format("{0} 00:00", Fecha.ToString("yyyy/MM/dd"))) >= Cantidad Then
If Not ObjInventario.AddMovimientoDetalle(CveMovimiento, Cantidad, CveUM, CvePS, 0, Observaciones:=observaciones, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then If CvePS > 0 Then
Mensaje = "Error al guardar los movimientos" If ObjInventario.GetExistenciasPS(CvePS, CveUM, CveEmpresa, CveAlmacen, FechaMovto:=String.Format("{0} 00:00", Fecha.ToString("yyyy/MM/dd"))) >= Cantidad Then
ErrorMovInv = True If Not ObjInventario.AddMovimientoDetalle(CveMovimiento, Cantidad, CveUM, CvePS, 0, Observaciones:=observaciones, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
Exit For
End If
Else
If UsuarioActual.TienePermisoProceso(114) Then
If ObjInventario.GetExistenciasPS(CvePS, CveUM, CveEmpresa, CveAlmacen, FechaMovto:=String.Format("{0} 00:00", Fecha.ToString("yyyy/MM/dd"))) >= Cantidad Then
Mensaje = "Error al guardar los movimientos" Mensaje = "Error al guardar los movimientos"
ErrorMovInv = True ErrorMovInv = True
Exit For Exit For
End If End If
@@ -142,7 +140,11 @@ Public Class E48 : Implements IHttpHandler, IRequiresSessionState
SinExistencia += String.Format("{0}, ", JsonPS("codigo").ToString()) SinExistencia += String.Format("{0}, ", JsonPS("codigo").ToString())
ErrorMovInv = True ErrorMovInv = True
End If End If
Else
SinExistencia += String.Format("{0}, ", JsonPS("codigo").ToString())
ErrorMovInv = True
End If End If
Cont += 1 Cont += 1
Next Next
Mensaje = SinExistencia Mensaje = SinExistencia
@@ -162,8 +164,6 @@ Public Class E48 : Implements IHttpHandler, IRequiresSessionState
tCveSubProyecto = drA2("CveSubProyecto").ToString.ToEntero tCveSubProyecto = drA2("CveSubProyecto").ToString.ToEntero
End If End If
Dim OrigenMov As Integer = GlobalDTInvConceptos.FiltroPrimeroValor("Origen", "CveConcepto = " & 3).ToEntero Dim OrigenMov As Integer = GlobalDTInvConceptos.FiltroPrimeroValor("Origen", "CveConcepto = " & 3).ToEntero
If OrigenMov = 1 Then TipoMovtoAlmacen = False Else TipoMovtoAlmacen = True If OrigenMov = 1 Then TipoMovtoAlmacen = False Else TipoMovtoAlmacen = True
TipoMovtoOtro = Not TipoMovtoAlmacen TipoMovtoOtro = Not TipoMovtoAlmacen
@@ -247,15 +247,12 @@ Public Class E48 : Implements IHttpHandler, IRequiresSessionState
End If End If
End If End If
End If End If
End If End If
End If End If
If IDPoliza > 0 Then If IDPoliza > 0 Then
ObjInventario.UpdateMovimientoPoliza(IDPoliza, CveMovimiento, UsuarioActual.CveEmpresa) ObjInventario.UpdateMovimientoPoliza(IDPoliza, CveMovimiento, UsuarioActual.CveEmpresa)
End If End If
Else Else
ErrorAC = True ErrorAC = True
Mensaje = "No se pudo insertar la poliza" Mensaje = "No se pudo insertar la poliza"
@@ -265,6 +262,7 @@ Public Class E48 : Implements IHttpHandler, IRequiresSessionState
If Not ErrorAC And Not ErrorMovInv Then If Not ErrorAC And Not ErrorMovInv Then
Dim Msg As New StringBuilder Dim Msg As New StringBuilder
FolioSalida = ObjInventario.Folio
Msg.AppendFormat("<br/>El Movimiento se registro con el Folio: <b>{0}</b>", ObjInventario.Folio) Msg.AppendFormat("<br/>El Movimiento se registro con el Folio: <b>{0}</b>", ObjInventario.Folio)
Msg.AppendFormat("<br/><br/> <a class=""Texto"" target='_blank' href=""/Compras/PopUpVerFactura.aspx?P={0}"">Imprimir Movimiento</a> ", Encripta(String.Format("OP=Alm&CveMovimiento={0}", CveMovimiento))) Msg.AppendFormat("<br/><br/> <a class=""Texto"" target='_blank' href=""/Compras/PopUpVerFactura.aspx?P={0}"">Imprimir Movimiento</a> ", Encripta(String.Format("OP=Alm&CveMovimiento={0}", CveMovimiento)))
@@ -304,6 +302,8 @@ Public Class E48 : Implements IHttpHandler, IRequiresSessionState
TieneError = True TieneError = True
End Try End Try
Else
End If End If
ObjInventario.Dispose() 'elimino la instancia ObjInventario.Dispose() 'elimino la instancia
@@ -321,7 +321,9 @@ Public Class E48 : Implements IHttpHandler, IRequiresSessionState
retorno = JsonConvert.SerializeObject(RespuestaError).ToString retorno = JsonConvert.SerializeObject(RespuestaError).ToString
Else Else
context.Response.StatusCode = 200 context.Response.StatusCode = 200
Respuesta.Message = "La existencia se obtuvo correctamente" Respuesta.Message = "La salida se registró correctamente"
Respuesta.Folio = folioSalida
retorno = JsonConvert.SerializeObject(Respuesta).ToString retorno = JsonConvert.SerializeObject(Respuesta).ToString
End If End If
@@ -331,25 +333,27 @@ Public Class E48 : Implements IHttpHandler, IRequiresSessionState
End Function End Function
Private Class FidelityAppsResponse Private Class APHAppsResponse
Sub New() Sub New()
isSuccess = "true" IsSuccess = "true"
End Sub End Sub
Public Property IsSuccess As String Public Property IsSuccess As String
Public Property Message As String Public Property Message As String
Public Property Folio As String
End Class End Class
Private Class FidelityAppsResponseError Private Class APHAppResponseError
Sub New() Sub New()
isSuccess = "false" IsSuccess = "false"
End Sub End Sub
Public Property IsSuccess As String Public Property IsSuccess As String
Public Property Folio As String
Public Property Message As String Public Property Message As String
End Class End Class
Private Class AuthMessage Private Class AuthMessage
Public Property IsSucces As Boolean Public Property IsSucces As Boolean
Public Property ErrorMessage As FidelityAppsResponseError Public Property ErrorMessage As APHAppResponseError
Public Property StatusCode As Integer Public Property StatusCode As Integer
End Class End Class

View File

@@ -82,7 +82,7 @@ Partial Class RepGastosCC
Dim ce = DirectCast(Cells, System.Web.UI.WebControls.DataControlFieldCell) Dim ce = DirectCast(Cells, System.Web.UI.WebControls.DataControlFieldCell)
Cells.Text = Cells.Text.FormatoNumero(2) Cells.Text = Cells.Text.FormatoNumero(2)
Cells.HorizontalAlign = HorizontalAlign.Right
End If End If
End If End If
Next Next

View File

@@ -21,29 +21,58 @@
</asp:UpdatePanel> </asp:UpdatePanel>
</asp:Content> </asp:Content>
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server"> <asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
<asp:UpdatePanel ID="UPFiltros" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<div class="portlet solid grey-cascade portlet-filter" id="idnecesaria">
<div class="portlet-title portlet-filterT smalltitle">
<div class="tools">
<asp:Button ID="BtnConsultar" runat="server" Text="Consultar" OnClick="BtnConsultar_Click" class="btn btn-primary" />
<a href="javascript:;" class="expand"></a>
</div>
<div class="titlefiltros caption">
<div class="row">
<label runat="server" id="LblTipo" class="col-md-1 truncate">Opción:</label>
<div runat="server" id="DivTipo" class="col-md-2">
<asp:DropDownList ID="DdlTipo" runat="server" Class="table-group-action-input form-control input-inline input-small input-sm select2me">
<asp:ListItem Selected="True" Text="Todas" Value="-1"></asp:ListItem>
<asp:ListItem Text="Unicas" Value="1"></asp:ListItem>
<asp:ListItem Text="Clasificaciones" Value="2"></asp:ListItem>
<asp:ListItem Text="Bancos" Value="3"></asp:ListItem>
<asp:ListItem Text="Almacenes" Value="4"></asp:ListItem>
<asp:ListItem Text="Personales" Value="5"></asp:ListItem>
<asp:ListItem Text="Proveedores" Value="6"></asp:ListItem>
<asp:ListItem Text="Clientes" Value="7"></asp:ListItem>
<asp:ListItem Text="Activos Fijos" Value="9"></asp:ListItem>
</asp:DropDownList>
</div>
</div>
</div>
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
<asp:UpdatePanel runat="server" ID="UpDatos" UpdateMode="Conditional"> <asp:UpdatePanel runat="server" ID="UpDatos" UpdateMode="Conditional">
<ContentTemplate> <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" <asp:GridView runat="server" ID="GvDatos" EmptyDataText="" ToolTip="" CssClass="table table-striped table-advance table-hover ScrollAD"
DataKeyNames="CveCuentaAsignacion,CveConceptoContable,CveCuenta,IdCuenta,CveProveedor,CveCliente,CvePersonal,CveClasificacion,CveAlmacen,PorcentajeIVA,CveConceptoNomina,CveBancoCuenta" AutoGenerateColumns="False" DataKeyNames="CveCuentaAsignacion,CveConceptoContable,CveCuenta,IdCuenta,CveProveedor,CveCliente,CvePersonal,CveClasificacion,CveAlmacen,PorcentajeIVA,CveConceptoNomina,CveBancoCuenta" AutoGenerateColumns="False"
Style=" text-align: center;width:100%" GridLines="None"> Style=" width:100%" GridLines="None">
<Columns> <Columns>
<asp:BoundField DataField="ConceptoContable" HeaderText="Concepto Contable" ItemStyle-HorizontalAlign="Left"/> <asp:BoundField DataField="ConceptoContable" ItemStyle-Width="150px" HeaderText="Concepto Contable" ItemStyle-HorizontalAlign="Left"/>
<asp:BoundField DataField="CuentaNombre" HeaderText="Nombre Cuenta" ItemStyle-HorizontalAlign="Left"/> <asp:BoundField DataField="Referencia" HeaderText="Referencia" ItemStyle-HorizontalAlign="Left"/>
<asp:BoundField DataField="IdCuenta" HeaderText="Id Cuenta" ItemStyle-HorizontalAlign="Left"/> <asp:BoundField DataField="CuentaCodigo" ItemStyle-Width="100px" HeaderText="Código Cuenta" ItemStyle-HorizontalAlign="Left"/>
<asp:BoundField DataField="ProveedorNombre" HeaderText="Nombre Proveedor" ItemStyle-HorizontalAlign="Left"/> <asp:BoundField DataField="CuentaNombre" HeaderText="Nombre Cuenta" ItemStyle-HorizontalAlign="Left"/>
<asp:BoundField DataField="ClienteNombre" HeaderText="Nombre Cliente" ItemStyle-HorizontalAlign="Left"/>
<asp:BoundField DataField="PersonalNombre" HeaderText="Nombre Personal" ItemStyle-HorizontalAlign="Left"/> <asp:TemplateField ItemStyle-Width="49px">
<asp:BoundField DataField="Clasificacion" HeaderText="Clasificación" ItemStyle-HorizontalAlign="Left"/>
<asp:BoundField DataField="Almacen" HeaderText="Almacén" ItemStyle-HorizontalAlign="Left"/>
<asp:BoundField DataField="PorcentajeIVA" HeaderText="Porcentaje IVA" ItemStyle-HorizontalAlign="Left"/>
<asp:TemplateField ItemStyle-Width="99px">
<ItemTemplate> <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>" /> <asp:LinkButton ID="ImgE" runat="server" AlternateText="Editar" CausesValidation="False" OnClick="ActualizaModulo" CssClass="btn btn-circle btn-xs green" Text="<i class='fa fa-pencil'></i>" />
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField ItemStyle-Width="83px"> <asp:TemplateField ItemStyle-Width="49px">
<ItemTemplate> <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" /> <asp:LinkButton ID="ImgEliminar" runat="server" AlternateText="Eliminar" Visible='<%# Eval("CveCuentaAsignacion").ToString <> "" %>' CausesValidation="False" OnClick="EliminarRow" CommandName="Delete" CssClass="btn btn-circle btn-xs red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="confirmar" data-btn-ok-label="si" />
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
</Columns> </Columns>
@@ -67,53 +96,58 @@
<div class="col-md-1" style="width:50%;text-align:left"> <div class="col-md-1" style="width:50%;text-align:left">
<div class="form-group form-md-line-input input-iconright"> <div class="form-group form-md-line-input input-iconright">
<asp:DropDownList ID="DdlCconceptosContables" CssClass="form-control input-sm select2me js-cuenta-programmatic select2me" runat="server" AppendDataBoundItems="true" DataTextField="ConceptoContable" DataValueField="CveConceptoContable" Width="240px" ValidationGroup="GrpModulo"></asp:DropDownList> <asp:HiddenField ID="HdnCveCuentaAsignacion" runat="server" />
<asp:DropDownList ID="DdlCconceptosContables" CssClass="form-control input-sm select2me js-cuenta-programmatic select2me" runat="server" AppendDataBoundItems="true" DataTextField="ConceptoContable" DataValueField="CveConceptoContable" Width="240px" ValidationGroup="GrpModulo" Enabled="false"></asp:DropDownList>
<label for="<%= DdlCconceptosContables.ClientID.ToString()%>">Concepto Contable: </label> <label for="<%= DdlCconceptosContables.ClientID.ToString()%>">Concepto Contable: </label>
</div> </div>
<div class="form-group form-md-line-input input-iconright"> <div class="form-group form-md-line-input input-iconright">
<asp:DropDownList ID="DdlCuenta" CssClass="form-control input-sm select2me js-cuenta-programmatic select2me" runat="server" AppendDataBoundItems="true" DataTextField="CtaCodigo" DataValueField="CveCuenta" Width="240px" ValidationGroup="GrpModulo"></asp:DropDownList> <asp:DropDownList ID="DdlCuenta" CssClass="form-control input-sm select2me js-cuenta-programmatic select2me" runat="server" AppendDataBoundItems="true" DataTextField="CtaCodigo" DataValueField="CveCuenta" Width="240px" ValidationGroup="GrpModulo"></asp:DropDownList>
<label for="<%= DdlCuenta.ClientID.ToString()%>">Cuenta Contable: </label> <label for="<%= DdlCuenta.ClientID.ToString()%>">Cuenta Contable: </label>
</div> </div>
<div class="form-group form-md-line-input input-iconright"> <div class="form-group form-md-line-input input-iconright" id="divIdCuenta" runat="server" visible="false">
<asp:TextBox ID="TxtIdCuentaContable" CssClass="form-control " runat="server" MaxLength="50" CausesValidation="true" style="width:100%"></asp:TextBox> <asp:TextBox ID="TxtIdCuentaContable" CssClass="form-control " runat="server" MaxLength="50" CausesValidation="true" style="width:100%"></asp:TextBox>
<asp:RequiredFieldValidator ID="RFVClave" runat="server" ControlToValidate="TxtIdCuentaContable" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>'¨IdCuentaContable''</b> es necesario, por favor ingréselo." ValidationGroup="GrpModulo"></asp:RequiredFieldValidator> <asp:RequiredFieldValidator ID="RFVClave" runat="server" ControlToValidate="TxtIdCuentaContable" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>'¨IdCuentaContable''</b> es necesario, por favor ingréselo." ValidationGroup="GrpModulo"></asp:RequiredFieldValidator>
<label for="<%= TxtIdCuentaContable.ClientID.ToString()%>">IdCuentaContable:</label> <label for="<%= TxtIdCuentaContable.ClientID.ToString()%>">IdCuentaContable:</label>
</div> </div>
<div class="form-group form-md-line-input input-iconright"> <div class="form-group form-md-line-input input-iconright" id="divProveedor" runat="server" visible="false">
<asp:DropDownList ID="DdlProveedor" CssClass="form-control input-sm select2me js-cuenta-programmatic select2me" runat="server" AppendDataBoundItems="true" DataTextField="RazonSocial" DataValueField="CveProveedor" Width="240px" ValidationGroup="GrpModulo"></asp:DropDownList> <asp:DropDownList ID="DdlProveedor" CssClass="form-control input-sm select2me js-cuenta-programmatic select2me" runat="server" AppendDataBoundItems="true" DataTextField="RazonSocial" DataValueField="CveProveedor" Width="240px" ValidationGroup="GrpModulo" Enabled="false"></asp:DropDownList>
<label for="<%= DdlProveedor.ClientID.ToString()%>">Proveedor: </label> <label for="<%= DdlProveedor.ClientID.ToString()%>">Proveedor: </label>
</div> </div>
<div class="form-group form-md-line-input input-iconright"> <div class="form-group form-md-line-input input-iconright" id="divCliente" runat="server" visible="false">
<label for="<%= DdlClientes.ClientID.ToString()%>">Cliente: </label><br /> <label for="<%= DdlClientes.ClientID.ToString()%>">Cliente: </label><br />
<ADS:Dropdownlost CssClassDdl="select2me" ID="DdlClientes" Width="90%" data-metodo="getcliente" runat="server" DataTextField="NombreComercial" DataValueField="CveCliente" CssStyle="width: 100%;"></ADS:Dropdownlost> <ADS:Dropdownlost CssClassDdl="select2me" ID="DdlClientes" Width="90%" data-metodo="getcliente" runat="server" DataTextField="NombreComercial" DataValueField="CveCliente" CssStyle="width: 100%;"></ADS:Dropdownlost>
</div> </div>
<div class="form-group form-md-line-input input-iconright"> <div class="form-group form-md-line-input input-iconright" id="divBancos" runat="server" visible="false">
<asp:DropDownList ID="DdlCuentaBancaria" CssClass="form-control input-sm select2me js-cuenta-programmatic select2me" runat="server" DataTextField="NumCuentaMoneda" DataValueField="CveCuenta" Width="240px" ValidationGroup="GrpModulo"></asp:DropDownList> <asp:DropDownList ID="DdlCuentaBancaria" CssClass="form-control input-sm select2me js-cuenta-programmatic select2me" runat="server" DataTextField="NumCuentaMoneda" DataValueField="CveCuenta" Width="240px" ValidationGroup="GrpModulo" Enabled="false"></asp:DropDownList>
<label for="<%= DdlCuentaBancaria.ClientID.ToString()%>">Cuenta Bancaria: </label> <label for="<%= DdlCuentaBancaria.ClientID.ToString()%>">Cuenta Bancaria: </label>
</div> </div>
</div> </div>
<div class="col-md-1" style="width:50%;text-align:left"> <div class="col-md-1" style="width:50%;text-align:left">
<div class="form-group form-md-line-input input-iconright"> <div class="form-group form-md-line-input input-iconright" id="divPersonal" runat="server" visible="false">
<label for="<%= DdlPersonal.ClientID.ToString()%>">Personal: </label><br /> <label for="<%= DdlPersonal.ClientID.ToString()%>">Personal: </label><br />
<ADS:Dropdownlost CssClassDdl="select2me" ID="DdlPersonal" Width="90%" data-metodo="getpersonal" runat="server" DataTextField="NombreCompleto" DataValueField="CvePersonal" CssStyle="width: 100%;"></ADS:Dropdownlost> <ADS:Dropdownlost CssClassDdl="select2me" ID="DdlPersonal" Width="90%" data-metodo="getpersonal" runat="server" DataTextField="NombreCompleto" DataValueField="CvePersonal" CssStyle="width: 100%;" Enabled="false"></ADS:Dropdownlost>
</div> </div>
<div class="form-group form-md-line-input input-iconright"> <div class="form-group form-md-line-input input-iconright" id="divClasificacion" runat="server" visible="false">
<asp:DropDownList ID="DdlClasificacion" CssClass="form-control input-sm select2me js-cuenta-programmatic select2me" runat="server" AppendDataBoundItems="true" DataTextField="Clasificacion" DataValueField="CveClasificacion" Width="240px" ValidationGroup="GrpModulo"></asp:DropDownList> <asp:DropDownList ID="DdlClasificacion" CssClass="form-control input-sm select2me js-cuenta-programmatic select2me" runat="server" AppendDataBoundItems="true" DataTextField="Clasificacion" DataValueField="CveClasificacion" Width="240px" ValidationGroup="GrpModulo" Enabled="false"></asp:DropDownList>
<label for="<%= DdlClasificacion.ClientID.ToString()%>">Clasificación: </label> <label for="<%= DdlClasificacion.ClientID.ToString()%>">Clasificación: </label>
</div> </div>
<div class="form-group form-md-line-input input-iconright"> <div class="form-group form-md-line-input input-iconright" id="divAlmacen" runat="server" visible="false">
<asp:DropDownList ID="DdlAlmacen" CssClass="form-control input-sm select2me js-cuenta-programmatic select2me" runat="server" AppendDataBoundItems="true" DataTextField="Almacen" DataValueField="CveAlmacen" Width="240px" ValidationGroup="GrpModulo"></asp:DropDownList> <asp:DropDownList ID="DdlAlmacen" CssClass="form-control input-sm select2me js-cuenta-programmatic select2me" runat="server" AppendDataBoundItems="true" DataTextField="Almacen" DataValueField="CveAlmacen" Width="240px" ValidationGroup="GrpModulo" Enabled="false"></asp:DropDownList>
<label for="<%= DdlAlmacen.ClientID.ToString()%>">Almacén: </label> <label for="<%= DdlAlmacen.ClientID.ToString()%>">Almacén: </label>
</div> </div>
<div class="form-group form-md-line-input input-iconright"> <div class="form-group form-md-line-input input-iconright" id="divPorcentajeIVA" runat="server" visible="false">
<asp:TextBox ID="TxtPorcentajeIVA" CssClass="form-control " runat="server" MaxLength="50" CausesValidation="true" style="width:100%"></asp:TextBox> <asp:TextBox ID="TxtPorcentajeIVA" CssClass="form-control " runat="server" MaxLength="50" CausesValidation="true" style="width:100%"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="TxtPorcentajeIVA" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>'¨PorcentajeIVA''</b> es necesario, por favor ingréselo." ValidationGroup="GrpModulo"></asp:RequiredFieldValidator> <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="TxtPorcentajeIVA" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>'¨PorcentajeIVA''</b> es necesario, por favor ingréselo." ValidationGroup="GrpModulo" Enabled="false"></asp:RequiredFieldValidator>
<label for="<%= TxtPorcentajeIVA.ClientID.ToString()%>">PorcentajeIVA:</label> <label for="<%= TxtPorcentajeIVA.ClientID.ToString()%>">PorcentajeIVA:</label>
</div> </div>
<div class="form-group form-md-line-input input-iconright"> <div class="form-group form-md-line-input input-iconright" id="divConceptoNomina" runat="server" visible="false">
<asp:DropDownList ID="DdlConceptoNomina" CssClass="form-control input-sm select2me js-cuenta-programmatic select2me" runat="server" AppendDataBoundItems="true" DataTextField="CodigoConcepto" DataValueField="CveConcepto" Width="240px" ValidationGroup="GrpModulo"></asp:DropDownList> <asp:DropDownList ID="DdlConceptoNomina" CssClass="form-control input-sm select2me js-cuenta-programmatic select2me" runat="server" AppendDataBoundItems="true" DataTextField="CodigoConcepto" DataValueField="CveConcepto" Width="240px" ValidationGroup="GrpModulo" Enabled="false"></asp:DropDownList>
<label for="<%= DdlConceptoNomina.ClientID.ToString()%>">Concepto nómina: </label> <label for="<%= DdlConceptoNomina.ClientID.ToString()%>">Concepto nómina: </label>
</div> </div>
<div class="form-group form-md-line-input input-iconright" id="divActivoFijo" runat="server" visible="false">
<asp:DropDownList ID="DdlActivoFijo" CssClass="form-control input-sm select2me js-cuenta-programmatic select2me" runat="server" AppendDataBoundItems="true" DataTextField="Descripcion" DataValueField="CveActivoFijo" Width="240px" ValidationGroup="GrpModulo" Enabled="false"></asp:DropDownList>
<label for="<%= DdlActivoFijo.ClientID.ToString()%>">Activo Fijo: </label>
</div>
</div> </div>
</div> </div>
</div> </div>

View File

@@ -15,10 +15,15 @@ Partial Class Contabilidad2_CatCuentasAsignaciones
End Property End Property
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
If Not Page.IsPostBack Then If Not Page.IsPostBack Then
CargaDatos()
CargaDatosModal() CargaDatosModal()
End If End If
End Sub
Protected Sub BtnConsultar_Click(sender As Object, e As System.EventArgs) Handles BtnConsultar.Click
CargaDatosSistema()
End Sub End Sub
Private Sub CargaDatos() Private Sub CargaDatos()
@@ -28,8 +33,19 @@ Partial Class Contabilidad2_CatCuentasAsignaciones
End If End If
ObjConta.Dispose() ObjConta.Dispose()
GvDatos.DataBind() GvDatos.DataBind()
End Sub
Private Sub CargaDatosSistema()
Dim ObjConta As New ClsContabilidad
If ObjConta.GetCuentasAsignacionesSistema(UsuarioActual.CveEmpresa, DdlTipo.selectedvalue.toentero) Then
GvDatos.DataSource = ObjConta.DtResultados
End If
ObjConta.Dispose()
GvDatos.DataBind()
UpDatos.Update()
End Sub End Sub
Private Sub CargaDatosModal() Private Sub CargaDatosModal()
DdlConceptoNomina.DataSource = GlobalDTNomConceptos(UsuarioActual.CveEmpresa) DdlConceptoNomina.DataSource = GlobalDTNomConceptos(UsuarioActual.CveEmpresa)
DdlConceptoNomina.DataBind() DdlConceptoNomina.DataBind()
@@ -53,7 +69,7 @@ Partial Class Contabilidad2_CatCuentasAsignaciones
DdlAlmacen.DataSource = GlobalDTAlmacen(UsuarioActual.CveEmpresa) DdlAlmacen.DataSource = GlobalDTAlmacen(UsuarioActual.CveEmpresa)
DdlActivoFijo.DataSource = GlobalDTActivoFijos(UsuarioActual.CveEmpresa)
Dim ObjBancos As New ClsBancos Dim ObjBancos As New ClsBancos
If ObjBancos.GetBancosCuentas(-1, CveEmpresa:=UsuarioActual.CveEmpresa) Then If ObjBancos.GetBancosCuentas(-1, CveEmpresa:=UsuarioActual.CveEmpresa) Then
@@ -79,46 +95,79 @@ Partial Class Contabilidad2_CatCuentasAsignaciones
End Sub End Sub
Protected Sub ActualizaModulo(sender As Object, e As EventArgs) Protected Sub ActualizaModulo(sender As Object, e As EventArgs)
LimpiarDatos() LimpiarDatos()
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow) Dim Dr As DataRow = GlobalDTContaConceptosContables(GvRow.DataKey("CveConceptoContable").ToEntero).FiltroPrimero("")
CveConceptoAsignacion = GvRow.DataKey("CveCuentaAsignacion").ToEntero Dim CveConceptoContable As Integer = GvRow.DataKey("CveConceptoContable").ToString.ToEntero
DdlCconceptosContables.SelectedValue = GvRow.DataKey("CveConceptoContable").ToEntero HdnCveCuentaAsignacion.Value = GvRow.DataKey("CveCuentaAsignacion").ToString
DdlCuenta.SelectedValue = GvRow.DataKey("CveCuenta").ToEntero
DdlConceptoNomina.SelectedValueExist(GvRow.DataKey("CveConceptoNomina").ToEntero) If Dr IsNot Nothing Then
DdlProveedor.SelectedValue = GvRow.DataKey("CveProveedor").ToEntero CveConceptoAsignacion = GvRow.DataKey("CveCuentaAsignacion").ToEntero
DdlClasificacion.SelectedValue = GvRow.DataKey("CveClasificacion").ToEntero DdlCconceptosContables.SelectedValueExist(GvRow.DataKey("CveConceptoContable"))
DdlAlmacen.SelectedValue = GvRow.DataKey("CveAlmacen").ToEntero DdlCuenta.SelectedValueExist(GvRow.DataKey("CveCuenta"))
TxtIdCuentaContable.Text = GvRow.DataKey("IdCuenta") DdlConceptoNomina.SelectedValueExist(GvRow.DataKey("CveConceptoNomina").ToEntero)
TxtPorcentajeIVA.Text = GvRow.DataKey("PorcentajeIVA") DdlProveedor.SelectedValueExist(GvRow.DataKey("CveProveedor"))
DdlCuentaBancaria.SelectedValueExist(GvRow.DataKey("CveBancoCuenta")) DdlClasificacion.SelectedValueExist(GvRow.DataKey("CveClasificacion"))
DdlAlmacen.SelectedValueExist(GvRow.DataKey("CveAlmacen"))
Dim CveCliente As Integer = GvRow.DataKey("CveCliente").ToEntero TxtIdCuentaContable.Text = GvRow.DataKey("IdCuenta")
Dim CvePersonal As Integer = GvRow.DataKey("CvePersonal").ToEntero TxtPorcentajeIVA.Text = GvRow.DataKey("PorcentajeIVA")
DdlCuentaBancaria.SelectedValueExist(GvRow.DataKey("CveBancoCuenta"))
If CveCliente > 0 Then
DdlClientes.setEsWebService(False) Dim CveCliente As Integer = GvRow.DataKey("CveCliente").ToEntero
Dim ObjCliente As New ClsClientes Dim CvePersonal As Integer = GvRow.DataKey("CvePersonal").ToEntero
If ObjCliente.GetClientes(-1, "-1", "-1", "-1", "-1", "-1", "-1", -1, UsuarioActual.CveEmpresa) Then
DdlClientes.ddl.DataSource = ObjCliente.DtResultados If Dr("AplicaCliente").ToString = "True" Then
End If divCliente.Visible = True
DdlClientes.ddl.DataBind() If CveCliente > 0 Then
DdlClientes.ddl.SelectedValue = CveCliente DdlClientes.setEsWebService(False)
End If Dim ObjCliente As New ClsClientes
If ObjCliente.GetClientes(-1, "-1", "-1", "-1", "-1", "-1", "-1", -1, UsuarioActual.CveEmpresa) Then
If CvePersonal > 0 Then DdlClientes.ddl.DataSource = ObjCliente.DtResultados
DdlPersonal.setEsWebService(False) End If
Dim ObjPersonal As New ClsRH DdlClientes.ddl.DataBind()
If ObjPersonal.GetPersonal(-1, "-1", "-1", "-1", "-1", -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, UsuarioActual.CveEmpresa) Then DdlClientes.ddl.SelectedValue = CveCliente
DdlPersonal.ddl.DataSource = ObjPersonal.DtResultados End If
End If End If
DdlPersonal.ddl.DataBind() If Dr("AplicaProveedor").ToString = "True" Then
DdlPersonal.ddl.SelectedValue = CvePersonal divProveedor.Visible = True
End If End If
LbAgregar.Text = "Actualizar" If Dr("AplicaPersonal").ToString = "True" Then
UpModalModulos.Update() divPersonal.Visible = True
RegistraScript("$('#ModalCat').modal();") If CvePersonal > 0 Then
DdlPersonal.setEsWebService(False)
Dim ObjPersonal As New ClsRH
If ObjPersonal.GetPersonal(-1, "-1", "-1", "-1", "-1", -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, UsuarioActual.CveEmpresa) Then
DdlPersonal.ddl.DataSource = ObjPersonal.DtResultados
End If
DdlPersonal.ddl.DataBind()
DdlPersonal.ddl.SelectedValueExist(CvePersonal)
End If
End If
If Dr("AplicaClasificacion").ToString = "True" Then
divClasificacion.Visible = True
End If
If Dr("AplicaBancos").ToString = "True" Then
divBancos.Visible = True
End If
If Dr("AplicaAlmacen").ToString = "True" Then
divAlmacen.Visible = True
End If
If Dr("AplicaActivoFijo").ToString = "True" Then
divActivoFijo.Visible = True
End If
LbAgregar.Text = "Actualizar"
UpModalModulos.Update()
RegistraScript("$('#ModalCat').modal();")
End If
End Sub End Sub
Protected Sub EliminarRow(sender As Object, e As EventArgs) Protected Sub EliminarRow(sender As Object, e As EventArgs)
@@ -127,7 +176,7 @@ Partial Class Contabilidad2_CatCuentasAsignaciones
If ObjConta.RemoveCuentasAsignaciones(GvRow.DataKey("CveCuentaAsignacion").ToEntero) Then If ObjConta.RemoveCuentasAsignaciones(GvRow.DataKey("CveCuentaAsignacion").ToEntero) Then
Alert("se elimino correctamente") Alert("se elimino correctamente")
End If End If
CargaDatos() CargaDatosSistema()
UpDatos.Update() UpDatos.Update()
ObjConta.Dispose() ObjConta.Dispose()
End Sub End Sub
@@ -162,13 +211,13 @@ Partial Class Contabilidad2_CatCuentasAsignaciones
Protected Sub LbAgregar_Click(sender As Object, e As EventArgs) Handles LbAgregar.Click Protected Sub LbAgregar_Click(sender As Object, e As EventArgs) Handles LbAgregar.Click
Dim ObjConta As New ClsContabilidad Dim ObjConta As New ClsContabilidad
Dim ErrorString As String = "" Dim ErrorString As String = ""
If LbAgregar.Text = "Agregar" Then If HdnCveCuentaAsignacion.Value.ToEntero <= 0 Then
If Not ObjConta.AddCuentasAsignaciones(DdlCconceptosContables.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, DdlCuenta.SelectedValue.ToEntero, TxtIdCuentaContable.Text.ToEntero, If Not ObjConta.AddCuentasAsignaciones(DdlCconceptosContables.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, DdlCuenta.SelectedValue.ToEntero, TxtIdCuentaContable.Text.ToEntero,
DdlProveedor.SelectedValue.ToEntero, DdlClientes.SelectedValue.ToEntero, DdlPersonal.SelectedValue.ToEntero, DdlProveedor.SelectedValue.ToEntero, DdlClientes.SelectedValue.ToEntero, DdlPersonal.SelectedValue.ToEntero,
DdlClasificacion.SelectedValue.ToEntero, DdlAlmacen.SelectedValue.ToEntero, TxtPorcentajeIVA.Text.ToDecimal, CveBancoCuenta:=DdlCuentaBancaria.SelectedValue.ToEntero(), CveConceptoNomina:=DdlConceptoNomina.SelectedValue.ToEntero()) Then DdlClasificacion.SelectedValue.ToEntero, DdlAlmacen.SelectedValue.ToEntero, TxtPorcentajeIVA.Text.ToDecimal, CveBancoCuenta:=DdlCuentaBancaria.SelectedValue.ToEntero(), CveConceptoNomina:=DdlConceptoNomina.SelectedValue.ToEntero()) Then
ErrorString = "Error al agregar" ErrorString = "Error al agregar"
End If End If
ElseIf LbAgregar.Text = "Actualizar" Then ElseIf HdnCveCuentaAsignacion.Value.ToEntero > 0 Then
If Not ObjConta.UpdateCuentasAsignaciones(CveConceptoAsignacion, DdlCconceptosContables.SelectedValue.ToEntero, DdlCuenta.SelectedValue.ToEntero, TxtIdCuentaContable.Text.ToEntero, If Not ObjConta.UpdateCuentasAsignaciones(CveConceptoAsignacion, DdlCconceptosContables.SelectedValue.ToEntero, DdlCuenta.SelectedValue.ToEntero, TxtIdCuentaContable.Text.ToEntero,
DdlProveedor.SelectedValue.ToEntero, DdlClientes.SelectedValue.ToEntero, DdlPersonal.SelectedValue.ToEntero, DdlProveedor.SelectedValue.ToEntero, DdlClientes.SelectedValue.ToEntero, DdlPersonal.SelectedValue.ToEntero,
DdlClasificacion.SelectedValue.ToEntero, DdlAlmacen.SelectedValue.ToEntero, TxtPorcentajeIVA.Text.ToDecimal, CveBancoCuenta:=DdlCuentaBancaria.SelectedValue.ToEntero(), CveConceptoNomina:=DdlConceptoNomina.SelectedValue.ToEntero()) Then DdlClasificacion.SelectedValue.ToEntero, DdlAlmacen.SelectedValue.ToEntero, TxtPorcentajeIVA.Text.ToDecimal, CveBancoCuenta:=DdlCuentaBancaria.SelectedValue.ToEntero(), CveConceptoNomina:=DdlConceptoNomina.SelectedValue.ToEntero()) Then
@@ -183,7 +232,7 @@ Partial Class Contabilidad2_CatCuentasAsignaciones
Else Else
Alert("Agregado correctamente") Alert("Agregado correctamente")
End If End If
CargaDatos() CargaDatosSistema()
UpDatos.Update() UpDatos.Update()
End Sub End Sub
End Class End Class

View File

@@ -2,11 +2,7 @@
'Option Strict On 'Option Strict On
Imports System.Data Imports System.Data
Imports AspMap
Imports System.Drawing
Imports Extensiones Imports Extensiones
Imports System.IO
Imports AspMap.Web
Partial Class SCT_RepLicencias Partial Class SCT_RepLicencias
Inherits ClsPaginas Inherits ClsPaginas

View File

@@ -4756,7 +4756,7 @@ Partial Class Sistemas_UsuarioDetalle
Private Sub CargaGvBitacora() Private Sub CargaGvBitacora()
If CveUsuario > 0 Then If CveUsuario > 0 Then
Dim ObjGral As New ClsGenerales() Dim ObjGral As New ClsGenerales()
If ObjGral.GetHistorialBitacora(-1, -1, -1, -1, -1, -1, -1, UsuarioActual.CveEmpresa, CveUsuario:=CveUsuario) Then If ObjGral.GetHistorialBitacora(-1, -1, -1, -1, -1, -1, -1, -1, CveUsuario:=CveUsuario) Then ' UsuarioActual.CveEmpresa, se manda empresa -1
GvBitacoraHistorial.DataSource = ObjGral.DtResultados GvBitacoraHistorial.DataSource = ObjGral.DtResultados
ObjGral.Dispose() ObjGral.Dispose()
End If End If

View File

@@ -882,7 +882,7 @@
<div class="row" style="margin-top: 5px;" runat="server" id="DivTiempoCaducidad" visible="false"> <div class="row" style="margin-top: 5px;" runat="server" id="DivTiempoCaducidad" visible="false">
<label class="col-md-6 truncate">Tiempo de Caducidad</label> <label class="col-md-6 truncate">Tiempo de Caducidad</label>
<div class="col-md-6"> <div class="col-md-6">
<asp:TextBox runat="server" ID="TxtTiempoCaducidad" Width="75px"/><label>Días</label> <asp:TextBox runat="server" ID="TxtTiempoCaducidad" Width="75px" MaxLength="4"/><label>Días</label>
<asp:RegularExpressionValidator ID="RfvTxtTiempoCaducidad" runat="server" ControlToValidate="TxtTiempoCaducidad" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tiempo Caducidad''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar" ValidationExpression="\d{1,}" Display="None"></asp:RegularExpressionValidator> <asp:RegularExpressionValidator ID="RfvTxtTiempoCaducidad" runat="server" ControlToValidate="TxtTiempoCaducidad" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tiempo Caducidad''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar" ValidationExpression="\d{1,}" Display="None"></asp:RegularExpressionValidator>
<ajax:ValidatorCalloutExtender ID="VceTxtTiempoCaducidad" runat="server" HighlightCssClass="vco" TargetControlID="RfvTxtTiempoCaducidad" Width="300px" ></ajax:ValidatorCalloutExtender> <ajax:ValidatorCalloutExtender ID="VceTxtTiempoCaducidad" runat="server" HighlightCssClass="vco" TargetControlID="RfvTxtTiempoCaducidad" Width="300px" ></ajax:ValidatorCalloutExtender>
</div> </div>

View File

@@ -55,7 +55,7 @@ public partial class Ventas_RepConciliacionSat : ClsPaginas
RfechaF = txtFechaF.Text.Length > 0 ? txtFechaF.Text.ToDateTime().ToString("yyyy/MM/dd") : ""; RfechaF = txtFechaF.Text.Length > 0 ? txtFechaF.Text.ToDateTime().ToString("yyyy/MM/dd") : "";
using (ClsGenerales ObjRepC = new ClsGenerales()) using (ClsGenerales ObjRepC = new ClsGenerales())
{ {
ObjRepC.RepConciliacionSatGET(UsuarioActual.CveEmpresa, RtipoDocto, RfechaI, RfechaF); ObjRepC.RepConciliacionSATGet(UsuarioActual.CveEmpresa, RtipoDocto, RfechaI, RfechaF);
GVRepConciliacionSatGET.DataSource = ObjRepC.DtResultados; GVRepConciliacionSatGET.DataSource = ObjRepC.DtResultados;
ObjRepC.Dispose(); ObjRepC.Dispose();

View File

@@ -1548,7 +1548,7 @@ Public Class WSSIGApp
#Region "P R O D U C T O S - S E R V I C I O S" #Region "P R O D U C T O S - S E R V I C I O S"
<WebMethod> <WebMethod>
Public Function AddPS(parametros As String) As Boolean Public Function AddPS(parametros As String) As Boolean
'Dim TieneError As Boolean = False Dim TieneError As Boolean = False
'Dim ObjPS As New ClsProductosServicios 'Dim ObjPS As New ClsProductosServicios
'ObjPS.IniciaTransacSQL() 'ObjPS.IniciaTransacSQL()
'Try 'Try
@@ -1571,7 +1571,7 @@ Public Class WSSIGApp
' End If ' End If
' ObjPS.Dispose() ' ObjPS.Dispose()
'End Try 'End Try
'Return Not TieneError Return Not TieneError
End Function End Function
<WebMethod()> <WebMethod()>
Public Function GetPS(CveEmpresa As Integer) As String Public Function GetPS(CveEmpresa As Integer) As String
@@ -1598,7 +1598,7 @@ Public Class WSSIGApp
End Function End Function
<WebMethod> <WebMethod>
Public Function AddClasificaciones(parametros As String) As Boolean Public Function AddClasificaciones(parametros As String) As Boolean
'Dim TieneError As Boolean = False Dim TieneError As Boolean = False
'Dim ObjClasi As New ClsClasificaciones 'Dim ObjClasi As New ClsClasificaciones
'ObjClasi.IniciaTransacSQL() 'ObjClasi.IniciaTransacSQL()
'Try 'Try
@@ -1620,7 +1620,7 @@ Public Class WSSIGApp
' End If ' End If
' ObjClasi.Dispose() ' ObjClasi.Dispose()
'End Try 'End Try
'Return Not TieneError Return Not TieneError
End Function End Function
<WebMethod()> <WebMethod()>
Public Function GetRepPS(params As String) As String Public Function GetRepPS(params As String) As String