This commit is contained in:
@@ -29,7 +29,7 @@ Public Class LogicNominas
|
||||
ObjFactura.Folio = cfdi.Comprobante.Folio.ToEntero()
|
||||
ObjFactura.Serie = cfdi.Comprobante.Serie
|
||||
ObjFactura.Timbre = cfdi
|
||||
If Not ObjTimbrado.TimbrarFactura(UsuarioActual, ObjFactura, CvePAC) Then
|
||||
If Not ObjTimbrado.TimbrarFactura(UsuarioActual, ObjFactura, CvePAC, False) Then
|
||||
Retorno = ObjTimbrado.MensajeErrorCFDI
|
||||
End If
|
||||
End If
|
||||
@@ -139,6 +139,8 @@ Public Class LogicNominas
|
||||
Dim ClaveEstado As String = ""
|
||||
Dim MetodoPagoFijo As Boolean
|
||||
|
||||
Dim CodigoPostal As String = ""
|
||||
|
||||
Dim ObjIncapacidades As New List(Of CFDINominaIncapacidades)
|
||||
'Conexiones a la Base de Datos
|
||||
Dim cfdi As New CFDITimbre
|
||||
@@ -175,7 +177,7 @@ Public Class LogicNominas
|
||||
RFC = objPersonal.RFC
|
||||
cfdi.Emisor.RegistroPatronal = objPersonal.DtResultados.Rows(0)("RegistroPatronal").ToString()
|
||||
NombreCompleto = objPersonal.NombreCompleto
|
||||
|
||||
CodigoPostal = objPersonal.CP
|
||||
Sindicalizado = objPersonal.DtResultados.Rows(0)("Sindicalizado").ToString().ToUpper().Contiene("TRUE", "1")
|
||||
CURP = objPersonal.CURP
|
||||
NumeroSS = objPersonal.NumeroSS
|
||||
@@ -441,6 +443,10 @@ Public Class LogicNominas
|
||||
cfdi.Comprobante.FormadePago = "99"
|
||||
cfdi.Comprobante.LugarExpedicion = UsuarioActual.Empresa.CP.ToString() ' AHORITA SOLO SE REQUIERE ESPECIFICAR EL CODIGO POSTAL
|
||||
cfdi.Comprobante.NumCuentaPago = "" 'objPersonal.BancoNumCuenta
|
||||
'4.0
|
||||
cfdi.Receptor.DomicilioFiscalReceptor = CodigoPostal
|
||||
cfdi.Receptor.RegimenFiscalReceptor = "605"
|
||||
|
||||
|
||||
cfdi.Nomina.Receptor.CURP = CURP
|
||||
cfdi.Nomina.Receptor.NSS = NumeroSS
|
||||
|
||||
@@ -1183,7 +1183,7 @@ Public Class Timbrado
|
||||
Return Timbre
|
||||
|
||||
End Function
|
||||
Public Function TimbrarFactura(UsuarioActual As Usuario, Ventas As Modelos.Factura, Optional CvePACEspecial As Integer = -1) As Boolean
|
||||
Public Function TimbrarFactura(UsuarioActual As Usuario, Ventas As Modelos.Factura, Optional CvePACEspecial As Integer = -1, Optional NomUsaPac4 As Boolean = True) As Boolean
|
||||
|
||||
Dim Retorno As Boolean = False
|
||||
Dim tCvePAC As Integer = UsuarioActual.Empresa.CvePAC
|
||||
@@ -1219,7 +1219,7 @@ Public Class Timbrado
|
||||
Retorno = If(Ret = "", True, False)
|
||||
|
||||
Case 3
|
||||
If UsuarioActual.Empresa.Funcionalidad(350) = "1" Then
|
||||
If UsuarioActual.Empresa.Funcionalidad(350) = "1" AndAlso NomUsaPac4 Then
|
||||
Retorno = TimbrarFacturaProFactV40(UsuarioActual, Ventas)
|
||||
Else
|
||||
Retorno = TimbrarFacturaProFact(UsuarioActual, Ventas)
|
||||
@@ -1227,7 +1227,7 @@ Public Class Timbrado
|
||||
|
||||
'Retorno = TimbrarFacturaProFact(UsuarioActual, Ventas, TmpDTConceptos, TmpDTImpuestos, TmpDTComplementos, Ruta, LstFordASN, FordGSDBM, ObjV)
|
||||
Case 4
|
||||
If UsuarioActual.Empresa.Funcionalidad(350) = "1" Then
|
||||
If UsuarioActual.Empresa.Funcionalidad(350) = "1" AndAlso NomUsaPac4 Then
|
||||
Dim Ret As String = TimbrarFacturaGoCFDIv40(Ventas, UsuarioActual, CvePACEspecial)
|
||||
If Ret <> "" Then MensajeErrorCFDI = Ret
|
||||
Retorno = If(Ret = "", True, False)
|
||||
@@ -1239,7 +1239,7 @@ Public Class Timbrado
|
||||
|
||||
|
||||
Case 5
|
||||
If UsuarioActual.Empresa.Funcionalidad(350) = "1" Then
|
||||
If UsuarioActual.Empresa.Funcionalidad(350) = "1" AndAlso NomUsaPac4 Then
|
||||
Dim Ret As String = TimbrarFacturaPADEv40(Ventas, UsuarioActual, CvePACEspecial)
|
||||
If Ret <> "" Then MensajeErrorCFDI = Ret
|
||||
Retorno = If(Ret = "", True, False)
|
||||
|
||||
@@ -63,6 +63,9 @@
|
||||
<asp:LinkButton ID="lbDescargar" runat="server"><%--<img src="/Metronic/assets/global/img/portlet-reload-icon.png" />--%><i class="fa fa-download"></i>
|
||||
Descarga Facturas SAT</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkShowSolicitudes" OnClick="LnkShowSolicitudes_Click" runat="server">Solicitudes SAT</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkBitacotaFacturas" runat="server" OnClick="LnkBitacotaFacturas_Click"><i class="fa fa-book" ></i> Bitácora Facturas</asp:LinkButton>
|
||||
</li>
|
||||
@@ -946,7 +949,199 @@
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
|
||||
<div id="ModalViewSolicitudes" class="modal ADS fade" role="dialog">
|
||||
<asp:UpdatePanel ID="UPModalViewSolicitudes" class="modal-dialog rowpadding" tabindex="-1" runat="server" UpdateMode="Conditional">
|
||||
<contenttemplate>
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">Solicitudes CFDI</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<br />
|
||||
<div class="portlet light xspadding bordered " id="PnlAgregar">
|
||||
<div class="portlet-title">
|
||||
<div class="caption ">
|
||||
<i class="fa fa-bookmark font-yellow-gold"></i>
|
||||
<span class="caption-subject font-yellow-gold bold uppercase">Solicitar información al sat</span>
|
||||
</div>
|
||||
<div class="tools">
|
||||
<a href="javascript:;" class="expand" data-original-title="" title=""></a>
|
||||
<a href="javascript:;" class="fullscreen" data-original-title="" title=""></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body nomarginleftright form-horizontal form-row-sepe formnombottom " style="display: none">
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
|
||||
<asp:Label runat="server" Text="Fecha Inicio" AssociatedControlID="txtFechaIAdd"></asp:Label>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
|
||||
<asp:Label runat="server" Text="Fecha Fin" AssociatedControlID="txtFechaFAdd"></asp:Label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 138px !important; padding: 0px; margin-bottom: -10px;">
|
||||
<asp:TextBox ID="txtFechaIAdd" CssClass="form-control input-sm ADSMaskDate" Style="" runat="server"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="LnkFechaIAdd" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
<ajax:maskededitextender id="MEEFechaIAdd" runat="server" targetcontrolid="txtFechaIAdd" mask="99/99/9999" masktype="Date" displaymoney="Left" acceptnegative="Left"></ajax:maskededitextender>
|
||||
<ajax:calendarextender runat="server" id="CalendarExtender1" targetcontrolid="txtFechaIAdd" popupbuttonid="LnkFechaIAdd" popupposition="BottomRight" enabled="True"></ajax:calendarextender>
|
||||
<asp:RequiredFieldValidator ID="rfvFechaIAdd" runat="server" ControlToValidate="txtFechaIAdd" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="VGAdd"></asp:RequiredFieldValidator>
|
||||
<asp:CompareValidator ID="cvFechaIAdd" runat="server" ControlToValidate="txtFechaIAdd" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida"></asp:CompareValidator>
|
||||
<ajax:validatorcalloutextender id="ValidatorCalloutExtender3" runat="server" highlightcssclass="vco" targetcontrolid="rfvFechaIAdd" width="350px"></ajax:validatorcalloutextender>
|
||||
<ajax:validatorcalloutextender id="ValidatorCalloutExtender4" runat="server" highlightcssclass="vco" targetcontrolid="cvFechaIAdd" width="350px"></ajax:validatorcalloutextender>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-4">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 138px !important; padding: 0px; margin-bottom: -10px;">
|
||||
<asp:TextBox ID="txtFechaFAdd" CssClass="form-control input-sm ADSMaskDate" Style="" runat="server"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="LnkFechaFAdd" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
<ajax:maskededitextender id="MEEFechaFAdd" runat="server" targetcontrolid="txtFechaFAdd" mask="99/99/9999" masktype="Date" displaymoney="Left" acceptnegative="Left"></ajax:maskededitextender>
|
||||
<ajax:calendarextender runat="server" id="CalendarExtender2" targetcontrolid="txtFechaFAdd" popupbuttonid="LnkFechaFAdd" popupposition="BottomRight" enabled="True"></ajax:calendarextender>
|
||||
<asp:RequiredFieldValidator ID="rfvFechaFAdd" runat="server" ControlToValidate="txtFechaFAdd" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="VGAdd"></asp:RequiredFieldValidator>
|
||||
<asp:CompareValidator ID="cvFechaFAdd" runat="server" ControlToValidate="txtFechaFAdd" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida"></asp:CompareValidator>
|
||||
<ajax:validatorcalloutextender id="ValidatorCalloutExtender5" runat="server" highlightcssclass="vco" targetcontrolid="rfvFechaFAdd" width="350px"></ajax:validatorcalloutextender>
|
||||
<ajax:validatorcalloutextender id="ValidatorCalloutExtender6" runat="server" highlightcssclass="vco" targetcontrolid="cvFechaFAdd" width="350px"></ajax:validatorcalloutextender>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
|
||||
<div class="text-right">
|
||||
<asp:LinkButton ID="LnkSolicitarSat" CssClass="btn btn-primary" OnClick="LnkSolicitarSat_Click" runat="server">Solicitar</asp:LinkButton>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet light xspadding bordered " id="PnlPendientes">
|
||||
<div class="portlet-title">
|
||||
<div class="caption ">
|
||||
<i class="fa fa-bookmark font-yellow-gold"></i>
|
||||
<span class="caption-subject font-yellow-gold bold uppercase">Solicitudes pendientes de respuesta del SAT </span>
|
||||
</div>
|
||||
<div class="tools">
|
||||
<a href="javascript:;" class="collapse" data-original-title="" title=""></a>
|
||||
<a href="javascript:;" class="fullscreen" data-original-title="" title=""></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body nomarginleftright form-horizontal form-row-sepe formnombottom ">
|
||||
|
||||
<asp:GridView ID="GVSolicitudesPendientes" runat="server" GridLines="None" CssClass="table table-hover table-striped ScrollAD Widthall" AutoGenerateColumns="False"
|
||||
ShowHeaderWhenEmpty="true" EmptyDataText="No se encontraron registros"
|
||||
DataKeyNames="CveSolicitud,CveSolicitudCFDI,CveSolicitudMetadata,Estatus,Observaciones,FechaInicio,FechaFin,FechaIng,CveUsuarioIng,CveEmpresa">
|
||||
<columns>
|
||||
<asp:TemplateField HeaderText="Folio">
|
||||
<itemtemplate>
|
||||
<asp:Label runat="server" Text='<%# Eval("CveSolicitud")%>'></asp:Label>
|
||||
</itemtemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Fecha Inicio">
|
||||
<itemtemplate>
|
||||
<asp:Label ID="lblfechaInicio" runat="server" Text='<%# Eval("FechaInicio","{0:dd/MM/yyyy}")%>'></asp:Label>
|
||||
</itemtemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Fecha Fin">
|
||||
<itemtemplate>
|
||||
<asp:Label ID="lblfechaFin" runat="server" Text='<%# Eval("FechaFin","{0:dd/MM/yyyy}")%>'></asp:Label>
|
||||
</itemtemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Estatus">
|
||||
<itemtemplate>
|
||||
<asp:Label ID="lblestatus" runat="server" Text='<%# Eval("EstatusText")%>'></asp:Label>
|
||||
</itemtemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Observaciones">
|
||||
<itemtemplate>
|
||||
<asp:Label ID="lblobservaciones" runat="server" Text='<%# Eval("Observaciones")%>'></asp:Label>
|
||||
</itemtemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Fecha solicitud">
|
||||
<itemtemplate>
|
||||
<asp:Label runat="server" Text='<%# Eval("FechaIng","{0:dd/MM/yyyy HH:mm}")%>'></asp:Label>
|
||||
</itemtemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Solicitó">
|
||||
<itemtemplate>
|
||||
<asp:Label runat="server" Text='<%# Eval("UsuarioIng")%>'></asp:Label>
|
||||
</itemtemplate>
|
||||
</asp:TemplateField>
|
||||
</columns>
|
||||
</asp:GridView>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet light xspadding bordered " id="PnlTerminads">
|
||||
<div class="portlet-title">
|
||||
<div class="caption ">
|
||||
<i class="fa fa-bookmark font-yellow-gold"></i>
|
||||
<span class="caption-subject font-yellow-gold bold uppercase">solicitudes respondidas por el sat</span>
|
||||
</div>
|
||||
<div class="tools">
|
||||
<a href="javascript:;" class="collapse" data-original-title="" title=""></a>
|
||||
<a href="javascript:;" class="fullscreen" data-original-title="" title=""></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body nomarginleftright form-horizontal form-row-sepe formnombottom ">
|
||||
<asp:GridView ID="GVSolicitudesNominas" runat="server" GridLines="None" CssClass="table table-hover table-striped ScrollAD Widthall" AutoGenerateColumns="False"
|
||||
ShowHeaderWhenEmpty="true" EmptyDataText="No se encontraron registros"
|
||||
DataKeyNames="CveSolicitud,idSolicitudCFDI,idSolicitudMetadata,Estatus,Observaciones,FechaInicio,FechaFin,FechaIng,CveUsuarioIng,CveEmpresa">
|
||||
<columns>
|
||||
<asp:TemplateField HeaderText="Folio">
|
||||
<itemtemplate>
|
||||
<asp:Label runat="server" Text='<%# Eval("CveSolicitud")%>'></asp:Label>
|
||||
</itemtemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Fecha Inicio">
|
||||
<itemtemplate>
|
||||
<asp:Label ID="lblfechaInicio" runat="server" Text='<%# Eval("FechaInicio","{0:dd/MM/yyyy}")%>'></asp:Label>
|
||||
</itemtemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Fecha Fin">
|
||||
<itemtemplate>
|
||||
<asp:Label ID="lblfechaFin" runat="server" Text='<%# Eval("FechaFin","{0:dd/MM/yyyy}")%>'></asp:Label>
|
||||
</itemtemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="No CFDI">
|
||||
<itemtemplate>
|
||||
<asp:Label ID="lblobservaciones" runat="server" Text='<%# Eval("numeroCFDIs")%>'></asp:Label>
|
||||
</itemtemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Observaciones">
|
||||
<itemtemplate>
|
||||
<asp:Label ID="lblobservaciones" runat="server" Text='<%# Eval("Observaciones")%>'></asp:Label>
|
||||
</itemtemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Fecha solicitud">
|
||||
<itemtemplate>
|
||||
<asp:Label runat="server" Text='<%# Eval("FechaIng","{0:dd/MM/yyyy HH:mm}")%>'></asp:Label>
|
||||
</itemtemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Solicitó">
|
||||
<itemtemplate>
|
||||
<asp:Label runat="server" Text='<%# Eval("UsuarioIng")%>'></asp:Label>
|
||||
</itemtemplate>
|
||||
</asp:TemplateField>
|
||||
</columns>
|
||||
</asp:GridView>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<asp:LinkButton ID="LnkverificarSolicitudes" CssClass="btn btn-primary" OnClick="LnkverificarSolicitudes_Click" runat="server">Verificar pendientes</asp:LinkButton>
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Cerrar</button>
|
||||
</div>
|
||||
</contenttemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
<script type="text/javascript">
|
||||
|
||||
@@ -2517,7 +2517,59 @@ Partial Class Compras_eFacturas
|
||||
DTConceptos.Columns.Add("Total", GetType(Double))
|
||||
End Sub
|
||||
#End Region
|
||||
#Region "Sat descargamasiva"
|
||||
Private Sub cargasolicitudes()
|
||||
Using nom As ClsNominas = New ClsNominas()
|
||||
|
||||
If nom.SolicitudesGet(-1, UsuarioActual.CveEmpresa, 2) Then
|
||||
GVSolicitudesPendientes.DataSource = nom.DtResultados.FiltraParametros("Estatus =0")
|
||||
GVSolicitudesPendientes.DataBind()
|
||||
GVSolicitudesNominas.DataSource = nom.DtResultados.FiltraParametros("Estatus =1")
|
||||
GVSolicitudesNominas.DataBind()
|
||||
End If
|
||||
End Using
|
||||
|
||||
UPModalViewSolicitudes.Update()
|
||||
End Sub
|
||||
Protected Sub LnkShowSolicitudes_Click(ByVal sender As Object, ByVal e As EventArgs)
|
||||
cargasolicitudes()
|
||||
Me.RegistraScript("$('#ModalViewSolicitudes').modal();")
|
||||
End Sub
|
||||
|
||||
Protected Sub LnkSolicitarSat_Click(ByVal sender As Object, ByVal e As EventArgs)
|
||||
Dim idSolicitudCFDI As Integer = 0
|
||||
Dim idSolicitudMetadata As Integer = 0
|
||||
Dim estatus As Integer = 0
|
||||
Dim observaciones As String = ""
|
||||
Dim fechaInicio As DateTime = txtFechaIAdd.Text.ToDateTime()
|
||||
Dim fechaFin As DateTime = txtFechaFAdd.Text.ToDateTime()
|
||||
Dim cveUsuarioIng As Integer = UsuarioActual.CveUsuario
|
||||
Dim cveEmpresa As Integer = UsuarioActual.CveEmpresa
|
||||
Dim Continuar As Boolean = False
|
||||
|
||||
Using nom As ClsNominas = New ClsNominas()
|
||||
Continuar = nom.SolicitudesAdd(idSolicitudCFDI, idSolicitudMetadata, estatus, observaciones, fechaInicio, fechaFin, cveUsuarioIng, cveEmpresa, 2)
|
||||
'Dim api = New GeneralesAPI()
|
||||
'api.GeneraSolicitud()
|
||||
'api.VerificaSolicitudesNominas()
|
||||
End Using
|
||||
|
||||
If Continuar Then
|
||||
txtFechaIAdd.Text = ""
|
||||
txtFechaFAdd.Text = ""
|
||||
Me.RegistraScript("$('#DModalSolicitudesNominas').modal('hide');")
|
||||
cargasolicitudes()
|
||||
Me.Alert("se a envia la solicitud al sat, le enviaremos un correo en cuanto tengamos una respuesta", ModExtensiones.TipoMensaje.ToastInformacion)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub LnkverificarSolicitudes_Click(ByVal sender As Object, ByVal e As EventArgs)
|
||||
'Dim api = New GeneralesAPI()
|
||||
'api.GeneraSolicitud()
|
||||
'api.VerificaSolicitudesNominas()
|
||||
cargasolicitudes()
|
||||
End Sub
|
||||
#End Region
|
||||
#Region "D E S C A R G A R - F A C T U R A "
|
||||
Protected Sub lbDescargar_Click(sender As Object, e As EventArgs) Handles lbDescargar.Click
|
||||
|
||||
|
||||
@@ -33,6 +33,14 @@
|
||||
<DataField>Etiqueta</DataField>
|
||||
<rd:TypeName>System.String</rd:TypeName>
|
||||
</Field>
|
||||
<Field Name="ImpManifiesto">
|
||||
<DataField>ImpManifiesto</DataField>
|
||||
<rd:TypeName>System.String</rd:TypeName>
|
||||
</Field>
|
||||
<Field Name="TipoTarima">
|
||||
<DataField>TipoTarima</DataField>
|
||||
<rd:TypeName>System.String</rd:TypeName>
|
||||
</Field>
|
||||
<Field Name="Envase">
|
||||
<DataField>Envase</DataField>
|
||||
<rd:TypeName>System.String</rd:TypeName>
|
||||
@@ -215,12 +223,16 @@
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>Empaque </Value>
|
||||
<Style />
|
||||
<Value>EMPAQUE </Value>
|
||||
<Style>
|
||||
<FontSize>9pt</FontSize>
|
||||
</Style>
|
||||
</TextRun>
|
||||
<TextRun>
|
||||
<Value>=Parameters!SubProyecto.Value</Value>
|
||||
<Style />
|
||||
<Style>
|
||||
<FontSize>9pt</FontSize>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style />
|
||||
@@ -515,7 +527,7 @@
|
||||
<Top>0.3175cm</Top>
|
||||
<Left>9.78675cm</Left>
|
||||
<Height>3cm</Height>
|
||||
<Width>9.55022cm</Width>
|
||||
<Width>9.55023cm</Width>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
@@ -7291,7 +7303,7 @@
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value />
|
||||
<Value>=IIf(Fields!ImpManifiesto.Value.ToString() ="1",Fields!TipoTarima.Value.ToString() ,"")</Value>
|
||||
<Style>
|
||||
<FontSize>8pt</FontSize>
|
||||
</Style>
|
||||
@@ -7312,6 +7324,7 @@
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
<rd:Selected>true</rd:Selected>
|
||||
</CellContents>
|
||||
</TablixCell>
|
||||
<TablixCell>
|
||||
@@ -7456,7 +7469,7 @@
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>Campo </Value>
|
||||
<Value>CAMPO </Value>
|
||||
<Style>
|
||||
<FontSize>8pt</FontSize>
|
||||
</Style>
|
||||
|
||||
@@ -215,6 +215,9 @@
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkTimbrarTodos" Visible="false" OnClick="LnkTimbrarTodos_Click" runat="server"><i class="fa fa-bell"></i> Timbrar todos</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkReenviarcorreo" Visible="false" OnClick="LnkReenviarcorreo_Click" runat="server"><i class="fa fa-bell"></i> Renviar correo</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkRegistrarProvision" Visible="false" OnClick="LnkRegistrarProvision_Click" runat="server" data-toggle="confirmation" data-popout="true" data-original-title="¿Está seguro que desea registrar provisión?" data-btn-ok-label="si"><i class="fa fa-thumbs-up" aria-hidden="true" ></i>Registrar provisión</asp:LinkButton>
|
||||
</li>
|
||||
|
||||
@@ -474,6 +474,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
LnkCargaAsistenciaMasiva.Visible = (Estatus < 2);
|
||||
LnkModalPlantillaNomina.Visible = true;
|
||||
LnkTimbrarTodos.Visible = (Estatus > 2);
|
||||
LnkReenviarcorreo.Visible = true;
|
||||
|
||||
LnkLayoutContable.Visible = (Estatus >= 2);
|
||||
LnkProvisionNomina.Visible = CvePrePolizaProvision > 0;
|
||||
@@ -1118,15 +1119,79 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
}
|
||||
#endregion
|
||||
|
||||
protected void LnkReenviarcorreo_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
string msggral = "";
|
||||
int CvePeriodo = 0;
|
||||
ClsSisMail Mail = new ClsSisMail();
|
||||
DataTable dtpersonal = new DataTable();
|
||||
DataRow drow;
|
||||
using (ClsRH objrh = new ClsRH())
|
||||
{
|
||||
objrh.GetPersonal(-1, UsuarioActual.CveEmpresa);
|
||||
dtpersonal = objrh.DtResultados.FiltraParametros("", "", new string[] { "CvePersonal", "MaiReciboNomina", "NombreCompleto" });
|
||||
}
|
||||
foreach (GridViewRow gvRow in GvNominas.Rows)
|
||||
{
|
||||
CvePeriodo = gvRow.DataKey("CvePeriodo").ToEntero();
|
||||
int CvePersonal = gvRow.DataKey("CvePersonal").ToEntero();
|
||||
int CveNomina = gvRow.DataKey("CveNomina").ToEntero();
|
||||
int SeTimbro = (gvRow.DataKey("SeTimbro").ToUpper()=="TRUE" ?1:gvRow.DataKey("SeTimbro").ToEntero());
|
||||
LinkButton LnkTimbrar = gvRow.FCLinkButton("LnkTimbrar");
|
||||
string MaiReciboNomina = string.Empty;
|
||||
string NombreCompleto = string.Empty;
|
||||
if (dtpersonal.Rows.Count > 0 && (drow = dtpersonal.FiltroPrimero(string.Format("CvePersonal = {0}", CvePersonal))) != null)
|
||||
{
|
||||
MaiReciboNomina = drow["MaiReciboNomina"].ToString();
|
||||
NombreCompleto = drow["NombreCompleto"].ToString();
|
||||
}
|
||||
if (CvePersonal > 0 && SeTimbro==1)
|
||||
{
|
||||
|
||||
if (MaiReciboNomina.Trim().Length > 0)
|
||||
{
|
||||
byte[] pdf = GeneraPDFNomina(CvePersonal, CvePeriodo, UsuarioActual.CveEmpresa, UsuarioActual.Empresa.Ruta);
|
||||
if (pdf != null)
|
||||
{
|
||||
List<ClsSisMail.ArchivoMail> objarch = new List<ClsSisMail.ArchivoMail>();
|
||||
objarch.Add(new ClsSisMail.ArchivoMail() { ArchivoBinario = pdf, NombreArchivo = "Nomina.pdf" });
|
||||
Mail.SendMail(ClsPaginas.EmpresaNotificaciones, MaiReciboNomina.Trim(), string.Format("Empleado {0} Nomina del {1:dd/MM/yyyy} al {2:dd/MM/yyyy}", NombreCompleto, FechaInicioPeriodo, FechaFinPeriodo), "", "", objarch);
|
||||
// Mail.SendMail(ClsPaginas.EmpresaNotificaciones, "caudillo.90d@gmail.com", string.Format("Empleado {0} Nomina del {1:dd/MM/yyyy} al {2:dd/MM/yyyy} ", NombreCompleto, FechaInicioPeriodo, FechaFinPeriodo), MaiReciboNomina.Trim(), "", objarch);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
Alert("se reenviaron los recibos timbrados");
|
||||
}
|
||||
protected void LnkTimbrarTodos_Click(object sender, EventArgs e)
|
||||
{
|
||||
string msggral = "";
|
||||
int CvePeriodo = 0;
|
||||
ClsSisMail Mail = new ClsSisMail();
|
||||
DataTable dtpersonal = new DataTable();
|
||||
DataRow drow;
|
||||
using (ClsRH objrh = new ClsRH())
|
||||
{
|
||||
objrh.GetPersonal(-1, UsuarioActual.CveEmpresa);
|
||||
dtpersonal = objrh.DtResultados.FiltraParametros("", "", new string[] { "CvePersonal", "MaiReciboNomina", "NombreCompleto" });
|
||||
}
|
||||
foreach (GridViewRow gvRow in GvNominas.Rows)
|
||||
{
|
||||
int CvePeriodo = gvRow.DataKey("CvePeriodo").ToEntero();
|
||||
CvePeriodo = gvRow.DataKey("CvePeriodo").ToEntero();
|
||||
int CvePersonal = gvRow.DataKey("CvePersonal").ToEntero();
|
||||
int CveNomina = gvRow.DataKey("CveNomina").ToEntero();
|
||||
LinkButton LnkTimbrar = gvRow.FCLinkButton("LnkTimbrar");
|
||||
string MaiReciboNomina = string.Empty;
|
||||
string NombreCompleto = string.Empty;
|
||||
if (dtpersonal.Rows.Count > 0 && (drow = dtpersonal.FiltroPrimero(string.Format("CvePersonal = {0}", CvePersonal))) != null)
|
||||
{
|
||||
MaiReciboNomina = drow["MaiReciboNomina"].ToString();
|
||||
NombreCompleto = drow["NombreCompleto"].ToString();
|
||||
}
|
||||
if (CvePersonal > 0 && LnkTimbrar.Visible)
|
||||
{
|
||||
LogicNominas lognom = new LogicNominas();
|
||||
@@ -1138,9 +1203,6 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
}
|
||||
else
|
||||
{
|
||||
ClsNominas ObjPeriodo = new ClsNominas();
|
||||
ObjPeriodo.CambiaEstatusPeriodo(CvePeriodo, (int)enumNominasEstatus.Timbrada, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa);
|
||||
ObjPeriodo.Dispose();
|
||||
LnkTimbrar.Visible = false;
|
||||
gvRow.CssClass = "success";
|
||||
gvRow.FindControl("ImgDelete").Visible = false;
|
||||
@@ -1149,6 +1211,21 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
gvRow.FindControl("HypPDF").Visible = true;
|
||||
|
||||
gvRow.ForeColor = Color.Green;
|
||||
|
||||
if (MaiReciboNomina.Trim().Length > 0)
|
||||
{
|
||||
byte[] pdf = GeneraPDFNomina(CvePersonal, CvePeriodo, UsuarioActual.CveEmpresa, UsuarioActual.Empresa.Ruta);
|
||||
if (pdf != null)
|
||||
{
|
||||
List<ClsSisMail.ArchivoMail> objarch = new List<ClsSisMail.ArchivoMail>();
|
||||
objarch.Add(new ClsSisMail.ArchivoMail() { ArchivoBinario = pdf, NombreArchivo = "Nomina.pdf" });
|
||||
Mail.SendMail(ClsPaginas.EmpresaNotificaciones, MaiReciboNomina.Trim(), string.Format("Empleado {0} Nomina del {1:dd/MM/yyyy} al {2:dd/MM/yyyy}", NombreCompleto, FechaInicioPeriodo, FechaFinPeriodo), "", "", objarch);
|
||||
//Mail.SendMail(ClsPaginas.EmpresaNotificaciones, "caudillo.90d@gmail.com", string.Format("Empleado {0} Nomina del {1:dd/MM/yyyy} al {2:dd/MM/yyyy} ", NombreCompleto, FechaInicioPeriodo, FechaFinPeriodo), MaiReciboNomina.Trim(), "", objarch);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -1159,6 +1236,14 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
|
||||
Alert(string.Format("Los siguientes empleados no se timbraron por las siguiente situaciones: <table class=\"table table-striped table-hover mysmallbtn\" ><tbody><tr><th>Código</th><th>Nombre</th><th>Mensaje SAT</th></tr>{0}</tbody></table>", msggral), TipoMensaje.MsgAdvertencia);
|
||||
}
|
||||
else
|
||||
{
|
||||
using (ClsNominas ObjPeriodo = new ClsNominas())
|
||||
{
|
||||
ObjPeriodo.CambiaEstatusPeriodo(CvePeriodo, (int)enumNominasEstatus.Timbrada, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa);
|
||||
}
|
||||
|
||||
}
|
||||
UpDatos.Update();
|
||||
}
|
||||
private void CreaObjetoEmpresa(ref Usuario UsuarioActual)
|
||||
@@ -1192,6 +1277,24 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
int CveNomina = gvRow.DataKey("CveNomina").ToEntero();
|
||||
LogicNominas lognom = new LogicNominas();
|
||||
Usuario UsuarioActual = null;
|
||||
|
||||
|
||||
ClsSisMail Mail = new ClsSisMail();
|
||||
DataTable dtpersonal = new DataTable();
|
||||
DataRow drow;
|
||||
string MaiReciboNomina = string.Empty;
|
||||
string NombreCompleto = string.Empty;
|
||||
if (dtpersonal.Rows.Count > 0 && (drow = dtpersonal.FiltroPrimero(string.Format("CvePersonal = {0}", CvePersonal))) != null)
|
||||
{
|
||||
MaiReciboNomina = drow["MaiReciboNomina"].ToString();
|
||||
NombreCompleto = drow["NombreCompleto"].ToString();
|
||||
}
|
||||
using (ClsRH objrh = new ClsRH())
|
||||
{
|
||||
objrh.GetPersonal(-1, UsuarioActual.CveEmpresa);
|
||||
dtpersonal = objrh.DtResultados.FiltraParametros("", "", new string[] { "CvePersonal", "MaiReciboNomina", "NombreCompleto" });
|
||||
}
|
||||
/*
|
||||
if (EsProduccion == false)
|
||||
{
|
||||
|
||||
@@ -1207,7 +1310,8 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
else
|
||||
{
|
||||
UsuarioActual = this.UsuarioActual;
|
||||
}
|
||||
}*/
|
||||
UsuarioActual = this.UsuarioActual;
|
||||
string Msg = lognom.TimbrarNomina(CveNomina, CvePersonal, CvePeriodo, UsuarioActual);
|
||||
if (Msg != null && Msg.Length > 0)
|
||||
{ Alert(string.Format("El empleado no se pudo timbrar, el sat nos devolvio el siguiente mensaje:<br/>{0}", Msg), TipoMensaje.MsgAdvertencia); }
|
||||
@@ -1216,6 +1320,18 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
ClsNominas ObjPeriodo = new ClsNominas();
|
||||
ObjPeriodo.CambiaEstatusPeriodo(CvePeriodo, (int)enumNominasEstatus.Timbrada, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa);
|
||||
ObjPeriodo.Dispose();
|
||||
if (MaiReciboNomina.Trim().Length > 0)
|
||||
{
|
||||
byte[] pdf = GeneraPDFNomina(CvePersonal, CvePeriodo, UsuarioActual.CveEmpresa, UsuarioActual.Empresa.Ruta);
|
||||
if (pdf != null)
|
||||
{
|
||||
List<ClsSisMail.ArchivoMail> objarch = new List<ClsSisMail.ArchivoMail>();
|
||||
objarch.Add(new ClsSisMail.ArchivoMail() { ArchivoBinario = pdf, NombreArchivo = "Nomina" });
|
||||
Mail.SendMail(ClsPaginas.EmpresaNotificaciones, MaiReciboNomina.Trim(), string.Format("Empleado {0} Nomina del {1:dd/MM/yyyy} al {2:dd/MM/yyyy}", NombreCompleto, FechaInicioPeriodo, FechaFinPeriodo), "", "", objarch);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
Alert("Se ha timbrado correctamente");
|
||||
gvRow.FindControl("ImgDelete").Visible = false;
|
||||
gvRow.FindControl("LnkCancelar").Visible = true;
|
||||
@@ -3442,7 +3558,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
urlfile = System.IO.Path.Combine(ModExtensiones.DirectorioBaseEmpresas, "Empresas/Grales/Formatos/SobreRecibo.rdlc");
|
||||
}
|
||||
|
||||
ImprimirPDF(urlfile, lrds, parametros, "SobreRecibo", "PDF", null,Content_Disposition: "Inline");
|
||||
ImprimirPDF(urlfile, lrds, parametros, "SobreRecibo", "PDF", null, Content_Disposition: "Inline");
|
||||
}
|
||||
protected void BtnGuardarInfornavit_Click(object sender, EventArgs e)
|
||||
{
|
||||
@@ -8110,8 +8226,8 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
|
||||
|
||||
#region Layouts
|
||||
|
||||
enum Bancos
|
||||
|
||||
enum Bancos
|
||||
{
|
||||
SinSelccion,
|
||||
Bancomer,
|
||||
@@ -8121,29 +8237,33 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
|
||||
Bancos Banco
|
||||
{
|
||||
get {
|
||||
get
|
||||
{
|
||||
if (ViewState["Banco"] == null)
|
||||
{
|
||||
ViewState["Banco"] = Bancos.SinSelccion;
|
||||
}
|
||||
return (Bancos) ViewState["Banco"];
|
||||
return (Bancos)ViewState["Banco"];
|
||||
}
|
||||
set {
|
||||
ViewState["Banco"] = (Bancos) value;
|
||||
set
|
||||
{
|
||||
ViewState["Banco"] = (Bancos)value;
|
||||
}
|
||||
}
|
||||
|
||||
string ConvenioPagoElectronico
|
||||
{
|
||||
get {
|
||||
get
|
||||
{
|
||||
if (ViewState["ConvenioPagoElectronico"] == null)
|
||||
{
|
||||
ViewState["ConvenioPagoElectronico"] = string.Empty;
|
||||
}
|
||||
return ViewState["ConvenioPagoElectronico"].ToString();
|
||||
return ViewState["ConvenioPagoElectronico"].ToString();
|
||||
}
|
||||
set {
|
||||
ViewState["ConvenioPagoElectronico"] = (string) value;
|
||||
set
|
||||
{
|
||||
ViewState["ConvenioPagoElectronico"] = (string)value;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8153,7 +8273,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
// RBLModalBancosLayout.SelectedValue = "1";
|
||||
Banco = Bancos.SinSelccion;
|
||||
CargaCuentas();
|
||||
|
||||
|
||||
this.RegistraScript("$('#ModalLayoutBancos').modal('show');");
|
||||
UpModalBancosLayout.Update();
|
||||
}
|
||||
@@ -8162,7 +8282,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
{
|
||||
|
||||
DdlCuenta.Items.Clear();
|
||||
DataTable DTCuentas = get_GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveEmpresa: UsuarioActual.CveEmpresa).FiltraParametros(" CveTipoCuenta <> 1 AND UsaLayout = 'True' AND LEN(ConvenioPagoElectronico) > 0 ");
|
||||
DataTable DTCuentas = get_GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveEmpresa: UsuarioActual.CveEmpresa).FiltraParametros(" CveTipoCuenta <> 1 AND UsaLayout = 'True' AND LEN(ConvenioPagoElectronico) > 0 ");
|
||||
DTCuentas.CaseSensitive = false;
|
||||
DdlCuenta.DataSource = DTCuentas.FiltraParametros(" Banco IN('BANCOMER','BANORTE')");
|
||||
DdlCuenta.DataBind();
|
||||
@@ -8184,8 +8304,9 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
if (DdlCuenta.SelectedItem.Text.ToUpper().Contains("BANCOMER"))
|
||||
{
|
||||
Banco = Bancos.Bancomer;
|
||||
|
||||
}else if (DdlCuenta.SelectedItem.Text.ToUpper().Contains("BANORTE"))
|
||||
|
||||
}
|
||||
else if (DdlCuenta.SelectedItem.Text.ToUpper().Contains("BANORTE"))
|
||||
{
|
||||
Banco = Bancos.Banorte;
|
||||
}
|
||||
@@ -8200,14 +8321,14 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
Banco = Bancos.SinSelccion;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
protected void BtnModalBancosProcesar_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
|
||||
if (Banco == Bancos.Bancomer)
|
||||
{
|
||||
using (ClsNominas objnom = new ClsNominas())
|
||||
@@ -8230,7 +8351,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -8328,7 +8449,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
Alert(SbErrores.ToString(), TipoMensaje.MsgAdvertencia);
|
||||
}
|
||||
|
||||
private void CrearLayoutNominaBanorte(DataTable DTNomina, string Emisora, int Consecutivo )
|
||||
private void CrearLayoutNominaBanorte(DataTable DTNomina, string Emisora, int Consecutivo)
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
StringBuilder SbErrores = new StringBuilder();
|
||||
@@ -8436,7 +8557,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
{
|
||||
sb.AppendLine("");
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -502,6 +502,8 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user