--Permitir lineas adicionales de credito en factura, E158

This commit is contained in:
2024-11-05 12:23:04 -07:00
parent 4f3647a128
commit 3c36731754

View File

@@ -10536,7 +10536,7 @@ Partial Class Ventas
' Exit Sub
'End If
If ObjFactura.TipoDocto = "Ing" AndAlso (DtRemisionesPS Is Nothing OrElse DtRemisionesPS.Rows.Count = 0) Then
If UsuarioActual.CveEmpresa <> 158 AndAlso ObjFactura.TipoDocto = "Ing" AndAlso (DtRemisionesPS Is Nothing OrElse DtRemisionesPS.Rows.Count = 0) Then
TmpDT = TmpDTError.Copy()
CalculaTotalesVenta(RecalcularTotalOriginal:=False)
Alert("No se puede generar un ingreso con una linea adicional de credito si este no viene de una remisión", TipoMensaje.MsgAdvertencia)
@@ -19842,8 +19842,10 @@ Partial Class Ventas
End If
'SI TIENE PERMISO PARA VER COSTO, QUE LO AGREGUE AL TMPDT
Dim PuedeVerCosto As Boolean = UsuarioActual.TienePermisoProceso(201) OrElse UsuarioActual.TienePermisoProceso(385)
Dim Costo As Decimal = 0
If UsuarioActual.Empresa.Funcionalidad(382) = "1" AndAlso UsuarioActual.TienePermisoProceso(385) Then
If UsuarioActual.Empresa.Funcionalidad(382) = "1" AndAlso PuedeVerCosto Then
Dim ObjInventarios As New ClsInventarios
Costo = ObjInventarios.GetCostoPS(CvePS, TxtCantidad.Text.Trim.ToDecimal, -1, "-1", TxtFecha.Text.ToDate, DdlSubProyectoDatos.SelectedValue.ToEntero(), CveTipoAlmacen:=1)
@@ -21601,7 +21603,9 @@ Partial Class Ventas
HlAgregarExcel.Visible = True
End If
If (CveVenta <= 0 OrElse EsCreaApartirDe) AndAlso UsuarioActual.Empresa.Funcionalidad(382) = "1" AndAlso DdlTipoComprobante.SelectedValue = "Cot" Then
Dim PuedeVerCosto As Boolean = UsuarioActual.TienePermisoProceso(201) OrElse UsuarioActual.TienePermisoProceso(385)
If (CveVenta <= 0 OrElse EsCreaApartirDe) AndAlso UsuarioActual.Empresa.Funcionalidad(382) = "1" AndAlso DdlTipoComprobante.SelectedValue = "Cot" AndAlso PuedeVerCosto Then
GvPS.Columns(23).Visible = True
thCosto.Visible = True
thCosto2.Visible = True
@@ -39792,11 +39796,13 @@ Partial Class Ventas
Protected Sub ChkRemEspecial_CheckedChanged(sender As Object, e As EventArgs)
Dim objV As New ClsVentas
If objV.UpdateVentaRemisionEspecial(CveVenta, If(ChkRemEspecial.Checked, 2000, 0), Now.AddDays(7), UsuarioActual.CveEmpresa) Then
Alert("Se aplicó el cambio", TipoMensaje.ToastInformacion)
If CveVenta > 0 Then
Dim objV As New ClsVentas
If objV.UpdateVentaRemisionEspecial(CveVenta, If(ChkRemEspecial.Checked, 2000, 0), Now.AddDays(7), UsuarioActual.CveEmpresa) Then
Alert("Se aplicó el cambio", TipoMensaje.ToastInformacion)
End If
objV.Dispose()
End If
objV.Dispose()
End Sub
End Class