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