--QUITAR FUNCIONALIDAD 350
This commit is contained in:
@@ -1125,27 +1125,16 @@ Public Class ClsBancos
|
||||
Dim Timbrado As New Timbrado
|
||||
Dim CFDIVersion As String = "4.0"
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(350) = "1" Then
|
||||
If GetComplementoPagosImpuestos(CveIE, UsuarioActual.CveEmpresa) Then
|
||||
dttpagosimpuestos = DtResultados
|
||||
End If
|
||||
|
||||
If GetComplementoPagosImpuestos(CveIE, UsuarioActual.CveEmpresa) Then
|
||||
dttpagosimpuestos = DtResultados
|
||||
End If
|
||||
|
||||
Timbre = Timbrado.PreparaTimbrePago40(RFCEmpresa, UsuarioActual.Empresa.Empresa, UsuarioActual.Empresa.CodigoRegimenFiscal,
|
||||
Timbre = Timbrado.PreparaTimbrePago40(RFCEmpresa, UsuarioActual.Empresa.Empresa, UsuarioActual.Empresa.CodigoRegimenFiscal,
|
||||
RFCCliente, dr("NombreCliente").ToString, dr("ClienteCP").ToString, dr("CodigoRegimenFiscal").ToString, Serie, Folio.ToString, FechaTimbrado, Cuentapago,
|
||||
dr("FechaDocumento").ToString.ToDate, dr("ClaveFormaPagoSAT").ToString, dr("AbreviaturaSAT").ToString, dr("VentasTotalPagado").ToString.ToDecimal,
|
||||
UsuarioActual.Empresa.CP.ToString, CuentaBeneficiario, dr("TipoCambioPago").ToString.ToDecimal, dttpagos, dttpagosimpuestos, CFDIRelacionado:=CFDIRelacionado,
|
||||
RfcACuentaTerceros:=dr("RfcACuentaTerceros").ToString, NombreACuentaTerceros:=dr("NombreACuentaTerceros").ToString, RegimenFiscalACuentaTerceros:=dr("RegimenFiscalACuentaTerceros").ToString, DomicilioFiscalACuentaTerceros:=dr("DomicilioFiscalACuentaTerceros").ToString)
|
||||
|
||||
Else
|
||||
CFDIVersion = "3.3"
|
||||
Timbre = Timbrado.PreparaTimbrePago(RFCEmpresa, UsuarioActual.Empresa.Empresa, UsuarioActual.Empresa.CodigoRegimenFiscal,
|
||||
RFCCliente, dr("NombreCliente").ToString, Serie, Folio.ToString, FechaTimbrado, Cuentapago,
|
||||
dr("FechaDocumento").ToString.ToDate, dr("ClaveFormaPagoSAT").ToString, dr("AbreviaturaSAT").ToString, dr("VentasTotalPagado").ToString.ToDecimal,
|
||||
UsuarioActual.Empresa.CP.ToString, CuentaBeneficiario, dr("TipoCambioPago").ToString.ToDecimal, dttpagos, CFDIRelacionado:=CFDIRelacionado, EsCancelacion:=False)
|
||||
|
||||
End If
|
||||
|
||||
|
||||
''PREPARA PARA CANCELACION POR SUSTITUCION DE COMPLEMENTO DE PAGO
|
||||
'If CFDIRelacionado <> "-1" And CFDIRelacionado <> "" Then
|
||||
|
||||
@@ -5398,11 +5398,9 @@ Public Class ClsPaginas
|
||||
params.Add(New ReportParameter("CETipoCambio", CETipoCambio))
|
||||
End If
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(350) = "1" Then
|
||||
params.Add(New ReportParameter("CFDIVersion", Vta.Version))
|
||||
If Vta.Cliente.CodigoRegimenFiscal.ToString.Length > 0 Then
|
||||
params.Add(New ReportParameter("RegimenFiscalCodigo", $"{Vta.Cliente.CodigoRegimenFiscal}-{Vta.Cliente.RegimenFiscal}"))
|
||||
End If
|
||||
params.Add(New ReportParameter("CFDIVersion", Vta.Version))
|
||||
If Vta.Cliente.CodigoRegimenFiscal.ToString.Length > 0 Then
|
||||
params.Add(New ReportParameter("RegimenFiscalCodigo", $"{Vta.Cliente.CodigoRegimenFiscal}-{Vta.Cliente.RegimenFiscal}"))
|
||||
End If
|
||||
|
||||
'CLIENTE
|
||||
@@ -6938,7 +6936,7 @@ Public Class ClsPaginas
|
||||
Dim FechaRecibo = ""
|
||||
Dim ProveedorIntermediario As String = ""
|
||||
Dim RegimenFiscalCodigo As String = ""
|
||||
Dim CFDIVersion As String = If(UsuarioActual.Empresa.Funcionalidad(350) = "1", "4.0", "3.3")
|
||||
Dim CFDIVersion As String = "4.0"
|
||||
Dim Observaciones As String = ""
|
||||
|
||||
'DT PAGO
|
||||
@@ -7035,10 +7033,8 @@ Public Class ClsPaginas
|
||||
params.Add(New ReportParameter("ClienteCP", ObjClientes.CP))
|
||||
params.Add(New ReportParameter("ClienteRFC", ObjClientes.RFC))
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(350) = "1" Then
|
||||
If ObjClientes.CodigoRegimenFiscal.ToString.Length > 0 Then
|
||||
RegimenFiscalCodigo = $"{ObjClientes.CodigoRegimenFiscal}-{ObjClientes.RegimenFiscal}"
|
||||
End If
|
||||
If ObjClientes.CodigoRegimenFiscal.ToString.Length > 0 Then
|
||||
RegimenFiscalCodigo = $"{ObjClientes.CodigoRegimenFiscal}-{ObjClientes.RegimenFiscal}"
|
||||
End If
|
||||
End If
|
||||
ObjClientes.Dispose()
|
||||
@@ -7077,11 +7073,9 @@ Public Class ClsPaginas
|
||||
cfdVer = "http://www.sat.gob.mx/cfd/4"
|
||||
End If
|
||||
If Version = "4.0" Then
|
||||
If UsuarioActual.Empresa.Funcionalidad(350) = "1" Then
|
||||
params.Add(New ReportParameter("CFDIVersion", Version))
|
||||
If ObjClientes.CodigoRegimenFiscal.ToString.Length > 0 Then
|
||||
params.Add(New ReportParameter("RegimenFiscalCodigo", RegimenFiscalCodigo))
|
||||
End If
|
||||
params.Add(New ReportParameter("CFDIVersion", Version))
|
||||
If ObjClientes.CodigoRegimenFiscal.ToString.Length > 0 Then
|
||||
params.Add(New ReportParameter("RegimenFiscalCodigo", RegimenFiscalCodigo))
|
||||
End If
|
||||
End If
|
||||
namespaces.AddNamespace(Prefijo, cfdVer)
|
||||
@@ -7137,7 +7131,7 @@ Public Class ClsPaginas
|
||||
If Version = "3.3" Then DrRelacionado("MetodoDePagoDR") = Relacionado.Attributes("MetodoDePagoDR").Value
|
||||
If Version = "4.0" Then DrRelacionado("ObjetoImpDR") = Relacionado.Attributes("ObjetoImpDR").Value
|
||||
DrRelacionado("MonedaDR") = Relacionado.Attributes("MonedaDR").Value
|
||||
If UsuarioActual.Empresa.Funcionalidad(350) = "1" AndAlso Version = "4.0" Then
|
||||
If Version = "4.0" Then
|
||||
Dim NodosTraslados = Relacionado.SelectNodes($"{PagoVersion}:ImpuestosDR/{PagoVersion}:TrasladosDR/{PagoVersion}:TrasladoDR", namespaces)
|
||||
For Each NodoTraslados As XmlNode In NodosTraslados
|
||||
Dim BaseDR As String = ValorXML(NodoTraslados, "BaseDR")
|
||||
|
||||
@@ -86,7 +86,7 @@ Public Class LogicNominas
|
||||
|
||||
Dim versionTimbre As VersionTimbradoEnum = versionTimbrex
|
||||
If versionTimbre = VersionTimbradoEnum.PorDefectoEmpresa Then
|
||||
versionTimbre = If(UsuarioActual.Empresa.Funcionalidad(350) = "1", VersionTimbradoEnum.Version4_0, VersionTimbradoEnum.Version3_3)
|
||||
versionTimbre = VersionTimbradoEnum.Version4_0
|
||||
End If
|
||||
|
||||
Dim continuar As Boolean = True
|
||||
|
||||
@@ -42,8 +42,7 @@ Public Class Timbres
|
||||
|
||||
Private Sub CreaObjetosTraslados(TipoDocto As String, CveTimbre As Integer)
|
||||
ObjFactura = New Modelos.Factura
|
||||
ObjFactura.Version = "3.3"
|
||||
If UsuarioActual.Empresa.Funcionalidad(350) = "1" Then ObjFactura.Version = "4.0"
|
||||
ObjFactura.Version = "4.0"
|
||||
|
||||
ObjFactura.CveUsuario = UsuarioActual.CveUsuario
|
||||
ObjFactura.CveEmpresa = UsuarioActual.CveEmpresa
|
||||
|
||||
@@ -1495,13 +1495,9 @@ Partial Class Ventas_ClientesAbonar
|
||||
ObjFacturaDevolucion.FormaPago = 0
|
||||
|
||||
ObjFacturaDevolucion.TipoDocto = "Egs"
|
||||
ObjFacturaDevolucion.Fecha = Now
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(350) = "1" Then
|
||||
ObjFacturaDevolucion.Version = "4.0"
|
||||
Else
|
||||
ObjFacturaDevolucion.Version = "3.3"
|
||||
End If
|
||||
ObjFacturaDevolucion.Fecha = Now
|
||||
|
||||
ObjFacturaDevolucion.Version = "4.0"
|
||||
|
||||
ObjFacturaDevolucion.CveMetodoPago33 = 1
|
||||
ObjFacturaDevolucion.MetodoPago33 = "PUE - Pago en una sola exhibición"
|
||||
@@ -1671,11 +1667,7 @@ Partial Class Ventas_ClientesAbonar
|
||||
Timbre.Receptor.DomicilioFiscalReceptor = Obj.ClienteSucursal.CP
|
||||
Else
|
||||
Timbre.Receptor.RFC = Obj.Cliente.RFC
|
||||
If UsuarioActual.Empresa.Funcionalidad(350) = "1" Then
|
||||
Timbre.Receptor.Nombre = Obj.Cliente.Nombre
|
||||
Else
|
||||
Timbre.Receptor.Nombre = Obj.Cliente.Nombre + " " + Obj.Cliente.RegimenSociedad
|
||||
End If
|
||||
Timbre.Receptor.Nombre = Obj.Cliente.Nombre
|
||||
Timbre.Receptor.DomicilioFiscalReceptor = Obj.Cliente.CP
|
||||
End If
|
||||
|
||||
|
||||
@@ -806,11 +806,9 @@ Partial Class Clientes
|
||||
If UsuarioActual.Empresa.Funcionalidad(579) = "1" Then
|
||||
DivTipoRetenciones.Visible = True
|
||||
DivRetIVA.Visible = False
|
||||
End If
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(350).Contiene("1", "2") Then
|
||||
divRegimen.Visible = True
|
||||
End If
|
||||
End If
|
||||
|
||||
divRegimen.Visible = True
|
||||
|
||||
If UsuarioActual.CveEmpresa.Contiene(1) Or UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
|
||||
DivRepresentanteLegal.Visible = True
|
||||
@@ -2073,17 +2071,13 @@ Partial Class Clientes
|
||||
End Sub
|
||||
Private Sub CargaComboCFDI()
|
||||
Dim RegimenFiscalCliente = DdlRegimenFiscal.SelectedValue.ToString()
|
||||
If Not UsuarioActual.Empresa.Funcionalidad(350).Contiene("1", "2") Then
|
||||
RegimenFiscalCliente = "-1"
|
||||
End If
|
||||
'If Not UsuarioActual.Empresa.Funcionalidad(350).Contiene("1", "2") Then
|
||||
' RegimenFiscalCliente = "-1"
|
||||
'End If
|
||||
|
||||
DdlUsoCFDI.Items.Clear()
|
||||
If UsuarioActual.Empresa.Funcionalidad(350) = "1" Then
|
||||
Dim EsPersonaMoral As Boolean = (RdTipoPersona.SelectedValue = "1")
|
||||
DdlUsoCFDI.DataSource = GlobalDTSATUsosCFDI(If(Not EsPersonaMoral, 1, 0), RegimenFiscalReceptor:=RegimenFiscalCliente)
|
||||
Else
|
||||
DdlUsoCFDI.DataSource = GlobalDTSATUsosCFDI(UsuarioActual.Empresa.EsPersonaFisica, RegimenFiscalReceptor:=RegimenFiscalCliente)
|
||||
End If
|
||||
Dim EsPersonaMoral As Boolean = (RdTipoPersona.SelectedValue = "1")
|
||||
DdlUsoCFDI.DataSource = GlobalDTSATUsosCFDI(If(Not EsPersonaMoral, 1, 0), RegimenFiscalReceptor:=RegimenFiscalCliente)
|
||||
|
||||
DdlUsoCFDI.DataBind()
|
||||
DdlUsoCFDI.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
@@ -2483,23 +2477,18 @@ Partial Class Clientes
|
||||
|
||||
End If
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(350).Contiene("1", "2") Then
|
||||
|
||||
If TxtRFC.Text.ToUpper.Contiene("XAXX010101000", "XEXX010101000") AndAlso DdlRegimenFiscal.SelectedValue <> "11" Then
|
||||
|
||||
Alert("El Regimen fiscal del cliente debe ser <b>'616 - Sin obligaciones fiscales'</b> cuando se utiliza el RFC genérico.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
|
||||
End If
|
||||
|
||||
If TxtRFC.Text.ToUpper.Contiene("XAXX010101000", "XEXX010101000") AndAlso DdlUsoCFDI.SelectedValue <> "23" Then
|
||||
|
||||
Alert("El uso del cfdi debe ser <b>'S01 - Sin efectos fiscales'</b> cuando se utiliza el RFC genérico.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
|
||||
End If
|
||||
|
||||
|
||||
If TxtRFC.Text.ToUpper.Contiene("XAXX010101000", "XEXX010101000") AndAlso DdlRegimenFiscal.SelectedValue <> "11" Then
|
||||
|
||||
Alert("El Regimen fiscal del cliente debe ser <b>'616 - Sin obligaciones fiscales'</b> cuando se utiliza el RFC genérico.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
|
||||
End If
|
||||
|
||||
If TxtRFC.Text.ToUpper.Contiene("XAXX010101000", "XEXX010101000") AndAlso DdlUsoCFDI.SelectedValue <> "23" Then
|
||||
|
||||
Alert("El uso del cfdi debe ser <b>'S01 - Sin efectos fiscales'</b> cuando se utiliza el RFC genérico.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
|
||||
End If
|
||||
|
||||
'CargaSucursal()
|
||||
@@ -10308,7 +10297,7 @@ Partial Class Clientes
|
||||
DVRegimenSociedad.Visible = False
|
||||
DivRazonSocial2.Attributes.Add("class", "col-md-12")
|
||||
|
||||
If RdTipoPersona.SelectedValue.ToEntero = 1 And UsuarioActual.Empresa.Funcionalidad(350).Contiene("1", "2") Then
|
||||
If RdTipoPersona.SelectedValue.ToEntero = 1 Then
|
||||
DivRazonSocial2.Attributes.Add("class", "col-md-8")
|
||||
DVRegimenSociedad.Visible = True
|
||||
Else
|
||||
|
||||
@@ -1498,11 +1498,7 @@ Partial Class Ventas_ClientesAbonar
|
||||
ObjFacturaDevolucion.TipoDocto = "Egs"
|
||||
ObjFacturaDevolucion.Fecha = Now
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(350) = "1" Then
|
||||
ObjFacturaDevolucion.Version = "4.0"
|
||||
Else
|
||||
ObjFacturaDevolucion.Version = "3.3"
|
||||
End If
|
||||
ObjFacturaDevolucion.Version = "4.0"
|
||||
|
||||
ObjFacturaDevolucion.CveMetodoPago33 = 1
|
||||
ObjFacturaDevolucion.MetodoPago33 = "PUE - Pago en una sola exhibición"
|
||||
@@ -1672,11 +1668,7 @@ Partial Class Ventas_ClientesAbonar
|
||||
Timbre.Receptor.DomicilioFiscalReceptor = Obj.ClienteSucursal.CP
|
||||
Else
|
||||
Timbre.Receptor.RFC = Obj.Cliente.RFC
|
||||
If UsuarioActual.Empresa.Funcionalidad(350) = "1" Then
|
||||
Timbre.Receptor.Nombre = Obj.Cliente.Nombre
|
||||
Else
|
||||
Timbre.Receptor.Nombre = Obj.Cliente.Nombre + " " + Obj.Cliente.RegimenSociedad
|
||||
End If
|
||||
Timbre.Receptor.Nombre = Obj.Cliente.Nombre
|
||||
Timbre.Receptor.DomicilioFiscalReceptor = Obj.Cliente.CP
|
||||
End If
|
||||
|
||||
|
||||
@@ -2466,9 +2466,6 @@ Partial Class PV
|
||||
'End If
|
||||
End Sub
|
||||
Private Sub CargaUsoCFDI()
|
||||
If UsuarioActual.Empresa.Funcionalidad(350) <> "1" Then
|
||||
ClienteCodigoRegimenFiscal = "-1"
|
||||
End If
|
||||
DdlUsoCFDI.DataSource = GlobalDTSATUsosCFDI(UsuarioActual.Empresa.EsPersonaFisica, RegimenFiscalReceptor:=ClienteCodigoRegimenFiscal)
|
||||
DdlUsoCFDI.DataBind()
|
||||
End Sub
|
||||
@@ -2730,7 +2727,7 @@ Partial Class PV
|
||||
'DdlFormaPago33.SelectedValueExist(ObjCliente.DtResultados.Rows(0)("CveFormaPago33").ToString)
|
||||
DdlUsoCFDI.SelectedValueExist(ObjCliente.DtResultados.Rows(0)("CveUsoCFDI").ToString)
|
||||
'SI ES RFC GENERICO NO TIENE OBLIGACIONES FISCALES
|
||||
If UsuarioActual.Empresa.Funcionalidad(350).Contiene("1") AndAlso LblRFC.Text.Contiene("XAXX010101000", "XEXX010101000") Then
|
||||
If LblRFC.Text.Contiene("XAXX010101000", "XEXX010101000") Then
|
||||
'S01 Sin efectos fiscales.
|
||||
DdlUsoCFDI.SelectedValueExist("23")
|
||||
DdlUsoCFDI.Enabled = False
|
||||
@@ -2915,7 +2912,7 @@ Partial Class PV
|
||||
DdlMetodoPago33.SelectedValueExist(ObjCliente.DtResultados.Rows(0)("CveMetodoPago33").ToString)
|
||||
DdlUsoCFDI.SelectedValueExist(ObjCliente.DtResultados.Rows(0)("CveUsoCFDI").ToString)
|
||||
'SI ES RFC GENERICO NO TIENE OBLIGACIONES FISCALES
|
||||
If UsuarioActual.Empresa.Funcionalidad(350).Contiene("1") AndAlso LblRFC.Text.Contiene("XAXX010101000", "XEXX010101000") Then
|
||||
If LblRFC.Text.Contiene("XAXX010101000", "XEXX010101000") Then
|
||||
'S01 Sin efectos fiscales.
|
||||
DdlUsoCFDI.SelectedValueExist("23")
|
||||
DdlUsoCFDI.Enabled = False
|
||||
@@ -2951,7 +2948,7 @@ Partial Class PV
|
||||
DdlMetodoPago33.SelectedValueExist(ObjCliente.CveMetodoPago33)
|
||||
DdlUsoCFDI.SelectedValueExist(ObjCliente.CveUsoCFDI)
|
||||
'SI ES RFC GENERICO NO TIENE OBLIGACIONES FISCALES
|
||||
If UsuarioActual.Empresa.Funcionalidad(350).Contiene("1") AndAlso LblRFC.Text.Contiene("XAXX010101000", "XEXX010101000") Then
|
||||
If LblRFC.Text.Contiene("XAXX010101000", "XEXX010101000") Then
|
||||
'S01 Sin efectos fiscales.
|
||||
DdlUsoCFDI.SelectedValueExist("23")
|
||||
DdlUsoCFDI.Enabled = False
|
||||
@@ -6499,7 +6496,7 @@ Partial Class PV
|
||||
RFVCiudadC.Visible = False
|
||||
RFVLocalidadC.Visible = False
|
||||
RFVSATPais.Visible = False
|
||||
divRegimenCliente.Visible = UsuarioActual.Empresa.Funcionalidad(350) = "1"
|
||||
divRegimenCliente.Visible = True
|
||||
|
||||
RdTipoPersona.SelectedValue = "0"
|
||||
|
||||
@@ -6542,7 +6539,7 @@ Partial Class PV
|
||||
DivCorreoCuentaCliente.Visible = True
|
||||
DivBotonesAgregarCliente.Visible = True
|
||||
DivFormaCliente.Visible = True
|
||||
divRegimenCliente.Visible = UsuarioActual.Empresa.Funcionalidad(350) = "1"
|
||||
divRegimenCliente.Visible = True
|
||||
End If
|
||||
End If
|
||||
ObjCliente.Dispose()
|
||||
@@ -6580,17 +6577,13 @@ Partial Class PV
|
||||
Else
|
||||
Dim RegimenFiscalCliente As String = "-1"
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(350).Contiene("1") AndAlso DdlRegimenFiscalCliente.SelectedValue.ToEntero() > 0 Then
|
||||
If DdlRegimenFiscalCliente.SelectedValue.ToEntero() > 0 Then
|
||||
RegimenFiscalCliente = GlobalDTRegimenesFiscales().FiltroPrimeroValor("CodigoRegimenFiscal", $"CveRegimenFiscal = {DdlRegimenFiscalCliente.SelectedValue.ToEntero()}")
|
||||
End If
|
||||
|
||||
DdlUsoCFDICliente.Items.Clear()
|
||||
If UsuarioActual.Empresa.Funcionalidad(350) = "1" Then
|
||||
Dim EsPersonaMoral As Boolean = (RdTipoPersona.SelectedValue = "1")
|
||||
DdlUsoCFDICliente.DataSource = GlobalDTSATUsosCFDI(If(Not EsPersonaMoral, 1, 0), RegimenFiscalReceptor:=RegimenFiscalCliente)
|
||||
Else
|
||||
DdlUsoCFDICliente.DataSource = GlobalDTSATUsosCFDI(UsuarioActual.Empresa.EsPersonaFisica, RegimenFiscalReceptor:=RegimenFiscalCliente)
|
||||
End If
|
||||
Dim EsPersonaMoral As Boolean = (RdTipoPersona.SelectedValue = "1")
|
||||
DdlUsoCFDICliente.DataSource = GlobalDTSATUsosCFDI(If(Not EsPersonaMoral, 1, 0), RegimenFiscalReceptor:=RegimenFiscalCliente)
|
||||
|
||||
DdlUsoCFDICliente.DataBind()
|
||||
DdlUsoCFDICliente.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
@@ -6612,46 +6605,44 @@ Partial Class PV
|
||||
Dim CveRegimenFiscal As Integer = -1
|
||||
Dim CveUsoCFDI As Integer = 3
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(350) = "1" Then
|
||||
CveRegimenFiscal = DdlRegimenFiscalCliente.SelectedValue.ToEntero()
|
||||
CveUsoCFDI = DdlUsoCFDICliente.SelectedValue.ToEntero()
|
||||
CveRegimenFiscal = DdlRegimenFiscalCliente.SelectedValue.ToEntero()
|
||||
CveUsoCFDI = DdlUsoCFDICliente.SelectedValue.ToEntero()
|
||||
|
||||
Dim RegimenFiscalCliente As String = "-1"
|
||||
|
||||
If DdlRegimenFiscalCliente.SelectedValue.ToEntero() > 0 Then
|
||||
RegimenFiscalCliente = GlobalDTRegimenesFiscales().FiltroPrimeroValor("CodigoRegimenFiscal", $"CveRegimenFiscal = {CveRegimenFiscal}")
|
||||
End If
|
||||
|
||||
If TxtRFCCliente.Text.Trim().ToUpper().Contiene("XAXX010101000", "XEXX010101000") AndAlso DdlRegimenFiscalCliente.SelectedValue <> "11" Then
|
||||
Alert("El Regimen fiscal del cliente debe ser <b>'616 - Sin obligaciones fiscales'</b> cuando se utiliza el RFC genérico.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
If TxtRFCCliente.Text.Trim().ToUpper().Contiene("XAXX010101000", "XEXX010101000") AndAlso DdlUsoCFDICliente.SelectedValue <> "23" Then
|
||||
Alert("El uso cfdi del cliente debe ser <b>'S01 - Sin efectos fiscales'</b> cuando se utiliza el RFC genérico.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
If Not TxtRFCCliente.Text.Trim().ToUpper().Contiene("XAXX010101000", "XEXX010101000") AndAlso DdlRegimenFiscalCliente.SelectedValue = "11" Then
|
||||
Alert("El Regimen fiscal del cliente no puede ser <b>'616 - Sin obligaciones fiscales'</b> si no se utiliza el RFC genérico.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
If Not TxtRFCCliente.Text.Trim().ToUpper().Contiene("XAXX010101000", "XEXX010101000") AndAlso DdlUsoCFDICliente.SelectedValue = "23" Then
|
||||
Alert("El uso cfdi del cliente no puede ser <b>'S01 - Sin efectos fiscales'</b> si no se utiliza el RFC genérico.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
Dim EsPersonaMoral As Boolean = (RdTipoPersona.SelectedValue = "1")
|
||||
Dim DtUsosCFDI = GlobalDTSATUsosCFDI(If(Not EsPersonaMoral, 1, 0), RegimenFiscalReceptor:=RegimenFiscalCliente).FiltraParametros($"CveUsoCFDI = {CveUsoCFDI}")
|
||||
|
||||
If DtUsosCFDI.Rows.Count = 0 Then
|
||||
Alert("El Uso CFDI no corresponde con el tipo de persona (fisca, moral) y el régimen fiscal.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
Dim RegimenFiscalCliente As String = "-1"
|
||||
|
||||
If DdlRegimenFiscalCliente.SelectedValue.ToEntero() > 0 Then
|
||||
RegimenFiscalCliente = GlobalDTRegimenesFiscales().FiltroPrimeroValor("CodigoRegimenFiscal", $"CveRegimenFiscal = {CveRegimenFiscal}")
|
||||
End If
|
||||
|
||||
If TxtRFCCliente.Text.Trim().ToUpper().Contiene("XAXX010101000", "XEXX010101000") AndAlso DdlRegimenFiscalCliente.SelectedValue <> "11" Then
|
||||
Alert("El Regimen fiscal del cliente debe ser <b>'616 - Sin obligaciones fiscales'</b> cuando se utiliza el RFC genérico.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
If TxtRFCCliente.Text.Trim().ToUpper().Contiene("XAXX010101000", "XEXX010101000") AndAlso DdlUsoCFDICliente.SelectedValue <> "23" Then
|
||||
Alert("El uso cfdi del cliente debe ser <b>'S01 - Sin efectos fiscales'</b> cuando se utiliza el RFC genérico.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
If Not TxtRFCCliente.Text.Trim().ToUpper().Contiene("XAXX010101000", "XEXX010101000") AndAlso DdlRegimenFiscalCliente.SelectedValue = "11" Then
|
||||
Alert("El Regimen fiscal del cliente no puede ser <b>'616 - Sin obligaciones fiscales'</b> si no se utiliza el RFC genérico.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
If Not TxtRFCCliente.Text.Trim().ToUpper().Contiene("XAXX010101000", "XEXX010101000") AndAlso DdlUsoCFDICliente.SelectedValue = "23" Then
|
||||
Alert("El uso cfdi del cliente no puede ser <b>'S01 - Sin efectos fiscales'</b> si no se utiliza el RFC genérico.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
Dim EsPersonaMoral As Boolean = (RdTipoPersona.SelectedValue = "1")
|
||||
Dim DtUsosCFDI = GlobalDTSATUsosCFDI(If(Not EsPersonaMoral, 1, 0), RegimenFiscalReceptor:=RegimenFiscalCliente).FiltraParametros($"CveUsoCFDI = {CveUsoCFDI}")
|
||||
|
||||
If DtUsosCFDI.Rows.Count = 0 Then
|
||||
Alert("El Uso CFDI no corresponde con el tipo de persona (fisca, moral) y el régimen fiscal.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
|
||||
If DdlSubProyectoDatos.SelectedValue.ToEntero() > 0 Then
|
||||
Dim Dr As DataRow = GlobalDTSubProyectos(-1, DdlSubProyectoDatos.SelectedValue.ToEntero(), UsuarioActual.CveEmpresa).Rows(0)
|
||||
If Dr IsNot Nothing Then
|
||||
|
||||
@@ -3385,9 +3385,9 @@ Partial Class Ventas
|
||||
|
||||
InicializaAplicarNC()
|
||||
|
||||
If CveCliente > 0 Then
|
||||
CargaRestriccionesCreditoCliente(CveVenta:=Me.CveVenta)
|
||||
End If
|
||||
'If CveCliente > 0 Then
|
||||
' CargaRestriccionesCreditoCliente(CveVenta:=Me.CveVenta)
|
||||
'End If
|
||||
|
||||
If Not CveVenta > 0 AndAlso UsuarioActual.Empresa.Funcionalidad(403).ToString() = "1" Then
|
||||
If (DdlTipoComprobante.Items.FindByValue("Ing") IsNot Nothing) Then
|
||||
@@ -6652,10 +6652,6 @@ Partial Class Ventas
|
||||
ChkEmitirComercioExterior.Checked = True
|
||||
ChkEmitirComercioExterior_CheckedChanged(ChkEmitirComercioExterior, EventArgs.Empty)
|
||||
|
||||
|
||||
End If
|
||||
|
||||
If ObjCliente.AplicaComercioExterior Then
|
||||
'DdlSATMotivoTraslado.DataSource = GlobalDTSATMotivoTraslado
|
||||
'DdlSATMotivoTraslado.DataBind()
|
||||
'DdlSATMotivoTraslado.SelectedValueExist(ObjCliente.CveMotivoTraslado)
|
||||
@@ -6873,10 +6869,6 @@ Partial Class Ventas
|
||||
|
||||
TxtFechaPago.Text = If(DdlTipoComprobante.SelectedValue = "Rem", Now.AddDays(PlazoCobranzaRemision), Now.AddDays(PlazoCobranza)).ToShortDateString
|
||||
|
||||
If Not (ModalidadEdicion AndAlso DdlTipoComprobante.SelectedValue = "Rem") Then
|
||||
CargaRestriccionesCreditoCliente(True, Me.CveVenta)
|
||||
End If
|
||||
|
||||
' si es empresa acumuladores
|
||||
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
|
||||
CargaPorcentajeMarcas()
|
||||
@@ -6905,7 +6897,7 @@ Partial Class Ventas
|
||||
|
||||
If CveCliente > 0 Then CargaAnticipos(CveCliente) : UpAnticipos.Update()
|
||||
|
||||
If CveCliente > 0 AndAlso UsuarioActual.CveEmpresa = 140 AndAlso CveVenta <= 0 Then
|
||||
If CveCliente > 0 AndAlso UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso CveVenta <= 0 Then
|
||||
DivVentasUsados.Visible = True
|
||||
|
||||
Dim ObjClientes As New ClsClientes
|
||||
@@ -6947,12 +6939,18 @@ Partial Class Ventas
|
||||
UpModalButtonUploadDocumentoCliente.Update()
|
||||
UPObservaciones.Update()
|
||||
|
||||
|
||||
' RegistraScript("$('#DivDocsClienteUpload').modal({ backdrop: 'static', keyboard: false});", "modalOC")
|
||||
End If
|
||||
BloqueaCondiconesPago()
|
||||
DeshabilitarAplicarNotaDeCredito(LblRFC.Text)
|
||||
|
||||
Dim CveVentaRef As Integer = -1
|
||||
|
||||
If Me.CveVenta > 0 AndAlso Not EsCreaApartirDe Then
|
||||
CveVentaRef = Me.CveVenta
|
||||
End If
|
||||
|
||||
CargaRestriccionesCreditoCliente(True, CveVentaRef)
|
||||
|
||||
If CveVenta <= 0 Then
|
||||
CalculaLineasAdicionales()
|
||||
HabilitaRemisionPublicoGeneral = 0
|
||||
@@ -7570,8 +7568,6 @@ Partial Class Ventas
|
||||
DdlTipoComprobante.Items.Remove(DdlTipoComprobante.Items.FindByValue("Pd2"))
|
||||
End If
|
||||
End If
|
||||
|
||||
HabilitarRemisionesPublicoGeneral()
|
||||
End If
|
||||
|
||||
'CUANDO SEA COTIZACION Y SEA COMPUPROVEEDORES (EMPRESA 72) NO DEBE ENVIAR CORREO AL CLIENTE
|
||||
@@ -7616,9 +7612,7 @@ Partial Class Ventas
|
||||
LblEstado.Text = ObjCliente.DtResultados.Rows(0)("Estado").ToString()
|
||||
'TxtNumCtaPago.Text = ObjCliente.DtResultados.Rows(0)("NumCtaPago").ToString()
|
||||
LblTelefono.Text = ObjCliente.DtResultados.Rows(0)("Telefono").ToString()
|
||||
'If Not UsuarioActual.Empresa.Funcionalidad(350) = "1" Then
|
||||
' LblCP.Text = ObjCliente.DtResultados.Rows(0)("CP").ToString()
|
||||
'End If
|
||||
|
||||
ViewState("CliLocalidad") = ObjCliente.DtResultados.Rows(0)("Localidad").ToString()
|
||||
ViewState("CliPais") = ObjCliente.DtResultados.Rows(0)("Pais").ToString()
|
||||
ViewState("CliNoExt") = ObjCliente.DtResultados.Rows(0)("NoExt").ToString()
|
||||
@@ -9582,39 +9576,6 @@ Partial Class Ventas
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
'Verifica versión 3.3.()
|
||||
'If (Not UsuarioActual.Empresa.Funcionalidad(350) = "1") AndAlso Not DdlTipoComprobante.SelectedValue.Contiene("Ped", "PeC") Then
|
||||
' Dim dttsat As DataTable = TmpDT.FiltraParametros("ISNULL(SATClaveProdServ,'') = '' OR ISNULL(SATClaveUM,'') = '' ")
|
||||
' If dttsat IsNot Nothing AndAlso dttsat.Rows.Count > 0 Then
|
||||
' Dim str As New StringBuilder
|
||||
' str.Append("Los siguientes productos no tiene asignado la clave Producto SAT o Unidad Medida SAT<br/><br/>")
|
||||
' For Each drt As DataRow In dttsat.Rows
|
||||
' str.AppendFormat("{0} <br/>", drt("CodigoPS"))
|
||||
' Next
|
||||
' Alert(str.ToString(), TipoMensaje.MsgAdvertencia)
|
||||
' dttsat.Dispose()
|
||||
' str.Clear()
|
||||
' Exit Sub
|
||||
' End If
|
||||
' dttsat.Dispose()
|
||||
|
||||
' If UsuarioActual.CveEmpresa = 72 Then
|
||||
' Dim DtNoEncontrados As DataTable = TmpDT.FiltraParametros("ISNULL(SATClaveProdServ,'') = '01010101' ")
|
||||
' If DtNoEncontrados IsNot Nothing AndAlso DtNoEncontrados.Rows.Count > 0 Then
|
||||
' Dim StrNoEncontrados As New StringBuilder
|
||||
' StrNoEncontrados.Append("Los siguientes productos no existen en el catálogo del SAT<br/><br/>")
|
||||
' For Each drt As DataRow In DtNoEncontrados.Rows
|
||||
' StrNoEncontrados.AppendFormat("{0} <br/>", drt("CodigoPS"))
|
||||
' Next
|
||||
' Alert(StrNoEncontrados.ToString(), TipoMensaje.MsgAdvertencia)
|
||||
' DtNoEncontrados.Dispose()
|
||||
' StrNoEncontrados.Clear()
|
||||
' Exit Sub
|
||||
' End If
|
||||
' DtNoEncontrados.Dispose()
|
||||
' End If
|
||||
'End If
|
||||
|
||||
'CREA UNA COPIA DE SEGURIDAD PARA LOS DATOS DEL TMPDT
|
||||
If TmpDTError Is Nothing OrElse TmpDTError.Rows.Count = 0 Then
|
||||
TmpDTError = TmpDT.Copy()
|
||||
@@ -18047,7 +18008,12 @@ Partial Class Ventas
|
||||
End Sub
|
||||
Protected Sub DdlSucursalCliente_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlSucursalCliente.SelectedIndexChanged
|
||||
CargaClienteSucursal(DdlSucursalCliente.SelectedValue.ToEntero())
|
||||
CargaRestriccionesCreditoCliente(Alertas:=True, CveVenta:=Me.CveVenta)
|
||||
|
||||
'RECARGA LAS RESTRICCIONES DE CREDITO SI SE CAMBIO LA SUCURSAL DEL CLIENTE
|
||||
If DdlSucursalCliente.SelectedValue.ToEntero() > 0 Then
|
||||
CargaRestriccionesCreditoCliente(Alertas:=True, CveVenta:=Me.CveVenta)
|
||||
End If
|
||||
|
||||
End Sub
|
||||
Protected Sub DdlCCEdit_SelectedIndexChanged(sender As Object, e As System.EventArgs)
|
||||
Dim gvr As GridViewRow = DirectCast(DirectCast(sender, DropDownList).BindingContainer, GridViewRow)
|
||||
@@ -33137,7 +33103,7 @@ Partial Class Ventas
|
||||
CambiaTipoDocto()
|
||||
CambiaSucursalGeneral(RecargarPartidas:=False)
|
||||
CargaAnticipos(CveCliente)
|
||||
CargaRestriccionesCreditoCliente(CveVenta:=-1)
|
||||
CargaRestriccionesCreditoCliente(True, CveVenta:=-1)
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(558) = "1" Then
|
||||
TabAlmacen.Visible = True
|
||||
|
||||
Reference in New Issue
Block a user