Merge branch 'master' of http://192.168.10.111:8383/SIG
This commit is contained in:
@@ -134,6 +134,42 @@ Public Class ClsGenerales
|
||||
End Sub
|
||||
|
||||
|
||||
Public Function RepConciliacionSatGET(cveEmpresa As Int32, tipoDocto As String, fechaI As String, fechaF As String) As Boolean
|
||||
Dim retorno As Boolean = False
|
||||
DataAdapter("PA_RepConciliacionSatGET", CommandType.StoredProcedure)
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = cveEmpresa
|
||||
.Add("@TipoDocto", SqlDbType.VarChar).Value = tipoDocto
|
||||
.Add("@FechaI", SqlDbType.VarChar).Value = fechaI
|
||||
.Add("@FechaF", SqlDbType.VarChar).Value = fechaF
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al obtener los registros de Conciliaciones SAT.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End Try
|
||||
Return retorno
|
||||
End Function
|
||||
Public Function SAT_DescargaSolicitudesGET(CveEmpresa As Int32, tipo As Int32, fIngInicio As String, fIngFin As String, fSolInicio As String, fSolFin As String) As Boolean
|
||||
Dim retorno As Boolean = False
|
||||
DataAdapter("[PA_SAT_DescargaSolicitudesGET]", CommandType.StoredProcedure)
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
.Add("@Tipo", SqlDbType.Int).Value = tipo
|
||||
.Add("@FIngInicio", SqlDbType.VarChar).Value = fIngInicio
|
||||
.Add("@FIngFin", SqlDbType.VarChar).Value = fIngFin
|
||||
.Add("@FSolInicio", SqlDbType.VarChar).Value = fSolInicio
|
||||
.Add("@FSolFin", SqlDbType.VarChar).Value = fSolFin
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al obtener los registros de solicitudes CFDI SAT.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End Try
|
||||
Return retorno
|
||||
End Function
|
||||
#Region " I N D I C A D O R E S Y G R A F I C A S"
|
||||
Public Function GetIndicadores(CveEmpresa As Integer) As DataSet
|
||||
'Dim Retorno As Boolean = False
|
||||
|
||||
@@ -3483,6 +3483,8 @@ Public Class ClsPaginas
|
||||
|
||||
PaginaDict.Add("/Inicio.aspx".ToUpper(), -1)
|
||||
PaginaDict.Add("/Ventas/RepConciliacionEmitidosSat.aspx".ToUpper(), -1)
|
||||
PaginaDict.Add("/Ventas/RepConciliacionSat.aspx".ToUpper(), 716)
|
||||
PaginaDict.Add("/Ventas/SolicitudesSAT.aspx".ToUpper(), 717)
|
||||
|
||||
PaginaDict.Add("/Nomina/CatConceptos2.aspx".ToUpper(), -1)
|
||||
PaginaDict.Add("/Nomina/Aguinaldo.aspx".ToUpper(), -1)
|
||||
|
||||
@@ -465,6 +465,8 @@ Partial Class Bancos_FluctuacionCambiaria
|
||||
Dim Total As Decimal = 0
|
||||
Dim Conta As New ClsContabilidad
|
||||
Dim Banco As New ClsBancos(Conta.IniciaTransacSQL())
|
||||
Dim ObjContPaq As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
ObjContPaq.IniciaTransacSQL()
|
||||
Dim CvePrePoliza As Integer = Conta.AddPrePolizas("Banc/FluctuaFilial", 1, 0, 0, 1, TxtFecha.Text.ToDate, "Fluctuación Filiales", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||
Dim idCta As Integer = 0
|
||||
Dim CveCuenta As Integer = 0
|
||||
@@ -524,13 +526,29 @@ Partial Class Bancos_FluctuacionCambiaria
|
||||
Next
|
||||
|
||||
If Not ErrorRegistrar Then
|
||||
|
||||
'Inicio auto conta
|
||||
Dim AutoConta As Boolean = UsuarioActual.Empresa.Funcionalidad(200) = "1"
|
||||
If AutoConta Then
|
||||
|
||||
If Conta.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa, ObjConta:=ObjContPaq) Then
|
||||
Else
|
||||
Alert("Ocurrio un Error al contabilizar, pongase en contacto con Soporte Técnico", TipoMensaje.MsgError)
|
||||
End If
|
||||
End If
|
||||
|
||||
If ObjContPaq IsNot Nothing Then ObjContPaq.Commit()
|
||||
'Fin autoconta
|
||||
Conta.Commit()
|
||||
|
||||
Alert(String.Format("La Fluctuación se ha generado <br/> <a href='/Contabilidad/RegPrePoliza.aspx?CvePrePoliza={0}'>Ver Póliza</a>", CvePrePoliza), TipoMensaje.MsgInformacion)
|
||||
Else
|
||||
Conta.RollBack()
|
||||
ObjContPaq.RollBack()
|
||||
End If
|
||||
Conta.Dispose()
|
||||
Banco.Dispose()
|
||||
ObjContPaq.Dispose()
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
@@ -1556,6 +1556,7 @@ Partial Class Bancos_PopIEVentas
|
||||
Select Case ConceptoContable
|
||||
Case 2 'Pago Cliente
|
||||
If RBLContado.SelectedValue.Contiene("3", "4", "5") Then
|
||||
'If CveMonedaVenta > 1 Then ConceptoContable = 292
|
||||
For Each rw As GridViewRow In GvIngresos.Rows
|
||||
If rw.FCCheckBox("Chk").Checked Then
|
||||
If CveMoneda = 1 AndAlso CveMonedaVenta = 1 Then
|
||||
|
||||
@@ -5833,9 +5833,15 @@ Partial Class Compras_Compras
|
||||
CveCuenta = ObjConta.DtResultados.Rows(0)("IdCuentaRetIVACirculacionSIG").ToString.ToEntero
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
'Agregamos el Opuesto del 22 -> 15
|
||||
End If
|
||||
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(577).ToEntero = 1 Then
|
||||
IdCtaContable = UsuarioActual.Empresa.Funcionalidad(578).ToEntero
|
||||
End If
|
||||
|
||||
|
||||
'Agregamos el Opuesto del 22 -> 15
|
||||
If importeMovimiento <> 0 Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimiento, importeMovimiento, Referencia, 15, Concepto + If(tipoCambioActual > 1, $" TC: {tipoCambioActual} ${importeMovimiento.FormatoNumero(2)}", ""), FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CveIE:=CveIE, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMovimiento * tipoCambioActual, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), CveCuenta:=CveCuenta, Contabilizable:=SeContabiliza, TipoCambio:=tipoCambioActual) Then
|
||||
ErrorPrepoliza = True
|
||||
@@ -8472,7 +8478,9 @@ Partial Class Compras_Compras
|
||||
If DdlRetIVAConcepto.Items.Count > 0 Then
|
||||
If DdlRetIVAConcepto.SelectedValue.ToEntero = 1 Then
|
||||
ImporteMovimiento = Math.Round(PorcentajePago * TxtRetIVA.Text.ToDecimal, 2)
|
||||
importeMN = ImporteMovimiento * tipoCambio
|
||||
importeMN = ImporteMovimiento * tipoCambio
|
||||
|
||||
|
||||
If CtaProveedorRetIVA > 0 Then
|
||||
IdCtaContable = CtaProveedorRetIVA
|
||||
CveCuenta = CveCuentaProveedorRetIVA
|
||||
@@ -8486,10 +8494,19 @@ Partial Class Compras_Compras
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(577).ToEntero = 1 Then
|
||||
IdCtaContable = UsuarioActual.Empresa.Funcionalidad(578).ToEntero
|
||||
End If
|
||||
|
||||
|
||||
End If
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
|
||||
Case 183 'RetIVA x Acreditar Fletes P.F.
|
||||
If Not gvr.DataKey("TipoDocto").Contiene("NC", "DEV", "Ant") Then
|
||||
If DdlRetIVAConcepto.Items.Count > 0 Then
|
||||
@@ -19077,7 +19094,7 @@ Partial Class Compras_Compras
|
||||
Dim ObjPS As New ClsProductosServicios
|
||||
If ObjPS.AddPSSimplificado(PS) > 0 Then
|
||||
Alert("El P/S fue agregado correctamente.")
|
||||
RecargaGlobalEquivalencias()
|
||||
GeneraGlobalDT(Nothing)
|
||||
End If
|
||||
ObjPS.Dispose()
|
||||
|
||||
@@ -19089,18 +19106,11 @@ Partial Class Compras_Compras
|
||||
|
||||
UpAgregarPS.Update()
|
||||
|
||||
RegistraScript("$('#DivAgregarPS').modal('hide');")
|
||||
RecargaPSGlobal()
|
||||
End Sub
|
||||
Private Sub RecargaPSGlobal()
|
||||
'GlobalDTPSSimplificado(UsuarioActual.CveEmpresa) = Nothing
|
||||
'Dim ObjPS As New ClsProductosServicios
|
||||
RegistraScript("$('#DivAgregarPS').modal('hide');")
|
||||
|
||||
'If ObjPS.GetPSSimplificado(-1) Then Application("GlobalDTPSSimplificado") = ObjPS.DtResultados.AsEnumerable()
|
||||
|
||||
'ObjPS.Dispose()
|
||||
End Sub
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "TIPO DE COMPRA"
|
||||
|
||||
@@ -106,6 +106,7 @@
|
||||
<label class="col-md-1">Fecha:</label>
|
||||
<div class="col-md-1">
|
||||
<asp:TextBox runat="server" ID="TxtFechaUnificacion" Width="75px"></asp:TextBox>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaUnificacion" runat="server" TargetControlID="TxtFechaUnificacion" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
</div>
|
||||
|
||||
<div class="col-md-1">
|
||||
@@ -120,7 +121,7 @@
|
||||
<asp:DropDownList ID="DdlCheque" CssClass="form-control input-sm select2me" Width="100%" AppendDataBoundItems="true" runat="server" DataTextField="FolioFecha" DataValueField="CveIE"></asp:DropDownList>
|
||||
</div>
|
||||
<div class="col-md-1">
|
||||
<asp:LinkButton data-toggle="tooltip" data-placement="top" ToolTip="Vincular Egreso" runat="server" ID="BtnVincularEgreso" OnClick="BtnVincularEgreso_Click" Text="<i class='fa fa-check' style='color:green'></i>" CssClass="btn btn-default btn-circle btn-xs" />
|
||||
<asp:LinkButton data-toggle="tooltip" data-placement="top" ToolTip="Vincular Egreso" runat="server" ID="BtnVincularEgreso" OnClick="BtnVincularEgreso_Click" Text="<i class='fa fa-check' style='color:green'></i>" CssClass="btn btn-default btn-circle btn-xs" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -817,7 +817,11 @@ Partial Class ContabilidadC_RegPrePoliza
|
||||
|
||||
If CvePrePoliza > 0 Then
|
||||
'Nuevo Modulo Charlie
|
||||
ActualizarPrePoliza()
|
||||
ActualizarPrePoliza()
|
||||
|
||||
|
||||
|
||||
|
||||
Else
|
||||
Dim MensajeAlert = New StringBuilder
|
||||
Dim ObjIE As New ClsBancos()
|
||||
@@ -966,10 +970,19 @@ Partial Class ContabilidadC_RegPrePoliza
|
||||
|
||||
Dim OcurrioError As Boolean = False
|
||||
Dim ObjContabilidad As New ClsContabilidad
|
||||
ObjContabilidad.IniciaTransacSQL()
|
||||
ObjContabilidad.IniciaTransacSQL()
|
||||
|
||||
|
||||
|
||||
If Not ObjContabilidad.UpdatePrePolizasDetalleBloquear(CvePrePoliza, False) Then
|
||||
OcurrioError = True
|
||||
End If
|
||||
|
||||
|
||||
|
||||
ObjContabilidad.UpdatePrePoliza(MinFecha, -1, DdlTipoPoliza.SelectedValue.ToEntero, -1, CvePrePoliza, UsuarioActual.CveEmpresa, Concepto:=TxtConcepto.Text, FechaPoliza:=TxtFechaDocumento.Text.ToDate)
|
||||
|
||||
|
||||
For Each row As GridViewRow In GvPrePoliza.Rows
|
||||
If row.DataKey("CvePrePolizaDetalle").ToEntero > 0 Then
|
||||
If Not ObjContabilidad.UpdatePrepolizasDetalle(row.DataKey("CvePrePolizaDetalle").ToEntero, row.FCTextBox("TxtConcepto").Text, row.FCDropDownList("DdlSubProyecto").SelectedValue.ToEntero,
|
||||
@@ -996,13 +1009,20 @@ Partial Class ContabilidadC_RegPrePoliza
|
||||
If Not OcurrioError Then
|
||||
ObjContabilidad.Commit()
|
||||
Alert("La PrePoliza se actualizó correctamente.", TipoMensaje.MsgInformacion)
|
||||
Else
|
||||
Else
|
||||
ObjContabilidad.RollBack()
|
||||
Alert("Ocurrio un error al actualizar la PrePoliza.", TipoMensaje.MsgError)
|
||||
End If
|
||||
|
||||
ObjContabilidad.Dispose()
|
||||
CargaPrePoliza()
|
||||
|
||||
If Not OcurrioError Then
|
||||
If IdPoliza > 0 Then
|
||||
BtnContabilizar_Click(Nothing, Nothing)
|
||||
End If
|
||||
|
||||
End If
|
||||
End Sub
|
||||
Protected Sub GvPrePoliza_RowUpdating(sender As Object, e As GridViewUpdateEventArgs) Handles GvPrePoliza.RowUpdating
|
||||
RegistraScript(String.Format("$('#{0}').modal();", "DivEditConcepto"))
|
||||
@@ -1463,13 +1483,14 @@ Partial Class ContabilidadC_RegPrePoliza
|
||||
End Sub
|
||||
|
||||
Private Sub Contabilizar()
|
||||
|
||||
Dim ObjConta As New ClsContabilidad
|
||||
|
||||
If IdPoliza > 0 Then 'si está bloqueada, lo desbloqueaprimero
|
||||
ObjConta.UpdatePrePolizasDetalleBloquear(CvePrePoliza, False)
|
||||
End If
|
||||
|
||||
If ObjConta.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa, pIDPoliza:=If(IdPoliza > 0, IdPoliza, -1)) Then
|
||||
If ObjConta.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa, pIDPoliza:=If(IdPoliza > 0, IdPoliza, -1), Concepto:=TxtConcepto.Text, Fecha:=TxtFechaDocumento.Text.ToDateTime) Then
|
||||
Alert(String.Format("Prepóliza contabilizada. <br/><br/>Folio:<a Class=""Texto"" target='_blank' href=""/Contabilidad/RegPoliza.aspx?IdPoliza={0}"">Ver Póliza</a>", ObjConta.ContaIdPoliza), ModExtensiones.TipoMensaje.MsgInformacion)
|
||||
Else
|
||||
|
||||
|
||||
@@ -297,6 +297,7 @@ Partial Class Inventarios_CatAlmacenes
|
||||
Private Sub DdlModalidad_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlModalidad.SelectedIndexChanged
|
||||
If DdlModalidad.SelectedValue = 1 Then
|
||||
divddlcc.Visible = True
|
||||
CargaCuentasContables()
|
||||
Else
|
||||
divddlcc.Visible = False
|
||||
End If
|
||||
|
||||
@@ -2155,7 +2155,7 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
ErrorMovInv = True
|
||||
End If
|
||||
|
||||
If Not ErrorMovInv Then
|
||||
If Not ErrorMovInv AndAlso Dt IsNot Nothing Then
|
||||
For Each Dr As DataRow In Dt.Rows
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovtoSalidaDirecta, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDouble, Dr("CveAF").ToString.ToEntero, Dr("CveSeccionAlmacen").ToString.ToEntero, Dr("SerieLote").ToString, Lote:=Dr("Lote").ToString, Batch:=Dr("Batch").ToString, CveMovimientoDetalleEntrada:=Dr("CveMovimientoDetalle").ToString.ToEntero, CveVentaDetalle:=Dr("CveVentaDetalle").ToString.ToEntero, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
|
||||
ErrorMovInv = True
|
||||
|
||||
@@ -2535,6 +2535,15 @@ Partial Class Inventarios_RecepcionUsados
|
||||
|
||||
If drPS IsNot Nothing Then
|
||||
PrecioSugerido = drPS("Precio").ToString.ToDecimal
|
||||
Dim PS As String = drPS("PS").ToString
|
||||
Dim Arr = PS.Split("-"c)
|
||||
If Arr.Count > 0 Then
|
||||
If (DdlBCIAjuste.Items.FindByText(Arr(1).ToString) IsNot Nothing) Then
|
||||
DdlBCIAjuste.SelectedValueExist(DdlBCIAjuste.Items.FindByText(Arr(1).ToString).Value)
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
txtPrecio.Text = PrecioSugerido.FormatoNumero(2)
|
||||
TxtPUFactura.Text = PrecioSugerido.FormatoNumero(2)
|
||||
|
||||
@@ -900,6 +900,7 @@ Partial Class Ventas_ClientesAbonar
|
||||
|
||||
Select Case ConceptoContable
|
||||
Case 2 'Pago Cliente
|
||||
'If gvr.DataKey("CveMoneda").ToEntero > 1 Then ConceptoContable = 292
|
||||
If CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
|
||||
ImporteMovimiento = gvr.FCTextBox("TxtAbonar").Text.ToDecimal
|
||||
importeMX = ImporteMovimiento
|
||||
|
||||
@@ -1,15 +1,188 @@
|
||||
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="RepConciliacionSat.aspx.cs" Inherits="Ventas_RepConciliacionSat" %>
|
||||
<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="RepConciliacionSat.aspx.cs" Inherits="Ventas_RepConciliacionSat" %>
|
||||
|
||||
<!DOCTYPE html>
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
<style>
|
||||
table.table > tbody > tr.Grupo0 {
|
||||
background-color: #AAA !important;
|
||||
}
|
||||
|
||||
table.table > tbody > tr.Grupo1 {
|
||||
background-color: #CCC !important;
|
||||
cursor:pointer;
|
||||
}
|
||||
|
||||
table.table > tbody > tr.Grupo2 {
|
||||
background-color: #DDD !important;
|
||||
cursor:pointer;
|
||||
}
|
||||
</style>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
|
||||
Conciliación CFDI SAT
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
<li><a onclick="javascript:AbrirVentana('/Ventas/SolicitudesSAT.aspx?Masterimpoup=true',1400);"><i class="fa fa-dropbox"></i>Solicitudes SAT </a></li>
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="HA" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="C" runat="Server">
|
||||
|
||||
<asp:UpdatePanel ID="UPFiltros" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="portlet solid grey-cascade portlet-filter" id="idnecesaria">
|
||||
<div class="portlet-title portlet-filterT smalltitle" style="min-height: 51px;">
|
||||
<div class="tools">
|
||||
<asp:Button ID="BtnConsultar" OnClick="BtnConsultar_Click" runat="server" Text="Consultar" class="btn btn-primary" />
|
||||
<a href="javascript:;" class="expand"></a>
|
||||
</div>
|
||||
<div class="titlefiltros caption">
|
||||
<div class="row">
|
||||
<label class="col-md-1" style="padding-top: 13px; display:none;">Tipo: </label>
|
||||
<div class="col-md-2" style="display:none;">
|
||||
<asp:ListBox ID="DdlTipoComprobante" data-text="Todos" SelectionMode="Multiple" CssClass="form-control ddlFiltros input-sm select2me Widthall" Style="width: 100%;" runat="server">
|
||||
<asp:ListItem Text="Ingresos" Value="Ing"></asp:ListItem>
|
||||
<asp:ListItem Text="Egresos" Value="Egs"></asp:ListItem>
|
||||
<asp:ListItem Text="Remisión" Value="Rem"></asp:ListItem>
|
||||
<asp:ListItem Text="Cotización" Value="Cot"></asp:ListItem>
|
||||
<asp:ListItem Text="Anticipos" Value="Ant"></asp:ListItem>
|
||||
<asp:ListItem Text="Pedido Con" Value="Ped"></asp:ListItem>
|
||||
<asp:ListItem Text="Devolucion" Value="Dev"></asp:ListItem>
|
||||
<asp:ListItem Text="Pedido" Value="Pd2"></asp:ListItem>
|
||||
</asp:ListBox>
|
||||
</div>
|
||||
<div class="col-md-1 truncate" style="padding-top: 13px;">
|
||||
Fecha Inicio:
|
||||
</div>
|
||||
<div class="col-md-1" style="padding-top: 9px;">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100px !important; padding: 0px;">
|
||||
<asp:TextBox Width="80px" ID="txtFechaI" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="imgCalendario" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
</div>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaI" runat="server" TargetControlID="txtFechaI" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="Calendario" TargetControlID="txtFechaI" PopupButtonID="ImgCalendario" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="rfvFechaI" runat="server" ControlToValidate="txtFechaI" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>
|
||||
<asp:CompareValidator ID="cvFechaI" runat="server" ControlToValidate="txtFechaI" 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="vcoFfvFI" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoCvFI" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
<div class="col-md-1 truncate" style="padding-top: 13px;">
|
||||
Fecha Fin:
|
||||
</div>
|
||||
<div class="col-md-1" style="padding-top: 9px;">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100px !important; padding: 0px;">
|
||||
<asp:TextBox Width="80px" ID="txtFechaF" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="imgCalendarioF" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
</div>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaF" runat="server" TargetControlID="txtFechaF" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="Calendario2" TargetControlID="txtFechaF" PopupButtonID="imgCalendarioF" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="rfvFechaF" runat="server" ControlToValidate="txtFechaF" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>
|
||||
<asp:CompareValidator ID="cvFechaF" runat="server" ControlToValidate="txtFechaF" 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="vcoRfvFF" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoCvFF" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body" style="display: none">
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<asp:UpdatePanel ID="upDatosRepC" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GVRepConciliacionSatGET" runat="server" GridLines="None" CssClass="table table-hover table-striped ScrollAD Widthall" AutoGenerateColumns="False"
|
||||
DataKeyNames="anio,Mes,MesText,Dia,GRUPOCve,Grupo,CFDISIG,CFDISAT,CFDISIGSinSAT,CFDISATSinSIG" OnRowDataBound="GVRepConciliacionSatGET_RowDataBound">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText=" ">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblgrupo" runat="server" Text='<%# Eval("Grupo")%>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="SIG">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblcFDISIG" runat="server" Text='<%# Eval("CFDISIG")%>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="SAT">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblcFDISAT" runat="server" Text='<%# Eval("CFDISAT")%>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Sin Encontrar SAT">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblcFDISIGSinSAT" runat="server" Text='<%# Eval("CFDISIGSinSAT")%>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Sin Encontrar SIG">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblcFDISATSinSIG" runat="server" Text='<%# Eval("CFDISATSinSIG")%>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
|
||||
<script>
|
||||
var Grupo3Show = [];
|
||||
var Grupo2hide = [];
|
||||
$('body').on('click', 'tr.Grupo2 ', function (e) {
|
||||
let gmes = $(this).attr('gmes');
|
||||
|
||||
if (Grupo3Show.indexOf(gmes) >= 0) {
|
||||
Grupo3Show.pop(gmes);
|
||||
} else {
|
||||
Grupo3Show.push(gmes);
|
||||
|
||||
}
|
||||
showhideg3();
|
||||
});
|
||||
function showhideg3() {
|
||||
|
||||
$('.Grupo3').hide();
|
||||
$('.Grupo3').each(function () {
|
||||
let gmes = $(this).attr('gmes');
|
||||
let ganio = $(this).attr('ganio');
|
||||
if (Grupo3Show.indexOf(gmes) >= 0 && Grupo2hide.indexOf(ganio) == -1) {
|
||||
$(this).show();
|
||||
}
|
||||
});
|
||||
}
|
||||
$('body').on('click', 'tr.Grupo1 ', function (e) {
|
||||
let ganio = $(this).attr('ganio');
|
||||
|
||||
if (Grupo2hide.indexOf(ganio) >= 0) {
|
||||
Grupo2hide.pop(ganio);
|
||||
} else {
|
||||
Grupo2hide.push(ganio);
|
||||
|
||||
}
|
||||
showhideg3();
|
||||
showhideg2();
|
||||
});
|
||||
function showhideg2() {
|
||||
|
||||
$('.Grupo2').show();
|
||||
$('.Grupo2').each(function () {
|
||||
let ganio = $(this).attr('ganio')
|
||||
if (Grupo2hide.indexOf(ganio) >= 0) {
|
||||
$(this).hide();
|
||||
}
|
||||
});
|
||||
}
|
||||
function ADSBegin() {
|
||||
showhideg3();
|
||||
}
|
||||
</script>
|
||||
</asp:Content>
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head runat="server">
|
||||
<title></title>
|
||||
</head>
|
||||
<body>
|
||||
<form id="form1" runat="server">
|
||||
<div>
|
||||
</div>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -4,11 +4,62 @@ using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using Extensiones;
|
||||
|
||||
public partial class Ventas_RepConciliacionSat : System.Web.UI.Page
|
||||
public partial class Ventas_RepConciliacionSat : ClsPaginas
|
||||
{
|
||||
const string rqFechaInicio = "FechaInicio";
|
||||
const string rqFechaFin = "FechaFin";
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
DateTime fecha;
|
||||
DateTime fechaInicio = DateTime.Now;
|
||||
DateTime fechaFin = DateTime.Now;
|
||||
if (fechaInicio.Day < 5) { fechaInicio = fechaInicio.AddMonths(-1); }
|
||||
fechaInicio = fechaInicio.AddDays(1 - fechaInicio.DayOfYear);
|
||||
fechaFin = fechaInicio.AddYears(1).AddDays(-1);
|
||||
if (Request[rqFechaInicio] != null) { DateTime.TryParse(Request[rqFechaInicio], out fecha); fechaInicio = fecha.Year > 1900 ? fecha : fechaInicio; }
|
||||
if (Request[rqFechaFin] != null) { DateTime.TryParse(Request[rqFechaFin], out fecha); fechaFin = fecha.Year > 1900 ? fecha : fechaFin; }
|
||||
txtFechaI.Text = string.Format("{0:dd/MM/yyyy}", fechaInicio);
|
||||
txtFechaF.Text = string.Format("{0:dd/MM/yyyy}", fechaFin);
|
||||
|
||||
|
||||
}
|
||||
CargaRepConciliacionSatGET();
|
||||
}
|
||||
|
||||
|
||||
protected void CargaRepConciliacionSatGET()
|
||||
{
|
||||
string RtipoDocto, RfechaI, RfechaF;
|
||||
RtipoDocto = "I";
|
||||
RfechaI = txtFechaI.Text.ToDateTime().ToString();
|
||||
RfechaF = txtFechaF.Text.ToDateTime().ToString();
|
||||
using (ClsGenerales ObjRepC = new ClsGenerales())
|
||||
{
|
||||
ObjRepC.RepConciliacionSatGET(UsuarioActual.CveEmpresa, RtipoDocto, RfechaI, RfechaF);
|
||||
GVRepConciliacionSatGET.DataSource = ObjRepC.DtResultados;
|
||||
ObjRepC.Dispose();
|
||||
|
||||
}
|
||||
GVRepConciliacionSatGET.DataBind();
|
||||
upDatosRepC.Update();
|
||||
}
|
||||
|
||||
protected void BtnConsultar_Click(object sender, EventArgs e)
|
||||
{
|
||||
CargaRepConciliacionSatGET();
|
||||
}
|
||||
|
||||
protected void GVRepConciliacionSatGET_RowDataBound(object sender, GridViewRowEventArgs e)
|
||||
{
|
||||
if(e.Row.RowType == DataControlRowType.DataRow)
|
||||
{
|
||||
e.Row.CssClass = string.Format("Grupo{0}", e.Row.DBCampo("GRUPOCve"));
|
||||
e.Row.Attributes.Add("ganio", string.Format("{0}", e.Row.DBCampo("anio")));
|
||||
e.Row.Attributes.Add("gMes", string.Format("{0}", e.Row.DBCampo("Mes")));
|
||||
}
|
||||
}
|
||||
}
|
||||
344
Ventas/SolicitudesSAT.aspx
Normal file
344
Ventas/SolicitudesSAT.aspx
Normal file
@@ -0,0 +1,344 @@
|
||||
<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="SolicitudesSAT.aspx.cs" Inherits="Ventas_SolicitudesSAT" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
|
||||
Solicitudes CFDI SAT
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkVerificarSolicitudes" OnClick="LnkVerificarSolicitudes_Click" runat="server">Verificar Solicitudes</asp:LinkButton></li>
|
||||
<li>
|
||||
<asp:HyperLink ID="LnkSolicitarmodal" runat="server" data-toggle="modal" data-target="#ModalSolicitarSat">Solicitar SAT</asp:HyperLink></li>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="HA" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="C" runat="Server">
|
||||
<asp:UpdatePanel ID="UPFiltros" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="portlet solid grey-cascade portlet-filter" id="idnecesaria">
|
||||
<div class="portlet-title portlet-filterT smalltitle" style="min-height: 51px;">
|
||||
<div class="tools">
|
||||
<asp:Button ID="BtnConsultar" runat="server" Text="Consultar" class="btn btn-primary" OnClick="BtnConsultar_Click" />
|
||||
<%--<a href="javascript:;" class="expand"></a>--%>
|
||||
</div>
|
||||
<div class="titlefiltros caption">
|
||||
<div class="row">
|
||||
<div class="col-sm-1 truncate">
|
||||
Tipo:
|
||||
</div>
|
||||
<div class="col-sm-2">
|
||||
<asp:DropDownList ID="DdlTipo" CssClass="form-control select2me" Width="100%" runat="server">
|
||||
<asp:ListItem Value="-1" Text="Todas" Selected="True"></asp:ListItem>
|
||||
<asp:ListItem Value="1" Text="Recibidas (Compras)"></asp:ListItem>
|
||||
<asp:ListItem Value="2" Text="Emitidas (Ventas)"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<div class="col-sm-1 truncate">
|
||||
Fecha Inicio(ing.):
|
||||
</div>
|
||||
<div class="col-sm-1">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100px !important; padding: 0px;">
|
||||
<asp:TextBox Width="80px" ID="txtFechaI" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="imgCalendario" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
</div>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaI" runat="server" TargetControlID="txtFechaI" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="Calendario" TargetControlID="txtFechaI" PopupButtonID="ImgCalendario" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="rfvFechaI" runat="server" ControlToValidate="txtFechaI" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>
|
||||
<asp:CompareValidator ID="cvFechaI" runat="server" ControlToValidate="txtFechaI" 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="vcoFfvFI" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoCvFI" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
<div class="col-sm-1 truncate">
|
||||
Fecha Fin(ing.):
|
||||
</div>
|
||||
<div class="col-sm-1">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100px !important; padding: 0px;">
|
||||
<asp:TextBox Width="80px" ID="txtFechaF" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="imgCalendarioF" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
</div>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaF" runat="server" TargetControlID="txtFechaF" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="Calendario2" TargetControlID="txtFechaF" PopupButtonID="imgCalendarioF" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="rfvFechaF" runat="server" ControlToValidate="txtFechaF" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>
|
||||
<asp:CompareValidator ID="cvFechaF" runat="server" ControlToValidate="txtFechaF" 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="vcoRfvFF" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoCvFF" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
<div class="col-sm-1 truncate">
|
||||
Fecha Inicio(Sol.):
|
||||
</div>
|
||||
<div class="col-sm-1">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100px !important; padding: 0px;">
|
||||
<asp:TextBox Width="80px" ID="txtFechaISol" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="imgCalendarioSol" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
</div>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaISol" runat="server" TargetControlID="txtFechaISol" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="CalendarExtender1" TargetControlID="txtFechaISol" PopupButtonID="imgCalendarioSol" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="rfvFechaISol" runat="server" ControlToValidate="txtFechaISol" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>
|
||||
<asp:CompareValidator ID="cvFechaISol" runat="server" ControlToValidate="txtFechaISol" 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="vcoFfvFISol" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaISol" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoCvFISOL" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaISol" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
<div class="col-sm-1 truncate">
|
||||
Fecha Fin(Sol.):
|
||||
</div>
|
||||
<div class="col-sm-1">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100px !important; padding: 0px;">
|
||||
<asp:TextBox Width="80px" ID="txtFechaFSol" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="imgCalendarioFSol" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
</div>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaFSol" runat="server" TargetControlID="txtFechaFSol" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="CalendarExtender2" TargetControlID="txtFechaFSol" PopupButtonID="imgCalendarioFSol" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="rfvFechaFSol" runat="server" ControlToValidate="txtFechaFSol" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>
|
||||
<asp:CompareValidator ID="cvFechaFSol" runat="server" ControlToValidate="txtFechaFSol" 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="vcoRfvFFSol" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaFSol" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoCvFFSol" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaFSol" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body" style="display: none">
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<asp:UpdatePanel ID="upDatosSAT" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GVSAT_DescargaSolicitudes" runat="server" GridLines="None" CssClass="table table-hover table-striped ScrollAD Widthall" AutoGenerateColumns="False"
|
||||
DataKeyNames="Tipo,TipoText,FechaIngreso,idSolicitud,FechaInicioSolicitud,FechaFinSolicitud,FechaDescarga,NoCFDI" data-sort="2">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Tipo ">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lbltipoText" runat="server" Text='<%# Eval("TipoText")%>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Fecha Ingreso">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblfechaIngreso" runat="server" Text='<%# Eval("FechaIngreso","{0:dd/MM/yyyy HH:mm}")%>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="id Solicitud">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblidSolicitud" runat="server" Text='<%# Eval("idSolicitud")%>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Fecha Inicio Solicitud">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblfechaInicioSolicitud" runat="server" Text='<%# Eval("FechaInicioSolicitud","{0:dd/MM/yyyy HH:mm}")%>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Fecha Fin Solicitud">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblfechaFinSolicitud" runat="server" Text='<%# Eval("FechaFinSolicitud","{0:dd/MM/yyyy HH:mm}")%>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Estatus">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblnoCFDI" runat="server" Text='<%# Eval("Estatus")%>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Fecha Descarga">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblfechaDescarga" runat="server" Text='<%# Eval("FechaDescarga")%>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="No CFDI">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblnoCFDI" runat="server" Text='<%# Eval("NoCFDI")%>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
|
||||
<div id="ModalSolicitarSat" class="modal ADS fade" role="dialog">
|
||||
<asp:UpdatePanel ID="UpModalDefaults" class="modal-dialog" tabindex="-1" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="modal-content rowpadding">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
<h4 class="modal-title" runat="server" style="text-align: left">Valores reconstruccion</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-3 ">
|
||||
<asp:Label runat="server" Text="Tipo" AssociatedControlID="DdlTipoAdd"></asp:Label>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<div class="form-group form-md-line-input form-md-floating-label input-iconright">
|
||||
<asp:DropDownList ID="DdlTipoAdd" CssClass="form-control select2me" Width="100%" runat="server">
|
||||
<asp:ListItem Value="-1" Text="Todas" Selected="True"></asp:ListItem>
|
||||
<asp:ListItem Value="1" Text="Recibidas (Compras)"></asp:ListItem>
|
||||
<asp:ListItem Value="2" Text="Emitidas (Ventas)"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-3 ">
|
||||
Fecha Inicio:
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<div class="input-group input-sm date date-picker " data-date-format="dd/mm/yyyy hh:mm:ss" style="display: inline-block;">
|
||||
<asp:TextBox ID="txtFechaIAdd" runat="server" CssClass="form-control input-sm ADDateTimePicker" datetimeButton=".lnkFechaIAdd" CausesValidation="true" MaxLength="19" Width="132px "></asp:TextBox>
|
||||
<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>
|
||||
<ajax:ValidatorCalloutExtender ID="VcoFechaIAdd" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaIAdd" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<span class="input-group-btn"><a class="btn default lnkFechaIAdd"><i class="fa fa-calendar"></i></a></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-3 ">
|
||||
Fecha Fin:
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
|
||||
<div class="input-group input-sm date date-picker " data-date-format="dd/mm/yyyy hh:mm:ss" style="display: inline-block;">
|
||||
<asp:TextBox ID="txtFechaFAdd" runat="server" CssClass="form-control input-sm ADDateTimePicker" CausesValidation="true" datetimeButton=".lnkFechaFAdd" MaxLength="19" Width="132px "></asp:TextBox>
|
||||
<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>
|
||||
<ajax:ValidatorCalloutExtender ID="VcoFechaFAdd" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaFAdd" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<span class="input-group-btn"><a class="btn default lnkFechaFAdd"><i class="fa fa-calendar"></i></a></span>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<%--<div class="col-md-4" data-date-format="dd/mm/yyyy" style ="padding-right: 0px;">
|
||||
<div class="form-group form-md-line-input form-md-floating-label input-iconright">
|
||||
<asp:TextBox ID="txtFechaIAdd" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||
<asp:Label runat="server" Text="Fecha Inicio" AssociatedControlID="txtFechaIAdd"></asp:Label>
|
||||
</div>
|
||||
<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="CalendarExtender3" 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="ValidatorCalloutExtender1" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaIAdd" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender2" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaIAdd" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
|
||||
</div>
|
||||
<div class="col-md-2" style ="padding-top: 14px;padding-left: 0px;">
|
||||
<div class="input-group input-sm input-small date date-picker " style ="padding-left: 0px;" data-date-format="dd/mm/yyyy" >
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="LnkFechaIAdd" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-4" data-date-format="dd/mm/yyyy" style ="padding-right: 0px;">
|
||||
<div class="form-group form-md-line-input form-md-floating-label input-iconright">
|
||||
<asp:TextBox ID="txtFechaFAdd" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||
<asp:Label runat="server" Text="Fecha Fin" AssociatedControlID="txtFechaFAdd"></asp:Label>
|
||||
</div>
|
||||
<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="CalendarExtender4" 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="ValidatorCalloutExtender3" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaFAdd" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender4" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaFAdd" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
<div class="col-md-2" style ="padding-top: 14px;padding-left: 0px;">
|
||||
<div class="input-group input-sm input-small date date-picker " style ="padding-left: 0px;" data-date-format="dd/mm/yyyy" >
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="LnkFechaFAdd" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server" ValidationGroup="VGAdd"></asp:LinkButton>
|
||||
</span>
|
||||
</div>
|
||||
</div>--%>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal-footer">
|
||||
<asp:LinkButton ID="LnkSolicitarCFDI" CssClass="btn btn-primary" OnClick="LnkSolicitarCFDI_Click" runat="server">Solicitar SAT</asp:LinkButton>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
|
||||
<script>
|
||||
function ADSBegin() {
|
||||
$("#barradenavegacion").show();
|
||||
}
|
||||
|
||||
function CargaPickers() {
|
||||
if ($.datetimepicker) {
|
||||
$.datetimepicker.setLocale('es');
|
||||
$('input.ADDateTimePicker').each(function () {
|
||||
let TThis = $(this);
|
||||
let datetimeButton = TThis.attr('datetimeButton')
|
||||
TThis.datetimepicker({
|
||||
dayOfWeekStart: 1,
|
||||
lang: 'es',
|
||||
format: 'd/m/Y H:i:s',
|
||||
formatDate: 'd/m/Y H:i:s',
|
||||
step: 30
|
||||
});
|
||||
if (datetimeButton && datetimeButton.length) {
|
||||
let button = $(datetimeButton);
|
||||
if (button && button.length) {
|
||||
button.unbind("click");
|
||||
button.bind("click", function () {
|
||||
TThis.datetimepicker('show')
|
||||
});
|
||||
} else {
|
||||
console.error('no se encontro el boton :' + datetimeButton)
|
||||
}
|
||||
} else//creoBoton
|
||||
{
|
||||
var Div = TThis.parent()
|
||||
|
||||
var boton = document.createElement('span');
|
||||
boton.className = "input-group-btn"
|
||||
|
||||
var subboton = document.createElement('a')
|
||||
subboton.className = "btn default"
|
||||
subboton.innerHTML = "<i class='fa fa-calendar'></i>"
|
||||
subboton.addEventListener('click', function () {
|
||||
TThis.datetimepicker('show')
|
||||
});
|
||||
boton.appendChild(subboton)
|
||||
|
||||
var agregar = true;
|
||||
for (var i = 0; i < Div[0].children.length; i++) {
|
||||
if (Div[0].children[i].isEqualNode(boton)) {
|
||||
agregar = false;
|
||||
}
|
||||
}
|
||||
if (agregar) {
|
||||
//Div[0].appendChild(boton);
|
||||
TThis.before(boton);
|
||||
}
|
||||
}
|
||||
//Div[0].appendChild(boton)
|
||||
|
||||
});
|
||||
} else {
|
||||
console.error("caught TypeError: datetimepicker is undefined");
|
||||
}
|
||||
|
||||
}
|
||||
</script>
|
||||
</asp:Content>
|
||||
|
||||
128
Ventas/SolicitudesSAT.aspx.cs
Normal file
128
Ventas/SolicitudesSAT.aspx.cs
Normal file
@@ -0,0 +1,128 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using Extensiones;
|
||||
|
||||
public partial class Ventas_SolicitudesSAT : ClsPaginas
|
||||
{
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
if (!IsPostBack)
|
||||
{
|
||||
//this.RegistraScript("$('#ModalSolicitarSat').modal();");
|
||||
int rtipo = Request["tipo"] == null ? -1 : Request["tipo"].ToString().ToEntero();
|
||||
string rfIngInicio = Request["fIngInicio"] == null ? "" : Request["fIngInicio"].ToString().Trim();
|
||||
string rfIngFin = Request["fIngFin"] == null ? "" : Request["fIngFin"].ToString().Trim();
|
||||
string rfSolInicio = Request["fSolInicio"] == null ? "" : Request["fSolInicio"].ToString().Trim();
|
||||
string rfSolFin = Request["fSolFin"] == null ? "" : Request["fSolFin"].ToString().Trim();
|
||||
|
||||
DateTime dValor = DateTime.Now;
|
||||
dValor = DateTime.Now; if (DateTime.TryParse(rfIngInicio, out dValor)) { rfIngInicio = string.Format("{0:dd/MM/yyyy}", dValor); } else { rfIngInicio = ""; }
|
||||
dValor = DateTime.Now; if (DateTime.TryParse(rfIngFin, out dValor)) { rfIngFin = string.Format("{0:dd/MM/yyyy}", dValor); } else { rfIngFin = ""; }
|
||||
dValor = DateTime.Now; if (DateTime.TryParse(rfSolInicio, out dValor)) { rfSolInicio = string.Format("{0:dd/MM/yyyy}", dValor); } else { rfSolInicio = ""; }
|
||||
dValor = DateTime.Now; if (DateTime.TryParse(rfSolFin, out dValor)) { rfSolFin = string.Format("{0:dd/MM/yyyy}", dValor); } else { rfSolFin = ""; }
|
||||
|
||||
DdlTipo.SelectedValueExist(rtipo);
|
||||
txtFechaI.Text = rfIngInicio;
|
||||
txtFechaF.Text = rfIngFin;
|
||||
txtFechaISol.Text = rfSolInicio;
|
||||
txtFechaFSol.Text = rfSolFin;
|
||||
cargarDatos();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void cargarDatos()
|
||||
{
|
||||
int rtipo = DdlTipo.SelectedValue.ToEntero();
|
||||
string rfIngInicio = txtFechaI.Text;
|
||||
string rfIngFin = txtFechaF.Text;
|
||||
string rfSolInicio = txtFechaISol.Text;
|
||||
string rfSolFin = txtFechaFSol.Text;
|
||||
using (ClsGenerales objgral = new ClsGenerales())
|
||||
{
|
||||
objgral.SAT_DescargaSolicitudesGET(UsuarioActual.CveEmpresa, rtipo, rfIngInicio, rfIngFin, rfSolInicio, rfSolFin);
|
||||
GVSAT_DescargaSolicitudes.DataSource = objgral.DtResultados;
|
||||
GVSAT_DescargaSolicitudes.DataBind();
|
||||
}
|
||||
upDatosSAT.Update();
|
||||
}
|
||||
|
||||
protected void BtnConsultar_Click(object sender, EventArgs e)
|
||||
{
|
||||
cargarDatos();
|
||||
}
|
||||
|
||||
protected void LnkVerificarSolicitudes_Click(object sender, EventArgs e)
|
||||
{
|
||||
string direxe = string.Format("{0}{1}",AppDomain.CurrentDomain.BaseDirectory, "Utilerias\\ADSUtilerias.exe");
|
||||
|
||||
String json = string.Format("{{cveTareaProgramada:{0},cveEmpresa:{1},CveTareaProgramadaHistorial:{2},recursividad:{3},Resultado:{4},parametros:'Tipo=SP'}}", 1, UsuarioActual.CveEmpresa,-1, 0, 1);//Mod.ToLiteral(new System.Web.Script.Serialization.JavaScriptSerializer().Serialize(tarea));
|
||||
//this.Alert(string.Format("json:{0} : --mod TareaProgramada --Item {1}", DateTime.Now, json));
|
||||
try
|
||||
{
|
||||
string Mensajes = "";
|
||||
System.Diagnostics.Process ObjProcess = null;
|
||||
{
|
||||
ObjProcess = new System.Diagnostics.Process();
|
||||
ObjProcess.StartInfo.RedirectStandardOutput = true;
|
||||
ObjProcess.StartInfo.FileName = direxe;//System.Configuration.ConfigurationManager.AppSettings["DirUtilerias"].ToString();
|
||||
ObjProcess.StartInfo.Arguments = $"--mod TareaProgramada --Item {json} ";
|
||||
ObjProcess.StartInfo.UseShellExecute = false;
|
||||
ObjProcess.StartInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Normal;
|
||||
ObjProcess.Start();
|
||||
}
|
||||
using (System.IO.StreamReader myStreamReader = ObjProcess.StandardOutput)
|
||||
{
|
||||
Mensajes = myStreamReader.ReadLine();
|
||||
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
ex.ToString().GuardaLog();
|
||||
}
|
||||
cargarDatos();
|
||||
Alert("La solicitud ha sido enviada");
|
||||
}
|
||||
|
||||
protected void LnkSolicitarCFDI_Click(object sender, EventArgs e)
|
||||
{
|
||||
string FechaI = string.Format("{0:yyyy-MM-ddTHH}:{0:mm}:{0:ss}", txtFechaIAdd.Text.ToDateTime());
|
||||
string FechaF = string.Format("{0:yyyy-MM-ddTHH}:{0:mm}:{0:ss}", txtFechaFAdd.Text.ToDateTime());
|
||||
|
||||
string direxe = string.Format("{0}{1}", AppDomain.CurrentDomain.BaseDirectory, "Utilerias\\ADSUtilerias.exe");
|
||||
|
||||
String json = string.Format("{{cveTareaProgramada:{0},cveEmpresa:{1},CveTareaProgramadaHistorial:{2},recursividad:{3},Resultado:{4},parametros:'Tipo={5}&fechai={6}&fechaf={7}'}}", 1, UsuarioActual.CveEmpresa, -1, 0, 1,DdlTipoAdd.SelectedValue, FechaI, FechaF);//Mod.ToLiteral(new System.Web.Script.Serialization.JavaScriptSerializer().Serialize(tarea));
|
||||
//this.Alert(string.Format("json:{0} : --mod TareaProgramada --Item {1}", DateTime.Now, json));
|
||||
try
|
||||
{
|
||||
string Mensajes = "";
|
||||
System.Diagnostics.Process ObjProcess = null;
|
||||
{
|
||||
ObjProcess = new System.Diagnostics.Process();
|
||||
ObjProcess.StartInfo.RedirectStandardOutput = true;
|
||||
ObjProcess.StartInfo.FileName = direxe;//System.Configuration.ConfigurationManager.AppSettings["DirUtilerias"].ToString();
|
||||
ObjProcess.StartInfo.Arguments = $"--mod TareaProgramada --Item {json} ";
|
||||
ObjProcess.StartInfo.UseShellExecute = false;
|
||||
ObjProcess.StartInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Normal;
|
||||
ObjProcess.Start();
|
||||
}
|
||||
using (System.IO.StreamReader myStreamReader = ObjProcess.StandardOutput)
|
||||
{
|
||||
Mensajes = myStreamReader.ReadLine();
|
||||
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
ex.ToString().GuardaLog();
|
||||
}
|
||||
cargarDatos();
|
||||
Alert("La solicitud ha sido enviada");
|
||||
}
|
||||
}
|
||||
@@ -9512,6 +9512,7 @@ Partial Class Ventas
|
||||
Select Case ConceptoContable
|
||||
Case 1 'Cliente
|
||||
If Not ObjFactura.TipoDocto.Contiene("Egs", "Rem", "RNC") Then
|
||||
If ObjFactura.CveMoneda > 1 Then ConceptoContable = 291
|
||||
importeMovimiento = (ObjFactura.Total - TotalOtrosConceptos) * ValorMultiplicador
|
||||
importeMX = importeMovimiento * tipoCambio * Multiplicador
|
||||
FechaMovimiento = ObjFactura.FechaPago
|
||||
@@ -9542,6 +9543,7 @@ Partial Class Ventas
|
||||
CveCuentaCliente = CveCuenta
|
||||
End If
|
||||
|
||||
|
||||
Case 3 'Cliente
|
||||
|
||||
If ObjFactura.TipoDocto = "Ant" Then
|
||||
@@ -11685,6 +11687,7 @@ Partial Class Ventas
|
||||
|
||||
Select Case ConceptoContable
|
||||
Case 2 'Cliente
|
||||
'If CveMonedaVenta > 1 Then ConceptoContable = 292
|
||||
If Not (gvr.DataKey("CveIE").ToString.ToEntero > 0 AndAlso gvr.DataKey("CveConceptoContable").ToString().ToEntero = 66) Then
|
||||
If DdlMoneda.SelectedValue.ToEntero = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
|
||||
importeMovimiento = gvr.FCTextBox("TxtAnticipo" & gvr.RowIndex).Text.ToDecimal
|
||||
@@ -15346,9 +15349,11 @@ Partial Class Ventas
|
||||
If ErrorList.Count = 0 AndAlso MovDetalle.Rows.Count > 0 Then
|
||||
Dim CveMovimientoSalidaPorTraspaso As Integer = -1
|
||||
Dim CveConceptoSalidaAlmacen As Integer = 3
|
||||
Dim CveAlmacenParaSalida As Integer = CveAlmacenEntrada
|
||||
'SALIDA DEFINITIVA DEL SISTEMA
|
||||
If UsuarioActual.Empresa.Funcionalidad(575) = "1" Then
|
||||
CveConceptoSalidaAlmacen = 40
|
||||
CveAlmacenParaSalida = CveAlmacenSalida
|
||||
''Le damos salida normal
|
||||
'If ConSalida Then
|
||||
' GeneroMovimientoAlmacen = GenerarMovimientoAlmacen(ObjInventario, MovDetalle, CveAlmacenSalida, 40, CveMoneda, CveVenta, AplicaMovimientoDetalleEntrada:=AplicaMovimientoDetalleEntrada, MovimientoPrePoliza:=True, ObjConta:=ObjConta) > 0
|
||||
@@ -15393,7 +15398,7 @@ Partial Class Ventas
|
||||
End If
|
||||
|
||||
If Not OcurrioError Then
|
||||
GeneroMovimientoAlmacen = GenerarMovimientoAlmacen(ObjInventario, MovDetalle, CveAlmacenEntrada, CveConceptoSalidaAlmacen, CveMoneda, ObjFactura.CveVenta, MovimientoPrePoliza:=True, ObjConta:=ObjConta) > 0
|
||||
GeneroMovimientoAlmacen = GenerarMovimientoAlmacen(ObjInventario, MovDetalle, CveAlmacenParaSalida, CveConceptoSalidaAlmacen, CveMoneda, ObjFactura.CveVenta, MovimientoPrePoliza:=True, ObjConta:=ObjConta) > 0
|
||||
|
||||
If Not GeneroMovimientoAlmacen Then
|
||||
OcurrioError = True
|
||||
|
||||
@@ -67,52 +67,41 @@ Public Class WSApp
|
||||
Application("GlobalDTVtaFormaPago") = value
|
||||
End Set
|
||||
End Property
|
||||
'Property GlobalDTSubProyectos(CveProyecto As Integer, Optional CveSubProyecto As Integer = -1, Optional CveEmpresa As Integer = -1, Optional Estatus As Integer = 1) As DataTable
|
||||
' Get
|
||||
Public Property GlobalDTSubProyectos(CveProyecto As Integer, Optional CveSubProyecto As Integer = -1, Optional CveEmpresa As Integer = -1, Optional Estatus As Integer = 1) As DataTable
|
||||
Get
|
||||
Dim AppNombre As String = String.Format("GlobalDTSubProyectos{0}", CveEmpresa)
|
||||
'sino existe, recarga los datos
|
||||
If DirectCast(Application(AppNombre), DataTable) Is Nothing Or (DirectCast(Application(AppNombre), DataTable) IsNot Nothing AndAlso DirectCast(Application(AppNombre), DataTable).Rows.Count = 0) Then
|
||||
Dim P As New ClsSubProyectos
|
||||
If P.GetSubProyectos(CveEmpresa:=CveEmpresa) Then Application(AppNombre) = P.DtResultados
|
||||
P.Dispose()
|
||||
|
||||
' If DirectCast(Application("GlobalDTSubProyectos"), DataTable) Is Nothing Or (DirectCast(Application("GlobalDTSubProyectos"), DataTable) IsNot Nothing AndAlso DirectCast(Application("GlobalDTSubProyectos"), DataTable).Rows.Count = 0) Then
|
||||
' Dim P As New ClsSubProyectos
|
||||
' If P.GetSubProyectos Then
|
||||
' Application("GlobalDTSubProyectos") = P.DtResultados
|
||||
' End If
|
||||
' P.Dispose()
|
||||
Dim msg As String = "aqui no se carga subproyectos"
|
||||
msg.GuardaLog()
|
||||
|
||||
' Dim msg As String = "aqui no se carga subproyectos"
|
||||
' 'If Request IsNot Nothing Then
|
||||
' ' msg = msg & Request.ServerVariables("URL")
|
||||
' 'End If
|
||||
' msg.GuardaLog()
|
||||
End If
|
||||
|
||||
' End If
|
||||
If CveProyecto <> -1 OrElse CveSubProyecto <> -1 OrElse CveEmpresa <> -1 OrElse Estatus <> -1 Then
|
||||
Dim StrSQL As New StringBuilder
|
||||
If CveProyecto <> -1 Then StrSQL.AppendFormat(" AND CveProyecto = {0}", CveProyecto)
|
||||
If CveSubProyecto <> -1 Then StrSQL.AppendFormat(" AND CveSubProyecto = {0}", CveSubProyecto)
|
||||
If Estatus <> -1 Then StrSQL.AppendFormat(" AND CveEstatus = {0}", Estatus)
|
||||
If CveEmpresa <> -1 Then StrSQL.AppendFormat(" AND CveEmpresa = {0}", CveEmpresa)
|
||||
|
||||
' If CveProyecto <> -1 OrElse CveSubProyecto <> -1 OrElse CveEmpresa <> -1 OrElse Estatus <> -1 Then
|
||||
' Dim StrSQL As New StringBuilder
|
||||
' If CveProyecto <> -1 Then StrSQL.AppendFormat(" AND CveProyecto = {0}", CveProyecto)
|
||||
' If CveSubProyecto <> -1 Then StrSQL.AppendFormat(" AND CveSubProyecto = {0}", CveSubProyecto)
|
||||
' If Estatus <> -1 Then StrSQL.AppendFormat(" AND CveEstatus = {0}", Estatus)
|
||||
' If CveEmpresa <> -1 Then StrSQL.AppendFormat(" AND CveEmpresa = {0}", CveEmpresa)
|
||||
Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), StrSQL.ToString.Trim.TrimStart("A"c, "N"c, "D"c), "", DataViewRowState.CurrentRows)
|
||||
GlobalDTSubProyectos = Dv.ToTable
|
||||
Dv.Dispose()
|
||||
|
||||
' Dim Dv As New DataView(DirectCast(Application("GlobalDTSubProyectos"), DataTable), StrSQL.ToString.Trim.TrimStart("A"c, "N"c, "D"c), "", DataViewRowState.CurrentRows)
|
||||
' GlobalDTSubProyectos = Dv.ToTable
|
||||
' Dv.Dispose()
|
||||
Else
|
||||
GlobalDTSubProyectos = DirectCast(Application(AppNombre), DataTable)
|
||||
End If
|
||||
|
||||
' Else
|
||||
' GlobalDTSubProyectos = DirectCast(Application("GlobalDTSubProyectos"), DataTable)
|
||||
' End If
|
||||
|
||||
' End Get
|
||||
' Set(ByVal value As DataTable)
|
||||
' If value Is Nothing OrElse value.Rows.Count = 0 Then
|
||||
' Dim msg As String = "aqui no se carga subproyectos"
|
||||
' 'If Request IsNot Nothing Then
|
||||
' ' msg = msg & Request.ServerVariables("URL")
|
||||
' 'End If
|
||||
' msg.GuardaLog()
|
||||
|
||||
' End If
|
||||
' Application("GlobalDTSubProyectos") = value
|
||||
' End Set
|
||||
'End Property
|
||||
End Get
|
||||
Set(ByVal value As DataTable)
|
||||
Dim AppNombre As String = String.Format("GlobalDTSubProyectos{0}", CveEmpresa)
|
||||
Application(AppNombre) = value
|
||||
End Set
|
||||
End Property
|
||||
Property GlobalDTSATUsosCFDI(Optional EsPersonaFisica As Integer = -1) As DataTable
|
||||
Get
|
||||
If EsPersonaFisica <> -1 Then
|
||||
|
||||
Reference in New Issue
Block a user