-- para VSHm, que no se mande a mercancía en tránsito
This commit is contained in:
@@ -10,10 +10,8 @@ Imports System.Threading.Tasks
|
|||||||
Imports Newtonsoft.Json
|
Imports Newtonsoft.Json
|
||||||
Imports Extensiones
|
Imports Extensiones
|
||||||
Imports MoreLinq
|
Imports MoreLinq
|
||||||
Imports ClsPaginas
|
|
||||||
Imports System.Data.SqlClient
|
Imports System.Data.SqlClient
|
||||||
|
Imports ClsPaginas
|
||||||
|
|
||||||
|
|
||||||
Partial Class Compras_Compras
|
Partial Class Compras_Compras
|
||||||
Inherits ClsPaginas
|
Inherits ClsPaginas
|
||||||
@@ -3148,7 +3146,6 @@ Partial Class Compras_Compras
|
|||||||
LtlGvAnticiposSel.Visible = True
|
LtlGvAnticiposSel.Visible = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
'' VALIDA ELIMINAR COMPRA, QUE NO TENGA PAGOS CONCILIADOS
|
'' VALIDA ELIMINAR COMPRA, QUE NO TENGA PAGOS CONCILIADOS
|
||||||
If (UsuarioActual.TienePermisoProceso(77) OrElse UsuarioActual.TienePermisoProceso(135)) AndAlso dr("NumPagosConciliados").ToString.ToEntero = 0 Then ' Eliminar compra
|
If (UsuarioActual.TienePermisoProceso(77) OrElse UsuarioActual.TienePermisoProceso(135)) AndAlso dr("NumPagosConciliados").ToString.ToEntero = 0 Then ' Eliminar compra
|
||||||
|
|
||||||
@@ -3168,7 +3165,6 @@ Partial Class Compras_Compras
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
Dim StrInventario As String = ""
|
Dim StrInventario As String = ""
|
||||||
If dr("Inventario").ToString = "1" Then
|
If dr("Inventario").ToString = "1" Then
|
||||||
StrInventario = "los <b>Movimientos de Inventario</b> relacionados"
|
StrInventario = "los <b>Movimientos de Inventario</b> relacionados"
|
||||||
@@ -6296,13 +6292,13 @@ Partial Class Compras_Compras
|
|||||||
If RBLPago.SelectedValue.ToEntero = 4 Then
|
If RBLPago.SelectedValue.ToEntero = 4 Then
|
||||||
Exit Select 'Es credito el concepto 6 se agrega en CASE 17
|
Exit Select 'Es credito el concepto 6 se agrega en CASE 17
|
||||||
End If
|
End If
|
||||||
Dim DifSubTotatles As Decimal = 0D
|
Dim DifSubTotales As Decimal = 0D
|
||||||
|
|
||||||
If CveCompraRefacturacion > 0 Then
|
If CveCompraRefacturacion > 0 Then
|
||||||
DifSubTotatles = Math.Abs(SubTotalRefacturacion - TxtSubTotal2.Text.ToDecimal)
|
DifSubTotales = Math.Abs(SubTotalRefacturacion - TxtSubTotal2.Text.ToDecimal)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If DifSubTotatles > 0 Or (Not CveCompraRefacturacion > 0 OrElse (ChkRefacNC.Checked)) Then
|
If DifSubTotales > 0 Or (Not CveCompraRefacturacion > 0 OrElse (ChkRefacNC.Checked)) Then
|
||||||
'AF TipoAF 2 Es para las compras
|
'AF TipoAF 2 Es para las compras
|
||||||
DT = TmpDT.FiltraParametros("ISNULL(TipoAF,0) = 2 And ISNULL(AplicaCostoIndirecto,0) <> 1 ")
|
DT = TmpDT.FiltraParametros("ISNULL(TipoAF,0) = 2 And ISNULL(AplicaCostoIndirecto,0) <> 1 ")
|
||||||
If DT.Rows.Count > 0 AndAlso Not DdlTipoComprobante.SelectedValue.Contiene("NC", "DEV", "Ant") Then
|
If DT.Rows.Count > 0 AndAlso Not DdlTipoComprobante.SelectedValue.Contiene("NC", "DEV", "Ant") Then
|
||||||
@@ -6347,8 +6343,6 @@ Partial Class Compras_Compras
|
|||||||
DT = DT.FiltraParametros("ISNULL(CveAlmacen,0) > 0")
|
DT = DT.FiltraParametros("ISNULL(CveAlmacen,0) > 0")
|
||||||
If DT.Rows.Count > 0 AndAlso Not DdlTipoComprobante.SelectedValue.Contiene("NC", "DEV", "Ant") Then
|
If DT.Rows.Count > 0 AndAlso Not DdlTipoComprobante.SelectedValue.Contiene("NC", "DEV", "Ant") Then
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
'SI ES GASTO CON ALMACEN
|
'SI ES GASTO CON ALMACEN
|
||||||
If DdlTipoCompra.SelectedValue = "10" Then
|
If DdlTipoCompra.SelectedValue = "10" Then
|
||||||
For Each RowDetalle As DataRow In TmpDT.FiltraParametros("ISNULL(TipoAF,0) <> 2 And ISNULL(CveAlmacen,0) > 0", "", {"CveAlmacen", "CveClasificacion", "CveSubProyecto"}).Rows
|
For Each RowDetalle As DataRow In TmpDT.FiltraParametros("ISNULL(TipoAF,0) <> 2 And ISNULL(CveAlmacen,0) > 0", "", {"CveAlmacen", "CveClasificacion", "CveSubProyecto"}).Rows
|
||||||
@@ -6449,6 +6443,9 @@ Partial Class Compras_Compras
|
|||||||
ConceptoContabilizacion = 6
|
ConceptoContabilizacion = 6
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If UsuarioActual.CveEmpresa.Contiene(7, 11, 12, 122, 145, 13, 83) AndAlso ConceptoContabilizacion = 205 Then
|
||||||
|
ConceptoContabilizacion = 6
|
||||||
|
End If
|
||||||
|
|
||||||
Select Case ConceptoContabilizacion
|
Select Case ConceptoContabilizacion
|
||||||
Case 6
|
Case 6
|
||||||
@@ -9316,6 +9313,10 @@ Partial Class Compras_Compras
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If UsuarioActual.CveEmpresa.Contiene(7, 11, 12, 122, 145, 13, 83) AndAlso CveConceptoContableAlmacen = 205 Then
|
||||||
|
CveConceptoContableAlmacen = 6
|
||||||
|
End If
|
||||||
|
|
||||||
'AF
|
'AF
|
||||||
DT = TmpDT.FiltraParametros("ISNULL(TipoAF,0) = 2")
|
DT = TmpDT.FiltraParametros("ISNULL(TipoAF,0) = 2")
|
||||||
If DT.Rows.Count > 0 AndAlso DdlTipoComprobante.SelectedValue <> "NC" Then
|
If DT.Rows.Count > 0 AndAlso DdlTipoComprobante.SelectedValue <> "NC" Then
|
||||||
@@ -21131,9 +21132,9 @@ Public Class ClsCompraManagerCompras
|
|||||||
Public Property CveRetISRConcepto As Integer = -1
|
Public Property CveRetISRConcepto As Integer = -1
|
||||||
Public Property CveSubProyecto As Integer = -1
|
Public Property CveSubProyecto As Integer = -1
|
||||||
Public Property UsuarioActual As Usuario
|
Public Property UsuarioActual As Usuario
|
||||||
Public ReadOnly Property ConceptoPrePolizaIVA As ConceptosRetenciones
|
Public ReadOnly Property ConceptoPrePolizaIVA As ClsPaginas.ConceptosRetenciones
|
||||||
Get
|
Get
|
||||||
Dim Ret As New ConceptosRetenciones
|
Dim Ret As New ClsPaginas.ConceptosRetenciones
|
||||||
If EsImportacion Then
|
If EsImportacion Then
|
||||||
Ret.CveConceptoAcreditable = 288
|
Ret.CveConceptoAcreditable = 288
|
||||||
Ret.CveConceptoxAcreditar = 287
|
Ret.CveConceptoxAcreditar = 287
|
||||||
@@ -21144,9 +21145,9 @@ Public Class ClsCompraManagerCompras
|
|||||||
Return Ret
|
Return Ret
|
||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
Public ReadOnly Property ConceptoPrePolizaRetIVA As ConceptosRetenciones
|
Public ReadOnly Property ConceptoPrePolizaRetIVA As ClsPaginas.ConceptosRetenciones
|
||||||
Get
|
Get
|
||||||
Dim Ret As New ConceptosRetenciones
|
Dim Ret As New ClsPaginas.ConceptosRetenciones
|
||||||
Dim Funcionalidad, FuncionalidadxAcred As Integer
|
Dim Funcionalidad, FuncionalidadxAcred As Integer
|
||||||
If CveRetIVAConcepto = 1 Then
|
If CveRetIVAConcepto = 1 Then
|
||||||
Funcionalidad = 308 : FuncionalidadxAcred = 307
|
Funcionalidad = 308 : FuncionalidadxAcred = 307
|
||||||
@@ -21176,9 +21177,9 @@ Public Class ClsCompraManagerCompras
|
|||||||
Return Ret
|
Return Ret
|
||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
Public ReadOnly Property ConceptoPrePolizaRetISR As ConceptosRetenciones
|
Public ReadOnly Property ConceptoPrePolizaRetISR As ClsPaginas.ConceptosRetenciones
|
||||||
Get
|
Get
|
||||||
Dim Ret As New ConceptosRetenciones
|
Dim Ret As New ClsPaginas.ConceptosRetenciones
|
||||||
Dim Funcionalidad, FuncionalidadxAcred As Integer
|
Dim Funcionalidad, FuncionalidadxAcred As Integer
|
||||||
If CveRetISRConcepto = 1 Then
|
If CveRetISRConcepto = 1 Then
|
||||||
Funcionalidad = 316 : FuncionalidadxAcred = 315
|
Funcionalidad = 316 : FuncionalidadxAcred = 315
|
||||||
@@ -21376,7 +21377,7 @@ Public Class ClsCompraManagerCompras
|
|||||||
Descuento = ValorXML(nodo, "descuento").ToDecimal
|
Descuento = ValorXML(nodo, "descuento").ToDecimal
|
||||||
Moneda = ValorXML(nodo, "Moneda")
|
Moneda = ValorXML(nodo, "Moneda")
|
||||||
|
|
||||||
CveMoneda = GlobalDTMonedas().FiltroPrimeroValor("CveMoneda", $" AbreviaturaSAT = '{Moneda}' ").ToEntero
|
CveMoneda = ClsPaginas.GlobalDTMonedas().FiltroPrimeroValor("CveMoneda", $" AbreviaturaSAT = '{Moneda}' ").ToEntero
|
||||||
If Not CveMoneda > 0 Then
|
If Not CveMoneda > 0 Then
|
||||||
GuardaLog($"Moneda {Moneda} no se obtuvo la clabe")
|
GuardaLog($"Moneda {Moneda} no se obtuvo la clabe")
|
||||||
Errores.AppendLine($"Moneda {Moneda} no se obtuvo la clabe")
|
Errores.AppendLine($"Moneda {Moneda} no se obtuvo la clabe")
|
||||||
@@ -21388,7 +21389,7 @@ Public Class ClsCompraManagerCompras
|
|||||||
TipoCambio = ValorXML(nodo, "TipoCambio", "1").ToDecimal
|
TipoCambio = ValorXML(nodo, "TipoCambio", "1").ToDecimal
|
||||||
|
|
||||||
If CFDIVersion = EnumCFDIVersion.v33 Or CFDIVersion = EnumCFDIVersion.v40 Then
|
If CFDIVersion = EnumCFDIVersion.v33 Or CFDIVersion = EnumCFDIVersion.v40 Then
|
||||||
Dim drm As DataRow = GlobalDTVtaMetodoPago.FiltroPrimero(String.Format("ClaveMetodoPagoSAT = '{0}'", ValorXML(nodo, "MetodoPago")))
|
Dim drm As DataRow = ClsPaginas.GlobalDTVtaMetodoPago.FiltroPrimero(String.Format("ClaveMetodoPagoSAT = '{0}'", ValorXML(nodo, "MetodoPago")))
|
||||||
If drm IsNot Nothing Then
|
If drm IsNot Nothing Then
|
||||||
CveMetodoPago = drm("CveMetodoPago").ToString.ToEntero
|
CveMetodoPago = drm("CveMetodoPago").ToString.ToEntero
|
||||||
MetodoPago = drm("MetodoPagoSAT").ToString
|
MetodoPago = drm("MetodoPagoSAT").ToString
|
||||||
|
|||||||
Reference in New Issue
Block a user