-- option explicit

-- repie, filtro por usuario
This commit is contained in:
2023-08-31 21:54:13 -07:00
parent 3c3268bef1
commit f4d4d5f264
23 changed files with 356 additions and 418 deletions

View File

@@ -4328,7 +4328,7 @@ Partial Class Compras_eFacturas
Dim XmlRutaArchivo As String = File.ReadAllText(String.Format("{0}{1}\{2}", Destino, gvrow.DataKey("RFCDe"), gvrow.DataKey("XML")))
Dim PDFRutaArchivo As String = String.Format("{0}{1}\{2}", Destino, gvrow.DataKey("RFCDe"), gvrow.DataKey("PDF"))
Dim RutaRDLC = String.Format("{0}{1}", DirectorioBaseEmpresas, "Empresas\Grales\Formatos\ReciboDePagoGOPDF.rdlc")
Dim RutaRDLC As String = String.Format("{0}{1}", DirectorioBaseEmpresas, "Empresas\Grales\Formatos\ReciboDePagoGOPDF.rdlc")
@@ -4790,11 +4790,9 @@ Partial Class Compras_eFacturas
ObjCompras.Dispose()
If VinculacionValida Then
Dim TieneError = False
Dim TieneError As Boolean = False
Dim ObjCompra As New ClsCompras
ObjCompra.IniciaTransacSQL()
@@ -5942,7 +5940,7 @@ Public Class Compra2
End Function
Private Function AjustesValidacion() As Boolean
Dim respuesta = True
Dim respuesta As Boolean = True
'VALIDA IMPORTES
If Not ValidaTotalesGuardar() Then
respuesta = False
@@ -5969,7 +5967,7 @@ Public Class Compra2
End Function
Private Function ValidaTotalesGuardar() As Boolean
Dim EsValido = True
Dim EsValido As Boolean = True
'VALIDA IMPORTES
'VALIDA TOTAL CON LOS IMPORTES TOTALES
@@ -6003,7 +6001,7 @@ Public Class Compra2
TempRetISR = RetISR
TempTotal = Math.Round(TempSubTotal2 + TempIVA + TempIEPS - TempRetIVA - TempRetISR + OtrosImpuestos - Amortizacion, 2)
DifTotales = Total - TempTotal
Dim DiferenciaPermitida = 0.6
Dim DiferenciaPermitida As Decimal = 0.6D
If Math.Abs(DifTotales) > DiferenciaPermitida Then
Errores.AppendLine($"Los importes de los conceptos (Productos/Servicios) no cuadran con el total. Por favor verifique y vuelva a intentar.[{Math.Abs(DifTotales) - DiferenciaPermitida}]")
@@ -6015,7 +6013,7 @@ Public Class Compra2
SubTotal2Original = SubTotal2
End If
Dim DiferenciaSubtotales = 0.0D
Dim DiferenciaSubtotales As Decimal = 0
If CveCompra > 0 Or CveFactura > 0 Or OCVinculada Then
If SubTotalOriginal = Nothing Then
@@ -6528,7 +6526,7 @@ Public Class Compra2
End If
End If
Dim SubTotalIEPS = TmpDT.SUM("Total").ToString.ToDecimal
Dim SubTotalIEPS As Decimal = TmpDT.SUMD("Total")
Me.SubTotal = Math.Round(SubTotalIEPS, 2)
Me.SubTotalConceptos = Math.Round(SubTotalIEPS, 2)
@@ -6548,8 +6546,8 @@ Public Class Compra2
Row = TmpDT.NewRow()
Dim Retorno As Integer = 0
Dim CveContrato = -1
Dim CveSubProyecto = -1
Dim CveContrato As Integer = -1
Dim CveSubProyecto As Integer = -1
Dim Valores As String()
''CONTRATOS
@@ -6612,7 +6610,7 @@ Public Class Compra2
End Try
Dim DecimalesPermitidos = 6
Dim DecimalesPermitidos As Integer = 6
Row("CveConcepto") = TmpDT.Rows.Count + 1
Row("Cantidad") = Math.Round(Cantidad, DecimalesPermitidos)
@@ -6808,10 +6806,10 @@ Public Class Compra2
DrPS("CveContratoDetalle") = -1
'IMPORTES - [CANTIDAD Y PRECIO]
Dim Cantidad = DrPS("Cantidad").ToString.ToDouble
Dim PU = DrPS("PU").ToString.ToDouble
Dim Descuento = DrPS("Descuento").ToString.ToDouble
Dim Total = (Cantidad * PU) - Descuento
Dim Cantidad As Double = DrPS("Cantidad").ToString.ToDouble
Dim PU As Double = DrPS("PU").ToString.ToDouble
Dim Descuento As Double = DrPS("Descuento").ToString.ToDouble
Dim Total As Double = (Cantidad * PU) - Descuento
DrPS("NoDeducible") = NoDeducible
Dim PSRow As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePS).FiltroPrimero("")
@@ -7032,10 +7030,10 @@ Public Class Compra2
For Each Row As DataRow In Me.TmpDT.Rows
Dim TipoRecepcion As Integer = -1
Dim Referencia = ""
Dim Referencia As String = ""
Dim EsNoDeducible As Boolean = False
Dim CveAF = If(Row("CveActivoFijo").ToString.ToEntero > 0 AndAlso Row("TipoAF").ToString.ToEntero = 1, Row("CveActivoFijo").ToString.ToEntero, -1)
Dim CveAFC = If(Row("CveActivoFijo").ToString.ToEntero > 0 AndAlso Row("TipoAF").ToString.ToEntero = 2, Row("CveActivoFijo").ToString.ToEntero, -1)
Dim CveAF As Integer = If(Row("CveActivoFijo").ToString.ToEntero > 0 AndAlso Row("TipoAF").ToString.ToEntero = 1, Row("CveActivoFijo").ToString.ToEntero, -1)
Dim CveAFC As Integer = If(Row("CveActivoFijo").ToString.ToEntero > 0 AndAlso Row("TipoAF").ToString.ToEntero = 2, Row("CveActivoFijo").ToString.ToEntero, -1)
If Not ObjCompras.AddCompraDetalle(Me.CveCompra, Row("CveUM").ToString.ToEntero, Row("CvePS").ToString.ToEntero, Row("CveSubProyecto").ToString.ToEntero, -1, CveAF,
Row("Cantidad").ToString.ToDecimal, Row("PU").ToString.ToDecimal, Row("IVA").ToString.ToDecimal, Row("Total").ToString.ToDecimal, Row("Descuento").ToString.ToDecimal,