This commit is contained in:
@@ -5963,7 +5963,7 @@ Public Class ClsInventarios
|
||||
|
||||
|
||||
|
||||
Public Function RepCompuestosVigencia(CveCompuesto As Integer, CveProveedor As Integer, FechaI As Date, FechaF As Date, VigenciaIndeterminada As Boolean, CveEmpresa As Integer) As Boolean
|
||||
Public Function RepCompuestosVigencia(CveCompuesto As Integer, CveProveedor As Integer, FechaI As Date, FechaF As Date, VigenciaIndeterminada As Boolean, CveEmpresa As Integer, Optional ConCaducidad As Boolean = False) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_CompuestosVigenciaRep")
|
||||
@@ -5976,6 +5976,8 @@ Public Class ClsInventarios
|
||||
.Add("@FechaF", SqlDbType.Date).Value = FechaF
|
||||
.Add("@VigenciaIndeterminada", SqlDbType.Int).Value = VigenciaIndeterminada
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
.Add("@ConCaducidad", SqlDbType.Bit).Value = ConCaducidad
|
||||
|
||||
End With
|
||||
|
||||
Try
|
||||
|
||||
@@ -3209,6 +3209,34 @@ Public Class ClsNominas
|
||||
retorno = RunQuery("Ocurrió un error al obtener el Calculo ISR anual.")
|
||||
Return retorno
|
||||
End Function
|
||||
|
||||
|
||||
Public Function SATSolicitudTimbreIngresosRep(CveEmpresa As Integer, FechaInicio As Date, FechaFin As DateTime, Opcion As Integer) As Boolean
|
||||
|
||||
|
||||
Dim retorno As Boolean = False
|
||||
Try
|
||||
DataAdapter("PA_SAT_SolicitudTimbreIngresosRep", CommandType.StoredProcedure)
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
.Add("@FechaInicio", SqlDbType.Date).Value = FechaInicio
|
||||
.Add("@FechaFin", SqlDbType.DateTime).Value = FechaFin
|
||||
.Add("@Opcion", SqlDbType.Int).Value = Opcion
|
||||
End With
|
||||
SqlAdapter.Fill(Data)
|
||||
|
||||
retorno = True
|
||||
|
||||
Catch ex As Exception
|
||||
retorno = False
|
||||
OnError("Ocurrió un error al consultar el reporte de CFDI contra ingreso.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End Try
|
||||
|
||||
Return retorno
|
||||
|
||||
|
||||
End Function
|
||||
|
||||
#Region "CRUD_SolicitudesNominas"
|
||||
Public Function SolicitudesGet(CveSolicitud As Integer, CveEmpresa As Integer, Optional CveTipoSolicitud As Integer = 1) As Boolean
|
||||
Dim retorno As Boolean = False
|
||||
|
||||
@@ -5393,7 +5393,9 @@ Public Class ClsPaginas
|
||||
PaginaDict.Add("/RH/MiPerfil.aspx".ToUpper(), -1) ' se dejará libre el módulo para que cualquier que tenga cvepersonal, pueda acceder
|
||||
PaginaDict.Add("/RH/CatChecadores.aspx".ToUpper(), 694)
|
||||
PaginaDict.Add("/RH/CatRegistroPatronal.aspx".ToUpper(), 1324)
|
||||
|
||||
PaginaDict.Add("/SAT/SolicitudesNominaSat.aspx".ToUpper(), 545)
|
||||
PaginaDict.Add("/SAT/SolicitudesIngresoSat.aspx".ToUpper(), 1329)
|
||||
#End Region
|
||||
#Region "Sistema"
|
||||
'Cargo las páginas que deben tener restricción
|
||||
|
||||
@@ -753,8 +753,8 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
|
||||
Dim DtRetorno As DataTable = Nothing
|
||||
Dim ColumnaNombre As String = "NombreComercial"
|
||||
'Abreviaturas. N. Nombre, NC. NombreComercial,...
|
||||
If IfNull(context.Request("ColTexto"), "") = "N" Then
|
||||
ColumnaNombre = "Nombre"
|
||||
If context.Request("ColTexto") IsNot Nothing AndAlso context.Request("ColTexto").Contiene("N", "CodigoNombre") Then
|
||||
ColumnaNombre = IIf(context.Request("ColTexto") = "N", "Nombre", context.Request("ColTexto"))
|
||||
End If
|
||||
|
||||
Dim EsDistribuidor As Integer = IfNull(context.Request("esdistribuidor"), "-1").ToString.ToEntero
|
||||
|
||||
@@ -583,8 +583,6 @@ public partial class Bancos_PrestamoPersonal : ClsPaginas
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (CveIE > 0)
|
||||
{
|
||||
//GUARDA COMPROBANTE
|
||||
|
||||
@@ -2175,24 +2175,7 @@ Partial Class Compras_Compras
|
||||
If Cambio Then
|
||||
DdlRetIVAConcepto.Items.Clear()
|
||||
|
||||
If RFCProv.Length = 13 Then ' personal moral
|
||||
If DIOTCveTipoOperacion = 1 Then '03 - Prestación de Servicios Profesionales
|
||||
DdlRetIVAConcepto.Items.Insert(0, New ListItem("Honorarios/Serv. Prof.", "1"))
|
||||
End If
|
||||
|
||||
If DIOTCveTipoOperacion = 2 Then ' 06 - Arrendamiento de inmuebles
|
||||
DdlRetIVAConcepto.Items.Add(New ListItem("Arrendamiento", "4"))
|
||||
End If
|
||||
|
||||
If DIOTCveTipoOperacion.Contiene(0, 3) Then ' 85 - Otros
|
||||
DdlRetIVAConcepto.Items.Insert(0, New ListItem("Honorarios/Serv. Prof.", "1"))
|
||||
DdlRetIVAConcepto.Items.Add(New ListItem("Arrendamiento", "4"))
|
||||
DdlRetIVAConcepto.Items.Insert(0, New ListItem("Fletes P.M.", "3"))
|
||||
DdlRetIVAConcepto.Items.Add(New ListItem("General", "6"))
|
||||
End If
|
||||
|
||||
|
||||
ElseIf RFCProv.Length = 12 Then
|
||||
If RFCProv.Length = 13 Then ' personal fisica
|
||||
If DIOTCveTipoOperacion = 1 Then '03 - Prestación de Servicios Profesionales
|
||||
DdlRetIVAConcepto.Items.Insert(0, New ListItem("Honorarios/Serv. Prof.", "1"))
|
||||
End If
|
||||
@@ -2205,10 +2188,26 @@ Partial Class Compras_Compras
|
||||
DdlRetIVAConcepto.Items.Insert(0, New ListItem("Honorarios/Serv. Prof.", "1"))
|
||||
DdlRetIVAConcepto.Items.Add(New ListItem("Arrendamiento", "4"))
|
||||
DdlRetIVAConcepto.Items.Insert(0, New ListItem("Fletes P.F.", "2"))
|
||||
DdlRetIVAConcepto.Items.Add(New ListItem("General.", "6"))
|
||||
DdlRetIVAConcepto.Items.Add(New ListItem("Resico", "5"))
|
||||
DdlRetIVAConcepto.Items.Add(New ListItem("General", "6"))
|
||||
End If
|
||||
|
||||
ElseIf RFCProv.Length = 12 Then ' persona moral
|
||||
If DIOTCveTipoOperacion = 1 Then '03 - Prestación de Servicios Profesionales
|
||||
DdlRetIVAConcepto.Items.Insert(0, New ListItem("Honorarios/Serv. Prof.", "1"))
|
||||
End If
|
||||
|
||||
If DIOTCveTipoOperacion = 2 Then ' 06 - Arrendamiento de inmuebles
|
||||
DdlRetIVAConcepto.Items.Add(New ListItem("Arrendamiento", "4"))
|
||||
End If
|
||||
|
||||
If DIOTCveTipoOperacion.Contiene(0, 3) Then ' 85 - Otros
|
||||
DdlRetIVAConcepto.Items.Insert(0, New ListItem("Honorarios/Serv. Prof.", "1"))
|
||||
DdlRetIVAConcepto.Items.Add(New ListItem("Arrendamiento", "4"))
|
||||
DdlRetIVAConcepto.Items.Insert(0, New ListItem("Fletes P.M.", "3"))
|
||||
DdlRetIVAConcepto.Items.Add(New ListItem("Resico", "5"))
|
||||
DdlRetIVAConcepto.Items.Add(New ListItem("General.", "6"))
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
@@ -5936,8 +5935,6 @@ Partial Class Compras_Compras
|
||||
|
||||
Next
|
||||
|
||||
|
||||
|
||||
Dim CveClasificacionDT As Integer = -1
|
||||
Dim CveSubProyectoDT As Integer = -1
|
||||
Dim CveTipoGastoDT As Integer = -1
|
||||
@@ -6022,54 +6019,6 @@ Partial Class Compras_Compras
|
||||
IdCtaContable = IdCuentaBancaria
|
||||
End If
|
||||
|
||||
|
||||
'Case 19 'IVA Acreditable
|
||||
' If UsuarioActual.Empresa.Funcionalidad(521) = "1" Then
|
||||
' If importePagoProv = importeProv Then
|
||||
' importeMovimiento = TxtIVA.Text.ToDecimal
|
||||
' Else
|
||||
' importeMovimiento = 0
|
||||
' End If
|
||||
' Else
|
||||
' importeMovimiento = importeIVAAcreditable
|
||||
' End If
|
||||
|
||||
' importeMN = Math.Round(importeMovimiento, 2) * tipoCambioActual * Multiplicador
|
||||
|
||||
' PorcentajeImpuesto = PorcentajeIVA
|
||||
' IdCtaContable = If(IdCtaIVAAcreditable > 0, IdCtaIVAAcreditable, 0)
|
||||
' If chkImportacion.Checked Then
|
||||
' ConceptoContable = 288
|
||||
' End If
|
||||
|
||||
' If UsuarioActual.Empresa.TipoContabilidad = 2 AndAlso ObjConta.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) And Not IdCtaContable > 0 Then
|
||||
' If ObjConta.DtResultados.Rows.Count > 0 Then
|
||||
' IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCuentaIVAAcreditable").ToString.ToEntero
|
||||
' End If
|
||||
' End If
|
||||
|
||||
' 'Agregamos el Opuesto del 19 -> 14
|
||||
' If importeMovimiento <> 0 Then
|
||||
' Dim IdCtaIva As Integer = 0
|
||||
' IdCtaIva = If(IdCtaIVAXAcreditar > 0, IdCtaIVAXAcreditar, 0)
|
||||
' Dim ttConceptoContable As Integer = 14
|
||||
|
||||
' If UsuarioActual.Empresa.TipoContabilidad = 2 AndAlso ObjConta.GetRetCuenta(ttConceptoContable, UsuarioActual.CveEmpresa) And Not IdCtaIva > 0 Then
|
||||
' If ObjConta.DtResultados.Rows.Count > 0 Then
|
||||
' IdCtaIva = ObjConta.DtResultados.Rows(0)("IdCuentaIVAxAcreditar").ToString.ToEntero
|
||||
' End If
|
||||
' End If
|
||||
|
||||
' If chkImportacion.Checked Then
|
||||
' ttConceptoContable = 287
|
||||
' End If
|
||||
|
||||
' If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimiento, importeMovimiento, Referencia, ttConceptoContable, Concepto + If(tipoCambioActual > 1, $" TC {tipoCambioActual} ${importeMovimiento.FormatoNumero(2)}", ""), FechaMovimiento, IdCtaIva, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveIE:=CveIE, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMovimiento * tipoCambioActual, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), PorcentajeImpuesto:=PorcentajeImpuesto, Contabilizable:=SeContabiliza, TipoCambio:=tipoCambioActual) Then
|
||||
' ErrorPrepoliza = True
|
||||
' End If
|
||||
' End If
|
||||
|
||||
' If tipoCambioActual > 1 Then Concepto += $" TC{tipoCambioActual} ${importeMovimiento.FormatoNumero(2)}"
|
||||
Case 14 'IVA X Acreditar
|
||||
importeMovimiento = CompraActual.IVA
|
||||
importeMN = (importeMovimiento * tipoCambioActual * Multiplicador).RoundSQL
|
||||
@@ -6109,21 +6058,6 @@ Partial Class Compras_Compras
|
||||
importeMN = 0
|
||||
End If
|
||||
|
||||
|
||||
|
||||
'Case 287 'IVA X Acreditar
|
||||
' importeMovimiento = CompraActual.IVA
|
||||
' importeMN = Math.Round(importeMovimiento, 2) * tipoCambioActual * Multiplicador
|
||||
' If tipoCambioActual > 1 Then Concepto += $" TC{tipoCambioActual} ${importeMovimiento.FormatoNumero(2)}"
|
||||
' PorcentajeImpuesto = PorcentajeIVA
|
||||
' IdCtaContable = If(IdCtaIVAXAcreditar > 0, IdCtaIVAXAcreditar, 0)
|
||||
' If UsuarioActual.Empresa.TipoContabilidad = 2 AndAlso ObjConta.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) And Not IdCtaContable > 0 Then
|
||||
' If ObjConta.DtResultados.Rows.Count > 0 Then
|
||||
' IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCuentaIVAxAcreditar").ToString.ToEntero
|
||||
' End If
|
||||
' End If
|
||||
|
||||
|
||||
Case 25 'IEPS X Acreditar
|
||||
If Not DdlTipoComprobante.SelectedValue.Contiene("Ant") Then
|
||||
CveSubProyectoInsertar = CveSubProyecto
|
||||
@@ -6144,33 +6078,7 @@ Partial Class Compras_Compras
|
||||
If tipoCambioActual > 1 Then Concepto += $" TC{tipoCambioActual} ${importeMovimiento.FormatoNumero(2)}"
|
||||
IdCtaContable = If(UsuarioActual.CveEmpresa = 119, 1171, -1)
|
||||
End If
|
||||
'Case 26 'IEPS Acreditable
|
||||
' If Not DdlTipoComprobante.SelectedValue.Contiene("Ant") Then
|
||||
' importeMovimiento = ImporteIEPSAcreditable
|
||||
' importeMN = Math.Round(importeMovimiento, 2) * tipoCambioActual * Multiplicador
|
||||
' If UsuarioActual.Empresa.TipoContabilidad = 2 AndAlso ObjConta.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
|
||||
' If ObjConta.DtResultados.Rows.Count > 0 Then
|
||||
' IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCuentaIEPSAcreditable").ToString.ToEntero
|
||||
' End If
|
||||
' End If
|
||||
|
||||
' 'Agregamos el Opuesto del 26 -> 25
|
||||
' If importeMovimiento <> 0 Then
|
||||
' Dim IdCtaIEPS As Integer = 0
|
||||
' If UsuarioActual.Empresa.TipoContabilidad = 2 AndAlso ObjConta.GetRetCuenta(25, UsuarioActual.CveEmpresa) Then
|
||||
' If ObjConta.DtResultados.Rows.Count > 0 Then
|
||||
' IdCtaIEPS = ObjConta.DtResultados.Rows(0)("IdCuentaIEPSxAcreditar").ToString.ToEntero
|
||||
' End If
|
||||
' End If
|
||||
|
||||
' If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimiento, importeMovimiento, Referencia, 25, Concepto + If(tipoCambioActual > 1, $" TC {tipoCambioActual} ${importeMovimiento.FormatoNumero(2)}", ""), FechaMovimiento, IdCtaIEPS, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveIE:=CveIE, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMovimiento * tipoCambioActual, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), Contabilizable:=SeContabiliza, TipoCambio:=tipoCambioActual) Then
|
||||
' ErrorPrepoliza = True
|
||||
' End If
|
||||
' End If
|
||||
|
||||
' If tipoCambioActual > 1 Then Concepto += $" TC{tipoCambioActual} ${importeMovimiento.FormatoNumero(2)}"
|
||||
|
||||
' End If
|
||||
Case 15 'RetIVA X Acreditar Honorarios/Serv. Prof.
|
||||
If Not DdlTipoComprobante.SelectedValue.Contiene("Ant") Then
|
||||
If DdlRetIVAConcepto.Items.Count > 0 AndAlso DdlRetIVAConcepto.SelectedValue.ToEntero() > 0 Then
|
||||
@@ -6217,119 +6125,6 @@ Partial Class Compras_Compras
|
||||
End If
|
||||
End If
|
||||
|
||||
'Case 22 'RetIVA Acreditable Honorarios/Serv. Prof.
|
||||
' If Not DdlTipoComprobante.SelectedValue.Contiene("Ant") Then
|
||||
' If DdlRetIVAConcepto.Items.Count > 0 AndAlso DdlRetIVAConcepto.SelectedValue.ToEntero > 0 Then
|
||||
' Dim Funcionalidad As Integer = 0
|
||||
' Dim ConceptoContableContra As Integer = 0
|
||||
|
||||
' If DdlRetIVAConcepto.SelectedValue.ToEntero = 1 Then
|
||||
' Funcionalidad = 308
|
||||
' ConceptoContable = 22
|
||||
' ConceptoContableContra = 15
|
||||
' ElseIf DdlRetIVAConcepto.SelectedValue.ToEntero = 2 Then
|
||||
' Funcionalidad = 310
|
||||
' ConceptoContable = 184
|
||||
' ConceptoContableContra = 183
|
||||
|
||||
' ElseIf DdlRetIVAConcepto.SelectedValue.ToEntero = 3 Then
|
||||
' Funcionalidad = 312
|
||||
' ConceptoContable = 186
|
||||
' ConceptoContableContra = 185
|
||||
|
||||
' ElseIf DdlRetIVAConcepto.SelectedValue.ToEntero = 4 Then
|
||||
' Funcionalidad = 314
|
||||
' ConceptoContable = 249
|
||||
' ConceptoContableContra = 248
|
||||
|
||||
' ElseIf DdlRetIVAConcepto.SelectedValue.ToEntero = 5 Then
|
||||
' Funcionalidad = 578
|
||||
' ConceptoContable = 286
|
||||
' ConceptoContableContra = 285
|
||||
' ElseIf DdlRetIVAConcepto.SelectedValue.ToEntero = 6 Then
|
||||
' Funcionalidad = 578
|
||||
' ConceptoContable = 333
|
||||
' ConceptoContableContra = 334
|
||||
' End If
|
||||
|
||||
' importeMovimiento = importeRetIVAAcreditable
|
||||
' importeMN = (importeMovimiento * tipoCambioActual * Multiplicador).RoundSQL
|
||||
|
||||
' If UsuarioActual.Empresa.TipoContabilidad = 2 Then
|
||||
|
||||
' If CtaProveedorRetIVA > 0 Then
|
||||
' IdCtaContable = CtaProveedorRetIVA
|
||||
' ElseIf UsuarioActual.Empresa.Funcionalidad(Funcionalidad).ToEntero > 0 Then
|
||||
' IdCtaContable = UsuarioActual.Empresa.Funcionalidad(Funcionalidad).ToEntero
|
||||
' Else
|
||||
' If ObjConta.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
|
||||
' If ObjConta.DtResultados.Rows.Count > 0 Then
|
||||
' IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCuentaRetIVACirculacion").ToString.ToEntero
|
||||
' End If
|
||||
' End If
|
||||
' End If
|
||||
' End If
|
||||
|
||||
' 'Agregamos el Opuesto del 22 -> 15
|
||||
' If importeMovimiento <> 0 Then
|
||||
' If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimiento, importeMovimiento, Referencia, ConceptoContableContra, Concepto + If(tipoCambioActual > 1, $" TC {tipoCambioActual} ${importeMovimiento.FormatoNumero(2)}", ""), FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveIE:=CveIE, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMovimiento * tipoCambioActual, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), Contabilizable:=SeContabiliza, TipoCambio:=tipoCambioActual) Then
|
||||
' ErrorPrepoliza = True
|
||||
' End If
|
||||
' End If
|
||||
|
||||
' If tipoCambioActual > 1 Then Concepto += $" TC{tipoCambioActual} ${importeMovimiento.FormatoNumero(2)}"
|
||||
' End If
|
||||
' End If
|
||||
|
||||
'Case 23 'RetISR Acreditable
|
||||
' If Not DdlTipoComprobante.SelectedValue.Contiene("Ant") Then
|
||||
' If DdlRetISRConcepto.Items.Count > 0 AndAlso DdlRetISRConcepto.SelectedValue.ToEntero > 0 Then
|
||||
|
||||
' Dim funcionalidad As Integer = 0
|
||||
' Dim ConceptoContableContra As Integer = 0
|
||||
|
||||
' If DdlRetISRConcepto.SelectedValue.ToEntero = 1 Then
|
||||
' funcionalidad = 316
|
||||
' ConceptoContable = 23
|
||||
' ConceptoContableContra = 16
|
||||
' ElseIf DdlRetISRConcepto.SelectedValue.ToEntero = 2 Then
|
||||
' funcionalidad = 318
|
||||
' ConceptoContable = 244
|
||||
' ConceptoContableContra = 243
|
||||
' ElseIf DdlRetISRConcepto.SelectedValue.ToEntero = 3 Then
|
||||
' funcionalidad = 348
|
||||
' ConceptoContable = 328
|
||||
' ConceptoContableContra = 327
|
||||
' End If
|
||||
|
||||
' importeMovimiento = importeRetISRAcreditable
|
||||
' importeMN = (importeMovimiento * tipoCambioActual * Multiplicador).RoundSQL
|
||||
|
||||
' If UsuarioActual.Empresa.TipoContabilidad = 2 Then
|
||||
' If CtaProveedorRetISR > 0 Then
|
||||
' IdCtaContable = CtaProveedorRetISR
|
||||
' ElseIf UsuarioActual.Empresa.Funcionalidad(funcionalidad).ToEntero > 0 Then
|
||||
' IdCtaContable = UsuarioActual.Empresa.Funcionalidad(funcionalidad).ToEntero
|
||||
' Else
|
||||
' If ObjConta.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
|
||||
' If ObjConta.DtResultados.Rows.Count > 0 Then
|
||||
' IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCuentaRetISRCirculacion").ToString.ToEntero
|
||||
' End If
|
||||
' End If
|
||||
' End If
|
||||
' End If
|
||||
|
||||
|
||||
' 'Agregamos el Opuesto del 23 -> 16
|
||||
' If importeMovimiento <> 0 Then
|
||||
' If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimiento, importeMovimiento, Referencia, ConceptoContableContra, Concepto + If(tipoCambioActual > 1, $" TC {tipoCambioActual} ${importeMovimiento.FormatoNumero(2)}", ""), FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveIE:=CveIE, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMovimiento * tipoCambioActual, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), Contabilizable:=SeContabiliza) Then
|
||||
' ErrorPrepoliza = True
|
||||
' End If
|
||||
' End If
|
||||
|
||||
' If tipoCambioActual > 1 Then Concepto += $" TC{tipoCambioActual} ${importeMovimiento.FormatoNumero(2)}"
|
||||
' End If
|
||||
' End If
|
||||
Case 16 'Ret ISR X Acreditar
|
||||
If Not DdlTipoComprobante.SelectedValue.Contiene("Ant") Then
|
||||
If DdlRetISRConcepto.Items.Count > 0 AndAlso DdlRetISRConcepto.SelectedValue.ToEntero > 0 Then
|
||||
@@ -6397,27 +6192,6 @@ Partial Class Compras_Compras
|
||||
importeMovimiento = 0
|
||||
End If
|
||||
|
||||
'Case 65 'Perdida
|
||||
|
||||
' CveSubProyectoInsertar = CveSubProyecto
|
||||
' If CveSubProyectoInsertar <= 0 Then
|
||||
' ErrorPrepoliza = True
|
||||
' Alert("Concepto perdida cambiaria sin sub proyecto", TipoMensaje.MsgAdvertencia)
|
||||
' End If
|
||||
|
||||
' If TCPago > 0 AndAlso TCPago <> 1 AndAlso TxtFechaPago.Text <> TxtFecha.Text Then
|
||||
' IdCtaContable = UsuarioActual.Empresa.IdCuentaPerdidaCambiaria
|
||||
' If TCPago < TipoCambioCompra Then
|
||||
' importeMovimiento = Math.Abs(TCPago - TipoCambioCompra) * importePagoProv
|
||||
' importeMovimiento -= Math.Abs(TCPago - TipoCambioCompra) * importeIVAAcreditable
|
||||
' importeMovimiento += Math.Abs(TCPago - TipoCambioCompra) * importeRetIVAAcreditable
|
||||
' importeMovimiento += Math.Abs(TCPago - TipoCambioCompra) * importeRetISRAcreditable
|
||||
' importeMN = importeMovimiento
|
||||
' End If
|
||||
' Else
|
||||
' importeMovimiento = 0
|
||||
' End If
|
||||
|
||||
Case 6 'Compra
|
||||
|
||||
Dim AgregaMercanciaInventario As Boolean = UsuarioActual.CveEmpresa.Contiene(1, 72, 80, 119, 140, 145, 141, 152, 153, 154, 158, 159, 160, 161, 162, 163) AndAlso UsuarioActual.Empresa.UsaInventarios AndAlso Not UsuarioActual.Empresa.Funcionalidad(126) = "1"
|
||||
|
||||
@@ -852,6 +852,11 @@ Partial Class Compras_ReembolsosComprobaciones
|
||||
ConceptoContableRetIVAAcreditable = 249
|
||||
CveFunc = 313
|
||||
CveFuncAcreditable = 314
|
||||
Case 5
|
||||
ConceptoContableRetIVAXAcreditar = 285
|
||||
ConceptoContableRetIVAAcreditable = 286
|
||||
CveFunc = 578
|
||||
CveFuncAcreditable = 578
|
||||
End Select
|
||||
|
||||
If UsuarioActual.Empresa.TipoContabilidad = 2 Then
|
||||
|
||||
@@ -59,10 +59,10 @@
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkCFDiMasivo" runat="server" ToolTip="Validación Masiva de CFDi"><i class="fa fa-list-ul"></i> Validación Masiva</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="lbDescargar" runat="server"><%--<img src="/Metronic/assets/global/img/portlet-reload-icon.png" />--%><i class="fa fa-download"></i>
|
||||
<%-- <li>
|
||||
<asp:LinkButton ID="lbDescargar" runat="server"><i class="fa fa-download"></i>
|
||||
Descarga Facturas SAT</asp:LinkButton>
|
||||
</li>
|
||||
</li>--%>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkShowSolicitudes" OnClick="LnkShowSolicitudes_Click" runat="server">Solicitudes SAT</asp:LinkButton>
|
||||
</li>
|
||||
|
||||
@@ -6,11 +6,16 @@ Imports System.Diagnostics
|
||||
Imports System.Globalization
|
||||
Imports System.IO
|
||||
Imports System.IO.Compression
|
||||
Imports System.Net.Http
|
||||
Imports System.Net.Http.Headers
|
||||
Imports System.Threading
|
||||
Imports System.Threading.Tasks
|
||||
Imports System.Xml
|
||||
Imports ADSistemaLibrary.SatXml
|
||||
Imports ADSistemaLibrary.SatXml.XmlSatCFDI
|
||||
Imports Extensiones
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
Imports Newtonsoft.Json.Linq
|
||||
|
||||
Partial Class Compras_eFacturas
|
||||
Inherits ClsPaginas
|
||||
@@ -760,7 +765,7 @@ Partial Class Compras_eFacturas
|
||||
If UsuarioActual.Sesion("eFact-Proveedor").ToString <> "" Then TxtProveedor.Text = UsuarioActual.Sesion("eFact-Proveedor").ToString.Trim
|
||||
If UsuarioActual.Sesion("eFact-FI").ToString <> "" Then txtFechaI.Text = UsuarioActual.Sesion("eFact-FI").ToString.Trim
|
||||
If UsuarioActual.Sesion("eFact-FF").ToString <> "" Then txtFechaF.Text = UsuarioActual.Sesion("eFact-FF").ToString.Trim
|
||||
If UsuarioActual.CveUsuario = 100 Then lbDescargar.Visible = True
|
||||
'If UsuarioActual.CveUsuario = 100 Then lbDescargar.Visible = True
|
||||
|
||||
'If UsuarioActual.TienePermisoProceso(81) Then GvD.Columns(11).Visible = True : GvD.Columns(12).Visible = True
|
||||
'If UsuarioActual.TienePermisoProceso(206) Then GvD.Columns(10).Visible = False
|
||||
@@ -2563,6 +2568,31 @@ Partial Class Compras_eFacturas
|
||||
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
|
||||
@@ -2574,115 +2604,215 @@ Partial Class Compras_eFacturas
|
||||
Dim Continuar As Boolean = False
|
||||
|
||||
Using nom As ClsNominas = New ClsNominas()
|
||||
Continuar = nom.SolicitudesAdd(idSolicitudCFDI, idSolicitudMetadata, estatus, observaciones, fechaInicio, fechaFin, cveUsuarioIng, cveEmpresa, 2)
|
||||
'Dim api = New GeneralesAPI()
|
||||
'api.GeneraSolicitud()
|
||||
'api.VerificaSolicitudesNominas()
|
||||
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(2)} <br>")
|
||||
End If
|
||||
Else
|
||||
sbResultado.Append($"{resultSolicitud(2)}")
|
||||
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("$('#DModalSolicitudesNominas').modal('hide');")
|
||||
Me.RegistraScript("$('#ModalAgregarSolicitud').modal('hide');")
|
||||
cargasolicitudes()
|
||||
Me.Alert("se a envia la solicitud al sat, le enviaremos un correo en cuanto tengamos una respuesta", ModExtensiones.TipoMensaje.ToastInformacion)
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub LnkverificarSolicitudes_Click(ByVal sender As Object, ByVal e As EventArgs)
|
||||
'Dim api = New GeneralesAPI()
|
||||
'api.GeneraSolicitud()
|
||||
'api.VerificaSolicitudesNominas()
|
||||
|
||||
|
||||
|
||||
|
||||
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(2)} <br>")
|
||||
End If
|
||||
Else
|
||||
sbResultado.Append($"{resultSolicitud(2)}")
|
||||
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(2)}<br>")
|
||||
Else
|
||||
sbResultado.Append($"Se presento un error al verificar las solicitudes {resultVerificacion(2)}<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
|
||||
#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
|
||||
'Protected Sub lbDescargar_Click(sender As Object, e As EventArgs) Handles lbDescargar.Click
|
||||
|
||||
Dim Retorno As Boolean = False
|
||||
' Dim Retorno As Boolean = False
|
||||
|
||||
Dim ObjProcess As Process = Nothing
|
||||
Dim Mensajes As String = ""
|
||||
Dim error1 As Boolean = False
|
||||
Dim CountProcesados As Integer = 0
|
||||
' Dim ObjProcess As Process = Nothing
|
||||
' Dim Mensajes As String = ""
|
||||
' Dim error1 As Boolean = False
|
||||
' Dim CountProcesados As Integer = 0
|
||||
|
||||
|
||||
|
||||
Try
|
||||
ObjProcess = New Process()
|
||||
ObjProcess.StartInfo.RedirectStandardOutput = True
|
||||
ObjProcess.StartInfo.FileName = Ejecutable
|
||||
ObjProcess.StartInfo.Arguments = $"--mod dsat2 --cveemp {UsuarioActual.CveEmpresa} --rfc {UsuarioActual.Empresa.RFC} --ciec {UsuarioActual.Empresa.CIEC} --razon {UsuarioActual.Empresa.Empresa} --fi {txtFechaI.Text} --ff {txtFechaF.Text}"
|
||||
ObjProcess.StartInfo.UseShellExecute = False
|
||||
ObjProcess.StartInfo.WindowStyle = ProcessWindowStyle.Normal
|
||||
ObjProcess.Start()
|
||||
' Try
|
||||
' ObjProcess = New Process()
|
||||
' ObjProcess.StartInfo.RedirectStandardOutput = True
|
||||
' ObjProcess.StartInfo.FileName = Ejecutable
|
||||
' ObjProcess.StartInfo.Arguments = $"--mod dsat2 --cveemp {UsuarioActual.CveEmpresa} --rfc {UsuarioActual.Empresa.RFC} --ciec {UsuarioActual.Empresa.CIEC} --razon {UsuarioActual.Empresa.Empresa} --fi {txtFechaI.Text} --ff {txtFechaF.Text}"
|
||||
' ObjProcess.StartInfo.UseShellExecute = False
|
||||
' ObjProcess.StartInfo.WindowStyle = ProcessWindowStyle.Normal
|
||||
' ObjProcess.Start()
|
||||
|
||||
|
||||
Dim myStreamReader As StreamReader = ObjProcess.StandardOutput
|
||||
' Dim myStreamReader As StreamReader = ObjProcess.StandardOutput
|
||||
|
||||
'Read the standard output of the spawned process.
|
||||
Mensajes = myStreamReader.ReadLine()
|
||||
If Mensajes.Length > 0 Then
|
||||
' 'Read the standard output of the spawned process.
|
||||
' Mensajes = myStreamReader.ReadLine()
|
||||
' If Mensajes.Length > 0 Then
|
||||
|
||||
Dim msgs As String() = Mensajes.Split("|"c)
|
||||
Dim NFacturas As Integer = 0
|
||||
' Dim msgs As String() = Mensajes.Split("|"c)
|
||||
' Dim NFacturas As Integer = 0
|
||||
|
||||
If msgs.Length >= 2 Then
|
||||
Try
|
||||
NFacturas = msgs(0).ToEntero
|
||||
CountProcesados = msgs(0).ToEntero
|
||||
Mensajes = $"La actualización se realizó correctamente. <br> Facturas agregadas: { NFacturas }"
|
||||
Catch ex As Exception
|
||||
NFacturas = 0
|
||||
Mensajes = "La actualización se realizó correctamente"
|
||||
End Try
|
||||
Else
|
||||
Mensajes = "La descarga se realizó correctamente"
|
||||
End If
|
||||
End If
|
||||
ObjProcess.WaitForExit()
|
||||
ObjProcess.Close()
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
error1 = True
|
||||
OnError("Ocurrió un error al ejecutar el actualizador.", ex)
|
||||
End Try
|
||||
' If msgs.Length >= 2 Then
|
||||
' Try
|
||||
' NFacturas = msgs(0).ToEntero
|
||||
' CountProcesados = msgs(0).ToEntero
|
||||
' Mensajes = $"La actualización se realizó correctamente. <br> Facturas agregadas: { NFacturas }"
|
||||
' Catch ex As Exception
|
||||
' NFacturas = 0
|
||||
' Mensajes = "La actualización se realizó correctamente"
|
||||
' End Try
|
||||
' Else
|
||||
' Mensajes = "La descarga se realizó correctamente"
|
||||
' End If
|
||||
' End If
|
||||
' ObjProcess.WaitForExit()
|
||||
' ObjProcess.Close()
|
||||
' Retorno = True
|
||||
' Catch ex As Exception
|
||||
' error1 = True
|
||||
' OnError("Ocurrió un error al ejecutar el actualizador.", ex)
|
||||
' End Try
|
||||
|
||||
If Retorno Then CargaDatos()
|
||||
' If Retorno Then CargaDatos()
|
||||
|
||||
|
||||
|
||||
|
||||
'Dim Retorno As Boolean = False
|
||||
''Codigo anterior no borrar puede hacer el paro
|
||||
|
||||
'Dim ObjProcess As Process = Nothing
|
||||
'Dim Mensajes As String = ""
|
||||
'Dim EjecutableUtilerias = Path.Combine(ModExtensiones.DirectorioBaseEmpresas, "Utilerias\UtileriasAD.exe")
|
||||
'Dim Folder = Path.Combine(ModExtensiones.DirectorioBaseEmpresas, "Empresas\")
|
||||
'Dim error1 As Boolean = False
|
||||
'Dim en As New CultureInfo("en-US")
|
||||
'Dim fechai = txtFechaI.Text.Trim.ToDate.ToString("d", en)
|
||||
'Dim fechaf = txtFechaF.Text.Trim.ToDate.ToString("d", en)
|
||||
'Try
|
||||
' ObjProcess = New Process()
|
||||
' ObjProcess.StartInfo.RedirectStandardOutput = True
|
||||
' ObjProcess.StartInfo.FileName = EjecutableUtilerias
|
||||
' ObjProcess.StartInfo.Verb = "runas"
|
||||
' ObjProcess.StartInfo.Arguments = $"{UsuarioActual.CveEmpresa} {Folder} 1 {fechai} {fechaf}"
|
||||
' ObjProcess.StartInfo.UseShellExecute = False
|
||||
' ObjProcess.StartInfo.WindowStyle = ProcessWindowStyle.Normal
|
||||
' ObjProcess.Start()
|
||||
' ObjProcess.WaitForExit()
|
||||
' ObjProcess.Close()
|
||||
'Catch ex As Exception
|
||||
' error1 = True
|
||||
' OnError("Ocurrió un error al ejecutar el actualizador.", ex)
|
||||
'End Try
|
||||
|
||||
'' ProcesaBuzon()
|
||||
|
||||
End Sub
|
||||
'End Sub
|
||||
|
||||
|
||||
'Private Sub ProcesaBuzon()
|
||||
@@ -4626,18 +4756,123 @@ End Class
|
||||
|
||||
|
||||
|
||||
Public Class GeneralesAPI
|
||||
Inherits ADSNetLibrary.Helpers.Conexiones.SIGAPI.BaseSIGAPI
|
||||
Public Class GeneralesAPIeFacturas
|
||||
|
||||
Inherits ADSNetLibraryzdE.HelpersE.ConexionesE.SIGAPIE.BaseSIGAPIeFacturas
|
||||
|
||||
Public Sub New(ByVal Optional domainApi As String = "http://localhost:4001/", ByVal Optional token As String = "")
|
||||
MyBase.New(domainApi, token)
|
||||
End Sub
|
||||
|
||||
Public Function GeneraSolicitud() As Object
|
||||
Return getData(Of Object)("GeneraSolicitud", Nothing, ADSNetLibrary.Helpers.Conexiones.SIGAPI.requestMethod.[GET], False)
|
||||
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)
|
||||
End Function
|
||||
|
||||
Public Function VerificaSolicitudesNominas() As Object
|
||||
Return getData(Of Object)("VerificaSolicitudesNominas", Nothing, ADSNetLibrary.Helpers.Conexiones.SIGAPI.requestMethod.[GET], False)
|
||||
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)
|
||||
End Function
|
||||
End Class
|
||||
|
||||
|
||||
Namespace ADSNetLibraryzdE.HelpersE.ConexionesE.SIGAPIE
|
||||
Public Enum requestMethod
|
||||
POST = 1
|
||||
[GET] = 2
|
||||
End Enum
|
||||
|
||||
Public Class BaseSIGAPIeFacturas
|
||||
Private Const tituloLog As String = "ADSNetLibrary.Helpers.Conexiones.SIGAPI"
|
||||
Public domainApi As String
|
||||
Public authorization As String
|
||||
Protected RouteController As String = ""
|
||||
Protected FullRoute As String = ""
|
||||
|
||||
Public Function GetRoutbyclass() As String
|
||||
Dim classname As String = Me.[GetType]().Name
|
||||
Return classname.Substring(0, classname.Length - 12)
|
||||
End Function
|
||||
|
||||
Public Function GetRoute(ByVal path As String) As String
|
||||
If String.IsNullOrEmpty(FullRoute) Then
|
||||
Return String.Format("api/{0}/{1}", (If(String.IsNullOrEmpty(RouteController), GetRoutbyclass(), RouteController)), path)
|
||||
Else
|
||||
Return String.Format("{0}{1}", FullRoute, path)
|
||||
End If
|
||||
End Function
|
||||
|
||||
Public Sub New(ByVal domainApi As String, ByVal Optional authorization As String = Nothing, ByVal Optional fullRoute As String = Nothing)
|
||||
If String.IsNullOrEmpty(domainApi) Then
|
||||
domainApi = "http://localhost:4001/"
|
||||
End If
|
||||
|
||||
Me.authorization = authorization
|
||||
Me.domainApi = domainApi
|
||||
Me.FullRoute = fullRoute
|
||||
End Sub
|
||||
|
||||
Public Async Function getDataAsync(Of T As {Class, New})(ByVal path As String, ByVal requestobject As Object, ByVal Optional reqmet As requestMethod = requestMethod.POST, ByVal Optional needauthorization As Boolean = True, ByVal Optional isfullpath As Boolean = False) As Task(Of T)
|
||||
Dim objreturn As T = Nothing
|
||||
|
||||
Using client As HttpClient = New HttpClient()
|
||||
client.BaseAddress = New Uri(domainApi)
|
||||
client.DefaultRequestHeaders.Accept.Add(New MediaTypeWithQualityHeaderValue("application/json"))
|
||||
|
||||
If needauthorization Then
|
||||
client.DefaultRequestHeaders.Authorization = New AuthenticationHeaderValue("Bearer", authorization)
|
||||
End If
|
||||
|
||||
client.Timeout = TimeSpan.FromMinutes(15)
|
||||
Dim response As HttpResponseMessage = New HttpResponseMessage()
|
||||
Dim strjsonreq = Newtonsoft.Json.JsonConvert.SerializeObject(requestobject)
|
||||
Dim content As StringContent = New StringContent(strjsonreq, Encoding.UTF8, "application/json")
|
||||
Dim route As String = If(isfullpath, path, GetRoute(path))
|
||||
|
||||
Try
|
||||
|
||||
Select Case reqmet
|
||||
Case requestMethod.POST
|
||||
response = Await client.PostAsync(route, content)
|
||||
Case requestMethod.[GET]
|
||||
response = Await client.GetAsync(route)
|
||||
End Select
|
||||
|
||||
If response.IsSuccessStatusCode Then
|
||||
Dim jsondata As String = Await response.Content.ReadAsStringAsync()
|
||||
Dim settings As Newtonsoft.Json.JsonSerializerSettings = New Newtonsoft.Json.JsonSerializerSettings With {
|
||||
.NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore,
|
||||
.MissingMemberHandling = Newtonsoft.Json.MissingMemberHandling.Ignore
|
||||
}
|
||||
objreturn = Newtonsoft.Json.JsonConvert.DeserializeObject(Of T)(jsondata, settings)
|
||||
Else
|
||||
End If
|
||||
|
||||
Catch e As Exception
|
||||
End Try
|
||||
End Using
|
||||
|
||||
Return objreturn
|
||||
End Function
|
||||
|
||||
Public Function getData(Of T As {Class, New})(ByVal path As String, ByVal requestobject As Object, ByVal Optional reqmet As requestMethod = requestMethod.POST, ByVal Optional needauthorization As Boolean = True, ByVal Optional isfullpath As Boolean = False) As T
|
||||
Return AsyncHelper.RunSync(Of T)(Function() getDataAsync(Of T)(path, requestobject, reqmet, needauthorization, isfullpath))
|
||||
End Function
|
||||
End Class
|
||||
|
||||
Friend Module AsyncHelper
|
||||
Private ReadOnly _myTaskFactory As TaskFactory = New TaskFactory(CancellationToken.None, TaskCreationOptions.None, TaskContinuationOptions.None, TaskScheduler.[Default])
|
||||
|
||||
Function RunSync(Of TResult)(ByVal func As Func(Of Task(Of TResult))) As TResult
|
||||
|
||||
'Return AsyncHelper._myTaskFactory.StartNew(Of Task(Of TResult))(func).Unwrap(Of TResult)().GetAwaiter().GetResult()
|
||||
Return AsyncHelper._myTaskFactory.StartNew(Of Task(Of TResult))(func).Unwrap().GetAwaiter().GetResult()
|
||||
|
||||
|
||||
|
||||
End Function
|
||||
|
||||
Sub RunSync(ByVal func As Func(Of Task))
|
||||
AsyncHelper._myTaskFactory.StartNew(Of Task)(func).Unwrap().GetAwaiter().GetResult()
|
||||
End Sub
|
||||
End Module
|
||||
End Namespace
|
||||
|
||||
|
||||
@@ -562,7 +562,7 @@
|
||||
<asp:TemplateField >
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LnkEdit" runat="server" AlternateText="Actualizar" CausesValidation="True" CommandName="Update" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-pencil'></i>" />
|
||||
<asp:LinkButton ID="LnkGvPrePolizaEliminar" OnClick="LnkGvPrePolizaEliminar_Click" runat="server" AlternateText="Eliminar" CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>"
|
||||
<asp:LinkButton ID="LnkEliminar" OnClick="LnkGvPrePolizaEliminar_Click" runat="server" AlternateText="Eliminar" CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>"
|
||||
data-toggle="confirmation" data-popout="true" data-original-title="Confirmar" data-btn-ok-label="si" />
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="120px" />
|
||||
|
||||
@@ -999,9 +999,12 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
'End If
|
||||
|
||||
'Registra movimieno bancario
|
||||
If gvr.DataKey("CveConceptoContable").ToEntero = 30 AndAlso gvr.DataKey("ContadoImporte").ToDecimal <> 0 Then
|
||||
If gvr.DataKey("CveConceptoContable").ToEntero = 30 AndAlso (gvr.DataKey("ContadoImporte").ToDecimal <> 0 OrElse TipoGrid = 1) Then
|
||||
Dim tFolio As String = gvr.DataKey("ContadoNumeroFolio").ToString
|
||||
If tFolio.ToEntero = 0 Then tFolio = SiguienteFolioBancos(gvr.DataKey("ContadoCuenta").ToEntero, gvr.DataKey("ContadoTipoTransaccion").ToEntero)
|
||||
|
||||
CveIE = ObjIE.AddBancos_IE(gvr.DataKey("ContadoCuenta").ToEntero, gvr.DataKey("ContadoTipoTransaccion").ToEntero, TxtFechaDocumento.Text, gvr.DataKey("ContadoNumeroFolio"),
|
||||
|
||||
CveIE = ObjIE.AddBancos_IE(gvr.DataKey("ContadoCuenta").ToEntero, gvr.DataKey("ContadoTipoTransaccion").ToEntero, TxtFechaDocumento.Text, tFolio,
|
||||
gvr.DataKey("ContadoBeneficiario"), gvr.DataKey("ContadoImporte").ToDecimal, CveMoneda, 0, gvr.DataKey("ContadoObservaciones"), "",
|
||||
False, False, 0, CvePrePolizaInsertada, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||
If CveIE < 0 Then
|
||||
@@ -1063,7 +1066,7 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
If idCuentaContabilizacion = 1 AndAlso (IdCtaContable = 0) Then
|
||||
idCuentaContabilizacion = 0
|
||||
End If
|
||||
If Importe <> 0 Then
|
||||
If Importe <> 0 OrElse TipoGrid = 1 Then 'si es diferente de cero o si viene de grid prepolizas, que registre todo
|
||||
Dim tCveCuenta As Integer = gvr.DataKey("CveCuenta").ToEntero
|
||||
Dim tReferencia, tConcepto As String
|
||||
Dim tCveSubProyecto, tCveTipoGasto As Integer
|
||||
@@ -1490,6 +1493,8 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
End If
|
||||
|
||||
If AplicaBancos AndAlso Not AplicaComplementaria Then
|
||||
TxtCargoE.AutoPostBack = True
|
||||
TxtAbonoE.AutoPostBack = True
|
||||
CargaModalConceptoTipoTransaccion("Egs")
|
||||
'DivModalConceptoAncho.Attributes.Add("style", "width:1000px")
|
||||
DvMoldalConceptoSeccion1.Attributes.Add("class", "col-md-6")
|
||||
@@ -1500,6 +1505,8 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
DvMoldalConceptoSeccion1.Attributes.Add("class", "col-md-12")
|
||||
RegistraScript("$('#DivModalConceptoAncho').attr('style','width:450px');")
|
||||
DvMoldalConceptoSeccion2.Visible = False
|
||||
TxtCargoE.AutoPostBack = False
|
||||
TxtAbonoE.AutoPostBack = False
|
||||
End If
|
||||
|
||||
If AplicaTC Then
|
||||
@@ -2932,11 +2939,12 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
|
||||
End If
|
||||
|
||||
|
||||
If gvr.DataKey("CveConceptoContable").ToEntero = 30 Then
|
||||
|
||||
Dim tFolio As String = gvr.DataKey("ContadoNumeroFolio").ToString
|
||||
If tFolio.ToEntero = 0 Then tFolio = SiguienteFolioBancos(gvr.DataKey("ContadoCuenta").ToEntero, gvr.DataKey("ContadoTipoTransaccion").ToEntero)
|
||||
|
||||
CveIE = ObjIE.AddBancos_IE(gvr.DataKey("ContadoCuenta").ToEntero, gvr.DataKey("ContadoTipoTransaccion").ToEntero, TxtFechaDocumento.Text, gvr.DataKey("ContadoNumeroFolio").ToString,
|
||||
CveIE = ObjIE.AddBancos_IE(gvr.DataKey("ContadoCuenta").ToEntero, gvr.DataKey("ContadoTipoTransaccion").ToEntero, TxtFechaDocumento.Text, tFolio,
|
||||
gvr.DataKey("ContadoBeneficiario").ToString, Importe, CveMoneda, 0, gvr.DataKey("ContadoObservaciones").ToString, "",
|
||||
False, False, 0, CvePrePoliza, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||
FolioIE = gvr.DataKey("ContadoNumeroFolio").ToString
|
||||
@@ -2947,9 +2955,6 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
If gvr.DataKey("CveConceptoContable").ToEntero <> 30 Then
|
||||
|
||||
If gvr.DataKey("CveConceptoContable").ToEntero = 41 Then
|
||||
@@ -2960,15 +2965,12 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
|
||||
End If
|
||||
|
||||
|
||||
If idCuentaContabilizacion = 1 AndAlso (IdCtaContable = 0) Then
|
||||
idCuentaContabilizacion = 0
|
||||
End If
|
||||
If Importe <> 0 Then
|
||||
Dim tCveCuenta As Integer = gvr.DataKey("CveCuenta").ToEntero
|
||||
|
||||
|
||||
|
||||
If ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovto, Importe, gvr.DataKey("Referencia"), gvr.DataKey("CveConceptoContable").ToEntero, gvr.DataKey("Concepto"),
|
||||
TxtFechaDocumento.Text.ToDate, IdCtaContable, -1, CveSubProyecto:=gvr.DataKey("CveSubProyecto").ToEntero, CveIE:=CveIE,
|
||||
CveProveedor:=gvr.DataKey("CveProveedor").ToEntero, CveCompra:=gvr.DataKey("CveCompra").ToEntero,
|
||||
@@ -2976,7 +2978,6 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
ImporteMX:=Importe, ImporteME:=ImporteME, TipoCambio:=TipoCambio, CveTipoGasto:=gvr.DataKey("CveTipoGasto").ToEntero,
|
||||
CveCliente:=gvr.DataKey("CveCliente").ToEntero, CveVenta:=gvr.DataKey("CveVenta").ToEntero, CveCuenta:=tCveCuenta) Then
|
||||
|
||||
|
||||
Else
|
||||
MsgError = "No se pudo insertar el detalle de la póliza2"
|
||||
Exit For
|
||||
@@ -3008,11 +3009,8 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
|
||||
If MsgError = "" Then
|
||||
|
||||
|
||||
Alert(If(MensajeAlert.ToString = "", $"Se registro con exito. {If(FolioPoliza > 0, " Folio " & FolioPoliza & ".", "")}", $"Se registro con exito. {If(FolioPoliza > 0, " Folio " & FolioPoliza & ".", "")} <br>" & MensajeAlert.ToString), TipoMensaje.MsgInformacion, $"window.location.href=""./RegPrePolizaS.aspx?CvePrePoliza={CvePrePoliza}""")
|
||||
|
||||
|
||||
|
||||
ObjIE.Commit()
|
||||
If Conta IsNot Nothing Then Conta.Commit()
|
||||
|
||||
@@ -3045,6 +3043,11 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
GvPrePoliza.DataSource = DtMovimientos
|
||||
GvPrePoliza.DataBind()
|
||||
|
||||
TxtTotalCargos.Text = DtMovimientos.SUMD("Cargo").ToString.FormatoNumero
|
||||
TxtTotalAbonos.Text = DtMovimientos.SUMD("Abono").ToString.FormatoNumero
|
||||
UpTotalCargo.Update()
|
||||
UpTotalAbono.Update()
|
||||
|
||||
UpPrePoliza.Update()
|
||||
End Sub
|
||||
|
||||
@@ -3069,20 +3072,15 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
DdlModalConceptoCuenta.DataBind()
|
||||
DdlModalConceptoCuenta.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
Private Sub BtnDescontabilizar_Click(sender As Object, e As EventArgs) Handles BtnDescontabilizar.Click
|
||||
|
||||
Dim ObjConta As New ClsContabilidad
|
||||
|
||||
|
||||
If ObjConta.ContabilizaDesContabilizaPrePoliza(CvePrePoliza, False, UsuarioActual.CveEmpresa) Then
|
||||
|
||||
Alert("Descontabilizado Correctamente.", TipoMensaje.MsgInformacion)
|
||||
@@ -3118,5 +3116,13 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
|
||||
Venta.Dispose()
|
||||
End Sub
|
||||
|
||||
Private Sub TxtCargoE_TextChanged(sender As Object, e As EventArgs) Handles TxtCargoE.TextChanged
|
||||
If TxtCargoE.Text.ToDecimal <> 0 Then CargaModalConceptoTipoTransaccion("Ing")
|
||||
End Sub
|
||||
|
||||
Private Sub TxtAbonoE_TextChanged(sender As Object, e As EventArgs) Handles TxtAbonoE.TextChanged
|
||||
If TxtAbonoE.Text.ToDecimal <> 0 Then CargaModalConceptoTipoTransaccion("Egs")
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
|
||||
@@ -331,12 +331,14 @@
|
||||
<div class="row">
|
||||
<div class="col-md-6" runat="server" id="DVCartera" visible="false">
|
||||
|
||||
<asp:GridView ID="GvCartera" runat="server" AutoGenerateColumns="False" Width="100%" EmptyDataText="No se encontraron datos" ToolTip="Listado de Ventas" CssClass="ScrollAD table table-striped table-hover Widthall" GridLines="None">
|
||||
<asp:GridView ID="GvCartera" runat="server" AutoGenerateColumns="False" Width="460px" EmptyDataText="No se encontraron datos" ToolTip="Listado de Ventas" CssClass=" table table-striped table-hover Widthall"
|
||||
DataKeyNames="Rango"
|
||||
GridLines="None">
|
||||
<Columns>
|
||||
<asp:BoundField HeaderText="Rango Días" DataField="Rango" />
|
||||
<asp:BoundField HeaderText="Importe" DataField="Saldo" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="%" DataField="Porcentaje" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="Objetivo" DataField="Objetivo" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="Rango Días" DataField="Rango" ItemStyle-Width="80px" />
|
||||
<asp:BoundField HeaderText="Importe" DataField="Saldo" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="150px" />
|
||||
<asp:BoundField HeaderText="%" DataField="Porcentaje" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="80px" />
|
||||
<asp:BoundField HeaderText="Objetivo" DataField="Objetivo" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="80px" />
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</div>
|
||||
|
||||
@@ -236,7 +236,7 @@ Partial Class RepCxCDetalle
|
||||
CargaAsignarCobranza()
|
||||
TxtFechaCobranza.Text = Now.ToShortDateString
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso UsuarioActual.CveRol = 1 Then
|
||||
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
|
||||
DVCartera.Visible = True
|
||||
End If
|
||||
|
||||
@@ -1068,9 +1068,17 @@ Partial Class RepCxCDetalle
|
||||
DdlClientesWS.DataBind()
|
||||
DdlClientesWS.ddl.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub GvCartera_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvCartera.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
If e.Row.DataKey("Rango") = "Total" Then
|
||||
e.Row.Font.Bold = True
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
End Class
|
||||
|
||||
@@ -1966,7 +1966,7 @@ Lugar de expedición: 83220 Hermosillo</Value>
|
||||
<DataSetName>DsOC</DataSetName>
|
||||
<Top>9.86624cm</Top>
|
||||
<Left>0.15979cm</Left>
|
||||
<Height>1.71208cm</Height>
|
||||
<Height>1.71209cm</Height>
|
||||
<Width>19.89025cm</Width>
|
||||
<ZIndex>3</ZIndex>
|
||||
<Style>
|
||||
@@ -2858,7 +2858,7 @@ Lugar de expedición: 83220 Hermosillo</Value>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>Versión del comprobante: 3.3</Value>
|
||||
<Value>Versión del comprobante: 4.0</Value>
|
||||
<Style>
|
||||
<FontFamily>calibri</FontFamily>
|
||||
<FontSize>9pt</FontSize>
|
||||
@@ -2929,7 +2929,7 @@ Lugar de expedición: 83220 Hermosillo</Value>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>Usos del CFDI "P01"(Por definir)</Value>
|
||||
<Value>Usos del CFDI "CN01" Nómina</Value>
|
||||
<Style>
|
||||
<FontFamily>calibri</FontFamily>
|
||||
<FontSize>9pt</FontSize>
|
||||
@@ -4462,7 +4462,7 @@ Lugar de expedición: 83220 Hermosillo</Value>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>=Parameters!MetodoPago.Value</Value>
|
||||
<Value>PUE</Value>
|
||||
<Style>
|
||||
<FontFamily>Calibri</FontFamily>
|
||||
<FontSize>7pt</FontSize>
|
||||
@@ -4641,14 +4641,14 @@ Lugar de expedición: 83220 Hermosillo</Value>
|
||||
<TablixCell />
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
<Textbox Name="Textbox144">
|
||||
<Textbox Name="Textbox5">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>Forma de Pago</Value>
|
||||
<Value />
|
||||
<Style>
|
||||
<FontFamily>arial</FontFamily>
|
||||
<FontSize>7pt</FontSize>
|
||||
@@ -4659,7 +4659,7 @@ Lugar de expedición: 83220 Hermosillo</Value>
|
||||
<Style />
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox119</rd:DefaultName>
|
||||
<rd:DefaultName>Textbox5</rd:DefaultName>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
@@ -4674,14 +4674,14 @@ Lugar de expedición: 83220 Hermosillo</Value>
|
||||
</TablixCell>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
<Textbox Name="Textbox145">
|
||||
<Textbox Name="Textbox7">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>=Parameters!FormaPago.Value</Value>
|
||||
<Value />
|
||||
<Style>
|
||||
<FontFamily>Calibri</FontFamily>
|
||||
<FontSize>7pt</FontSize>
|
||||
@@ -4692,7 +4692,7 @@ Lugar de expedición: 83220 Hermosillo</Value>
|
||||
<Style />
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox121</rd:DefaultName>
|
||||
<rd:DefaultName>Textbox7</rd:DefaultName>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
@@ -4704,6 +4704,7 @@ Lugar de expedición: 83220 Hermosillo</Value>
|
||||
</Style>
|
||||
</Textbox>
|
||||
<ColSpan>2</ColSpan>
|
||||
<rd:Selected>true</rd:Selected>
|
||||
</CellContents>
|
||||
</TablixCell>
|
||||
<TablixCell />
|
||||
@@ -5285,7 +5286,7 @@ Lugar de expedición: 83220 Hermosillo</Value>
|
||||
<Top>2.51578cm</Top>
|
||||
<Left>0.15979cm</Left>
|
||||
<Height>5.0304cm</Height>
|
||||
<Width>19.84967cm</Width>
|
||||
<Width>19.84968cm</Width>
|
||||
<ZIndex>9</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
|
||||
@@ -2879,7 +2879,7 @@
|
||||
</Style>
|
||||
</TextRun>
|
||||
<TextRun>
|
||||
<Value> pagos:@bdhbaterias.com</Value>
|
||||
<Value> pagos@bdhbaterias.com</Value>
|
||||
<Style>
|
||||
<FontSize>8pt</FontSize>
|
||||
</Style>
|
||||
|
||||
135
Inicio.aspx
135
Inicio.aspx
@@ -1480,6 +1480,141 @@
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="DVModalPSPorCaducar" class="modal ADS fade" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
|
||||
<!-- Modal content-->
|
||||
<div class="modal-content" style="width: 900px;">
|
||||
<div class="modal-header ">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">Productos Próximos a caducar</h4>
|
||||
</div>
|
||||
|
||||
<div class="modal-body">
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12" style="text-align: right">
|
||||
<input type="text" id="TxtBusquedaPsCaducar" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusquedaPsCaducar','{0}')", GvModalPSPorCaducar.ClientID) %>" style="display: inline-block; width: 150px;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusquedaPsCaducar','{0}')", GvModalPSPorCaducar.ClientID) %>" style="margin-top: -3px; margin-left: -13px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<asp:GridView ID="GvModalPSPorCaducar" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron Registros" ToolTip="Reporte de productos caducidad " CssClass="table table-striped table-advance table-hover Widthall ScrollAD mysmallbtn" data-sort="true" GridLines="None">
|
||||
<Columns>
|
||||
<asp:BoundField HeaderText="Almacén" DataField="Almacen" ItemStyle-Width="160px" />
|
||||
<asp:BoundField HeaderText="Cantidad" DataField="Cantidad" DataFormatString="{0:#,###.##}" ItemStyle-Width="80px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="Producto" DataField="CodigoPS" />
|
||||
<asp:BoundField HeaderText="Lote" DataField="Lote" ItemStyle-Width="150px" />
|
||||
<asp:BoundField HeaderText="Fecha Caducidad" DataField="FechaCaducidad" DataFormatString="{0:dd/MM/yyyy}" ItemStyle-Width="90px" />
|
||||
<asp:TemplateField ItemStyle-Width="90px" ItemStyle-HorizontalAlign="Right" HeaderText="Días de Cad." Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LblTiempoCaducidad" runat="server" Text='<%# Eval("TiempoCaducidad", "{0:N0}")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="modal-footer">
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
<button type="button" class="btn btn-danger" data-dismiss="modal">Cancelar</button>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div id="DVModalRSCOPorCaducar" class="modal ADS fade" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
|
||||
<!-- Modal content-->
|
||||
<div class="modal-content" style="width: 900px;">
|
||||
<div class="modal-header ">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">Productos RSCO Próximos a Vencer</h4>
|
||||
</div>
|
||||
|
||||
<div class="modal-body">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="col-md-12" style="text-align: right">
|
||||
<input type="text" id="TxtBusquedaRSCOCaducar" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusquedaRSCOCaducar','{0}')", GvModalRSCOPorCaducar.ClientID) %>" style="display: inline-block; width: 150px;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusquedaRSCOCaducar','{0}')", GvModalRSCOPorCaducar.ClientID) %>" style="margin-top: -3px; margin-left: -13px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<asp:GridView ID="GvModalRSCOPorCaducar" runat="server" AutoGenerateColumns="False"
|
||||
DataKeyNames="CvePS,CveCompuesto,CveProveedorCompra,RegistroRSCO,FechaVigenciaRSCOStr,VigenciaIndeterminadaRSCO,CveUsuario"
|
||||
EmptyDataText="No se Encontraron Registros" ToolTip="Listado de Unidades" CssClass="table table-striped table-advance table-hover Widthall ScrollAD mysmallbtn" data-sort="true" Style="width: 100%" GridLines="None">
|
||||
<Columns>
|
||||
<asp:BoundField HeaderText="Proveedor" DataField="NombreComercial" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="Producto" DataField="CodigoPS" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="Compuesto" DataField="Compuesto" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="Registro RSCO" DataField="RegistroRSCO" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="Fecha. Vigencia" ItemStyle-HorizontalAlign="Center" DataField="FechaVigenciaRSCOStr" ItemStyle-Width="5%" />
|
||||
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal-footer">
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
<button type="button" class="btn btn-danger" data-dismiss="modal">Cancelar</button>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="JS" runat="Server">
|
||||
|
||||
|
||||
@@ -205,6 +205,11 @@ Partial Class Inicio
|
||||
If UsuarioActual.TienePermisoProceso(271) Then MuestraVentasPUE()
|
||||
If UsuarioActual.TienePermisoProceso(270) Then MuestraComprasPUE()
|
||||
|
||||
|
||||
If UsuarioActual.TienePermisoProceso(343) Then MuestraPsProximosAVencer()
|
||||
If UsuarioActual.TienePermisoProceso(344) Then MuestraRSCOProximosAVencer()
|
||||
|
||||
|
||||
Dim EsDEV = Not UsuarioActual.Empresa.FacturaProduccion
|
||||
If Not EsDEV Then
|
||||
If UsuarioActual.CveUsuario.Contiene(93, 1425, 2, 1606, 1472, 100, 1918) Then MuestraInconsistencias() '100
|
||||
@@ -329,6 +334,49 @@ Partial Class Inicio
|
||||
GvVentasEmail.DataBind()
|
||||
End Sub
|
||||
|
||||
Private Sub MuestraPsProximosAVencer()
|
||||
|
||||
Dim ObjInventarios = New ClsInventarios
|
||||
If ObjInventarios.GetProductosCaducidad(-1, MinFecha, Now.AddDays(30), -1, -1, -1, "-1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, Opcion:=2, CveCompuesto:=-1) Then
|
||||
|
||||
If ObjInventarios.DtResultados.Rows.Count > 0 Then
|
||||
GvModalPSPorCaducar.DataSource = ObjInventarios.DtResultados
|
||||
RegistraScript("$('#DVModalPSPorCaducar').modal('show');")
|
||||
Else
|
||||
GvModalPSPorCaducar.DataSource = Nothing
|
||||
End If
|
||||
|
||||
Else
|
||||
GvModalPSPorCaducar.DataSource = Nothing
|
||||
End If
|
||||
|
||||
ObjInventarios.Dispose()
|
||||
GvModalPSPorCaducar.DataBind()
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub MuestraRSCOProximosAVencer()
|
||||
|
||||
Dim ObjInventarios As New ClsInventarios
|
||||
|
||||
If ObjInventarios.RepCompuestosVigencia(-1, -1, MinFecha, Now.AddDays(30), 1, UsuarioActual.CveEmpresa, True) Then
|
||||
|
||||
If ObjInventarios.DtResultados.Rows.Count > 0 Then
|
||||
GvModalRSCOPorCaducar.DataSource = ObjInventarios.DtResultados
|
||||
RegistraScript("$('#DVModalRSCOPorCaducar').modal('show');")
|
||||
Else
|
||||
GvModalRSCOPorCaducar.DataSource = Nothing
|
||||
End If
|
||||
|
||||
Else
|
||||
GvModalRSCOPorCaducar.DataSource = Nothing
|
||||
End If
|
||||
|
||||
ObjInventarios.Dispose()
|
||||
GvModalRSCOPorCaducar.DataBind()
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub CargaSubProyectos()
|
||||
DdlSubproyectos.DataSource = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa)
|
||||
DdlSubproyectos.DataBind()
|
||||
|
||||
@@ -374,6 +374,7 @@ Partial Class Inventarios_RecepcionUsados
|
||||
EsConsumoInterno = False
|
||||
Correo = ""
|
||||
FolioCorreo = ""
|
||||
DdlClientes.ddlWS.Attributes.Add("data-coltexto", "CodigoNombre")
|
||||
|
||||
If IfNull(Request("Opc"), "").ToString = "S" Then
|
||||
RBLOpcion.SelectedValue = "3"
|
||||
|
||||
@@ -82,7 +82,8 @@
|
||||
</div>
|
||||
<label class="col-md-1">Almacen</label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlAlmacen" runat="server" CssClass="form-control input-sm select2me" DataTextField="Almacen" DataValueField="CveAlmacen"></asp:DropDownList>
|
||||
<%--<asp:DropDownList ID="DdlAlmacen" runat="server" CssClass="form-control input-sm select2me" DataTextField="Almacen" DataValueField="CveAlmacen"></asp:DropDownList>--%>
|
||||
<asp:ListBox ID="DdlAlmacen" SelectionMode="Multiple" CssClass="form-control ddlFiltros input-sm select2me Widthall" DataTextField="Almacen" DataValueField="CveAlmacen" Style="width: 100%;" runat="server"></asp:ListBox>
|
||||
</div>
|
||||
<label class="col-md-1">Moneda:</label>
|
||||
<div class="col-md-2">
|
||||
|
||||
@@ -125,19 +125,32 @@ Partial Class Inventarios_RepExistenciasCostos
|
||||
DdlProductows.Visible = False
|
||||
End If
|
||||
|
||||
DdlAlmacen.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
'DdlAlmacen.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
|
||||
DdlAlmacen.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1)
|
||||
'DdlAlmacen.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1)
|
||||
'DdlAlmacen.DataBind()
|
||||
'DdlAlmacen.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
'DdlAlmacen.SelectedValueExist(UsuarioActual.CveAlmacen)
|
||||
|
||||
'If Not IsNothing(Request("CveAlmacen")) Then
|
||||
' If DdlAlmacen.Items.FindByValue(Request("CveAlmacen").ToString) Is Nothing Then
|
||||
' Dim CveAlmacen = Request("CveAlmacen").ToString
|
||||
' Dim Almacen As String = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltraParametros($"CveAlmacen = {Request("CveAlmacen").ToString}").Rows(0)("Almacen").ToString
|
||||
' DdlAlmacen.Items.Insert(0, New ListItem(Almacen, CveAlmacen))
|
||||
' End If
|
||||
'End If
|
||||
|
||||
DdlAlmacen.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1).FiltraParametros("") 'GlobalDTAlmacen(UsuarioActual.CveEmpresa)
|
||||
DdlAlmacen.DataBind()
|
||||
DdlAlmacen.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
DdlAlmacen.SelectedValueExist(UsuarioActual.CveAlmacen)
|
||||
|
||||
If Not IsNothing(Request("CveAlmacen")) Then
|
||||
If DdlAlmacen.Items.FindByValue(Request("CveAlmacen").ToString) Is Nothing Then
|
||||
Dim CveAlmacen = Request("CveAlmacen").ToString
|
||||
Dim Almacen As String = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltraParametros($"CveAlmacen = {Request("CveAlmacen").ToString}").Rows(0)("Almacen").ToString
|
||||
Dim Almacen As String = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Almacen", $"CveAlmacen = {Request("CveAlmacen").ToString}")
|
||||
DdlAlmacen.Items.Insert(0, New ListItem(Almacen, CveAlmacen))
|
||||
End If
|
||||
Else
|
||||
DdlAlmacen.SelectedValuesIfExistM("-1")
|
||||
End If
|
||||
|
||||
ddlProducto.Items.Insert(0, New ListItem("----", "-1"))
|
||||
@@ -169,21 +182,23 @@ Partial Class Inventarios_RepExistenciasCostos
|
||||
Dim CveMoneda As Integer = DdlMoneda.SelectedValue.ToEntero
|
||||
Dim CveConcepto As Integer = DdlTipoMovimiento.SelectedValue.ToEntero
|
||||
Dim CvePS As Integer = If(HFProducto.Value.ToEntero > 0, HFProducto.Value.ToEntero, -1)
|
||||
Dim CveAlmacen As Integer = DdlAlmacen.SelectedValue.ToEntero
|
||||
'Dim CveAlmacen As Integer = DdlAlmacen.SelectedValue.ToEntero
|
||||
Dim CveClasificacion As Integer = DdlClasificacion.SelectedValue.ToEntero
|
||||
|
||||
Dim CveAlmacen As String = If(DdlAlmacen.GetSelectedValuesM = "", "-1", DdlAlmacen.GetSelectedValuesM)
|
||||
|
||||
Dim fechaI As Date = If(TxtFechaI.Text <> "", TxtFechaI.Text.ToDateTime, MinFecha)
|
||||
Dim fechaF As Date = If(TxtFechaF.Text <> "", TxtFechaF.Text.ToDateTime, MaxFecha)
|
||||
CargaDatos(CvePS, CveProveedor, CveMoneda, CveConcepto, fechaI, fechaF, CveAlmacen, CveClasificacion, DdlPersonal.SelectedValue.ToEntero, DdlMovs.SelectedValue.ToEntero)
|
||||
End Sub
|
||||
|
||||
Protected Sub CargaDatos(CvePS As Integer, CveProveedor As Integer, CveMoneda As Integer, CveConcepto As Integer, FechaI As Date, FechaF As Date, CveAlmacen As String, CveClasificacion As Integer, CvePersonal As Integer, Tipo As Integer)
|
||||
|
||||
If CvePS > 0 Then
|
||||
LnkKardex.Visible = True
|
||||
LnkKardex.NavigateUrl = String.Format("/Inventarios/Kardex.aspx?CvePS={0}", CvePS)
|
||||
End If
|
||||
|
||||
|
||||
Dim ObjInventarios As New ClsInventarios
|
||||
If ObjInventarios.RepExistenciasCostos(FechaI, FechaF, CveMoneda, CveProveedor, CveConcepto, CvePS, UsuarioActual.CveEmpresa, CveAlmacen, UsuarioActual.CveUsuario, CveClasificacion, CvePersonal, Tipo) Then
|
||||
DtData = ObjInventarios.DtResultados
|
||||
|
||||
@@ -1024,7 +1024,7 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
Dim FolioVirtualEntrada As Integer = 0
|
||||
Dim FolioVirtualSalida As Integer = 0
|
||||
Dim FolioEntrada As Integer = 0
|
||||
Dim Fecha As Date = TxtFecha.Text.ToDate
|
||||
Dim Fecha As DateTime = TxtFecha.Text.ToDate
|
||||
Dim ErrorMovInv As Boolean = False
|
||||
Dim ErrorAC As Boolean = False
|
||||
Dim TextoError = ""
|
||||
@@ -1120,7 +1120,7 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
End If
|
||||
|
||||
'VIRTUAL SALIDA/ENTRADA
|
||||
If RealizarMovimientoVirtual AndAlso CveAlmacenVirtualSalida > 0 AndAlso Not ErrorMovInv Then
|
||||
If RealizarMovimientoVirtual AndAlso CveMovimientoSalida > 0 AndAlso Not ErrorMovInv Then
|
||||
|
||||
Dim dtvirtual As DataTable = Nothing
|
||||
|
||||
@@ -1129,7 +1129,7 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
dtvirtual = ObjInventario.DtResultados
|
||||
|
||||
If dtvirtual.Rows.Count > 0 Then
|
||||
CveMovimientoVirtualSalida = ObjInventario.AddMovimiento(CveAlmacenVirtualSalida, 37, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, Observaciones:=TxtObservaciones.Text.Trim, Modulo:="TA/V", CveMovimientoRelacionado:=CveMovimientoSalida, CveAlmacenDestino:=CveAlmacenVirtualEntrada)
|
||||
CveMovimientoVirtualSalida = ObjInventario.AddMovimiento(CveAlmacenVirtualSalida, 37, 1, Fecha, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, Observaciones:=TxtObservaciones.Text.Trim, Modulo:="TA/V", CveMovimientoRelacionado:=CveMovimientoSalida, CveAlmacenDestino:=CveAlmacenVirtualEntrada)
|
||||
FolioVirtualSalida = ObjInventario.Folio
|
||||
Dim Contabilizable As Boolean = False
|
||||
Dim Concepto As String = TxtObservaciones.Text
|
||||
@@ -1150,7 +1150,7 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
|
||||
'SALIDA VIRTUAL
|
||||
Dim importevirtual As Decimal = 0
|
||||
CveMovimientoVirtualEntrada = ObjInventario.AddMovimiento(CveAlmacenVirtualSalida, 36, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, Observaciones:=TxtObservaciones.Text.Trim, Modulo:="TA/S3", CveMovimientoRelacionado:=CveMovimientoEntrada, CveAlmacenDestino:=CveAlmacenVirtualEntrada)
|
||||
CveMovimientoVirtualEntrada = ObjInventario.AddMovimiento(CveAlmacenVirtualSalida, 36, 1, Fecha, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, Observaciones:=TxtObservaciones.Text.Trim, Modulo:="TA/S3", CveMovimientoRelacionado:=CveMovimientoEntrada, CveAlmacenDestino:=CveAlmacenVirtualEntrada)
|
||||
FolioVirtualEntrada = ObjInventario.Folio
|
||||
If CveMovimientoVirtualEntrada > 0 Then
|
||||
Dim DtCostosVirtual As DataTable
|
||||
@@ -2182,9 +2182,10 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
Dim FolioVirtualEntrada, FolioVirtualSalida As Integer
|
||||
If RealizarMovimientoVirtual AndAlso Not ErrorMovInv Then
|
||||
|
||||
Dim CveAlmacenVirtual As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa, CveAlmacen:=CveAlmacenEntrada).FiltroPrimeroValor("CveAlmacenVirtual", "").ToEntero()
|
||||
Dim CveAlmacenVirtualSalida As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa, CveAlmacen:=CveAlmacenEntrada).FiltroPrimeroValor("CveAlmacenVirtual", "").ToEntero()
|
||||
Dim CveAlmacenVirtualEntrada As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa, CveAlmacen:=CveAlmacenSalida).FiltroPrimeroValor("CveAlmacenVirtual", "").ToEntero()
|
||||
|
||||
If CveAlmacenVirtual > 0 Then
|
||||
If CveAlmacenVirtualSalida > 0 Then
|
||||
|
||||
Dim dtvirtual As DataTable = Nothing
|
||||
|
||||
@@ -2192,7 +2193,7 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
dtvirtual = ObjInventario.DtResultados
|
||||
If dtvirtual.Rows.Count > 0 Then
|
||||
|
||||
CveMovimientoVirtualSalida = ObjInventario.AddMovimiento(CveAlmacenVirtual, 37, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, Observaciones:=TxtObservaciones.Text.Trim, CveMovimientoRelacionado:=CveMovimientoSalidaTransitorio, Modulo:="TA/S22")
|
||||
CveMovimientoVirtualSalida = ObjInventario.AddMovimiento(CveAlmacenVirtualSalida, 37, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, Observaciones:=TxtObservaciones.Text.Trim, CveMovimientoRelacionado:=CveMovimientoSalidaTransitorio, Modulo:="TA/S22")
|
||||
FolioVirtualSalida = ObjInventario.Folio
|
||||
For Each RowVirtual As DataRow In dtvirtual.Rows
|
||||
Dim CvePS = RowVirtual("CvePS").ToString().ToEntero()
|
||||
@@ -2212,7 +2213,7 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
Dim CvePrePoliza As Integer = ObjConta.AddPrePolizas("Inventario/TA22", 53, 0, 0, 1, Fecha, Concepto, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||
If ObjInventario.GetMovimientosDetalle(CveMovimientoVirtualSalida, UsuarioActual.CveEmpresa) Then
|
||||
Dim resultado As DataTable = ObjInventario.DtResultados
|
||||
CveMovimientoVirtualEntrada = ObjInventario.AddMovimiento(CveAlmacenVirtual, 36, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, Observaciones:=TxtObservaciones.Text.Trim, CveMovimientoRelacionado:=CveMovimientoEntrada, Modulo:="TA/S23")
|
||||
CveMovimientoVirtualEntrada = ObjInventario.AddMovimiento(CveAlmacenVirtualEntrada, 36, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, Observaciones:=TxtObservaciones.Text.Trim, CveMovimientoRelacionado:=CveMovimientoEntrada, Modulo:="TA/S23")
|
||||
FolioVirtualEntrada = ObjInventario.Folio
|
||||
|
||||
For Each RowVirtual As DataRow In resultado.Rows
|
||||
|
||||
680
SAT/SolicitudesIngresoSat.aspx
Normal file
680
SAT/SolicitudesIngresoSat.aspx
Normal file
@@ -0,0 +1,680 @@
|
||||
<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="SolicitudesIngresoSat.aspx.cs" Inherits="SAT_SolicitudesIngresoSat" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
<style>
|
||||
.dashboard-stat .visual > i {
|
||||
font-size: 90px;
|
||||
}
|
||||
|
||||
.dashboard-stat .visual > i {
|
||||
opacity: 0.1;
|
||||
filter: alpha(opacity=10);
|
||||
}
|
||||
|
||||
.dashboard-stat.SigData {
|
||||
color: #FFFFFF;
|
||||
background-color: #3598dc;
|
||||
}
|
||||
|
||||
.dashboard-stat.XMLData {
|
||||
color: #FFFFFF;
|
||||
background-color: #900;
|
||||
}
|
||||
|
||||
.dashboard-stat.SigData .more,
|
||||
.dashboard-stat.XMLData .more {
|
||||
color: #FFFFFF;
|
||||
background-color: rgb(0,0,0,0.4);
|
||||
}
|
||||
|
||||
.ADScroller-body .GVSolicitudTimbreNominaGral tr:nth-child(2) {
|
||||
color: #333333;
|
||||
background-color: #DDD;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.reporte1 .GVSolicitudTimbreNominaGral tr td:nth-child(n+2),
|
||||
.reporte1 .GVSolicitudTimbreNominaGral tr th:nth-child(n+2) {
|
||||
text-align: right !important;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.reporte1 .GVSolicitudTimbreNominaGral tr th:nth-child(2)
|
||||
/*,.reporte1 .ADScroller-body .GVSolicitudTimbreNominaGral tr:nth-child(2) td:nth-child(2) */ {
|
||||
background-color: #900;
|
||||
color: #FFF;
|
||||
}
|
||||
|
||||
.reporte1 .GVSolicitudTimbreNominaGral tr th:nth-child(3),
|
||||
.reporte1 .GVSolicitudTimbreNominaGral tr th:nth-child(4),
|
||||
.reporte1 .GVSolicitudTimbreNominaGral tr th:nth-child(5) /*,
|
||||
.reporte1 .ADScroller-body .GVSolicitudTimbreNominaGral tr:nth-child(2) td:nth-child(3),
|
||||
.reporte1 .ADScroller-body .GVSolicitudTimbreNominaGral tr:nth-child(2) td:nth-child(4),
|
||||
.reporte1 .ADScroller-body .GVSolicitudTimbreNominaGral tr:nth-child(2) td:nth-child(5)*/ {
|
||||
background-color: #3598dc;
|
||||
color: #FFF;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
.reporte2 .GVSolicitudTimbreNominaGral tr td:nth-child(n+2),
|
||||
.reporte2 .GVSolicitudTimbreNominaGral tr th:nth-child(n+2) {
|
||||
text-align: right !important;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.reporte2 .GVSolicitudTimbreNominaGral tr th:nth-child(2) /*,
|
||||
.reporte2 .ADScroller-body .GVSolicitudTimbreNominaGral tr:nth-child(2) td:nth-child(2)*/ {
|
||||
background-color: #900;
|
||||
color: #FFF;
|
||||
}
|
||||
|
||||
.reporte2 .GVSolicitudTimbreNominaGral tr th:nth-child(n+3):not(:nth-child(7)) /*,
|
||||
.reporte2 .ADScroller-body .GVSolicitudTimbreNominaGral tr:nth-child(2) td:nth-child(n+3):not(:nth-child(7))*/ {
|
||||
background-color: #3598dc;
|
||||
color: #FFF;
|
||||
}
|
||||
|
||||
|
||||
.reporte3 .GVSolicitudTimbreNominaGral tr td:nth-child(n+3) {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.reporte3 .GVSolicitudTimbreNominaGral tr td:nth-child(4),
|
||||
.reporte3 .GVSolicitudTimbreNominaGral tr td:nth-child(8),
|
||||
.reporte3 .GVSolicitudTimbreNominaGral tr td:nth-child(9),
|
||||
.reporte3 .GVSolicitudTimbreNominaGral tr td:nth-child(n+13):not(:nth-child(n+19)),
|
||||
.reporte3 .GVSolicitudTimbreNominaGral tr td:nth-child(24),
|
||||
.reporte3 .GVSolicitudTimbreNominaGral tr td:nth-child(n+28):not(:nth-child(n+33)) {
|
||||
text-align: right !important;
|
||||
}
|
||||
|
||||
.reporte3 .GVSolicitudTimbreNominaGral tr th:nth-child(2),
|
||||
.reporte3 .GVSolicitudTimbreNominaGral tr th:nth-child(n+20) /*,
|
||||
.reporte3 .ADScroller-body .GVSolicitudTimbreNominaGral tr:nth-child(2) td:nth-child(2),
|
||||
.reporte3 .ADScroller-body .GVSolicitudTimbreNominaGral tr:nth-child(2) td:nth-child(n+20)*/ {
|
||||
background-color: #900;
|
||||
color: #FFF;
|
||||
}
|
||||
|
||||
.reporte3 .GVSolicitudTimbreNominaGral tr th:nth-child(1),
|
||||
.reporte3 .GVSolicitudTimbreNominaGral tr th:nth-child(n+3):not(:nth-child(n+20)) /*,
|
||||
.reporte3 .ADScroller-body .GVSolicitudTimbreNominaGral tr:nth-child(2) td:nth-child(1),
|
||||
.reporte3 .ADScroller-body .GVSolicitudTimbreNominaGral tr:nth-child(2) td:nth-child(n+3):not(:nth-child(n+20))*/ {
|
||||
background-color: #3598dc;
|
||||
color: #FFF;
|
||||
}
|
||||
|
||||
|
||||
.reporte4 .GVSolicitudTimbreNominaGral tr td:nth-child(n+2),
|
||||
.reporte4 .GVSolicitudTimbreNominaGral tr th:nth-child(n+2) {
|
||||
text-align: right !important;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.reporte4 .GVSolicitudTimbreNominaGral tr th:nth-child(2) /*,
|
||||
.reporte4 .ADScroller-body .GVSolicitudTimbreNominaGral tr:nth-child(2) td:nth-child(2)*/ {
|
||||
background-color: #900;
|
||||
color: #FFF;
|
||||
}
|
||||
|
||||
.reporte4 .GVSolicitudTimbreNominaGral tr th:nth-child(n+3):not(:nth-child(n+6)) /*,
|
||||
.reporte4 .ADScroller-body .GVSolicitudTimbreNominaGral tr:nth-child(2) td:nth-child(n+3)*/ {
|
||||
background-color: #3598dc;
|
||||
color: #FFF;
|
||||
}
|
||||
|
||||
.reporte5 .GVSolicitudTimbreNominaGral tr th:nth-child(2) /*,
|
||||
.reporte5 .ADScroller-body .GVSolicitudTimbreNominaGral tr:nth-child(2) td:nth-child(2)*/ {
|
||||
background-color: #900;
|
||||
color: #FFF;
|
||||
}
|
||||
|
||||
.reporte5 .GVSolicitudTimbreNominaGral tr th:nth-child(3) /*,
|
||||
.reporte5 .ADScroller-body .GVSolicitudTimbreNominaGral tr:nth-child(2) td:nth-child(3)*/ {
|
||||
background-color: #3598dc;
|
||||
color: #FFF;
|
||||
}
|
||||
|
||||
|
||||
.reporte6 .GVSolicitudTimbreNominaGral tr td:nth-child(n) {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.reporte6 .GVSolicitudTimbreNominaGral tr td:nth-child(n+4),
|
||||
.reporte6 .GVSolicitudTimbreNominaGral tr th:nth-child(n+4) {
|
||||
text-align: right !important;
|
||||
}
|
||||
|
||||
.reporte6 .GVSolicitudTimbreNominaGral tr th:nth-child(n+4):not(:nth-child(n+7)) {
|
||||
background-color: #900;
|
||||
color: #FFF;
|
||||
}
|
||||
|
||||
.reporte6 .GVSolicitudTimbreNominaGral tr th:nth-child(n+7):not(:nth-child(n+10)) {
|
||||
background-color: #3598dc;
|
||||
color: #FFF;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.reporte7 .GVSolicitudTimbreNominaGral tr td:nth-child(n+3),
|
||||
.reporte7 .GVSolicitudTimbreNominaGral tr th:nth-child(n+3) {
|
||||
text-align: right !important;
|
||||
}
|
||||
|
||||
.reporte7 .GVSolicitudTimbreNominaGral tr th:nth-child(n+3):not(:nth-child(n+6)) {
|
||||
background-color: #900;
|
||||
color: #FFF;
|
||||
}
|
||||
|
||||
.reporte7 .GVSolicitudTimbreNominaGral tr th:nth-child(n+6):not(:nth-child(n+9)) {
|
||||
background-color: #3598dc;
|
||||
color: #FFF;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
.reporte8 .GVSolicitudTimbreNominaGral tr td:nth-child(n+6),
|
||||
.reporte8 .GVSolicitudTimbreNominaGral tr th:nth-child(n+6) {
|
||||
text-align: right !important;
|
||||
}
|
||||
|
||||
.reporte8 .GVSolicitudTimbreNominaGral tr th:nth-child(n+6):not(:nth-child(n+9)) {
|
||||
background-color: #900;
|
||||
color: #FFF;
|
||||
}
|
||||
|
||||
.reporte8 .GVSolicitudTimbreNominaGral tr th:nth-child(n+9):not(:nth-child(n+12)) {
|
||||
background-color: #3598dc;
|
||||
color: #FFF;
|
||||
}
|
||||
|
||||
|
||||
.reporte9 .GVSolicitudTimbreNominaGral tr td:nth-child(1),
|
||||
.reporte9 .GVSolicitudTimbreNominaGral tr td:nth-child(4) {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.reporte9 .GVSolicitudTimbreNominaGral tr td:nth-child(2),
|
||||
.reporte9 .GVSolicitudTimbreNominaGral tr td:nth-child(3),
|
||||
.reporte9 .GVSolicitudTimbreNominaGral tr td:nth-child(n+40) {
|
||||
text-align: right !important;
|
||||
}
|
||||
</style>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
|
||||
Visor solicitudes Ingreso
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
<li>
|
||||
<%-- <asp:LinkButton ID="LnkDownloadExcel" OnClick="LnkDownloadExcel_Click" runat="server"><i class="fa fa-download"></i>Descargar</asp:LinkButton>--%>
|
||||
</li>
|
||||
<asp:UpdatePanel ID="UpAcciones" runat="server" UpdateMode="Conditional">
|
||||
<contenttemplate>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkShowSolicitudes" OnClick="LnkShowSolicitudes_Click" runat="server">Solicitudes</asp:LinkButton>
|
||||
</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="upDatosChec" runat="server" UpdateMode="Conditional">
|
||||
<contenttemplate>
|
||||
<div class="portlet solid grey-cascade portlet-filter">
|
||||
<div class="portlet-title portlet-filterT smalltitle">
|
||||
<div class="titlefiltros caption">
|
||||
<div class="row">
|
||||
<label class="col-md-1">Agrupador: </label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlReporte" runat="server" Style="width: 100% !important;" CssClass="select2me" DataValueField="CveUsuario" DataTextField="Nombre">
|
||||
<asp:ListItem Value="1" Text="Por Mes"></asp:ListItem>
|
||||
<asp:ListItem Value="2" Text="Por Comprobante"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<label class="col-md-1 mediocol">Fecha inicio:</label>
|
||||
<div class="col-md-2">
|
||||
<%--<asp:TextBox ID="TxtPeriodoInicio" Text="0" CssClass="form-control" runat="server"></asp:TextBox>--%>
|
||||
|
||||
<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="TxtRpdFechaInicio" CssClass="form-control input-sm ADSMaskDate" Style="width: 80px" runat="server"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="LnkRpdFechaInicio" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
<ajax:maskededitextender id="MaskedEditExtender3" runat="server" targetcontrolid="TxtRpdFechaInicio" mask="99/99/9999" masktype="Date" displaymoney="Left" acceptnegative="Left"></ajax:maskededitextender>
|
||||
<ajax:calendarextender runat="server" id="CalendarExtender3" targetcontrolid="TxtRpdFechaInicio" popupbuttonid="LnkRpdFechaInicio" popupposition="BottomRight" enabled="True" format="dd/MM/yyyy"></ajax:calendarextender>
|
||||
<asp:RequiredFieldValidator ID="rfvRpdFechaInicio" runat="server" ControlToValidate="TxtRpdFechaInicio" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha Inicio''</b> es necesario, por favor ingréselo." ValidationGroup="VGReporterepperde"></asp:RequiredFieldValidator>
|
||||
<ajax:validatorcalloutextender id="ValidatorCalloutExtender1" runat="server" highlightcssclass="vco" targetcontrolid="rfvRpdFechaInicio"></ajax:validatorcalloutextender>
|
||||
</div>
|
||||
</div>
|
||||
<label class="col-md-1 mediocol">Fecha fin:</label>
|
||||
<div class="col-md-2">
|
||||
<%--<asp:TextBox ID="TxtPeriodoFin" Text="99" CssClass="form-control" runat="server"></asp:TextBox>--%>
|
||||
<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="TxtRpdFechaFin" CssClass="form-control input-sm ADSMaskDate" Style="width: 80px" runat="server"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="LnkFechaFin" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
<ajax:maskededitextender id="MaskedEditExtender5" runat="server" targetcontrolid="TxtRpdFechaFin" mask="99/99/9999" masktype="Date" displaymoney="Left" acceptnegative="Left"></ajax:maskededitextender>
|
||||
<ajax:calendarextender runat="server" id="CalendarExtender4" targetcontrolid="TxtRpdFechaFin" popupbuttonid="LnkFechaFin" popupposition="BottomRight" enabled="True" format="dd/MM/yyyy"></ajax:calendarextender>
|
||||
<asp:RequiredFieldValidator ID="rfvRpdFechaFin" runat="server" ControlToValidate="TxtRpdFechaFin" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha Fin''</b> es necesario, por favor ingréselo." ValidationGroup="VGReporterepperde"></asp:RequiredFieldValidator>
|
||||
<ajax:validatorcalloutextender id="ValidatorCalloutExtender2" runat="server" highlightcssclass="vco" targetcontrolid="rfvRpdFechaFin"></ajax:validatorcalloutextender>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-2" style="text-align:right">
|
||||
<asp:LinkButton ID="LnkConsultar" OnClick="LnkConsultar_Click" runat="server" Text="Consultar" Visible="true" class="btn btn-primary" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tools">
|
||||
<a href="javascript:;" class="expand" data-original-title="" title=""></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body" style="display: none">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</contenttemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
||||
<contenttemplate>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<asp:GridView ID="GvResumen" runat="server" GridLines="None" CssClass="table table-hover table-striped ScrollAD Widthall" AutoGenerateColumns="False" Width="600px" OnRowDataBound="GvResumen_RowDataBound"
|
||||
ShowHeaderWhenEmpty="true" EmptyDataText="No se encontraron registros"
|
||||
DataKeyNames="Mes" >
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Mes">
|
||||
<ItemTemplate>
|
||||
<asp:Label id="LblMes" runat="server" Text='<%# Eval("Mes")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="SIG" ItemStyle-HorizontalAlign="Right">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LblVTotal" runat="server" Text='<%# Eval("VTotal","{0:N2}")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="SAT" ItemStyle-HorizontalAlign="Right">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LblCBTTotal" runat="server" Text='<%# Eval("CBTTotal","{0:N2}")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Diferencia" ItemStyle-HorizontalAlign="Right">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LblDif" runat="server" Text='<%# Eval("Dif","{0:N2}")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<asp:GridView ID="GvDatos" runat="server" GridLines="None" CssClass="table table-hover table-striped ScrollAD Widthall" Visible ="false" AutoGenerateColumns="false" OnRowDataBound="GvDatos_RowDataBound"
|
||||
ShowHeaderWhenEmpty="true" EmptyDataText="No se encontraron registros"
|
||||
DataKeyNames="UUID,CountRegistros,VTotal,CBTTotal">
|
||||
<Columns>
|
||||
|
||||
<asp:TemplateField HeaderText="Folio">
|
||||
<ItemTemplate>
|
||||
<asp:Label runat="server" ID="LblUUID" Text='<%# Eval("UUID")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
|
||||
<asp:TemplateField HeaderText="SIG">
|
||||
<ItemTemplate>
|
||||
<asp:Label runat="server" ID="LblEnSistema" Text='<%# Eval("Sistema")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
|
||||
<asp:TemplateField HeaderText="SAT" ItemStyle-HorizontalAlign="Right">
|
||||
<ItemTemplate>
|
||||
<asp:Label runat="server" ID="LblCFDIData" Text='<%# Eval("CFDIData")%>' ></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
|
||||
<asp:TemplateField HeaderText="Serie Folio" ItemStyle-HorizontalAlign="Right">
|
||||
<ItemTemplate>
|
||||
<asp:Label runat="server" ID="LblVSerieFolio" Text='<%# Eval("VSerieFolio")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
|
||||
<asp:TemplateField HeaderText="Total" ItemStyle-HorizontalAlign="Right">
|
||||
<ItemTemplate>
|
||||
<asp:Label runat="server" ID="LblVTotal" Text='<%# Eval("VTotal","{0:N2}")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
|
||||
|
||||
<asp:TemplateField HeaderText="Sub Total" ItemStyle-HorizontalAlign="Right">
|
||||
<ItemTemplate>
|
||||
<asp:Label runat="server" ID="LblVSubTotal" Text='<%# Eval("VSubTotal","{0:N2}")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
|
||||
<asp:TemplateField HeaderText="IVA" ItemStyle-HorizontalAlign="Right">
|
||||
<ItemTemplate>
|
||||
<asp:Label runat="server" ID="LblVIVA" Text='<%# Eval("VIVA","{0:N2}")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
|
||||
<asp:TemplateField HeaderText="IEPS" ItemStyle-HorizontalAlign="Right">
|
||||
<ItemTemplate>
|
||||
<asp:Label runat="server" ID="LblVIEPS" Text='<%# Eval("VIEPS","{0:N2}")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
|
||||
<asp:TemplateField HeaderText="Ret. IVA" ItemStyle-HorizontalAlign="Right">
|
||||
<ItemTemplate>
|
||||
<asp:Label runat="server" ID="LblVRetIVA" Text='<%# Eval("VRetIVA","{0:N2}")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
|
||||
<asp:TemplateField HeaderText="Ret. ISR" ItemStyle-HorizontalAlign="Right">
|
||||
<ItemTemplate>
|
||||
<asp:Label runat="server" ID="LblVRetISR" Text='<%# Eval("VRetISR","{0:N2}")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
|
||||
|
||||
<asp:TemplateField HeaderText="Total" ItemStyle-HorizontalAlign="Right">
|
||||
<ItemTemplate>
|
||||
<asp:Label runat="server" ID="LblCBTTotal" Text='<%# Eval("CBTTotal","{0:N2}")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
|
||||
<asp:TemplateField HeaderText="Sub Total" ItemStyle-HorizontalAlign="Right">
|
||||
<ItemTemplate>
|
||||
<asp:Label runat="server" ID="LblCBTSubTotal" Text='<%# Eval("CBTSubTotal","{0:N2}")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
|
||||
<asp:TemplateField HeaderText="IVA" ItemStyle-HorizontalAlign="Right">
|
||||
<ItemTemplate>
|
||||
<asp:Label runat="server" ID="LblImpIVA" Text='<%# Eval("ImpIVA","{0:N2}")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
|
||||
<asp:TemplateField HeaderText="IEPS" ItemStyle-HorizontalAlign="Right">
|
||||
<ItemTemplate>
|
||||
<asp:Label runat="server" ID="LblImpIEPS" Text='<%# Eval("ImpIEPS","{0:N2}")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
|
||||
|
||||
<asp:TemplateField HeaderText="Ret. ISR" ItemStyle-HorizontalAlign="Right">
|
||||
<ItemTemplate>
|
||||
<asp:Label runat="server" ID="LblImpRetISR" Text='<%# Eval("ImpRetISR","{0:N2}")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
|
||||
<asp:TemplateField HeaderText="Ret. IVA" ItemStyle-HorizontalAlign="Right" >
|
||||
<ItemTemplate>
|
||||
<asp:Label runat="server" ID="LblImpRetIVA" Text='<%# Eval("ImpRetIVA","{0:N2}")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</contenttemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="ModalViewSolicitudes" class="modal ADS fade" role="dialog">
|
||||
<asp:UpdatePanel ID="UPModalViewSolicitudes" class="modal-dialog rowpadding" tabindex="-1" runat="server" UpdateMode="Conditional">
|
||||
<contenttemplate>
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">Solicitudes CFDI</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
|
||||
|
||||
|
||||
|
||||
<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>
|
||||
|
||||
|
||||
<ajax:TabContainer runat="server" ID="TabPanel" ActiveTabIndex="0">
|
||||
|
||||
<ajax:TabPanel runat="server" HeaderText="Pendientes" ID="TabPendientes">
|
||||
<ContentTemplate>
|
||||
|
||||
<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>
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
|
||||
|
||||
<ajax:TabPanel runat="server" HeaderText="Historial" ID="TabHistorial">
|
||||
<ContentTemplate>
|
||||
|
||||
<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>
|
||||
|
||||
|
||||
|
||||
</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>
|
||||
</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-6">
|
||||
<div class="form-group form-md-line-input input-iconright" style="width: 125px!important">
|
||||
<asp:TextBox ID="txtFechaIAdd" CssClass="form-control" MaxLength="20" runat="server" Width="100px"></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 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="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-6">
|
||||
<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"></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 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="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>
|
||||
|
||||
|
||||
|
||||
</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>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
|
||||
</asp:Content>
|
||||
|
||||
683
SAT/SolicitudesIngresoSat.aspx.cs
Normal file
683
SAT/SolicitudesIngresoSat.aspx.cs
Normal file
@@ -0,0 +1,683 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using System.Net.Http;
|
||||
using System.Net.Http.Headers;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using Extensiones;
|
||||
using Newtonsoft.Json.Linq;
|
||||
|
||||
public partial class SAT_SolicitudesIngresoSat : ClsPaginas
|
||||
{
|
||||
#region Propiedades
|
||||
|
||||
public string clasegrid
|
||||
{
|
||||
get
|
||||
{
|
||||
if (ViewState["clasegrid"] == null) { return ""; }
|
||||
else { return ViewState["clasegrid"].ToString(); }
|
||||
}
|
||||
set { ViewState["clasegrid"] = value; }
|
||||
}
|
||||
public string fechaInicio
|
||||
{
|
||||
get
|
||||
{
|
||||
if (ViewState["fechaInicio"] == null) { return ""; }
|
||||
else { return ViewState["fechaInicio"].ToString(); }
|
||||
}
|
||||
set { ViewState["fechaInicio"] = value; }
|
||||
}
|
||||
public string fechaFin
|
||||
{
|
||||
get
|
||||
{
|
||||
if (ViewState["fechaFin"] == null) { return ""; }
|
||||
else { return ViewState["fechaFin"].ToString(); }
|
||||
}
|
||||
set { ViewState["fechaFin"] = value; }
|
||||
}
|
||||
#endregion
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
TxtRpdFechaInicio.Text = string.Format("01/{0:MM/yyyy}", DateTime.Now.AddMonths(-1));
|
||||
TxtRpdFechaFin.Text = string.Format("{0:dd/MM/yyyy}", DateTime.Now.AddMonths(-1).LastDayOfMonth());
|
||||
LnkConsultar_Click(null, null);
|
||||
}
|
||||
}
|
||||
|
||||
protected void LnkDownloadExcel_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
using (ClsNominas nom = new ClsNominas())
|
||||
{
|
||||
nom.SATSolicitudTimbreNominaGral(DdlReporte.SelectedValue.ToString().ToEntero(), UsuarioActual.CveEmpresa, fechaInicio, fechaFin);
|
||||
|
||||
ClosedXML.Excel.XLWorkbook wb = new ClosedXML.Excel.XLWorkbook();
|
||||
var libro = wb.AddWorksheet(nom.DtResultados, "Nomina");
|
||||
libro.ColumnsUsed().AdjustToContents();
|
||||
libro.Range(1, 1, 1, nom.DtResultados.Columns.Count).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(153, 153, 153));
|
||||
switch (DdlReporte.SelectedValue.ToString().ToEntero())
|
||||
{
|
||||
case 1:
|
||||
libro.Range(1, 2, 1, 2).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(153, 0, 0));
|
||||
libro.Range(1, 3, 1, 5).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(53, 152, 220));
|
||||
break;
|
||||
case 2:
|
||||
libro.Range(1, 2, 1, 2).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(153, 0, 0));
|
||||
libro.Range(1, 3, 1, 6).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(53, 152, 220));
|
||||
libro.Range(1, 8, 1, 11).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(53, 152, 220));
|
||||
break;
|
||||
case 3:
|
||||
libro.Range(1, 1, 1, 10).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(53, 152, 220));
|
||||
libro.Range(1, 11, 1, nom.DtResultados.Columns.Count).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(153, 0, 0));
|
||||
break;
|
||||
case 4:
|
||||
libro.Range(1, 2, 1, 2).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(153, 0, 0));
|
||||
libro.Range(1, 3, 1, 5).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(53, 152, 220));
|
||||
break;
|
||||
case 5:
|
||||
libro.Range(1, 2, 1, 2).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(153, 0, 0));
|
||||
libro.Range(1, 3, 1, 3).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(53, 152, 220));
|
||||
break;
|
||||
case 6:
|
||||
libro.Range(1, 4, 1, 6).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(153, 0, 0));
|
||||
libro.Range(1, 7, 1, 9).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(53, 152, 220));
|
||||
break;
|
||||
case 7:
|
||||
libro.Range(1, 3, 1, 5).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(153, 0, 0));
|
||||
libro.Range(1, 6, 1, 8).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(53, 152, 220));
|
||||
break;
|
||||
case 8:
|
||||
libro.Range(1, 6, 1, 8).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(153, 0, 0));
|
||||
libro.Range(1, 9, 1, 12).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(53, 152, 220));
|
||||
break;
|
||||
case 9:
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
libro.Row(1).InsertRowsAbove(4);
|
||||
libro.Range(1, 2, 1, 6).Merge().Value = UsuarioActual.Empresa.Empresa;
|
||||
libro.Range(2, 2, 2, 6).Merge().Value = $"Reporte de {DdlReporte.SelectedItem.Text}";
|
||||
libro.Range(3, 2, 3, 6).Merge().Value = $"del {fechaInicio.ToDateTime():dd/MM/yyyy} al {fechaFin.ToDateTime():dd/MM/yyyy}";
|
||||
libro.Range(2, 7, 2, 9).Merge().Value = $"Fecha:{DateTime.Now:dd/MM/yyyy}";
|
||||
libro.Range(3, 7, 3, 9).Merge().Value = $"Hora:{DateTime.Now:HH:mm}";
|
||||
|
||||
System.IO.Stream fs = new System.IO.MemoryStream();
|
||||
wb.SaveAs(fs);
|
||||
fs.Position = 0;
|
||||
System.IO.MemoryStream memoryStream = new System.IO.MemoryStream();
|
||||
using (System.IO.Stream input = fs)
|
||||
|
||||
{
|
||||
input.CopyTo(memoryStream);
|
||||
}
|
||||
memoryStream.Position = 0;
|
||||
|
||||
Response.Clear();
|
||||
Response.Buffer = true;
|
||||
|
||||
Response.ContentType = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";
|
||||
Response.AddHeader("content-disposition", string.Format("attachment;filename={0}.xlsx", $"Visor nómina ( Reporte :{DdlReporte.SelectedValue}) "));
|
||||
Response.BinaryWrite(memoryStream.ToArray());
|
||||
Response.End();
|
||||
}
|
||||
}
|
||||
protected void LnkConsultar_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
|
||||
GvResumen.DataSource = null;
|
||||
GvDatos.DataSource = null;
|
||||
|
||||
if (DdlReporte.SelectedValue.ToEntero() == 1)
|
||||
{
|
||||
GvResumen.Visible = true;
|
||||
GvDatos.Visible = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
GvResumen.Visible = false;
|
||||
GvDatos.Visible = true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
using (ClsNominas ObjNom = new ClsNominas())
|
||||
{
|
||||
if (ObjNom.SATSolicitudTimbreIngresosRep(UsuarioActual.CveEmpresa, TxtRpdFechaInicio.Text.ToDate(), TxtRpdFechaFin.Text.ToDate(), DdlReporte.SelectedValue.ToEntero()))
|
||||
{
|
||||
if (DdlReporte.SelectedValue.ToEntero() == 1)
|
||||
{
|
||||
GvResumen.DataSource = ObjNom.DtResultados;
|
||||
}
|
||||
else
|
||||
{
|
||||
GvDatos.DataSource = ObjNom.DtResultados;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
GvResumen.DataBind();
|
||||
GvDatos.DataBind();
|
||||
|
||||
UpDatos.Update();
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
private void cargasolicitudes()
|
||||
{
|
||||
using (ClsNominas nom = new ClsNominas())
|
||||
{
|
||||
|
||||
if (nom.SolicitudesGet(-1, UsuarioActual.CveEmpresa, CveTipoSolicitud: 3))
|
||||
{
|
||||
|
||||
GVSolicitudesPendientes.DataSource = nom.DtResultados.FiltraParametros("Estatus =0");
|
||||
GVSolicitudesPendientes.DataBind();
|
||||
GVSolicitudesNominas.DataSource = nom.DtResultados.FiltraParametros("Estatus =1");
|
||||
GVSolicitudesNominas.DataBind();
|
||||
}
|
||||
}
|
||||
UPModalViewSolicitudes.Update();
|
||||
}
|
||||
protected void LnkShowSolicitudes_Click(object sender, EventArgs e)
|
||||
{
|
||||
TabPanel.ActiveTabIndex = 0;
|
||||
cargasolicitudes();
|
||||
|
||||
this.RegistraScript("$('#ModalViewSolicitudes').modal();");
|
||||
}
|
||||
|
||||
protected void LnkSolicitarSat_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
int idSolicitudCFDI = 0;
|
||||
int idSolicitudMetadata = 0;
|
||||
int estatus = 0;
|
||||
string observaciones = "";
|
||||
DateTime fechaInicio = txtFechaIAdd.Text.ToDateTime();
|
||||
DateTime fechaFin = txtFechaFAdd.Text.ToDateTime();
|
||||
int cveUsuarioIng = UsuarioActual.CveUsuario;
|
||||
int cveEmpresa = UsuarioActual.CveEmpresa;
|
||||
bool Continuar = false;
|
||||
using (ClsNominas nom = new ClsNominas())
|
||||
{
|
||||
Continuar = nom.SolicitudesAdd(idSolicitudCFDI, idSolicitudMetadata, estatus, observaciones, fechaInicio, fechaFin, cveUsuarioIng, cveEmpresa, CveTipoSolicitud: 3);
|
||||
}
|
||||
|
||||
|
||||
if (Continuar)
|
||||
{
|
||||
StringBuilder sbResultado = new StringBuilder();
|
||||
var api = new GeneralesAPII();
|
||||
JToken ObjApiSolicitud = (JToken)api.GeneraSolicitud(UsuarioActual.CveEmpresa, 3);
|
||||
List<string> resultSolicitud = new List<string>();
|
||||
List<string> resultVerificacion = new List<string>();
|
||||
var ResultadoVerificaionOK = false;
|
||||
var SeVerifico = false;
|
||||
var TipoMensaje = ModExtensiones.TipoMensaje.MsgInformacion;
|
||||
var ResultadoSolicitudOK = false;
|
||||
|
||||
if (!(ObjApiSolicitud == null))
|
||||
{
|
||||
resultSolicitud = ObjApiSolicitud.Select(token => token.Values().Aggregate((i, j) => $"{i}|{j}").Value<string>()).ToList();
|
||||
ResultadoSolicitudOK = bool.Parse(resultSolicitud[0]);
|
||||
}
|
||||
else
|
||||
{
|
||||
TipoMensaje = ModExtensiones.TipoMensaje.MsgAdvertencia;
|
||||
}
|
||||
|
||||
|
||||
if (ResultadoSolicitudOK)
|
||||
{
|
||||
JToken ObjApiVerificacion = (JToken)api.VerificaSolicitudesNominas(UsuarioActual.CveEmpresa, 3);
|
||||
|
||||
|
||||
if (!(ObjApiVerificacion == null))
|
||||
{
|
||||
resultVerificacion = ObjApiVerificacion.Select(token => token.Values().Aggregate((i, j) => $"{i}|{j}").Value<string>()).ToList();
|
||||
ResultadoVerificaionOK = bool.Parse(resultVerificacion[0]);
|
||||
SeVerifico = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
TipoMensaje = ModExtensiones.TipoMensaje.MsgAdvertencia;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (resultSolicitud.Count == 4)
|
||||
{
|
||||
if (ResultadoSolicitudOK)
|
||||
{
|
||||
if (resultSolicitud[1].ToString().Trim().Length > 0)
|
||||
{
|
||||
sbResultado.Append($"{resultSolicitud[1]}<br/>");
|
||||
}
|
||||
else
|
||||
{
|
||||
sbResultado.Append($"Solicitud Generada Correctamente");
|
||||
sbResultado.Append($"Se presento un error al verificar las solicitudes <br/> {resultSolicitud[2]} <br>");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
sbResultado.Append($"{resultSolicitud[2]}");
|
||||
TipoMensaje = ModExtensiones.TipoMensaje.MsgAdvertencia;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
sbResultado.AppendLine("Se presento un error al generar la solicitud (API) <br/>");
|
||||
TipoMensaje = ModExtensiones.TipoMensaje.MsgAdvertencia;
|
||||
}
|
||||
|
||||
|
||||
if (SeVerifico && resultVerificacion.Count == 4)
|
||||
{
|
||||
if (ResultadoVerificaionOK)
|
||||
{
|
||||
sbResultado.Append($"{resultVerificacion[1]}<br>");
|
||||
}
|
||||
else
|
||||
{
|
||||
sbResultado.Append($"Se presento un error al verificar las solicitudes {resultVerificacion[1]}<br>");
|
||||
TipoMensaje = ModExtensiones.TipoMensaje.MsgAdvertencia;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
sbResultado.AppendLine("Se presento un error al verificar las solicitudes (API) <br/>");
|
||||
TipoMensaje = ModExtensiones.TipoMensaje.MsgAdvertencia;
|
||||
}
|
||||
|
||||
Alert(sbResultado.ToString(), TipoMensaje);
|
||||
}
|
||||
|
||||
if (Continuar)
|
||||
{
|
||||
txtFechaIAdd.Text = "";
|
||||
txtFechaFAdd.Text = "";
|
||||
this.RegistraScript("$('#ModalAgregarSolicitud').modal('hide');");
|
||||
cargasolicitudes();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
protected void LnkverificarSolicitudes_Click(object sender, EventArgs e)
|
||||
{
|
||||
//var api = new GeneralesAPI();
|
||||
//api.GeneraSolicitud();
|
||||
//api.VerificaSolicitudesNominas();
|
||||
|
||||
|
||||
|
||||
StringBuilder sbResultado = new StringBuilder();
|
||||
var api = new GeneralesAPII();
|
||||
JToken ObjApiSolicitud = (JToken)api.GeneraSolicitud(UsuarioActual.CveEmpresa, 3);
|
||||
List<string> resultSolicitud = new List<string>();
|
||||
List<string> resultVerificacion = new List<string>();
|
||||
var ResultadoVerificaionOK = false;
|
||||
var SeVerifico = false;
|
||||
var TipoMensaje = ModExtensiones.TipoMensaje.MsgInformacion;
|
||||
var ResultadoSolicitudOK = false;
|
||||
|
||||
if (!(ObjApiSolicitud == null))
|
||||
{
|
||||
resultSolicitud = ObjApiSolicitud.Select(token => token.Values().Aggregate((i, j) => $"{i}|{j}").Value<string>()).ToList();
|
||||
ResultadoSolicitudOK = bool.Parse(resultSolicitud[0]);
|
||||
}
|
||||
else
|
||||
{
|
||||
TipoMensaje = ModExtensiones.TipoMensaje.MsgAdvertencia;
|
||||
}
|
||||
|
||||
|
||||
if (ResultadoSolicitudOK)
|
||||
{
|
||||
JToken ObjApiVerificacion = (JToken)api.VerificaSolicitudesNominas(UsuarioActual.CveEmpresa, 3);
|
||||
|
||||
|
||||
if (!(ObjApiVerificacion == null))
|
||||
{
|
||||
resultVerificacion = ObjApiVerificacion.Select(token => token.Values().Aggregate((i, j) => $"{i}|{j}").Value<string>()).ToList();
|
||||
ResultadoVerificaionOK = bool.Parse(resultVerificacion[0]);
|
||||
SeVerifico = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
TipoMensaje = ModExtensiones.TipoMensaje.MsgAdvertencia;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (resultSolicitud.Count == 4)
|
||||
{
|
||||
if (ResultadoSolicitudOK)
|
||||
{
|
||||
if (resultSolicitud[2].ToString().Trim().Length > 0)
|
||||
{
|
||||
sbResultado.Append($"{resultSolicitud[2]}<br/>");
|
||||
}
|
||||
else
|
||||
{
|
||||
sbResultado.Append($"Solicitud Generada Correctamente");
|
||||
sbResultado.Append($"Se presento un error al verificar las solicitudes <br/> {resultSolicitud[2]} <br>");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
sbResultado.Append($"{resultSolicitud[2]}");
|
||||
TipoMensaje = ModExtensiones.TipoMensaje.MsgAdvertencia;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
sbResultado.AppendLine("Se presento un error al generar la solicitud (API) <br/>");
|
||||
TipoMensaje = ModExtensiones.TipoMensaje.MsgAdvertencia;
|
||||
}
|
||||
|
||||
|
||||
if (SeVerifico && resultVerificacion.Count == 4)
|
||||
{
|
||||
if (ResultadoVerificaionOK)
|
||||
{
|
||||
sbResultado.Append($"{resultVerificacion[2]}<br>");
|
||||
}
|
||||
else
|
||||
{
|
||||
sbResultado.Append($"Se presento un error al verificar las solicitudes {resultVerificacion[2]}<br>");
|
||||
TipoMensaje = ModExtensiones.TipoMensaje.MsgAdvertencia;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
sbResultado.AppendLine("Se presento un error al verificar las solicitudes (API) <br/>");
|
||||
TipoMensaje = ModExtensiones.TipoMensaje.MsgAdvertencia;
|
||||
}
|
||||
|
||||
Alert(sbResultado.ToString(), TipoMensaje);
|
||||
|
||||
|
||||
|
||||
cargasolicitudes();
|
||||
|
||||
}
|
||||
|
||||
protected void LnkAgregarSolictud_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
txtFechaIAdd.Text = "";
|
||||
txtFechaFAdd.Text = "";
|
||||
UPModalViewSolicitudesAgregar.Update();
|
||||
this.RegistraScript("$('#ModalAgregarSolicitud').modal('show');");
|
||||
}
|
||||
|
||||
|
||||
|
||||
protected void GvResumen_RowDataBound(object sender, GridViewRowEventArgs e)
|
||||
{
|
||||
if(e.Row.RowType == DataControlRowType.DataRow)
|
||||
{
|
||||
if(e.Row.DataKey("Mes").ToString() == "")
|
||||
{
|
||||
e.Row.Cells[0].Text = "Total";
|
||||
e.Row.Font.Bold = true;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected void GvDatos_RowDataBound(object sender, GridViewRowEventArgs e)
|
||||
{
|
||||
|
||||
if(e.Row.RowType == DataControlRowType.DataRow)
|
||||
{
|
||||
if (e.Row.DataKey("UUID") == "Totales")
|
||||
{
|
||||
|
||||
e.Row.Font.Bold = true;
|
||||
e.Row.Cells[1].Text = e.Row.DataKey("VTotal").ToDecimal().ToString("###,###,###.00");
|
||||
e.Row.Cells[2].Text = e.Row.DataKey("CBTTotal").ToDecimal().ToString("###,###,###.00");
|
||||
e.Row.Cells[3].Text = e.Row.DataKey("CountRegistros");
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (e.Row.RowType == DataControlRowType.Header)
|
||||
{
|
||||
|
||||
e.Row.Cells[1].BackColor = System.Drawing.Color.FromName("#3598dc"); //Azul
|
||||
e.Row.Cells[2].BackColor = System.Drawing.Color.FromName("#900"); //Rojo
|
||||
|
||||
|
||||
e.Row.Cells[4].BackColor = System.Drawing.Color.FromName("#3598dc"); //Azul
|
||||
e.Row.Cells[5].BackColor = System.Drawing.Color.FromName("#3598dc"); //Azul
|
||||
e.Row.Cells[6].BackColor = System.Drawing.Color.FromName("#3598dc"); //Azul
|
||||
e.Row.Cells[7].BackColor = System.Drawing.Color.FromName("#3598dc"); //Azul
|
||||
e.Row.Cells[8].BackColor = System.Drawing.Color.FromName("#3598dc"); //Azul
|
||||
e.Row.Cells[9].BackColor = System.Drawing.Color.FromName("#3598dc"); //Azul
|
||||
|
||||
|
||||
e.Row.Cells[10].BackColor = System.Drawing.Color.FromName("#900"); //Rojo
|
||||
e.Row.Cells[11].BackColor = System.Drawing.Color.FromName("#900"); //Rojo
|
||||
e.Row.Cells[12].BackColor = System.Drawing.Color.FromName("#900"); //Rojo
|
||||
e.Row.Cells[13].BackColor = System.Drawing.Color.FromName("#900"); //Rojo
|
||||
e.Row.Cells[14].BackColor = System.Drawing.Color.FromName("#900"); //Rojo
|
||||
e.Row.Cells[15].BackColor = System.Drawing.Color.FromName("#900"); //Rojo
|
||||
|
||||
|
||||
e.Row.Cells[1].ForeColor = System.Drawing.Color.FromName("white");
|
||||
e.Row.Cells[2].ForeColor = System.Drawing.Color.FromName("white");
|
||||
|
||||
e.Row.Cells[4].ForeColor = System.Drawing.Color.FromName("white");
|
||||
e.Row.Cells[5].ForeColor = System.Drawing.Color.FromName("white");
|
||||
e.Row.Cells[6].ForeColor = System.Drawing.Color.FromName("white");
|
||||
e.Row.Cells[7].ForeColor = System.Drawing.Color.FromName("white");
|
||||
e.Row.Cells[8].ForeColor = System.Drawing.Color.FromName("white");
|
||||
e.Row.Cells[9].ForeColor = System.Drawing.Color.FromName("white");
|
||||
|
||||
|
||||
e.Row.Cells[10].ForeColor = System.Drawing.Color.FromName("white");
|
||||
e.Row.Cells[11].ForeColor = System.Drawing.Color.FromName("white");
|
||||
e.Row.Cells[12].ForeColor = System.Drawing.Color.FromName("white");
|
||||
e.Row.Cells[13].ForeColor = System.Drawing.Color.FromName("white");
|
||||
e.Row.Cells[14].ForeColor = System.Drawing.Color.FromName("white");
|
||||
e.Row.Cells[15].ForeColor = System.Drawing.Color.FromName("white");
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public class GeneralesAPII : ADSNetLibraryzI.HelpersI.ConexionesI.SIGAPII.BaseSIGAPII
|
||||
{
|
||||
public GeneralesAPII(string domainApi = "http://localhost:4001/", string token = "") : base(domainApi, token) { }
|
||||
|
||||
|
||||
public object GeneraSolicitud(int CveEmpresa, int CveTipoSolicitud)
|
||||
{
|
||||
return getData<object>($"GeneraSolicitud/{CveEmpresa}/{CveTipoSolicitud}", null, ADSNetLibraryzI.HelpersI.ConexionesI.SIGAPII.requestMethod.GET, false);
|
||||
}
|
||||
public object VerificaSolicitudesNominas(int CveEmpresa, int CveTipoSolicitud)
|
||||
{
|
||||
return getData<object>($"VerificaSolicitudesNominas/{CveEmpresa}/{CveTipoSolicitud}", null, ADSNetLibraryzI.HelpersI.ConexionesI.SIGAPII.requestMethod.GET, false);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
namespace ADSNetLibraryzI.HelpersI.ConexionesI.SIGAPII
|
||||
{
|
||||
|
||||
public enum requestMethod
|
||||
{
|
||||
POST = 1,
|
||||
GET = 2
|
||||
}
|
||||
public class BaseSIGAPII
|
||||
{
|
||||
private const string tituloLog = " ADSNetLibraryzI.HelpersI.ConexionesI.SIGAPII";
|
||||
public string domainApi;
|
||||
public string authorization;
|
||||
protected string RouteController = "";
|
||||
protected string FullRoute = "";
|
||||
public string GetRoutbyclass()
|
||||
{
|
||||
string classname = this.GetType().Name;
|
||||
return classname.Substring(0, classname.Length - 4);
|
||||
}
|
||||
public string GetRoute(string path)
|
||||
{
|
||||
if (string.IsNullOrEmpty(FullRoute))
|
||||
{
|
||||
return string.Format("api/{0}/{1}", (string.IsNullOrEmpty(RouteController) ? GetRoutbyclass() : RouteController), path);
|
||||
}
|
||||
else
|
||||
{
|
||||
return string.Format("{0}{1}", FullRoute, path);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// nueva instancia de conexion para una api
|
||||
/// </summary>
|
||||
/// <param name="domainApi"> url de la api</param>
|
||||
/// <param name="authorization"> llenar si se tiene si se desea obtner usuar campos usuario y pasword</param>
|
||||
public BaseSIGAPII(string domainApi, string authorization = null, string fullRoute = null)
|
||||
{
|
||||
if (string.IsNullOrEmpty(domainApi))
|
||||
{
|
||||
domainApi = "http://localhost:4001/";//"http://jam.adssistemas.mx:4001/";//Helpers.ModVars.UrlApi;
|
||||
}
|
||||
this.authorization = authorization;
|
||||
this.domainApi = domainApi;
|
||||
this.FullRoute = fullRoute;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Obtiene datos de la api asincrono.
|
||||
/// </summary>
|
||||
/// <typeparam name="T">Clase genérica en donde se obtiene la información del SqlDataReader.</typeparam>
|
||||
/// <param name="path">ruta sin domino ejemplo "/api/usuarios/login".</param>
|
||||
/// <param name="requestobject">request object.</param>
|
||||
/// <returns>Lista de objetos.</returns>
|
||||
public async Task<T> getDataAsync<T>(string path, object requestobject, requestMethod reqmet = requestMethod.POST, bool needauthorization = true, bool isfullpath = false) where T : class, new()
|
||||
{
|
||||
T objreturn = null;
|
||||
using (
|
||||
HttpClient client = new HttpClient())
|
||||
{
|
||||
// Setting Base address.
|
||||
client.BaseAddress = new Uri(domainApi);
|
||||
// Setting content type.
|
||||
client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
|
||||
// Setting Authorization.
|
||||
if (needauthorization) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", authorization); }
|
||||
client.Timeout = TimeSpan.FromMinutes(15);
|
||||
HttpResponseMessage response = new HttpResponseMessage();
|
||||
|
||||
var strjsonreq = Newtonsoft.Json.JsonConvert.SerializeObject(requestobject);
|
||||
StringContent content = new StringContent(strjsonreq, Encoding.UTF8, "application/json");
|
||||
string route = isfullpath ? path : GetRoute(path);
|
||||
try
|
||||
{
|
||||
|
||||
switch (reqmet)
|
||||
{
|
||||
case requestMethod.POST:
|
||||
response = await client.PostAsync(route, content);
|
||||
break;
|
||||
case requestMethod.GET:
|
||||
response = await client.GetAsync(route);
|
||||
break;
|
||||
}
|
||||
if (response.IsSuccessStatusCode)
|
||||
{
|
||||
string jsondata = await response.Content.ReadAsStringAsync();
|
||||
|
||||
|
||||
Newtonsoft.Json.JsonSerializerSettings settings = new Newtonsoft.Json.JsonSerializerSettings
|
||||
{
|
||||
NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore,
|
||||
MissingMemberHandling = Newtonsoft.Json.MissingMemberHandling.Ignore
|
||||
};
|
||||
objreturn = Newtonsoft.Json.JsonConvert.DeserializeObject<T>(jsondata, settings);
|
||||
}
|
||||
else
|
||||
{
|
||||
//ModExtensiones.GuardaLog(string.Format("{0}{1}{2}{1}StatusCode:{3}{1}{4}{1}{5}{1}", tituloLog, ModVars.NewLine, route, response.StatusCode, response.RequestMessage, strjsonreq), ModVars.ADSNetLibraryLog);
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
//ModExtensiones.GuardaLog(string.Format("{0}{1}{2}{1}{3}{1}{4}{1}", tituloLog, ModVars.NewLine, route, e, strjsonreq), ModVars.ADSNetLibraryLog);
|
||||
}
|
||||
|
||||
}
|
||||
return objreturn;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Obtiene datos de la api.
|
||||
/// </summary>
|
||||
/// <typeparam name="T">Clase genérica en donde se obtiene la información del SqlDataReader.</typeparam>
|
||||
/// <param name="path">ruta sin domino ejemplo "/api/usuarios/login".</param>
|
||||
/// <param name="requestobject">request object.</param>
|
||||
/// <returns>Lista de objetos.</returns>
|
||||
//public T getData<T> (string path, object requestobject, requestMethod reqmet = requestMethod.POST, bool needauthorization = true, bool isfullpath = false) where T : class, new()
|
||||
public T getData<T>(string path, object requestobject, requestMethod reqmet = requestMethod.POST, bool needauthorization = true, bool isfullpath = false) where T : class, new()
|
||||
{
|
||||
return AsyncHelper.RunSync<T>(() => getDataAsync<T>(path, requestobject, reqmet, needauthorization, isfullpath));
|
||||
}
|
||||
}
|
||||
internal static class AsyncHelper
|
||||
{
|
||||
private static readonly TaskFactory _myTaskFactory = new
|
||||
TaskFactory(CancellationToken.None,
|
||||
TaskCreationOptions.None,
|
||||
TaskContinuationOptions.None,
|
||||
TaskScheduler.Default);
|
||||
|
||||
public static TResult RunSync<TResult>(Func<Task<TResult>> func)
|
||||
{
|
||||
return AsyncHelper._myTaskFactory
|
||||
.StartNew<Task<TResult>>(func)
|
||||
.Unwrap<TResult>()
|
||||
.GetAwaiter()
|
||||
.GetResult();
|
||||
}
|
||||
|
||||
public static void RunSync(Func<Task> func)
|
||||
{
|
||||
AsyncHelper._myTaskFactory
|
||||
.StartNew<Task>(func)
|
||||
.Unwrap()
|
||||
.GetAwaiter()
|
||||
.GetResult();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1072,8 +1072,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group form-md-line-input" id="DivRetFletes" runat="server" visible="false">
|
||||
¿El Cliente nos retiene IVA por Fletes y Acarreos?:
|
||||
|
||||
¿El Cliente nos retiene IVA por Fletes y Acarreos?:
|
||||
<asp:CheckBox ID="ChkRetIVAFletesAcarreos" CssClass="make-switchsd" runat="server" />
|
||||
</div>
|
||||
<br />
|
||||
@@ -1090,6 +1089,8 @@
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<label for="<%= DdlUsoCFDI.ClientID.ToString()%>">Uso CFDI:</label>
|
||||
<asp:RequiredFieldValidator ID="RFVUsoCFDI" runat="server" InitialValue="-1" ControlToValidate="DdlUsoCFDI" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''USO CFDI''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
@@ -5028,6 +5029,7 @@
|
||||
<asp:DropDownList ID="DdlSucursalUsoCFDI" CssClass="form-control select2me" runat="server" Width="150px" AppendDataBoundItems="true" DataTextField="UsoCFDIDescripcion" DataValueField="CveUsoCFDI">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
|
||||
<label for="<%= DdlSucursalUsoCFDI.ClientID.ToString()%>">Uso CFDI:</label>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -10243,10 +10243,11 @@ Partial Class Clientes
|
||||
' DdlRegimenFiscal.SelectedIndex = -1
|
||||
|
||||
Dim dt As DataTable = GlobalDTRegimenesFiscales(RdTipoPersona.SelectedValue.ToEntero).FiltraParametros("", "CodigoRegimenFiscal")
|
||||
Dim Val As String
|
||||
|
||||
If dt IsNot Nothing AndAlso dt.Rows.Count > 0 Then
|
||||
'verifico que sino existe el valor. lo limpie
|
||||
Dim Val As String = dt.FiltroPrimeroValor("CveRegimenFiscal", "CveRegimenFiscal = " & DdlRegimenFiscal.SelectedValue)
|
||||
Val = dt.FiltroPrimeroValor("CveRegimenFiscal", "CveRegimenFiscal = " & DdlRegimenFiscal.SelectedValue)
|
||||
If Val = "" Then 'sino encuentra valor, lo limpia
|
||||
DdlRegimenFiscal.Items.Clear()
|
||||
DdlRegimenFiscal.SelectedValue = Nothing
|
||||
@@ -10255,7 +10256,7 @@ Partial Class Clientes
|
||||
|
||||
DdlRegimenFiscal.DataSource = dt
|
||||
DdlRegimenFiscal.DataBind()
|
||||
|
||||
DdlRegimenFiscal.SelectedValueExist(Val)
|
||||
UpDatos.Update()
|
||||
End Sub
|
||||
|
||||
|
||||
@@ -461,21 +461,28 @@
|
||||
<asp:TextBox ID="TxtLiqCol8" Width="55px" runat="server" Style="text-align: right;"></asp:TextBox>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%--24--%>
|
||||
<%--25--%>
|
||||
<asp:TemplateField Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtLiqColT" Width="55px" runat="server" Font-Bold="true" Style="text-align: right;" onkeypress="return disablekeys();"></asp:TextBox>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%--25--%>
|
||||
<%--26--%>
|
||||
<asp:TemplateField Visible="false" HeaderText="Anticipo" ItemStyle-Width="120px">
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtAmort" Width="50px" runat="server" Style="text-align: right;" ></asp:TextBox>
|
||||
<asp:DropDownList ID="DdlAnti" runat="server" Width="40px" DataTextField="RazonSocial" DataValueField="CveIE"></asp:DropDownList>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%--27--%>
|
||||
<asp:TemplateField Visible="false" HeaderText="Anticipo2" ItemStyle-Width="120px">
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtAmort2" Width="50px" runat="server" Style="text-align: right;" ></asp:TextBox>
|
||||
<asp:DropDownList ID="DdlAnti2" runat="server" Width="40px" DataTextField="RazonSocial" DataValueField="CveIE"></asp:DropDownList>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<%--26--%>
|
||||
<%--28--%>
|
||||
<asp:TemplateField >
|
||||
<HeaderTemplate>Auxiliar</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
@@ -483,7 +490,7 @@
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<%--27--%>
|
||||
<%--29--%>
|
||||
<asp:TemplateField >
|
||||
<HeaderTemplate>Comp<br> Pago</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
|
||||
@@ -551,7 +551,9 @@ Partial Class Ventas_ClientesAbonar
|
||||
e.Row.FCTextBox("TxtLiqCol8").Visible = False
|
||||
e.Row.FCTextBox("TxtLiqColT").Visible = False
|
||||
e.Row.FCTextBox("TxtAmort").Visible = False
|
||||
e.Row.FCTextBox("TxtAmort2").Visible = False
|
||||
e.Row.FCDropDownList("DdlAnti").Visible = False
|
||||
e.Row.FCDropDownList("DdlAnti2").Visible = False
|
||||
|
||||
End If
|
||||
If e.Row.RowIndex = 1 Then
|
||||
@@ -638,6 +640,7 @@ Partial Class Ventas_ClientesAbonar
|
||||
e.Row.FCTextBox("TxtLiqCol8").Attributes.Add("class", $"ClsSelLiq ClsSelLiqVenta{e.Row.DBCampo("CveVenta")}")
|
||||
e.Row.FCTextBox("TxtLiqColT").Attributes.Add("class", $"ClsSelLiqVentaTotal{e.Row.DBCampo("CveVenta")}")
|
||||
e.Row.FCTextBox("TxtAmort").Attributes.Add("class", $"ClsSelLiqAnt")
|
||||
e.Row.FCTextBox("TxtAmort2").Attributes.Add("class", $"ClsSelLiqAnt")
|
||||
|
||||
e.Row.FCTextBox("TxtLiqCol1").Attributes.Add("onkeyup", $"SumaLiq (this,{e.Row.DBCampo("CveVenta")},{CveMonedaFiltro},{ moneda})")
|
||||
e.Row.FCTextBox("TxtLiqCol2").Attributes.Add("onkeyup", $"SumaLiq(this,{e.Row.DBCampo("CveVenta")},{CveMonedaFiltro},{ moneda})")
|
||||
@@ -648,11 +651,16 @@ Partial Class Ventas_ClientesAbonar
|
||||
e.Row.FCTextBox("TxtLiqCol7").Attributes.Add("onkeyup", $"SumaLiq(this,{e.Row.DBCampo("CveVenta")},{CveMonedaFiltro},{ moneda})")
|
||||
e.Row.FCTextBox("TxtLiqCol8").Attributes.Add("onkeyup", $"SumaLiq(this,{e.Row.DBCampo("CveVenta")},{CveMonedaFiltro},{ moneda})")
|
||||
e.Row.FCTextBox("TxtAmort").Attributes.Add("onkeyup", $"SumaLiq(this,{e.Row.DBCampo("CveVenta")},{CveMonedaFiltro},{ moneda})")
|
||||
e.Row.FCTextBox("TxtAmort2").Attributes.Add("onkeyup", $"SumaLiq(this,{e.Row.DBCampo("CveVenta")},{CveMonedaFiltro},{ moneda})")
|
||||
|
||||
e.Row.FCDropDownList("DdlAnti").DataSource = DtIngresos
|
||||
e.Row.FCDropDownList("DdlAnti").DataBind()
|
||||
e.Row.FCDropDownList("DdlAnti").Items.Insert(0, New ListItem("-", "-1"))
|
||||
|
||||
e.Row.FCDropDownList("DdlAnti2").DataSource = DtIngresos
|
||||
e.Row.FCDropDownList("DdlAnti2").DataBind()
|
||||
e.Row.FCDropDownList("DdlAnti2").Items.Insert(0, New ListItem("-", "-1"))
|
||||
|
||||
End If
|
||||
|
||||
Else
|
||||
@@ -1064,12 +1072,38 @@ Partial Class Ventas_ClientesAbonar
|
||||
Dim TCP As Decimal = 0
|
||||
If DtIngresos IsNot Nothing Then
|
||||
TCP = DtIngresos.FiltroPrimeroValor("TipoCambio", String.Format("CveIE={0}", gvr.FCDropDownList("DdlAnti").SelectedValue))
|
||||
Dim tTCPFecha As Date = DtIngresos.FiltroPrimeroValor("FechaDocumento", String.Format("CveIE={0}", gvr.FCDropDownList("DdlAnti").SelectedValue)).ToDate
|
||||
'considera fluctuación
|
||||
If UsuarioActual.Empresa.Funcionalidad(703) = "1" AndAlso UltimaFluctuacion IsNot Nothing Then
|
||||
If tTCPFecha <= UltimaFluctuacion.FechaFluctuacion Then
|
||||
tTCPFecha = UltimaFluctuacion.FechaFluctuacion
|
||||
TCP = UltimaFluctuacion.TCFluctuacion
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
'se calcula la fluctuación de la aplicación del anticipo, para sumarla en el concepto de fluctuación más abajo
|
||||
FluctuacionAnticipo = ((TCP - tipoCambioVenta) * gvr.FCTextBox("TxtAmort").Text.ToDecimal).RoundSQL
|
||||
MsgError = RegistraAmortizacionAnticipo(ObjMov, CvePrePoliza, gvr.FCDropDownList("DdlAnti").SelectedValue.ToEntero, gvr.FCTextBox("TxtAmort").Text.ToDecimal, TCP, tipoCambioVenta, gvr.DataKey("SerieFolio").ToString)
|
||||
FluctuacionAnticipo = ((TCP - tipoCambioVentaValuacion) * gvr.FCTextBox("TxtAmort").Text.ToDecimal).RoundSQL
|
||||
MsgError = RegistraAmortizacionAnticipo(ObjMov, CvePrePoliza, gvr.FCDropDownList("DdlAnti").SelectedValue.ToEntero, gvr.FCTextBox("TxtAmort").Text.ToDecimal, TCP, tipoCambioVentaValuacion, gvr.DataKey("SerieFolio").ToString)
|
||||
End If
|
||||
|
||||
If gvr.FCDropDownList("DdlAnti2").SelectedValue.ToEntero > 0 Then
|
||||
Dim TCP As Decimal = 0
|
||||
If DtIngresos IsNot Nothing Then
|
||||
TCP = DtIngresos.FiltroPrimeroValor("TipoCambio", String.Format("CveIE={0}", gvr.FCDropDownList("DdlAnti2").SelectedValue))
|
||||
Dim tTCPFecha As Date = DtIngresos.FiltroPrimeroValor("FechaDocumento", String.Format("CveIE={0}", gvr.FCDropDownList("DdlAnti2").SelectedValue)).ToDate
|
||||
'considera fluctuación
|
||||
If UsuarioActual.Empresa.Funcionalidad(703) = "1" AndAlso UltimaFluctuacion IsNot Nothing Then
|
||||
If tTCPFecha <= UltimaFluctuacion.FechaFluctuacion Then
|
||||
tTCPFecha = UltimaFluctuacion.FechaFluctuacion
|
||||
TCP = UltimaFluctuacion.TCFluctuacion
|
||||
End If
|
||||
End If
|
||||
|
||||
End If
|
||||
'se calcula la fluctuación de la aplicación del anticipo, para sumarla en el concepto de fluctuación más abajo
|
||||
FluctuacionAnticipo += ((TCP - tipoCambioVentaValuacion) * gvr.FCTextBox("TxtAmort2").Text.ToDecimal).RoundSQL
|
||||
MsgError = RegistraAmortizacionAnticipo(ObjMov, CvePrePoliza, gvr.FCDropDownList("DdlAnti2").SelectedValue.ToEntero, gvr.FCTextBox("TxtAmort2").Text.ToDecimal, TCP, tipoCambioVentaValuacion, gvr.DataKey("SerieFolio").ToString)
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
@@ -1282,21 +1316,26 @@ Partial Class Ventas_ClientesAbonar
|
||||
Dim tImporteVenta, tImportePago As Decimal
|
||||
Dim Diferencia As Decimal = 0
|
||||
ImporteMovimiento = 0
|
||||
Dim ImportePago As Decimal = gvr.FCTextBox("TxtAbonar").Text.ToDecimal.RoundSQL
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(590) = "1" Then
|
||||
ImportePago = ImportePago - gvr.FCTextBox("TxtAmort").Text.ToDecimal - gvr.FCTextBox("TxtAmort2").Text.ToDecimal
|
||||
End If
|
||||
|
||||
tipoCambioVentaDiferenciaCambiaria = If(gvr.DataKey("Fecha").ToDate < FechaUltimaFluctuacion, TipoCambioFluctuacion, gvr.DataKey("TipoCambio").ToDecimal)
|
||||
|
||||
If CveMonedaVenta = 1 And CveMoneda <> 1 Then
|
||||
'factura pesos, pago en dolares
|
||||
tImporteVenta = gvr.FCTextBox("TxtAbonar").Text.ToDecimal.RoundSQL
|
||||
tImportePago = (((gvr.FCTextBox("TxtAbonar").Text.ToDecimal) * tipoCambioVenta / tipoCambioPago).RoundSQL * tipoCambioPago).RoundSQL
|
||||
tImporteVenta = ImportePago
|
||||
tImportePago = ((ImportePago * tipoCambioVenta / tipoCambioPago).RoundSQL * tipoCambioPago).RoundSQL
|
||||
ElseIf CveMonedaVenta <> 1 And CveMoneda <> 1 Then
|
||||
'factura dolares, pago en dolares
|
||||
tImporteVenta = ((gvr.FCTextBox("TxtAbonar").Text.ToDecimal) * tipoCambioVentaValuacion).RoundSQL
|
||||
tImportePago = ((gvr.FCTextBox("TxtAbonar").Text.ToDecimal) * tipoCambioPago).RoundSQL
|
||||
tImporteVenta = (ImportePago * tipoCambioVentaValuacion).RoundSQL
|
||||
tImportePago = (ImportePago * tipoCambioPago).RoundSQL
|
||||
ElseIf CveMonedaVenta <> 1 And CveMoneda = 1 Then
|
||||
'factura dolares, pago en pesos
|
||||
tImporteVenta = ((gvr.FCTextBox("TxtAbonar").Text.ToDecimal) * tipoCambioVentaValuacion).RoundSQL
|
||||
tImportePago = ((gvr.FCTextBox("TxtAbonar").Text.ToDecimal) * tipoCambioPago).RoundSQL
|
||||
tImporteVenta = (ImportePago * tipoCambioVentaValuacion).RoundSQL
|
||||
tImportePago = (ImportePago * tipoCambioPago).RoundSQL
|
||||
End If
|
||||
|
||||
'If FluctuacionAnticipo <> 0 Then
|
||||
@@ -1323,10 +1362,10 @@ Partial Class Ventas_ClientesAbonar
|
||||
If FuncionalidadFluctuacionImpuestos Then
|
||||
Dim TCImpuestos As Decimal = tipoCambioPago
|
||||
|
||||
Diferencia -= (((gvr.DataKey("IVA").ToDecimal * PorcentajePago) * tipoCambioVenta) - ((gvr.DataKey("IVA").ToDecimal * PorcentajePago) * TCImpuestos)) 'Añadimos la diferencia de ganancia en el IVA
|
||||
Diferencia -= (((gvr.DataKey("RetIVA").ToDecimal * PorcentajePago) * tipoCambioVenta) - ((gvr.DataKey("RetIVA").ToDecimal * PorcentajePago) * TCImpuestos)) 'Añadimos la diferencia de ganancia en el RetIVA
|
||||
Diferencia -= (((gvr.DataKey("RetISR").ToDecimal * PorcentajePago) * tipoCambioVenta) - ((gvr.DataKey("RetISR").ToDecimal * PorcentajePago) * TCImpuestos)) 'Añadimos la diferencia de ganancia en el RetISR
|
||||
Diferencia -= (((gvr.DataKey("IEPS").ToDecimal * PorcentajePago) * tipoCambioVenta) - ((gvr.DataKey("IEPS").ToDecimal * PorcentajePago) * TCImpuestos)) 'Añadimos la diferencia de ganancia en el IEPS
|
||||
Diferencia -= (((gvr.DataKey("IVA").ToDecimal * PorcentajePago) * tipoCambioVentaValuacion) - ((gvr.DataKey("IVA").ToDecimal * PorcentajePago) * TCImpuestos)) 'Añadimos la diferencia de ganancia en el IVA
|
||||
Diferencia -= (((gvr.DataKey("RetIVA").ToDecimal * PorcentajePago) * tipoCambioVentaValuacion) - ((gvr.DataKey("RetIVA").ToDecimal * PorcentajePago) * TCImpuestos)) 'Añadimos la diferencia de ganancia en el RetIVA
|
||||
Diferencia -= (((gvr.DataKey("RetISR").ToDecimal * PorcentajePago) * tipoCambioVentaValuacion) - ((gvr.DataKey("RetISR").ToDecimal * PorcentajePago) * TCImpuestos)) 'Añadimos la diferencia de ganancia en el RetISR
|
||||
Diferencia -= (((gvr.DataKey("IEPS").ToDecimal * PorcentajePago) * tipoCambioVentaValuacion) - ((gvr.DataKey("IEPS").ToDecimal * PorcentajePago) * TCImpuestos)) 'Añadimos la diferencia de ganancia en el IEPS
|
||||
Diferencia = Diferencia.RoundSQL
|
||||
End If
|
||||
|
||||
@@ -1398,12 +1437,10 @@ Partial Class Ventas_ClientesAbonar
|
||||
MsgError = "No se pudo insertar la póliza"
|
||||
Exit For
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
Next
|
||||
|
||||
|
||||
If gvr.FCCheckBox("ChkGenerarNC").Checked AndAlso ObjFactura IsNot Nothing Then
|
||||
ObjFactura.DescuentoProntoPago = gvr.DataKey("DescuentoProntoPago").ToDecimal()
|
||||
ListaFacturasGenerarNC.Add(ObjFactura)
|
||||
@@ -1465,44 +1502,6 @@ Partial Class Ventas_ClientesAbonar
|
||||
|
||||
MsgError = RegistraAmortizacionAnticipo(ObjMov, CvePrePoliza, CveIE, TxtImporte.Text.ToDecimal, tipoCambioPago, tipoCambioVenta, TxtObservaciones.Text)
|
||||
|
||||
'If CveMonedaPago = 2 Then
|
||||
' 'rmf faltan las cuentas
|
||||
' If IdCtaContMonedaComplementariaAnticipo > 0 Then
|
||||
' If CveMonedaPago = 2 AndAlso CveMonedaFiltro = 1 Then 'Si la venta viene en pesos y se va a pagar en DOLARES
|
||||
' tipoCambioPago = TxtTCDolares.Text.ToDecimal
|
||||
' ElseIf CveMonedaPago = 2 AndAlso CveMonedaFiltro = 2 Then
|
||||
' tipoCambioPago = TxtTCDolaresDolares.Text.ToDecimal
|
||||
' End If
|
||||
|
||||
' If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, TxtImporte.Text.ToDecimal, TxtObservaciones.Text, 92, TxtObservaciones.Text + If(TxtTC.Visible, $" TC:{TxtTC.Text}", If(CveMoneda = 2, $" TC:{tipoCambioVenta}", "")), TxtFechaDocumento.Text, IdCtaContMonedaExtranjeraAnticipo, -1, CveIE, -1, -1, -1, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=TxtImporte.Text.Trim.ToDecimal, TipoCambio:=tipoCambioPago, TipoCambioPago:=tipoCambioPago) Then
|
||||
' MsgError = "No se pudo insertar la póliza"
|
||||
' End If
|
||||
|
||||
' If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, If(CveMoneda = 1 AndAlso TxtTC.Visible, TxtImporte.Text.ToDecimal / TxtTC.Text.ToDecimal, TxtImporte.Text.ToDecimal), TxtObservaciones.Text, 227, TxtObservaciones.Text + If(TxtTC.Visible, $" TC:{TxtTC.Text}", If(CveMoneda = 2, $" TC:{tipoCambioVenta}", "")), TxtFechaDocumento.Text, IdCtaContMonedaComplementariaAnticipo, -1, CveIE, -1, -1, -1, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=If(CveMoneda = 2, (TxtImporte.Text.Trim.ToDecimal * tipoCambioPago) - TxtImporte.Text.Trim.ToDecimal, TxtImporte.Text.Trim.ToDecimal), ImporteME:=If(CveMoneda = 2, TxtImporte.Text.Trim.ToDecimal, 0), TipoCambio:=tipoCambioPago, TipoCambioPago:=tipoCambioPago) Then
|
||||
' MsgError = "No se pudo insertar la póliza"
|
||||
' End If
|
||||
' Else
|
||||
' If CveMoneda = 2 AndAlso CveMonedaFiltro = 1 Then 'Si la venta viene en pesos y se va a pagar en DOLARES
|
||||
' tipoCambioPago = TxtTCDolares.Text.ToDecimal
|
||||
' ElseIf CveMoneda = 2 AndAlso CveMonedaFiltro = 2 Then
|
||||
' tipoCambioPago = TxtTCDolaresDolares.Text.ToDecimal
|
||||
' End If
|
||||
|
||||
' If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, TxtImporte.Text.ToDecimal, TxtObservaciones.Text, 92, TxtObservaciones.Text + If(CveMoneda = 2, $" TC:{tipoCambioPago}", ""), TxtFechaDocumento.Text, IdCtaContMonedaExtranjeraAnticipo, -1, CveIE, -1, -1, -1, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=If(CveMoneda = 2, TxtImporte.Text.Trim.ToDecimal * tipoCambioPago, TxtImporte.Text.Trim.ToDecimal), ImporteME:=If(CveMoneda = 2, TxtImporte.Text.ToDecimal, 0), TipoCambio:=tipoCambioPago, TipoCambioPago:=tipoCambioPago) Then
|
||||
' MsgError = "No se pudo insertar la póliza"
|
||||
' End If
|
||||
' End If
|
||||
'Else
|
||||
' If CveMoneda = 2 AndAlso CveMonedaFiltro = 1 Then 'Si la venta viene en pesos y se va a pagar en DOLARES
|
||||
' tipoCambioPago = TxtTCDolares.Text.ToDecimal
|
||||
' ElseIf CveMoneda = 2 AndAlso CveMonedaFiltro = 2 Then
|
||||
' tipoCambioPago = TxtTCDolaresDolares.Text.ToDecimal
|
||||
' End If
|
||||
|
||||
' If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, TxtImporte.Text.ToDecimal, TxtObservaciones.Text, 92, TxtObservaciones.Text + If(CveMoneda = 2, $" TC:{tipoCambioPago}", ""), TxtFechaDocumento.Text, IdCtaAnticipo, -1, CveIE, -1, -1, -1, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=If(CveMoneda = 2, TxtImporte.Text.Trim.ToDecimal * tipoCambioPago, TxtImporte.Text.Trim.ToDecimal), ImporteME:=If(CveMoneda = 2, TxtImporte.Text.ToDecimal, 0), TipoCambio:=tipoCambioPago, TipoCambioPago:=tipoCambioPago) Then
|
||||
' MsgError = "No se pudo insertar la póliza"
|
||||
' End If
|
||||
'End If
|
||||
End If
|
||||
|
||||
If MsgError = "" AndAlso UsuarioActual.Empresa.Funcionalidad(220) <> "" Then
|
||||
@@ -1701,27 +1700,27 @@ Partial Class Ventas_ClientesAbonar
|
||||
Dim MsgError As String = ""
|
||||
If CveMonedaPago = 2 Then
|
||||
'rmf faltan las cuentas
|
||||
'If IdCtaContMonedaComplementariaAnticipo > 0 Then
|
||||
If CveMonedaPago = 2 AndAlso CveMonedaFiltro = 1 Then 'Si la venta viene en pesos y se va a pagar en DOLARES
|
||||
tipoCambioPago = TxtTCDolares.Text.ToDecimal
|
||||
ElseIf CveMonedaPago = 2 AndAlso CveMonedaFiltro = 2 Then
|
||||
tipoCambioPago = TxtTCDolaresDolares.Text.ToDecimal
|
||||
End If
|
||||
|
||||
'If CveMonedaPago = 2 AndAlso CveMonedaFiltro = 1 Then 'Si la venta viene en pesos y se va a pagar en DOLARES
|
||||
' tipoCambioPago = TxtTCDolares.Text.ToDecimal
|
||||
'ElseIf CveMonedaPago = 2 AndAlso CveMonedaFiltro = 2 Then
|
||||
' tipoCambioPago = TxtTCDolaresDolares.Text.ToDecimal
|
||||
'End If
|
||||
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, Importe, TxtObservaciones.Text, 92, Referencia, TxtFechaDocumento.Text, IdCtaContMonedaExtranjeraAnticipo, -1, CveIE, -1, -1, -1, CveCliente, ImporteMX:=Importe, TipoCambio:=tipoCambioPago, TipoCambioPago:=tipoCambioPago) Then
|
||||
MsgError = "No se pudo insertar la póliza"
|
||||
End If
|
||||
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, If(CveMoneda = 1 AndAlso TxtTC.Visible, Importe / TxtTC.Text.ToDecimal, Importe), Referencia, 227, TxtObservaciones.Text + If(TxtTC.Visible, $" TC:{TxtTC.Text}", If(CveMoneda = 2, $" TC:{tipoCambioVenta}", "")), TxtFechaDocumento.Text, IdCtaContMonedaComplementariaAnticipo, -1, CveIE, -1, -1, -1, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=If(CveMoneda = 2, (Importe * tipoCambioPago) - Importe, Importe), ImporteME:=If(CveMoneda = 2, Importe, 0), TipoCambio:=tipoCambioPago, TipoCambioPago:=tipoCambioPago) Then
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, If(CveMoneda = 1 AndAlso TxtTC.Visible, Importe / TxtTC.Text.ToDecimal, Importe), Referencia, 227, TxtObservaciones.Text + If(TxtTC.Visible, $" TC:{TxtTC.Text}", If(CveMoneda = 2, $" TC:{tipoCambioPago}", "")), TxtFechaDocumento.Text, IdCtaContMonedaComplementariaAnticipo, -1, CveIE, -1, -1, -1, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=If(CveMoneda = 2, (Importe * tipoCambioPago) - Importe, Importe), ImporteME:=If(CveMoneda = 2, Importe, 0), TipoCambio:=tipoCambioPago, TipoCambioPago:=tipoCambioPago) Then
|
||||
MsgError = "No se pudo insertar la póliza"
|
||||
End If
|
||||
|
||||
Else
|
||||
If CveMoneda = 2 AndAlso CveMonedaFiltro = 1 Then 'Si la venta viene en pesos y se va a pagar en DOLARES
|
||||
tipoCambioPago = TxtTCDolares.Text.ToDecimal
|
||||
ElseIf CveMoneda = 2 AndAlso CveMonedaFiltro = 2 Then
|
||||
tipoCambioPago = TxtTCDolaresDolares.Text.ToDecimal
|
||||
End If
|
||||
'If CveMoneda = 2 AndAlso CveMonedaFiltro = 1 Then 'Si la venta viene en pesos y se va a pagar en DOLARES
|
||||
' tipoCambioPago = TxtTCDolares.Text.ToDecimal
|
||||
'ElseIf CveMoneda = 2 AndAlso CveMonedaFiltro = 2 Then
|
||||
' tipoCambioPago = TxtTCDolaresDolares.Text.ToDecimal
|
||||
'End If
|
||||
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, Importe, TxtObservaciones.Text, 92, TxtObservaciones.Text + If(CveMoneda = 2, $" TC:{tipoCambioPago}", ""), TxtFechaDocumento.Text, IdCtaAnticipo, -1, CveIE, -1, -1, -1, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=If(CveMoneda = 2, Importe * tipoCambioPago, Importe), ImporteME:=If(CveMoneda = 2, Importe, 0), TipoCambio:=tipoCambioPago, TipoCambioPago:=tipoCambioPago) Then
|
||||
MsgError = "No se pudo insertar la póliza"
|
||||
@@ -2885,7 +2884,7 @@ Partial Class Ventas_ClientesAbonar
|
||||
#Region "LIQUIDACION"
|
||||
|
||||
Protected Sub TimTiempo_Tick(sender As Object, e As EventArgs)
|
||||
Dim a As String = "se recarga para que no pierda sesíón el registro puede tardar más de una hora en llenar todos los datos" 'solo para que se ejecute sin que afecte a lo demás
|
||||
Dim a As String = "se recarga para que no pierda sesión el registro puede tardar más de una hora en llenar todos los datos" 'solo para que se ejecute sin que afecte a lo demás
|
||||
End Sub
|
||||
|
||||
Protected Sub ChkLiquidacion_CheckedChanged(sender As Object, e As EventArgs)
|
||||
@@ -2910,9 +2909,10 @@ Partial Class Ventas_ClientesAbonar
|
||||
GvCxC.Columns(24).Visible = True
|
||||
GvCxC.Columns(25).Visible = True
|
||||
GvCxC.Columns(26).Visible = True 'anticipos
|
||||
GvCxC.Columns(27).Visible = True 'anticipos2
|
||||
|
||||
GvCxC.Columns(27).Visible = False
|
||||
GvCxC.Columns(28).Visible = False
|
||||
GvCxC.Columns(29).Visible = False
|
||||
|
||||
|
||||
Else
|
||||
@@ -2932,10 +2932,11 @@ Partial Class Ventas_ClientesAbonar
|
||||
GvCxC.Columns(23).Visible = False
|
||||
GvCxC.Columns(24).Visible = False
|
||||
GvCxC.Columns(25).Visible = False
|
||||
GvCxC.Columns(26).Visible = False
|
||||
GvCxC.Columns(26).Visible = False 'anticipos
|
||||
GvCxC.Columns(27).Visible = False 'anticipos2
|
||||
|
||||
GvCxC.Columns(27).Visible = True
|
||||
GvCxC.Columns(28).Visible = True
|
||||
GvCxC.Columns(29).Visible = True
|
||||
|
||||
End If
|
||||
|
||||
|
||||
Reference in New Issue
Block a user