-- option explicit
-- repie, filtro por usuario
This commit is contained in:
@@ -952,6 +952,10 @@ Partial Class Compras_Proveedores
|
||||
If drr("IdCtaContExtranjera").ToString <> "" Then DdlCtaContExtranjera.Items.Add(New ListItem(drr("CtaContExtranjera").ToString, drr("IdCtaContExtranjera").ToString)) : DdlCtaContExtranjera.SelectedValue = drr("IdCtaContExtranjera").ToString
|
||||
If drr("IdCtaContComplementaria").ToString <> "" Then DdlCtaContComplementaria.Items.Add(New ListItem(drr("CtaContComplementaria").ToString, drr("IdCtaContComplementaria").ToString)) : DdlCtaContComplementaria.SelectedValue = drr("IdCtaContComplementaria").ToString
|
||||
|
||||
If drr("IdCtaContAnticipos").ToString <> "" Then DdlCtaContAnticipos.Items.Add(New ListItem(drr("CtaContAnticipos").ToString, drr("IdCtaContAnticipos").ToString)) : DdlCtaContAnticipos.SelectedValueExist(drr("IdCtaContAnticipos").ToString)
|
||||
If drr("IdCtaContAnticiposExtranjera").ToString <> "" Then DdlCtaContAnticiposExtranjera.Items.Add(New ListItem(drr("CtaContAnticiposExtranjera").ToString, drr("IdCtaContAnticiposExtranjera").ToString)) : DdlCtaContAnticiposExtranjera.SelectedValue = drr("IdCtaContAnticiposExtranjera").ToString
|
||||
If drr("IdCtaContAnticiposComplementaria").ToString <> "" Then DdlCtaContAnticiposComplementaria.Items.Add(New ListItem(drr("CtaContAnticiposComplementaria").ToString, drr("IdCtaContAnticiposComplementaria").ToString)) : DdlCtaContAnticiposComplementaria.SelectedValue = drr("IdCtaContAnticiposComplementaria").ToString
|
||||
|
||||
DdlCtaContProveedores.Attributes.Add("onclick", "CargaCuentas(1);")
|
||||
DdlCtaContAcreedores.Attributes.Add("onclick", "CargaCuentas(6);")
|
||||
DdlCtaContAnticipos.Attributes.Add("onclick", "CargaCuentas(2);")
|
||||
@@ -1857,7 +1861,10 @@ Partial Class Compras_Proveedores
|
||||
CveConfianzaProveedor:=DdlConfianzaProveedor.SelectedValue.ToEntero(), CveRegimenFiscal:=DdlRegimenFiscal.SelectedValue.ToEntero,
|
||||
IdCtaContProveedores:=DdlCtaContProveedores.SelectedValue.ToEntero, CtaContProveedores:=DdlCtaContProveedores.SelectedItem.Text,
|
||||
IdCtaContExtranjera:=DdlCtaContExtranjera.SelectedValue.ToEntero, CtaContExtranjera:=DdlCtaContExtranjera.SelectedItem.Text,
|
||||
IdCtaContComplementaria:=DdlCtaContComplementaria.SelectedValue.ToEntero, CtaContComplementaria:=DdlCtaContComplementaria.SelectedItem.Text) Then
|
||||
IdCtaContComplementaria:=DdlCtaContComplementaria.SelectedValue.ToEntero, CtaContComplementaria:=DdlCtaContComplementaria.SelectedItem.Text,
|
||||
IdCtaContAnticipos:=DdlCtaContAnticipos.SelectedValue.ToEntero, CtaContAnticipos:=DdlCtaContAnticipos.SelectedItem.Text,
|
||||
IdCtaContAnticiposExtranjera:=DdlCtaContAnticiposExtranjera.SelectedValue.ToEntero, CtaContAnticiposExtranjera:=DdlCtaContAnticiposExtranjera.SelectedItem.Text,
|
||||
IdCtaContAnticiposComplementaria:=DdlCtaContAnticiposComplementaria.SelectedValue.ToEntero, CtaContAnticiposComplementaria:=DdlCtaContAnticiposComplementaria.SelectedItem.Text) Then
|
||||
|
||||
GlobalDTCompProveedores(UsuarioActual.CveEmpresa) = Nothing
|
||||
|
||||
|
||||
@@ -424,12 +424,10 @@
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<br />
|
||||
|
||||
<asp:UpdatePanel ID="UpChequesFYE" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
|
||||
@@ -244,6 +244,7 @@
|
||||
<asp:ListItem Text="Factura" Value="Fac"></asp:ListItem>
|
||||
<asp:ListItem Text="Nota de Crédito" Value="NC"></asp:ListItem>
|
||||
<asp:ListItem Text="Anticipo" Value="Ant" ></asp:ListItem>
|
||||
<asp:ListItem Text="Devolución" Value="DEV" ></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -235,6 +235,7 @@
|
||||
<asp:ListItem Text="Factura" Value="Fac"></asp:ListItem>
|
||||
<asp:ListItem Text="Nota de Crédito" Value="NC"></asp:ListItem>
|
||||
<asp:ListItem Text="Anticipo" Value="Ant" ></asp:ListItem>
|
||||
<asp:ListItem Text="Devolución" Value="DEV" ></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -298,8 +298,8 @@ Partial Class Compras_RepProductosServiciosDetalle
|
||||
Private Sub CargaDatos()
|
||||
Dim ObjCompras As New ClsCompras()
|
||||
|
||||
Dim FechaI = If(IsDate(txtFechaI.Text.Trim()), txtFechaI.Text.Trim().ToDate, MinFecha)
|
||||
Dim FechaF = If(IsDate(txtFechaF.Text.Trim()), txtFechaF.Text.Trim().ToDate, MaxFecha)
|
||||
Dim FechaI As Date = If(IsDate(txtFechaI.Text.Trim()), txtFechaI.Text.Trim().ToDate, MinFecha)
|
||||
Dim FechaF As Date = If(IsDate(txtFechaF.Text.Trim()), txtFechaF.Text.Trim().ToDate, MaxFecha)
|
||||
TCEspecifico = If(TxtEspecifico.Text.Trim = "", -1, TxtEspecifico.Text.ToEntero)
|
||||
|
||||
Dim TipoGasto As String = IIf(DdlTipoGasto.GetSelectedValuesM = "", "-1", DdlTipoGasto.GetSelectedValuesM).ToString
|
||||
@@ -331,8 +331,8 @@ Partial Class Compras_RepProductosServiciosDetalle
|
||||
Private Sub CargaDatos(Proyecto As Integer, SubProyecto As String, Categoria As String, Clasificacion As Integer, PS As Integer, Proveedor As Integer, Usuario As Integer, Estatus As Integer, Grupo As Integer, Familia As Integer, SubFamilia As Integer, TipoActivoFijo As String, SubTipoActivoFijo As String, ActivoFijo As Integer, TipoGasto As String, CveCultivo As String)
|
||||
Dim ObjCompras As New ClsCompras()
|
||||
|
||||
Dim FechaI = If(IsDate(txtFechaI.Text.Trim()), txtFechaI.Text.Trim().ToDate, MinFecha)
|
||||
Dim FechaF = If(IsDate(txtFechaF.Text.Trim()), txtFechaF.Text.Trim().ToDate, MaxFecha)
|
||||
Dim FechaI As Date = If(IsDate(txtFechaI.Text.Trim()), txtFechaI.Text.Trim().ToDate, MinFecha)
|
||||
Dim FechaF As Date = If(IsDate(txtFechaF.Text.Trim()), txtFechaF.Text.Trim().ToDate, MaxFecha)
|
||||
If RblTipoCambio.SelectedValue.ToEntero = 3 And TxtEspecifico.Text <> "" Then TCEspecifico = TxtEspecifico.Text.ToDouble Else TCEspecifico = -1
|
||||
|
||||
If ObjCompras.GetRepProductosServiciosDetalle(Proyecto, SubProyecto, Categoria, Clasificacion, PS, FechaI, FechaF, Proveedor, Usuario, Estatus, UsuarioActual.CveEmpresa, Grupo,
|
||||
@@ -487,32 +487,30 @@ Partial Class Compras_RepProductosServiciosDetalle
|
||||
|
||||
Private Sub GenerarPDF(Optional Formato As String = "PDF")
|
||||
|
||||
Dim FechaI = If(IsDate(txtFechaI.Text.Trim()), txtFechaI.Text.Trim().ToDate, MinFecha)
|
||||
Dim FechaF = If(IsDate(txtFechaF.Text.Trim()), txtFechaF.Text.Trim().ToDate, MaxFecha)
|
||||
Dim FechaI As Date = If(IsDate(txtFechaI.Text.Trim()), txtFechaI.Text.Trim().ToDate, MinFecha)
|
||||
Dim FechaF As Date = If(IsDate(txtFechaF.Text.Trim()), txtFechaF.Text.Trim().ToDate, MaxFecha)
|
||||
If txtFechaI.Text = "" Then FechaI = "-1".ToDate
|
||||
If txtFechaF.Text = "" Then FechaF = "-1".ToDate
|
||||
Dim Grupo = If(DdlGrupo.SelectedValue = "-1", "", $" <b>Grupo:</b> {DdlGrupo.SelectedItem.Text}")
|
||||
Dim Proyecto = If(DdlProyecto.SelectedValue = "-1", "", $" <b>Proyecto:</b> {DdlProyecto.SelectedItem.Text}")
|
||||
Dim Grupo As String = If(DdlGrupo.SelectedValue = "-1", "", $" <b>Grupo:</b> {DdlGrupo.SelectedItem.Text}")
|
||||
Dim Proyecto As String = If(DdlProyecto.SelectedValue = "-1", "", $" <b>Proyecto:</b> {DdlProyecto.SelectedItem.Text}")
|
||||
'Dim SubProyecto = If(DdlSubProyecto.SelectedValue = "-1", "", $" <b>SubProyecto:</b> {DdlSubProyecto.SelectedItem.Text}")
|
||||
'Dim Categoria = If(DdlCategoria.SelectedValue = "-1", "", $" <b>Categoria:</b> {DdlCategoria.SelectedItem.Text}")
|
||||
Dim Clasificacion = If(DdlClasificacion.SelectedValue = "-1", "", $" <b>Clasificación:</b> {DdlClasificacion.SelectedItem.Text}")
|
||||
Dim PS = If(DdlPS.SelectedValue = "-1", "", $" <b>P.S:</b> {DdlPS.SelectedText}")
|
||||
Dim Proveedor = If(DdlProveedor.SelectedValue = "-1", "", $" <b>Proveedor:</b> {DdlProveedor.SelectedText}")
|
||||
Dim Estatus = If(DdlEstatus.SelectedValue = "-1", "", $" <b>Estatus:</b> {DdlEstatus.SelectedItem.Text}")
|
||||
Dim Clasificacion As String = If(DdlClasificacion.SelectedValue = "-1", "", $" <b>Clasificación:</b> {DdlClasificacion.SelectedItem.Text}")
|
||||
Dim PS As String = If(DdlPS.SelectedValue = "-1", "", $" <b>P.S:</b> {DdlPS.SelectedText}")
|
||||
Dim Proveedor As String = If(DdlProveedor.SelectedValue = "-1", "", $" <b>Proveedor:</b> {DdlProveedor.SelectedText}")
|
||||
Dim Estatus As String = If(DdlEstatus.SelectedValue = "-1", "", $" <b>Estatus:</b> {DdlEstatus.SelectedItem.Text}")
|
||||
'Dim TipoAF = If(DdlTipoAF.SelectedValue = "-1", "", $" <b>Tipo AF:</b> {DdlTipoAF.SelectedItem.Text}")
|
||||
Dim FechaIn As String = $" <b>Fecha Inicio:</b> {txtFechaI.Text}"
|
||||
Dim FechaFn As String = $" <b>Fecha Fin:</b> {txtFechaF.Text}"
|
||||
If txtFechaI.Text = "" Then FechaIn = ""
|
||||
If txtFechaF.Text = "" Then FechaFn = ""
|
||||
|
||||
Dim TCEspecifico = If(TxtEspecifico.Text.Trim = "", -1, TxtEspecifico.Text.ToEntero)
|
||||
|
||||
'PARAMETROS EN LISTBOXs
|
||||
Dim SubProyecto = If(DdlSubProyecto.GetSelectedText = "", "", $" <b>SubProyecto:</b> {DdlSubProyecto.GetSelectedText}")
|
||||
Dim Categoria = If(DdlCategoria.GetSelectedText = "", "", $" <b>Categoria:</b> {DdlCategoria.GetSelectedText}")
|
||||
Dim TipoGasto = If(DdlTipoGasto.GetSelectedText = "", "", $" <b>Tipo Gasto:</b> {DdlTipoGasto.GetSelectedText}")
|
||||
Dim TipoAF = If(DdlTipoAF.GetSelectedText = "", "", $" <b>Tipo AF:</b> {DdlTipoAF.GetSelectedText}")
|
||||
Dim SubTipoAF = If(DdlSubTipoAF.GetSelectedText = "", "", $" <b>SubTipo AF:</b> {DdlSubTipoAF.GetSelectedText}")
|
||||
Dim SubProyecto As String = If(DdlSubProyecto.GetSelectedText = "", "", $" <b>SubProyecto:</b> {DdlSubProyecto.GetSelectedText}")
|
||||
Dim Categoria As String = If(DdlCategoria.GetSelectedText = "", "", $" <b>Categoria:</b> {DdlCategoria.GetSelectedText}")
|
||||
Dim TipoGasto As String = If(DdlTipoGasto.GetSelectedText = "", "", $" <b>Tipo Gasto:</b> {DdlTipoGasto.GetSelectedText}")
|
||||
Dim TipoAF As String = If(DdlTipoAF.GetSelectedText = "", "", $" <b>Tipo AF:</b> {DdlTipoAF.GetSelectedText}")
|
||||
Dim SubTipoAF As String = If(DdlSubTipoAF.GetSelectedText = "", "", $" <b>SubTipo AF:</b> {DdlSubTipoAF.GetSelectedText}")
|
||||
|
||||
If DtDatos.Rows.Count > 0 Then
|
||||
Dim Imagen As New System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png")
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user