Clientes - Grupos
This commit is contained in:
@@ -1764,6 +1764,23 @@ Partial Class Ventas
|
||||
ViewState("CvePrecioLista") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property FacturarSucursal As Boolean
|
||||
Get
|
||||
Return CBool(IfNull(ViewState("FacturarSucursal"), "False", ViewState("FacturarSucursal")))
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
ViewState("FacturarSucursal") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property ClienteSucursal As Modelos.SucursalModel
|
||||
Get
|
||||
Return CType(ViewState("ClienteSucursal"), Modelos.SucursalModel)
|
||||
End Get
|
||||
Set(value As Modelos.SucursalModel)
|
||||
ViewState("ClienteSucursal") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
|
||||
@@ -4566,6 +4583,12 @@ Partial Class Ventas
|
||||
|
||||
DdlTipoRetencion.SelectedValueExist(DbRowVenta("CveTipoRetencion").ToString())
|
||||
|
||||
Me.FacturarSucursal = CBool(DbRowVenta("FacturarSucursal").ToString())
|
||||
|
||||
If Me.FacturarSucursal Then
|
||||
HabilitarFacturacionSucursal()
|
||||
End If
|
||||
|
||||
CargaPS(-1, DdlPS)
|
||||
|
||||
'CARGA GV DE OC RELACIONADAS
|
||||
@@ -4802,7 +4825,10 @@ Partial Class Ventas
|
||||
End Sub
|
||||
Private Sub CargaUsoCFDI()
|
||||
DdlUsoCFDI.DataSource = GlobalDTSATUsosCFDI(UsuarioActual.Empresa.EsPersonaFisica)
|
||||
DdlSucursalUsoCFDI.DataSource = GlobalDTSATUsosCFDI(UsuarioActual.Empresa.EsPersonaFisica)
|
||||
|
||||
DdlUsoCFDI.DataBind()
|
||||
DdlSucursalUsoCFDI.DataBind()
|
||||
End Sub
|
||||
Private Sub CargaTiposRelacion()
|
||||
DdlTiposRelacion.DataSource = GlobalDTVtaTiposRelacion
|
||||
@@ -5221,6 +5247,11 @@ Partial Class Ventas
|
||||
DdlSucursalCliente.Items.Insert(0, New ListItem("Matriz", "-1"))
|
||||
DdlSucursalCliente.DataBind()
|
||||
|
||||
'SI UTILIZA EL RFC GENERICO PERMITE FACTURAR SUCURSAL
|
||||
If (CveVenta <= 0 OrElse NuevaFactura = 1) AndAlso LblRFC.Text.Trim() = "XAXX010101000" Then
|
||||
HabilitarFacturacionSucursal()
|
||||
End If
|
||||
|
||||
'CargaFolios()
|
||||
|
||||
CargaDatosEstimaciones(CveCliente)
|
||||
@@ -5576,6 +5607,11 @@ Partial Class Ventas
|
||||
|
||||
|
||||
Private Sub CargaClienteSucursal(CveClienteSuc As Integer, Optional ByRef ObjVentas As ClsVentas = Nothing)
|
||||
Me.ClienteSucursal = Nothing
|
||||
Me.FacturarSucursal = False
|
||||
LtlTitleRFCSucursal.Text = ""
|
||||
LtlRFCSucursal.Text = ""
|
||||
|
||||
Dim ObjCliente As New ClsClientes
|
||||
If CveClienteSuc > 0 Then
|
||||
If ObjCliente.GetSucursales(CveCliente, CveClienteSuc) Then
|
||||
@@ -5612,6 +5648,32 @@ Partial Class Ventas
|
||||
UpParametros.Update()
|
||||
End If
|
||||
|
||||
'SI EL CLIENTE TIENE RFC GENERICO Y LA SUCURSAL TIENE RFC DEBE FACTURAR LA SUCURSAL
|
||||
If LblRFC.Text.Trim() = "XAXX010101000" AndAlso Not String.IsNullOrEmpty(ObjCliente.DtResultados.Rows(0)("RFC").ToString()) Then
|
||||
Me.FacturarSucursal = True
|
||||
|
||||
LtlTitleRFCSucursal.Text = "RFC:"
|
||||
LtlRFCSucursal.Text = ObjCliente.DtResultados.Rows(0)("RFC").ToString()
|
||||
|
||||
Me.ClienteSucursal = New Modelos.SucursalModel
|
||||
Me.ClienteSucursal.Nombre = ObjCliente.DtResultados.Rows(0)("SucursalCliente").ToString()
|
||||
Me.ClienteSucursal.RFC = ObjCliente.DtResultados.Rows(0)("RFC").ToString()
|
||||
Me.ClienteSucursal.NoExt = CliNoExt
|
||||
Me.ClienteSucursal.NoInt = CliNoInt
|
||||
Me.ClienteSucursal.Localidad = CliLocalidad
|
||||
Me.ClienteSucursal.Direccion = LblDireccion.Text
|
||||
Me.ClienteSucursal.Colonia = LblColonia.Text
|
||||
Me.ClienteSucursal.Municipio = LblCiudad.Text
|
||||
Me.ClienteSucursal.Estado = LblEstado.Text
|
||||
Me.ClienteSucursal.CP = LblCP.Text
|
||||
Me.ClienteSucursal.Pais = CliPais
|
||||
Me.ClienteSucursal.CorreoSucursal = CliCorreoCot.ToString()
|
||||
Me.ClienteSucursal.TelefonoSucursal = LblTelefono.Text
|
||||
Me.ClienteSucursal.Sucursal = If(DdlSucursalCliente.SelectedValue.ToEntero() > 0, DdlSucursalCliente.SelectedItem.Text, "")
|
||||
Me.ClienteSucursal.ImprimeNombreSucursal = ImprimeNombreSucursal.ToString()
|
||||
|
||||
End If
|
||||
|
||||
If CveVenta <= 0 Then
|
||||
CveMetodoPagoCliente = ObjCliente.DtResultados.Rows(0)("CveMetodoPago").ToString().ToEntero()
|
||||
|
||||
@@ -5666,10 +5728,12 @@ Partial Class Ventas
|
||||
LnkRemisiones.Visible = If(UsuarioActual.TienePermisoProceso(199), True, False) : LnkOCs.Visible = True : LnkCotizaciones.Visible = True : LnkPedido2SinFacturar.Visible = True : InicializaAplicarNCMasiva()
|
||||
End If
|
||||
|
||||
ObjCliente.Dispose()
|
||||
|
||||
UPPVentas.Update()
|
||||
UpEstatus.Update()
|
||||
UPCondicionesPago.Update()
|
||||
ObjCliente.Dispose()
|
||||
UpCliente.Update()
|
||||
End Sub
|
||||
Private Function CargaCreditoDisponible(tCveCliente As Integer, tCveSucursalCliente As Integer, Optional ByRef ObjVentas As ClsVentas = Nothing) As Decimal
|
||||
Dim Retorno As Decimal = 0
|
||||
@@ -6630,6 +6694,11 @@ Partial Class Ventas
|
||||
DtOCTmpDT = TmpDT.Copy
|
||||
TmpDTError = TmpDT.Copy
|
||||
|
||||
If (Me.FacturarSucursal AndAlso DdlSucursalCliente.SelectedValue.ToEntero() > 0 AndAlso (Me.ClienteSucursal IsNot Nothing AndAlso String.IsNullOrEmpty(Me.ClienteSucursal.RFC))) Then
|
||||
Alert("La sucursal no tiene asignada un RFC.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
'CUANDO ES PEDIDO SE DEBE ESPECIFICAR EL NUMERO DE CONTRATO
|
||||
If TrTipoPedido.Visible AndAlso DdlTipoPedido.SelectedIndex = 2 Then
|
||||
If String.IsNullOrEmpty(TxtObsFact.Text.Trim()) Then
|
||||
@@ -7904,6 +7973,10 @@ Partial Class Ventas
|
||||
'ObjFacturaDevolucion.SetSucursal(Me)
|
||||
|
||||
ObjFacturaDevolucion.ClienteSucursal = New Modelos.SucursalModel
|
||||
If Me.ClienteSucursal IsNot Nothing Then
|
||||
ObjFacturaDevolucion.ClienteSucursal.RFC = Me.ClienteSucursal.RFC
|
||||
ObjFacturaDevolucion.ClienteSucursal.Nombre = Me.ClienteSucursal.Nombre
|
||||
End If
|
||||
ObjFacturaDevolucion.ClienteSucursal.NoExt = CliNoExt
|
||||
ObjFacturaDevolucion.ClienteSucursal.NoInt = CliNoInt
|
||||
ObjFacturaDevolucion.ClienteSucursal.Localidad = CliLocalidad
|
||||
@@ -8140,6 +8213,11 @@ Partial Class Ventas
|
||||
'ObjFacturaBonificacion.SetSucursal(Me)
|
||||
|
||||
ObjFacturaBonificacion.ClienteSucursal = New Modelos.SucursalModel
|
||||
If Me.ClienteSucursal IsNot Nothing Then
|
||||
ObjFacturaBonificacion.ClienteSucursal.Nombre = Me.ClienteSucursal.Nombre
|
||||
ObjFacturaBonificacion.ClienteSucursal.RFC = Me.ClienteSucursal.RFC
|
||||
End If
|
||||
|
||||
ObjFacturaBonificacion.ClienteSucursal.NoExt = CliNoExt
|
||||
ObjFacturaBonificacion.ClienteSucursal.NoInt = CliNoInt
|
||||
ObjFacturaBonificacion.ClienteSucursal.Localidad = CliLocalidad
|
||||
@@ -8371,7 +8449,6 @@ Partial Class Ventas
|
||||
ObjFactura = New Modelos.Factura
|
||||
End If
|
||||
|
||||
|
||||
ObjFactura.Version = "3.3"
|
||||
ObjFactura.CveUsuario = UsuarioActual.CveUsuario
|
||||
ObjFactura.CveEmpresa = UsuarioActual.CveEmpresa
|
||||
@@ -8383,7 +8460,7 @@ Partial Class Ventas
|
||||
ObjFactura.Moneda = DdlMoneda.SelectedItem.Text
|
||||
ObjFactura.MonedaSAT = GlobalDTMonedas.FiltroPrimeroValor("AbreviaturaSAT", $"CveMoneda = {DdlMoneda.SelectedValue}")
|
||||
ObjFactura.TipoDocto = If(IfNull(ViewState("CveRemision"), 0).ToString().ToEntero() > 0, "Ing", DdlTipoComprobante.SelectedValue)
|
||||
|
||||
ObjFactura.FacturarSucursal = (Me.FacturarSucursal AndAlso DdlSucursalCliente.SelectedValue.ToEntero() > 0 AndAlso (Me.ClienteSucursal IsNot Nothing AndAlso Not String.IsNullOrEmpty(Me.ClienteSucursal.RFC)))
|
||||
|
||||
'ObjFactura.RefDocto = TxtDocto.Text.Trim
|
||||
'si es cancelacion, debe de conservar el folio actual
|
||||
@@ -8832,8 +8909,12 @@ Partial Class Ventas
|
||||
'ObjFactura.CveSubProyecto = DdlSubProyectoDatos.SelectedValue.ToEntero()
|
||||
ObjFactura.SetSubProyectoMatriz(Me)
|
||||
ObjFactura.SetSubProyecto(Me)
|
||||
ObjFactura.ClienteSucursal = New Modelos.SucursalModel
|
||||
ObjFactura.ClienteSucursal = New Modelos.SucursalModel()
|
||||
If Not CveEmpresaCRM > 0 Then
|
||||
If Me.ClienteSucursal IsNot Nothing Then
|
||||
ObjFactura.ClienteSucursal.RFC = Me.ClienteSucursal.RFC
|
||||
ObjFactura.ClienteSucursal.Nombre = Me.ClienteSucursal.Nombre
|
||||
End If
|
||||
ObjFactura.ClienteSucursal.NoExt = CliNoExt
|
||||
ObjFactura.ClienteSucursal.NoInt = CliNoInt
|
||||
ObjFactura.ClienteSucursal.Localidad = CliLocalidad
|
||||
@@ -9232,7 +9313,12 @@ Partial Class Ventas
|
||||
ObjFacturaDevolucion.CveSubProyecto = DdlSubProyectoDatos.SelectedValue.ToEntero()
|
||||
ObjFacturaDevolucion.SetSubProyectoMatriz(Me)
|
||||
ObjFacturaDevolucion.SetSubProyecto(Me)
|
||||
|
||||
ObjFacturaDevolucion.ClienteSucursal = New Modelos.SucursalModel
|
||||
If Me.ClienteSucursal IsNot Nothing Then
|
||||
ObjFacturaDevolucion.ClienteSucursal.RFC = Me.ClienteSucursal.RFC
|
||||
ObjFacturaDevolucion.ClienteSucursal.Nombre = Me.ClienteSucursal.Nombre
|
||||
End If
|
||||
ObjFacturaDevolucion.ClienteSucursal.NoExt = CliNoExt
|
||||
ObjFacturaDevolucion.ClienteSucursal.NoInt = CliNoInt
|
||||
ObjFacturaDevolucion.ClienteSucursal.Localidad = CliLocalidad
|
||||
@@ -9245,6 +9331,7 @@ Partial Class Ventas
|
||||
ObjFacturaDevolucion.ClienteSucursal.CorreoSucursal = CliCorreoCot.ToString()
|
||||
ObjFacturaDevolucion.ClienteSucursal.TelefonoSucursal = LblTelefono.Text
|
||||
ObjFacturaDevolucion.ClienteSucursal.Sucursal = If(DdlSucursalCliente.SelectedValue.ToEntero() > 0, DdlSucursalCliente.SelectedItem.Text, "")
|
||||
ObjFacturaDevolucion.ClienteSucursal.ImprimeNombreSucursal = ImprimeNombreSucursal.ToString()
|
||||
|
||||
'ENVIO DIRECCION
|
||||
ObjFacturaDevolucion.EnviarA = New Modelos.EnviarAModel
|
||||
@@ -9292,13 +9379,18 @@ Partial Class Ventas
|
||||
|
||||
Timbre.Comprobante.Confirmacion = ""
|
||||
|
||||
Timbre.Receptor.RFC = Obj.Cliente.RFC
|
||||
Timbre.Receptor.Nombre = Obj.Cliente.Nombre
|
||||
If Obj.FacturarSucursal Then
|
||||
Timbre.Receptor.RFC = Obj.ClienteSucursal.RFC
|
||||
Timbre.Receptor.Nombre = Obj.ClienteSucursal.Nombre
|
||||
Else
|
||||
Timbre.Receptor.RFC = Obj.Cliente.RFC
|
||||
Timbre.Receptor.Nombre = Obj.Cliente.Nombre
|
||||
End If
|
||||
|
||||
Timbre.Receptor.ResidenciaFiscal = ""
|
||||
Timbre.Receptor.NumeroRegistroTributario = ""
|
||||
Timbre.Receptor.UsoCFDI = Obj.ClaveUsoCFDI
|
||||
|
||||
|
||||
If HdnTipoDescuento.Value = "3" And DdlTipoAmortizacionAnticipo.SelectedValue.ToEntero() > 0 Then
|
||||
|
||||
Timbre.CFDIRelacionados.TipoRelacion = "07"
|
||||
@@ -9367,8 +9459,6 @@ Partial Class Ventas
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
Dim totSubTotal As Decimal = Obj.SubTotal
|
||||
Dim totIVA As Decimal = Obj.IVA
|
||||
Dim totRetIVA As Decimal = Obj.RetIVA
|
||||
@@ -9936,7 +10026,7 @@ Partial Class Ventas
|
||||
CveVentaRelacion:=(If(factura.CveVentaRelacion.ToEntero() > 0, factura.CveVentaRelacion, -1)), ImporteRelacion:=(If(factura.ImporteRelacion <> Nothing, factura.ImporteRelacion, -1)),
|
||||
CveTipoAmortizacionAnticipo:=factura.CveTipoAmortizacionAnticipo, CveEmpresaCRM:=CveEmpresaCRM, EsInterno:=EsInterno, CveAcercamientoCRM:=CveAcercamientoCRM,
|
||||
DiasCredito:=factura.DiasCredito, EsDiasCreditoFijo:=factura.EsDiasCreditoFijo, AnticipoEspecial:=If(TrAntEspecial.Visible, ChkAntEspecial.Checked, False),
|
||||
Kilometraje:=TxtKilometraje.Text.ToDouble, EsAmortizacion:=EsNCAmortizacion, CveTipoRetencion:=factura.CveTipoRetencion, CorreoNotificacion:=TxtCorreoNotificaciones.Text, FormaPaqueteria:=RblPaqueteria.SelectedValue.ToEntero) Then
|
||||
Kilometraje:=TxtKilometraje.Text.ToDouble, EsAmortizacion:=EsNCAmortizacion, CveTipoRetencion:=factura.CveTipoRetencion, CorreoNotificacion:=TxtCorreoNotificaciones.Text, FormaPaqueteria:=RblPaqueteria.SelectedValue.ToEntero, FacturarSucursal:=factura.FacturarSucursal) Then
|
||||
ErrorList.Add("Ocurrió un error al Generar la Venta.<br />Revise su factura y cualquier detalle comuníquese a Soporte Técnico")
|
||||
Else
|
||||
If factura.TipoDocto.Contiene("Dev", "Egs") Or DtVentasNC IsNot Nothing Or CveEstatusRefacturacion = 1 Then
|
||||
@@ -15027,7 +15117,11 @@ Partial Class Ventas
|
||||
|
||||
DdlVendedor.SelectedValue = "0"
|
||||
DdlVendedor.Items.Insert(0, New ListItem("Sin Asignar", "0"))
|
||||
|
||||
DdlVendedorSucursal.DataSource = DdlVendedor.DataSource
|
||||
|
||||
DdlVendedor.DataBind()
|
||||
DdlVendedorSucursal.DataBind()
|
||||
|
||||
DdlVendedor.SelectedValueExist(CveVendedorActual)
|
||||
|
||||
@@ -16709,6 +16803,84 @@ Partial Class Ventas
|
||||
Protected Sub TxtFolio_TextChanged(sender As Object, e As System.EventArgs) Handles TxtFolio.TextChanged
|
||||
ViewState("EstablecioFolio") = True
|
||||
End Sub
|
||||
Private Sub HabilitarFacturacionSucursal()
|
||||
trsucursalciente.Visible = True
|
||||
LnkAgregarSucursal.Visible = True
|
||||
LblSucursal.Text = "Cliente"
|
||||
If (CveVenta <= 0 OrElse NuevaFactura = 1) Then
|
||||
DdlSucursalCliente.Enabled = True
|
||||
End If
|
||||
DdlSucursalCliente_SelectedIndexChanged(DdlSucursalCliente, EventArgs.Empty)
|
||||
|
||||
UpCliente.Update()
|
||||
End Sub
|
||||
|
||||
Protected Sub ChkFacturarSucursal_CheckedChanged(sender As Object, e As EventArgs)
|
||||
|
||||
End Sub
|
||||
Protected Sub LnkAgregarSucursal_Click(sender As Object, e As EventArgs)
|
||||
RegistraScript("showDivAgregarSucursal();")
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnAgregar_Click(sender As Object, e As System.EventArgs) Handles BtnAgregarSucursal.Click
|
||||
|
||||
Dim LT As String = "0"
|
||||
Dim LG As String = "0"
|
||||
|
||||
If CveCliente > 0 Then
|
||||
Dim ObjCliente As New ClsClientes
|
||||
Try
|
||||
If ObjCliente.AddSucursal(CveCliente, TxtNombreSucursal.Text.Trim, UsuarioActual.CveUsuario, TxtCiudadSucursal.Text.Trim, TxtColoniaSucursal.Text.Trim, TxtCPSucursal.Text.Trim, TxtDireccionSucursal.Text.Trim, TxtEstadoSucursal.Text.Trim, TxtLocalidadSucursal.Text.Trim, TxtPaisSucursal.Text.Trim, TxtNumExtSucursal.Text.Trim, TxtNumIntSucursal.Text.Trim, TxtTelefonoSucursal.Text.Trim.Replace(" ", "").Replace("(", "").Replace(")", "").Replace("-", ""), TxtCorreoSucursal.Text.Trim, "", "",
|
||||
DdlVendedorSucursal.SelectedValue.ToEntero, "", -1, 0, -1, DdlSucursalUsoCFDI.SelectedValue.ToEntero, -1, -1, LT:=LT, LG:=LG, RFC:=TxtRFCSucursal.Text.Trim()) Then
|
||||
TxtNombreSucursal.Text = ""
|
||||
TxtCiudadSucursal.Text = ""
|
||||
TxtColoniaSucursal.Text = ""
|
||||
TxtCPSucursal.Text = ""
|
||||
TxtDireccionSucursal.Text = ""
|
||||
TxtEstadoSucursal.Text = ""
|
||||
TxtLocalidadSucursal.Text = ""
|
||||
TxtPaisSucursal.Text = ""
|
||||
TxtNumExtSucursal.Text = ""
|
||||
TxtNumIntSucursal.Text = ""
|
||||
TxtTelefonoSucursal.Text = ""
|
||||
TxtCorreoSucursal.Text = ""
|
||||
|
||||
DdlVendedorSucursal.SelectedIndex = 0
|
||||
DdlSucursalUsoCFDI.SelectedIndex = 0
|
||||
|
||||
|
||||
Alert("La nueva Sucursal del Cliente se guardó correctamente.", TipoMensaje.MsgInformacion)
|
||||
|
||||
'VUELVE A CARGAR LAS SUCURSALES
|
||||
DdlSucursalCliente.Items.Clear()
|
||||
If ObjCliente.GetSucursales(CveCliente) Then
|
||||
DdlSucursalCliente.DataSource = ObjCliente.DtResultados
|
||||
If ObjCliente.DtResultados.Rows.Count > 0 Then
|
||||
trsucursalciente.Visible = True
|
||||
Else
|
||||
trsucursalciente.Visible = False
|
||||
End If
|
||||
Else
|
||||
trsucursalciente.Visible = False
|
||||
DdlSucursalCliente.DataSource = Nothing
|
||||
End If
|
||||
DdlSucursalCliente.Items.Insert(0, New ListItem("Matriz", "-1"))
|
||||
DdlSucursalCliente.DataBind()
|
||||
|
||||
End If
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al agregar la sucursal", ex)
|
||||
End Try
|
||||
ObjCliente.Dispose()
|
||||
|
||||
End If
|
||||
|
||||
UpCliente.Update()
|
||||
RegistraScript("hideDivAgregarSucursal();")
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub ConfiguraTipoDocto()
|
||||
|
||||
'Esconde Todo
|
||||
@@ -17824,6 +17996,11 @@ Partial Class Ventas
|
||||
Dim TotalT As Decimal = TxtTotal.Text.ToDecimal
|
||||
Dim RFCReceptor As String = LblRFC.Text.Trim
|
||||
|
||||
'SI SE FACTURO LA SUCURSAL DEL CLIENTE TOMA EL RFC DE ESTA
|
||||
If FacturarSucursal AndAlso Me.ClienteSucursal IsNot Nothing Then
|
||||
RFCReceptor = Me.ClienteSucursal.RFC
|
||||
End If
|
||||
|
||||
Dim SWatch As New Stopwatch
|
||||
SWatch.Start()
|
||||
|
||||
@@ -20040,6 +20217,12 @@ Partial Class Ventas
|
||||
|
||||
Dim TotalT As Decimal = TxtTotal.Text.ToDecimal
|
||||
Dim RFCReceptor As String = LblRFC.Text.Trim
|
||||
|
||||
'SI SE FACTURO LA SUCURSAL DEL CLIENTE TOMA EL RFC DE ESTA
|
||||
If FacturarSucursal AndAlso Me.ClienteSucursal IsNot Nothing Then
|
||||
RFCReceptor = Me.ClienteSucursal.RFC
|
||||
End If
|
||||
|
||||
Dim SWatch As New Stopwatch
|
||||
SWatch.Start()
|
||||
Dim Vigencia = Timbrado.VerificarVigenciaSAT(FolioFiscal, UsuarioActual.Empresa.RFC, RFCReceptor, TotalT.ToString(), True)
|
||||
@@ -25953,6 +26136,12 @@ Partial Class Ventas
|
||||
Return Retorno
|
||||
End Function
|
||||
Private Sub EmitirDocumentoNuevo(TipoDoctoNuevo As String)
|
||||
|
||||
If (FacturarSucursal AndAlso DdlSucursalCliente.SelectedValue.ToEntero() > 0 AndAlso (Me.ClienteSucursal IsNot Nothing AndAlso String.IsNullOrEmpty(Me.ClienteSucursal.RFC))) Then
|
||||
Alert("La sucursal no tiene asignada un RFC.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
If GvPagos.Rows.Count = 0 And UsuarioActual.Empresa.Funcionalidad(558).ToEntero() = 1 And RBLPago.SelectedValue.ToEntero() = 2 Then
|
||||
Alert("No se puede facturar hasta que se haya especificado detalladamente la forma de pago", TipoMensaje.MsgAdvertencia)
|
||||
Else
|
||||
|
||||
Reference in New Issue
Block a user