Merge branch 'master' of http://rpimienta@192.168.10.111:8383/SIG.git
This commit is contained in:
@@ -27,7 +27,7 @@
|
||||
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvChofer.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvChofer.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
</div>
|
||||
<asp:GridView ID="GvChofer" runat="server" GridLines="None" data-sort="true" DataKeyNames="CveChofer,Chofer,Estatus,FechaIng,CveUsuario,CveEmpresa,Usuario,CveTransportista" CssClass="table table-striped table-advance table-hover Widthall ScrollAD mysmallbtn" CellSpacing="0" Width="100%" AutoGenerateColumns="False" EmptyDataText="No se encontraron registros" ToolTip="Listado de Choferes">
|
||||
<asp:GridView ID="GvChofer" runat="server" GridLines="None" data-sort="true" DataKeyNames="CveChofer,Chofer,Estatus,FechaIng,CveUsuario,CveEmpresa,Usuario,CveTransportista,Identificacion,Domicilio,Telefono,Ciudad,Licencia" CssClass="table table-striped table-advance table-hover Widthall ScrollAD mysmallbtn" CellSpacing="0" Width="100%" AutoGenerateColumns="False" EmptyDataText="No se encontraron registros" ToolTip="Listado de Choferes">
|
||||
<Columns>
|
||||
<asp:BoundField DataField="Chofer" HeaderText="Chofer" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField DataField="Transportista" HeaderText="Transportista" ItemStyle-HorizontalAlign="Left" />
|
||||
@@ -69,10 +69,43 @@
|
||||
<asp:RequiredFieldValidator ID="RFVChofer" runat="server" CssClass="help-block errorimput" ControlToValidate="TxtChofer" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Chofer''</b> es necesario, por favor ingréselo." ValidationGroup="GrpObligatorio"></asp:RequiredFieldValidator>
|
||||
<label for="<%= TxtChofer.ClientID.ToString()%>">Chofer:</label>
|
||||
</div>
|
||||
<br />
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlTransportista" DataValueField="CveTransportista" DataTextField="Transportista" runat="server" CssClass="form-control select2me" AppendDataBoundItems="true" Width="200px"></asp:DropDownList>
|
||||
<label for="<%= DdlTransportista.ClientID.ToString()%>">Transportista:</label>
|
||||
</div>
|
||||
<br />
|
||||
<div class="form-group form-md-line-input input-iconright" style="width:150px;">
|
||||
<asp:TextBox ID="TxtIdentificacion" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="50"></asp:TextBox>
|
||||
<%--<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" CssClass="help-block errorimput" ControlToValidate="TxtIdentificacion" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Identificación''</b> es necesario, por favor ingréselo." ValidationGroup="GrpObligatorio"></asp:RequiredFieldValidator>--%>
|
||||
<label for="<%= TxtIdentificacion.ClientID.ToString()%>">Identificación:</label>
|
||||
</div>
|
||||
<br />
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtDomicilio" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="50"></asp:TextBox>
|
||||
<%--<asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" CssClass="help-block errorimput" ControlToValidate="TxtDomicilio" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Domicilio''</b> es necesario, por favor ingréselo." ValidationGroup="GrpObligatorio"></asp:RequiredFieldValidator>--%>
|
||||
<label for="<%= TxtDomicilio.ClientID.ToString()%>">Domicilio:</label>
|
||||
</div>
|
||||
<br />
|
||||
<div class="form-group form-md-line-input input-iconright" style="width:150px;">
|
||||
<asp:TextBox ID="TxtTelefono" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||
<ajax:FilteredTextBoxExtender ID="FTETelefono" runat="server" TargetControlID="TxtTelefono" FilterType="Custom, Numbers" />
|
||||
<%--<asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" CssClass="help-block errorimput" ControlToValidate="TxtTelefono" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Teléfono''</b> es necesario, por favor ingréselo." ValidationGroup="GrpObligatorio"></asp:RequiredFieldValidator>--%>
|
||||
<label for="<%= TxtTelefono.ClientID.ToString()%>">Teléfono:</label>
|
||||
</div>
|
||||
<br />
|
||||
<div class="form-group form-md-line-input input-iconright" style="width:150px;">
|
||||
<asp:TextBox ID="TxtCiudad" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="50"></asp:TextBox>
|
||||
<%--<asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" CssClass="help-block errorimput" ControlToValidate="TxtCiudad" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Ciudad''</b> es necesario, por favor ingréselo." ValidationGroup="GrpObligatorio"></asp:RequiredFieldValidator>--%>
|
||||
<label for="<%= TxtCiudad.ClientID.ToString()%>">Ciudad:</label>
|
||||
</div>
|
||||
<br />
|
||||
<div class="form-group form-md-line-input input-iconright" style="width:150px;">
|
||||
<asp:TextBox ID="TxtLicencia" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="50"></asp:TextBox>
|
||||
<%--<asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" CssClass="help-block errorimput" ControlToValidate="TxtLicencia" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Licencia''</b> es necesario, por favor ingréselo." ValidationGroup="GrpObligatorio"></asp:RequiredFieldValidator>--%>
|
||||
<label for="<%= TxtLicencia.ClientID.ToString()%>">Licencia:</label>
|
||||
</div>
|
||||
<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>
|
||||
|
||||
@@ -47,12 +47,12 @@ Partial Class Acarreos_CatChoferes
|
||||
Dim Estatus = 0
|
||||
If ChkEstatus.Checked Then Estatus = 1
|
||||
If HdnModalidad.Value = "A" Then
|
||||
If ObjAcar.AddChofer(TxtChofer.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, DdlTransportista.SelectedValue) Then
|
||||
If ObjAcar.AddChofer(TxtChofer.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, DdlTransportista.SelectedValue, TxtIdentificacion.Text.Trim, TxtDomicilio.Text.Trim, TxtTelefono.Text.Trim, TxtCiudad.Text.Trim, TxtLicencia.Text.Trim) Then
|
||||
CargaDatos()
|
||||
Alert("Agregado Correctamente.", TipoMensaje.MsgInformacion)
|
||||
End If
|
||||
ElseIf HdnModalidad.Value = "U" Then
|
||||
If ObjAcar.UpdateChofer(HdnID.Value, TxtChofer.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, Estatus, DdlTransportista.SelectedValue) Then
|
||||
If ObjAcar.UpdateChofer(HdnID.Value, TxtChofer.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, Estatus, DdlTransportista.SelectedValue, TxtIdentificacion.Text.Trim, TxtDomicilio.Text.Trim, TxtTelefono.Text.Trim, TxtCiudad.Text.Trim, TxtLicencia.Text.Trim) Then
|
||||
CargaDatos()
|
||||
Alert("Actualizado Correctamente.", TipoMensaje.MsgInformacion)
|
||||
End If
|
||||
@@ -71,6 +71,11 @@ Partial Class Acarreos_CatChoferes
|
||||
BtnAgregarChofer.Text = "Actualizar"
|
||||
myModalLabel.InnerText = "Actualizar Chofer"
|
||||
TxtChofer.Text = GvRow.DataKey("Chofer")
|
||||
TxtIdentificacion.Text = GvRow.DataKey("Identificacion")
|
||||
TxtDomicilio.Text = GvRow.DataKey("Domicilio")
|
||||
TxtTelefono.Text = GvRow.DataKey("Telefono")
|
||||
TxtCiudad.Text = GvRow.DataKey("Ciudad")
|
||||
TxtLicencia.Text = GvRow.DataKey("Licencia")
|
||||
DdlTransportista.SelectedValueExist(GvRow.DataKey("CveTransportista"))
|
||||
divEstatus.Visible = True
|
||||
ChkEstatus.Checked = CBool(GvRow.DataKey("Estatus"))
|
||||
@@ -84,6 +89,11 @@ Partial Class Acarreos_CatChoferes
|
||||
BtnAgregarChofer.Text = "Agregar"
|
||||
myModalLabel.InnerText = "Agregar Chofer"
|
||||
TxtChofer.Text = ""
|
||||
TxtIdentificacion.Text = ""
|
||||
TxtDomicilio.Text = ""
|
||||
TxtTelefono.Text = ""
|
||||
TxtCiudad.Text = ""
|
||||
TxtLicencia.Text = ""
|
||||
ChkEstatus.Checked = True
|
||||
divEstatus.Visible = False
|
||||
UpAddChofer.Update()
|
||||
|
||||
@@ -109,7 +109,7 @@ Public Class ClsAcarreos
|
||||
|
||||
|
||||
#Region "Choferes"
|
||||
Public Function AddChofer(Chofer As String, CveUsuario As Integer, CveEmpresa As Integer, CveTransportista As Integer) As Boolean
|
||||
Public Function AddChofer(Chofer As String, CveUsuario As Integer, CveEmpresa As Integer, CveTransportista As Integer, Identificacion As String, Domicilio As String, Telefono As String, Ciudad As String, Licencia As String) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Acar_ChoferesAdd")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
@@ -117,6 +117,11 @@ Public Class ClsAcarreos
|
||||
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
.Add("@CveTransportista", SqlDbType.Int).Value = CveTransportista
|
||||
.Add("@Identificacion", SqlDbType.VarChar).Value = Identificacion
|
||||
.Add("@Domicilio", SqlDbType.VarChar).Value = Domicilio
|
||||
.Add("@Telefono", SqlDbType.VarChar).Value = Telefono
|
||||
.Add("@Ciudad", SqlDbType.VarChar).Value = Ciudad
|
||||
.Add("@Licencia", SqlDbType.VarChar).Value = Licencia
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
@@ -128,7 +133,7 @@ Public Class ClsAcarreos
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function UpdateChofer(CveChofer As Integer, Chofer As String, CveUsuario As Integer, CveEmpresa As Integer, Estatus As Integer, CveTransportista As Integer) As Boolean
|
||||
Public Function UpdateChofer(CveChofer As Integer, Chofer As String, CveUsuario As Integer, CveEmpresa As Integer, Estatus As Integer, CveTransportista As Integer, Identificacion As String, Domicilio As String, Telefono As String, Ciudad As String, Licencia As String) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Acar_ChoferesUpdate")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
@@ -138,7 +143,11 @@ Public Class ClsAcarreos
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
.Add("@Estatus", SqlDbType.Int).Value = Estatus
|
||||
.Add("@CveTransportista", SqlDbType.Int).Value = CveTransportista
|
||||
|
||||
.Add("@Identificacion", SqlDbType.VarChar).Value = Identificacion
|
||||
.Add("@Domicilio", SqlDbType.VarChar).Value = Domicilio
|
||||
.Add("@Telefono", SqlDbType.VarChar).Value = Telefono
|
||||
.Add("@Ciudad", SqlDbType.VarChar).Value = Ciudad
|
||||
.Add("@Licencia", SqlDbType.VarChar).Value = Licencia
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
|
||||
@@ -771,10 +771,14 @@ Public Class ClsNominas
|
||||
|
||||
#Region "ClsNominasConceptos"
|
||||
|
||||
Public Function GetNom_Refencias() As Boolean
|
||||
Public Function GetNom_Refencias(CveEmpresa As Integer) As Boolean
|
||||
Dim retorno As Boolean = False
|
||||
DataAdapter("SELECT CveNomReferencia,CveNomReferenciaPadre,Nivel,Texto,Campo,Tipo,IIF(EsUltimo=0,0,1) EsUltimo FROM [dbo].[Nom_Referencia] WHERE Estatus =1 ORDER BY Nivel ASC,CveNomReferencia ", CommandType.Text)
|
||||
'DataAdapter("SELECT CveNomReferencia,CveNomReferenciaPadre,Nivel,Texto,Campo,Tipo,IIF(EsUltimo=0,0,1) EsUltimo FROM [dbo].[Nom_Referencia] WHERE Estatus =1 ORDER BY Nivel ASC,CveNomReferencia ", CommandType.Text)
|
||||
DataAdapter("PA_NOM_REFConceptosGET")
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
retorno = True
|
||||
@@ -806,7 +810,9 @@ Public Class ClsNominas
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function AddConcepto(Codigo As String, Concepto As String, Tipo As String, Formula As String, Sistema As Boolean, Estado As Boolean, CveConceptoPadre As Integer, CveUsuario As Integer, CveEmpresa As Integer, EsRetencion As Boolean, CveClasificacion As Integer, IdCtaContable As Integer, CveTipoGasto As Integer, TipoCalculo As Boolean, CveConceptoContable As Integer) As Integer
|
||||
Public Function AddConcepto(Codigo As String, Concepto As String, Tipo As String, Formula As String, Sistema As Boolean, Estado As Boolean, CveConceptoPadre As Integer, CveUsuario As Integer, CveEmpresa As Integer,
|
||||
EsRetencion As Boolean, CveClasificacion As Integer, IdCtaContable As Integer, CveTipoGasto As Integer, TipoCalculo As Boolean, CveConceptoContable As Integer,
|
||||
AplicaFiniquito As Integer, AutomaticoGlobal As Integer, Especie As Integer, Imprimir As Integer) As Integer
|
||||
Dim Retorno As Integer = -1
|
||||
|
||||
DataAdapter("PA_Nom_ConceptosAdd")
|
||||
@@ -828,6 +834,10 @@ Public Class ClsNominas
|
||||
.Add("TipoCalculo", SqlDbType.Bit).Value = TipoCalculo
|
||||
.Add("@RETURN_VALUE", SqlDbType.Int).Direction = ParameterDirection.ReturnValue
|
||||
.Add("CveConceptoContable", SqlDbType.Int).Value = CveConceptoContable
|
||||
.Add("AplicaFiniquito", SqlDbType.Bit).Value = AplicaFiniquito
|
||||
.Add("AutomaticoGlobal", SqlDbType.Bit).Value = AutomaticoGlobal
|
||||
.Add("Especie", SqlDbType.Bit).Value = Especie
|
||||
.Add("Imprimir", SqlDbType.Bit).Value = Imprimir
|
||||
End With
|
||||
|
||||
Try
|
||||
@@ -846,7 +856,9 @@ Public Class ClsNominas
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function UpdateConcepto(Codigo As String, Concepto As String, Tipo As String, Formula As String, Sistema As Boolean, Estado As Boolean, CveConceptoPadre As Integer, CveConcepto As Integer, EsRetencion As Boolean, CveClasificacion As Integer, IdCtaContable As Integer, CveTipoGasto As Integer, TipoCalculo As Boolean, CveConceptoContable As Integer) As Boolean
|
||||
Public Function UpdateConcepto(Codigo As String, Concepto As String, Tipo As String, Formula As String, Sistema As Boolean, Estado As Boolean, CveConceptoPadre As Integer, CveConcepto As Integer,
|
||||
EsRetencion As Boolean, CveClasificacion As Integer, IdCtaContable As Integer, CveTipoGasto As Integer, TipoCalculo As Boolean, CveConceptoContable As Integer,
|
||||
AplicaFiniquito As Integer, AutomaticoGlobal As Integer, Especie As Integer, Imprimir As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_Nom_ConceptosUpdate")
|
||||
@@ -866,6 +878,10 @@ Public Class ClsNominas
|
||||
.Add("CveTipoGasto", SqlDbType.Int).Value = CveTipoGasto
|
||||
.Add("TipoCalculo", SqlDbType.Bit).Value = TipoCalculo
|
||||
.Add("CveConceptoContable", SqlDbType.Int).Value = CveConceptoContable
|
||||
.Add("AplicaFiniquito", SqlDbType.Bit).Value = AplicaFiniquito
|
||||
.Add("AutomaticoGlobal", SqlDbType.Bit).Value = AutomaticoGlobal
|
||||
.Add("Especie", SqlDbType.Bit).Value = Especie
|
||||
.Add("Imprimir", SqlDbType.Bit).Value = Imprimir
|
||||
End With
|
||||
|
||||
Try
|
||||
@@ -884,6 +900,28 @@ Public Class ClsNominas
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function UpdateConceptoFormula(CveConcepto As Integer, Formula As String, TipoFormula As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Nom_ConceptosFormulaUpdate")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("CveConcepto", SqlDbType.Int).Value = CveConcepto
|
||||
.Add("Formula", SqlDbType.VarChar).Value = Formula
|
||||
.Add("TipoFormula", SqlDbType.Int).Value = TipoFormula
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch Ex1 As SqlException
|
||||
If Ex1.Message.Contains("Número: 2627;") Then
|
||||
Alert("Ya existe un Concepto de Nomina con el mismo nombre: " & Codigo & ".", TipoMensaje.MsgAdvertencia)
|
||||
Else
|
||||
Me.OnError("Ocurrió un error el Concepto de Nomina", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End If
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al guardar los cambios en el Concepto de Nomina.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End Try
|
||||
Return Retorno
|
||||
End Function
|
||||
Public Function RemoveConcepto(CveConcepto As Integer, CveEmpresa As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
@@ -1805,6 +1843,7 @@ Public Class ClsNominas
|
||||
Public Function GetNominaEmpleado(CveProyecto As Integer, CveSubProyecto As Integer, CveTurno As Integer, CvePeriodo As Integer, CveEmpresa As Integer, Agrupador As Integer) As Boolean
|
||||
Dim retorno As Boolean = False
|
||||
Try
|
||||
DTSet = New DataSet()
|
||||
DataAdapter("PA_Nom_NominaEmpleado", CommandType.StoredProcedure)
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveProyecto", SqlDbType.Int).Value = CveProyecto
|
||||
|
||||
@@ -1574,16 +1574,16 @@ Public Class ClsOS
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
Public Function RemoveEstatusUsuarios(CveEstatusUsuarios As Integer) As Boolean
|
||||
Public Function RemoveEstatusUsuarios(CveEstatus As Integer, CveUsuario As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_OS_EstatusUsuariosRemove")
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
SqlAdapter.SelectCommand.Parameters.Add("@CveEstatusUsuario", SqlDbType.Int).Value = CveEstatusUsuarios
|
||||
.Add("@CveEstatusOrdenServicio", SqlDbType.Int).Value = CveEstatus
|
||||
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||
End With
|
||||
|
||||
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
|
||||
@@ -667,7 +667,7 @@ Public Class ClsVentas
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
Public Function UpdateCancelaVenta(CveVenta As Integer, FechaCancelacion As DateTime, SelloCancelacionSAT As String, CveEmpresa As Integer, Optional CvePAC As Integer = -1) As Boolean
|
||||
Public Function UpdateCancelaVenta(CveVenta As Integer, FechaCancelacion As DateTime, SelloCancelacionSAT As String, CveEmpresa As Integer, Optional CvePAC As Integer = -1, Optional CveEstatusRefacturacion As Integer = 0) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_Vta_VentasCancelacion")
|
||||
@@ -678,6 +678,7 @@ Public Class ClsVentas
|
||||
.Add("@SelloDigitalSAT", SqlDbType.VarChar).Value = SelloCancelacionSAT
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
.Add("@CvePAC", SqlDbType.SmallInt).Value = CvePAC
|
||||
.Add("@CveEstatusRefacturacion", SqlDbType.TinyInt).Value = CveEstatusRefacturacion
|
||||
End With
|
||||
|
||||
Try
|
||||
|
||||
@@ -2171,7 +2171,7 @@ Namespace Modelos
|
||||
|
||||
If ObjConta.ValidacionPrePolizaCuadre(ObjFactura.CvePrePoliza, 5) Then
|
||||
If ObjConta.ValorPolizaDescuadre > 0 Then
|
||||
'ErrorPrepoliza = True
|
||||
ErrorPrepoliza = True
|
||||
GuardaLogAD($"Ventas/Ventas-ProcesoPrePolizas | Error:{ObjConta.MensajePolizaDescuadre} Diferencia:{ObjConta.ValorDiferencia} | CvePrePoliza:{ObjFactura.CvePrePoliza}", "LogPrePolizas")
|
||||
|
||||
'SIRVE PARA VER LA PREPOLIZA QUE SE VALIDA
|
||||
@@ -2251,7 +2251,7 @@ Namespace Modelos
|
||||
|
||||
If ObjConta.ValidacionPrePolizaCuadre(ObjFactura.CvePrePoliza, 5) Then
|
||||
If ObjConta.ValorPolizaDescuadre > 0 Then
|
||||
'ErrorPrepoliza = True
|
||||
ErrorPrepoliza = True
|
||||
GuardaLogAD($"Ventas/Ventas-ProcesoPrePolizas | Error:{ObjConta.MensajePolizaDescuadre} Diferencia:{ObjConta.ValorDiferencia} | CvePrePoliza:{ObjFactura.CvePrePoliza}", "LogPrePolizas")
|
||||
End If
|
||||
End If
|
||||
@@ -4297,7 +4297,7 @@ Namespace Modelos
|
||||
End Select
|
||||
|
||||
If CveEstatus.Contiene(4, 5) Then
|
||||
If Not ObjVentas.UpdateCancelaVenta(CveVenta, CancelacionFecha, CancelacionAcuse, UsuarioActual.CveEmpresa, CvePACCancelacion) Then
|
||||
If Not ObjVentas.UpdateCancelaVenta(CveVenta, CancelacionFecha, CancelacionAcuse, UsuarioActual.CveEmpresa, CvePACCancelacion, CveEstatusRefacturacion) Then
|
||||
ErrorCancelar = True
|
||||
MensajeError = "Ocurrió un error al guardar el estatus de cancelación."
|
||||
End If
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
210
Global.asax
210
Global.asax
@@ -601,112 +601,112 @@
|
||||
End If
|
||||
End If
|
||||
|
||||
ObjGPS.Dispose()
|
||||
|
||||
If EsProduccion = "1" Then
|
||||
RegisterNotification()
|
||||
End If
|
||||
'-----------------
|
||||
AspMap.License.SetLicenseKey("ccfecfcegknepnhmjighpjjpmpmbajfejhnladegmeanci")
|
||||
|
||||
|
||||
GlobalConfiguration.Configure(AddressOf WebApiConfig.Register)
|
||||
GlobalConfiguration.Configuration.EnsureInitialized()
|
||||
End Sub
|
||||
|
||||
Sub Application_End(sender As Object, e As EventArgs)
|
||||
If EsProduccion = "1" Then
|
||||
SqlDependency.Stop(ConfigurationManager.ConnectionStrings("Conexion").ConnectionString)
|
||||
End If
|
||||
' Code that runs on application shutdown
|
||||
End Sub
|
||||
|
||||
Sub Application_Error(sender As Object, e As EventArgs)
|
||||
' Code that runs when an unhandled error occurs
|
||||
Dim CveUsuario As String = ""
|
||||
Dim Nombre As String = ""
|
||||
Try
|
||||
Dim user As Usuario = ADSSessionConfig.sessionUser
|
||||
If Not IsNothing(user) Then
|
||||
CveUsuario = user.CveUsuario.ToString()
|
||||
Nombre = user.Nombre
|
||||
End If
|
||||
Catch ex As Exception
|
||||
Usuario.CerrarSession()
|
||||
End Try
|
||||
Dim InfoAdicional As String = vbCrLf & "CveUsuario: " & CveUsuario & "; Nombre: " & Nombre & vbCrLf & "Ruta: " & Context.Request.RawUrl & " "
|
||||
OnError("Ocurrió un error en la página.", Context.Error, InfoAdicional)
|
||||
End Sub
|
||||
|
||||
Sub Session_Start(sender As Object, e As EventArgs)
|
||||
|
||||
' Code that runs when a new session is started
|
||||
'Dim sessionData As Dictionary(Of String, HttpSessionState) = DirectCast(Application("s"), Dictionary(Of String, HttpSessionState))
|
||||
|
||||
'If sessionData.Keys.Contains(HttpContext.Current.Session.SessionID) Then
|
||||
' sessionData.Remove(HttpContext.Current.Session.SessionID)
|
||||
' sessionData.Add(HttpContext.Current.Session.SessionID, HttpContext.Current.Session)
|
||||
'Else
|
||||
' sessionData.Add(HttpContext.Current.Session.SessionID, HttpContext.Current.Session)
|
||||
'End If
|
||||
'Application("s") = sessionData
|
||||
End Sub
|
||||
|
||||
Sub Session_End(sender As Object, e As EventArgs)
|
||||
Dim objsession As Object = ADSSessionConfig.SessionManager(OpcionSession.removerSession, Nothing, -1, Session.SessionID)
|
||||
If Not IsNothing(objsession) Then
|
||||
'MyHub.RemoveConexiones(DirectCast(objsession, ADSSessionObj).CveUsuario)
|
||||
End If
|
||||
'Code that runs when a session ends.
|
||||
' Note: The Session_End event Is raised only when the sessionstate mode
|
||||
' Is set to InProc in the Web.config file. If session mode Is set to StateServer
|
||||
'' or SQLServer, the event is not raised.
|
||||
'Dim sessionData As Dictionary(Of String, HttpSessionState) = DirectCast(Application("s"), Dictionary(Of String, HttpSessionState))
|
||||
'sessionData.Remove(HttpContext.Current.Session.SessionID)
|
||||
'Application("s") = sessionData
|
||||
End Sub
|
||||
|
||||
ObjGPS.Dispose()
|
||||
|
||||
'If EsProduccion = "1" Then
|
||||
' RegisterNotification()
|
||||
'End If
|
||||
'-----------------
|
||||
AspMap.License.SetLicenseKey("ccfecfcegknepnhmjighpjjpmpmbajfejhnladegmeanci")
|
||||
|
||||
|
||||
GlobalConfiguration.Configure(AddressOf WebApiConfig.Register)
|
||||
GlobalConfiguration.Configuration.EnsureInitialized()
|
||||
End Sub
|
||||
|
||||
Sub Application_End(sender As Object, e As EventArgs)
|
||||
If EsProduccion = "1" Then
|
||||
SqlDependency.Stop(ConfigurationManager.ConnectionStrings("Conexion").ConnectionString)
|
||||
End If
|
||||
' Code that runs on application shutdown
|
||||
End Sub
|
||||
|
||||
Sub Application_Error(sender As Object, e As EventArgs)
|
||||
' Code that runs when an unhandled error occurs
|
||||
Dim CveUsuario As String = ""
|
||||
Dim Nombre As String = ""
|
||||
Try
|
||||
Dim user As Usuario = ADSSessionConfig.sessionUser
|
||||
If Not IsNothing(user) Then
|
||||
CveUsuario = user.CveUsuario.ToString()
|
||||
Nombre = user.Nombre
|
||||
End If
|
||||
Catch ex As Exception
|
||||
Usuario.CerrarSession()
|
||||
End Try
|
||||
Dim InfoAdicional As String = vbCrLf & "CveUsuario: " & CveUsuario & "; Nombre: " & Nombre & vbCrLf & "Ruta: " & Context.Request.RawUrl & " "
|
||||
OnError("Ocurrió un error en la página.", Context.Error, InfoAdicional)
|
||||
End Sub
|
||||
|
||||
Sub Session_Start(sender As Object, e As EventArgs)
|
||||
|
||||
' Code that runs when a new session is started
|
||||
'Dim sessionData As Dictionary(Of String, HttpSessionState) = DirectCast(Application("s"), Dictionary(Of String, HttpSessionState))
|
||||
|
||||
'If sessionData.Keys.Contains(HttpContext.Current.Session.SessionID) Then
|
||||
' sessionData.Remove(HttpContext.Current.Session.SessionID)
|
||||
' sessionData.Add(HttpContext.Current.Session.SessionID, HttpContext.Current.Session)
|
||||
'Else
|
||||
' sessionData.Add(HttpContext.Current.Session.SessionID, HttpContext.Current.Session)
|
||||
'End If
|
||||
'Application("s") = sessionData
|
||||
End Sub
|
||||
|
||||
Sub Session_End(sender As Object, e As EventArgs)
|
||||
Dim objsession As Object = ADSSessionConfig.SessionManager(OpcionSession.removerSession, Nothing, -1, Session.SessionID)
|
||||
If Not IsNothing(objsession) Then
|
||||
'MyHub.RemoveConexiones(DirectCast(objsession, ADSSessionObj).CveUsuario)
|
||||
End If
|
||||
'Code that runs when a session ends.
|
||||
' Note: The Session_End event Is raised only when the sessionstate mode
|
||||
' Is set to InProc in the Web.config file. If session mode Is set to StateServer
|
||||
'' or SQLServer, the event is not raised.
|
||||
'Dim sessionData As Dictionary(Of String, HttpSessionState) = DirectCast(Application("s"), Dictionary(Of String, HttpSessionState))
|
||||
'sessionData.Remove(HttpContext.Current.Session.SessionID)
|
||||
'Application("s") = sessionData
|
||||
End Sub
|
||||
|
||||
#Region "S Q L D E P E N D E N C Y"
|
||||
|
||||
Public Sub RegisterNotification()
|
||||
Try
|
||||
'Get the connection string from the Web.Config file. Make sure that the key exists and it is the connection string for the Notification Database and the NotificationList Table that we created
|
||||
Dim connectionString As String = ConfigurationManager.ConnectionStrings("Conexion").ConnectionString
|
||||
'We have selected the entire table as the command, so SQL Server executes this script and sees if there is a change in the result, raise the event
|
||||
Dim commandText As String = "SELECT [FechaNotificacion] FROM dbo.Sis_NotificacionesActualizaciones"
|
||||
'Start the SQL Dependency
|
||||
SqlDependency.Start(connectionString)
|
||||
Using connection As New SqlConnection(connectionString)
|
||||
Using command As New SqlCommand(commandText, connection)
|
||||
connection.Open()
|
||||
Dim sqlDependency = New SqlDependency(command)
|
||||
AddHandler sqlDependency.OnChange, AddressOf sqlDependency_OnChange
|
||||
' NOTE: You have to execute the command, or the notification will never fire.
|
||||
Using reader As SqlDataReader = command.ExecuteReader()
|
||||
End Using
|
||||
End Using
|
||||
End Using
|
||||
Catch ex As Exception
|
||||
|
||||
End Try
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub sqlDependency_OnChange(sender As Object, e As SqlNotificationEventArgs)
|
||||
If e.Info = SqlNotificationInfo.Update Then
|
||||
Try
|
||||
Dim ObjNotificaciones As New ClsSisNotificaciones
|
||||
ObjNotificaciones.ObtenerNotificaciones()
|
||||
ObjNotificaciones.Dispose()
|
||||
'System.Threading.Thread.Sleep(5000)
|
||||
RegisterNotification()
|
||||
Catch ex As Exception
|
||||
|
||||
End Try
|
||||
End If
|
||||
'Call the RegisterNotification method again
|
||||
End Sub
|
||||
|
||||
|
||||
'Public Sub RegisterNotification()
|
||||
' Try
|
||||
' 'Get the connection string from the Web.Config file. Make sure that the key exists and it is the connection string for the Notification Database and the NotificationList Table that we created
|
||||
' Dim connectionString As String = ConfigurationManager.ConnectionStrings("Conexion").ConnectionString
|
||||
' 'We have selected the entire table as the command, so SQL Server executes this script and sees if there is a change in the result, raise the event
|
||||
' Dim commandText As String = "SELECT [FechaNotificacion] FROM dbo.Sis_NotificacionesActualizaciones"
|
||||
' 'Start the SQL Dependency
|
||||
' SqlDependency.Start(connectionString)
|
||||
' Using connection As New SqlConnection(connectionString)
|
||||
' Using command As New SqlCommand(commandText, connection)
|
||||
' connection.Open()
|
||||
' Dim sqlDependency = New SqlDependency(command)
|
||||
' AddHandler sqlDependency.OnChange, AddressOf sqlDependency_OnChange
|
||||
' ' NOTE: You have to execute the command, or the notification will never fire.
|
||||
' Using reader As SqlDataReader = command.ExecuteReader()
|
||||
' End Using
|
||||
' End Using
|
||||
' End Using
|
||||
' Catch ex As Exception
|
||||
|
||||
' End Try
|
||||
|
||||
'End Sub
|
||||
|
||||
'Private Sub sqlDependency_OnChange(sender As Object, e As SqlNotificationEventArgs)
|
||||
' If e.Info = SqlNotificationInfo.Update Then
|
||||
' Try
|
||||
' Dim ObjNotificaciones As New ClsSisNotificaciones
|
||||
' ObjNotificaciones.ObtenerNotificaciones()
|
||||
' ObjNotificaciones.Dispose()
|
||||
' 'System.Threading.Thread.Sleep(5000)
|
||||
' RegisterNotification()
|
||||
' Catch ex As Exception
|
||||
|
||||
' End Try
|
||||
' End If
|
||||
' 'Call the RegisterNotification method again
|
||||
'End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
</script>
|
||||
|
||||
@@ -2111,7 +2111,17 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
'ENTREGA DIRECTA
|
||||
If EntregaDirecta Then
|
||||
If Not ErrorMovInv Then
|
||||
CveMovtoSalidaDirecta = ObjInventario.AddMovimiento(DdlAlmacen.SelectedValue.ToEntero, 3, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, Observaciones:=TxtObservaciones.Text.Trim, TipoCambio:=If(DdlMonedaTC.SelectedValue.ToEntero = 1, -1, TipoCambio), MovimientoFijo:=True, CveMovimientoRelacionado:=CveMovimiento, Remision:=TxtRemision.Text, CveVendedor:=CveVendedor, CveCliente:=CveCliente)
|
||||
Dim CveVenta As Integer = 0
|
||||
Dim Dt As DataTable
|
||||
|
||||
If ObjInventario.GetMovimientosDetalle(CveMovimiento, UsuarioActual.CveEmpresa) Then
|
||||
If ObjInventario.DtResultados.Rows.Count > 0 Then
|
||||
Dt = ObjInventario.DtResultados
|
||||
CveVenta = ObjInventario.DtResultados.Rows(0)("CveVenta").ToString.ToEntero
|
||||
End If
|
||||
End If
|
||||
|
||||
CveMovtoSalidaDirecta = ObjInventario.AddMovimiento(DdlAlmacen.SelectedValue.ToEntero, 3, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVenta, -1, -1, Observaciones:=TxtObservaciones.Text.Trim, TipoCambio:=If(DdlMonedaTC.SelectedValue.ToEntero = 1, -1, TipoCambio), MovimientoFijo:=True, CveMovimientoRelacionado:=CveMovimiento, Remision:=TxtRemision.Text, CveVendedor:=CveVendedor, CveCliente:=CveCliente)
|
||||
FolioSalidaDirecta = ObjInventario.Folio
|
||||
|
||||
If Not CveMovtoSalidaDirecta > 0 Then
|
||||
@@ -2119,14 +2129,12 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
End If
|
||||
|
||||
If Not ErrorMovInv Then
|
||||
If ObjInventario.GetMovimientosDetalle(CveMovimiento, UsuarioActual.CveEmpresa) Then
|
||||
For Each Dr As DataRow In ObjInventario.DtResultados.Rows
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovtoSalidaDirecta, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDouble, Dr("CveAF").ToString.ToEntero, Dr("CveSeccionAlmacen").ToString.ToEntero, Dr("SerieLote").ToString, Lote:=Dr("Lote").ToString, Batch:=Dr("Batch").ToString, CveMovimientoDetalleEntrada:=Dr("CveMovimientoDetalle").ToString.ToEntero, CveVentaDetalle:=Dr("CveVentaDetalle").ToString.ToEntero, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
|
||||
ErrorMovInv = True
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
For Each Dr As DataRow In Dt.Rows
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovtoSalidaDirecta, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDouble, Dr("CveAF").ToString.ToEntero, Dr("CveSeccionAlmacen").ToString.ToEntero, Dr("SerieLote").ToString, Lote:=Dr("Lote").ToString, Batch:=Dr("Batch").ToString, CveMovimientoDetalleEntrada:=Dr("CveMovimientoDetalle").ToString.ToEntero, CveVentaDetalle:=Dr("CveVentaDetalle").ToString.ToEntero, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
|
||||
ErrorMovInv = True
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
|
||||
If Not ErrorMovInv Then
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<asp:HyperLink NavigateUrl="#" data-toggle="modal" data-target="#DivPersonalizar" ID="ImgPersonalizar" runat="server"> <i class="fa fa-pencil"></i> Personalizar Columnas</asp:HyperLink>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="Lnkcompuxlsinventarios" OnClick="Lnkcompuxlsinventarios_Click" runat="server"><i class="fa fa-ad-excel"></i> Generar Excel</asp:LinkButton>
|
||||
<asp:LinkButton ID="Lnkcompuxlsinventarios" OnClick="Lnkcompuxlsinventarios_Click" runat="server"><i class="fa fa-ad-excel"></i> Generar Inventarios HP</asp:LinkButton>
|
||||
</li>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="Css" runat="Server">
|
||||
|
||||
@@ -90,7 +90,7 @@ Partial Class Inventarios_ReporteEntradasSalidas
|
||||
End If
|
||||
CargaPermisos()
|
||||
CargaGvBitacora()
|
||||
Lnkcompuxlsinventarios.Visible = (UsuarioActual.CveRol = 1)
|
||||
Lnkcompuxlsinventarios.Visible = UsuarioActual.CveEmpresa = 72
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -579,12 +579,12 @@ Partial Class Inventarios_ReporteEntradasSalidas
|
||||
Fila = Fila + 3
|
||||
|
||||
libro.Cell(Fila + 1, 1).Value = "IH"
|
||||
libro.Cell(Fila + 1, 2).Value = "12345678"
|
||||
libro.Cell(Fila + 1, 3).Value = "ABCD"
|
||||
libro.Cell(Fila + 1, 2).Value = "10245068"
|
||||
libro.Cell(Fila + 1, 3).Value = "COMPUPROVEEDORES SA DE CV"
|
||||
libro.Cell(Fila + 1, 4).Value = "MX"
|
||||
libro.Cell(Fila + 1, 5).Value = ""
|
||||
libro.Cell(Fila + 1, 6).Value = String.Format("{0:yyyyMMdd}", DateTime.Now)
|
||||
libro.Cell(Fila + 1, 6).Value = "N"
|
||||
libro.Cell(Fila + 1, 6).Value = String.Format("{0:yyyyMMdd}", TxtFechaF.Text.ToDate())
|
||||
libro.Cell(Fila + 1, 7).Value = "N"
|
||||
|
||||
|
||||
Fila = Fila + 1
|
||||
@@ -649,28 +649,31 @@ Partial Class Inventarios_ReporteEntradasSalidas
|
||||
libro.Cell(Fila + 1, 16).Value = "OBLIGATORIO"
|
||||
|
||||
|
||||
For Each row As DataRow In dt.Select("CvePS>0")
|
||||
If Not IsNothing(dt) AndAlso dt.Rows.Count > 0 Then
|
||||
|
||||
Fila = Fila + 1
|
||||
libro.Cell(Fila + 1, 1).Value = "ID" ' "TIPO DO REGISTRO"
|
||||
libro.Cell(Fila + 1, 2).Value = String.Format("'{0}", row("Codigo")) ' "NÚMERO DEL PRODUCTO"
|
||||
libro.Cell(Fila + 1, 3).Value = "" ' "OPCION DEL PRODUCTO"
|
||||
libro.Cell(Fila + 1, 4).Value = "" ' "UPC"
|
||||
libro.Cell(Fila + 1, 5).Value = "" ' "CODIGO SKU"
|
||||
libro.Cell(Fila + 1, 6).Value = "" ' "ORDENES DE COMPRAS EN ABIERTO "
|
||||
libro.Cell(Fila + 1, 7).Value = String.Format("{0}", row("SaldoFCant")) ' "INVENTARIO DISPONIBLE"
|
||||
'libro.Cell(Fila + 1, 7).Style.NumberFormat.Format = "N2"
|
||||
libro.Cell(Fila + 1, 8).Value = "" ' "DEVOLUCIONES"
|
||||
libro.Cell(Fila + 1, 9).Value = "" ' "INVENTARIO RESERVADO"
|
||||
libro.Cell(Fila + 1, 10).Value = String.Format("{0}", row("SaldoFImp")) ' "INVENTARIO TOTAL"
|
||||
libro.Cell(Fila + 1, 10).Style.NumberFormat.Format = "$ #,##0.00"
|
||||
libro.Cell(Fila + 1, 11).Value = "" ' "EN TRANSITO"
|
||||
libro.Cell(Fila + 1, 12).Value = "" ' "VALOR UNITARIO DEL PRODUCTO HP"
|
||||
libro.Cell(Fila + 1, 13).Value = "" ' "VALOR TOTAL DEL INVENTARIO"
|
||||
libro.Cell(Fila + 1, 14).Value = "" ' "NOMBRE DE LA TIENDA"
|
||||
libro.Cell(Fila + 1, 15).Value = "" ' "Codigo de la tienda"
|
||||
libro.Cell(Fila + 1, 16).Value = "MXN" ' "MONEDA"
|
||||
Next
|
||||
For Each row As DataRow In dt.Select("CvePS>0 AND SaldoFCant >0")
|
||||
|
||||
Fila = Fila + 1
|
||||
libro.Cell(Fila + 1, 1).Value = "ID" ' "TIPO DO REGISTRO"
|
||||
libro.Cell(Fila + 1, 2).Value = String.Format("'{0}", row("Codigo")) ' "NÚMERO DEL PRODUCTO"
|
||||
libro.Cell(Fila + 1, 3).Value = "" ' "OPCION DEL PRODUCTO"
|
||||
libro.Cell(Fila + 1, 4).Value = "" ' "UPC"
|
||||
libro.Cell(Fila + 1, 5).Value = "" ' "CODIGO SKU"
|
||||
libro.Cell(Fila + 1, 6).Value = "" ' "ORDENES DE COMPRAS EN ABIERTO "
|
||||
libro.Cell(Fila + 1, 7).Value = String.Format("{0}", row("SaldoFCant")) ' "INVENTARIO DISPONIBLE"
|
||||
'libro.Cell(Fila + 1, 7).Style.NumberFormat.Format = "N2"
|
||||
libro.Cell(Fila + 1, 8).Value = "" ' "DEVOLUCIONES"
|
||||
libro.Cell(Fila + 1, 9).Value = "" ' "INVENTARIO RESERVADO"
|
||||
libro.Cell(Fila + 1, 10).Value = String.Format("{0}", row("SaldoFImp")) ' "INVENTARIO TOTAL"
|
||||
libro.Cell(Fila + 1, 10).Style.NumberFormat.Format = "$ #,##0.00"
|
||||
libro.Cell(Fila + 1, 11).Value = "" ' "EN TRANSITO"
|
||||
libro.Cell(Fila + 1, 12).Value = "" ' "VALOR UNITARIO DEL PRODUCTO HP"
|
||||
libro.Cell(Fila + 1, 13).Value = "" ' "VALOR TOTAL DEL INVENTARIO"
|
||||
libro.Cell(Fila + 1, 14).Value = "" ' "NOMBRE DE LA TIENDA"
|
||||
libro.Cell(Fila + 1, 15).Value = "" ' "Codigo de la tienda"
|
||||
libro.Cell(Fila + 1, 16).Value = "MXN" ' "MONEDA"
|
||||
Next
|
||||
End If
|
||||
|
||||
Fila = Fila + 1
|
||||
libro.Range(libro.Cell(Fila + 1, 1), libro.Cell(Fila + 2, 4)).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(217, 225, 242))
|
||||
@@ -727,7 +730,7 @@ Partial Class Inventarios_ReporteEntradasSalidas
|
||||
Response.Buffer = True
|
||||
|
||||
Response.ContentType = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
|
||||
Response.AddHeader("content-disposition", String.Format("attachment;filename={0}.xlsx", "Reporte de Inventarios"))
|
||||
Response.AddHeader("content-disposition", String.Format("attachment;filename={0}.xlsx", "Reporte de Inventarios HP"))
|
||||
Response.BinaryWrite(memoryStream.ToArray())
|
||||
Response.End()
|
||||
|
||||
|
||||
@@ -172,14 +172,14 @@
|
||||
<div class="col-md-2">
|
||||
<asp:TextBox runat="server" Text="" ID="TxtGastoIndirecto" Width="100px" />
|
||||
</div>
|
||||
<label class="col-md-1">Chofer:</label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DldChofer" runat="server" DataTextField="Chofer" DataValueField="CveChofer" CssClass="form-control input-sm select2me" Style="width: 150px !important;"></asp:DropDownList>
|
||||
</div>
|
||||
<label class="col-md-1">Placa:</label>
|
||||
<div class="col-md-2">
|
||||
<asp:TextBox runat="server" Text="" ID="TxtPlaca" Width="100px" />
|
||||
</div>
|
||||
<label class="col-md-1">Chofer:</label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DldChofer" runat="server" DataTextField="Chofer" DataValueField="CveChofer" OnSelectedIndexChanged="DldChofer_SelectedIndexChanged" AutoPostBack="true" CssClass="form-control input-sm select2me" Style="width: 150px !important;"></asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<label class="col-md-2">Fecha Entrega:</label>
|
||||
@@ -256,7 +256,8 @@
|
||||
<div class="row">
|
||||
<label class="col-md-5">Teléfono:</label>
|
||||
<div class="col-md-4">
|
||||
<asp:TextBox runat="server" Text="" ID="TxtTelefono" Width="150px" />
|
||||
<asp:TextBox runat="server" Text="" ID="TxtTelefono" Width="150px" MaxLength="10" />
|
||||
<ajax:FilteredTextBoxExtender ID="FTETelefono" runat="server" TargetControlID="TxtTelefono" FilterType="Custom, Numbers" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
|
||||
@@ -377,7 +377,7 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
|
||||
'Llena Choferes
|
||||
Dim ObjAcar As New ClsAcarreos()
|
||||
If ObjAcar.GetChofer(-1, UsuarioActual.CveEmpresa, -1, -1) Then
|
||||
If ObjAcar.GetChofer(-1, UsuarioActual.CveEmpresa, 1, -1) Then
|
||||
DldChofer.DataSource = ObjAcar.DtResultados
|
||||
DldChofer.DataBind()
|
||||
End If
|
||||
@@ -2408,5 +2408,19 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
|
||||
#End Region
|
||||
|
||||
Protected Sub DldChofer_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
Dim ObjAcar As New ClsAcarreos()
|
||||
|
||||
If ObjAcar.GetChofer(DldChofer.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, 1, -1) Then
|
||||
Dim dr As DataRow = ObjAcar.DtResultados.Rows(0)
|
||||
If dr IsNot Nothing Then
|
||||
TxtIdentificacion.Text = dr("Identificacion").ToString
|
||||
TxtDomicilio.Text = dr("Domicilio").ToString
|
||||
TxtTelefono.Text = dr("Telefono").ToString
|
||||
TxtCiudad.Text = dr("Ciudad").ToString
|
||||
TxtLicencia.Text = dr("Licencia").ToString
|
||||
End If
|
||||
End If
|
||||
ObjAcar.Dispose()
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
@@ -4,4 +4,4 @@
|
||||
28/08/2019:05:48 p. m. No se especifico a remitente - SIG - Se Genero una Recepción de Usados con el folio: 80
|
||||
|
||||
02/09/2019:11:00 a. m. From:'signotificaciones@adssistemas.mx' - Para:'x@x.com' - Asunto:'Entrega de Factura SUCURSAL NARANJO SN-22' - CCP: '' - Adjuntos: 1
|
||||
|
||||
|
||||
@@ -7,9 +7,20 @@
|
||||
<webopt:BundleReference runat="server" Path="~/Metronic/assets/global/plugins/codemirror/CSS" />
|
||||
<webopt:BundleReference runat="server" Path="~/Metronic/assets/global/plugins/jstree/dist/themes/default/style.min.css" />
|
||||
<style>
|
||||
input[disabled="disabled"] ~ .CodeMirror.cm-s-material {
|
||||
cursor: not-allowed;
|
||||
}
|
||||
input[disabled="disabled"] ~ .CodeMirror.cm-s-material input {
|
||||
cursor: not-allowed;
|
||||
}
|
||||
input[disabled="disabled"] ~ .CodeMirror.cm-s-material pre {
|
||||
cursor: not-allowed;
|
||||
}
|
||||
|
||||
.CodeMirror-hints {
|
||||
z-index: 700;
|
||||
}
|
||||
|
||||
.CodeMirror,
|
||||
.CodeMirror-scroll {
|
||||
max-height: 150px;
|
||||
@@ -217,19 +228,30 @@
|
||||
</div>
|
||||
<div class="portlet-body rowpadding">
|
||||
|
||||
<ajax:TabContainer ID="TabsFormulas" runat="server" Width="100%" CssClass="tabBodyOverride" ActiveTabIndex="0">
|
||||
<ajax:TabPanel ID="tabFormulaTotal" runat="server" HeaderText="Total">
|
||||
<ContentTemplate>
|
||||
<asp:TextBox ID="TxtFormulaTotal" runat="server" MaxLength="70" CssClass="codeeditor " Enabled="false"></asp:TextBox>
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
<ajax:TabPanel ID="tabFormulaGravada" runat="server" HeaderText="Gravada">
|
||||
<ContentTemplate>
|
||||
<asp:TextBox ID="TxtFormulaGravada" runat="server" MaxLength="70" CssClass="codeeditor " Enabled="false"></asp:TextBox>
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
</ajax:TabContainer>
|
||||
|
||||
<asp:UpdatePanel ID="UpFormulas" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<ajax:TabContainer ID="TabsFormulas" runat="server" Width="100%" CssClass="tabBodyOverride" ActiveTabIndex="0" AutoPostBack="true">
|
||||
|
||||
<ajax:TabPanel ID="tabFormulaImporte" runat="server" HeaderText="Importe">
|
||||
<ContentTemplate>
|
||||
<asp:TextBox ID="TxtFormulaImporte" runat="server" MaxLength="70" CssClass="codeeditor " Enabled="false"></asp:TextBox>
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
|
||||
<ajax:TabPanel ID="tabFormulaTotal" runat="server" HeaderText="Total">
|
||||
<ContentTemplate>
|
||||
<asp:TextBox ID="TxtFormulaTotal" runat="server" MaxLength="70" CssClass="codeeditor " Enabled="false"></asp:TextBox>
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
<ajax:TabPanel ID="tabFormulaGravada" runat="server" HeaderText="Gravada">
|
||||
<ContentTemplate>
|
||||
<asp:TextBox ID="TxtFormulaGravada" runat="server" MaxLength="70" CssClass="codeeditor " Enabled="false"></asp:TextBox>
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
</ajax:TabContainer>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<%--<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="form-group form-md-line-input form-md-floating-label input-iconright">
|
||||
@@ -259,7 +281,7 @@
|
||||
</div>
|
||||
<label class="col-md-3 truncate ">Automatico Liquidación:</label>
|
||||
<div class="col-md-3">
|
||||
<asp:CheckBox ID="ChkAutomaticoLiquidacion" CssClass="chksino" Text=" " runat="server" Checked="true" />
|
||||
<asp:CheckBox ID="ChkAutomaticoLiquidacion" CssClass="chksino" Text=" " runat="server" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
@@ -269,7 +291,7 @@
|
||||
</div>
|
||||
<label class="col-md-3 truncate ">Imprimir:</label>
|
||||
<div class="col-md-3">
|
||||
<asp:CheckBox ID="ChkImprimir" CssClass="chksino" Text=" " runat="server" Checked="true" />
|
||||
<asp:CheckBox ID="ChkImprimir" CssClass="chksino" Text=" " runat="server" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
@@ -289,7 +311,7 @@
|
||||
<asp:Label runat="server" Text="Tipo de cálculo" AssociatedControlID="ChkTipoCalculo"></asp:Label>
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
<asp:CheckBox ID="ChkTipoCalculo" Text=" " CssClass="chksino" runat="server" Checked="true" />
|
||||
<asp:CheckBox ID="ChkTipoCalculo" Text=" " CssClass="chksino" runat="server" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -332,7 +354,7 @@
|
||||
</div>
|
||||
|
||||
|
||||
<%-- <asp:TextBox ID="TxtMycurrentT" CssClass=" TxtMycurrentT" runat="server"></asp:TextBox>
|
||||
<%-- <asp:TextBox ID="TxtMycurrentT" CssClass=" TxtMycurrentT" runat="server"></asp:TextBox>
|
||||
<asp:TextBox ID="TxtstrKeys2" CssClass="TxtstrKeys2" runat="server"></asp:TextBox>
|
||||
<asp:TextBox ID="TxtstrKeys3" CssClass="TxtstrKeys3" runat="server"></asp:TextBox>--%>
|
||||
|
||||
@@ -492,12 +514,12 @@
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<asp:UpdatePanel ID="UpTablas" class="jdTables" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:Label ID="LtlKeys" CssClass="LtlKeys" runat="server"></asp:Label>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<asp:UpdatePanel ID="UpTablas" class="jdTables" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:Label ID="LtlKeys" CssClass="LtlKeys" runat="server"></asp:Label>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
|
||||
<%: System.Web.Optimization.Scripts.Render("~/Metronic/assets/global/plugins/codemirror/JS") %>
|
||||
@@ -913,10 +935,10 @@
|
||||
let MycurrentT;
|
||||
let strKeys2;
|
||||
let strKeys3;
|
||||
eval($('.LtlKeys').html())
|
||||
eval($('.LtlKeys').html())
|
||||
$('.ShowModalDivFormula').on('shown.bs.modal', function (e) {
|
||||
$('.BtnupView').click();
|
||||
});
|
||||
});
|
||||
$('.ShowModalDivFormula').removeClass('ShowModalDivFormula');
|
||||
ReloadcodeMirror(MycurrentT, strKeys2, strKeys3);
|
||||
|
||||
@@ -934,8 +956,8 @@
|
||||
hintOptions: {
|
||||
tables: MycurrentT
|
||||
},
|
||||
change: function (cm) { } ,
|
||||
readOnly: _input.prop('disabled')
|
||||
change: function (cm) { },
|
||||
readOnly: _input.prop('disabled')
|
||||
});
|
||||
editor.on('change', function (cMirror) {
|
||||
// get value right from instance
|
||||
|
||||
@@ -8,7 +8,7 @@ using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
|
||||
public partial class Nomina_CatConcepto : ClsPaginas
|
||||
public partial class Nomina_CatConcepto : ClsPaginas
|
||||
{
|
||||
#region "Propiedades"
|
||||
private DataTable DTCuentas
|
||||
@@ -54,6 +54,20 @@ public partial class Nomina_CatConcepto : ClsPaginas
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
if (Request["CveConcepto"] != null && !Request["CveConcepto"].ToString().Equals("") && Request["CveConcepto"].ToEntero() > 0)
|
||||
{
|
||||
ViewState["CveConcepto"] = Request["CveConcepto"];
|
||||
EsEditar = true;
|
||||
BtnGuardar.Text = "Guardar cambios";
|
||||
BtnEliminar.Visible = true;
|
||||
ChkTipoCalculo.Checked = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
ViewState["CveConcepto"] = -1;
|
||||
EsEditar = false;
|
||||
LnkActualizarFormula.Visible = false;
|
||||
}
|
||||
tree_Tables();
|
||||
InicializaDatos();
|
||||
}
|
||||
@@ -71,7 +85,7 @@ public partial class Nomina_CatConcepto : ClsPaginas
|
||||
strKeys2 = new StringBuilder();
|
||||
strKeys3 = new StringBuilder();
|
||||
StringBuilder tablaarbol = new StringBuilder();
|
||||
objnom.GetNom_Refencias();
|
||||
objnom.GetNom_Refencias(UsuarioActual.CveEmpresa);
|
||||
dtrefrencias = objnom.DtResultados;
|
||||
objnom.Dispose();
|
||||
strKeys.Append("{");
|
||||
@@ -136,7 +150,7 @@ public partial class Nomina_CatConcepto : ClsPaginas
|
||||
tablaarbol.AppendLine(string.Format("{0}<li {1}>", identacion, data_jstree));
|
||||
tablaarbol.AppendLine("");
|
||||
tablaarbol.Append(identacion3);
|
||||
if (item["EsUltimo"].ToString() == "1")
|
||||
if (item["EsUltimo"].ToString() == "1" || item["EsUltimo"].ToString().ToUpper() == "TRUE")
|
||||
{
|
||||
tablaarbol.Append("<a href=\"javascript:addtextFormula('").Append(item["Campo"]).Append("');\"> ");
|
||||
string campo = item["Campo"].ToString();
|
||||
@@ -157,7 +171,7 @@ public partial class Nomina_CatConcepto : ClsPaginas
|
||||
strKeys.Append(string.Format(",'{0}':[]", campo));
|
||||
}
|
||||
tablaarbol.Append(item["Texto"]);
|
||||
if (item["EsUltimo"].ToString() == "1") { tablaarbol.Append("</a>"); }
|
||||
if (item["EsUltimo"].ToString() == "1" || item["EsUltimo"].ToString().ToUpper() == "TRUE") { tablaarbol.Append("</a>"); }
|
||||
tablaarbol.AppendLine("");
|
||||
if (dt.Rows.Count > 0)
|
||||
{
|
||||
@@ -170,23 +184,10 @@ public partial class Nomina_CatConcepto : ClsPaginas
|
||||
}
|
||||
tablaarbol.AppendLine(string.Format("{0}</li>", identacion));
|
||||
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
protected void InicializaDatos()
|
||||
{
|
||||
if (Request["CveConcepto"] != null && !Request["CveConcepto"].ToString().Equals("") && Request["CveConcepto"].ToEntero() > 0)
|
||||
{
|
||||
ViewState["CveConcepto"] = Request["CveConcepto"];
|
||||
EsEditar = true;
|
||||
BtnGuardar.Text = "Guardar cambios";
|
||||
BtnEliminar.Visible = true;
|
||||
ChkTipoCalculo.Checked = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
ViewState["CveConcepto"] = -1;
|
||||
EsEditar = false;
|
||||
}
|
||||
CargaTipo();
|
||||
CargaConceptoPadre();
|
||||
CargaConceptoContable();
|
||||
@@ -239,7 +240,7 @@ public partial class Nomina_CatConcepto : ClsPaginas
|
||||
|
||||
protected void CargaCtaContable()
|
||||
{
|
||||
if(UsuarioActual.Empresa.UsaContabilidad)
|
||||
if (UsuarioActual.Empresa.UsaContabilidad)
|
||||
{
|
||||
ClsContPAQi ObjConta = new ClsContPAQi(UsuarioActual.Empresa);
|
||||
if (ObjConta.GetCuentas(-1, "-1", 1))
|
||||
@@ -261,68 +262,71 @@ public partial class Nomina_CatConcepto : ClsPaginas
|
||||
String tipo = DdlTipo.SelectedValue;
|
||||
String formula = TxtFormula.Text;
|
||||
|
||||
if (!ValidaFormula(formula).Equals(""))
|
||||
//if (!ValidaFormula(formula).Equals(""))
|
||||
//{
|
||||
// Alert("Fórmula no válida. Favor de ingresar una correcta.", ModExtensiones.TipoMensaje.MsgError);
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
bool retencion;
|
||||
if (ChkRetencion.Checked) retencion = true;
|
||||
else retencion = false;
|
||||
|
||||
bool tipoCalculo;
|
||||
if (ChkTipoCalculo.Checked) tipoCalculo = true;
|
||||
else tipoCalculo = false;
|
||||
|
||||
int CveConceptoPadre = DdlConceptoPadre.SelectedValue.ToEntero();
|
||||
int CveConceptoContable = DdlConceptoContable.SelectedValue.ToEntero();
|
||||
|
||||
bool estado;
|
||||
if (ChkEstado.Checked) estado = true;
|
||||
else estado = false;
|
||||
|
||||
bool sistema;
|
||||
if (ChkSistema.Checked) sistema = true;
|
||||
else sistema = false;
|
||||
|
||||
int CveClasificacion = DdlClasificacion.SelectedValue.ToEntero();
|
||||
int CveTipoGasto = DdlTipoGasto.SelectedValue.ToEntero();
|
||||
int IdCtaContable = DdlCtaContable.SelectedValue.ToEntero();
|
||||
int AplicaFiniquito = ChkAutomaticoLiquidacion.Checked ? 1 : 0;
|
||||
int AutomaticoGlobal = ChkAutomaticoGlobal.Checked ? 1 : 0;
|
||||
int Especie = ChkEspecie.Checked ? 1 : 0;
|
||||
int Imprimir = ChkImprimir.Checked ? 1 : 0;
|
||||
ClsNominas ObjNomina = new ClsNominas();
|
||||
ObjNomina.IniciaTransacSQL();
|
||||
|
||||
bool TieneError = false;
|
||||
|
||||
if (EsEditar)
|
||||
{
|
||||
Alert("Fórmula no válida. Favor de ingresar una correcta.", ModExtensiones.TipoMensaje.MsgError);
|
||||
}
|
||||
else
|
||||
{
|
||||
bool retencion;
|
||||
if (ChkRetencion.Checked) retencion = true;
|
||||
else retencion = false;
|
||||
TieneError = !ObjNomina.UpdateConcepto(codigo, concepto, tipo, formula, sistema, estado, CveConceptoPadre, CveConcepto, retencion, CveClasificacion, IdCtaContable, CveTipoGasto, tipoCalculo, CveConceptoContable, AplicaFiniquito, AutomaticoGlobal, Especie, Imprimir);
|
||||
|
||||
bool tipoCalculo;
|
||||
if (ChkTipoCalculo.Checked) tipoCalculo = true;
|
||||
else tipoCalculo = false;
|
||||
|
||||
int CveConceptoPadre = DdlConceptoPadre.SelectedValue.ToEntero();
|
||||
int CveConceptoContable = DdlConceptoContable.SelectedValue.ToEntero();
|
||||
|
||||
bool estado;
|
||||
if (ChkEstado.Checked) estado = true;
|
||||
else estado = false;
|
||||
|
||||
bool sistema;
|
||||
if (ChkSistema.Checked) sistema = true;
|
||||
else sistema = false;
|
||||
|
||||
int CveClasificacion = DdlClasificacion.SelectedValue.ToEntero();
|
||||
int CveTipoGasto = DdlTipoGasto.SelectedValue.ToEntero();
|
||||
int IdCtaContable = DdlCtaContable.SelectedValue.ToEntero();
|
||||
|
||||
ClsNominas ObjNomina = new ClsNominas();
|
||||
ObjNomina.IniciaTransacSQL();
|
||||
|
||||
bool TieneError = false;
|
||||
|
||||
if (EsEditar)
|
||||
if (TieneError)
|
||||
{
|
||||
TieneError = !ObjNomina.UpdateConcepto(codigo, concepto, tipo, formula, sistema, estado, CveConceptoPadre, CveConcepto, retencion, CveClasificacion, IdCtaContable, CveTipoGasto, tipoCalculo, CveConceptoContable);
|
||||
|
||||
if (TieneError)
|
||||
{
|
||||
ObjNomina.RollBack();
|
||||
}
|
||||
else
|
||||
{
|
||||
ObjNomina.Commit();
|
||||
Alert("El concepto de nómina fue actualizado correctamente.", ModExtensiones.TipoMensaje.MsgInformacion, $"document.location.href=\"/Nomina/ConceptoNomina.aspx?CveConcepto={CveConcepto}\"");
|
||||
}
|
||||
ObjNomina.RollBack();
|
||||
}
|
||||
else
|
||||
{
|
||||
CveConcepto = ObjNomina.AddConcepto(codigo, concepto, tipo, formula, sistema, estado, CveConceptoPadre, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, retencion, CveClasificacion, IdCtaContable, CveTipoGasto, tipoCalculo, CveConceptoContable);
|
||||
|
||||
if (CveConcepto == -1)
|
||||
{
|
||||
ObjNomina.RollBack();
|
||||
}
|
||||
else
|
||||
{
|
||||
ObjNomina.Commit();
|
||||
Alert("El concepto de nómina fue creado correctamente.", ModExtensiones.TipoMensaje.MsgInformacion, $"document.location.href=\"/Nomina/ConceptoNomina.aspx?CveConcepto={CveConcepto}\"");
|
||||
}
|
||||
ObjNomina.Commit();
|
||||
Alert("El concepto de nómina fue actualizado correctamente.", ModExtensiones.TipoMensaje.MsgInformacion, $"document.location.href=\"/Nomina/ConceptoNomina.aspx?CveConcepto={CveConcepto}\"");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
CveConcepto = ObjNomina.AddConcepto(codigo, concepto, tipo, formula, sistema, estado, CveConceptoPadre, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, retencion, CveClasificacion, IdCtaContable, CveTipoGasto, tipoCalculo, CveConceptoContable, AplicaFiniquito, AutomaticoGlobal, Especie, Imprimir);
|
||||
|
||||
if (CveConcepto == -1)
|
||||
{
|
||||
ObjNomina.RollBack();
|
||||
}
|
||||
else
|
||||
{
|
||||
ObjNomina.Commit();
|
||||
Alert("El concepto de nómina fue creado correctamente.", ModExtensiones.TipoMensaje.MsgInformacion, $"document.location.href=\"/Nomina/ConceptoNomina.aspx?CveConcepto={CveConcepto}\"");
|
||||
}
|
||||
//}
|
||||
|
||||
ObjNomina.Dispose();
|
||||
CargaDatos();
|
||||
@@ -357,8 +361,9 @@ public partial class Nomina_CatConcepto : ClsPaginas
|
||||
retorno = exp.Errors[0].Message;
|
||||
}
|
||||
}
|
||||
catch (Exception e) {
|
||||
Alert(e.Message,ModExtensiones.TipoMensaje.MsgError);
|
||||
catch (Exception e)
|
||||
{
|
||||
Alert(e.Message, ModExtensiones.TipoMensaje.MsgError);
|
||||
}
|
||||
|
||||
return retorno;
|
||||
@@ -366,31 +371,39 @@ public partial class Nomina_CatConcepto : ClsPaginas
|
||||
|
||||
protected void CargaDatos()
|
||||
{
|
||||
if(CveConcepto > 0)
|
||||
if (CveConcepto > 0)
|
||||
{
|
||||
ClsNominas ObjNomina = new ClsNominas();
|
||||
|
||||
if (ObjNomina.GetConceptos(UsuarioActual.CveEmpresa, CveConcepto: CveConcepto) && ObjNomina.DtResultados.Rows.Count > 0)
|
||||
{
|
||||
TxtCodigo.Text = ObjNomina.DtResultados.FiltroPrimeroValor("Codigo");
|
||||
TxtConcepto.Text = ObjNomina.DtResultados.FiltroPrimeroValor("Concepto");
|
||||
DdlTipo.SelectedValueExist(ObjNomina.DtResultados.FiltroPrimeroValor("Tipo"));
|
||||
TxtFormulaTotal.Text = ObjNomina.DtResultados.FiltroPrimeroValor("Formula");
|
||||
if (ObjNomina.DtResultados.FiltroPrimeroValor("EsRetencion").Equals("1")) ChkRetencion.Checked = true;
|
||||
if (ObjNomina.DtResultados.FiltroPrimeroValor("TipoCalculo").Equals("True")) ChkTipoCalculo.Checked = true;
|
||||
DdlConceptoPadre.SelectedValueExist(ObjNomina.DtResultados.FiltroPrimeroValor("CveConceptoPadre"));
|
||||
DdlConceptoContable.SelectedValueExist(ObjNomina.DtResultados.FiltroPrimeroValor("CveConceptoContable"));
|
||||
DataRow drow = ObjNomina.DtResultados.Rows[0];
|
||||
TxtCodigo.Text = drow["Codigo"].ToString();
|
||||
TxtConcepto.Text = drow["Concepto"].ToString();
|
||||
DdlTipo.SelectedValueExist(drow["Tipo"]);
|
||||
TxtFormulaImporte.Text = drow["Formula"].ToString();
|
||||
TxtFormulaTotal.Text = drow["FormulaTotal"].ToString();
|
||||
TxtFormulaGravada.Text = drow["FormulaGravada"].ToString();
|
||||
if (drow["EsRetencion"].Equals("1")) ChkRetencion.Checked = true;
|
||||
if (drow["TipoCalculo"].Equals("True")) ChkTipoCalculo.Checked = true;
|
||||
DdlConceptoPadre.SelectedValueExist(drow["CveConceptoPadre"]);
|
||||
DdlConceptoContable.SelectedValueExist(drow["CveConceptoContable"]);
|
||||
|
||||
if (ObjNomina.DtResultados.FiltroPrimeroValor("Estado").Equals("Activo")) ChkEstado.Checked = true;
|
||||
if (ObjNomina.DtResultados.FiltroPrimeroValor("Sistema").Equals("Sí")) ChkSistema.Checked = true;
|
||||
ChkEstado.Checked = drow["Estado"].Equals("Activo");
|
||||
ChkSistema.Checked = drow["Sistema"].Equals("Sí");
|
||||
ChkAutomaticoLiquidacion.Checked = drow["AplicaFiniquito"].ToString().ToUpper().Contiene(new string[] { "1", "TRUE" });
|
||||
ChkAutomaticoGlobal.Checked = drow["AutomaticoGlobal"].ToString().ToUpper().Contiene(new string[] { "1", "TRUE" });
|
||||
ChkEspecie.Checked = drow["Especie"].ToString().ToUpper().Contiene(new string[] { "1", "TRUE" });
|
||||
ChkImprimir.Checked = drow["Imprimir"].ToString().ToUpper().Contiene(new string[] { "1", "TRUE" });
|
||||
|
||||
DdlClasificacion.SelectedValueExist(ObjNomina.DtResultados.FiltroPrimeroValor("CveClasificacion"));
|
||||
DdlTipoGasto.SelectedValueExist(ObjNomina.DtResultados.FiltroPrimeroValor("CveTipoGasto"));
|
||||
DdlCtaContable.SelectedValueExist(ObjNomina.DtResultados.FiltroPrimeroValor("IdCtaContable"));
|
||||
DdlClasificacion.SelectedValueExist(drow["CveClasificacion"]);
|
||||
DdlTipoGasto.SelectedValueExist(drow["CveTipoGasto"]);
|
||||
DdlCtaContable.SelectedValueExist(drow["IdCtaContable"]);
|
||||
}
|
||||
ObjNomina.Dispose();
|
||||
|
||||
} else
|
||||
}
|
||||
else
|
||||
{
|
||||
TxtCodigo.Text = "";
|
||||
TxtConcepto.Text = "";
|
||||
@@ -427,13 +440,20 @@ public partial class Nomina_CatConcepto : ClsPaginas
|
||||
{
|
||||
tree_Tables();
|
||||
string tipo = "Total";
|
||||
if (TabsFormulas.ActiveTab == tabFormulaImporte)
|
||||
{
|
||||
tipo = "Importe";
|
||||
TxtFormula.Text = TxtFormulaImporte.Text;
|
||||
}
|
||||
if (TabsFormulas.ActiveTab == tabFormulaTotal)
|
||||
{
|
||||
tipo = "Total";
|
||||
TxtFormula.Text = TxtFormulaTotal.Text;
|
||||
}
|
||||
if (TabsFormulas.ActiveTab == tabFormulaGravada)
|
||||
{
|
||||
tipo = "Gravada";
|
||||
TxtFormula.Text = TxtFormulaGravada.Text;
|
||||
}
|
||||
LtlTituloFormula.Text = $"Actualizar Formula {tipo}";
|
||||
RegistraScript("$('#ModalDivFormula').modal()");
|
||||
@@ -442,6 +462,50 @@ public partial class Nomina_CatConcepto : ClsPaginas
|
||||
|
||||
protected void BtnUpFormula_Click(object sender, EventArgs e)
|
||||
{
|
||||
int TipoFormula = 0;
|
||||
if (TabsFormulas.ActiveTab == tabFormulaImporte)
|
||||
{
|
||||
TipoFormula = 0;
|
||||
}
|
||||
if (TabsFormulas.ActiveTab == tabFormulaTotal)
|
||||
{
|
||||
TipoFormula = 1;
|
||||
}
|
||||
if (TabsFormulas.ActiveTab == tabFormulaGravada)
|
||||
{
|
||||
TipoFormula = 2;
|
||||
}
|
||||
string formula = TxtFormula.Text;
|
||||
using (ClsNominas objnom = new ClsNominas())
|
||||
{
|
||||
if (TipoFormula == 0 && !ValidaFormula(formula).Equals(""))
|
||||
{
|
||||
Alert("Fórmula no válida. Favor de ingresar una correcta.", ModExtensiones.TipoMensaje.MsgError);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
if (objnom.UpdateConceptoFormula(CveConcepto, formula, TipoFormula))
|
||||
{
|
||||
|
||||
if (TabsFormulas.ActiveTab == tabFormulaImporte)
|
||||
{
|
||||
TxtFormulaImporte.Text = formula;
|
||||
}
|
||||
if (TabsFormulas.ActiveTab == tabFormulaTotal)
|
||||
{
|
||||
TxtFormulaTotal.Text = formula;
|
||||
}
|
||||
if (TabsFormulas.ActiveTab == tabFormulaGravada)
|
||||
{
|
||||
TxtFormulaGravada.Text = formula;
|
||||
}
|
||||
UpFormulas.Update();
|
||||
Alert("La formula se ha actualizado Correctamente");
|
||||
RegistraScript("$('#ModalDivFormula').modal('hide')");
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -236,9 +236,12 @@ Partial Class Nomina_Nomina
|
||||
CargaFolios()
|
||||
LnkCorreos.Visible = False
|
||||
TxtFechaPago.Text = Now.ToShortDateString
|
||||
|
||||
DdlEjercicios.Items.Add(New ListItem(UsuarioActual.Empresa.EjercicioActual.ToString, UsuarioActual.Empresa.EjercicioActual.ToString))
|
||||
DdlEjercicios.Items.Add(New ListItem((UsuarioActual.Empresa.EjercicioActual - 1).ToString, (UsuarioActual.Empresa.EjercicioActual - 1).ToString))
|
||||
Dim EjercicioActual As Integer = UsuarioActual.Empresa.EjercicioActual
|
||||
If EjercicioActual = 0 Then
|
||||
EjercicioActual = DateTime.Now.Year
|
||||
End If
|
||||
DdlEjercicios.Items.Add(New ListItem(EjercicioActual.ToString(), EjercicioActual.ToString()))
|
||||
DdlEjercicios.Items.Add(New ListItem((EjercicioActual - 1).ToString(), (EjercicioActual - 1).ToString()))
|
||||
|
||||
'Verifica Permisos de Autorizar
|
||||
If UsuarioActual.TienePermisoProceso(82) Then PermisoAutorizar = True Else PermisoAutorizar = False
|
||||
|
||||
@@ -134,25 +134,326 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body nomarginleftright form-horizontal form-row-sepe formnombottom ">
|
||||
<asp:GridView ID="GvNominas" ClientIDMode="Static" runat="server" DataKeyNames="CvePeriodo,CvePersonal,CveNomina,SeTimbro,SerieFolio,Nombre,Correo" AutoGenerateColumns="False" OnRowDataBound="GvNominas_RowDataBound"
|
||||
CssClass="table table-striped table-advance table-hover mysmallbtn ScrollAD Widthall" Style="text-align: center;" GridLines="None" EnableViewState="false"
|
||||
<asp:GridView ID="GvNominas" runat="server" DataKeyNames="CvePeriodo,CvePersonal,CveNomina,SeTimbro,SerieFolio,Nombre,Correo,Turno,SubProyecto" AutoGenerateColumns="False" OnRowDataBound="GvNominas_RowDataBound"
|
||||
CssClass="table table-striped table-advance table-hover mysmallbtn ScrollAD Widthall" Style="text-align: center;" GridLines="None"
|
||||
data-rows="2">
|
||||
<Columns>
|
||||
|
||||
<asp:TemplateField>
|
||||
<asp:TemplateField >
|
||||
<HeaderTemplate></HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LnkSobreRecibo" OnClick="LnkSobreRecibo_Click" runat="server"><i class='fa fa-list-alt'></i></asp:LinkButton>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="20px" HorizontalAlign="Left" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<asp:TemplateField >
|
||||
<HeaderTemplate>Nombre</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlNombre" runat="server"></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="350px" HorizontalAlign="Left" />
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
|
||||
@@ -116,6 +116,10 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
private void cargaEjercicios()
|
||||
{
|
||||
int EjercicioActual = UsuarioActual.Empresa.EjercicioActual;
|
||||
if (EjercicioActual == 0)
|
||||
{
|
||||
EjercicioActual = DateTime.Now.Year;
|
||||
}
|
||||
DataTable dtejercicio = null;
|
||||
using (ClsNominas objnom = new ClsNominas())
|
||||
{
|
||||
@@ -232,34 +236,241 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
{
|
||||
|
||||
string ctipo = "P";
|
||||
/*
|
||||
while (GvNominas.Columns.Count > 3)
|
||||
{
|
||||
GvNominas.Columns.RemoveAt(2);
|
||||
}
|
||||
//GvNominas.Columns.sa();
|
||||
}*/
|
||||
|
||||
int CurrentColumn = GvNominas.Columns.Count - 1;
|
||||
foreach (DataRow row in dtConceptos.FiltraParametros("Tipo IN ('P','D','O') AND EsPadre = 1 ").Rows)
|
||||
int CurrentColumn = 2;
|
||||
BoundField bf;
|
||||
foreach (DataRow row in dtConceptos.FiltraParametros("Tipo IN ('P') AND EsPadre = 1 ").Rows)
|
||||
{
|
||||
int CveConcepto = row["CveConcepto"].ToString().ToEntero();
|
||||
string Concepto = row["Concepto"].ToString();
|
||||
string Tipo = row["Tipo"].ToString();
|
||||
GvNominas.Columns[CurrentColumn].ItemStyle.BackColor = System.Drawing.Color.Transparent;
|
||||
GvNominas.Columns[CurrentColumn].Visible = (dtempleados.SUM(string.Format("[V_{0}]", CveConcepto)) > 0);
|
||||
bf = (BoundField)GvNominas.Columns[CurrentColumn];
|
||||
bf.DataField = string.Format("V_{0}", CveConcepto);
|
||||
bf.HeaderText = Concepto;
|
||||
CurrentColumn++;
|
||||
}
|
||||
if (true)
|
||||
{
|
||||
BoundField field = (BoundField)GvNominas.Columns[CurrentColumn];
|
||||
|
||||
if (Tipo != ctipo)
|
||||
field.HeaderText = "Percepciones";
|
||||
field.DataField = "SumaPercepciones";
|
||||
field.ItemStyle.BackColor = System.Drawing.Color.LightGray;
|
||||
GvNominas.Columns[CurrentColumn].Visible = true;
|
||||
CurrentColumn++;
|
||||
}
|
||||
|
||||
foreach (DataRow row in dtConceptos.FiltraParametros("Tipo IN ('D') AND EsPadre = 1 ").Rows)
|
||||
{
|
||||
int CveConcepto = row["CveConcepto"].ToString().ToEntero();
|
||||
string Concepto = row["Concepto"].ToString();
|
||||
GvNominas.Columns[CurrentColumn].ItemStyle.BackColor = System.Drawing.Color.Transparent;
|
||||
GvNominas.Columns[CurrentColumn].Visible = (dtempleados.SUM(string.Format("[V_{0}]", CveConcepto)) > 0);
|
||||
bf = (BoundField)GvNominas.Columns[CurrentColumn];
|
||||
bf.DataField = string.Format("V_{0}", CveConcepto);
|
||||
bf.HeaderText = Concepto;
|
||||
CurrentColumn++;
|
||||
}
|
||||
|
||||
if (true)
|
||||
{
|
||||
BoundField field = (BoundField)GvNominas.Columns[CurrentColumn];
|
||||
field.HeaderText = "Deducciones";
|
||||
field.DataField = "SumaDeducciones";
|
||||
field.ItemStyle.BackColor = System.Drawing.Color.LightGray;
|
||||
GvNominas.Columns[CurrentColumn].Visible = true;
|
||||
CurrentColumn++;
|
||||
|
||||
field = (BoundField)GvNominas.Columns[CurrentColumn];
|
||||
field.HeaderText = "Total";
|
||||
field.DataField = "Total";
|
||||
field.ItemStyle.BackColor = System.Drawing.Color.LightGray;
|
||||
GvNominas.Columns[CurrentColumn].Visible = true;
|
||||
CurrentColumn++;
|
||||
}
|
||||
|
||||
foreach (DataRow row in dtConceptos.FiltraParametros("Tipo IN ('O') AND EsPadre = 1 ").Rows)
|
||||
{
|
||||
int CveConcepto = row["CveConcepto"].ToString().ToEntero();
|
||||
string Concepto = row["Concepto"].ToString();
|
||||
GvNominas.Columns[CurrentColumn].ItemStyle.BackColor = System.Drawing.Color.Transparent;
|
||||
GvNominas.Columns[CurrentColumn].Visible = (dtempleados.SUM(string.Format("[V_{0}]", CveConcepto)) > 0);
|
||||
bf = (BoundField)GvNominas.Columns[CurrentColumn];
|
||||
bf.DataField = string.Format("V_{0}", CveConcepto);
|
||||
CurrentColumn++;
|
||||
}
|
||||
if (true)
|
||||
{
|
||||
BoundField field = (BoundField)GvNominas.Columns[CurrentColumn];
|
||||
field.HeaderText = "Obligaciones";
|
||||
field.DataField = "SumaObligaciones";
|
||||
field.ItemStyle.BackColor = System.Drawing.Color.LightGray;
|
||||
GvNominas.Columns[CurrentColumn].Visible = true;
|
||||
CurrentColumn++;
|
||||
}
|
||||
for (int i = CurrentColumn; i < 102; i++)
|
||||
{
|
||||
bf = (BoundField)GvNominas.Columns[i];
|
||||
bf.DataField = "";
|
||||
bf.HeaderText = "";
|
||||
GvNominas.Columns[i].ItemStyle.BackColor = System.Drawing.Color.Transparent;
|
||||
GvNominas.Columns[i].Visible = false;
|
||||
|
||||
}
|
||||
if (false)
|
||||
{
|
||||
bool sumaPercepciones = false;
|
||||
bool sumaDeducciones = false;
|
||||
if (GvNominas.Columns.Count > 3)
|
||||
{
|
||||
if (ctipo == "P")
|
||||
|
||||
foreach (DataRow row in dtConceptos.FiltraParametros("Tipo IN ('P','D','O') AND EsPadre = 1 ").Rows)
|
||||
{
|
||||
int CveConcepto = row["CveConcepto"].ToString().ToEntero();
|
||||
string Concepto = row["Concepto"].ToString();
|
||||
string Tipo = row["Tipo"].ToString();
|
||||
|
||||
if (Tipo != ctipo)
|
||||
{
|
||||
if (ctipo == "P")
|
||||
{
|
||||
CurrentColumn++;
|
||||
if (Tipo != "D")
|
||||
{
|
||||
CurrentColumn++;
|
||||
CurrentColumn++;
|
||||
}
|
||||
}
|
||||
else if (ctipo == "D")
|
||||
{
|
||||
|
||||
CurrentColumn++;
|
||||
CurrentColumn++;
|
||||
}
|
||||
ctipo = Tipo;
|
||||
}
|
||||
CurrentColumn++;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
foreach (DataRow row in dtConceptos.FiltraParametros("Tipo IN ('P','D','O') AND EsPadre = 1 ").Rows)
|
||||
{
|
||||
int CveConcepto = row["CveConcepto"].ToString().ToEntero();
|
||||
string Concepto = row["Concepto"].ToString();
|
||||
string Tipo = row["Tipo"].ToString();
|
||||
|
||||
if (Tipo != ctipo)
|
||||
{
|
||||
if (ctipo == "P")
|
||||
{
|
||||
|
||||
BoundField field = new BoundField();
|
||||
field.HeaderText = "Percepciones";
|
||||
field.DataField = "SumaPercepciones";
|
||||
field.DataFormatString = "{0:N2}";
|
||||
field.ItemStyle.Width = Unit.Pixel(120);
|
||||
field.ItemStyle.HorizontalAlign = HorizontalAlign.Right;
|
||||
field.ItemStyle.BackColor = System.Drawing.Color.LightGray;
|
||||
GvNominas.Columns.Insert(CurrentColumn++, field);
|
||||
sumaPercepciones = true;
|
||||
if (Tipo != "D")
|
||||
{
|
||||
field = new BoundField();
|
||||
field.HeaderText = "Deducciones";
|
||||
field.DataField = "SumaDeducciones";
|
||||
field.DataFormatString = "{0:N2}";
|
||||
field.ItemStyle.Width = Unit.Pixel(120);
|
||||
field.ItemStyle.HorizontalAlign = HorizontalAlign.Right;
|
||||
field.ItemStyle.BackColor = System.Drawing.Color.LightGray;
|
||||
GvNominas.Columns.Insert(CurrentColumn++, field);
|
||||
field = new BoundField();
|
||||
field.HeaderText = "Total";
|
||||
field.DataField = "Total";
|
||||
field.DataFormatString = "{0:N2}";
|
||||
field.ItemStyle.Width = Unit.Pixel(120);
|
||||
field.ItemStyle.HorizontalAlign = HorizontalAlign.Right;
|
||||
field.ItemStyle.BackColor = System.Drawing.Color.LightGray;
|
||||
GvNominas.Columns.Insert(CurrentColumn++, field);
|
||||
sumaDeducciones = true;
|
||||
}
|
||||
}
|
||||
else if (ctipo == "D")
|
||||
{
|
||||
|
||||
BoundField field = new BoundField();
|
||||
if (!sumaPercepciones)
|
||||
{
|
||||
|
||||
field.HeaderText = "Percepciones";
|
||||
field.DataField = "SumaPercepciones";
|
||||
field.DataFormatString = "{0:N2}";
|
||||
field.ItemStyle.Width = Unit.Pixel(120);
|
||||
field.ItemStyle.HorizontalAlign = HorizontalAlign.Right;
|
||||
field.ItemStyle.BackColor = System.Drawing.Color.LightGray;
|
||||
GvNominas.Columns.Insert(CurrentColumn++, field);
|
||||
field = new BoundField();
|
||||
sumaPercepciones = true;
|
||||
}
|
||||
field.HeaderText = "Deducciones";
|
||||
field.DataField = "SumaDeducciones";
|
||||
field.DataFormatString = "{0:N2}";
|
||||
field.ItemStyle.Width = Unit.Pixel(120);
|
||||
field.ItemStyle.HorizontalAlign = HorizontalAlign.Right;
|
||||
field.ItemStyle.BackColor = System.Drawing.Color.LightGray;
|
||||
GvNominas.Columns.Insert(CurrentColumn++, field);
|
||||
|
||||
field = new BoundField();
|
||||
field.HeaderText = "Total";
|
||||
field.DataField = "Total";
|
||||
field.DataFormatString = "{0:N2}";
|
||||
field.ItemStyle.Width = Unit.Pixel(120);
|
||||
field.ItemStyle.HorizontalAlign = HorizontalAlign.Right;
|
||||
field.ItemStyle.BackColor = System.Drawing.Color.LightGray;
|
||||
GvNominas.Columns.Insert(CurrentColumn++, field);
|
||||
sumaDeducciones = true;
|
||||
}
|
||||
ctipo = Tipo;
|
||||
}
|
||||
if (true)
|
||||
{
|
||||
BoundField field = new BoundField();
|
||||
field.Visible = (dtempleados.SUM(string.Format("[V_{0}]", CveConcepto)) > 0);
|
||||
field.HeaderText = Concepto;
|
||||
field.DataField = string.Format("V_{0}", CveConcepto);
|
||||
field.DataFormatString = "{0:N2}";
|
||||
field.ItemStyle.Width = Unit.Pixel(80);
|
||||
GvNominas.Columns.Insert(CurrentColumn++, field);
|
||||
}
|
||||
}
|
||||
|
||||
if (true)
|
||||
{
|
||||
|
||||
BoundField field = new BoundField();
|
||||
field.HeaderText = "Percepciones";
|
||||
field.DataField = "SumaPercepciones";
|
||||
field.DataFormatString = "{0:N2}";
|
||||
field.ItemStyle.Width = Unit.Pixel(120);
|
||||
field.ItemStyle.HorizontalAlign = HorizontalAlign.Right;
|
||||
field.ItemStyle.BackColor = System.Drawing.Color.LightGray;
|
||||
GvNominas.Columns.Insert(CurrentColumn++, field);
|
||||
if (Tipo != "D")
|
||||
if (!sumaPercepciones)
|
||||
{
|
||||
|
||||
field.HeaderText = "Percepciones";
|
||||
field.DataField = "SumaPercepciones";
|
||||
field.DataFormatString = "{0:N2}";
|
||||
field.ItemStyle.Width = Unit.Pixel(120);
|
||||
field.ItemStyle.HorizontalAlign = HorizontalAlign.Right;
|
||||
field.ItemStyle.BackColor = System.Drawing.Color.LightGray;
|
||||
GvNominas.Columns.Insert(CurrentColumn++, field);
|
||||
field = new BoundField();
|
||||
sumaPercepciones = true;
|
||||
}
|
||||
if (!sumaDeducciones)
|
||||
{
|
||||
field.HeaderText = "Deducciones";
|
||||
field.DataField = "SumaDeducciones";
|
||||
field.DataFormatString = "{0:N2}";
|
||||
@@ -267,6 +478,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
field.ItemStyle.HorizontalAlign = HorizontalAlign.Right;
|
||||
field.ItemStyle.BackColor = System.Drawing.Color.LightGray;
|
||||
GvNominas.Columns.Insert(CurrentColumn++, field);
|
||||
|
||||
field = new BoundField();
|
||||
field.HeaderText = "Total";
|
||||
field.DataField = "Total";
|
||||
@@ -275,52 +487,21 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
field.ItemStyle.HorizontalAlign = HorizontalAlign.Right;
|
||||
field.ItemStyle.BackColor = System.Drawing.Color.LightGray;
|
||||
GvNominas.Columns.Insert(CurrentColumn++, field);
|
||||
sumaDeducciones = true;
|
||||
field = new BoundField();
|
||||
}
|
||||
}
|
||||
else if (ctipo == "D")
|
||||
{
|
||||
|
||||
BoundField field = new BoundField();
|
||||
field.HeaderText = "Deducciones";
|
||||
field.DataField = "SumaDeducciones";
|
||||
field.DataFormatString = "{0:N2}";
|
||||
field.ItemStyle.Width = Unit.Pixel(120);
|
||||
field.ItemStyle.HorizontalAlign = HorizontalAlign.Right;
|
||||
field.ItemStyle.BackColor = System.Drawing.Color.LightGray;
|
||||
GvNominas.Columns.Insert(CurrentColumn++, field);
|
||||
|
||||
field = new BoundField();
|
||||
field.HeaderText = "Total";
|
||||
field.DataField = "Total";
|
||||
field.HeaderText = "Obligaciones";
|
||||
field.DataField = "SumaObligaciones";
|
||||
field.DataFormatString = "{0:N2}";
|
||||
field.ItemStyle.Width = Unit.Pixel(120);
|
||||
field.ItemStyle.HorizontalAlign = HorizontalAlign.Right;
|
||||
field.ItemStyle.BackColor = System.Drawing.Color.LightGray;
|
||||
GvNominas.Columns.Insert(CurrentColumn++, field);
|
||||
}
|
||||
ctipo = Tipo;
|
||||
}
|
||||
if (dtempleados.SUM(string.Format("[{0}]", CveConcepto)) > 0)
|
||||
{
|
||||
BoundField field = new BoundField();
|
||||
field.HeaderText = Concepto;
|
||||
field.DataField = CveConcepto.ToString();
|
||||
field.DataFormatString = "{0:N2}";
|
||||
field.ItemStyle.Width = Unit.Pixel(80);
|
||||
GvNominas.Columns.Insert(CurrentColumn++, field);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
BoundField field2 = new BoundField();
|
||||
field2.HeaderText = "Obligaciones";
|
||||
field2.DataField = "SumaObligaciones";
|
||||
field2.DataFormatString = "{0:N2}";
|
||||
field2.ItemStyle.Width = Unit.Pixel(120);
|
||||
field2.ItemStyle.HorizontalAlign = HorizontalAlign.Right;
|
||||
field2.ItemStyle.BackColor = System.Drawing.Color.LightGray;
|
||||
GvNominas.Columns.Insert(CurrentColumn++, field2);
|
||||
|
||||
|
||||
GvNominas.DataSource = dtempleados;
|
||||
GvNominas.DataBind();
|
||||
}
|
||||
@@ -345,10 +526,10 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
int cvePersonal = e.Row.DataKey("CvePersonal").ToEntero();
|
||||
int CvePeriodo = e.Row.DataKey("CvePeriodo").ToEntero();
|
||||
int CveNomina = e.Row.DataKey("CveNomina").ToEntero();
|
||||
string SeTimbro = e.Row.DBCampo("SeTimbro").ToString();
|
||||
string Nombre = e.Row.DBCampo("Nombre").ToString();
|
||||
string Turno = e.Row.DBCampo("Turno").ToString();
|
||||
string SubProyecto = e.Row.DBCampo("SubProyecto").ToString();
|
||||
string SeTimbro = e.Row.DataKey("SeTimbro").ToString();
|
||||
string Nombre = e.Row.DataKey("Nombre").ToString();
|
||||
string Turno = e.Row.DataKey("Turno").ToString();
|
||||
string SubProyecto = e.Row.DataKey("SubProyecto").ToString();
|
||||
LnkTimbrar.Visible = false;
|
||||
if (cvePersonal > 0)
|
||||
{
|
||||
@@ -384,7 +565,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
|
||||
e.Row.CssClass = "SubTotales";
|
||||
}
|
||||
e.Row.FindControl("LnkSobreRecibo").Visible = false;
|
||||
//e.Row.FindControl("LnkSobreRecibo").Visible = false;
|
||||
|
||||
}
|
||||
|
||||
@@ -504,7 +685,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
|
||||
}
|
||||
using (ClsRH objpersonal = new ClsRH())
|
||||
{
|
||||
{
|
||||
using (ClsNominas objNomina = new ClsNominas())
|
||||
{
|
||||
foreach (DataRow row in DTEXcel.Rows)
|
||||
@@ -561,11 +742,11 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
Importe = row[CveConcepto.ToString()].ToString().ToDecimal();
|
||||
try
|
||||
{
|
||||
ImporteExento = row[string.Format("E{0}",CveConcepto)].ToString().ToDecimal();
|
||||
ImporteExento = row[string.Format("E{0}", CveConcepto)].ToString().ToDecimal();
|
||||
}
|
||||
catch (Exception) { }
|
||||
catch (Exception) { }
|
||||
ImporteGravado = Importe - ImporteExento;
|
||||
objNomina.AddUPNom_NominasDetalles(objNomina.CveNomina, CvePeriodoSeleccionado, CvePersonal, CveConcepto, Importe, ImporteGravado, ImporteExento,UsuarioActual.CveUsuario);
|
||||
objNomina.AddUPNom_NominasDetalles(objNomina.CveNomina, CvePeriodoSeleccionado, CvePersonal, CveConcepto, Importe, ImporteGravado, ImporteExento, UsuarioActual.CveUsuario);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -119,7 +119,7 @@
|
||||
|
||||
<asp:UpdatePanel ID="UPPEmp" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvEstatusUsuariosREQ" GridLines="None" CssClass="table table-striped table-advance table-hover" Width="100%" runat="server" AutoGenerateColumns="False" DataKeyNames="CveUsuario" EmptyDataText="No se encontraron Usuarios Registrados" ToolTip="Listado de Usuarios">
|
||||
<asp:GridView ID="GvEstatusUsuarios" GridLines="None" CssClass="table table-striped table-advance table-hover" Width="100%" runat="server" AutoGenerateColumns="False" DataKeyNames="CveUsuario" EmptyDataText="No se encontraron Usuarios Registrados" ToolTip="Listado de Usuarios">
|
||||
<HeaderStyle VerticalAlign="Middle" />
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
@@ -302,70 +302,6 @@
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<asp:UpdatePanel runat="server" ID="UPSuperior" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:HiddenField runat="server" ID="IDhdnCveEstatusUsuarios" ClientIDMode="Static" />
|
||||
<asp:HiddenField runat="server" ID="IDCellYellow" ClientIDMode="Static" />
|
||||
<asp:HiddenField runat="server" ID="IDimg" ClientIDMode="Static" />
|
||||
<asp:HiddenField runat="server" ID="hdnCveEstatusUsuarios" ClientIDMode="Static" />
|
||||
<asp:HiddenField runat="server" ID="hdnCveSuperior" ClientIDMode="Static" />
|
||||
<asp:HiddenField runat="server" ID="hdnCveEstatusSiguiente" ClientIDMode="Static" />
|
||||
<asp:HiddenField runat="server" ID="HiddenField1" ClientIDMode="Static" />
|
||||
<asp:HiddenField runat="server" ID="hdnCveUsuario" ClientIDMode="Static" />
|
||||
|
||||
<div id="DivSuperior" style="width: 200px; background-color: White; border: solid 1px black; color: Black; display: none; position: absolute;">
|
||||
<table border="0" style="width: 200px" cellpadding="0" cellspacing="0">
|
||||
<tr class="Titulos">
|
||||
<td style="width: 400px">Opciones </td>
|
||||
<td style="padding-right: 4px; padding-top: 4px" valign="top">
|
||||
<img alt="" src="/Imagenes/close.gif" style="cursor: pointer;" onclick="$('#DivSuperior').hide(1000);" /></td>
|
||||
</tr>
|
||||
<tr align="center">
|
||||
<td colspan="2">
|
||||
<table style="height: 80px; width: 100%">
|
||||
<tr>
|
||||
<td style="vertical-align: top; text-align: left; width: 100%">
|
||||
<asp:CheckBox ID="chkMostrarLimites" Font-Bold="true" Style="display: none" ClientIDMode="Static" Text="Usar Limites" runat="server" /><br />
|
||||
<div id="DivLimites" style="display: none;">
|
||||
<table>
|
||||
<tr>
|
||||
<td>Inferior</td>
|
||||
<td>
|
||||
<asp:TextBox ID="txtLimiteInferior" Width="80px" runat="server" ClientIDMode="Static"></asp:TextBox></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Superior</td>
|
||||
<td>
|
||||
<asp:TextBox ID="txtLimiteSuperior" Width="80px" runat="server" ClientIDMode="Static"></asp:TextBox></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<table style="text-align: center" runat="server" id="tblSuperior">
|
||||
<tr>
|
||||
<td style="font-weight: bold">Superior</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<asp:DropDownList ID="ddlSuperior" Width="170px" ClientIDMode="Static" runat="server" DataValueField="CveUsuario" DataTextField="Nombre"></asp:DropDownList></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr style="height: 25px">
|
||||
<td align="center" colspan="2">
|
||||
<asp:Button ID="BtnGuardarSuperior" runat="server" ClientIDMode="Static" OnClientClick="$('#DivSuperior').hide(1000);" Text="Guardar" />
|
||||
<input id="BtnCancelarObs" type="button" value="Cancelar" onclick="$('#DivSuperior').hide(1000);" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
</ajax:TabContainer>
|
||||
|
||||
@@ -30,7 +30,7 @@ Partial Class OS_CatEstatusOrdenServicio
|
||||
Get
|
||||
Return CType(ViewState("DTEstatusUsuarios"), DataTable)
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
Set(value As Data.DataTable)
|
||||
ViewState("DTEstatusUsuarios") = value
|
||||
End Set
|
||||
End Property
|
||||
@@ -39,17 +39,12 @@ Partial Class OS_CatEstatusOrdenServicio
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
CargaDatos()
|
||||
CreaGrid("Req")
|
||||
CreaGrid("OC")
|
||||
CargaGridEstatusUsuarios()
|
||||
ViewState("Orden") = ""
|
||||
'ViewState("TipoSeleccionado") = DdlTipo.SelectedValue
|
||||
|
||||
CveEstatuOS = -1
|
||||
CargaDatos()
|
||||
|
||||
'CargaProyectos()
|
||||
CargaUsuarios()
|
||||
|
||||
End If
|
||||
End Sub
|
||||
@@ -66,6 +61,12 @@ Partial Class OS_CatEstatusOrdenServicio
|
||||
Else
|
||||
Me.GvDatos.DataSource = Nothing
|
||||
End If
|
||||
|
||||
If ObjEstatusOrdenServicios.GetEstatusUsuarios(-1, -1) Then
|
||||
DTEstatusUsuarios = ObjEstatusOrdenServicios.DtResultados
|
||||
Dim PermisosDeUsuario As DataTable = DTEstatusUsuarios
|
||||
End If
|
||||
|
||||
OrdenaDatos()
|
||||
ObjEstatusOrdenServicios.Dispose()
|
||||
GvDatos.DataBind()
|
||||
@@ -148,16 +149,8 @@ Partial Class OS_CatEstatusOrdenServicio
|
||||
Dim Estado As Boolean = GvDatos.Rows(e.RowIndex).FCCheckBox("ChkEstado").Checked
|
||||
Dim CveEstatusOrdenServicio As Integer = GvDatos.DataKeys(e.RowIndex).Value.ToString.ToEntero
|
||||
|
||||
'If ObjEstatusOrdenServicios.UpdateEstatusOrdenServicio(EstatusOrdenServicio, Estado, CveEstatusOrdenServicio) Then
|
||||
' GvDatos.EditIndex = -1
|
||||
' ViewState("DTEstatusOrdenServicios") = ObjEstatusOrdenServicios.DtResultados '.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||
' GlobalDTEstatusOrdenServicios = ObjEstatusOrdenServicios.DtResultados
|
||||
' Alert("Los cambios se guardaron correctamente.", TipoMensaje.MsgInformacion)
|
||||
'End If
|
||||
|
||||
ObjEstatusOrdenServicios.Dispose()
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
@@ -173,85 +166,50 @@ Partial Class OS_CatEstatusOrdenServicio
|
||||
#End Region
|
||||
|
||||
#Region "Configuracion"
|
||||
Protected Sub ibOpciones1_Click(sender As Object, e As ImageClickEventArgs)
|
||||
Dim imgBtn As ImageButton = DirectCast(sender, System.Web.UI.WebControls.ImageButton)
|
||||
|
||||
ddlSuperior.Items.Clear()
|
||||
|
||||
If imgBtn.CommandArgument <> "" Then
|
||||
'chkMostrarLimites.Visible = If(GlobalDTOCEstatus.FiltraParametros("CveEstatusSiguiente = " + imgBtn.CommandArgument)(0)("TipoTermino").ToString.ToEntero = 3, False, True)
|
||||
chkMostrarLimites.Style("display") = If(GlobalDTOCEstatus(UsuarioActual.CveEmpresa).FiltraParametros("CveEstatusSiguiente = " + imgBtn.CommandArgument)(0)("TipoTermino").ToString.ToEntero = 3, "none", "inline")
|
||||
|
||||
|
||||
'ddlSuperior.DataSource = DTEstatusUsuarios.FiltraParametros(String.Format("CveEstatus = {0}", imgBtn.CommandArgument), "Nombre DESC")
|
||||
ddlSuperior.DataBind()
|
||||
ddlSuperior.Items.Insert(0, New ListItem("Todos los Superiores", "-1"))
|
||||
Try
|
||||
ddlSuperior.SelectedValue = hdnCveSuperior.Value
|
||||
Catch ex As Exception
|
||||
|
||||
End Try
|
||||
tblSuperior.Visible = True
|
||||
Else
|
||||
tblSuperior.Visible = False
|
||||
End If
|
||||
|
||||
UPSuperior.Update()
|
||||
UPPEmp.Update()
|
||||
RegistraScript("$('#DivSuperior').show(1000); PosicionaObjeto('" + imgBtn.ClientID + "','DivSuperior'); chkMostrarLimitesCambio();")
|
||||
End Sub
|
||||
Private Sub CreaGrid(Tipo As String)
|
||||
Dim i As Integer = 1
|
||||
|
||||
For Each Row As DataRow In GlobalDTEstatusOrdenServicios(UsuarioActual.CveEmpresa).Rows
|
||||
|
||||
GvEstatusUsuariosREQ.Columns(i).HeaderText = Row("EstatusOrdenServicio").ToString.ToUpper
|
||||
GvEstatusUsuariosREQ.Columns(i).FooterText = Row("CveEstatusOrdenServicio").ToString
|
||||
GvEstatusUsuarios.Columns(i).HeaderText = Row("EstatusOrdenServicio").ToString.ToUpper
|
||||
GvEstatusUsuarios.Columns(i).FooterText = Row("CveEstatusOrdenServicio").ToString
|
||||
|
||||
i += 1
|
||||
Next
|
||||
|
||||
While i <= 10
|
||||
GvEstatusUsuariosREQ.Columns(i).Visible = False
|
||||
GvEstatusUsuarios.Columns(i).Visible = False
|
||||
i += 1
|
||||
End While
|
||||
End Sub
|
||||
|
||||
Protected Sub CargaGridEstatusUsuarios()
|
||||
GvEstatusUsuariosREQ.DataSource = GlobalDTUsuarios(CveEmpresa:=UsuarioActual.CveEmpresa)
|
||||
GvEstatusUsuariosREQ.DataBind()
|
||||
GvEstatusUsuarios.DataSource = GlobalDTUsuarios(CveEmpresa:=UsuarioActual.CveEmpresa)
|
||||
GvEstatusUsuarios.DataBind()
|
||||
UPPEmp.Update()
|
||||
End Sub
|
||||
|
||||
Public Sub CargaUsuarios()
|
||||
ddlSuperior.DataSource = GlobalDTUsuarios(-1, UsuarioActual.CveEmpresa)
|
||||
ddlSuperior.DataBind()
|
||||
End Sub
|
||||
|
||||
Protected Sub btnGuardarEstatusUsuariosREQ_Click(sender As Object, e As EventArgs) Handles btnGuardarEstatusUsuariosREQ.Click
|
||||
Dim objEstatusOC As New ClsOS
|
||||
objEstatusOC.IniciaTransacSQL()
|
||||
Dim HuboErrores As Boolean = False
|
||||
Dim CveSubProyecto = 59
|
||||
|
||||
|
||||
For Each Row As GridViewRow In GvEstatusUsuariosREQ.Rows
|
||||
Dim aux As String = Row.DataKey("CveUsuario").ToString
|
||||
For Each Row As GridViewRow In GvEstatusUsuarios.Rows
|
||||
Dim r As Integer = 1
|
||||
For i = 0 To Row.Cells.Count - 1
|
||||
|
||||
Dim CveEstatus As Integer = If(IsNumeric(GvEstatusUsuariosREQ.Columns(i).FooterText), GvEstatusUsuariosREQ.Columns(i).FooterText.ToEntero, 0)
|
||||
Dim CveEstatus As Integer = If(IsNumeric(GvEstatusUsuarios.Columns(i).FooterText), GvEstatusUsuarios.Columns(i).FooterText.ToEntero, 0)
|
||||
|
||||
If CveEstatus > 0 Then
|
||||
|
||||
If Row.FCCheckBox("chkEstatus" + r.ToString).Checked = False And Row.FCHiddenField("hdnCveEstatusUsuarios" + r.ToString).Value.ToEntero > 0 Then
|
||||
If Row.FCCheckBox("chkEstatus" + r.ToString).Checked = False Then
|
||||
'Eliminar el registro existente
|
||||
If Not objEstatusOC.RemoveEstatusUsuarios(Row.FCHiddenField("hdnCveEstatusUsuarios" + r.ToString).Value.ToEntero) Then
|
||||
If Not objEstatusOC.RemoveEstatusUsuarios(CveEstatus, Row.DataKey("CveUsuario").ToString.ToEntero) Then
|
||||
HuboErrores = True
|
||||
Exit For
|
||||
End If
|
||||
ElseIf Row.FCCheckBox("chkEstatus" + r.ToString).Checked = True Then
|
||||
'And Row.FCHiddenField("hdnCveEstatusUsuarios" + r.ToString).Value.ToEntero = -1
|
||||
'Guardado masivo cuando sea SubProyecto "Todos"
|
||||
If CveSubProyecto = -2 Then
|
||||
For Each dr As DataRow In GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa).Rows
|
||||
@@ -292,7 +250,25 @@ Partial Class OS_CatEstatusOrdenServicio
|
||||
End If
|
||||
|
||||
objEstatusOC.Dispose()
|
||||
CargaDatos()
|
||||
CargaGridEstatusUsuarios()
|
||||
End Sub
|
||||
|
||||
Protected Sub GvEstatusUsuarios_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvEstatusUsuarios.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
Dim PermisosDeUsuario As DataTable = DTEstatusUsuarios.FiltraParametros(String.Format("CveUsuario = {0}", e.Row.DBCampo("CveUsuario").ToString))
|
||||
Dim CveUsuario As String = e.Row.DBCampo("CveUsuario").ToString
|
||||
For i As Integer = 1 To 10
|
||||
Dim CveEstatus As Integer = GvEstatusUsuarios.Columns(i).FooterText.ToEntero
|
||||
If CveEstatus > 0 Then
|
||||
Dim auxiliarBandera As DataRow = PermisosDeUsuario.FiltroPrimero(String.Format("CveEstatusOrdenServicio = {0}", CveEstatus.ToString))
|
||||
If auxiliarBandera IsNot Nothing Then
|
||||
Dim chkEstatus As CheckBox = e.Row.FCCheckBox(String.Format("chkEstatus{0}", i))
|
||||
chkEstatus.Checked = True
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
End Sub
|
||||
#End Region
|
||||
End Class
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
<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" style="">
|
||||
<div class="portlet solid grey-cascade portlet-filter" style="" id="PorletAsistencia">
|
||||
<div class="portlet-title portlet-filterT" style="">
|
||||
<div class="portlet-body" style="font-size:120%">
|
||||
<ul class="list-inline">
|
||||
|
||||
@@ -367,14 +367,10 @@ Partial Class ProductosyServicios
|
||||
End Sub
|
||||
|
||||
Private Sub PresionarBotonPanel(Boton As String)
|
||||
Try
|
||||
Dim Script As String = $"document.getElementById(""{Boton}"").click();"
|
||||
Dim Pag As System.Web.UI.Page = CType(System.Web.HttpContext.Current.Handler, System.Web.UI.Page)
|
||||
ScriptManager.RegisterStartupScript(Pag, Pag.GetType(), Boton, Script, True)
|
||||
Pag = Nothing
|
||||
Catch ex As Exception
|
||||
Throw
|
||||
End Try
|
||||
Dim Script As String = $"document.getElementById(""{Boton}"").click();"
|
||||
Dim Pag As System.Web.UI.Page = CType(System.Web.HttpContext.Current.Handler, System.Web.UI.Page)
|
||||
ScriptManager.RegisterStartupScript(Pag, Pag.GetType(), Boton, Script, True)
|
||||
Pag = Nothing
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
@@ -50,7 +50,7 @@ public partial class Ventas_RepCancelacionesPorRespuesta : ClsPaginas
|
||||
}
|
||||
ObjVentas.Dispose();
|
||||
GvDatos.DataSource = DtVentas.FiltraParametros("CveEstatusFactura = 20 AND CveEstatusRefacturacion = 0");
|
||||
var DtRefacturar = DtVentas.FiltraParametros("CveEstatusRefacturacion = 1");
|
||||
var DtRefacturar = DtVentas.FiltraParametros("CveEstatusRefacturacion IN (1,3)");
|
||||
if (DtRefacturar.Rows.Count > 0)
|
||||
{
|
||||
DivRefacturar.Visible = true;
|
||||
|
||||
@@ -97,14 +97,18 @@ public partial class Ventas_RepConciliacionEmitidosSat : ClsPaginas
|
||||
ClsAcumuladores ObjAcum = new ClsAcumuladores(ObjVentas.IniciaTransacSQL());
|
||||
ClsContPAQi ObjContPaq = null;
|
||||
//StringBuilder MensajeAlert = new StringBuilder() ;
|
||||
DataTable DtDetalle = objfact.DtDetalle;
|
||||
try
|
||||
{
|
||||
objfact.GuardarVenta(ref objfact, ref ObjVentas, ref ObjConta, ref ObjInventario, ref ObjContr, ref objfact.DtDetalle, objfact.CveNCaVincular, ref ObjContPaq, ref ObjBancos, ref ObjOS, ref ObjEventos, ref ObjCGame, ref ObjClientes, ObjAcum: ObjAcum);
|
||||
objfact.GuardarVenta(ref objfact, ref ObjVentas, ref ObjConta, ref ObjInventario, ref ObjContr, ref DtDetalle, objfact.CveNCaVincular, ref ObjContPaq, ref ObjBancos, ref ObjOS, ref ObjEventos, ref ObjCGame, ref ObjClientes, ObjAcum: ObjAcum);
|
||||
|
||||
}
|
||||
catch (Exception)
|
||||
catch (Exception e)
|
||||
{
|
||||
objfact.CveVenta = -1;
|
||||
e.ToString().GuardaLog();
|
||||
strErrores.AppendLine("<br/>");
|
||||
strErrores.AppendLine(e.ToString());
|
||||
}
|
||||
if (ObjVentas.UpdateEstatusFactura(3, objxml.complemento.UUID, "", DateTime.ParseExact(objxml.comprobante.Fecha.Replace("T", " "), "yyyy-MM-dd HH:mm:ss", System.Globalization.CultureInfo.InvariantCulture), ObjVentas.CveVenta, CvePAC: 4))
|
||||
if (objfact.CveVenta > 0 && objfact.ErrorList.Count == 0)
|
||||
|
||||
@@ -15532,7 +15532,7 @@ Partial Class Ventas
|
||||
CancelarDocumento(True)
|
||||
End Sub
|
||||
Private Sub BtnRefacturacionConfirmarAceptacion_Click(sender As Object, e As System.EventArgs) Handles BtnRefacturacionConfirmarAceptacion.Click
|
||||
Response.Redirect(String.Format("Ventas.aspx?CveDevolucion={0}&NuevaFactura=1", CveVenta))
|
||||
CancelarDocumento(True)
|
||||
End Sub
|
||||
Private Sub BtnContabilizar_Click(sender As Object, e As System.EventArgs) Handles BtnContabilizar.Click
|
||||
'Dim ObjMov As New ClsContabilidad
|
||||
|
||||
Reference in New Issue
Block a user