-- cambios en aletamiento d xml codigos 01010101
This commit is contained in:
@@ -1333,9 +1333,9 @@ Partial Class Compras_Compras
|
|||||||
ViewState("CveFactura") = Request("CveFactura").ToEntero
|
ViewState("CveFactura") = Request("CveFactura").ToEntero
|
||||||
|
|
||||||
Dim RFC As String = CargaFactura(CveFactura)
|
Dim RFC As String = CargaFactura(CveFactura)
|
||||||
If Not VerificarProductosSATPS() Then
|
'If Not VerificarProductosSATPS() Then
|
||||||
Exit Sub
|
' Exit Sub
|
||||||
End If
|
'End If
|
||||||
If RFC.Trim <> String.Empty Then
|
If RFC.Trim <> String.Empty Then
|
||||||
DdlProveedor.Visible = False
|
DdlProveedor.Visible = False
|
||||||
HplProveedor.Visible = True
|
HplProveedor.Visible = True
|
||||||
@@ -1663,14 +1663,10 @@ Partial Class Compras_Compras
|
|||||||
If Not UsuarioActual.Empresa.Funcionalidad(529) = "1" Then
|
If Not UsuarioActual.Empresa.Funcionalidad(529) = "1" Then
|
||||||
'verificacion doble, si no la han cancelado, ya tiene una validaci[on para que llegue aqui
|
'verificacion doble, si no la han cancelado, ya tiene una validaci[on para que llegue aqui
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Dim SWatch As New Stopwatch
|
Dim SWatch As New Stopwatch
|
||||||
SWatch.Start()
|
SWatch.Start()
|
||||||
Dim ts As New TimeSpan
|
Dim ts As New TimeSpan
|
||||||
|
|
||||||
|
|
||||||
Dim Valida As New ClsValidaCFDi(dr("UUID").ToString(), dr("RFCDe").ToString, dr("RFCPara").ToString(), dr("Total").ToString.ToDecimal)
|
Dim Valida As New ClsValidaCFDi(dr("UUID").ToString(), dr("RFCDe").ToString, dr("RFCPara").ToString(), dr("Total").ToString.ToDecimal)
|
||||||
|
|
||||||
SWatch.Stop()
|
SWatch.Stop()
|
||||||
@@ -1764,6 +1760,21 @@ Partial Class Compras_Compras
|
|||||||
SubTotalConceptos = Math.Round(TmpDT.SUM("Total"), 2).ToDecimal
|
SubTotalConceptos = Math.Round(TmpDT.SUM("Total"), 2).ToDecimal
|
||||||
AddPS2(False)
|
AddPS2(False)
|
||||||
|
|
||||||
|
|
||||||
|
'VALIDA QUE EL XML SI VIENE CON EL CODIGO SAT 01010101
|
||||||
|
Dim ProductosCodigoSATNoPermitidos As New StringBuilder("")
|
||||||
|
For Each drr As DataRow In TmpDT.FiltraParametros("ClaveProdServ = '01010101'").Rows
|
||||||
|
|
||||||
|
ProductosCodigoSATNoPermitidos.AppendFormat("{0}</br>", drr("PS"))
|
||||||
|
|
||||||
|
Next
|
||||||
|
|
||||||
|
If ProductosCodigoSATNoPermitidos.ToString.Length > 0 Then
|
||||||
|
Dim mensajeAdvertencia As String = String.Format("El comprobante contiene productos con código SAT '01010101', revise los productos:</br></br>{0}", ProductosCodigoSATNoPermitidos.ToString)
|
||||||
|
Alert(mensajeAdvertencia, TipoMensaje.MsgAdvertencia)
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
CargaConceptosXML(XMLDoc)
|
CargaConceptosXML(XMLDoc)
|
||||||
@@ -1785,8 +1796,6 @@ Partial Class Compras_Compras
|
|||||||
DdlTipoComprobante.Items.Remove(DdlTipoComprobante.Items.FindByValue("Ant"))
|
DdlTipoComprobante.Items.Remove(DdlTipoComprobante.Items.FindByValue("Ant"))
|
||||||
ChkAplicaNotaCredito.Enabled = False
|
ChkAplicaNotaCredito.Enabled = False
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
DdlTipoCompra.Items.Clear()
|
DdlTipoCompra.Items.Clear()
|
||||||
DdlTipoCompra.Items.Add(New ListItem("Seleccione", "-1"))
|
DdlTipoCompra.Items.Add(New ListItem("Seleccione", "-1"))
|
||||||
DdlTipoCompra.Items.Add(New ListItem("NC Con Productos", "6"))
|
DdlTipoCompra.Items.Add(New ListItem("NC Con Productos", "6"))
|
||||||
@@ -4006,7 +4015,7 @@ Partial Class Compras_Compras
|
|||||||
If UsuarioActual.Empresa.Funcionalidad(702) = "1" Then
|
If UsuarioActual.Empresa.Funcionalidad(702) = "1" Then
|
||||||
If Not EstaAsociadoACajaChica And Not EstaAsociadoAPersonal Then
|
If Not EstaAsociadoACajaChica And Not EstaAsociadoAPersonal Then
|
||||||
If Not CompraEstaVinculadaOC Then
|
If Not CompraEstaVinculadaOC Then
|
||||||
Alert("Debe de vincular una orden de compra para realizar esta factura")
|
Alert("Debe de vincular una orden de compra para registrar la factura")
|
||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
@@ -15428,21 +15437,21 @@ Partial Class Compras_Compras
|
|||||||
Dim DiferenciaPermitida = 1
|
Dim DiferenciaPermitida = 1
|
||||||
Dim Cont = 0
|
Dim Cont = 0
|
||||||
'Dim ProductosCodigoSATNoPermitidos As New StringBuilder("")
|
'Dim ProductosCodigoSATNoPermitidos As New StringBuilder("")
|
||||||
'For Each gvr As GridViewRow In GvOC1.Rows
|
For Each gvr As GridViewRow In GvOC1.Rows
|
||||||
' SubTotalGV += gvr.FCTextBox("TxtTotalOC1").Text.ToDecimal
|
SubTotalGV += gvr.FCTextBox("TxtTotalOC1").Text.ToDecimal
|
||||||
' If Cont = 0 Then DdlProveedorSucursal.SelectedValueExist(gvr.DataKey("CveProveedorSucursal").ToEntero())
|
If Cont = 0 Then DdlProveedorSucursal.SelectedValueExist(gvr.DataKey("CveProveedorSucursal").ToEntero())
|
||||||
' Cont = 1
|
Cont = 1
|
||||||
' If GvOC1.Columns(6).Visible Then
|
' If GvOC1.Columns(6).Visible Then
|
||||||
' Dim SatPS As String = gvr.FCDropDownLost("DdlSATPS").SelectedText()
|
' Dim SatPS As String = gvr.FCDropDownLost("DdlSATPS").SelectedText()
|
||||||
' Dim NombreProducto As String = gvr.FCLabel("LbProductoServicio").Text
|
' Dim NombreProducto As String = gvr.FCLabel("LbProductoServicio").Text
|
||||||
' If SatPS.Contains("01010101") Then
|
' If SatPS.Contains("01010101") Then
|
||||||
' ProductosCodigoSATNoPermitidos.AppendFormat("{0}</br>", NombreProducto)
|
' ProductosCodigoSATNoPermitidos.AppendFormat("{0}</br>", NombreProducto)
|
||||||
' 'Dim mensajeAdvertencia As String = String.Format("Al vincular una Orden de Compra no se permiten productos con Producto/Servicio SAT igual a '{0}', revise el producto '{1}' en Orden(es) de Compra Vinculada(s)", SatPS, NombreProducto)
|
' 'Dim mensajeAdvertencia As String = String.Format("Al vincular una Orden de Compra no se permiten productos con Producto/Servicio SAT igual a '{0}', revise el producto '{1}' en Orden(es) de Compra Vinculada(s)", SatPS, NombreProducto)
|
||||||
' 'Alert(mensajeAdvertencia, TipoMensaje.MsgAdvertencia)
|
' 'Alert(mensajeAdvertencia, TipoMensaje.MsgAdvertencia)
|
||||||
|
|
||||||
' End If
|
' End If
|
||||||
' End If
|
' End If
|
||||||
'Next
|
Next
|
||||||
'If ProductosCodigoSATNoPermitidos.ToString.Length > 0 Then
|
'If ProductosCodigoSATNoPermitidos.ToString.Length > 0 Then
|
||||||
' Dim mensajeAdvertencia As String = String.Format("No se permite vinculación de productos con código SAT '01010101', revise los productos:</br></br>{0}", ProductosCodigoSATNoPermitidos.ToString)
|
' Dim mensajeAdvertencia As String = String.Format("No se permite vinculación de productos con código SAT '01010101', revise los productos:</br></br>{0}", ProductosCodigoSATNoPermitidos.ToString)
|
||||||
' Alert(mensajeAdvertencia, TipoMensaje.MsgAdvertencia)
|
' Alert(mensajeAdvertencia, TipoMensaje.MsgAdvertencia)
|
||||||
@@ -20204,35 +20213,35 @@ Partial Class Compras_Compras
|
|||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Function VerificarProductosSATPS() As Boolean
|
'Private Function VerificarProductosSATPS() As Boolean
|
||||||
Dim CvePSGRuposAux As New StringBuilder("")
|
' Dim CvePSGRuposAux As New StringBuilder("")
|
||||||
For Each gvr As GridViewRow In GvPS.Rows
|
' For Each gvr As GridViewRow In GvPS.Rows
|
||||||
Dim CvePSIndividual As String = gvr.DataKey("CvePS")
|
' Dim CvePSIndividual As String = gvr.DataKey("CvePS")
|
||||||
CvePSGRuposAux.AppendFormat("{0},", CvePSIndividual)
|
' CvePSGRuposAux.AppendFormat("{0},", CvePSIndividual)
|
||||||
Next
|
' Next
|
||||||
|
|
||||||
Dim CvePSGRupos As String = Left(CvePSGRuposAux.ToString, CvePSGRuposAux.Length - 1)
|
' Dim CvePSGRupos As String = Left(CvePSGRuposAux.ToString, CvePSGRuposAux.Length - 1)
|
||||||
|
|
||||||
Dim PSSat As DataTable = GlobalDTPS(UsuarioActual.CveEmpresa).FiltraParametros(String.Format("CvePS IN ({0})", CvePSGRuposAux))
|
' Dim PSSat As DataTable = GlobalDTPS(UsuarioActual.CveEmpresa).FiltraParametros(String.Format("CvePS IN ({0})", CvePSGRuposAux))
|
||||||
|
|
||||||
Dim ProductosCodigoSATNoPermitidos As New StringBuilder("")
|
' Dim ProductosCodigoSATNoPermitidos As New StringBuilder("")
|
||||||
For Each PS As GridViewRow In GvPS.Rows
|
' For Each PS As GridViewRow In GvPS.Rows
|
||||||
Dim PSIndividual As String = PS.DataKey("PS")
|
' Dim PSIndividual As String = PS.DataKey("PS")
|
||||||
Dim ClavePSSAT As String = PSSat.FiltroPrimeroValor("CveSATPS", String.Format("PS = '{0}'", PSIndividual))
|
' Dim ClavePSSAT As String = PSSat.FiltroPrimeroValor("CveSATPS", String.Format("PS = '{0}'", PSIndividual))
|
||||||
If ClavePSSAT = "46920" Then
|
' If ClavePSSAT = "46920" Then
|
||||||
ProductosCodigoSATNoPermitidos.AppendFormat("{0}</br>", PSIndividual)
|
' ProductosCodigoSATNoPermitidos.AppendFormat("{0}</br>", PSIndividual)
|
||||||
End If
|
' End If
|
||||||
Next
|
' Next
|
||||||
|
|
||||||
If ProductosCodigoSATNoPermitidos.ToString.Length > 0 Then
|
' If ProductosCodigoSATNoPermitidos.ToString.Length > 0 Then
|
||||||
Dim mensajeAdvertencia As String = String.Format("No se permite vinculación de productos con código SAT '01010101', revise los productos:</br></br>{0}", ProductosCodigoSATNoPermitidos.ToString)
|
' Dim mensajeAdvertencia As String = String.Format("No se permite vinculación de productos con código SAT '01010101', revise los productos:</br></br>{0}", ProductosCodigoSATNoPermitidos.ToString)
|
||||||
Alert(mensajeAdvertencia, TipoMensaje.MsgAdvertencia)
|
' Alert(mensajeAdvertencia, TipoMensaje.MsgAdvertencia)
|
||||||
Return False
|
' Return False
|
||||||
End If
|
' End If
|
||||||
|
|
||||||
Return True
|
' Return True
|
||||||
|
|
||||||
End Function
|
'End Function
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user