-- 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
|
BtnCrearApartirDe.Visible = True
|
||||||
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then BtnCrearApartirDe.Visible = False
|
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
|
If DdlTipoComprobante.SelectedValue = "Ped" Then
|
||||||
BtnPermisoEditarRemision.Text = "Editar Pedido"
|
BtnPermisoEditarRemision.Text = "Editar Pedido"
|
||||||
@@ -4946,11 +4945,7 @@ Partial Class Ventas
|
|||||||
If UsuarioActual.Empresa.Funcionalidad(578) = "1" Then
|
If UsuarioActual.Empresa.Funcionalidad(578) = "1" Then
|
||||||
TxtAlfa1.Text = DbRowVenta("Alfa1").ToString
|
TxtAlfa1.Text = DbRowVenta("Alfa1").ToString
|
||||||
End If
|
End If
|
||||||
End If
|
|
||||||
End Using
|
|
||||||
End If
|
|
||||||
|
|
||||||
If DbRowVenta IsNot Nothing Then
|
|
||||||
'CARGAR PS
|
'CARGAR PS
|
||||||
GvPS.DataSource = TmpDT
|
GvPS.DataSource = TmpDT
|
||||||
GvPS.DataBind()
|
GvPS.DataBind()
|
||||||
@@ -5873,6 +5868,15 @@ Partial Class Ventas
|
|||||||
BtnPermisoEditarRemision.Visible = True
|
BtnPermisoEditarRemision.Visible = True
|
||||||
End If
|
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
|
'ACTIVA BOTONERA | DEBE TENER CONCEPTOS PENDIENTES DE FACTURAR
|
||||||
If TmpDT.SUM("CantidadFacturadaRem") < TmpDT.SUM("Cantidad") Then
|
If TmpDT.SUM("CantidadFacturadaRem") < TmpDT.SUM("Cantidad") Then
|
||||||
BtnsFacturar.Visible = True
|
BtnsFacturar.Visible = True
|
||||||
@@ -5945,7 +5949,6 @@ Partial Class Ventas
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
LBFacturarAnticipo.Visible = UsuarioActual.TienePermisoProceso(274)
|
LBFacturarAnticipo.Visible = UsuarioActual.TienePermisoProceso(274)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -5989,7 +5992,6 @@ Partial Class Ventas
|
|||||||
VerificarBtnFacturarCotizacion(DbRowVenta("CveVendedor").ToString().ToEntero())
|
VerificarBtnFacturarCotizacion(DbRowVenta("CveVendedor").ToString().ToEntero())
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
If DbRowVenta("TipoDocto").ToString().Contiene("Ped") Then
|
If DbRowVenta("TipoDocto").ToString().Contiene("Ped") Then
|
||||||
'ACTIVA BOTONERA | DEBE TENER CONCEPTOS PENDIENTES DE FACTURAR
|
'ACTIVA BOTONERA | DEBE TENER CONCEPTOS PENDIENTES DE FACTURAR
|
||||||
If TmpDT.SUM("CantidadFacturadaPed2") < TmpDT.SUM("Cantidad") Then
|
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")
|
TxtFechaOS.Text = DbRowVenta("FechaParaSurtir").ToString().ToDateTime().ToString("yyyy-MM-dd HH:mm").Replace(" ", "T")
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
If DdlTipoDocto.SelectedValue.Contiene("Ing", "Rem") Then
|
If DdlTipoDocto.SelectedValue.Contiene("Ing", "Rem") Then
|
||||||
TrVentasMedicas4.Visible = True
|
TrVentasMedicas4.Visible = True
|
||||||
TxtFolioRemision.Text = DbRowVenta("Alfa1").ToString
|
TxtFolioRemision.Text = DbRowVenta("Alfa1").ToString
|
||||||
End If
|
End If
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End Using
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
|
||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
@@ -6184,7 +6184,6 @@ Partial Class Ventas
|
|||||||
Else
|
Else
|
||||||
BtnGenerarRemision.Visible = False
|
BtnGenerarRemision.Visible = False
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Else
|
Else
|
||||||
BtnsFacturar.Visible = False
|
BtnsFacturar.Visible = False
|
||||||
BtnGenerarRemision.Visible = False
|
BtnGenerarRemision.Visible = False
|
||||||
@@ -13665,11 +13664,14 @@ Partial Class Ventas
|
|||||||
If UsuarioActual.Empresa.Funcionalidad(578) = "1" AndAlso EsVentaMedica Then
|
If UsuarioActual.Empresa.Funcionalidad(578) = "1" AndAlso EsVentaMedica Then
|
||||||
|
|
||||||
If DdlSucursalCliente.SelectedValue.ToEntero > 0 Then
|
If DdlSucursalCliente.SelectedValue.ToEntero > 0 Then
|
||||||
Dim objclientes As New ClsClientes
|
Dim drr As DataRow = GlobalDTClientesSucursales(UsuarioActual.CveEmpresa, CveCliente).FiltroPrimero($" CveClienteSucursal = {DdlSucursalCliente.SelectedValue.ToEntero}")
|
||||||
If objclientes.GetSucursales(CveCliente, -1) Then
|
If drr IsNot Nothing Then
|
||||||
CveAlmacenTraspasoDestino = objclientes.DtResultados.FiltroPrimeroValor("CveAlmacenAsignado", $" CveClienteSucursal = {DdlSucursalCliente.SelectedValue.ToEntero}").ToEntero
|
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
|
End If
|
||||||
objclientes.Dispose()
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If Not CveAlmacenTraspasoDestino > 0 Then
|
If Not CveAlmacenTraspasoDestino > 0 Then
|
||||||
@@ -13691,7 +13693,6 @@ Partial Class Ventas
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Dim TotalImpuestoLocal As Double = 0
|
Dim TotalImpuestoLocal As Double = 0
|
||||||
|
|||||||
Reference in New Issue
Block a user