Merge branch 'master' of http://oirigoyen@192.168.10.111:8383/SIG.git
This commit is contained in:
@@ -4543,7 +4543,7 @@ Public Class ClsContabilidad
|
|||||||
Public Function UpdateCuenta(CveCuenta As Integer, Nombre As String, Tipo As String, CtaMayor As Integer, CveMoneda As Integer, Optional DigAgrupador As Integer = -1,
|
Public Function UpdateCuenta(CveCuenta As Integer, Nombre As String, Tipo As String, CtaMayor As Integer, CveMoneda As Integer, Optional DigAgrupador As Integer = -1,
|
||||||
Optional CveAgrupadorSAT As Integer = -1, Optional NomIdioma As String = "", Optional CveConceptoAdmin As Integer = -1, Optional CveProveedor As Integer = -1,
|
Optional CveAgrupadorSAT As Integer = -1, Optional NomIdioma As String = "", Optional CveConceptoAdmin As Integer = -1, Optional CveProveedor As Integer = -1,
|
||||||
Optional CveCliente As Integer = -1, Optional CveClasificacion As Integer = -1, Optional PorcentajeImpuesto As Decimal = -1,
|
Optional CveCliente As Integer = -1, Optional CveClasificacion As Integer = -1, Optional PorcentajeImpuesto As Decimal = -1,
|
||||||
Optional CveBancoCuenta As Integer = -1, Optional CveAlmacen As Integer = -1) As Boolean
|
Optional CveBancoCuenta As Integer = -1, Optional CveAlmacen As Integer = -1, Optional Afectable As Integer = -1) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
|
|
||||||
DataAdapter("PA_Conta_UpdateCuentas")
|
DataAdapter("PA_Conta_UpdateCuentas")
|
||||||
@@ -4564,6 +4564,7 @@ Public Class ClsContabilidad
|
|||||||
.Add("@PorcentajeImpuesto", SqlDbType.Money).Value = PorcentajeImpuesto
|
.Add("@PorcentajeImpuesto", SqlDbType.Money).Value = PorcentajeImpuesto
|
||||||
.Add("@CveBancoCuenta", SqlDbType.Int).Value = CveBancoCuenta
|
.Add("@CveBancoCuenta", SqlDbType.Int).Value = CveBancoCuenta
|
||||||
.Add("@CveAlmacen", SqlDbType.Int).Value = CveAlmacen
|
.Add("@CveAlmacen", SqlDbType.Int).Value = CveAlmacen
|
||||||
|
.Add("@Afectable", SqlDbType.Int).Value = Afectable
|
||||||
|
|
||||||
End With
|
End With
|
||||||
Try
|
Try
|
||||||
@@ -6398,5 +6399,26 @@ Public Class ClsContabilidad
|
|||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
|
Public Function UpdateTraspasoPrepoliza(CveEmpresa As Integer, CveCuenta As Integer, CveCuentaNueva As Integer) As Boolean
|
||||||
|
Dim Retorno = False
|
||||||
|
|
||||||
|
DataAdapter("PA_Conta_Traspaso_Prepolizas")
|
||||||
|
|
||||||
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
|
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||||
|
.Add("@CveCuenta", SqlDbType.Int).Value = CveCuenta
|
||||||
|
.Add("@CveCuentaNueva", SqlDbType.Int).Value = CveCuentaNueva
|
||||||
|
|
||||||
|
End With
|
||||||
|
Try
|
||||||
|
SqlAdapter.Fill(Data)
|
||||||
|
Retorno = True
|
||||||
|
Catch ex As Exception
|
||||||
|
Me.OnError("Ocurrió un error al obtener traspasar las Prepolizas", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||||
|
End Try
|
||||||
|
|
||||||
|
Return Retorno
|
||||||
|
End Function
|
||||||
|
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
@@ -4680,6 +4680,8 @@ Public Class ClsPaginas
|
|||||||
PaginaDict.Add("/Inventarios/RepTraspasoAlmacen.aspx".ToUpper(), 688)
|
PaginaDict.Add("/Inventarios/RepTraspasoAlmacen.aspx".ToUpper(), 688)
|
||||||
PaginaDict.Add("/Inventarios/EntregasPorRealizar.aspx".ToUpper(), 728)
|
PaginaDict.Add("/Inventarios/EntregasPorRealizar.aspx".ToUpper(), 728)
|
||||||
PaginaDict.Add("/Inventarios/CatAlmacenClasificacionSecciones.aspx".ToUpper(), 764)
|
PaginaDict.Add("/Inventarios/CatAlmacenClasificacionSecciones.aspx".ToUpper(), 764)
|
||||||
|
PaginaDict.Add("/Inventarios/ReconstruirCostos.aspx".ToUpper(), 764)
|
||||||
|
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
#Region "MF"
|
#Region "MF"
|
||||||
|
|||||||
@@ -125,15 +125,14 @@
|
|||||||
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender2" runat="server" HighlightCssClass="vco" TargetControlID="CompareValidator1" Width="350px"></ajax:ValidatorCalloutExtender>
|
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender2" runat="server" HighlightCssClass="vco" TargetControlID="CompareValidator1" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="col-md-3" style="align-content: flex-end;">
|
||||||
|
<div runat="server" id="divLabelTotal" style="width:100%;text-align:right;font-size:1.5em" visible="false">
|
||||||
|
<asp:label runat="server">Importe seleccionado: $</asp:label><asp:label runat="server" ID="lblValorTotal">00.00</asp:label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<br />
|
<div style="height:550px;overflow-x:scroll">
|
||||||
<br />
|
|
||||||
<div runat="server" id="divLabelTotal" style="width:100%;text-align:right;font-size:1.5em" visible="false">
|
|
||||||
<asp:label runat="server">Importe seleccionado: $</asp:label><asp:label runat="server" ID="lblValorTotal">00.00</asp:label>
|
|
||||||
</div>
|
|
||||||
<br />
|
|
||||||
<div style="height:575px;overflow-x:scroll">
|
|
||||||
<asp:GridView ID="GvFacturas" runat="server" AutoGenerateColumns="False" DataKeyNames="CveVenta, CvePrePoliza, CveIE, TipoCambio, CveMoneda, CveCliente, IdCtaContableBancos, IdCtaContClientes, Importe" CssClass="table table-striped table-advance table-hover" Style="text-align: center; float: right; width: 100%; font-size: medium;" GridLines="None">
|
<asp:GridView ID="GvFacturas" runat="server" AutoGenerateColumns="False" DataKeyNames="CveVenta, CvePrePoliza, CveIE, TipoCambio, CveMoneda, CveCliente, IdCtaContableBancos, IdCtaContClientes, Importe" CssClass="table table-striped table-advance table-hover" Style="text-align: center; float: right; width: 100%; font-size: medium;" GridLines="None">
|
||||||
<Columns>
|
<Columns>
|
||||||
<asp:TemplateField>
|
<asp:TemplateField>
|
||||||
|
|||||||
@@ -431,6 +431,10 @@ Partial Class Compras_ReembolsosComprobaciones
|
|||||||
|
|
||||||
Next
|
Next
|
||||||
|
|
||||||
|
'rmf. codigo temporal
|
||||||
|
If UsuarioActual.CveEmpresa.Contiene(13, 83) Then
|
||||||
|
ValFechaDocumento = False
|
||||||
|
End If
|
||||||
|
|
||||||
If ValFechaDocumento Then
|
If ValFechaDocumento Then
|
||||||
Alert(FoliosFechasValFechaDocumento.ToString, TipoMensaje.MsgAdvertencia)
|
Alert(FoliosFechasValFechaDocumento.ToString, TipoMensaje.MsgAdvertencia)
|
||||||
|
|||||||
@@ -225,7 +225,7 @@
|
|||||||
|
|
||||||
|
|
||||||
<br />
|
<br />
|
||||||
<asp:Button ID="Guardar" CssClass="btn btn-primary" Visible="false" runat="server" Text="Guardar" />
|
<asp:Button ID="Guardar" CssClass="btn btn-primary" Visible="false" runat="server" Text="Guardar" data-toggle="confirmation" data-popout="true" data-original-title="<b>Verifique los datos para continuar</b>. <br/><br/> <center>¿Seguro de registrar esta cuenta nueva?</center>" data-btn-ok-label="si" />
|
||||||
<asp:Button ID="nuevacuenta" CssClass="btn btn-success" Visible="false" runat="server" Text="Guardar" />
|
<asp:Button ID="nuevacuenta" CssClass="btn btn-success" Visible="false" runat="server" Text="Guardar" />
|
||||||
<asp:Button ID="BtnEliminar" CssClass="btn btn-danger" Visible="false" runat="server" Text="Eliminar" OnClientClick="return confirm('Esta seguro de eliminar la cuenta?')" />
|
<asp:Button ID="BtnEliminar" CssClass="btn btn-danger" Visible="false" runat="server" Text="Eliminar" OnClientClick="return confirm('Esta seguro de eliminar la cuenta?')" />
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
|||||||
@@ -31,6 +31,24 @@ Partial Class Contabilidad2_CatCuentas
|
|||||||
ViewState("idsel") = value
|
ViewState("idsel") = value
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
Private Property CvePadre As Integer
|
||||||
|
Get
|
||||||
|
Return ViewState("CvePadre").ToString.ToEntero()
|
||||||
|
End Get
|
||||||
|
Set(value As Integer)
|
||||||
|
ViewState("CvePadre") = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private Property Afectable As Boolean
|
||||||
|
Get
|
||||||
|
Return ViewState("Afectable").ToString
|
||||||
|
End Get
|
||||||
|
Set(value As Boolean)
|
||||||
|
ViewState("Afectable") = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
#Region "Contabilidadnew"
|
#Region "Contabilidadnew"
|
||||||
Private Property CveProveedor As Integer
|
Private Property CveProveedor As Integer
|
||||||
Get
|
Get
|
||||||
@@ -168,6 +186,7 @@ Partial Class Contabilidad2_CatCuentas
|
|||||||
Protected Sub agregar_Click(sender As Object, e As EventArgs) Handles ArbolCuentas.addclick
|
Protected Sub agregar_Click(sender As Object, e As EventArgs) Handles ArbolCuentas.addclick
|
||||||
LimpiarCampos()
|
LimpiarCampos()
|
||||||
Dim dt As New DataTable
|
Dim dt As New DataTable
|
||||||
|
|
||||||
'IDSelected = HdnID.Value.ToEntero() "ul" + itempadre.Cve;
|
'IDSelected = HdnID.Value.ToEntero() "ul" + itempadre.Cve;
|
||||||
Dim obj As ADServerControl.DragableItem = DirectCast(sender, ADServerControl.DragableItem)
|
Dim obj As ADServerControl.DragableItem = DirectCast(sender, ADServerControl.DragableItem)
|
||||||
IDSelected = obj.Cve
|
IDSelected = obj.Cve
|
||||||
@@ -182,6 +201,12 @@ Partial Class Contabilidad2_CatCuentas
|
|||||||
DTcuenta.SelectedValue = dr("Tipo").ToString()
|
DTcuenta.SelectedValue = dr("Tipo").ToString()
|
||||||
DcuentaMayor.SelectedValue = dr("CtaMayor").ToString
|
DcuentaMayor.SelectedValue = dr("CtaMayor").ToString
|
||||||
LblSubCuenta.Text = dr("Nombre").ToString
|
LblSubCuenta.Text = dr("Nombre").ToString
|
||||||
|
Afectable = dr("Afectable").ToString
|
||||||
|
CvePadre = dr("CvePadre").ToString.ToEntero
|
||||||
|
End If
|
||||||
|
|
||||||
|
If Afectable Then
|
||||||
|
Alert("Se va crear una subcuenta en una cuenta afectable", TipoMensaje.MsgAdvertencia)
|
||||||
End If
|
End If
|
||||||
TxtCuenta.Enabled = True
|
TxtCuenta.Enabled = True
|
||||||
|
|
||||||
@@ -298,7 +323,6 @@ Partial Class Contabilidad2_CatCuentas
|
|||||||
Dim CveAlmacen As Integer = DdlAlmacen.SelectedValue.ToEntero()
|
Dim CveAlmacen As Integer = DdlAlmacen.SelectedValue.ToEntero()
|
||||||
|
|
||||||
If DdlAgrupadorSAT.SelectedValue.ToEntero > 0 Then
|
If DdlAgrupadorSAT.SelectedValue.ToEntero > 0 Then
|
||||||
|
|
||||||
If ObjConta.UpdateCuenta(IDSelected.ToEntero, Tnombre.Text, DTcuenta.SelectedValue.ToString, DcuentaMayor.SelectedValue.ToString.ToEntero, DdlMoneda.SelectedValue.ToEntero,
|
If ObjConta.UpdateCuenta(IDSelected.ToEntero, Tnombre.Text, DTcuenta.SelectedValue.ToString, DcuentaMayor.SelectedValue.ToString.ToEntero, DdlMoneda.SelectedValue.ToEntero,
|
||||||
TxtDigAgrup.Text.ToString.ToEntero, DdlAgrupadorSAT.SelectedValue.ToEntero, TxtNomIngles.Text.ToString, CveConceptoAdmin:=CveConceptoAdmin,
|
TxtDigAgrup.Text.ToString.ToEntero, DdlAgrupadorSAT.SelectedValue.ToEntero, TxtNomIngles.Text.ToString, CveConceptoAdmin:=CveConceptoAdmin,
|
||||||
CveProveedor:=CveProveedor, CveCliente:=CveCliente, CveClasificacion:=CveClasificacion, PorcentajeImpuesto:=PorcentajeImpuesto,
|
CveProveedor:=CveProveedor, CveCliente:=CveCliente, CveClasificacion:=CveClasificacion, PorcentajeImpuesto:=PorcentajeImpuesto,
|
||||||
@@ -372,18 +396,66 @@ Partial Class Contabilidad2_CatCuentas
|
|||||||
|
|
||||||
'Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa)
|
'Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||||
Dim ObjConta As New ClsContabilidad
|
Dim ObjConta As New ClsContabilidad
|
||||||
|
|
||||||
Dim ObjConta2 As ClsContPAQi
|
|
||||||
|
|
||||||
|
|
||||||
Dim CuentaEfectivo As Integer = 0
|
Dim CuentaEfectivo As Integer = 0
|
||||||
Dim Afectable As Integer = 1 'If(DcuentaMayor.SelectedValue <> 2, 0, 1) ' cuando sea tipo 2, va a ser afectable
|
Dim Afectable As Integer = 1 'If(DcuentaMayor.SelectedValue <> 2, 0, 1) ' cuando sea tipo 2, va a ser afectable
|
||||||
Tcuenta.Text.Replace("-", "")
|
Tcuenta.Text.Replace("-", "")
|
||||||
Dim idnew As Integer = 0
|
Dim idnew As Integer = 0
|
||||||
|
|
||||||
|
Dim CveConceptoContable As Integer = DdlConcepto.SelectedValue.ToEntero()
|
||||||
|
Dim row As DataRow = Nothing
|
||||||
|
Dim CveTipoSaldo As Integer = 0
|
||||||
|
Dim PorcentajeIVA As Decimal = -1
|
||||||
|
Dim drt As DataRow
|
||||||
|
Dim CveConceptoAdmin As Integer = -1
|
||||||
|
Dim CveProveedor As Integer = -1
|
||||||
|
Dim CveCliente As Integer = -1
|
||||||
|
Dim CveClasificacion As Integer = -1
|
||||||
|
Dim PorcentajeImpuesto As Decimal = -1
|
||||||
|
Dim CveBancoCuenta As Integer = -1
|
||||||
|
Dim CveAlmacen As Integer = -1
|
||||||
|
Dim CvePersonal As Integer = -1
|
||||||
|
|
||||||
If DdlAgrupadorSAT.SelectedValue.ToEntero > 0 Then
|
If DdlAgrupadorSAT.SelectedValue.ToEntero > 0 Then
|
||||||
idnew = ObjConta.AddCuenta(IDSelected, TxtCuenta.Text.Replace("-", ""), Tnombre.Text, DTcuenta.SelectedValue.ToString, DcuentaMayor.SelectedValue.ToString.ToEntero,
|
|
||||||
DdlMoneda.SelectedValue.ToEntero, TxtDigAgrup.Text.ToEntero, DdlAgrupadorSAT.SelectedValue.ToEntero, TxtNomIngles.Text.ToString)
|
If CveConceptoContable > 0 Then
|
||||||
|
row = DtConceptosconta.FiltroPrimero(String.Format("CveConceptoContable={0}", CveConceptoContable))
|
||||||
|
CveTipoSaldo = row("CveTipoSaldo").ToString.ToEntero()
|
||||||
|
End If
|
||||||
|
If Not IsNothing(row) Then
|
||||||
|
If CveTipoSaldo = 3 Then
|
||||||
|
PorcentajeIVA = TxtPorcentaje.ToEntero / 100
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
If Afectable Then
|
||||||
|
If ObjConta.GetCuentas(IDSelected, "-1", -1, UsuarioActual.CveEmpresa) Then
|
||||||
|
drt = ObjConta.DtResultados.FiltroPrimero(String.Format("CveCuenta={0}", IDSelected))
|
||||||
|
CveConceptoAdmin = IIf(drt("CveConceptoAdmin").ToString.ToEntero = 0, -1, drt("CveConceptoAdmin").ToString.ToEntero)
|
||||||
|
CveProveedor = IIf(drt("CveProveedor").ToString.ToEntero = 0, -1, drt("CveProveedor").ToString.ToEntero)
|
||||||
|
CveCliente = IIf(drt("CveCliente").ToString.ToEntero = 0, -1, drt("CveCliente").ToString.ToEntero)
|
||||||
|
CveClasificacion = IIf(drt("CveClasificacion").ToString.ToEntero = 0, -1, drt("CveClasificacion").ToString.ToEntero)
|
||||||
|
PorcentajeImpuesto = IIf(drt("PorcentajeImpuesto").ToString.ToEntero = 0, -1, drt("PorcentajeImpuesto").ToString.ToEntero)
|
||||||
|
CveBancoCuenta = IIf(drt("CveBancoCuenta").ToString.ToEntero = 0, -1, drt("CveBancoCuenta").ToString.ToEntero)
|
||||||
|
'CveAlmacen = IIf(drt("CveAlmacen").ToString.ToEntero = 0, -1, drt("CveAlmacen").ToString.ToEntero)
|
||||||
|
'CvePersonal = IIf(drt("CvePersonal").ToString.ToEntero = 0, -1, drt("CvePersonal").ToString.ToEntero)
|
||||||
|
End If
|
||||||
|
|
||||||
|
idnew = ObjConta.AddCuenta(CvePadre, TxtCuenta.Text.Replace("-", ""), Tnombre.Text, DTcuenta.SelectedValue.ToString, DcuentaMayor.SelectedValue.ToString.ToEntero,
|
||||||
|
DdlMoneda.SelectedValue.ToEntero, TxtDigAgrup.Text.ToEntero, DdlAgrupadorSAT.SelectedValue.ToEntero, TxtNomIngles.Text.ToString, CveConceptoAdmin:=CveConceptoAdmin, CveProveedor:=CveProveedor, CveCliente:=CveCliente,
|
||||||
|
CveClasificacion:=CveClasificacion, PorcentajeImpuesto:=PorcentajeImpuesto, CveBancoCuenta:=CveBancoCuenta)
|
||||||
|
If idnew > 0 Then
|
||||||
|
If ObjConta.UpdateTraspasoPrepoliza(UsuarioActual.CveEmpresa, IDSelected, idnew) Then
|
||||||
|
ObjConta.RollBack()
|
||||||
|
ObjConta.Dispose()
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
Else
|
||||||
|
idnew = ObjConta.AddCuenta(IDSelected, TxtCuenta.Text.Replace("-", ""), Tnombre.Text, DTcuenta.SelectedValue.ToString, DcuentaMayor.SelectedValue.ToString.ToEntero,
|
||||||
|
DdlMoneda.SelectedValue.ToEntero, TxtDigAgrup.Text.ToEntero, DdlAgrupadorSAT.SelectedValue.ToEntero, TxtNomIngles.Text.ToString, PorcentajeImpuesto:=PorcentajeIVA)
|
||||||
|
End If
|
||||||
|
|
||||||
Else
|
Else
|
||||||
Alert("Es necesario agregar el campo 'Agrupador SAT'", TipoMensaje.MsgError)
|
Alert("Es necesario agregar el campo 'Agrupador SAT'", TipoMensaje.MsgError)
|
||||||
End If
|
End If
|
||||||
@@ -401,14 +473,12 @@ Partial Class Contabilidad2_CatCuentas
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
Dim codigoPadre As String = DtDatos.FiltroPrimeroValor("Codigo", $"CveCuenta={IDSelected}") 'Tsubcuenta.Text
|
codigoPadre = DtDatos.FiltroPrimeroValor("Codigo", $"CveCuenta={IDSelected}") 'Tsubcuenta.Text
|
||||||
If UsuarioActual.Empresa.TipoContabilidad = 2 Then
|
If UsuarioActual.Empresa.TipoContabilidad = 2 Then
|
||||||
ObjConta2 = New ClsContPAQi(UsuarioActual.Empresa)
|
ObjConta2 = New ClsContPAQi(UsuarioActual.Empresa)
|
||||||
|
|
||||||
If ObjConta2.GetCuentas(-1, "-1", -1) Then
|
If ObjConta2.GetCuentas(-1, "-1", -1) Then
|
||||||
Dim IdPadre As Integer = ObjConta2.DtResultados.FiltroPrimeroValor("Id", $"Codigo='{codigoPadre}'").ToEntero
|
IdPadre = ObjConta2.DtResultados.FiltroPrimeroValor("Id", $"Codigo='{codigoPadre}'").ToEntero
|
||||||
Dim IdAgrupador As Integer
|
|
||||||
|
|
||||||
If ObjConta2.GetAgrupadoresSAT() Then
|
If ObjConta2.GetAgrupadoresSAT() Then
|
||||||
IdAgrupador = ObjConta2.DtResultados.FiltroPrimeroValor("Id", $"CodigoNombre='{DdlAgrupadorSAT.SelectedItem.Text}'").ToEntero
|
IdAgrupador = ObjConta2.DtResultados.FiltroPrimeroValor("Id", $"CodigoNombre='{DdlAgrupadorSAT.SelectedItem.Text}'").ToEntero
|
||||||
End If
|
End If
|
||||||
@@ -453,17 +523,20 @@ Partial Class Contabilidad2_CatCuentas
|
|||||||
End If
|
End If
|
||||||
ArbolCuentas.additem(objul, idnew, IDSelected, String.Format("{0} - {1}", TxtCuenta.Text, Tnombre.Text))
|
ArbolCuentas.additem(objul, idnew, IDSelected, String.Format("{0} - {1}", TxtCuenta.Text, Tnombre.Text))
|
||||||
|
|
||||||
LimpiarCampos()
|
|
||||||
updatos.Update()
|
|
||||||
CargaDatos()
|
CargaDatos()
|
||||||
|
|
||||||
Alert("La cuenta se guardo correctamente")
|
|
||||||
End If
|
End If
|
||||||
|
If ObjConta2 IsNot Nothing Then ObjConta2.Dispose()
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
LimpiarCampos()
|
||||||
|
updatos.Update()
|
||||||
|
Alert("La cuenta se guardo correctamente")
|
||||||
|
|
||||||
End If
|
End If
|
||||||
ObjConta.Dispose()
|
ObjConta.Dispose()
|
||||||
|
|
||||||
If ObjConta2 IsNot Nothing Then ObjConta2.Dispose()
|
|
||||||
|
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
@@ -564,6 +637,7 @@ Partial Class Contabilidad2_CatCuentas
|
|||||||
Case 2
|
Case 2
|
||||||
pnlOpcion2.Visible = True
|
pnlOpcion2.Visible = True
|
||||||
Case 3
|
Case 3
|
||||||
|
pnlOpcion2.Visible = True
|
||||||
pnlOpcion3.Visible = True
|
pnlOpcion3.Visible = True
|
||||||
If DdlClasificacion.Items.Count < 2 Then
|
If DdlClasificacion.Items.Count < 2 Then
|
||||||
DdlClasificacion.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa, UsoClasificacion:=1)
|
DdlClasificacion.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa, UsoClasificacion:=1)
|
||||||
|
|||||||
@@ -88,7 +88,7 @@
|
|||||||
<asp:TemplateField ItemStyle-Width="7%">
|
<asp:TemplateField ItemStyle-Width="7%">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<%--<asp:Literal ID="LtlExistencia" runat="server" Text='<%# Eval("Existencia").ToString().Split("."c)(0) %>'></asp:Literal>--%>
|
<%--<asp:Literal ID="LtlExistencia" runat="server" Text='<%# Eval("Existencia").ToString().Split("."c)(0) %>'></asp:Literal>--%>
|
||||||
<asp:TextBox ID="TxtCantidad" runat="server" Text='<%# Eval("Existencia").ToString().Split("."c)(0) %>' Width="45px" style='text-align:right;' />
|
<asp:TextBox ID="TxtCantidad" runat="server" Text='<%# Eval("Existencia", "{0:#,###.###}") %>' Width="45px" style='text-align:right;' />
|
||||||
<asp:RangeValidator ID="RVR" Display="Dynamic" ControlToValidate="TxtCantidad" runat="server" MinimumValue="0" Type="Double" ErrorMessage="No cumple con la cantidad especificada"></asp:RangeValidator>
|
<asp:RangeValidator ID="RVR" Display="Dynamic" ControlToValidate="TxtCantidad" runat="server" MinimumValue="0" Type="Double" ErrorMessage="No cumple con la cantidad especificada"></asp:RangeValidator>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
|
|||||||
@@ -212,11 +212,11 @@ Partial Class Inventarios_AjustesSeccionAlmacen
|
|||||||
Next
|
Next
|
||||||
|
|
||||||
'inserto la prepoliza
|
'inserto la prepoliza
|
||||||
If CveMovimientoEntrada > 0 AndAlso CveMovimientoSalida > 0 Then
|
If Not ErrorMovInv AndAlso CveMovimientoEntrada > 0 AndAlso CveMovimientoSalida > 0 Then
|
||||||
Dim Concepto As String = "Ajuste Sección"
|
Dim Concepto As String = "Ajuste Sección"
|
||||||
Dim IdCtaContableOrigen As Integer = 0
|
Dim IdCtaContableOrigen As Integer = 0
|
||||||
Dim CvePrePoliza As Integer = ObjConta.AddPrePolizas("Inventario/AjusteAlmacen", 53, 0, 0, 1, Fecha, Concepto, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
Dim CvePrePoliza As Integer = ObjConta.AddPrePolizas("Inventario/AjusteAlmacen", 53, 0, 0, 1, Fecha, Concepto, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||||
Dim importe As Decimal = resultado.SUMD("Total").RoundAD
|
Dim importe As Decimal = resultado.SUMD("Total").RoundSQL
|
||||||
Dim contabilizable As Boolean = False
|
Dim contabilizable As Boolean = False
|
||||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, importe, Concepto, 68, Concepto, Fecha, IdCtaContableOrigen, -1, CveMovimientoAlmacen:=CveMovimientoSalida, Contabilizable:=contabilizable, ImporteMX:=importe) Then
|
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, importe, Concepto, 68, Concepto, Fecha, IdCtaContableOrigen, -1, CveMovimientoAlmacen:=CveMovimientoSalida, Contabilizable:=contabilizable, ImporteMX:=importe) Then
|
||||||
ErrorMovInv = True
|
ErrorMovInv = True
|
||||||
|
|||||||
@@ -4581,6 +4581,7 @@ Partial Class Inventarios_EntradasSalidas
|
|||||||
NumRow = 0
|
NumRow = 0
|
||||||
Dim RowNoEncontrados As String = ""
|
Dim RowNoEncontrados As String = ""
|
||||||
Dim NumAgregados As Integer = 0
|
Dim NumAgregados As Integer = 0
|
||||||
|
Dim PSTemp As DataTable = GlobalDTPS(UsuarioActual.CveEmpresa)
|
||||||
|
|
||||||
For Each Row As DataRow In dt.Rows
|
For Each Row As DataRow In dt.Rows
|
||||||
Dim Cantidad As Decimal = Row("Cantidad").ToString.ToDecimal
|
Dim Cantidad As Decimal = Row("Cantidad").ToString.ToDecimal
|
||||||
@@ -4596,6 +4597,7 @@ Partial Class Inventarios_EntradasSalidas
|
|||||||
|
|
||||||
Dim CvePS As Integer = 0
|
Dim CvePS As Integer = 0
|
||||||
Dim CveUM As Integer = 0
|
Dim CveUM As Integer = 0
|
||||||
|
Dim DataTemp As DataTable
|
||||||
|
|
||||||
NumRow = NumRow + 1
|
NumRow = NumRow + 1
|
||||||
|
|
||||||
@@ -4607,36 +4609,48 @@ Partial Class Inventarios_EntradasSalidas
|
|||||||
|
|
||||||
|
|
||||||
If Codigo <> "" Then
|
If Codigo <> "" Then
|
||||||
Dim StrArray() As String = GetPS("Codigo", Codigo).Split("|"c)
|
DataTemp = PSTemp.FiltraParametros(String.Format("Codigo = '{0}'", Codigo))
|
||||||
If StrArray.Length > 0 Then
|
CvePS = DataTemp.FiltroPrimeroValor("CvePS", "").ToEntero
|
||||||
If CBool(StrArray(0)) = True Then
|
DataTemp.Dispose()
|
||||||
CvePS = StrArray(1).ToEntero
|
If CvePS = 0 Then
|
||||||
Else
|
RowNoEncontrados &= Codigo & "<\BR>"
|
||||||
RowNoEncontrados &= StrArray(1) & "<\BR>"
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
'ElseIf CodigoBarras <> "" Then
|
|
||||||
' Dim StrArray() As String = GetPS("CodigoBarras", CodigoBarras).Split("|"c)
|
|
||||||
' If StrArray.Length > 0 Then
|
|
||||||
' If CBool(StrArray(0)) = True Then
|
|
||||||
' CvePS = StrArray(1).ToEntero
|
|
||||||
' Else
|
|
||||||
' RowNoEncontrados &= StrArray(1) & "<\BR>"
|
|
||||||
' End If
|
|
||||||
' End If
|
|
||||||
ElseIf ProductoServicio <> "" Then
|
|
||||||
Dim StrArray() As String = GetPS("PS", ProductoServicio).Split("|"c)
|
|
||||||
If StrArray.Length > 0 Then
|
|
||||||
If CBool(StrArray(0)) = True Then
|
|
||||||
CvePS = StrArray(1).ToEntero
|
|
||||||
Else
|
|
||||||
RowNoEncontrados &= StrArray(1) & "<\BR>"
|
|
||||||
End If
|
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
RowNoEncontrados &= "<\BR> - En la fila " & NumRow & " no se especificó código, código de barras ó descripción."
|
RowNoEncontrados &= "<\BR> - En la fila " & NumRow & " no se especificó código, código de barras ó descripción."
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
'If Codigo <> "" Then
|
||||||
|
' Dim StrArray() As String = GetPS("Codigo", Codigo).Split("|"c)
|
||||||
|
' If StrArray.Length > 0 Then
|
||||||
|
' If CBool(StrArray(0)) = True Then
|
||||||
|
' CvePS = StrArray(1).ToEntero
|
||||||
|
' Else
|
||||||
|
' RowNoEncontrados &= StrArray(1) & "<\BR>"
|
||||||
|
' End If
|
||||||
|
' End If
|
||||||
|
' 'ElseIf CodigoBarras <> "" Then
|
||||||
|
' ' Dim StrArray() As String = GetPS("CodigoBarras", CodigoBarras).Split("|"c)
|
||||||
|
' ' If StrArray.Length > 0 Then
|
||||||
|
' ' If CBool(StrArray(0)) = True Then
|
||||||
|
' ' CvePS = StrArray(1).ToEntero
|
||||||
|
' ' Else
|
||||||
|
' ' RowNoEncontrados &= StrArray(1) & "<\BR>"
|
||||||
|
' ' End If
|
||||||
|
' ' End If
|
||||||
|
'ElseIf ProductoServicio <> "" Then
|
||||||
|
' Dim StrArray() As String = GetPS("PS", ProductoServicio).Split("|"c)
|
||||||
|
' If StrArray.Length > 0 Then
|
||||||
|
' If CBool(StrArray(0)) = True Then
|
||||||
|
' CvePS = StrArray(1).ToEntero
|
||||||
|
' Else
|
||||||
|
' RowNoEncontrados &= StrArray(1) & "<\BR>"
|
||||||
|
' End If
|
||||||
|
' End If
|
||||||
|
'Else
|
||||||
|
' RowNoEncontrados &= "<\BR> - En la fila " & NumRow & " no se especificó código, código de barras ó descripción."
|
||||||
|
'End If
|
||||||
|
|
||||||
If CvePS > 0 Then
|
If CvePS > 0 Then
|
||||||
Dim DrPS As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePS).Rows(0)
|
Dim DrPS As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePS).Rows(0)
|
||||||
|
|
||||||
@@ -4644,7 +4658,6 @@ Partial Class Inventarios_EntradasSalidas
|
|||||||
CveUM = DrPS("CveUnidadMedida").ToString().ToEntero()
|
CveUM = DrPS("CveUnidadMedida").ToString().ToEntero()
|
||||||
UM = GlobalDTUnidadesMedida(UsuarioActual.CveEmpresa).FiltroPrimeroValor("UnidadMedida", $"CveUnidadMedida={CveUM}")
|
UM = GlobalDTUnidadesMedida(UsuarioActual.CveEmpresa).FiltroPrimeroValor("UnidadMedida", $"CveUnidadMedida={CveUM}")
|
||||||
End If
|
End If
|
||||||
|
|
||||||
AddNew(CvePS, ProductoServicio, CveUM, UM, Cantidad, PrecioUnitario, Serie.Replace(" ", String.Empty), "", "-1", "-1", "",
|
AddNew(CvePS, ProductoServicio, CveUM, UM, Cantidad, PrecioUnitario, Serie.Replace(" ", String.Empty), "", "-1", "-1", "",
|
||||||
Lote, Caducidad.ToDate, CveSeccionAlmacen, SeccionAlmacen, CargarGV:=False)
|
Lote, Caducidad.ToDate, CveSeccionAlmacen, SeccionAlmacen, CargarGV:=False)
|
||||||
|
|
||||||
|
|||||||
@@ -145,7 +145,10 @@
|
|||||||
<asp:LinkButton ID="LnkRegistrarProvision" Visible="false" OnClick="LnkRegistrarProvision_Click" runat="server"><i class="fa fa-thumbs-up" aria-hidden="true"></i>Registrar provisión</asp:LinkButton>
|
<asp:LinkButton ID="LnkRegistrarProvision" Visible="false" OnClick="LnkRegistrarProvision_Click" runat="server"><i class="fa fa-thumbs-up" aria-hidden="true"></i>Registrar provisión</asp:LinkButton>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<asp:HyperLink ID="LnkProvisionNomina" Visible="false" runat="server"><i class="fa fa-eye"></i>Ver provisón</asp:HyperLink>
|
<asp:LinkButton ID="LnkLayoutContable" Visible="false" OnClick="LnkLayoutContable_Click" runat="server"><i class="fa fa-university" aria-hidden="true"></i>Layout banco</asp:LinkButton>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<asp:HyperLink ID="LnkProvisionNomina" Visible="false" runat="server"><i class="fa fa-eye"></i>Ver provisión</asp:HyperLink>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<asp:LinkButton ID="LnkTimbrarTodos" Visible="false" OnClick="LnkTimbrarTodos_Click" runat="server"><i class="fa fa-bell"></i> Timbrar todos</asp:LinkButton>
|
<asp:LinkButton ID="LnkTimbrarTodos" Visible="false" OnClick="LnkTimbrarTodos_Click" runat="server"><i class="fa fa-bell"></i> Timbrar todos</asp:LinkButton>
|
||||||
@@ -187,6 +190,8 @@
|
|||||||
<Triggers>
|
<Triggers>
|
||||||
<asp:PostBackTrigger ControlID="LnkListaRaya" />
|
<asp:PostBackTrigger ControlID="LnkListaRaya" />
|
||||||
<asp:PostBackTrigger ControlID="LnkFormatoTabular" />
|
<asp:PostBackTrigger ControlID="LnkFormatoTabular" />
|
||||||
|
<asp:PostBackTrigger ControlID="LnkLayoutContable" />
|
||||||
|
|
||||||
</Triggers>
|
</Triggers>
|
||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
|
|
||||||
|
|||||||
@@ -11,6 +11,8 @@ using static Extensiones.ModExtensiones;
|
|||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
using iTextSharp.text.pdf;
|
using iTextSharp.text.pdf;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
|
using System.Data.SqlClient;
|
||||||
|
using System.Configuration;
|
||||||
|
|
||||||
public partial class Nomina_Nomina2 : ClsPaginas
|
public partial class Nomina_Nomina2 : ClsPaginas
|
||||||
{
|
{
|
||||||
@@ -370,14 +372,15 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
|||||||
DataRow drow = objnom.DtResultados.Rows[0];
|
DataRow drow = objnom.DtResultados.Rows[0];
|
||||||
int Estatus = drow["Estatus"].ToString().ToEntero();
|
int Estatus = drow["Estatus"].ToString().ToEntero();
|
||||||
int CvePrePolizaProvision = drow["CvePrePolizaProvision"].ToString().ToEntero();
|
int CvePrePolizaProvision = drow["CvePrePolizaProvision"].ToString().ToEntero();
|
||||||
LnkConceptoEmpleado.Visible = true;
|
LnkConceptoEmpleado.Visible = (Estatus == 1);
|
||||||
LnkAutorizar.Visible = (Estatus == 1);
|
LnkAutorizar.Visible = true;// (Estatus == 1);
|
||||||
LnkRegistrarProvision.Visible = (Estatus > 2) && CvePrePolizaProvision<0;
|
LnkRegistrarProvision.Visible = (Estatus > 2) && CvePrePolizaProvision < 0;
|
||||||
LnkConceptoEmpleado.Visible = (Estatus < 2);
|
LnkConceptoEmpleado.Visible = (Estatus < 2);
|
||||||
LnkCargaAsistenciaMasiva.Visible = (Estatus < 2);
|
LnkCargaAsistenciaMasiva.Visible = (Estatus < 2);
|
||||||
LnkModalPlantillaNomina.Visible = (Estatus < 2);
|
LnkModalPlantillaNomina.Visible = (Estatus < 2);
|
||||||
LnkTimbrarTodos.Visible = (Estatus > 1);
|
LnkTimbrarTodos.Visible = (Estatus > 2);
|
||||||
|
|
||||||
|
LnkLayoutContable.Visible = (Estatus > 2);
|
||||||
LnkProvisionNomina.Visible = CvePrePolizaProvision > 0;
|
LnkProvisionNomina.Visible = CvePrePolizaProvision > 0;
|
||||||
LnkProvisionNomina.NavigateUrl = $"../Contabilidad/RegPrePoliza.aspx?CvePrePoliza={CvePrePolizaProvision}&Tipo=NOMPROV";
|
LnkProvisionNomina.NavigateUrl = $"../Contabilidad/RegPrePoliza.aspx?CvePrePoliza={CvePrePolizaProvision}&Tipo=NOMPROV";
|
||||||
UpAccciones.Update();
|
UpAccciones.Update();
|
||||||
@@ -396,7 +399,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
|||||||
continuar = true;
|
continuar = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
LnkTimbrarTodos.Visible = dtempleados.Rows.Count >0 && dtempleados.COUNT("CvePersonal", "SeTimbro=0 AND CvePersonal >0")>0;
|
LnkTimbrarTodos.Visible = dtempleados.Rows.Count > 0 && dtempleados.COUNT("CvePersonal", "SeTimbro=0 AND CvePersonal >0") > 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -2711,7 +2714,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
|||||||
}
|
}
|
||||||
paragraphh = new GemBox.Document.Paragraph(document, string.Format("Fecha Ingr:{0:dd/MM/yyyy}, S.D.:{1:N2}, S.D.I.:{2:N2}, S.B.C.:{3:N2} ", drow2["FechaIngreso"], drow2["SalarioDiario"], drow2["SalarioDiarioIntegrado"], drow2["SalarioDiarioIMSS"])); cell.Blocks.Add(paragraphh);
|
paragraphh = new GemBox.Document.Paragraph(document, string.Format("Fecha Ingr:{0:dd/MM/yyyy}, S.D.:{1:N2}, S.D.I.:{2:N2}, S.B.C.:{3:N2} ", drow2["FechaIngreso"], drow2["SalarioDiario"], drow2["SalarioDiarioIntegrado"], drow2["SalarioDiarioIMSS"])); cell.Blocks.Add(paragraphh);
|
||||||
paragraphh.ParagraphFormat.Style = styilo;
|
paragraphh.ParagraphFormat.Style = styilo;
|
||||||
paragraphh = new GemBox.Document.Paragraph(document, string.Format("Días pagados:{0}, Retardos: {1}, Ausencias:{2} ", drow2["DiasLaborados"], drow2["DiasRetardos"], drow2["DiasFaltados"])); cell.Blocks.Add(paragraphh);
|
paragraphh = new GemBox.Document.Paragraph(document, string.Format("Días pagados:{0}, Retardos: {1}, Ausencias:{2}, Centro de costos: {3}", drow2["DiasLaborados"], drow2["DiasRetardos"], drow2["DiasFaltados"], drow2["SubProyecto"])); cell.Blocks.Add(paragraphh);
|
||||||
paragraphh.ParagraphFormat.Style = styilo;
|
paragraphh.ParagraphFormat.Style = styilo;
|
||||||
|
|
||||||
row = new GemBox.Document.Tables.TableRow(document);
|
row = new GemBox.Document.Tables.TableRow(document);
|
||||||
@@ -5267,11 +5270,421 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
|||||||
|
|
||||||
using (ClsNominas objnom = new ClsNominas())
|
using (ClsNominas objnom = new ClsNominas())
|
||||||
{
|
{
|
||||||
if (objnom.PrimaRiesgoUP(UsuarioActual.CveEmpresa,TxtFechaPRT.Text.ToDateTime(),TxtPrimaRiesgo.Text.ToDecimal()))
|
if (objnom.PrimaRiesgoUP(UsuarioActual.CveEmpresa, TxtFechaPRT.Text.ToDateTime(), TxtPrimaRiesgo.Text.ToDecimal()))
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
loadtablas();
|
loadtablas();
|
||||||
}
|
}
|
||||||
|
private void CrearLayout(DataTable DTNomina)
|
||||||
|
{
|
||||||
|
StringBuilder sb = new StringBuilder();
|
||||||
|
StringBuilder SbErrores = new StringBuilder();
|
||||||
|
bool ErroresValidaciones = false;
|
||||||
|
|
||||||
|
|
||||||
|
SbErrores.AppendLine("Se detectaron los siguientes errores en la generación del layout");
|
||||||
|
|
||||||
|
foreach (DataRow dRow in DTNomina.Rows)
|
||||||
|
{
|
||||||
|
string RFC = dRow["RFC"].ToString();
|
||||||
|
string Nombre = dRow["Nombre"].ToString();
|
||||||
|
string BancoNumCuenta = dRow["BancoNumCuenta"].ToString();
|
||||||
|
decimal Importe = dRow["Importe"].ToString().ToDecimal();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if (RFC.Trim().Length == 0)
|
||||||
|
SbErrores.AppendLine($"El RFC es requerido del empleado {Nombre}<br/>");
|
||||||
|
|
||||||
|
System.Text.RegularExpressions.Match Coincidencia = System.Text.RegularExpressions.Regex.Match(RFC, @"/^([A-Z,Ñ,&]{3,4}([0-9]{2})(0[1-9]|1[0-2])(0[1-9]|1[0-9]|2[0-9]|3[0-1])[A-Z|\d]{3})$/");
|
||||||
|
if (!Coincidencia.Success)
|
||||||
|
{
|
||||||
|
SbErrores.AppendLine($"El RFC {RFC} del empleado {Nombre} no es valido <br/>");
|
||||||
|
ErroresValidaciones = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (BancoNumCuenta.Trim().Length != 10)
|
||||||
|
{
|
||||||
|
SbErrores.AppendLine($"Empleado {Nombre} numero de cuenta incorrecto, la cuenta debe de tener 10 caracteres<br/>"); // Bancomer 10 caracteres
|
||||||
|
ErroresValidaciones = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (Importe <= 0)
|
||||||
|
{
|
||||||
|
SbErrores.AppendLine($"Empleado {Nombre} el importe debe de ser mayor a 0 importe {Importe}"); // importe mayot a 0
|
||||||
|
ErroresValidaciones = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
ErroresValidaciones = false;
|
||||||
|
|
||||||
|
if (!ErroresValidaciones)
|
||||||
|
{
|
||||||
|
int Count = 1;
|
||||||
|
foreach (DataRow dRow in DTNomina.Rows)
|
||||||
|
{
|
||||||
|
StringBuilder SbLinea = new StringBuilder();
|
||||||
|
|
||||||
|
string RFC = dRow["RFC"].ToString();
|
||||||
|
string Nombre = dRow["Nombre"].ToString();
|
||||||
|
string BancoNumCuenta = dRow["BancoNumCuenta"].ToString();
|
||||||
|
decimal Importe = dRow["Importe"].ToString().ToDecimal().RoundSQL(2);
|
||||||
|
|
||||||
|
SbLinea.Append(Count.ToString("000000000"));
|
||||||
|
SbLinea.Append(RFC.Trim().PadRight(16));
|
||||||
|
SbLinea.Append("03");
|
||||||
|
SbLinea.Append(BancoNumCuenta.Trim().PadRight(20));
|
||||||
|
SbLinea.Append(Importe.ToString("0000000000000.00").Replace(".", ""));
|
||||||
|
|
||||||
|
|
||||||
|
if (Nombre.Trim().Length > 40)
|
||||||
|
Nombre = Nombre.Substring(0, 40);
|
||||||
|
|
||||||
|
SbLinea.Append(Nombre.Trim().PadRight(40));
|
||||||
|
|
||||||
|
SbLinea.Append("012");
|
||||||
|
SbLinea.Append("000");
|
||||||
|
|
||||||
|
sb.AppendLine(SbLinea.ToString());
|
||||||
|
|
||||||
|
|
||||||
|
Count = Count + 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Response.Clear();
|
||||||
|
Response.ClearHeaders();
|
||||||
|
Response.AppendHeader("Content-Length", sb.ToString());
|
||||||
|
Response.ContentType = "text/plain";
|
||||||
|
//Response.AppendHeader("Content-Disposition", $"attachment;filename=\"Nomina{DateTime.Now.ToString("yyyyMMddhhmmss").ToString()}.txt\"");
|
||||||
|
Response.AppendHeader("Content-Disposition", $"attachment;filename=\"Nomina {DdlPeriodo.SelectedItem.Text }.txt\"");
|
||||||
|
Response.Write(sb.ToString());
|
||||||
|
Response.End();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
Alert(SbErrores.ToString(), TipoMensaje.MsgAdvertencia);
|
||||||
|
}
|
||||||
|
protected void LnkLayoutContable_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
|
||||||
|
using (ClsClaseBasez objbase = new ClsClaseBasez())
|
||||||
|
{
|
||||||
|
if (objbase.runQuerystr($"PA_NomDispersiondenomina @CvePeriodo ={CvePeriodoSeleccionado}, @CveEmpresa ={UsuarioActual.CveEmpresa}"))
|
||||||
|
{
|
||||||
|
CrearLayout(objbase.DtResultados);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class ClsClaseBasez : IDisposable
|
||||||
|
{
|
||||||
|
protected SqlConnection SqlConexion;
|
||||||
|
protected SqlDataAdapter SqlAdapter;
|
||||||
|
protected DataTable datos;
|
||||||
|
protected DataSet DTSet;
|
||||||
|
public DataTable DtResultados
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return datos;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public DataSet DTSetResultados
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return DTSet;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
protected bool disposedValue = false;
|
||||||
|
protected bool EsTransaccion = false;
|
||||||
|
public string MyCurrentError;
|
||||||
|
// REGISTRAR CONEXIÓN
|
||||||
|
private int CveConexion = 0;
|
||||||
|
|
||||||
|
public ClsClaseBasez(ClsClaseBasez adsObj = null)
|
||||||
|
{
|
||||||
|
if (adsObj != null && adsObj.SqlAdapter != null && adsObj.SqlAdapter.SelectCommand != null && adsObj.SqlAdapter.SelectCommand.Transaction != null)
|
||||||
|
{
|
||||||
|
SqlConexion = adsObj.SqlConexion;
|
||||||
|
SqlAdapter = adsObj.SqlAdapter;
|
||||||
|
EsTransaccion = true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
SqlConexion = new SqlConnection();
|
||||||
|
SqlConexion.ConnectionString = ConfigurationManager.ConnectionStrings["Conexion"].ConnectionString;
|
||||||
|
try
|
||||||
|
{
|
||||||
|
SqlConexion.Open();
|
||||||
|
SqlAdapter = new SqlDataAdapter("", SqlConexion);
|
||||||
|
ConexionAdd();
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
this.OnError("Ocurrió un error al intentar conectarse a la base de datos.", ex);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void SqlDataAdapter(string StrSQL, CommandType TipoComando = CommandType.StoredProcedure)
|
||||||
|
{
|
||||||
|
if (SqlConexion.State == ConnectionState.Open)
|
||||||
|
{
|
||||||
|
SqlAdapter.SelectCommand.Parameters.Clear();
|
||||||
|
SqlAdapter.SelectCommand.CommandText = StrSQL;
|
||||||
|
SqlAdapter.SelectCommand.CommandType = TipoComando;
|
||||||
|
datos = new DataTable();
|
||||||
|
DTSet = new DataSet();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
protected void DataAdapter(string StrSQL, CommandType TipoComando = CommandType.Text)
|
||||||
|
{
|
||||||
|
|
||||||
|
// if (SqlAdapter.SelectCommand == null)
|
||||||
|
// {
|
||||||
|
// if ((sqlCommand != null))
|
||||||
|
// {
|
||||||
|
// SqlAdapter.SelectCommand = sqlCommand;
|
||||||
|
// }
|
||||||
|
// else
|
||||||
|
// {
|
||||||
|
// SqlAdapter.SelectCommand = new SqlCommand();
|
||||||
|
// }
|
||||||
|
// SqlAdapter.SelectCommand.Connection = SqlConexion;
|
||||||
|
// }
|
||||||
|
|
||||||
|
if (SqlConexion.State == ConnectionState.Open)
|
||||||
|
{
|
||||||
|
SqlAdapter.SelectCommand.Parameters.Clear();
|
||||||
|
SqlAdapter.SelectCommand.CommandText = StrSQL;
|
||||||
|
SqlAdapter.SelectCommand.CommandType = TipoComando;
|
||||||
|
datos = new DataTable();
|
||||||
|
DTSet = new DataSet();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void ConexionAdd()
|
||||||
|
{
|
||||||
|
if (ConfigurationManager.AppSettings["RegistraConexion"] != null && ConfigurationManager.AppSettings["RegistraConexion"].ToString() == "1")
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
SqlDataAdapter("PA_Sis_RegistrarConexion");
|
||||||
|
{
|
||||||
|
var withBlock = SqlAdapter.SelectCommand.Parameters;
|
||||||
|
withBlock.Add("@Clase", SqlDbType.VarChar).Value = this.GetType().Name;
|
||||||
|
withBlock.Add("@Modulo", SqlDbType.VarChar).Value = string.Format("{0}?{1}", HttpContext.Current.Request.Url.AbsolutePath.ToString(), HttpContext.Current.Request.QueryString.ToString());
|
||||||
|
withBlock.Add("@IDConexion", SqlDbType.Int).Direction = ParameterDirection.Output;
|
||||||
|
}
|
||||||
|
SqlAdapter.Fill(datos);
|
||||||
|
CveConexion = SqlAdapter.SelectCommand.Parameters["@IDConexion"].Value.ToString().ToEntero();
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
this.OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void ConexionClose()
|
||||||
|
{
|
||||||
|
if (CveConexion > 0 && ConfigurationManager.AppSettings["RegistraConexion"] != null && ConfigurationManager.AppSettings["RegistraConexion"].ToString() == "1")
|
||||||
|
{
|
||||||
|
SqlDataAdapter(string.Format("UPDATE Sis_Conexiones SET FechaCierre = GETDATE() WHERE CveConexion = {0}", CveConexion), CommandType.Text);
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
SqlAdapter.Fill(datos);
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
this.OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo());
|
||||||
|
}
|
||||||
|
CveConexion = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
protected void addParameters(string name, SqlDbType tipo, object valor)
|
||||||
|
{
|
||||||
|
if (SqlConexion.State == ConnectionState.Open)
|
||||||
|
SqlAdapter.SelectCommand.Parameters.Add(name, tipo).Value = valor;
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool runQuerystr(string Query, List<parametroQuery> Listaparametros = null, string msgError = "", bool mostrarError = true)
|
||||||
|
{
|
||||||
|
bool retorno = false;
|
||||||
|
try
|
||||||
|
{
|
||||||
|
if (SqlConexion.State == ConnectionState.Open)
|
||||||
|
{
|
||||||
|
SqlAdapter.SelectCommand.Parameters.Clear();
|
||||||
|
SqlAdapter.SelectCommand.CommandText = Query;
|
||||||
|
SqlAdapter.SelectCommand.CommandType = CommandType.Text;
|
||||||
|
datos = new DataTable();
|
||||||
|
if (Listaparametros != null)
|
||||||
|
{
|
||||||
|
foreach (parametroQuery pr in Listaparametros)
|
||||||
|
{
|
||||||
|
SqlAdapter.SelectCommand.Parameters.Add(pr.ParameterName, pr.SqlDataType).Direction = pr.ParameterDirection;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
SqlAdapter.Fill(datos);
|
||||||
|
retorno = true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
string InfoAdicional = "Se intenta realizar una conexion con una conexion cerrada";
|
||||||
|
InfoAdicional = $"{InfoAdicional}{Environment.NewLine}{msgError}{Environment.NewLine}";
|
||||||
|
ModExtensiones.GuardaLog(InfoAdicional);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (SqlException sqEx)
|
||||||
|
{
|
||||||
|
retorno = false;
|
||||||
|
setOnError(msgError, sqEx);
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
retorno = false;
|
||||||
|
setOnError(msgError, ex);
|
||||||
|
}
|
||||||
|
return retorno;
|
||||||
|
}
|
||||||
|
public int ExecQuery(string Query, List<parametroQuery> Listaparametros = null, string msgError = "", bool mostrarError = true)
|
||||||
|
{
|
||||||
|
int retorno = -1;
|
||||||
|
try
|
||||||
|
{
|
||||||
|
if (SqlConexion.State == ConnectionState.Open)
|
||||||
|
{
|
||||||
|
SqlAdapter.SelectCommand.Parameters.Clear();
|
||||||
|
SqlAdapter.SelectCommand.CommandText = Query;
|
||||||
|
SqlAdapter.SelectCommand.CommandType = CommandType.Text;
|
||||||
|
if (Listaparametros != null)
|
||||||
|
{
|
||||||
|
foreach (parametroQuery pr in Listaparametros)
|
||||||
|
{
|
||||||
|
SqlAdapter.SelectCommand.Parameters.Add(pr.ParameterName, pr.SqlDataType).Direction = pr.ParameterDirection;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
retorno = SqlAdapter.SelectCommand.ExecuteNonQuery();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
string InfoAdicional = "Se intenta realizar una conexion con una conexion cerrada";
|
||||||
|
InfoAdicional = $"{InfoAdicional}{Environment.NewLine}{msgError}{Environment.NewLine}";
|
||||||
|
this.GuardaLog(InfoAdicional);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (SqlException sqEx)
|
||||||
|
{
|
||||||
|
retorno = -1;
|
||||||
|
setOnError(msgError, sqEx);
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
retorno = -1;
|
||||||
|
setOnError(msgError, ex);
|
||||||
|
}
|
||||||
|
return retorno;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
protected bool RunQuery(string msgOnError)
|
||||||
|
{
|
||||||
|
bool retorno = false;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
SqlAdapter.Fill(datos);
|
||||||
|
retorno = true;
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
retorno = false;
|
||||||
|
|
||||||
|
setOnError(msgOnError, ex);
|
||||||
|
}
|
||||||
|
return retorno;
|
||||||
|
}
|
||||||
|
protected bool RunQueryDS(string msgOnError)
|
||||||
|
{
|
||||||
|
bool retorno = false;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
SqlAdapter.Fill(DTSet);
|
||||||
|
retorno = true;
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
retorno = false;
|
||||||
|
|
||||||
|
setOnError(msgOnError, ex);
|
||||||
|
}
|
||||||
|
return retorno;
|
||||||
|
}
|
||||||
|
public void setOnError(string Mensaje, Exception Exeption)
|
||||||
|
{
|
||||||
|
string InfoAdicional = "";
|
||||||
|
if (SqlAdapter != null && SqlAdapter.SelectCommand != null && SqlAdapter.SelectCommand.Parameters != null)
|
||||||
|
InfoAdicional = SqlAdapter.SelectCommand.Parameters.ParametrosInfo();
|
||||||
|
MyCurrentError = string.Format("{0} DESCRIPCIÓN DETALLADA: {1} {2} {3}", Mensaje, Exeption.ToString(), "\r\n", InfoAdicional);
|
||||||
|
this.OnError(Mensaje, Exeption, InfoAdicional);
|
||||||
|
}
|
||||||
|
public void IniciaTransacSQL()
|
||||||
|
{
|
||||||
|
SqlAdapter.SelectCommand.Transaction = SqlConexion.BeginTransaction();
|
||||||
|
EsTransaccion = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Commit()
|
||||||
|
{
|
||||||
|
SqlAdapter.SelectCommand.Transaction.Commit();
|
||||||
|
SqlConexion.Close();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void RollBack()
|
||||||
|
{
|
||||||
|
SqlAdapter.SelectCommand.Transaction.Rollback();
|
||||||
|
SqlConexion.Close();
|
||||||
|
}
|
||||||
|
public void Dispose()
|
||||||
|
{
|
||||||
|
ConexionClose();
|
||||||
|
if ((SqlConexion != null))
|
||||||
|
{
|
||||||
|
if (SqlConexion.State == ConnectionState.Open)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
if ((SqlAdapter != null))
|
||||||
|
SqlAdapter.Dispose();
|
||||||
|
|
||||||
|
SqlConexion.Close();
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
this.OnError("Ocurrió un error al intentar cerrar la base de datos.", ex);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
SqlConexion.Dispose();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (datos != null)
|
||||||
|
datos.Dispose();
|
||||||
|
if (SqlAdapter != null)
|
||||||
|
SqlAdapter.Dispose();
|
||||||
|
|
||||||
|
if (DTSet != null)
|
||||||
|
DTSet.Dispose();
|
||||||
|
|
||||||
|
GC.SuppressFinalize(this);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -2240,30 +2240,30 @@
|
|||||||
<asp:ListItem Text="Seleccione" Value="5">Por Paternidad, con Goce de Sueldo </asp:ListItem>
|
<asp:ListItem Text="Seleccione" Value="5">Por Paternidad, con Goce de Sueldo </asp:ListItem>
|
||||||
<asp:ListItem Text="Seleccione" Value="6">Viaje de Trabajo</asp:ListItem>
|
<asp:ListItem Text="Seleccione" Value="6">Viaje de Trabajo</asp:ListItem>
|
||||||
<asp:ListItem Text="Seleccione" Value="7">Incapacidad pagada por la empresa</asp:ListItem>
|
<asp:ListItem Text="Seleccione" Value="7">Incapacidad pagada por la empresa</asp:ListItem>
|
||||||
<asp:ListItem Text="Seleccione" Value="8">Por horas, asunto personal sin Goce de Sueldo</asp:ListItem>
|
<asp:ListItem Text="Seleccione" Value="8">Por horas, asunto personal sin Goce de Sueldo</asp:ListItem>
|
||||||
</asp:DropDownList>
|
</asp:DropDownList>
|
||||||
<label for="<%= DdlPermisoTipo.ClientID.ToString()%>">Tipo de permiso solicitado: </label>
|
<label for="<%= DdlPermisoTipo.ClientID.ToString()%>">Tipo de permiso solicitado: </label>
|
||||||
<asp:RequiredFieldValidator ID="RfvDdlPermisoTipo" runat="server" ControlToValidate="DdlPermisoTipo" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo de permiso''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpPermisos"></asp:RequiredFieldValidator>
|
<asp:RequiredFieldValidator ID="RfvDdlPermisoTipo" runat="server" ControlToValidate="DdlPermisoTipo" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo de permiso''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpPermisos"></asp:RequiredFieldValidator>
|
||||||
<i></i>
|
<i></i>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group form-md-line-input input-iconright">
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
<label for="<%= RblPermisoDocNecesario.ClientID.ToString()%>">Documento Necesario: </label>
|
<label for="<%= RblPermisoDocNecesario.ClientID.ToString()%>">Documento Necesario: </label>
|
||||||
<asp:RadioButtonList runat="server" ID="RblPermisoDocNecesario" RepeatDirection="Horizontal">
|
<asp:RadioButtonList runat="server" ID="RblPermisoDocNecesario" RepeatDirection="Horizontal">
|
||||||
<asp:ListItem Selected="True" Text="Si" Value="1" />
|
<asp:ListItem Selected="True" Text="Si" Value="1" />
|
||||||
<asp:ListItem Text="No" Value="2" />
|
<asp:ListItem Text="No" Value="2" />
|
||||||
</asp:RadioButtonList>
|
</asp:RadioButtonList>
|
||||||
<i></i>
|
<i></i>
|
||||||
</div>
|
</div>
|
||||||
<br />
|
<br />
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
<div class="form-group form-md-line-input input-iconright">
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
<asp:TextBox CssClass="form-control" ID="TxtPermisosDias" runat="server" MaxLength="2"></asp:TextBox>
|
<asp:TextBox CssClass="form-control" ID="TxtPermisosDias" runat="server" MaxLength="2"></asp:TextBox>
|
||||||
<label for="<%= TxtPermisosDias.ClientID.ToString()%>">Días de permiso:</label>
|
<label for="<%= TxtPermisosDias.ClientID.ToString()%>">Días de permiso:</label>
|
||||||
<%-- <asp:RequiredFieldValidator ID="rfvTxtPermisosDias" runat="server" ControlToValidate="TxtPermisosDias" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Días de permiso''</b> es necesario, por favor ingréselo." ValidationGroup="GrpPermisos"></asp:RequiredFieldValidator>--%>
|
<%-- <asp:RequiredFieldValidator ID="rfvTxtPermisosDias" runat="server" ControlToValidate="TxtPermisosDias" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Días de permiso''</b> es necesario, por favor ingréselo." ValidationGroup="GrpPermisos"></asp:RequiredFieldValidator>--%>
|
||||||
<ajax:FilteredTextBoxExtender runat="server" TargetControlID="TxtPermisosDias" FilterType="Numbers,Custom" InvalidChars=".,+" />
|
<ajax:FilteredTextBoxExtender runat="server" TargetControlID="TxtPermisosDias" FilterType="Numbers,Custom" InvalidChars=".,+" />
|
||||||
<i></i>
|
<i></i>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
<div class="form-group form-md-line-input input-iconright">
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
@@ -2271,17 +2271,17 @@
|
|||||||
<label for="<%= TxtPermisosHoras.ClientID.ToString()%>">Horas de permiso:</label>
|
<label for="<%= TxtPermisosHoras.ClientID.ToString()%>">Horas de permiso:</label>
|
||||||
<%-- <asp:RequiredFieldValidator ID="RfvTxtPermisosHoras" runat="server" ControlToValidate="TxtPermisosHoras" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Horas de permiso''</b> es necesario, por favor ingréselo." ValidationGroup="GrpPermisos"></asp:RequiredFieldValidator>--%>
|
<%-- <asp:RequiredFieldValidator ID="RfvTxtPermisosHoras" runat="server" ControlToValidate="TxtPermisosHoras" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Horas de permiso''</b> es necesario, por favor ingréselo." ValidationGroup="GrpPermisos"></asp:RequiredFieldValidator>--%>
|
||||||
<ajax:FilteredTextBoxExtender runat="server" TargetControlID="TxtPermisosHoras" FilterType="Numbers,Custom" InvalidChars=".,+" />
|
<ajax:FilteredTextBoxExtender runat="server" TargetControlID="TxtPermisosHoras" FilterType="Numbers,Custom" InvalidChars=".,+" />
|
||||||
<i></i>
|
<i></i>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-3"></div>
|
<div class="col-md-3"></div>
|
||||||
<div class="col-md-3"></div>
|
<div class="col-md-3"></div>
|
||||||
</div>
|
</div>
|
||||||
<br />
|
<br />
|
||||||
</div>
|
</div>
|
||||||
<br />
|
<br />
|
||||||
<div id="ModalAddVacaciones" class="modal ADS fade" role="dialog">
|
<div id="ModalAddVacaciones" class="modal ADS fade" role="dialog">
|
||||||
<div class="modal-dialog">
|
<div class="modal-dialog">
|
||||||
<div class="modal-content" style="width: 700px;">
|
<div class="modal-content" style="width: 700px;">
|
||||||
<div class="modal-header ">
|
<div class="modal-header ">
|
||||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||||
@@ -2323,8 +2323,26 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
|
|
||||||
|
<div class="form-group form-md-line-input input-iconright calendarlinealinput" style="width: 100px!important">
|
||||||
|
|
||||||
|
<div class="input-group input-sm date date-picker" data-date-format="dd/mm/yyyy" style="width: 160px;">
|
||||||
|
<asp:TextBox ID="TxtFechaPago" runat="server" CausesValidation="true" CssClass="form-control input-sm"></asp:TextBox>
|
||||||
|
<span class="input-group-btn ">
|
||||||
|
<asp:LinkButton ID="LnkTxtFechaPago" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||||
|
</span>
|
||||||
|
<ajax:MaskedEditExtender ID="MEETxtFechaPago" runat="server" TargetControlID="TxtFechaPago" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||||
|
<ajax:CalendarExtender runat="server" ID="CEETxtFechaPago" TargetControlID="TxtFechaPago" PopupButtonID="LnkTxtFechaPago" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||||
|
<label>Fecha pago</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-3">
|
||||||
|
<div class="form-group form-md-line-input input-iconright calendarlinealinput" style="width: 100px!important">
|
||||||
|
<asp:TextBox ID="Txtdiasinabiles" runat="server" TextMode="Number" CausesValidation="true" CssClass="form-control input-sm"></asp:TextBox>
|
||||||
|
<label>días inhábiles</label>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-3"></div>
|
|
||||||
</div>
|
</div>
|
||||||
<%--Motivo
|
<%--Motivo
|
||||||
<asp:TextBox ID="TxtMotivoVacaciones" runat="server" TextMode="MultiLine" Rows="4" CssClass="form-control Widthallimp"></asp:TextBox>--%>
|
<asp:TextBox ID="TxtMotivoVacaciones" runat="server" TextMode="MultiLine" Rows="4" CssClass="form-control Widthallimp"></asp:TextBox>--%>
|
||||||
@@ -2343,7 +2361,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="DvPermisosMotivos2" runat="server" visible="false">
|
<div id="DvPermisosMotivos2" runat="server" visible="false">
|
||||||
<div class="form-group form-md-line-input input-iconright">
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
<asp:TextBox CssClass="form-control" ID="TxtPermisoMotivo" runat="server" MaxLength="200"></asp:TextBox>
|
<asp:TextBox CssClass="form-control" ID="TxtPermisoMotivo" runat="server" MaxLength="200"></asp:TextBox>
|
||||||
|
|||||||
@@ -4455,15 +4455,17 @@ Partial Class RH_Personal
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Protected Sub BtnSolicitarVacaciones_Click(sender As Object, e As EventArgs) Handles BtnSolicitarVacaciones.Click
|
Protected Sub BtnSolicitarVacaciones_Click(sender As Object, e As EventArgs) Handles BtnSolicitarVacaciones.Click
|
||||||
Dim fInicio As Date = TxtFechaInicioVac.Text.ToDate
|
Dim fInicio As Date = TxtFechaInicioVac.Text.ToDate()
|
||||||
Dim fFin As Date = TxtFechaFinVac.Text.ToDate
|
Dim fFin As Date = TxtFechaFinVac.Text.ToDate()
|
||||||
|
Dim fechapago As String = TxtFechaPago.Text.ToDate().ToString("yyyy/MM/dd")
|
||||||
|
Dim diasinhabil As Integer = Txtdiasinabiles.Text.ToEntero()
|
||||||
'Dim motivoVacaciones As String = TxtMotivoVacaciones.Text
|
'Dim motivoVacaciones As String = TxtMotivoVacaciones.Text
|
||||||
If fInicio <= fFin Then
|
If fInicio <= fFin Then
|
||||||
|
|
||||||
VacFolioActual = VacFolioActual + 1
|
VacFolioActual = VacFolioActual + 1
|
||||||
Dim objRH As New ClsRH
|
Dim objRH As New ClsRH
|
||||||
'Dim continuar As Boolean = objRH.SolicitudVacacionesAdd(CvePersonal, fInicio, fFin, 0, UsuarioActual.CveUsuario, VacCveSupervisor, VacFolioActual, motivoVacaciones)
|
'Dim continuar As Boolean = objRH.SolicitudVacacionesAdd(CvePersonal, fInicio, fFin, 0, UsuarioActual.CveUsuario, VacCveSupervisor, VacFolioActual, motivoVacaciones)
|
||||||
Dim continuar As Boolean = objRH.SolicitudVacacionesAdd(CvePersonal, fInicio, fFin, 0, UsuarioActual.CveUsuario, VacCveSupervisor, VacFolioActual)
|
Dim continuar As Boolean = objRH.SolicitudVacacionesAdd(CvePersonal, fInicio, fFin, 0, UsuarioActual.CveUsuario, VacCveSupervisor, VacFolioActual, FechaPago:=fechapago, diasinabiles:=diasinhabil)
|
||||||
If objRH.DtResultados.Rows.Count > 0 Then
|
If objRH.DtResultados.Rows.Count > 0 Then
|
||||||
Dim ShowError As String = objRH.DtResultados.Rows(0)("ShowError").ToString()
|
Dim ShowError As String = objRH.DtResultados.Rows(0)("ShowError").ToString()
|
||||||
If ShowError.Length > 0 Then
|
If ShowError.Length > 0 Then
|
||||||
|
|||||||
@@ -1086,7 +1086,7 @@ function ADDropzone(txtid) {
|
|||||||
document.getElementById(txtid + '-paste').onpaste = function (event) {
|
document.getElementById(txtid + '-paste').onpaste = function (event) {
|
||||||
var __This = myDropzone;
|
var __This = myDropzone;
|
||||||
var objfiles = JSON.parse(TxtField.val());
|
var objfiles = JSON.parse(TxtField.val());
|
||||||
if (objfiles.length < maxFile) {
|
if ((maxFile != null) || (maxFile < 1) || objfiles.length < maxFile) {
|
||||||
// use event.originalEvent.clipboard for newer chrome versions
|
// use event.originalEvent.clipboard for newer chrome versions
|
||||||
var items = (event.clipboardData || event.originalEvent.clipboardData).items;
|
var items = (event.clipboardData || event.originalEvent.clipboardData).items;
|
||||||
//console.log(JSON.stringify(items)); // will give you the mime types
|
//console.log(JSON.stringify(items)); // will give you the mime types
|
||||||
|
|||||||
@@ -212,6 +212,10 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user