cambio de la E141, a la funcionaldiad 558
This commit is contained in:
@@ -2842,13 +2842,13 @@ Partial Class Ventas
|
||||
BloqueaClasificaciones()
|
||||
|
||||
'NO PERMITIR AGREGAR PS DESDE VENTAS EN ECONOLLANTAS
|
||||
If UsuarioActual.CveEmpresa = 141 Then
|
||||
If UsuarioActual.Empresa.Funcionalidad(558) = "1" Then
|
||||
BtnModalAddPS.Enabled = False
|
||||
End If
|
||||
MostrarOpcioensPaqueteria()
|
||||
End Sub
|
||||
Private Sub BloqueaClasificaciones()
|
||||
If UsuarioActual.CveEmpresa = 141 AndAlso DdlTipoComprobante.SelectedValue = "Cot" Then
|
||||
If UsuarioActual.Empresa.Funcionalidad(558) = "1" AndAlso DdlTipoComprobante.SelectedValue = "Cot" Then
|
||||
DdlClasificacion.Enabled = False
|
||||
DdlUnidadMedida.Enabled = False
|
||||
End If
|
||||
@@ -5142,7 +5142,7 @@ Partial Class Ventas
|
||||
End Function
|
||||
Private Sub CargarAlmacenes()
|
||||
|
||||
If (CveVenta > 0 And DdlTipoComprobante.SelectedValue <> "Cot") AndAlso Not (UsuarioActual.CveEmpresa = 141 AndAlso EsCreaApartirDe) Then
|
||||
If (CveVenta > 0 And DdlTipoComprobante.SelectedValue <> "Cot") AndAlso Not (UsuarioActual.Empresa.Funcionalidad(558) = "1" AndAlso EsCreaApartirDe) Then
|
||||
DivAlmacen.Visible = False
|
||||
Else
|
||||
Dim DTAlmacen As DataTable
|
||||
@@ -5520,7 +5520,7 @@ Partial Class Ventas
|
||||
DdlSucursalCliente.DataBind()
|
||||
|
||||
'SI UTILIZA EL RFC GENERICO PERMITE FACTURAR SUCURSAL
|
||||
If (Not UsuarioActual.CveEmpresa.Contiene(141)) AndAlso (CveVenta <= 0 OrElse NuevaFactura = 1) AndAlso LblRFC.Text.Trim() = "XAXX010101000" Then
|
||||
If (Not UsuarioActual.Empresa.Funcionalidad(558) = "1") AndAlso (CveVenta <= 0 OrElse NuevaFactura = 1) AndAlso LblRFC.Text.Trim() = "XAXX010101000" Then
|
||||
HabilitarFacturacionSucursal()
|
||||
End If
|
||||
|
||||
@@ -5951,7 +5951,7 @@ Partial Class Ventas
|
||||
End If
|
||||
|
||||
'SI EL CLIENTE TIENE RFC GENERICO Y LA SUCURSAL TIENE RFC DEBE FACTURAR LA SUCURSAL
|
||||
If (Not UsuarioActual.CveEmpresa.Contiene(141)) AndAlso LblRFC.Text.Trim() = "XAXX010101000" AndAlso Not String.IsNullOrEmpty(ObjCliente.DtResultados.Rows(0)("RFC").ToString()) Then
|
||||
If (Not UsuarioActual.Empresa.Funcionalidad(558) = "1") AndAlso LblRFC.Text.Trim() = "XAXX010101000" AndAlso Not String.IsNullOrEmpty(ObjCliente.DtResultados.Rows(0)("RFC").ToString()) Then
|
||||
Me.FacturarSucursal = True
|
||||
|
||||
LtlTitleRFCSucursal.Text = "RFC:"
|
||||
@@ -6110,7 +6110,7 @@ Partial Class Ventas
|
||||
End If
|
||||
|
||||
Dim cvesubproyecto As String = DdlSubProyectoDatos.SelectedValue
|
||||
If UsuarioActual.CveEmpresa = 141 Then
|
||||
If UsuarioActual.Empresa.Funcionalidad(558) = "1" Then
|
||||
cvesubproyecto = "-1"
|
||||
End If
|
||||
|
||||
@@ -6436,7 +6436,7 @@ Partial Class Ventas
|
||||
GvPS.DataSource = TmpDT
|
||||
DtInv = TmpDT.Copy.FiltraParametros("CveTipoPS = 2")
|
||||
GvPS.DataBind()
|
||||
If UsuarioActual.CveEmpresa = 141 Then
|
||||
If UsuarioActual.Empresa.Funcionalidad(558) = "1" Then
|
||||
GvPS.Rows(e.NewEditIndex).FCDropDownList("DdlUnidadMedida").Enabled = False
|
||||
GvPS.Rows(e.NewEditIndex).FCDropDownList("DdlClasificacion").Enabled = False
|
||||
End If
|
||||
@@ -6457,7 +6457,7 @@ Partial Class Ventas
|
||||
ObjDescuento.ImporteDescuento = (GvPS.Rows(e.RowIndex).FCTextBox("TxtDescuento").Text.ToDecimal).RoundSQL(NumeroDecimales)
|
||||
CuentaPredial = GvPS.Rows(e.RowIndex).FCTextBox("TxtPredial").Text.Trim
|
||||
|
||||
If PU <= 0 AndAlso UsuarioActual.CveEmpresa = 141 Then
|
||||
If PU <= 0 AndAlso UsuarioActual.Empresa.Funcionalidad(558) = "1" Then
|
||||
Alert("El precio debe ser mayor a 0", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
@@ -6820,7 +6820,7 @@ Partial Class Ventas
|
||||
'SI DEBE HACER SALIDA DIRECTA DE ALMACEN DEBE ESTAR SELECCIONADO SIEMPRE
|
||||
If UsuarioActual.Empresa.Funcionalidad(567) = "1" Then
|
||||
e.Row.FCCheckBox("cbInv").Checked = True
|
||||
If UsuarioActual.CveEmpresa = 141 Then
|
||||
If UsuarioActual.Empresa.Funcionalidad(558) = "1" Then
|
||||
e.Row.FCCheckBox("cbInv").Enabled = False
|
||||
End If
|
||||
End If
|
||||
@@ -6832,7 +6832,7 @@ Partial Class Ventas
|
||||
e.Row.FCCheckBox("cbInv").Visible = False
|
||||
End If
|
||||
|
||||
If (CveVenta > 0 AndAlso EsCreaApartirDe AndAlso UsuarioActual.CveEmpresa = 141) Then
|
||||
If (CveVenta > 0 AndAlso EsCreaApartirDe AndAlso UsuarioActual.Empresa.Funcionalidad(558) = "1") Then
|
||||
e.Row.FCCheckBox("cbInv").Visible = True
|
||||
End If
|
||||
|
||||
@@ -7983,7 +7983,7 @@ Partial Class Ventas
|
||||
If CveVenta > 0 Then MensajeAlert = New StringBuilder
|
||||
Dim ArchivoCotizacion As New System.IO.FileInfo(String.Format("{0}Formatos/Cotizacion.rdlc", UsuarioActual.Empresa.Ruta))
|
||||
|
||||
If Opcion = "Cot" And UsuarioActual.CveEmpresa = 141 Then
|
||||
If Opcion = "Cot" And UsuarioActual.Empresa.Funcionalidad(558) = "1" Then
|
||||
MensajeAlert.AppendFormat("<b><a class='Texto' href=""Ventas.aspx?CveVenta={0}"">Facturar</a></b><br/><br/>", CveVenta)
|
||||
End If
|
||||
|
||||
@@ -12414,7 +12414,7 @@ Partial Class Ventas
|
||||
End If
|
||||
|
||||
'EN ECONOLLANTAS DEBE REALIZAR SIEMPRE LA SALIDA DE ALMACEN
|
||||
If UsuarioActual.CveEmpresa = 141 AndAlso UsuarioActual.Empresa.Funcionalidad(567) = "1" AndAlso factura.TipoDocto.Contiene("Ing", "Egs", "Rem") Then
|
||||
If UsuarioActual.Empresa.Funcionalidad(558) = "1" AndAlso UsuarioActual.Empresa.Funcionalidad(567) = "1" AndAlso factura.TipoDocto.Contiene("Ing", "Egs", "Rem") Then
|
||||
For Each GvRow As GridViewRow In GvInv.Rows
|
||||
If GvRow.RowType = DataControlRowType.DataRow Then
|
||||
GvRow.FCCheckBox("cbInv").Checked = True
|
||||
@@ -12593,7 +12593,7 @@ Partial Class Ventas
|
||||
|
||||
Dim DebeGenerarMovimiento As Boolean = TmpDT.COUNT("CvePS", "CveTipoPS = 2") > 0
|
||||
'VERIFICA QUE SE REALIZO EL MOVIMIENTO DE ALMACEN
|
||||
If DebeGenerarMovimiento AndAlso UsuarioActual.CveEmpresa = 141 AndAlso UsuarioActual.Empresa.Funcionalidad(567) = "1" AndAlso factura.TipoDocto.Contiene("Ing", "Egs", "Rem") Then
|
||||
If DebeGenerarMovimiento AndAlso UsuarioActual.Empresa.Funcionalidad(558) = "1" AndAlso UsuarioActual.Empresa.Funcionalidad(567) = "1" AndAlso factura.TipoDocto.Contiene("Ing", "Egs", "Rem") Then
|
||||
If Not (ObjInventario.GetInv_Mov(factura.CveVenta, UsuarioActual.CveEmpresa) AndAlso ObjInventario.DtResultados.Rows.Count > 0) Then
|
||||
OcurrioError = True
|
||||
End If
|
||||
@@ -15675,7 +15675,7 @@ Partial Class Ventas
|
||||
Return False
|
||||
End If
|
||||
|
||||
If PU <= 0 AndAlso UsuarioActual.CveEmpresa = 141 Then
|
||||
If PU <= 0 AndAlso UsuarioActual.Empresa.Funcionalidad(558) = "1" Then
|
||||
Alert("El precio debe ser mayor a 0", TipoMensaje.MsgAdvertencia)
|
||||
Return False
|
||||
End If
|
||||
@@ -17078,7 +17078,7 @@ Partial Class Ventas
|
||||
GvPS.DataBind()
|
||||
|
||||
'RECARGA GV INVENTARIO
|
||||
If (Not CveVenta > 0 Or DdlTipoComprobante.SelectedValue = "Cot") OrElse (UsuarioActual.CveEmpresa = 141 AndAlso EsCreaApartirDe) Then
|
||||
If (Not CveVenta > 0 Or DdlTipoComprobante.SelectedValue = "Cot") OrElse (UsuarioActual.Empresa.Funcionalidad(558) = "1" AndAlso EsCreaApartirDe) Then
|
||||
DtInv = TmpDT.Copy.FiltraParametros("CveTipoPS = 2")
|
||||
CargaGVInv(DtInv)
|
||||
End If
|
||||
@@ -19592,7 +19592,7 @@ Partial Class Ventas
|
||||
Dim TienePagos As Boolean = ((Not (DtPagos Is Nothing OrElse DtPagos.Rows.Count = 0)) AndAlso (DtPagos IsNot Nothing AndAlso DtPagos.Rows.Count > 0)) OrElse AmortizacionNC > 0
|
||||
|
||||
'SI LA VENTA ES NUEVA VALIDAR TAMBIEN LOS PAGOS DE CONTADO
|
||||
If UsuarioActual.CveEmpresa = 141 AndAlso CveVenta <= 0 AndAlso DdlTipoComprobante.SelectedValue.Contiene("Ing", "Rem", "Ant") Then
|
||||
If UsuarioActual.Empresa.Funcionalidad(558) = "1" AndAlso CveVenta <= 0 AndAlso DdlTipoComprobante.SelectedValue.Contiene("Ing", "Rem", "Ant") Then
|
||||
|
||||
If Not PermiteCredito AndAlso Not TienePagos AndAlso TxtTotal.Text.ToDecimal > 0 Then
|
||||
Alert("Es necesario especificar un pago.", TipoMensaje.MsgAdvertencia)
|
||||
@@ -19619,7 +19619,7 @@ Partial Class Ventas
|
||||
Retorno = True
|
||||
End If
|
||||
|
||||
If UsuarioActual.CveEmpresa = 141 AndAlso DdlTipoComprobante.SelectedValue.Contiene("Ing", "Rem", "Ant") Then
|
||||
If UsuarioActual.Empresa.Funcionalidad(558) = "1" AndAlso DdlTipoComprobante.SelectedValue.Contiene("Ing", "Rem", "Ant") Then
|
||||
|
||||
If Not PermiteCredito AndAlso TienePagos AndAlso TxtTotal.Text.ToDecimal > 0 Then
|
||||
Dim TotalPago As Decimal = DtPagos.SUM("Importe").ToDecimal() + AmortizacionNC
|
||||
@@ -27097,7 +27097,7 @@ Partial Class Ventas
|
||||
CargaAnticipos(CveCliente)
|
||||
CargaRestriccionesCreditoCliente(CveVenta:=-1)
|
||||
|
||||
If UsuarioActual.CveEmpresa = 141 Then
|
||||
If UsuarioActual.Empresa.Funcionalidad(558) = "1" Then
|
||||
TabAlmacen.Visible = True
|
||||
DivAlmacen.Visible = True
|
||||
CargaGVInv(TmpDT.FiltraParametros("CveTipoPS = 2"))
|
||||
@@ -27160,7 +27160,7 @@ Partial Class Ventas
|
||||
Private Function ValidaFacturarCotizacion() As Boolean
|
||||
Dim Retorno As Boolean = True
|
||||
|
||||
If UsuarioActual.CveEmpresa = 141 Then
|
||||
If UsuarioActual.Empresa.Funcionalidad(558) = "1" Then
|
||||
Dim Total As Decimal = TxtTotal.Text.ToDecimal()
|
||||
|
||||
Dim AmortizacionNC As Decimal = 0
|
||||
|
||||
Reference in New Issue
Block a user