Merge branch 'master' of http://192.168.10.111:8383/SIG
This commit is contained in:
@@ -9619,10 +9619,11 @@
|
||||
TxtImporte.value = FormatoNumero(ImporteRestante, 2);
|
||||
$get('TxtNCImporte').value = FormatoNumero(ToDouble($get('TxtNCImporte').value) + ToDouble(TxtImporte.value), 2);
|
||||
}else {
|
||||
$get('TxtNCImporte').value = FormatoNumero(ToDouble($get('TxtNCImporte').value) + Importe, 2);
|
||||
$get('TxtNCImporte').value = FormatoNumero(ToDouble($get('TxtNCImporte').value) + Importe, 2);
|
||||
TxtImporte.value = FormatoNumero(Importe, 2);
|
||||
}
|
||||
|
||||
if (ToDouble(TxtImporte.value) <= 0) {
|
||||
if (ToDouble(TxtImporte.value.replace(",", "")) <= 0) {
|
||||
Chk.checked = false;
|
||||
}
|
||||
|
||||
|
||||
@@ -2286,6 +2286,15 @@ Partial Class Ventas
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property TieneBloqueoPorCreditoVencimiento As Integer
|
||||
Get
|
||||
Return IfNull(ViewState("TieneBloqueoPorCreditoVencimiento"), "0", ViewState("TieneBloqueoPorCreditoVencimiento")).ToString().ToEntero()
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("TieneBloqueoPorCreditoVencimiento") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property EsNCDevolucionEfectivo As Boolean
|
||||
Get
|
||||
Return If(IsNothing(ViewState("EsNCDevolucionEfectivo")), False, CType(ViewState("EsNCDevolucionEfectivo"), Boolean))
|
||||
@@ -2439,6 +2448,8 @@ Partial Class Ventas
|
||||
Me.CveVendedorContrato = -1
|
||||
Me.CveVendedorEmpresaCRM = -1
|
||||
Me.EsGarantia = False
|
||||
Me.TieneBloqueoPorCreditoVencimiento = 0
|
||||
Me.ClienteEsDistribuidor = False
|
||||
CveEmpresaCRM = 0
|
||||
CveAcercamientoCRM = 0
|
||||
EstatusCliente = False
|
||||
@@ -5905,7 +5916,7 @@ Partial Class Ventas
|
||||
End If
|
||||
|
||||
'ACTIVA BOTONERA | DEBE TENER CONCEPTOS PENDIENTES DE FACTURAR
|
||||
If TmpDT.SUM("CantidadFacturadaRem") < TmpDT.SUM("Cantidad") Then
|
||||
If (TmpDT.SUM("CantidadFacturadaRem") < TmpDT.SUM("Cantidad")) AndAlso TieneBloqueoPorCreditoVencimiento = 0 Then
|
||||
BtnsFacturar.Visible = True
|
||||
|
||||
'E119, bloquear la facturación de remisiones que no estén surtidas
|
||||
@@ -5935,48 +5946,51 @@ Partial Class Ventas
|
||||
'Si es Empresa de Acumuladores
|
||||
If CveVenta > 0 AndAlso UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso DbRowVenta("TipoDocto").ToString() = "Rem" AndAlso (GlobalDTEstatusFactura().FiltroPrimeroValor("TipoEstatus", $"CveEstatusFactura = {Me.CveEstatus}").ToEntero() <> 5) Then
|
||||
|
||||
BtnsFacturar.Visible = False
|
||||
|
||||
Dim DtUsadosPendientes As DataTable = Nothing
|
||||
Dim DtGarantiasPendientes As DataTable = Nothing
|
||||
|
||||
Dim ObjUsados As New ClsVentas
|
||||
|
||||
If ObjUsados.GetVentasUsados(CveVenta, -1, DbRowVenta("Fecha").ToString().ToDateTime, UsuarioActual.CveEmpresa) Then
|
||||
DtUsadosPendientes = ObjUsados.DtResultados.Copy()
|
||||
End If
|
||||
|
||||
If ObjUsados.GetVentasGarantiaPendiente(CveVenta, NowADS(), UsuarioActual.CveEmpresa) Then
|
||||
DtGarantiasPendientes = ObjUsados.DtResultados.Copy()
|
||||
End If
|
||||
|
||||
'If ObjUsados.GetVentasGarantiaPendiente(CveVenta, -1, NowADS(), UsuarioActual.CveEmpresa) Then
|
||||
' DtGarantiasPendientes = ObjUsados.DtResultados.Copy()
|
||||
'End If
|
||||
|
||||
ObjUsados.Dispose()
|
||||
|
||||
BtnsFacturar.Visible = True
|
||||
|
||||
'VERIFICA SI YA SE FACTURO COMPLETAMENTE
|
||||
If TmpDT.SUM("CantidadFacturadaRem") = TmpDT.SUM("Cantidad") Then
|
||||
If TieneBloqueoPorCreditoVencimiento = 0 Then
|
||||
BtnsFacturar.Visible = False
|
||||
End If
|
||||
|
||||
'VERIFICA SI TIENE USADOS O GARANTIAS PENDIENTES
|
||||
If BtnsFacturar.Visible Then
|
||||
If (Not EsGarantia AndAlso (DtUsadosPendientes IsNot Nothing AndAlso DtUsadosPendientes.Rows.Count > 0)) Then
|
||||
BtnsFacturar.Visible = False
|
||||
Alert("Tiene usados pendiente de recibir", TipoMensaje.MsgAdvertencia)
|
||||
Dim DtUsadosPendientes As DataTable = Nothing
|
||||
Dim DtGarantiasPendientes As DataTable = Nothing
|
||||
|
||||
Dim ObjUsados As New ClsVentas
|
||||
|
||||
If ObjUsados.GetVentasUsados(CveVenta, -1, DbRowVenta("Fecha").ToString().ToDateTime, UsuarioActual.CveEmpresa) Then
|
||||
DtUsadosPendientes = ObjUsados.DtResultados.Copy()
|
||||
End If
|
||||
|
||||
If (EsGarantia AndAlso (DtGarantiasPendientes IsNot Nothing AndAlso DtGarantiasPendientes.Rows.Count > 0)) Then
|
||||
Alert("Tiene garantías pendientes de recibir", TipoMensaje.MsgAdvertencia)
|
||||
If ObjUsados.GetVentasGarantiaPendiente(CveVenta, NowADS(), UsuarioActual.CveEmpresa) Then
|
||||
DtGarantiasPendientes = ObjUsados.DtResultados.Copy()
|
||||
End If
|
||||
|
||||
'If ObjUsados.GetVentasGarantiaPendiente(CveVenta, -1, NowADS(), UsuarioActual.CveEmpresa) Then
|
||||
' DtGarantiasPendientes = ObjUsados.DtResultados.Copy()
|
||||
'End If
|
||||
|
||||
ObjUsados.Dispose()
|
||||
|
||||
BtnsFacturar.Visible = True
|
||||
|
||||
'VERIFICA SI YA SE FACTURO COMPLETAMENTE
|
||||
If TmpDT.SUM("CantidadFacturadaRem") = TmpDT.SUM("Cantidad") Then
|
||||
BtnsFacturar.Visible = False
|
||||
End If
|
||||
|
||||
'VERIFICA SI TIENE USADOS O GARANTIAS PENDIENTES
|
||||
If BtnsFacturar.Visible Then
|
||||
If (Not EsGarantia AndAlso (DtUsadosPendientes IsNot Nothing AndAlso DtUsadosPendientes.Rows.Count > 0)) Then
|
||||
BtnsFacturar.Visible = False
|
||||
Alert("Tiene usados pendiente de recibir", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
|
||||
If (EsGarantia AndAlso (DtGarantiasPendientes IsNot Nothing AndAlso DtGarantiasPendientes.Rows.Count > 0)) Then
|
||||
Alert("Tiene garantías pendientes de recibir", TipoMensaje.MsgAdvertencia)
|
||||
BtnsFacturar.Visible = False
|
||||
End If
|
||||
End If
|
||||
|
||||
LBFacturarAnticipo.Visible = UsuarioActual.TienePermisoProceso(274)
|
||||
End If
|
||||
|
||||
LBFacturarAnticipo.Visible = UsuarioActual.TienePermisoProceso(274)
|
||||
End If
|
||||
|
||||
'SI ES COMPLEMENTARIA, NO DEBE PERMITIR FACTURAR
|
||||
@@ -6071,7 +6085,7 @@ Partial Class Ventas
|
||||
CargaPS(-1, DdlPS)
|
||||
|
||||
'Verifico si tiene la funcionalidad (135)
|
||||
If DdlTipoComprobante.SelectedValue = "Cot" AndAlso UsuarioActual.Empresa.Funcionalidad(135).Contiene("1", "2") Then
|
||||
If DdlTipoComprobante.SelectedValue = "Cot" AndAlso UsuarioActual.Empresa.Funcionalidad(135).Contiene("1", "2") AndAlso TieneBloqueoPorCreditoVencimiento = 0 Then
|
||||
|
||||
Select Case UsuarioActual.Empresa.Funcionalidad(135)
|
||||
Case "1" ' POR SUPERVISOR
|
||||
@@ -6182,14 +6196,13 @@ Partial Class Ventas
|
||||
End Function
|
||||
|
||||
Private Sub VerificarBtnFacturarCotizacion(CveVendedor As Integer, Optional MostrarGenerarRemision As Boolean = True)
|
||||
If TmpDT.SUM("CantidadFacturadaCot") < TmpDT.SUM("Cantidad") AndAlso DdlTipoComprobante.SelectedValue.Contiene("Cot") Then
|
||||
If TmpDT.SUM("CantidadFacturadaCot") < TmpDT.SUM("Cantidad") AndAlso DdlTipoComprobante.SelectedValue.Contiene("Cot") AndAlso TieneBloqueoPorCreditoVencimiento = 0 Then
|
||||
|
||||
If UsuarioActual.TienePermisoProceso(199) Then
|
||||
BtnGenerarRemision.Visible = If(CveEstatus = 10, False, True)
|
||||
Else
|
||||
BtnGenerarRemision.Visible = False
|
||||
End If
|
||||
|
||||
If UsuarioActual.TienePermisoProceso(60) Then BtnsFacturar.Visible = True 'puede facturar
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso UsuarioActual.TienePermisoProceso(60) Then
|
||||
@@ -7590,7 +7603,7 @@ Partial Class Ventas
|
||||
If Not EsCreaApartirDe AndAlso (DdlTipoComprobante.SelectedValue = "Cot" AndAlso CveVenta > 0) Then
|
||||
DdlTipoComprobante.SelectedValueExist("Cot")
|
||||
Else
|
||||
If UsuarioActual.Empresa.Funcionalidad(531) <> "1" Then
|
||||
If UsuarioActual.Empresa.Funcionalidad(595) = "1" Then
|
||||
DdlTipoComprobante.SelectedValueExistInsert("PA", "Autorización")
|
||||
DdlTipoComprobante.SelectedValue = "PA"
|
||||
|
||||
@@ -7611,9 +7624,19 @@ Partial Class Ventas
|
||||
DdlTipoComprobante.Items.Remove(DdlTipoComprobante.Items.FindByValue("Rem"))
|
||||
End If
|
||||
|
||||
Dim Bloqueo As Boolean = False
|
||||
|
||||
If Not DdlTipoComprobante.SelectedValue.Contiene("PA") AndAlso UsuarioActual.Empresa.Funcionalidad(531) <> "1" Then
|
||||
Bloqueo = True
|
||||
End If
|
||||
|
||||
'SI EL CLIENTE ES DISTRIBUIDOR Y TIENE FACTURAS VENCIDAS, DEBE BLOQUEAR
|
||||
If UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso ClienteEsDistribuidor AndAlso Opcion.Contiene(2, 3) Then
|
||||
Bloqueo = True
|
||||
End If
|
||||
|
||||
'SI ES AUTORIZACION DEBE PERMITIR GENERARLA
|
||||
If (Not DdlTipoComprobante.SelectedValue.Contiene("PA")) AndAlso UsuarioActual.Empresa.Funcionalidad(531) <> "1" Then
|
||||
If Bloqueo Then
|
||||
BtnEmitirImprimir.Visible = False
|
||||
BtnsFacturar.Visible = False
|
||||
LBFacturarAnticipo.Visible = UsuarioActual.TienePermisoProceso(274)
|
||||
@@ -7621,6 +7644,11 @@ Partial Class Ventas
|
||||
LnkPedido2SinFacturar.Visible = False
|
||||
LnkCotizaciones.Visible = False
|
||||
LnkOCs.Visible = False
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
|
||||
TieneBloqueoPorCreditoVencimiento = 1
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
If DdlTipoComprobante.SelectedValue = "Cot" AndAlso UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
|
||||
@@ -7645,6 +7673,7 @@ Partial Class Ventas
|
||||
'SI NO TIENE AUTORIZACION, MANTIENE EL BLOQUEO POR CONDICIONES DE CREDITO
|
||||
If Autorizacion > 0 Then
|
||||
BtnsFacturar.Visible = True
|
||||
TieneBloqueoPorCreditoVencimiento = 0
|
||||
End If
|
||||
End If
|
||||
|
||||
@@ -7688,6 +7717,7 @@ Partial Class Ventas
|
||||
'SI NO TIENE AUTORIZACION, MANTIENE EL BLOQUEO POR CONDICIONES DE CREDITO
|
||||
If Autorizacion > 0 Then
|
||||
BtnsFacturar.Visible = True
|
||||
TieneBloqueoPorCreditoVencimiento = 0
|
||||
End If
|
||||
End If
|
||||
|
||||
@@ -7758,6 +7788,10 @@ Partial Class Ventas
|
||||
BtnsFacturar.Visible = False
|
||||
BtnGenerarRemision.Visible = False
|
||||
Alert(OpcionMsg, TipoMensaje.MsgAdvertencia)
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso ClienteEsDistribuidor AndAlso Opcion.Contiene(2, 3) Then
|
||||
TieneBloqueoPorCreditoVencimiento = 1
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
@@ -7773,45 +7807,62 @@ Partial Class Ventas
|
||||
End If
|
||||
ObjVentas.Dispose()
|
||||
Case Else 'SI NO TIENE NINGUN TIPO DE AUTORIZACION CONFIGURADO
|
||||
'RMF. codigo temporal para pruebas
|
||||
If Alertas AndAlso UsuarioActual.CveEmpresa = 140 Then
|
||||
'VERIFICAR CANDADOS DE VENTA
|
||||
If DdlTipoComprobante.SelectedValue = "Cot" AndAlso CveVenta > 0 Then
|
||||
Dim Vta As New ClsVentas
|
||||
Dim Opcion As Integer = Vta.ObtenerClienteLimitesVenta(CveCliente, UsuarioActual.CveEmpresa)
|
||||
Dim OpcionMsg As String = String.Format("El Cliente se encuentra bloqueado por la siguiente razón: <br> <br> {0}", Vta.SerieVenta)
|
||||
Vta.Dispose()
|
||||
If Opcion > 0 Then
|
||||
LnkSolicitarCredito.Visible = True
|
||||
BtnsFacturar.Visible = False
|
||||
BtnGenerarRemision.Visible = False
|
||||
Alert(OpcionMsg, TipoMensaje.MsgAdvertencia)
|
||||
If UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso ClienteEsDistribuidor AndAlso Opcion.Contiene(2, 3) Then
|
||||
TieneBloqueoPorCreditoVencimiento = 1
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(558) = "1" Then
|
||||
RBLPago.SelectedValue = "2"
|
||||
RBLPago.Items(0).Enabled = False
|
||||
RBLPago_SelectedIndexChanged(Nothing, Nothing)
|
||||
UPCondicionesPago.Update()
|
||||
Else
|
||||
'VERIFICAR CANDADOS DE VENTA
|
||||
If DdlTipoComprobante.SelectedValue = "Cot" AndAlso CveVenta > 0 Then
|
||||
Dim Vta As New ClsVentas
|
||||
Dim Opcion As Integer = Vta.ObtenerClienteLimitesVenta(CveCliente, UsuarioActual.CveEmpresa)
|
||||
Dim OpcionMsg As String = String.Format("El Cliente se encuentra bloqueado por la siguiente razón: <br> <br> {0}", Vta.SerieVenta)
|
||||
Vta.Dispose()
|
||||
If Opcion > 0 Then
|
||||
BtnsFacturar.Visible = False
|
||||
BtnGenerarRemision.Visible = False
|
||||
Alert(OpcionMsg, TipoMensaje.MsgAdvertencia)
|
||||
'este codigo no es temporal
|
||||
If Alertas Then Alert("El cliente tiene su límite de crédito agotado.", TipoMensaje.MsgAdvertencia)
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
|
||||
LnkSolicitarCredito.Visible = True
|
||||
DdlTipoAutorizacion.SelectedValueExist("1")
|
||||
|
||||
If Not UsuarioActual.TienePermisoProceso(268) AndAlso DdlTipoComprobante.SelectedValue.Contiene("Ing", "Ant", "Rem", "PA") Then
|
||||
Dim Autorizacion As Integer = 0
|
||||
|
||||
Dim ObjVentas As New ClsVentas
|
||||
If ObjVentas.GetAutorizacionLimite(UsuarioActual.CveEmpresa, CveCliente, DdlVendedor.SelectedValue.ToEntero, "Ing", CveEstatus:=1) Then
|
||||
Dim RowAutorizacion As DataRow = Nothing
|
||||
'SI TIENE DIAS VENCIDOS BUSCAR POR TIPO VENCIMIENTO
|
||||
If TieneDiasVencidos Then
|
||||
RowAutorizacion = ObjVentas.DtResultados.FiltroPrimero($"TipoAutorizacion IN(1,2) AND CveVenta IS NULL AND CveTipoDocumento='Ing'", Orderby:="Importe DESC")
|
||||
Else
|
||||
RowAutorizacion = ObjVentas.DtResultados.FiltroPrimero($"TipoAutorizacion = 1 AND CveVenta IS NULL AND CveTipoDocumento='Ing'", Orderby:="Importe DESC")
|
||||
End If
|
||||
|
||||
If RowAutorizacion IsNot Nothing Then
|
||||
Autorizacion = RowAutorizacion("CveAutorizacion").ToString().ToEntero()
|
||||
End If
|
||||
End If
|
||||
ObjVentas.Dispose()
|
||||
|
||||
'SI NO TIENE AUTORIZACION, MANTIENE EL BLOQUEO POR CONDICIONES DE CREDITO
|
||||
If Autorizacion <= 0 Then
|
||||
BtnEmitirImprimir.Visible = False
|
||||
TieneBloqueoPorCreditoVencimiento = 1
|
||||
End If
|
||||
|
||||
End If
|
||||
End If
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(558) = "1" Then
|
||||
RBLPago.SelectedValue = "2"
|
||||
RBLPago.Items(0).Enabled = False
|
||||
RBLPago_SelectedIndexChanged(Nothing, Nothing)
|
||||
UPCondicionesPago.Update()
|
||||
Else
|
||||
'este codigo no es temporal
|
||||
If Alertas Then Alert("El cliente tiene su límite de crédito agotado.", TipoMensaje.MsgAdvertencia)
|
||||
If UsuarioActual.CveEmpresa = 140 Then
|
||||
LnkSolicitarCredito.Visible = True
|
||||
DdlTipoAutorizacion.SelectedValueExist("1")
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
End If
|
||||
End Select
|
||||
|
||||
@@ -7822,13 +7873,32 @@ Partial Class Ventas
|
||||
|
||||
'VERIFICAR RESTRICCIONES DEL CLIENTE
|
||||
If Not UsuarioActual.Empresa.Funcionalidad(702).ToEntero() > 0 Then
|
||||
If (DdlTipoComprobante.SelectedValue = "Cot" AndAlso CveVenta > 0 AndAlso RBLPago.SelectedValue = "2") Then
|
||||
Dim Valida As Boolean = True
|
||||
If UsuarioActual.Empresa.Funcionalidad(109) = "1" AndAlso (Me.CveCliente = UsuarioActual.Empresa.Funcionalidad(714).ToEntero() OrElse Me.PermiteCredito) Then
|
||||
Valida = False
|
||||
|
||||
Dim ValidaRemision As Boolean = False
|
||||
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
|
||||
ValidaRemision = True
|
||||
End If
|
||||
|
||||
Dim ValidaCondicionesCredito As Boolean = False
|
||||
|
||||
'SI ES UNA VENTA EXISTENTE
|
||||
If CveVenta > 0 Then
|
||||
If (DdlTipoComprobante.SelectedValue = "Cot") AndAlso RBLPago.SelectedValue = "2" Then
|
||||
ValidaCondicionesCredito = True
|
||||
End If
|
||||
|
||||
If Valida Then
|
||||
If (ValidaRemision AndAlso DdlTipoComprobante.SelectedValue = "Rem") AndAlso RBLPago.SelectedValue = "1" Then
|
||||
ValidaCondicionesCredito = True
|
||||
End If
|
||||
End If
|
||||
|
||||
If ValidaCondicionesCredito Then
|
||||
Dim ValidaCliente As Boolean = True
|
||||
If UsuarioActual.Empresa.Funcionalidad(109) = "1" AndAlso (Me.CveCliente = UsuarioActual.Empresa.Funcionalidad(714).ToEntero() OrElse Me.PermiteCredito) Then
|
||||
ValidaCliente = False
|
||||
End If
|
||||
|
||||
If ValidaCliente Then
|
||||
Dim Vta As New ClsVentas
|
||||
Dim Opcion As Integer = Vta.ObtenerClienteLimitesVenta(CveCliente, UsuarioActual.CveEmpresa)
|
||||
Dim OpcionMsg As String = String.Format("El Cliente se encuentra bloqueado por la siguiente razón: <br> <br> {0}", Vta.SerieVenta)
|
||||
@@ -7858,6 +7928,10 @@ Partial Class Ventas
|
||||
Alert(OpcionMsg, TipoMensaje.MsgAdvertencia)
|
||||
BtnsFacturar.Visible = False
|
||||
BtnGenerarRemision.Visible = False
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso ClienteEsDistribuidor AndAlso Opcion.Contiene(2, 3) Then
|
||||
TieneBloqueoPorCreditoVencimiento = 1
|
||||
End If
|
||||
End If
|
||||
|
||||
Else
|
||||
@@ -7865,6 +7939,10 @@ Partial Class Ventas
|
||||
Alert(OpcionMsg, TipoMensaje.MsgAdvertencia)
|
||||
BtnsFacturar.Visible = False
|
||||
BtnGenerarRemision.Visible = False
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso ClienteEsDistribuidor AndAlso Opcion.Contiene(2, 3) Then
|
||||
TieneBloqueoPorCreditoVencimiento = 1
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
@@ -17932,7 +18010,7 @@ Partial Class Ventas
|
||||
TrAlmacenOrigen.Visible = False
|
||||
|
||||
If DdlTipoComprobante.SelectedValue = "Cot" And UsuarioActual.Empresa.Funcionalidad(135).Contiene("1", "2") Then
|
||||
Alert("Se ocupa una autorización.", TipoMensaje.MsgAdvertencia)
|
||||
Alert("Se requiere una autorización.", TipoMensaje.MsgAdvertencia)
|
||||
TrDireccion.Visible = False
|
||||
TrCiudad.Visible = False
|
||||
TrRFC.Visible = False
|
||||
@@ -18327,14 +18405,14 @@ Partial Class Ventas
|
||||
If Not CveEmpresaCRM > 0 Then
|
||||
'SI ES UNA REMISION EXISTENTE, NO MOSTRAR LOS BOTONES
|
||||
If Not (CveVenta > 0 AndAlso DdlTipoComprobante.SelectedValue = "Rem") Then
|
||||
BtnCrearApartirDe.Enabled = EstatusCliente
|
||||
BtnEmitirImprimir.Visible = EstatusCliente
|
||||
BtnCrearApartirDe.Enabled = EstatusCliente AndAlso TieneBloqueoPorCreditoVencimiento = 0
|
||||
BtnEmitirImprimir.Visible = EstatusCliente AndAlso TieneBloqueoPorCreditoVencimiento = 0
|
||||
TrVistaPrevia.Visible = EstatusCliente
|
||||
End If
|
||||
Else
|
||||
If TipoDoctoConsulta.Contiene("Ing", "Egs", "Ant", "Dev") Then
|
||||
BtnCrearApartirDe.Enabled = EstatusCliente
|
||||
BtnEmitirImprimir.Visible = EstatusCliente
|
||||
BtnCrearApartirDe.Enabled = EstatusCliente AndAlso TieneBloqueoPorCreditoVencimiento = 0
|
||||
BtnEmitirImprimir.Visible = EstatusCliente AndAlso TieneBloqueoPorCreditoVencimiento = 0
|
||||
TrVistaPrevia.Visible = EstatusCliente
|
||||
Else
|
||||
BtnCrearApartirDe.Enabled = True
|
||||
@@ -23383,8 +23461,11 @@ Partial Class Ventas
|
||||
' DdlCuentaTarjetaDebito.DataSource = DtCC.FiltraParametros(String.Format("CveMoneda = {0} AND (CveTipoCuenta <> 1 OR TieneTerminal = 1)", If(DdlMoneda.SelectedValue.ToEntero() <= 0, 1, DdlMoneda.SelectedValue.ToEntero())))
|
||||
'End If
|
||||
|
||||
DdlCuentaTransferencia.DataSource = DtCC.FiltraParametros(String.Format("CveMoneda = {0} AND CveTipoCuenta <> 1", If(DdlMoneda.SelectedValue.ToEntero() <= 0, 1, DdlMoneda.SelectedValue.ToEntero())))
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(109) = "1" Then
|
||||
DdlCuentaTransferencia.DataSource = DtCC.FiltraParametros(String.Format("CveMoneda = {0}", If(DdlMoneda.SelectedValue.ToEntero() <= 0, 1, DdlMoneda.SelectedValue.ToEntero())))
|
||||
Else
|
||||
DdlCuentaTransferencia.DataSource = DtCC.FiltraParametros(String.Format("CveMoneda = {0} AND CveTipoCuenta <> 1", If(DdlMoneda.SelectedValue.ToEntero() <= 0, 1, DdlMoneda.SelectedValue.ToEntero())))
|
||||
End If
|
||||
DtCC.Dispose()
|
||||
|
||||
DdlCuentaEfectivo.DataBind()
|
||||
|
||||
Reference in New Issue
Block a user