-- bloqueo para que si una remisión está en proceso de pago o pagada, no se pueda editar
-- si es SMS, que utilice el almacen alterno para A-vistas
This commit is contained in:
@@ -2846,8 +2846,7 @@ Partial Class Ventas
|
||||
BtnCrearApartirDe.Visible = True
|
||||
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then BtnCrearApartirDe.Visible = False
|
||||
|
||||
If UsuarioActual.TienePermisoProceso(302) AndAlso DdlTipoComprobante.SelectedValue.Contiene("Ing", "Ant", "Egs") Then BtnEditar.Visible = True
|
||||
If UsuarioActual.TienePermisoProceso(302) AndAlso DdlTipoComprobante.SelectedValue.Contiene("Rem", "Ped") Then BtnPermisoEditarRemision.Visible = True
|
||||
|
||||
|
||||
If DdlTipoComprobante.SelectedValue = "Ped" Then
|
||||
BtnPermisoEditarRemision.Text = "Editar Pedido"
|
||||
@@ -4946,11 +4945,7 @@ Partial Class Ventas
|
||||
If UsuarioActual.Empresa.Funcionalidad(578) = "1" Then
|
||||
TxtAlfa1.Text = DbRowVenta("Alfa1").ToString
|
||||
End If
|
||||
End If
|
||||
End Using
|
||||
End If
|
||||
|
||||
If DbRowVenta IsNot Nothing Then
|
||||
'CARGAR PS
|
||||
GvPS.DataSource = TmpDT
|
||||
GvPS.DataBind()
|
||||
@@ -5873,6 +5868,15 @@ Partial Class Ventas
|
||||
BtnPermisoEditarRemision.Visible = True
|
||||
End If
|
||||
|
||||
If UsuarioActual.TienePermisoProceso(302) AndAlso DdlTipoComprobante.SelectedValue.Contiene("Rem", "Ped") Then BtnPermisoEditarRemision.Visible = True
|
||||
If UsuarioActual.TienePermisoProceso(302) AndAlso DdlTipoComprobante.SelectedValue.Contiene("Ing", "Ant", "Egs") Then BtnEditar.Visible = True
|
||||
|
||||
|
||||
'si es de FNC contado. bloquear edición si está pagada o en proceso de cobro
|
||||
If UsuarioActual.Empresa.Funcionalidad(109) = "1" AndAlso (DbRowVenta("CveCobranzaEstatus").ToString = "1" OrElse DbRowVenta("Saldo").ToString.ToDecimal = 0) Then
|
||||
BtnPermisoEditarRemision.Visible = False
|
||||
End If
|
||||
|
||||
'ACTIVA BOTONERA | DEBE TENER CONCEPTOS PENDIENTES DE FACTURAR
|
||||
If TmpDT.SUM("CantidadFacturadaRem") < TmpDT.SUM("Cantidad") Then
|
||||
BtnsFacturar.Visible = True
|
||||
@@ -5945,7 +5949,6 @@ Partial Class Ventas
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
LBFacturarAnticipo.Visible = UsuarioActual.TienePermisoProceso(274)
|
||||
End If
|
||||
|
||||
@@ -5989,7 +5992,6 @@ Partial Class Ventas
|
||||
VerificarBtnFacturarCotizacion(DbRowVenta("CveVendedor").ToString().ToEntero())
|
||||
End If
|
||||
|
||||
|
||||
If DbRowVenta("TipoDocto").ToString().Contiene("Ped") Then
|
||||
'ACTIVA BOTONERA | DEBE TENER CONCEPTOS PENDIENTES DE FACTURAR
|
||||
If TmpDT.SUM("CantidadFacturadaPed2") < TmpDT.SUM("Cantidad") Then
|
||||
@@ -6135,19 +6137,17 @@ Partial Class Ventas
|
||||
|
||||
TxtFechaOS.Text = DbRowVenta("FechaParaSurtir").ToString().ToDateTime().ToString("yyyy-MM-dd HH:mm").Replace(" ", "T")
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
|
||||
If DdlTipoDocto.SelectedValue.Contiene("Ing", "Rem") Then
|
||||
TrVentasMedicas4.Visible = True
|
||||
TxtFolioRemision.Text = DbRowVenta("Alfa1").ToString
|
||||
End If
|
||||
|
||||
|
||||
End If
|
||||
End If
|
||||
End Using
|
||||
End If
|
||||
|
||||
End If
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
@@ -6184,7 +6184,6 @@ Partial Class Ventas
|
||||
Else
|
||||
BtnGenerarRemision.Visible = False
|
||||
End If
|
||||
|
||||
Else
|
||||
BtnsFacturar.Visible = False
|
||||
BtnGenerarRemision.Visible = False
|
||||
@@ -13665,11 +13664,14 @@ Partial Class Ventas
|
||||
If UsuarioActual.Empresa.Funcionalidad(578) = "1" AndAlso EsVentaMedica Then
|
||||
|
||||
If DdlSucursalCliente.SelectedValue.ToEntero > 0 Then
|
||||
Dim objclientes As New ClsClientes
|
||||
If objclientes.GetSucursales(CveCliente, -1) Then
|
||||
CveAlmacenTraspasoDestino = objclientes.DtResultados.FiltroPrimeroValor("CveAlmacenAsignado", $" CveClienteSucursal = {DdlSucursalCliente.SelectedValue.ToEntero}").ToEntero
|
||||
Dim drr As DataRow = GlobalDTClientesSucursales(UsuarioActual.CveEmpresa, CveCliente).FiltroPrimero($" CveClienteSucursal = {DdlSucursalCliente.SelectedValue.ToEntero}")
|
||||
If drr IsNot Nothing Then
|
||||
If RBLTipoVenta.SelectedValue.Contiene("3", "6") Then 'cuando es A-vista
|
||||
CveAlmacenTraspasoDestino = drr("CveAlmacenAlterno").ToString.ToEntero
|
||||
Else
|
||||
CveAlmacenTraspasoDestino = drr("CveAlmacenAsignado").ToString.ToEntero
|
||||
End If
|
||||
End If
|
||||
objclientes.Dispose()
|
||||
End If
|
||||
|
||||
If Not CveAlmacenTraspasoDestino > 0 Then
|
||||
@@ -13691,7 +13693,6 @@ Partial Class Ventas
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
End If
|
||||
|
||||
Dim TotalImpuestoLocal As Double = 0
|
||||
|
||||
Reference in New Issue
Block a user