Merge branch 'master' of http://192.168.10.111:8383/SIG
This commit is contained in:
@@ -9562,6 +9562,7 @@ Public Class ClsPaginas
|
||||
Public Property CveCompraAmortizacion As Integer = 0
|
||||
Public Property OtroGastoIngreso As Decimal = 0
|
||||
Public Property CveConceptoPago As Integer = -1 'no definido de inicio
|
||||
Public Property CveCreditoDetalle As Integer = -1
|
||||
|
||||
End Class
|
||||
|
||||
|
||||
@@ -860,6 +860,9 @@ Public Class ClsVentas
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
|
||||
|
||||
Public Function UpdateVentaRNCUsado(CveVentaRNC As Integer, CveVenta As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
@@ -5544,6 +5547,29 @@ Public Class ClsVentas
|
||||
|
||||
#End Region
|
||||
|
||||
Public Function GetListadoCartaPorteRep(FechaI As Date, FechaF As Date, CveSubProyecto As String, CveUsuarioConsulta As Integer, CveEmpresa As Integer) As Boolean
|
||||
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Vta_RepListadoCartaPorteGet")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@FechaI", SqlDbType.Date).Value = FechaI
|
||||
.Add("@FechaF", SqlDbType.Date).Value = FechaF
|
||||
.Add("@CveSubProyecto", SqlDbType.VarChar).Value = CveSubProyecto
|
||||
.Add("@CveUsuarioConsulta", SqlDbType.Int).Value = CveUsuarioConsulta
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error obtener el listado de carta porte.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End Try
|
||||
Return Retorno
|
||||
|
||||
|
||||
End Function
|
||||
|
||||
|
||||
#Region "IDisposable Support"
|
||||
|
||||
|
||||
|
||||
@@ -4832,7 +4832,7 @@ Public Class Timbrado
|
||||
|
||||
If ObjCFDITimbre.Conceptos IsNot Nothing AndAlso ObjCFDITimbre.Conceptos.Count > 0 Then
|
||||
For Each concep As CFDIConceptos In ObjCFDITimbre.Conceptos
|
||||
cfdi.Concepto(concep.ClaveProdServ, concep.Noidentificacion, concep.Cantidad, concep.ClaveUnidad, concep.Unidad, concep.Descripcion, concep.ValorUnitario, concep.Importe, concep.Descuento, concep.ObjetoImpuesto)
|
||||
cfdi.Concepto(concep.ClaveProdServ, concep.Noidentificacion, concep.Cantidad.ToString("0.00####"), concep.ClaveUnidad, concep.Unidad, concep.Descripcion, concep.ValorUnitario.ToString("0.00####"), concep.Importe, concep.Descuento, concep.ObjetoImpuesto)
|
||||
For Each imp As CFDIConceptosImpuestos In concep.Impuestos
|
||||
If imp.TrasladooRetencion = "T" Then
|
||||
cfdi.ConceptoTraslado(imp.Base, imp.Impuesto, imp.TipoFactor, imp.TasaOCuota, imp.Importe)
|
||||
|
||||
@@ -5957,19 +5957,31 @@ Partial Class Compras_Compras
|
||||
ErrorPrepoliza = True
|
||||
End If
|
||||
|
||||
If TipoCreditoInteres Then
|
||||
If importeMovimiento <> 0 Then
|
||||
Dim Pago As New CompraPago
|
||||
Pago.ImportePago = importeMovimiento
|
||||
Pago.CveIE = CveIE
|
||||
Pago.CveMonedaPago = 1
|
||||
Pago.CveCompraAmortizacion = -1
|
||||
Pago.CveCreditoDetalle = CveCreditoDetalle
|
||||
|
||||
Dim importeMovimientoIn As Decimal = ImporteIECredito - importeMovimiento
|
||||
Dim importeMNIn As Decimal = importeMovimientoIn * tipoCambioActual * Multiplicador
|
||||
ErrorMovtosCxP = AplicaPrePolizaPago(CompraActual, Pago, CvePrePoliza, ObjConta)
|
||||
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, importeMovimientoIn, importeMNIn, 41, Referencia, Concepto, CtaProveedorAcreedores, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveIE:=CveIE, CveCreditoDetalle:=CveCreditoDetalle, CveClasificacion:=CveClasificacionDT, CveSubProyecto:=CveSubProyectoDT, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimientoIn), CveTipoGasto:=CveTipoGastoDT, TipoCambio:=tipoCambioActual, Contabilizable:=SeContabiliza) Then
|
||||
ErrorPrepoliza = True
|
||||
End If
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, importeMovimientoIn, importeMNIn, 50, Referencia, Concepto, ViewState("IdCtaContDocsXPagar").ToString.ToEntero(), CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveIE:=CveIE, CveCreditoDetalle:=CveCreditoDetalle, CveClasificacion:=CveClasificacionDT, CveSubProyecto:=CveSubProyectoDT, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimientoIn), CveTipoGasto:=CveTipoGastoDT, TipoCambio:=tipoCambioActual, Contabilizable:=SeContabiliza) Then
|
||||
ErrorPrepoliza = True
|
||||
|
||||
End If
|
||||
End If
|
||||
|
||||
'If TipoCreditoInteres Then
|
||||
|
||||
' Dim importeMovimientoIn As Decimal = ImporteIECredito - importeMovimiento
|
||||
' Dim importeMNIn As Decimal = importeMovimientoIn * tipoCambioActual * Multiplicador
|
||||
|
||||
' If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, importeMovimientoIn, importeMNIn, 41, Referencia, Concepto, CtaProveedorAcreedores, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveIE:=CveIE, CveCreditoDetalle:=CveCreditoDetalle, CveClasificacion:=CveClasificacionDT, CveSubProyecto:=CveSubProyectoDT, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimientoIn), CveTipoGasto:=CveTipoGastoDT, TipoCambio:=tipoCambioActual, Contabilizable:=SeContabiliza) Then
|
||||
' ErrorPrepoliza = True
|
||||
' End If
|
||||
' If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, importeMovimientoIn, importeMNIn, 50, Referencia, Concepto, ViewState("IdCtaContDocsXPagar").ToString.ToEntero(), CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveIE:=CveIE, CveCreditoDetalle:=CveCreditoDetalle, CveClasificacion:=CveClasificacionDT, CveSubProyecto:=CveSubProyectoDT, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimientoIn), CveTipoGasto:=CveTipoGastoDT, TipoCambio:=tipoCambioActual, Contabilizable:=SeContabiliza) Then
|
||||
' ErrorPrepoliza = True
|
||||
|
||||
' End If
|
||||
'End If
|
||||
End If
|
||||
importeMovimiento = 0 : importeMN = 0
|
||||
If TipoCambioCompra > 1 AndAlso DdlMoneda.SelectedValue.ToEntero <> 1 Then Concepto += $" TC{TipoCambioCompra} ${importeMovimiento.FormatoNumero(2)}"
|
||||
|
||||
@@ -63,8 +63,8 @@
|
||||
<asp:LinkButton ID="lbDescargar" runat="server"><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>
|
||||
<asp:LinkButton ID="LnkShowSolicitudes" OnClick="LnkShowSolicitudes_Click" runat="server"> <i class="fa fa-external-link"></i> 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>
|
||||
@@ -1008,202 +1008,275 @@
|
||||
</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 id="ModalViewSolicitudes" class="modal ADS fade" role="dialog">
|
||||
<asp:UpdatePanel ID="UPModalViewSolicitudes" class="modal-dialog rowpadding xspadding" 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 class="row">
|
||||
<div class="col-md-12" style="text-align: right">
|
||||
<asp:LinkButton ID="LnkAgregarSolictud" runat="server" data-toggle="tooltip" data-placement="right" OnClick="LnkAgregarSolictud_Click" title="Agregar Solicitud." CssClass="btn btn-circle btn-default" Text="<i class='fa fa-plus'></i> Agregar Solicitud"></asp:LinkButton>
|
||||
</div>
|
||||
<div class="portlet-body nomarginleftright form-horizontal form-row-sepe formnombottom " style="display: none">
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
</div>
|
||||
|
||||
<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>
|
||||
<ajax:TabContainer runat="server" ID="TabPanel" ActiveTabIndex="0">
|
||||
|
||||
<ajax:TabPanel runat="server" HeaderText="Pendientes" ID="TabPendientes">
|
||||
<ContentTemplate>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<asp:GridView ID="GVSolicitudesPendientes" runat="server" GridLines="None" CssClass="table table-striped table-hover Widthall ScrollAD mysmallbtn" AutoGenerateColumns="False"
|
||||
ShowHeaderWhenEmpty="true" EmptyDataText="No se encontraron registros"
|
||||
DataKeyNames="CveSolicitud,CveSolicitudCFDI,CveSolicitudMetadata,Estatus,Observaciones,FechaInicio,FechaFin,FechaIng,CveUsuarioIng,CveEmpresa,ArchivoXML,idSolicitud,CveSolicitudDetalle,Folio,CveTipoSolicitud">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Folio">
|
||||
<ItemTemplate>
|
||||
<asp:Label runat="server" Text='<%# Eval("Folio")%>'></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="Tipo" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:Label runat="server" ID="lBLTipoDescarga" Text='<%# Eval("TipoDescarga")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
|
||||
|
||||
<asp:TemplateField HeaderText="Fecha solicitud">
|
||||
<ItemTemplate>
|
||||
<asp:Label runat="server" Text='<%# Eval("FechaIng", "{0:dd/MM/yyyy}")%>'></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="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 class="row">
|
||||
<div class="col-md-12" style="text-align: center">
|
||||
<asp:LinkButton ID="LnkverificarSolicitudes" CssClass="btn btn-primary" OnClick="LnkverificarSolicitudes_Click" runat="server">Verificar pendientes</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>
|
||||
|
||||
|
||||
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
|
||||
|
||||
<ajax:TabPanel runat="server" HeaderText="Historial" ID="TabHistorial">
|
||||
<ContentTemplate>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<asp:GridView ID="GVSolicitudesNominas" runat="server" GridLines="None" CssClass="table table-striped table-hover Widthall ScrollAD mysmallbtn" AutoGenerateColumns="False" OnRowDataBound="GVSolicitudesNominas_RowDataBound"
|
||||
ShowHeaderWhenEmpty="true" EmptyDataText="No se encontraron registros"
|
||||
DataKeyNames="CveSolicitudDetalle,CveSolicitud,idSolicitudCFDI,idSolicitudMetadata,Estatus,Observaciones,FechaInicio,FechaFin,FechaIng,CveUsuarioIng,CveEmpresa,ArchivoXML,Folio,CveTipoSolicitud,TipoDescargaStr">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Folio">
|
||||
<ItemTemplate>
|
||||
<asp:Label runat="server" Text='<%# Eval("Folio")%>'></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" ItemStyle-HorizontalAlign="Right">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LblnumeroCFDIs" runat="server" Text='<%# Eval("numeroCFDIs")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Observaciones">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblobservaciones" runat="server" Text='<%# Eval("Observaciones")%>' ItemStyle-Width="150px" ControlStyle-Width="150px" CssClass="truncate" ></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Tipo" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:Label runat="server" ID="lBLTipoDescarga" Text='<%# Eval("TipoDescarga")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Fecha solicitud">
|
||||
<ItemTemplate>
|
||||
<asp:Label runat="server" Text='<%# Eval("FechaIng", "{0:dd/MM/yyyy}")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Solicitó" ItemStyle-Width="100px" ControlStyle-Width="100px">
|
||||
<ItemTemplate>
|
||||
<asp:Label runat="server" Text='<%# Eval("UsuarioIng")%>' CssClass="truncate"></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Right" ItemStyle-Width="50px" HeaderText="XML">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LnkDescargaXML" CssClass="btn btn-circle btn-sm blue" OnClick="LnkDescargaXML_Click" runat="server" ToolTip="Descargar archivo"
|
||||
Text="<i class='fa fa-download' style='color:white' title='Descargar Documento'></i>" CausesValidation="False" Visible="false" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%--
|
||||
<asp:TemplateField HeaderText="R Nombres" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LnkRenombrarArchivos" CssClass="btn btn-circle btn-sm blue" OnClick="LnkRenombrarArchivos_Click" runat="server" ToolTip="Renombrar Archivos"
|
||||
Text="Renombrar" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>--%>
|
||||
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</ajax:TabContainer>
|
||||
|
||||
|
||||
|
||||
</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>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="ModalAgregarSolicitud" class="modal ADS fade" role="dialog">
|
||||
<asp:UpdatePanel ID="UPModalViewSolicitudesAgregar" 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">Agregar Solicitud CFDI</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<div class="form-group form-md-line-input input-iconright" style="width: 125px!important;height:28px!important">
|
||||
<asp:TextBox ID="txtFechaIAdd" CssClass="form-control" MaxLength="20" runat="server" Width="100px" Height="28px"></asp:TextBox>
|
||||
<span class="input-group-btn " style="position: absolute; right: 41px; top: -5px;">
|
||||
<asp:LinkButton ID="LnkFechaIAdd" class="btn default" Style="margin-top: 15px; margin-left: 6px" Text="<i Style='margin-left: -6px;margin-top: -5px' class='fa fa-calendar'></i>" runat="server" Width="25px" Height="27px" ></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="GrpAddSolicitud"></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="GrpAddSolicitud"></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>
|
||||
<label for="<%= txtFechaIAdd.ClientID.ToString() %>" style="margin-top: -6px">Fecha Inicio:</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-4">
|
||||
<div class="form-group form-md-line-input input-iconright" style="width: 125px!important">
|
||||
<asp:TextBox ID="txtFechaFAdd" CssClass="form-control" MaxLength="20" runat="server" Width="100px" Height="28px"></asp:TextBox>
|
||||
<span class="input-group-btn " style="position: absolute; right: 41px; top: -5px;">
|
||||
<asp:LinkButton ID="LnkFechaFAdd" class="btn default" Style="margin-top: 15px; margin-left: 6px" Text="<i Style='margin-left: -6px;margin-top: -5px' class='fa fa-calendar'></i>" runat="server" Width="25px" Height="27px" ></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="GrpAddSolicitud"></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="GrpAddSolicitud"></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>
|
||||
<label for="<%= txtFechaFAdd.ClientID.ToString() %>" style="margin-top: -6px">Fecha Fin:</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-4" runat="server" visible="false">
|
||||
<asp:CheckBox runat="server" ID="ChkMetaDatos" Text="Validación de Estatus" />
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<asp:LinkButton ID="LnkSolicitarSat" CssClass="btn btn-primary" OnClick="LnkSolicitarSat_Click" runat="server" ValidationGroup="GrpAddSolicitud">Solicitar</asp:LinkButton>
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Cerrar</button>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -2552,51 +2552,160 @@ Partial Class Compras_eFacturas
|
||||
DTConceptos.Columns.Add("Total", GetType(Double))
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
#Region "Sat descargamasiva"
|
||||
Private Sub cargasolicitudes()
|
||||
|
||||
LnkverificarSolicitudes.Visible = False
|
||||
|
||||
Using nom As ClsNominas = New ClsNominas()
|
||||
|
||||
If nom.SolicitudesGet(-1, UsuarioActual.CveEmpresa, 2) Then
|
||||
GVSolicitudesPendientes.DataSource = nom.DtResultados.FiltraParametros("Estatus =0")
|
||||
If nom.SolicitudesGet(-1, UsuarioActual.CveEmpresa, CveTipoSolicitud:=2, Estatus:=0, Top:=50) Then
|
||||
GVSolicitudesPendientes.DataSource = nom.DtResultados
|
||||
|
||||
If nom.DtResultados.Rows.Count > 0 Then
|
||||
LnkverificarSolicitudes.Visible = True
|
||||
End If
|
||||
|
||||
GVSolicitudesPendientes.DataBind()
|
||||
GVSolicitudesNominas.DataSource = nom.DtResultados.FiltraParametros("Estatus =1")
|
||||
End If
|
||||
|
||||
If nom.SolicitudesGet(-1, UsuarioActual.CveEmpresa, CveTipoSolicitud:=2, Estatus:=1, Top:=50) Then
|
||||
GVSolicitudesNominas.DataSource = nom.DtResultados
|
||||
GVSolicitudesNominas.DataBind()
|
||||
End If
|
||||
End Using
|
||||
|
||||
UPModalViewSolicitudes.Update()
|
||||
|
||||
|
||||
End Sub
|
||||
Protected Sub LnkShowSolicitudes_Click(ByVal sender As Object, ByVal e As EventArgs)
|
||||
|
||||
TabPanel.ActiveTabIndex = 0
|
||||
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 GeneralesAPIeFacturas()
|
||||
' ' 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
|
||||
|
||||
' 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, CveTipoSolicitud:=3)
|
||||
' End Using
|
||||
|
||||
' If Continuar Then
|
||||
' Dim sbResultado As StringBuilder = New StringBuilder()
|
||||
' Dim api = New GeneralesAPIeFacturas()
|
||||
' Dim ObjApiSolicitud As JToken = CType(api.GeneraSolicitud(UsuarioActual.CveEmpresa, 3), JToken)
|
||||
' Dim resultSolicitud As List(Of String) = New List(Of String)()
|
||||
' Dim resultVerificacion As List(Of String) = New List(Of String)()
|
||||
' Dim ResultadoVerificaionOK = False
|
||||
' Dim SeVerifico = False
|
||||
' Dim TipoMensaje = ModExtensiones.TipoMensaje.MsgInformacion
|
||||
' Dim ResultadoSolicitudOK = False
|
||||
|
||||
' If Not (ObjApiSolicitud Is Nothing) Then
|
||||
' resultSolicitud = ObjApiSolicitud.[Select](Function(token) token.Values().Aggregate(Function(i, j) $"{i}|{j}").Value(Of String)()).ToList()
|
||||
' ResultadoSolicitudOK = Boolean.Parse(resultSolicitud(0))
|
||||
' Else
|
||||
' TipoMensaje = ModExtensiones.TipoMensaje.MsgAdvertencia
|
||||
' End If
|
||||
|
||||
' If ResultadoSolicitudOK Then
|
||||
' Dim ObjApiVerificacion As JToken = CType(api.VerificaSolicitudesNominas(UsuarioActual.CveEmpresa, 3), JToken)
|
||||
|
||||
' If Not (ObjApiVerificacion Is Nothing) Then
|
||||
' resultVerificacion = ObjApiVerificacion.[Select](Function(token) token.Values().Aggregate(Function(i, j) $"{i}|{j}").Value(Of String)()).ToList()
|
||||
' ResultadoVerificaionOK = Boolean.Parse(resultVerificacion(0))
|
||||
' SeVerifico = True
|
||||
' Else
|
||||
' TipoMensaje = ModExtensiones.TipoMensaje.MsgAdvertencia
|
||||
' End If
|
||||
' End If
|
||||
|
||||
' If resultSolicitud.Count = 4 Then
|
||||
|
||||
' If ResultadoSolicitudOK Then
|
||||
|
||||
' If resultSolicitud(1).ToString().Trim().Length > 0 Then
|
||||
' sbResultado.Append($"{resultSolicitud(1)}<br/>")
|
||||
' Else
|
||||
' sbResultado.Append($"Solicitud Generada Correctamente")
|
||||
' sbResultado.Append($"Se presento un error al verificar las solicitudes <br/> {resultSolicitud(1)} <br>")
|
||||
' End If
|
||||
' Else
|
||||
' sbResultado.Append($"{resultSolicitud(1)}")
|
||||
' TipoMensaje = ModExtensiones.TipoMensaje.MsgAdvertencia
|
||||
' End If
|
||||
' Else
|
||||
' sbResultado.AppendLine("Se presento un error al generar la solicitud (API) <br/>")
|
||||
' TipoMensaje = ModExtensiones.TipoMensaje.MsgAdvertencia
|
||||
' End If
|
||||
|
||||
' If SeVerifico AndAlso resultVerificacion.Count = 4 Then
|
||||
|
||||
' If ResultadoVerificaionOK Then
|
||||
' sbResultado.Append($"{resultVerificacion(1)}<br>")
|
||||
' Else
|
||||
' sbResultado.Append($"Se presento un error al verificar las solicitudes {resultVerificacion(1)}<br>")
|
||||
' TipoMensaje = ModExtensiones.TipoMensaje.MsgAdvertencia
|
||||
' End If
|
||||
' Else
|
||||
' sbResultado.AppendLine("Se presento un error al verificar las solicitudes (API) <br/>")
|
||||
' TipoMensaje = ModExtensiones.TipoMensaje.MsgAdvertencia
|
||||
' End If
|
||||
|
||||
' Alert(sbResultado.ToString(), TipoMensaje)
|
||||
' End If
|
||||
|
||||
' If Continuar Then
|
||||
' txtFechaIAdd.Text = ""
|
||||
' txtFechaFAdd.Text = ""
|
||||
' Me.RegistraScript("$('#ModalViewSolicitudes').modal('hide');")
|
||||
' cargasolicitudes()
|
||||
' End If
|
||||
|
||||
'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 GeneralesAPIeFacturas()
|
||||
' 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
|
||||
|
||||
Dim sbResultado As StringBuilder = New StringBuilder()
|
||||
Dim idSolicitudCFDI As Integer = 0
|
||||
Dim idSolicitudMetadata As Integer = 0
|
||||
Dim estatus As Integer = 0
|
||||
@@ -2605,20 +2714,23 @@ Partial Class Compras_eFacturas
|
||||
Dim fechaFin As DateTime = txtFechaFAdd.Text.ToDateTime()
|
||||
Dim cveUsuarioIng As Integer = UsuarioActual.CveUsuario
|
||||
Dim cveEmpresa As Integer = UsuarioActual.CveEmpresa
|
||||
Dim Continuar As Boolean = False
|
||||
Dim CveSolicitudAgregada As Integer = -1
|
||||
Dim Folio As Integer = -1
|
||||
|
||||
Using nom As ClsNominas = New ClsNominas()
|
||||
Continuar = nom.SolicitudesAdd(idSolicitudCFDI, idSolicitudMetadata, estatus, observaciones, fechaInicio, fechaFin, cveUsuarioIng, cveEmpresa, CveTipoSolicitud:=3)
|
||||
Dim CveTipoSolicitud As Integer = If(ChkMetaDatos.Checked, 202, 2)
|
||||
CveSolicitudAgregada = nom.SolicitudesAdd2(idSolicitudCFDI, idSolicitudMetadata, estatus, observaciones, fechaInicio, fechaFin, cveUsuarioIng, cveEmpresa, CveTipoSolicitud:=CveTipoSolicitud)
|
||||
|
||||
If CveSolicitudAgregada > 0 Then
|
||||
Folio = nom.FolioSolicitud
|
||||
End If
|
||||
End Using
|
||||
|
||||
If Continuar Then
|
||||
Dim sbResultado As StringBuilder = New StringBuilder()
|
||||
If CveSolicitudAgregada > 0 Then
|
||||
Dim api = New GeneralesAPIeFacturas()
|
||||
Dim ObjApiSolicitud As JToken = CType(api.GeneraSolicitud(UsuarioActual.CveEmpresa, 3), JToken)
|
||||
Dim ObjApiSolicitud As JToken = CType(api.GeneraSolicitud(UsuarioActual.CveEmpresa, 2, CveSolicitudAgregada), JToken)
|
||||
Dim resultSolicitud As List(Of String) = New List(Of String)()
|
||||
Dim resultVerificacion As List(Of String) = New List(Of String)()
|
||||
Dim ResultadoVerificaionOK = False
|
||||
Dim SeVerifico = False
|
||||
Dim TipoMensaje = ModExtensiones.TipoMensaje.MsgInformacion
|
||||
Dim ResultadoSolicitudOK = False
|
||||
|
||||
@@ -2630,134 +2742,246 @@ Partial Class Compras_eFacturas
|
||||
End If
|
||||
|
||||
If ResultadoSolicitudOK Then
|
||||
Dim ObjApiVerificacion As JToken = CType(api.VerificaSolicitudesNominas(UsuarioActual.CveEmpresa, 3), JToken)
|
||||
|
||||
If Not (ObjApiVerificacion Is Nothing) Then
|
||||
resultVerificacion = ObjApiVerificacion.[Select](Function(token) token.Values().Aggregate(Function(i, j) $"{i}|{j}").Value(Of String)()).ToList()
|
||||
ResultadoVerificaionOK = Boolean.Parse(resultVerificacion(0))
|
||||
SeVerifico = True
|
||||
Else
|
||||
TipoMensaje = ModExtensiones.TipoMensaje.MsgAdvertencia
|
||||
End If
|
||||
End If
|
||||
|
||||
If resultSolicitud.Count = 4 Then
|
||||
|
||||
If ResultadoSolicitudOK Then
|
||||
|
||||
If resultSolicitud(1).ToString().Trim().Length > 0 Then
|
||||
sbResultado.Append($"{resultSolicitud(1)}<br/>")
|
||||
Else
|
||||
sbResultado.Append($"Solicitud Generada Correctamente")
|
||||
sbResultado.Append($"Se presento un error al verificar las solicitudes <br/> {resultSolicitud(1)} <br>")
|
||||
End If
|
||||
Else
|
||||
sbResultado.Append($"{resultSolicitud(1)}")
|
||||
TipoMensaje = ModExtensiones.TipoMensaje.MsgAdvertencia
|
||||
End If
|
||||
sbResultado.Append($"Solicitud registrada. {resultSolicitud(1)}<br> Folio: {Folio}")
|
||||
Else
|
||||
sbResultado.AppendLine("Se presento un error al generar la solicitud (API) <br/>")
|
||||
TipoMensaje = ModExtensiones.TipoMensaje.MsgAdvertencia
|
||||
End If
|
||||
|
||||
If SeVerifico AndAlso resultVerificacion.Count = 4 Then
|
||||
|
||||
If ResultadoVerificaionOK Then
|
||||
sbResultado.Append($"{resultVerificacion(1)}<br>")
|
||||
If ObjApiSolicitud IsNot Nothing AndAlso resultSolicitud.Count = 4 Then
|
||||
sbResultado.Append($"Solicitud registrada, pendiente de verificar en SAT <br> Folio: {Folio} <br>({resultSolicitud(1)})<br>")
|
||||
Else
|
||||
sbResultado.Append($"Se presento un error al verificar las solicitudes {resultVerificacion(1)}<br>")
|
||||
TipoMensaje = ModExtensiones.TipoMensaje.MsgAdvertencia
|
||||
sbResultado.Append($"Solicitud registrada, pendiente de verificar en SAT <br> Folio: {Folio}")
|
||||
End If
|
||||
Else
|
||||
sbResultado.AppendLine("Se presento un error al verificar las solicitudes (API) <br/>")
|
||||
|
||||
TipoMensaje = ModExtensiones.TipoMensaje.MsgAdvertencia
|
||||
End If
|
||||
|
||||
Alert(sbResultado.ToString(), TipoMensaje)
|
||||
Else
|
||||
Alert("No se puedo registrar la solictud".ToString(), ModExtensiones.TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
|
||||
If Continuar Then
|
||||
If CveSolicitudAgregada > 0 Then
|
||||
txtFechaIAdd.Text = ""
|
||||
txtFechaFAdd.Text = ""
|
||||
Me.RegistraScript("$('#ModalViewSolicitudes').modal('hide');")
|
||||
ChkMetaDatos.Checked = False
|
||||
Me.RegistraScript("$('#ModalAgregarSolicitud').modal('hide');")
|
||||
cargasolicitudes()
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
'Protected Sub LnkverificarSolicitudes_Click(ByVal sender As Object, ByVal e As EventArgs)
|
||||
|
||||
|
||||
|
||||
|
||||
' Dim sbResultado As StringBuilder = New StringBuilder()
|
||||
' Dim api = New GeneralesAPIeFacturas()
|
||||
' Dim ObjApiSolicitud As JToken = CType(api.GeneraSolicitud(UsuarioActual.CveEmpresa, 3), JToken)
|
||||
' Dim resultSolicitud As List(Of String) = New List(Of String)()
|
||||
' Dim resultVerificacion As List(Of String) = New List(Of String)()
|
||||
' Dim ResultadoVerificaionOK = False
|
||||
' Dim SeVerifico = False
|
||||
' Dim TipoMensaje = ModExtensiones.TipoMensaje.MsgInformacion
|
||||
' Dim ResultadoSolicitudOK = False
|
||||
|
||||
' If Not (ObjApiSolicitud Is Nothing) Then
|
||||
' resultSolicitud = ObjApiSolicitud.[Select](Function(token) token.Values().Aggregate(Function(i, j) $"{i}|{j}").Value(Of String)()).ToList()
|
||||
' ResultadoSolicitudOK = Boolean.Parse(resultSolicitud(0))
|
||||
' Else
|
||||
' TipoMensaje = ModExtensiones.TipoMensaje.MsgAdvertencia
|
||||
' End If
|
||||
|
||||
' If ResultadoSolicitudOK Then
|
||||
' Dim ObjApiVerificacion As JToken = CType(api.VerificaSolicitudesNominas(UsuarioActual.CveEmpresa, 3), JToken)
|
||||
|
||||
' If Not (ObjApiVerificacion Is Nothing) Then
|
||||
' resultVerificacion = ObjApiVerificacion.[Select](Function(token) token.Values().Aggregate(Function(i, j) $"{i}|{j}").Value(Of String)()).ToList()
|
||||
' ResultadoVerificaionOK = Boolean.Parse(resultVerificacion(0))
|
||||
' SeVerifico = True
|
||||
' Else
|
||||
' TipoMensaje = ModExtensiones.TipoMensaje.MsgAdvertencia
|
||||
' End If
|
||||
' End If
|
||||
|
||||
' If resultSolicitud.Count = 4 Then
|
||||
|
||||
' If ResultadoSolicitudOK Then
|
||||
|
||||
' If resultSolicitud(2).ToString().Trim().Length > 0 Then
|
||||
' sbResultado.Append($"{resultSolicitud(2)}<br/>")
|
||||
' Else
|
||||
' sbResultado.Append($"Solicitud Generada Correctamente")
|
||||
' sbResultado.Append($"Se presento un error al verificar las solicitudes <br/> {resultSolicitud(1)} <br>")
|
||||
' End If
|
||||
' Else
|
||||
' sbResultado.Append($"{resultSolicitud(1)}")
|
||||
' TipoMensaje = ModExtensiones.TipoMensaje.MsgAdvertencia
|
||||
' End If
|
||||
' Else
|
||||
' sbResultado.AppendLine("Se presento un error al generar la solicitud (API) <br/>")
|
||||
' TipoMensaje = ModExtensiones.TipoMensaje.MsgAdvertencia
|
||||
' End If
|
||||
|
||||
' If SeVerifico AndAlso resultVerificacion.Count = 4 Then
|
||||
|
||||
' If ResultadoVerificaionOK Then
|
||||
' sbResultado.Append($"{resultVerificacion(1)}<br>")
|
||||
' Else
|
||||
' sbResultado.Append($"Se presento un error al verificar las solicitudes {resultVerificacion(1)}<br>")
|
||||
' TipoMensaje = ModExtensiones.TipoMensaje.MsgAdvertencia
|
||||
' End If
|
||||
' Else
|
||||
' sbResultado.AppendLine("Se presento un error al verificar las solicitudes (API) <br/>")
|
||||
' TipoMensaje = ModExtensiones.TipoMensaje.MsgAdvertencia
|
||||
' End If
|
||||
|
||||
' Alert(sbResultado.ToString(), TipoMensaje)
|
||||
' cargasolicitudes()
|
||||
|
||||
|
||||
|
||||
'End Sub
|
||||
|
||||
|
||||
Protected Sub LnkverificarSolicitudes_Click(ByVal sender As Object, ByVal e As EventArgs)
|
||||
Try
|
||||
Dim sbResultado As StringBuilder = New StringBuilder()
|
||||
|
||||
For Each GvRow As GridViewRow In GVSolicitudesPendientes.Rows
|
||||
Dim CveSolicitudActual As Integer = GvRow.DataKey("CveSolicitud").ToEntero()
|
||||
Dim idSolicitud As String = GvRow.DataKey("idSolicitud").Trim()
|
||||
Dim CveTipoSolicitud As Integer = GvRow.DataKey("CveTipoSolicitud").ToEntero()
|
||||
Dim Folio As Integer = GvRow.DataKey("Folio").ToEntero()
|
||||
Dim resultSolicitud As List(Of String) = New List(Of String)()
|
||||
Dim resultVerificacion As List(Of String) = New List(Of String)()
|
||||
Dim ResultadoVerificaionOK = False
|
||||
Dim SeVerifico = False
|
||||
Dim TipoMensaje = ModExtensiones.TipoMensaje.MsgInformacion
|
||||
Dim ResultadoSolicitudOK = False
|
||||
Dim api = New GeneralesAPIeFacturas()
|
||||
|
||||
If idSolicitud.Length = 0 Then
|
||||
Dim ObjApiSolicitud As JToken = CType(api.GeneraSolicitud(UsuarioActual.CveEmpresa, CveTipoSolicitud, CveSolicitudActual), JToken)
|
||||
|
||||
|
||||
Dim sbResultado As StringBuilder = New StringBuilder()
|
||||
Dim api = New GeneralesAPIeFacturas()
|
||||
Dim ObjApiSolicitud As JToken = CType(api.GeneraSolicitud(UsuarioActual.CveEmpresa, 3), JToken)
|
||||
Dim resultSolicitud As List(Of String) = New List(Of String)()
|
||||
Dim resultVerificacion As List(Of String) = New List(Of String)()
|
||||
Dim ResultadoVerificaionOK = False
|
||||
Dim SeVerifico = False
|
||||
Dim TipoMensaje = ModExtensiones.TipoMensaje.MsgInformacion
|
||||
Dim ResultadoSolicitudOK = False
|
||||
|
||||
If Not (ObjApiSolicitud Is Nothing) Then
|
||||
resultSolicitud = ObjApiSolicitud.[Select](Function(token) token.Values().Aggregate(Function(i, j) $"{i}|{j}").Value(Of String)()).ToList()
|
||||
ResultadoSolicitudOK = Boolean.Parse(resultSolicitud(0))
|
||||
Else
|
||||
TipoMensaje = ModExtensiones.TipoMensaje.MsgAdvertencia
|
||||
End If
|
||||
|
||||
If ResultadoSolicitudOK Then
|
||||
Dim ObjApiVerificacion As JToken = CType(api.VerificaSolicitudesNominas(UsuarioActual.CveEmpresa, 3), JToken)
|
||||
|
||||
If Not (ObjApiVerificacion Is Nothing) Then
|
||||
resultVerificacion = ObjApiVerificacion.[Select](Function(token) token.Values().Aggregate(Function(i, j) $"{i}|{j}").Value(Of String)()).ToList()
|
||||
ResultadoVerificaionOK = Boolean.Parse(resultVerificacion(0))
|
||||
SeVerifico = True
|
||||
Else
|
||||
TipoMensaje = ModExtensiones.TipoMensaje.MsgAdvertencia
|
||||
End If
|
||||
End If
|
||||
|
||||
If resultSolicitud.Count = 4 Then
|
||||
|
||||
If ResultadoSolicitudOK Then
|
||||
|
||||
If resultSolicitud(2).ToString().Trim().Length > 0 Then
|
||||
sbResultado.Append($"{resultSolicitud(2)}<br/>")
|
||||
If Not (ObjApiSolicitud Is Nothing) Then
|
||||
resultSolicitud = ObjApiSolicitud.[Select](Function(token) token.Values().Aggregate(Function(i, j) $"{i}|{j}").Value(Of String)()).ToList()
|
||||
ResultadoSolicitudOK = Boolean.Parse(resultSolicitud(0))
|
||||
sbResultado.Append($"Solicitud {Folio} solicitada a SAT.<br>")
|
||||
Else
|
||||
TipoMensaje = ModExtensiones.TipoMensaje.MsgAdvertencia
|
||||
End If
|
||||
Else
|
||||
sbResultado.Append($"Solicitud Generada Correctamente")
|
||||
sbResultado.Append($"Se presento un error al verificar las solicitudes <br/> {resultSolicitud(1)} <br>")
|
||||
resultSolicitud = New List(Of String)()
|
||||
resultSolicitud.Add("true")
|
||||
resultSolicitud.Add("")
|
||||
resultSolicitud.Add("")
|
||||
resultSolicitud.Add("")
|
||||
ResultadoSolicitudOK = True
|
||||
End If
|
||||
Else
|
||||
sbResultado.Append($"{resultSolicitud(1)}")
|
||||
TipoMensaje = ModExtensiones.TipoMensaje.MsgAdvertencia
|
||||
End If
|
||||
Else
|
||||
sbResultado.AppendLine("Se presento un error al generar la solicitud (API) <br/>")
|
||||
TipoMensaje = ModExtensiones.TipoMensaje.MsgAdvertencia
|
||||
End If
|
||||
|
||||
If SeVerifico AndAlso resultVerificacion.Count = 4 Then
|
||||
If ResultadoSolicitudOK Then
|
||||
Dim ObjApiVerificacion As JToken = CType(api.VerificaSolicitudesNominas(UsuarioActual.CveEmpresa, CveTipoSolicitud, CveSolicitudActual), JToken)
|
||||
|
||||
If ResultadoVerificaionOK Then
|
||||
sbResultado.Append($"{resultVerificacion(1)}<br>")
|
||||
Else
|
||||
sbResultado.Append($"Se presento un error al verificar las solicitudes {resultVerificacion(1)}<br>")
|
||||
TipoMensaje = ModExtensiones.TipoMensaje.MsgAdvertencia
|
||||
End If
|
||||
Else
|
||||
sbResultado.AppendLine("Se presento un error al verificar las solicitudes (API) <br/>")
|
||||
TipoMensaje = ModExtensiones.TipoMensaje.MsgAdvertencia
|
||||
End If
|
||||
If Not (ObjApiVerificacion Is Nothing) Then
|
||||
resultVerificacion = ObjApiVerificacion.[Select](Function(token) token.Values().Aggregate(Function(i, j) $"{i}|{j}").Value(Of String)()).ToList()
|
||||
ResultadoVerificaionOK = Boolean.Parse(resultVerificacion(0))
|
||||
SeVerifico = True
|
||||
Else
|
||||
TipoMensaje = ModExtensiones.TipoMensaje.MsgAdvertencia
|
||||
End If
|
||||
Else
|
||||
|
||||
Alert(sbResultado.ToString(), TipoMensaje)
|
||||
cargasolicitudes()
|
||||
If resultSolicitud.Count = 4 Then
|
||||
sbResultado.Append($"({resultSolicitud(1)})<br> Folio:{Folio} <br> ")
|
||||
Else
|
||||
sbResultado.Append($"Solicitud pendiente de verificar en SAT <br> Folio:{Folio} <br>")
|
||||
End If
|
||||
|
||||
TipoMensaje = ModExtensiones.TipoMensaje.MsgAdvertencia
|
||||
End If
|
||||
|
||||
If SeVerifico AndAlso resultVerificacion.Count = 4 Then
|
||||
|
||||
If ResultadoVerificaionOK Then
|
||||
sbResultado.Append($"Solicitud procesada.<br> Folio: {Folio} <br> {resultVerificacion(1)}")
|
||||
Else
|
||||
sbResultado.Append($"Solicitud no verificada <br> Folio: {Folio}{resultVerificacion(1)}.<br>")
|
||||
TipoMensaje = ModExtensiones.TipoMensaje.MsgAdvertencia
|
||||
End If
|
||||
Else
|
||||
sbResultado.Append($"Se presento un error al verificar la solicitud <br> Folio: {Folio}.")
|
||||
TipoMensaje = ModExtensiones.TipoMensaje.MsgAdvertencia
|
||||
End If
|
||||
|
||||
Alert(sbResultado.ToString(), TipoMensaje)
|
||||
Next
|
||||
|
||||
cargasolicitudes()
|
||||
Catch ex As Exception
|
||||
Alert(ex.StackTrace)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
|
||||
Protected Sub LnkAgregarSolictud_Click(ByVal sender As Object, ByVal e As EventArgs)
|
||||
txtFechaIAdd.Text = ""
|
||||
txtFechaFAdd.Text = ""
|
||||
ChkMetaDatos.Checked = False
|
||||
UPModalViewSolicitudesAgregar.Update()
|
||||
Me.RegistraScript("$('#ModalAgregarSolicitud').modal('show');")
|
||||
End Sub
|
||||
|
||||
Protected Sub GVSolicitudesNominas_RowDataBound(ByVal sender As Object, ByVal e As GridViewRowEventArgs)
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
|
||||
If e.Row.DataKey("ArchivoXML").Length > 0 Then
|
||||
Dim UrlDescarga = $"{UsuarioActual.Empresa.Ruta}NomXMLSAT\\Descargas\\{e.Row.DataKey("ArchivoXML")}"
|
||||
|
||||
If System.IO.File.Exists(UrlDescarga) Then
|
||||
Dim LnkDescargaXML As LinkButton = e.Row.FCLinkButton("LnkDescargaXML")
|
||||
ScriptManager.GetCurrent(Me).RegisterPostBackControl(LnkDescargaXML)
|
||||
LnkDescargaXML.Visible = True
|
||||
End If
|
||||
End If
|
||||
|
||||
Dim lblobservaciones As Label = e.Row.FCLabel("lblobservaciones")
|
||||
Dim lBLTipoDescarga As Label = e.Row.FCLabel("lBLTipoDescarga")
|
||||
|
||||
lblobservaciones.Attributes.Add("data-html", "true")
|
||||
lblobservaciones.Attributes.Add("data-toggle", "tooltip")
|
||||
lblobservaciones.Attributes.Add("data-placement", "top")
|
||||
lblobservaciones.Attributes.Add("title", e.Row.DataKey("Observaciones"))
|
||||
lBLTipoDescarga.Attributes.Add("data-html", "true")
|
||||
lBLTipoDescarga.Attributes.Add("data-toggle", "tooltip")
|
||||
lBLTipoDescarga.Attributes.Add("data-placement", "top")
|
||||
lBLTipoDescarga.Attributes.Add("title", e.Row.DataKey("TipoDescargaStr"))
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
Protected Sub LnkDescargaXML_Click(ByVal sender As Object, ByVal e As EventArgs)
|
||||
Dim GvRow As GridViewRow = CType((CType(sender, LinkButton)).NamingContainer, GridViewRow)
|
||||
Dim UrlDescarga = $"{UsuarioActual.Empresa.Ruta}NomXMLSAT\\Descargas\\{GvRow.DataKey("ArchivoXML")}"
|
||||
Dim Archivo = New System.IO.FileInfo(UrlDescarga)
|
||||
|
||||
If Archivo.Exists Then
|
||||
Response.Clear()
|
||||
Response.AddHeader("Content-Disposition", "attachment; filename=" & Archivo.Name)
|
||||
Response.AddHeader("Content-Length", Archivo.Length.ToString())
|
||||
Response.ContentType = "text/octet-stream"
|
||||
Response.Flush()
|
||||
Response.TransmitFile(Archivo.FullName)
|
||||
Response.[End]()
|
||||
End If
|
||||
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
|
||||
|
||||
@@ -4196,8 +4420,6 @@ Partial Class Compras_eFacturas
|
||||
Alert("no se pudo procesar el archivo xml")
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub VinculacionMasivaComplementos()
|
||||
|
||||
Dim CountVinculados As Integer = 0
|
||||
@@ -4546,15 +4768,10 @@ Partial Class Compras_eFacturas
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Protected Sub LnkVinculacionMasivaComplementos_Click(sender As Object, e As EventArgs)
|
||||
VinculacionMasivaComplementos()
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
|
||||
#Region "TRASLADOS"
|
||||
|
||||
|
||||
@@ -4733,7 +4950,6 @@ Partial Class Compras_eFacturas
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
Protected Sub LnkModalPersonalizar_Click(sender As Object, e As EventArgs)
|
||||
|
||||
GvD.Columns(11).Visible = ChkModalPersonalzarFolioFiscal.Checked
|
||||
@@ -4748,9 +4964,6 @@ Partial Class Compras_eFacturas
|
||||
RegistraScript("$('#DvmodalPersonalizar').modal('hide');")
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
|
||||
Protected Sub LnkPersonalizar_Click(sender As Object, e As EventArgs)
|
||||
|
||||
RegistraScript("$('#DvmodalPersonalizar').modal('show');")
|
||||
@@ -4768,12 +4981,12 @@ Public Class GeneralesAPIeFacturas
|
||||
MyBase.New(domainApi, token)
|
||||
End Sub
|
||||
|
||||
Public Function GeneraSolicitud(CveEmpresa As Integer, CveTipoSolicitud As Integer) As Object
|
||||
Return getData(Of Object)($"GeneraSolicitud/{CveEmpresa}/{CveTipoSolicitud}", Nothing, ADSNetLibraryzdE.HelpersE.ConexionesE.SIGAPIE.requestMethod.[GET], False)
|
||||
Public Function GeneraSolicitud(CveEmpresa As Integer, CveTipoSolicitud As Integer, CveSolicitud As Integer) As Object
|
||||
Return getData(Of Object)($"GeneraSolicitud/{CveEmpresa}/{CveTipoSolicitud}/{CveSolicitud}", Nothing, ADSNetLibraryzdE.HelpersE.ConexionesE.SIGAPIE.requestMethod.[GET], False)
|
||||
End Function
|
||||
|
||||
Public Function VerificaSolicitudesNominas(CveEmpresa As Integer, CveTipoSolicitud As Integer) As Object
|
||||
Return getData(Of Object)($"VerificaSolicitudesNominas/{CveEmpresa}/{CveTipoSolicitud}", Nothing, ADSNetLibraryzdE.HelpersE.ConexionesE.SIGAPIE.requestMethod.[GET], False)
|
||||
Public Function VerificaSolicitudesNominas(CveEmpresa As Integer, CveTipoSolicitud As Integer, CveSolicitud As Integer) As Object
|
||||
Return getData(Of Object)($"VerificaSolicitudesNominas/{CveEmpresa}/{CveTipoSolicitud}/{CveSolicitud}", Nothing, ADSNetLibraryzdE.HelpersE.ConexionesE.SIGAPIE.requestMethod.[GET], False)
|
||||
End Function
|
||||
End Class
|
||||
|
||||
|
||||
@@ -1514,7 +1514,6 @@
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
<rd:Selected>true</rd:Selected>
|
||||
</CellContents>
|
||||
</TablixCell>
|
||||
<TablixCell>
|
||||
@@ -1869,7 +1868,6 @@
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
<rd:Selected>true</rd:Selected>
|
||||
</CellContents>
|
||||
</TablixCell>
|
||||
<TablixCell>
|
||||
@@ -2224,7 +2222,6 @@
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
<rd:Selected>true</rd:Selected>
|
||||
</CellContents>
|
||||
</TablixCell>
|
||||
<TablixCell>
|
||||
@@ -2579,7 +2576,6 @@
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
<rd:Selected>true</rd:Selected>
|
||||
</CellContents>
|
||||
</TablixCell>
|
||||
<TablixCell>
|
||||
@@ -2934,7 +2930,6 @@
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
<rd:Selected>true</rd:Selected>
|
||||
</CellContents>
|
||||
</TablixCell>
|
||||
<TablixCell>
|
||||
@@ -4948,7 +4943,7 @@
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>EXPLORACIONES MINERAS DEL DESIERTO S.A. DE C.V. RFC: EMD950206SRA </Value>
|
||||
<Value>EXPLORACIONES MINERAS DEL DESIERTO S.A. DE C.V. </Value>
|
||||
<Style>
|
||||
<FontStyle>Normal</FontStyle>
|
||||
<FontSize>8pt</FontSize>
|
||||
@@ -4965,7 +4960,7 @@
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>Tipo de Comprobante: I - Ingreso </Value>
|
||||
<Value>RFC: EMD950206SRA </Value>
|
||||
<Style>
|
||||
<FontStyle>Normal</FontStyle>
|
||||
<FontSize>8pt</FontSize>
|
||||
|
||||
@@ -361,8 +361,7 @@
|
||||
<th width="100px">
|
||||
<asp:Literal ID="LtCantidad" Text="Cantidad" runat="server" />
|
||||
</th>
|
||||
<th width="300px">Clasificación
|
||||
<br />
|
||||
<th width="300px">
|
||||
Producto
|
||||
</th>
|
||||
<th width="90px">Unidad</th>
|
||||
@@ -390,14 +389,18 @@
|
||||
<td style="text-align: left;" align="center">
|
||||
<div class="psagregar">
|
||||
<div class="comboxes">
|
||||
<asp:DropDownList ID="DdlClasificacion" runat="server" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="Clasificacion" DataValueField="CveClasificacion" Class="form-control input-sm select2me">
|
||||
<%-- <asp:DropDownList ID="DdlClasificacion" runat="server" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="Clasificacion" DataValueField="CveClasificacion" Class="form-control input-sm select2me">
|
||||
<asp:ListItem Selected="True" Text="Seleccione la Clasificación (Todas)" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<br />
|
||||
<asp:DropDownList ID="DdlProducto" runat="server" DataTextField="PSCodigo" AutoPostBack="true" DataValueField="CvePS" Class="form-control input-sm select2me"></asp:DropDownList>
|
||||
<select id="DdlProductows" runat="server" class="form-control"></select><asp:Button ID="myhidenbutton" runat="server" Text="Button" Style="display: none;" />
|
||||
<br />--%>
|
||||
<%--<asp:DropDownList ID="DdlProducto" runat="server" DataTextField="PSCodigo" AutoPostBack="true" DataValueField="CvePS" Class="form-control input-sm select2me"></asp:DropDownList>--%>
|
||||
|
||||
<ADS:Dropdownlost Onselectedindexchange="DdlProducto_selectedindexchange" runat="server" ID="DdlProducto" CssStyle="width:100%%;" CssClass="DdlPS" CssClassDdl="select2me " DataTextField="PSCodigo" DataValueField="CvePS" />
|
||||
|
||||
|
||||
<%-- <select id="DdlProductows" runat="server" class="form-control"></select><asp:Button ID="myhidenbutton" runat="server" Text="Button" Style="display: none;" />
|
||||
<asp:HiddenField ID="HFProducto" runat="server" />
|
||||
<asp:HiddenField ID="HFTProducto" runat="server" />
|
||||
<asp:HiddenField ID="HFTProducto" runat="server" />--%>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
@@ -725,7 +728,8 @@
|
||||
<script type="text/javascript">
|
||||
|
||||
function AddItem(Text, Value, idproductows) {
|
||||
// Create an Option object <%= DdlProductows.ClientID%>
|
||||
|
||||
<%-- Create an Option object <%= DdlProductows.ClientID%> --%>
|
||||
|
||||
var opt = document.createElement("option");
|
||||
|
||||
@@ -741,7 +745,7 @@
|
||||
}
|
||||
|
||||
|
||||
Sys.Application.add_load(function (s, e) {
|
||||
<%-- Sys.Application.add_load(function (s, e) {
|
||||
|
||||
var Tam = TamañoVentana();
|
||||
var Alto = Tam.height - 300;
|
||||
@@ -805,73 +809,73 @@
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
});--%>
|
||||
|
||||
var DdlProductows = '-1';
|
||||
var DdlProducto = '-1';
|
||||
var HFProducto = '-1';
|
||||
var HFTProducto = '-1';
|
||||
var Myhidenbutton = '-1';
|
||||
function Asigna105(tDdlProductows, tDdlProducto, tHFProducto, tHFTProducto, tsMyhidenbutton) {
|
||||
//function Asigna105(tDdlProductows, tDdlProducto, tHFProducto, tHFTProducto, tsMyhidenbutton) {
|
||||
|
||||
|
||||
DdlProductoWS = tDdlProductows;
|
||||
DdlProducto = tDdlProducto;
|
||||
HFProducto = tHFProducto;
|
||||
tHFTProducto = tHFTProducto;
|
||||
Myhidenbutton = tsMyhidenbutton;
|
||||
// DdlProductoWS = tDdlProductows;
|
||||
// DdlProducto = tDdlProducto;
|
||||
// HFProducto = tHFProducto;
|
||||
// tHFTProducto = tHFTProducto;
|
||||
// Myhidenbutton = tsMyhidenbutton;
|
||||
|
||||
Asigna1052(DdlProductows, DdlProducto, HFProducto, HFTProducto, sMyhidenbutton);
|
||||
}
|
||||
// Asigna1052(DdlProductows, DdlProducto, HFProducto, HFTProducto, sMyhidenbutton);
|
||||
//}
|
||||
|
||||
function Asigna1052(DdlProductows, DdlProducto, HFProducto, HFTProducto, sMyhidenbutton) {
|
||||
//function Asigna1052(DdlProductows, DdlProducto, HFProducto, HFTProducto, sMyhidenbutton) {
|
||||
|
||||
if ($(DdlProductows)) {
|
||||
if (!($(HFProducto).val() === '')) {
|
||||
AddItem($(HFTProducto).val(), $(HFProducto).val(), DdlProductows.replace('#', ''));
|
||||
}
|
||||
}
|
||||
if ($(DdlProductows).data('creado') === '1') { } else {
|
||||
$(DdlProductows).data('creado', '1')
|
||||
$(DdlProductows).select2({
|
||||
ajax: {
|
||||
url: "/Ashx/SIGWeb.ashx",
|
||||
dataType: 'json',
|
||||
delay: 250,
|
||||
data: function (params) {
|
||||
return {
|
||||
Name: params.term, // search term
|
||||
Metodo: 'getps'
|
||||
};
|
||||
},
|
||||
processResults: function (data, params) {
|
||||
params.page = params.page || 1;
|
||||
// if ($(DdlProductows)) {
|
||||
// if (!($(HFProducto).val() === '')) {
|
||||
// AddItem($(HFTProducto).val(), $(HFProducto).val(), DdlProductows.replace('#', ''));
|
||||
// }
|
||||
// }
|
||||
// if ($(DdlProductows).data('creado') === '1') { } else {
|
||||
// $(DdlProductows).data('creado', '1')
|
||||
// $(DdlProductows).select2({
|
||||
// ajax: {
|
||||
// url: "/Ashx/SIGWeb.ashx",
|
||||
// dataType: 'json',
|
||||
// delay: 250,
|
||||
// data: function (params) {
|
||||
// return {
|
||||
// Name: params.term, // search term
|
||||
// Metodo: 'getps'
|
||||
// };
|
||||
// },
|
||||
// processResults: function (data, params) {
|
||||
// params.page = params.page || 1;
|
||||
|
||||
return {
|
||||
results: data,
|
||||
pagination: {
|
||||
more: (params.page * 30) < data.total_count
|
||||
}
|
||||
};
|
||||
},
|
||||
cache: true
|
||||
},
|
||||
escapeMarkup: function (markup) { return markup; }, // let our custom formatter work
|
||||
minimumInputLength: 3
|
||||
});
|
||||
}
|
||||
if ($(DdlProductows)) {
|
||||
if (!($(HFProducto).val() === '')) {
|
||||
AddItem($(HFTProducto).val(), $(HFProducto).val(), DdlProductows.replace('#', ''));
|
||||
}
|
||||
$(DdlProductows).on("select2:select", function (e) { console.log(e); $(HFProducto).val(e.params.data.id); $(HFTProducto).val(e.params.data.text); $(sMyhidenbutton).click(); });
|
||||
}
|
||||
if ($(DdlProducto)) {
|
||||
$(DdlProducto).on("select2:select", function (e) { console.log(e); $(HFProducto).val(e.params.data.id); $(HFTProducto).val(e.params.data.text); });
|
||||
// return {
|
||||
// results: data,
|
||||
// pagination: {
|
||||
// more: (params.page * 30) < data.total_count
|
||||
// }
|
||||
// };
|
||||
// },
|
||||
// cache: true
|
||||
// },
|
||||
// escapeMarkup: function (markup) { return markup; }, // let our custom formatter work
|
||||
// minimumInputLength: 3
|
||||
// });
|
||||
// }
|
||||
// if ($(DdlProductows)) {
|
||||
// if (!($(HFProducto).val() === '')) {
|
||||
// AddItem($(HFTProducto).val(), $(HFProducto).val(), DdlProductows.replace('#', ''));
|
||||
// }
|
||||
// $(DdlProductows).on("select2:select", function (e) { console.log(e); $(HFProducto).val(e.params.data.id); $(HFTProducto).val(e.params.data.text); $(sMyhidenbutton).click(); });
|
||||
// }
|
||||
// if ($(DdlProducto)) {
|
||||
// $(DdlProducto).on("select2:select", function (e) { console.log(e); $(HFProducto).val(e.params.data.id); $(HFTProducto).val(e.params.data.text); });
|
||||
|
||||
}
|
||||
// }
|
||||
|
||||
}
|
||||
//}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -88,6 +88,24 @@ Partial Class Inventarios_Consignaciones
|
||||
TxtFechaTraspaso.Text = Now.ToShortDateString
|
||||
TxtFechaDevolucion.Text = Now.ToShortDateString
|
||||
SoloLectura = False
|
||||
|
||||
'Carga Productos
|
||||
DdlProducto.setEsWebService(UsuarioActual.Empresa.Funcionalidad(105) = "1")
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(105) = "1" Then
|
||||
DdlProducto.ddlWS.Attributes.Add("data-cveclasificacion", "-1")
|
||||
DdlProducto.SelectedText = ""
|
||||
DdlProducto.SelectedValue = "-1"
|
||||
DdlProducto.ddl.Visible = False
|
||||
|
||||
Else
|
||||
DdlProducto.ddl.Items.Clear()
|
||||
DdlProducto.ddl.DataSource = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa, CveClasificacion:=-1)
|
||||
DdlProducto.ddl.DataBind()
|
||||
DdlProducto.ddl.Items.Insert(0, New ListItem("Seleccione el Producto", "-1"))
|
||||
DdlProducto.ddlWS.Visible = False
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub CreaDT()
|
||||
@@ -136,12 +154,12 @@ Partial Class Inventarios_Consignaciones
|
||||
Private Sub CargaCombos()
|
||||
|
||||
'Llenar Clasificaciones
|
||||
If UsuarioActual.CveEmpresa = 66 Then
|
||||
DdlClasificacion.DataSource = GlobalDTSubFamilias(UsuarioActual.CveEmpresa).FiltraParametros("", Orderby:="Clasificacion")
|
||||
Else
|
||||
DdlClasificacion.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltraParametros(" Codigo = '' OR Codigo IS NULL ", Orderby:="Clasificacion")
|
||||
End If
|
||||
DdlClasificacion.DataBind()
|
||||
'If UsuarioActual.CveEmpresa = 66 Then
|
||||
' DdlClasificacion.DataSource = GlobalDTSubFamilias(UsuarioActual.CveEmpresa).FiltraParametros("", Orderby:="Clasificacion")
|
||||
'Else
|
||||
' DdlClasificacion.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltraParametros(" Codigo = '' OR Codigo IS NULL ", Orderby:="Clasificacion")
|
||||
'End If
|
||||
'DdlClasificacion.DataBind()
|
||||
|
||||
|
||||
'Llena unidades de medida
|
||||
@@ -168,15 +186,19 @@ Partial Class Inventarios_Consignaciones
|
||||
DdlProveedorFiltro.SelectedValue = "-1"
|
||||
DdlProveedorFiltro.SelectedText = "Seleccione el Proveedor"
|
||||
|
||||
'Llenar el dropdownlist de Productos y servicios
|
||||
If UsuarioActual.Empresa.Funcionalidad(105) = "1" Then
|
||||
DdlProducto.DataSource = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa)
|
||||
DdlProducto.DataBind()
|
||||
DdlProducto.Items.Insert(0, New ListItem("----", "-1"))
|
||||
DdlProductows.Visible = False
|
||||
Else
|
||||
DdlProducto.Visible = False
|
||||
End If
|
||||
''Llenar el dropdownlist de Productos y servicios
|
||||
'If UsuarioActual.Empresa.Funcionalidad(105) = "1" Then
|
||||
' DdlProducto.DataSource = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa)
|
||||
' DdlProducto.DataBind()
|
||||
' DdlProducto.Items.Insert(0, New ListItem("----", "-1"))
|
||||
' DdlProductows.Visible = False
|
||||
'Else
|
||||
' DdlProducto.Visible = False
|
||||
'End If
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
DdlSeccionAlmacen.DataSource = GlobalDTSeccionAlmacen(UsuarioActual.CveEmpresa, -1)
|
||||
DdlSeccionAlmacen.DataBind()
|
||||
@@ -411,9 +433,9 @@ Partial Class Inventarios_Consignaciones
|
||||
ImgFecha.Enabled = Not Accion
|
||||
|
||||
TxtCantidad.Enabled = Not Accion
|
||||
DdlClasificacion.Enabled = Not Accion
|
||||
'DdlClasificacion.Enabled = Not Accion
|
||||
DdlProducto.Enabled = Not Accion
|
||||
DdlProductows.Disabled = Accion
|
||||
' DdlProductows.Disabled = Accion
|
||||
DdlUnidad.Enabled = Not Accion
|
||||
TxtPU.Enabled = Not Accion
|
||||
LbAgregar.Visible = Not Accion
|
||||
@@ -486,7 +508,7 @@ Partial Class Inventarios_Consignaciones
|
||||
Else
|
||||
e.Row.FCDropDownList("DdlClasificacion").DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltraParametros("", Orderby:="Clasificacion")
|
||||
End If
|
||||
DdlClasificacion.DataBind()
|
||||
'DdlClasificacion.DataBind()
|
||||
e.Row.FCDropDownList("DdlClasificacion").DataBind()
|
||||
e.Row.FCDropDownList("DdlClasificacion").SelectedValue = e.Row.DBCampo("CveClasificacion")
|
||||
|
||||
@@ -585,7 +607,7 @@ Partial Class Inventarios_Consignaciones
|
||||
AddNew()
|
||||
End Sub
|
||||
Protected Sub AddNew()
|
||||
Dim PSSelected As Integer = HFProducto.Value.ToEntero
|
||||
Dim PSSelected As Integer = DdlProducto.SelectedValue.ToEntero
|
||||
|
||||
If PSSelected > 0 Then
|
||||
|
||||
@@ -632,7 +654,7 @@ Partial Class Inventarios_Consignaciones
|
||||
registro.Item("CveUM") = DdlUnidad.SelectedValue.ToEntero
|
||||
registro.Item("UnidadMedida") = DdlUnidad.SelectedItem.Text
|
||||
registro.Item("CvePS") = PSSelected
|
||||
registro.Item("PS") = HFTProducto.Value
|
||||
registro.Item("PS") = DdlProducto.txtText.Value
|
||||
registro.Item("PSCodigo") = PSCodigo
|
||||
registro.Item("CveClasificacion") = CveClasificacion
|
||||
registro.Item("EstatusExistencia") = "1"
|
||||
@@ -838,10 +860,13 @@ Partial Class Inventarios_Consignaciones
|
||||
DdlMoneda_SelectedIndexChanged(DdlMoneda, EventArgs.Empty)
|
||||
|
||||
TxtCantidad.Text = ""
|
||||
DdlClasificacion.SelectedValueExist(-1)
|
||||
DdlProducto.SelectedValueExist(-1)
|
||||
DdlProductows.Items.Clear()
|
||||
DdlProductows.DataBind()
|
||||
'DdlClasificacion.SelectedValueExist(-1)
|
||||
|
||||
DdlProducto.txtText.Value = ""
|
||||
DdlProducto.txtValue.Value = ""
|
||||
|
||||
'DdlProductows.Items.Clear()
|
||||
'DdlProductows.DataBind()
|
||||
TxtPU.Text = ""
|
||||
|
||||
'DEVOLUCION
|
||||
@@ -916,7 +941,7 @@ Partial Class Inventarios_Consignaciones
|
||||
End If
|
||||
|
||||
'AGREGAMOS MOVTOS DETALLE
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimiento, Gvr.FCTextBox("TxtCantidadDevolucion").Text.ToString.ToDouble, Gvr.DataKey("CveUM").ToString.ToEntero, Gvr.DataKey("CvePS").ToString.ToEntero, Gvr.DataKey("PU").ToString.ToDecimal, -1, -1, "", "") Then
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimiento, Gvr.FCTextBox("TxtCantidadDevolucion").Text.ToString.ToDouble, Gvr.DataKey("CveUM").ToString.ToEntero, Gvr.DataKey("CvePS").ToString.ToEntero, Gvr.DataKey("PU").ToString.ToDecimal, -1, -1, Gvr.DataKey("Serie").ToString, Gvr.DataKey("Lote").ToString) Then
|
||||
ErrorMovInv = True
|
||||
TextoError = "Ocurrió un Error al guardar los movimientos"
|
||||
Exit For
|
||||
@@ -1555,31 +1580,29 @@ Partial Class Inventarios_Consignaciones
|
||||
|
||||
|
||||
#Region "DDL CLASIFICACION"
|
||||
Protected Sub DdlClasificacion_SelectedIndexChanged(sender As Object, e As System.EventArgs) Handles DdlClasificacion.SelectedIndexChanged
|
||||
ChangeDdlProducto()
|
||||
End Sub
|
||||
Private Sub ChangeDdlProducto()
|
||||
If UsuarioActual.Empresa.Funcionalidad(105) = "" Then
|
||||
DdlProducto.DataSource = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa, CveClasificacion:=DdlClasificacion.SelectedValue.ToEntero)
|
||||
DdlProducto.DataBind()
|
||||
DdlProducto.Items.Insert(0, New ListItem("----", "-1"))
|
||||
End If
|
||||
HFProducto.Value = ""
|
||||
HFTProducto.Value = ""
|
||||
End Sub
|
||||
'Protected Sub DdlClasificacion_SelectedIndexChanged(sender As Object, e As System.EventArgs) Handles DdlClasificacion.SelectedIndexChanged
|
||||
' ChangeDdlProducto()
|
||||
'End Sub
|
||||
'Private Sub ChangeDdlProducto()
|
||||
' If UsuarioActual.Empresa.Funcionalidad(105) = "" Then
|
||||
' DdlProducto.DataSource = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa, CveClasificacion:=DdlClasificacion.SelectedValue.ToEntero)
|
||||
' DdlProducto.DataBind()
|
||||
' DdlProducto.Items.Insert(0, New ListItem("----", "-1"))
|
||||
' End If
|
||||
' HFProducto.Value = ""
|
||||
' HFTProducto.Value = ""
|
||||
'End Sub
|
||||
|
||||
Protected Sub DdlProducto_ValueChanged(sender As Object, e As EventArgs) Handles DdlProducto.SelectedIndexChanged
|
||||
ElProductoChange()
|
||||
End Sub
|
||||
Protected Sub HFProducto_ValueChanged(sender As Object, e As EventArgs) Handles HFProducto.ValueChanged
|
||||
ElProductoChange()
|
||||
End Sub
|
||||
'Protected Sub DdlProducto_ValueChanged(sender As Object, e As EventArgs) Handles DdlProducto.SelectedIndexChanged
|
||||
' ElProductoChange()
|
||||
'End Sub
|
||||
'Protected Sub HFProducto_ValueChanged(sender As Object, e As EventArgs) Handles HFProducto.ValueChanged
|
||||
' ElProductoChange()
|
||||
'End Sub
|
||||
Private Sub ElProductoChange()
|
||||
If HFProducto.Value = "" Then
|
||||
HFProducto.Value = DdlProducto.SelectedValue
|
||||
End If
|
||||
|
||||
DdlUnidad.DataSource = GlobalDTProductosServiciosEquivalencias(HFProducto.Value.ToEntero, -1, UsuarioActual.CveEmpresa)
|
||||
|
||||
DdlUnidad.DataSource = GlobalDTProductosServiciosEquivalencias(DdlProducto.txtValue.Value.ToEntero, -1, UsuarioActual.CveEmpresa)
|
||||
DdlUnidad.DataBind()
|
||||
UpDatos.Update()
|
||||
End Sub
|
||||
@@ -1599,25 +1622,25 @@ Partial Class Inventarios_Consignaciones
|
||||
Private Function isWhitFamily() As Boolean
|
||||
Return (UsuarioActual.CveEmpresa = 66)
|
||||
End Function
|
||||
Protected Sub DdlProducto_SelectedIndexChanged(sender As Object, e As System.EventArgs) Handles DdlProducto.SelectedIndexChanged
|
||||
If Not DdlProducto.SelectedValue = "" Then
|
||||
'If DtPS.FiltraParametros( string.Format("CvePS = {0} AND Inv_CveMetodoInventario = 3 ",DdlProducto.SelectedValue)).Rows.Count > 0 Then
|
||||
' LblSerieLote.Visible = True
|
||||
' TxtnSerieLote.Visible = True
|
||||
'Else
|
||||
' LblSerieLote.Visible = False
|
||||
' TxtnSerieLote.Visible = False
|
||||
'End If
|
||||
End If
|
||||
Dim dtpse As DataTable
|
||||
dtpse = GlobalDTProductosServiciosEquivalencias(DdlProducto.SelectedValue.ToEntero, -1, UsuarioActual.CveEmpresa)
|
||||
'dtpse.Columns("UM").ColumnName = "UnidadMedida"
|
||||
'dtpse.Columns("CveUM").ColumnName = "CveUnidadMedida"
|
||||
DdlUnidad.DataSource = dtpse
|
||||
DdlUnidad.DataBind()
|
||||
'Protected Sub DdlProducto_SelectedIndexChanged(sender As Object, e As System.EventArgs) Handles DdlProducto.SelectedIndexChanged
|
||||
' If Not DdlProducto.SelectedValue = "" Then
|
||||
' 'If DtPS.FiltraParametros( string.Format("CvePS = {0} AND Inv_CveMetodoInventario = 3 ",DdlProducto.SelectedValue)).Rows.Count > 0 Then
|
||||
' ' LblSerieLote.Visible = True
|
||||
' ' TxtnSerieLote.Visible = True
|
||||
' 'Else
|
||||
' ' LblSerieLote.Visible = False
|
||||
' ' TxtnSerieLote.Visible = False
|
||||
' 'End If
|
||||
' End If
|
||||
' Dim dtpse As DataTable
|
||||
' dtpse = GlobalDTProductosServiciosEquivalencias(DdlProducto.SelectedValue.ToEntero, -1, UsuarioActual.CveEmpresa)
|
||||
' 'dtpse.Columns("UM").ColumnName = "UnidadMedida"
|
||||
' 'dtpse.Columns("CveUM").ColumnName = "CveUnidadMedida"
|
||||
' DdlUnidad.DataSource = dtpse
|
||||
' DdlUnidad.DataBind()
|
||||
|
||||
|
||||
End Sub
|
||||
'End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
@@ -1680,7 +1703,8 @@ Partial Class Inventarios_Consignaciones
|
||||
|
||||
#Region "Columnas Opcionales en PS"
|
||||
|
||||
Protected Sub DdlProducto_Click(sender As Object, e As EventArgs) Handles DdlProducto.SelectedIndexChanged
|
||||
|
||||
Protected Sub DdlProducto_selectedindexchange(sender As Object, e As EventArgs)
|
||||
If DdlProducto.SelectedValue.ToEntero > 0 Then
|
||||
Dim drp As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=DdlProducto.SelectedValue.ToEntero).FiltroPrimero("")
|
||||
|
||||
@@ -1710,9 +1734,14 @@ Partial Class Inventarios_Consignaciones
|
||||
End If
|
||||
UpDatos.Update()
|
||||
End If
|
||||
ElProductoChange()
|
||||
|
||||
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
End Class
|
||||
|
||||
@@ -718,19 +718,28 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
|
||||
If TipoMovimiento = 2 Then ' cuando es cancelación
|
||||
Dim Filtro As String '= If(ObjInventario.DtResultados.Rows(0)("TipoDocto").ToString().Contiene({"Ing", "Dev", "Ped"}), "CveConcepto = 3", "CveConcepto = 9")
|
||||
Dim FiltroPS As String = ""
|
||||
Select Case ObjInventario.DtResultados.Rows(0)("TipoDocto").ToString()
|
||||
Case "Ing", "Ped"
|
||||
Filtro = "CveConcepto IN (3,40)"
|
||||
Case "Dev"
|
||||
'cuand es devolucionventa=1, es cancelación de la devolución
|
||||
If EsDevolucionVenta = 1 Then Filtro = "CveConcepto = 18" Else Filtro = "CveConcepto IN (3,40)"
|
||||
If EsDevolucionVenta = 1 Then
|
||||
Filtro = "CveConcepto = 18"
|
||||
Else
|
||||
Filtro = "CveConcepto IN (3,40)" 'cuando es devolución
|
||||
For Each drr As DataRow In ObjInventario.DtResultados.Rows
|
||||
FiltroPS = FiltroPS + "," + drr("CvePS").ToString
|
||||
Next
|
||||
FiltroPS = "AND CvePS IN (" & FiltroPS.Substring(1) & ")" 'elimino la primer comma
|
||||
End If
|
||||
Case "DPe"
|
||||
Filtro = "CveConcepto = 9"
|
||||
Case Else
|
||||
Filtro = "CveConcepto = 9"
|
||||
End Select
|
||||
If ObjInventario.GetInv_Mov(ObjInventario.DtResultados.Rows(0)("CveVentaPadre").ToString().ToEntero(), UsuarioActual.CveEmpresa) Then
|
||||
DtExistencias = ObjInventario.DtResultados.FiltraParametros($"CvePS Is Not NULL AND {Filtro}")
|
||||
DtExistencias = ObjInventario.DtResultados.FiltraParametros($"CvePS Is Not NULL AND {Filtro} " & FiltroPS)
|
||||
|
||||
If Not DtExistencias.Rows.Count > 0 Then
|
||||
Alert("La Venta original de la Devolución no tiene salida de Almacén.", TipoMensaje.MsgAdvertencia)
|
||||
@@ -2067,64 +2076,23 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
Next
|
||||
End If
|
||||
|
||||
If Not ErrorMovInv Then
|
||||
If Not ErrorMovInv AndAlso CveMovimientoSalida > 0 Then
|
||||
Dim CvePrePolizaSinCosto As Integer = ObjConta.AddPrePolizas("EA/SinCost", 53, 0, 0, 1, TxtFecha.Text.ToDate, "Entrega", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||
If CvePrePolizaSinCosto > 0 Then
|
||||
|
||||
If Not ErrorMovInv AndAlso Not ObjConta.AddPrePolizasDetalle(CvePrePolizaSinCosto, True, 0, 0, 68, TxtObservaciones.Text, TxtObservaciones.Text, -1, -1, CveMovimientoAlmacen:=CveMovimientoSalida, Contabilizable:=False) Then
|
||||
ErrorMovInv = True
|
||||
End If
|
||||
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePolizaSinCosto, False, 0, 0, 68, TxtObservaciones.Text, TxtObservaciones.Text, -1, -1, CveMovimientoAlmacen:=CveMovimientoEntrada, Contabilizable:=False) Then
|
||||
ErrorMovInv = True
|
||||
End If
|
||||
|
||||
If Not ErrorMovInv AndAlso Not ObjConta.AddPrePolizasDetalle(CvePrePolizaSinCosto, True, 0, 0, 68, TxtObservaciones.Text, TxtObservaciones.Text, -1, -1, CveMovimientoAlmacen:=CveMovimientoSalida, Contabilizable:=False) Then
|
||||
ErrorMovInv = True
|
||||
End If
|
||||
Else
|
||||
ErrorMovInv = True
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
|
||||
Dim ImportePrePoliza As Decimal = 0D
|
||||
|
||||
If ObjInventario.GetMovimientosDetalle(CveMovimientoEntrada, UsuarioActual.CveEmpresa) Then
|
||||
ImportePrePoliza = ObjInventario.DtResultados.SUMD("Total")
|
||||
End If
|
||||
|
||||
|
||||
Dim MovAlmacen As Boolean = True
|
||||
|
||||
Dim OrigenMov As Integer = GlobalDTInvConceptos.FiltroPrimeroValor("Origen", "CveConcepto = " & 9).ToEntero
|
||||
|
||||
If OrigenMov = 1 Then
|
||||
MovAlmacen = True
|
||||
Else
|
||||
MovAlmacen = False
|
||||
End If
|
||||
|
||||
Dim ObjConta2 As New ClsContabilidad(ObjInventario.IniciaTransacSQL)
|
||||
|
||||
Dim Concepto As String = "ARMPAQ2"
|
||||
Dim CvePrePoliza = ObjConta2.AddPrePolizas("RE/GSC1/GSC3/RE/G4", 74, ImportePrePoliza, ImportePrePoliza, 1, TxtFecha.Text.ToDate, Concepto, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||
'Dim tCveSubProyecto = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto", $"CveAlmacen={CveAlmacen}").ToEntero
|
||||
|
||||
If Not ObjConta2.AddPrePolizasDetalle(CvePrePoliza, Not MovAlmacen, ImportePrePoliza, "RE/G4", 68, "RE/G4", TxtFecha.Text.ToDate, -1, -1, CveVenta:=-1, CveMovimientoAlmacen:=CveMovimientoEntradaApartado, ImporteMX:=ImportePrePoliza, CveSubProyecto:=-1, Contabilizable:=False) Then
|
||||
ErrorMovInv = True
|
||||
End If
|
||||
|
||||
If Not ObjConta2.AddPrePolizasDetalle(CvePrePoliza, MovAlmacen, ImportePrePoliza, "RE/GSC1/GSC3", 68, "RE/GSC1/GSC3", TxtFecha.Text.ToDate, -1, -1, CveVenta:=-1, CveMovimientoAlmacen:=CveMovimientoSalida, ImporteMX:=ImportePrePoliza, Contabilizable:=False) Then
|
||||
ErrorMovInv = True
|
||||
End If
|
||||
|
||||
|
||||
If ObjConta2.ValidacionPrePolizaCuadre(CvePrePoliza, 6) Then
|
||||
If ObjConta2.ValorPolizaDescuadre > 0 Then
|
||||
GuardaLogAD($"Inventarios/RecepcionAlmacen-PPCompOC | Error:{ObjConta2.MensajePolizaDescuadre} Diferencia:{ObjConta2.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas")
|
||||
ErrorMovInv = True
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
End If
|
||||
|
||||
If Not ErrorMovInv Then
|
||||
|
||||
@@ -82,7 +82,7 @@
|
||||
</asp:Content>
|
||||
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
|
||||
Kardex Almacén Horizontal
|
||||
Existencias Almacen
|
||||
</asp:Content>
|
||||
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
|
||||
|
||||
@@ -599,7 +599,7 @@
|
||||
<div class="col-md-12">
|
||||
<asp:GridView ID="GVSolicitudesNominas" runat="server" GridLines="None" CssClass="table table-striped table-hover Widthall ScrollAD mysmallbtn" AutoGenerateColumns="False" OnRowDataBound="GVSolicitudesNominas_RowDataBound"
|
||||
ShowHeaderWhenEmpty="true" EmptyDataText="No se encontraron registros"
|
||||
DataKeyNames="CveSolicitudDetalle,CveSolicitud,idSolicitudCFDI,idSolicitudMetadata,Estatus,Observaciones,FechaInicio,FechaFin,FechaIng,CveUsuarioIng,CveEmpresa,ArchivoXML,Folio,CveTipoSolicitud">
|
||||
DataKeyNames="CveSolicitudDetalle,CveSolicitud,idSolicitudCFDI,idSolicitudMetadata,Estatus,Observaciones,FechaInicio,FechaFin,FechaIng,CveUsuarioIng,CveEmpresa,ArchivoXML,Folio,CveTipoSolicitud,TipoDescargaStr">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Folio">
|
||||
<ItemTemplate>
|
||||
|
||||
@@ -255,12 +255,10 @@ public partial class SAT_SolicitudesIngresoSat : ClsPaginas
|
||||
}
|
||||
|
||||
protected void LnkverificarSolicitudes_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
{
|
||||
|
||||
try
|
||||
{
|
||||
|
||||
{
|
||||
|
||||
|
||||
StringBuilder sbResultado = new StringBuilder();
|
||||
@@ -581,10 +579,18 @@ public partial class SAT_SolicitudesIngresoSat : ClsPaginas
|
||||
}
|
||||
}
|
||||
|
||||
e.Row.Attributes.Add("data-html", "true");
|
||||
e.Row.Attributes.Add("data-toggle", "tooltip");
|
||||
e.Row.Attributes.Add("data-placement", "top");
|
||||
e.Row.Attributes.Add("title", e.Row.DataKey("Observaciones"));
|
||||
Label lblobservaciones = e.Row.FCLabel("lblobservaciones");
|
||||
Label lBLTipoDescarga = e.Row.FCLabel("lBLTipoDescarga");
|
||||
|
||||
lblobservaciones.Attributes.Add("data-html", "true");
|
||||
lblobservaciones.Attributes.Add("data-toggle", "tooltip");
|
||||
lblobservaciones.Attributes.Add("data-placement", "top");
|
||||
lblobservaciones.Attributes.Add("title", e.Row.DataKey("Observaciones"));
|
||||
|
||||
lBLTipoDescarga.Attributes.Add("data-html", "true");
|
||||
lBLTipoDescarga.Attributes.Add("data-toggle", "tooltip");
|
||||
lBLTipoDescarga.Attributes.Add("data-placement", "top");
|
||||
lBLTipoDescarga.Attributes.Add("title", e.Row.DataKey("TipoDescargaStr"));
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -72,7 +72,7 @@
|
||||
<li>
|
||||
<asp:HyperLink NavigateUrl="#" data-toggle="modal" data-target="#DivPersonalizar" ID="ImgPersonalizar" runat="server"> <i class="fa fa-pencil"></i> Personalizar</asp:HyperLink>
|
||||
</li>
|
||||
</ContentTemplate>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<asp:UpdatePanel ID="UpLnkHP" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
@@ -89,7 +89,15 @@
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkVerGrafica" OnClick="LnkVerGrafica_Click" runat="server"><i class="fa fa-signal"></i> Ver Grafica</asp:LinkButton>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkDescargaCartaPorte" OnClick="LnkDescargaCartaPorte_Click" runat="server" Visible="false"> <i class="fa fa-file-excel-o" style="font-weight:bold;"></i> Descarga Carta Porte</asp:LinkButton>
|
||||
</li>
|
||||
|
||||
</ContentTemplate>
|
||||
<Triggers>
|
||||
<asp:PostBackTrigger ControlID="LnkDescargaCartaPorte" />
|
||||
</Triggers>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
||||
|
||||
@@ -120,6 +120,11 @@ Partial Class Ventas_RepVentas
|
||||
DdlVendedor.Attributes.Add("disabled", "disabled")
|
||||
DdlVendedor.Enabled = False
|
||||
End If
|
||||
|
||||
If UsuarioActual.CveEmpresa.Contiene(13, 83) Then
|
||||
LnkDescargaCartaPorte.Visible = True
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
End Sub
|
||||
@@ -936,4 +941,26 @@ Partial Class Ventas_RepVentas
|
||||
Context.Response.End()
|
||||
End Sub
|
||||
|
||||
|
||||
Protected Sub LnkDescargaCartaPorte_Click(sender As Object, e As EventArgs)
|
||||
|
||||
|
||||
Dim ObjVentas As New ClsVentas
|
||||
Dim DTDataos As New DataTable
|
||||
Dim CveSubProyectos As String = If(DdlSubProyecto.GetSelectedValuesM = "", "-1", DdlSubProyecto.GetSelectedValuesM)
|
||||
|
||||
|
||||
If ObjVentas.GetListadoCartaPorteRep(txtFechaI.Text.ToDate, txtFechaF.Text.ToDate, CveSubProyectos, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
||||
DTDataos = ObjVentas.DtResultados
|
||||
End If
|
||||
|
||||
ObjVentas.Dispose()
|
||||
|
||||
|
||||
DTDataos.ExportToExcel("RepCartasPorte.xls")
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
End Class
|
||||
|
||||
Reference in New Issue
Block a user