This commit is contained in:
@@ -93,6 +93,12 @@
|
||||
<asp:ListItem Text="Todos" Value="-1"></asp:ListItem>
|
||||
<asp:ListItem Text="Activo" Value="1" Selected="True"></asp:ListItem>
|
||||
<asp:ListItem Text="Inactivo" Value="0"></asp:ListItem>
|
||||
<asp:ListItem Text="Enviado" Value="2"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<label class="col-md-1 truncate">SubProyecto:</label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlSubProyectoFiltro" runat="server" DataValueField="CveSubProyecto" DataTextField="SubProyecto" CssClass="select2me" Width="100px" ValidationGroup="GrpGuardar">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
@@ -118,7 +124,7 @@
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:GridView ID="GvFolioGarantia" runat="server" AutoGenerateColumns="False"
|
||||
DataKeyNames="CveFolioGarantia,FolioGarantia,Estatus,CveUsuario,Usuario,FechaIng,SubProyecto,CveSubProyecto,tipoFolio,Limite"
|
||||
DataKeyNames="CveFolioGarantia,FolioGarantia,CveEstatus,Estatus,CveUsuario,Usuario,FechaIng,SubProyecto,CveSubProyecto,tipoFolio,Limite"
|
||||
EmptyDataText="No se encontraron registros" ToolTip="Listado de Folios de Garantía"
|
||||
CssClass="table table-striped table-advance table-hover Widthall ScrollAD"
|
||||
data-sort="true"
|
||||
@@ -268,11 +274,13 @@
|
||||
<%--<br />--%>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<label for="<%= ChkEstatus.ClientID.ToString()%>">Activo:</label></br>
|
||||
|
||||
|
||||
|
||||
<asp:CheckBox ID="ChkEstatus" runat="server" CssClass="make-switchsd" data-size="small" Text=" " Checked="true" />
|
||||
<label for="<%= DdlEstatusEditar.ClientID.ToString()%>">Estatus:</label>
|
||||
<asp:DropDownList ID="DdlEstatusEditar" runat="server" CssClass="select2me" Width="100px" ValidationGroup="GrpGuardar">
|
||||
<asp:ListItem Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
<asp:ListItem Text="Activo" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Inactivo" Value="0"></asp:ListItem>
|
||||
<asp:ListItem Text="Enviado" Value="2"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<i></i>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -47,7 +47,8 @@ Partial Class Acumuladores_CatFoliosGarantia
|
||||
|
||||
#Region "Folios Garantía"
|
||||
Private Sub CargaSubProyectos()
|
||||
CargarCentrosDeCosto(Nothing, DdlSubProyectos, Nothing, lblSubProyecto)
|
||||
CargarCentrosDeCosto(Nothing, DdlSubProyectos, Nothing, lblSubProyecto)
|
||||
CargarCentrosDeCosto(Nothing, DdlSubProyectoFiltro, Nothing, lblSubProyecto)
|
||||
GvFolioGarantia.Columns(3).HeaderText = lblSubProyecto.Text
|
||||
End Sub
|
||||
|
||||
@@ -55,7 +56,7 @@ Partial Class Acumuladores_CatFoliosGarantia
|
||||
|
||||
Dim objAcum As New ClsAcumuladores
|
||||
|
||||
If objAcum.FoliosGarantiaGet(-1, UsuarioActual.Empresa.CveEmpresa, Estatus:=EstatusValor, TipoFolio:=tipoFolioValor, Area:=-1) Then
|
||||
If objAcum.FoliosGarantiaGet(-1, UsuarioActual.Empresa.CveEmpresa, Estatus:=EstatusValor, TipoFolio:=tipoFolioValor, Area:=-1, CveSubProyecto:=DdlSubProyectoFiltro.SelectedValue.ToEntero()) Then
|
||||
GvFolioGarantia.DataSource = objAcum.DtResultados
|
||||
Else
|
||||
GvFolioGarantia.DataSource = Nothing
|
||||
@@ -92,7 +93,7 @@ Partial Class Acumuladores_CatFoliosGarantia
|
||||
BtnAgregarFolioGarantiaModal.Text = "Agregar"
|
||||
|
||||
TxtFolioGarantia.Text = ""
|
||||
ChkEstatus.Checked = True
|
||||
DdlEstatusEditar.SelectedValueExist("1")
|
||||
DdlSubProyectos.SelectedValueExist("-1")
|
||||
|
||||
Actualizar = False
|
||||
@@ -114,10 +115,10 @@ Partial Class Acumuladores_CatFoliosGarantia
|
||||
|
||||
|
||||
If Not Actualizar Then
|
||||
If ObjAcum.FoliosGarantiaAdd(TxtFolioGarantia.Text, If(ChkEstatus.Checked = True, 1, 0), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, DdlSubProyectos.SelectedValue.ToEntero, DdlTipoFolioModal.SelectedValue, TxtLimite.Text.ToEntero, DdlArea.SelectedValue.ToEntero) Then
|
||||
If ObjAcum.FoliosGarantiaAdd(TxtFolioGarantia.Text, DdlEstatusEditar.SelectedValue.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, DdlSubProyectos.SelectedValue.ToEntero, DdlTipoFolioModal.SelectedValue, TxtLimite.Text.ToEntero, DdlArea.SelectedValue.ToEntero) Then
|
||||
|
||||
TxtFolioGarantia.Text = ""
|
||||
ChkEstatus.Checked = True
|
||||
DdlEstatusEditar.SelectedValueExist("1")
|
||||
'TxtCargo.Text = ""
|
||||
'TxtBonificacion.Text = ""
|
||||
'TxtCompra.Text = ""
|
||||
@@ -133,11 +134,11 @@ Partial Class Acumuladores_CatFoliosGarantia
|
||||
Alert("Ocurrió un error al guardar el Folio de Garantía", TipoMensaje.MsgError)
|
||||
End If
|
||||
Else
|
||||
If ObjAcum.FoliosGarantiaUpdate(CveFolioGarantia, TxtFolioGarantia.Text, If(ChkEstatus.Checked = True, 1, 0), UsuarioActual.CveUsuario, DdlSubProyectos.SelectedValue.ToEntero,
|
||||
If ObjAcum.FoliosGarantiaUpdate(CveFolioGarantia, TxtFolioGarantia.Text, DdlEstatusEditar.SelectedValue.ToEntero, UsuarioActual.CveUsuario, DdlSubProyectos.SelectedValue.ToEntero,
|
||||
DdlTipoFolioModal.SelectedValue, TxtLimite.Text.ToEntero) Then
|
||||
|
||||
TxtFolioGarantia.Text = ""
|
||||
ChkEstatus.Checked = True
|
||||
DdlEstatusEditar.SelectedValueExist("1")
|
||||
'TxtCargo.Text = ""
|
||||
'TxtBonificacion.Text = ""
|
||||
'TxtCompra.Text = ""
|
||||
@@ -191,7 +192,7 @@ Partial Class Acumuladores_CatFoliosGarantia
|
||||
CveFolioGarantia = GvRow.DataKey("CveFolioGarantia")
|
||||
|
||||
TxtFolioGarantia.Text = GvRow.DataKey("FolioGarantia")
|
||||
ChkEstatus.Checked = If(GvRow.DataKey("Estatus") = "Activo", True, False)
|
||||
DdlEstatusEditar.SelectedValueExist(GvRow.DataKey("CveEstatus"))
|
||||
TxtLimite.Text = GvRow.DataKey("Limite")
|
||||
DdlTipoFolioModal.SelectedValue = GvRow.DataKey("tipoFolio")
|
||||
'TxtCargo.Text = GvRow.DataKey("Cargo").ToDecimal.ToString("###,###,###.00")
|
||||
|
||||
@@ -521,7 +521,7 @@ Public Class ClsAcumuladores
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
|
||||
.Add("@FolioGarantia", SqlDbType.VarChar).Value = FolioGarantia
|
||||
.Add("@Estatus", SqlDbType.Bit).Value = Estatus
|
||||
.Add("@Estatus", SqlDbType.Int).Value = Estatus
|
||||
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
|
||||
@@ -553,7 +553,7 @@ Public Class ClsAcumuladores
|
||||
|
||||
.Add("@CveFolioGarantia", SqlDbType.Int).Value = CveFolioGarantia
|
||||
.Add("@FolioGarantia", SqlDbType.VarChar).Value = FolioGarantia
|
||||
.Add("@Estatus", SqlDbType.Bit).Value = Estatus
|
||||
.Add("@Estatus", SqlDbType.Int).Value = Estatus
|
||||
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
|
||||
.Add("@TipoFolio", SqlDbType.VarChar).Value = TipoFolio
|
||||
|
||||
@@ -567,7 +567,7 @@ Public Class ClsClientes
|
||||
Optional AplicaComercioExterior As Boolean = False, Optional CveTipoOperacion As Integer = -1, Optional CvePedimento As Integer = -1, Optional CveIncoterm As Integer = -1, Optional CvePais As Integer = -1, Optional CveEstado As Integer = -1, Optional CveMunicipio As Integer = -1, Optional CveColonia As Integer = -1,
|
||||
Optional CveMotivoTraslado As Integer = 0, Optional NumRegIdTrib As String = "", Optional ComExtEstado As String = "-1", Optional ComExtMunicipio As String = "-1", Optional ComExtColonia As String = "-1", Optional RequiereOC As Boolean = False,
|
||||
Optional LT As String = "0", Optional LG As String = "0", Optional EsDistribuidor As Boolean = False, Optional TipoCliente As Integer = 1, Optional CargoUsado As Boolean = False, Optional BonificacionUsado As Boolean = False, Optional CveTipoRetencion As Integer = 0,
|
||||
Optional CorreoEntregaCompras As String = "-1", Optional CorreoEntregaAlmacen As String = "-1", Optional CveSATEstado As Integer = -1) As Boolean
|
||||
Optional CorreoEntregaCompras As String = "-1", Optional CorreoEntregaAlmacen As String = "-1", Optional CveSATEstado As Integer = -1, Optional CveAdminTrayecto As Integer = -1) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
|
||||
@@ -707,6 +707,8 @@ Public Class ClsClientes
|
||||
.Add("@CorreoEntregaAlmacen", SqlDbType.VarChar).Value = CorreoEntregaAlmacen
|
||||
.Add("@CveSATEstado", SqlDbType.Int).Value = CveSATEstado
|
||||
|
||||
.Add("@CveAdminTrayecto", SqlDbType.TinyInt).Value = CveAdminTrayecto
|
||||
|
||||
|
||||
End With
|
||||
Try
|
||||
@@ -755,7 +757,7 @@ Public Class ClsClientes
|
||||
Optional CveMotivoTraslado As Integer = 0, Optional NumRegIdTrib As String = "-1", Optional ComExtEstado As String = "-1", Optional ComExtMunicipio As String = "-1", Optional ComExtColonia As String = "-1",
|
||||
Optional ApellidoPaternoPF As String = "-1", Optional ApellidoMaternoPF As String = "-1", Optional NombresPF As String = "-1", Optional RequiereOC As Boolean = False,
|
||||
Optional LT As String = "0", Optional LG As String = "0", Optional EsDistribuidor As Boolean = False, Optional TipoCliente As Integer = 1, Optional CargoUsado As Boolean = False, Optional BonificacionUsado As Boolean = False, Optional CveTipoRetencion As Integer = 0, Optional CorreoEntregaCompras As String = "-1", Optional CorreoEntregaAlmacen As String = "-1",
|
||||
Optional CveSATEstado As Integer = -1) As Boolean
|
||||
Optional CveSATEstado As Integer = -1, Optional CveAdminTrayecto As Integer = -1) As Boolean
|
||||
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
@@ -910,7 +912,7 @@ Public Class ClsClientes
|
||||
.Add("@CorreoEntregaAlmacen", SqlDbType.VarChar).Value = CorreoEntregaAlmacen
|
||||
.Add("@CveSATEstado", SqlDbType.Int).Value = CveSATEstado
|
||||
|
||||
|
||||
.Add("@CveAdminTrayecto", SqlDbType.TinyInt).Value = CveAdminTrayecto
|
||||
|
||||
End With
|
||||
Try
|
||||
|
||||
@@ -3231,7 +3231,7 @@ Public Class ClsGPS
|
||||
Return retorno
|
||||
End Function
|
||||
|
||||
Public Function DispositivosUsuariosGet(CveDispositivo As Integer, CveEstatus As Integer, CveCliente As Integer, Optional CveEmpresa As Integer = -1, Optional CveUsuario As Integer = -1) As Boolean
|
||||
Public Function DispositivosUsuariosGet(CveDispositivo As Integer, CveEstatus As Integer, CveCliente As Integer, Optional CveEmpresa As Integer = -1, Optional CveUsuario As Integer = -1, Optional ConcatenarDispuestos As Boolean = False) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_GPS_DispositivosUsuariosGet")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
@@ -3240,6 +3240,7 @@ Public Class ClsGPS
|
||||
.Add("@CveCliente", SqlDbType.Int).Value = CveCliente
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||
.Add("@ConcatenarDispuestos", SqlDbType.Bit).Value = ConcatenarDispuestos
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
@@ -5105,6 +5106,41 @@ Public Class ClsGPS
|
||||
Return retorno
|
||||
End Function
|
||||
|
||||
Public Function UpdateUnidadesDispuestas(CveDispositivo As Integer, Dispuesta As Boolean) As Boolean
|
||||
Dim retorno As Boolean = False
|
||||
DataAdapter("PA_GPS_UnidadesDispuestasUpdate", CommandType.StoredProcedure)
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveDispositivo", SqlDbType.Int).Value = CveDispositivo
|
||||
.Add("@Dispuesta", SqlDbType.Bit).Value = Dispuesta
|
||||
End With
|
||||
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al actualizar las unidades dispuestas.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End Try
|
||||
Return retorno
|
||||
End Function
|
||||
|
||||
Public Function GetUnidadesDispuestas(CveDispositivo As Integer, CveCliente As Integer, CveEmpresa As Integer) As Boolean
|
||||
Dim retorno As Boolean = False
|
||||
DataAdapter("PA_GPS_UnidadesDispuestasGet", CommandType.StoredProcedure)
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveDispositivo", SqlDbType.Int).Value = CveDispositivo
|
||||
.Add("@CveCliente", SqlDbType.Int).Value = CveCliente
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
End With
|
||||
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al obtener las unidades dispuestas.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End Try
|
||||
Return retorno
|
||||
End Function
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "G A S T O S"
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
|
||||
Imports System
|
||||
Imports System.Data
|
||||
Imports System.Data.SqlClient
|
||||
Imports Extensiones
|
||||
@@ -1753,6 +1754,33 @@ Public Class ClsInventarios
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function RepExistenciasLote(CveEmpresa As Integer, FechaI As Date, FechaF As Date, CveProveedor As Integer, Almacenes As String,
|
||||
CvePS As Integer, CveClasificacion As Integer, Optional CveMarca As Integer = -1, Optional CveTipoAlmacen As String = "-1") As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_Inv_RepExistenciaLote")
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
.Add("@FechaI", SqlDbType.Date).Value = FechaI
|
||||
.Add("@FechaF", SqlDbType.Date).Value = FechaF
|
||||
.Add("@CveProveedor", SqlDbType.Int).Value = CveProveedor
|
||||
.Add("@Almacenes", SqlDbType.VarChar).Value = Almacenes
|
||||
.Add("@CvePS", SqlDbType.Int).Value = CvePS
|
||||
.Add("@CveClasificacion", SqlDbType.Int).Value = CveClasificacion
|
||||
.Add("@CveMarca", SqlDbType.Int).Value = CveMarca
|
||||
.Add("@CveTipoAlmacen", SqlDbType.VarChar).Value = CveTipoAlmacen
|
||||
End With
|
||||
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al obtener la lista de movimientos.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
'Nuevo R: 19/10/2017
|
||||
Public Function RepMovimientosGen(CveEmpresa As Integer, FechaI As String, FechaF As String, CveProveedor As Integer, CveAlmacen As Integer,
|
||||
CvePS As Integer, CveClasificacion As Integer, Agrupador As Integer, Optional CveClasificacion2 As Integer = -1) As Boolean
|
||||
@@ -1877,7 +1905,7 @@ Public Class ClsInventarios
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function RepTraspasoAlmacen(FechaI As Date, FechaF As Date, CveAlmacenOrigen As Integer, CveAlmacenDestino As Integer, Recibido As Boolean, CveEmpresa As Integer) As Boolean
|
||||
Public Function RepTraspasoAlmacen(FechaI As Date, FechaF As Date, CveAlmacenOrigen As Integer, CveAlmacenDestino As Integer, Recibido As Boolean, CveTipoAlmacen As Integer, CveEmpresa As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Inv_RepTraspasoAlmacen")
|
||||
|
||||
@@ -1887,6 +1915,7 @@ Public Class ClsInventarios
|
||||
.Add("@CveAlmacenOrigen", SqlDbType.Int).Value = CveAlmacenOrigen
|
||||
.Add("@CveAlmacenDestino", SqlDbType.Int).Value = CveAlmacenDestino
|
||||
.Add("@Recibido", SqlDbType.Bit).Value = Recibido
|
||||
.Add("@CveTipoAlmacen", SqlDbType.Int).Value = CveTipoAlmacen
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
End With
|
||||
Try
|
||||
@@ -3061,7 +3090,7 @@ Public Class ClsInventarios
|
||||
|
||||
#Region " INVENTARIOS - COMPRAS "
|
||||
|
||||
Public Function RecepcionAlmacenGet(CveCompra As Integer, TipoRecepcion As Integer, CveEmpresa As Integer, Optional CveProveedor As Integer = -1) As Boolean
|
||||
Public Function RecepcionAlmacenGet(CveCompra As Integer, TipoRecepcion As Integer, CveProveedor As Integer, CveEmpresa As Integer, CveUsuario As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Inv_RecepcionAlmacenGet")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
@@ -3069,6 +3098,7 @@ Public Class ClsInventarios
|
||||
.Add("@TipoRecepcion", SqlDbType.Int).Value = TipoRecepcion
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
.Add("@CveProveedor", SqlDbType.Int).Value = CveProveedor
|
||||
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
|
||||
@@ -2356,6 +2356,33 @@ Public Class ClsPaginas
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Property GlobalDTGralMarcas(CveEmpresa As Integer, Optional CveMarca As Integer = -1) As DataTable
|
||||
Get
|
||||
Dim AppNombre As String = String.Format("GlobalDTGralMarcas-{0}", CveEmpresa)
|
||||
'sino existe, recarga los datos
|
||||
If DirectCast(Application(AppNombre), DataTable) Is Nothing Then
|
||||
Dim ObjMarcas As New ClsProductosServicios
|
||||
If ObjMarcas.GetMarcas(CveEmpresa) Then Application(AppNombre) = ObjMarcas.DtResultados Else Application(AppNombre) = Nothing
|
||||
ObjMarcas.Dispose()
|
||||
End If
|
||||
|
||||
Dim filtro As New StringBuilder
|
||||
If CveMarca > 0 Then
|
||||
filtro.AppendFormat(" CveMarca={0} ", CveMarca)
|
||||
End If
|
||||
|
||||
Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), filtro.ToString, "", DataViewRowState.CurrentRows)
|
||||
GlobalDTGralMarcas = Dv.ToTable
|
||||
Dv.Dispose()
|
||||
|
||||
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
Dim AppNombre As String = String.Format("GlobalDTGralMarcas-{0}", CveEmpresa)
|
||||
Application(AppNombre) = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "***********************************************************************DT PROSPECTOS*************************************************************************************"
|
||||
@@ -4716,6 +4743,7 @@ Public Class ClsPaginas
|
||||
PaginaDict.Add("/Inventarios/CatAlmacenClasificacionSecciones.aspx".ToUpper(), 764)
|
||||
PaginaDict.Add("/Inventarios/ReconstruirCostos.aspx".ToUpper(), 764)
|
||||
PaginaDict.Add("/Inventarios/RecepcionDevolucion.aspx".ToUpper(), 696)
|
||||
PaginaDict.Add("/Inventarios/RepExistenciaLote.aspx".ToUpper(), 109)
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
@@ -1342,13 +1342,14 @@ Public Class ClsProductosServicios
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function AddPSAlias(PS As String, CvePS As Integer, Optional CveUsuarioModifico As Integer = -1) As Boolean
|
||||
Public Function AddPSAlias(PS As String, CvePS As Integer, Flexible As Boolean, CveUsuarioModifico As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Gral_ProductosServiciosAliasAdd")
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@PSAlias", SqlDbType.VarChar).Value = If(PS.Length > 845, PS.Substring(0, 845), PS)
|
||||
.Add("@CvePS", SqlDbType.Int).Value = CvePS
|
||||
.Add("@Flexible", SqlDbType.Bit).Value = If(Flexible, 1, 0)
|
||||
.Add("@CveUsuarioModifico", SqlDbType.Int).Value = CveUsuarioModifico
|
||||
End With
|
||||
|
||||
@@ -1360,7 +1361,12 @@ Public Class ClsProductosServicios
|
||||
If Ex1.Message.Contains("Número: 2627;") Then
|
||||
OnError("El Nuevo Producto o Servicio no se guardo debido a que actualmente se encuentra registrado", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
Else
|
||||
Me.OnError("Ocurrió un error al guardar el nuevo Producto o Servicio.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
If Ex1.Message.Contains("Número: 5555;") Then
|
||||
Dim Str As String = Ex1.Message.Substring(14) 'toma el valor posterior
|
||||
OnError("No se puede registrar un alias porque ya existe la siguiente:" + Str, Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
Else
|
||||
Me.OnError("Ocurrió un error al guardar el nuevo Producto o Servicio.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End If
|
||||
End If
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al guardar el nuevo Producto o Servicio.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
|
||||
@@ -2826,7 +2826,7 @@ Public Class ClsVentas
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
Public Function GetReporteVentasUtilidad(CveVendedor As String, CveCliente As Integer, CveSubProyecto As String, FechaInicio As Date, FechaFin As Date, CveEmpresa As Integer, CvePS As Integer, CveClasificacion As Double) As Boolean
|
||||
Public Function GetReporteVentasUtilidad(CveVendedor As String, CveCliente As Integer, CveSubProyecto As String, FechaInicio As Date, FechaFin As Date, CveEmpresa As Integer, CvePS As Integer, CveClasificacion As Integer, CveMarca As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Vta_VentasUtilidadGet")
|
||||
|
||||
@@ -2839,6 +2839,7 @@ Public Class ClsVentas
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
.Add("@CvePS", SqlDbType.Int).Value = CvePS
|
||||
.Add("@CveClasificacion", SqlDbType.Int).Value = CveClasificacion
|
||||
.Add("@CveMarca", SqlDbType.Int).Value = CveMarca
|
||||
End With
|
||||
|
||||
Try
|
||||
@@ -2853,7 +2854,7 @@ Public Class ClsVentas
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
Public Function GetReporteVentasUtilidadDetalle(CveVendedor As String, CveVenta As Integer, CveCliente As Integer, CveSubProyecto As String, FechaInicio As Date, FechaFin As Date, CveEmpresa As Integer, CvePS As Integer, CveClasificacion As Double) As Boolean
|
||||
Public Function GetReporteVentasUtilidadDetalle(CveVendedor As String, CveVenta As Integer, CveCliente As Integer, CveSubProyecto As String, FechaInicio As Date, FechaFin As Date, CveEmpresa As Integer, CvePS As Integer, CveClasificacion As Integer, CveMarca As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Vta_VentasUtilidadDetalleGet")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
@@ -2866,6 +2867,7 @@ Public Class ClsVentas
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
.Add("@CvePS", SqlDbType.Int).Value = CvePS
|
||||
.Add("@CveClasificacion", SqlDbType.Int).Value = CveClasificacion
|
||||
.Add("@CveMarca", SqlDbType.Int).Value = CveMarca
|
||||
End With
|
||||
|
||||
Try
|
||||
@@ -2883,7 +2885,7 @@ Public Class ClsVentas
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
Public Function GetReportePadreVentasUtilidad(CveVendedor As String, CveCliente As Integer, CveSubProyecto As String, FechaInicio As Date, FechaFin As Date, CveEmpresa As Integer, Gpo As Integer, CvePS As Integer, CveClasificacion As Double) As Boolean
|
||||
Public Function GetReportePadreVentasUtilidad(CveVendedor As String, CveCliente As Integer, CveSubProyecto As String, FechaInicio As Date, FechaFin As Date, CveEmpresa As Integer, Gpo As Integer, CvePS As Integer, CveClasificacion As Integer, CveMarca As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Vta_RepVentasUtilidadGet")
|
||||
|
||||
@@ -2897,6 +2899,7 @@ Public Class ClsVentas
|
||||
.Add("@Gpo", SqlDbType.Int).Value = Gpo
|
||||
.Add("@CvePS", SqlDbType.Int).Value = CvePS
|
||||
.Add("@CveClasificacion", SqlDbType.Int).Value = CveClasificacion
|
||||
.Add("@CveMarca", SqlDbType.Int).Value = CveMarca
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
|
||||
@@ -3222,10 +3222,8 @@ Partial Class Bancos_IE
|
||||
IVADev = Math.Round(IVADev * PorcentajeDevolucion, 2)
|
||||
IEPSDev = Math.Round(IEPSDev * PorcentajeDevolucion, 2)
|
||||
|
||||
Dim CveCuentaDevolucionIMPUESTOS As Integer = -1
|
||||
Dim IdCtaIVADevolucionIMPUESTOS As Integer = -1
|
||||
|
||||
|
||||
If DdlMoneda.SelectedValue.ToEntero > 1 Then
|
||||
IVADevMN = IVADev
|
||||
IEPSDevMN = IEPSDev
|
||||
@@ -3239,15 +3237,13 @@ Partial Class Bancos_IE
|
||||
|
||||
If IVADev > 0 Then
|
||||
|
||||
CveCuentaDevolucionIMPUESTOS = CveCuentaIVAxAcreditarDevDinC
|
||||
IdCtaIVADevolucionIMPUESTOS = IdCtaIVAXAcreditarDevDinC
|
||||
|
||||
If ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, -IVADev, ReferenciaAplicar, 14, ConceptoAplicar, Now, IdCtaIVADevolucionIMPUESTOS, -1, CveIE, CveCompra:=CveCompraDeCDin, CveProveedor:=CveProveedor, ImporteMX:=-IVADevMN, ImporteME:=-IVADev, CveCuenta:=CveCuentaDevolucionIMPUESTOS) Then
|
||||
If ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, -IVADev, ReferenciaAplicar, 14, ConceptoAplicar, Now, IdCtaIVADevolucionIMPUESTOS, -1, CveIE, CveCompra:=CveCompraDeCDin, CveProveedor:=CveProveedor, ImporteMX:=-IVADevMN, ImporteME:=-IVADev) Then
|
||||
|
||||
CveCuentaDevolucionIMPUESTOS = CveCuentaIVAAcreditableDevDinC
|
||||
IdCtaIVADevolucionIMPUESTOS = IdCtaIVAAcreditableDevDinC
|
||||
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, -IVADev, ReferenciaAplicar, 19, ConceptoAplicar, Now, IdCtaIVADevolucionIMPUESTOS, -1, CveIE, CveCompra:=CveCompraDeCDin, CveProveedor:=CveProveedor, ImporteMX:=-IVADevMN, ImporteME:=-IVADev, CveCuenta:=CveCuentaDevolucionIMPUESTOS) Then
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, -IVADev, ReferenciaAplicar, 19, ConceptoAplicar, Now, IdCtaIVADevolucionIMPUESTOS, -1, CveIE, CveCompra:=CveCompraDeCDin, CveProveedor:=CveProveedor, ImporteMX:=-IVADevMN, ImporteME:=-IVADev) Then
|
||||
MsgError = "Ocurrió un error al registrar el asiento de impuestos de devolución"
|
||||
ErrorDevolucionImpuestos = True
|
||||
End If
|
||||
@@ -3263,22 +3259,19 @@ Partial Class Bancos_IE
|
||||
'Dim ObjContabilidad As New ClsContabilidad
|
||||
If ObjMov.GetRetCuenta(25, UsuarioActual.CveEmpresa) Then
|
||||
Try
|
||||
CveCuentaDevolucionIMPUESTOS = ObjMov.DtResultados.Rows(0)("IdCuentaIEPSxAcreditarSIG").ToString.ToEntero
|
||||
IdCtaIVADevolucionIMPUESTOS = ObjMov.DtResultados.Rows(0)("IdCuentaIEPSxAcreditar").ToString.ToEntero
|
||||
|
||||
If ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, -IEPSDev, ReferenciaAplicar, 25, ConceptoAplicar, Now, IdCtaIVADevolucionIMPUESTOS, -1, CveIE, CveCompra:=CveCompraDeCDin, CveProveedor:=CveProveedor, ImporteMX:=-IEPSDevMN, ImporteME:=-IEPSDev, CveCuenta:=CveCuentaDevolucionIMPUESTOS) Then
|
||||
If ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, -IEPSDev, ReferenciaAplicar, 25, ConceptoAplicar, Now, IdCtaIVADevolucionIMPUESTOS, -1, CveIE, CveCompra:=CveCompraDeCDin, CveProveedor:=CveProveedor, ImporteMX:=-IEPSDevMN, ImporteME:=-IEPSDev) Then
|
||||
|
||||
If ObjMov.GetRetCuenta(26, UsuarioActual.CveEmpresa) Then
|
||||
Try
|
||||
CveCuentaDevolucionIMPUESTOS = ObjMov.DtResultados.Rows(0)("IdCuentaIEPSAcreditableSIG").ToString.ToEntero
|
||||
IdCtaIVADevolucionIMPUESTOS = ObjMov.DtResultados.Rows(0)("IdCuentaIEPSAcreditable").ToString.ToEntero
|
||||
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, -IEPSDev, ReferenciaAplicar, 26, ConceptoAplicar, Now, IdCtaIVADevolucionIMPUESTOS, -1, CveIE, CveCompra:=CveCompraDeCDin, CveProveedor:=CveProveedor, ImporteMX:=-IEPSDevMN, ImporteME:=-IEPSDev, CveCuenta:=CveCuentaDevolucionIMPUESTOS) Then
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, -IEPSDev, ReferenciaAplicar, 26, ConceptoAplicar, Now, IdCtaIVADevolucionIMPUESTOS, -1, CveIE, CveCompra:=CveCompraDeCDin, CveProveedor:=CveProveedor, ImporteMX:=-IEPSDevMN, ImporteME:=-IEPSDev) Then
|
||||
MsgError = "Ocurrió un error al registrar el asiento de impuestos de devolución"
|
||||
ErrorDevolucionImpuestos = True
|
||||
End If
|
||||
|
||||
|
||||
Catch ex As Exception
|
||||
Alert("Se presento un error al obtener las cuentas de IEPS acreditable.")
|
||||
ErrorDevolucionImpuestos = True
|
||||
@@ -3456,7 +3449,6 @@ Partial Class Bancos_IE
|
||||
IVADev = Math.Round(IVADev * PorcentajeDevolucion, 2)
|
||||
IEPSDev = Math.Round(IEPSDev * PorcentajeDevolucion, 2)
|
||||
|
||||
Dim CveCuentaDevolucionIMPUESTOS As Integer = -1
|
||||
Dim IdCtaIVADevolucionIMPUESTOS As Integer = -1
|
||||
|
||||
|
||||
@@ -3473,15 +3465,13 @@ Partial Class Bancos_IE
|
||||
|
||||
If IVADev > 0 Then
|
||||
|
||||
CveCuentaDevolucionIMPUESTOS = CveCuentaIVAxAcreditarDevDinC
|
||||
IdCtaIVADevolucionIMPUESTOS = IdCtaIVAXAcreditarDevDinC
|
||||
|
||||
If ObjMov.AddPrePolizasDetalle(CvePrePoliza, Not True, -IVADev, ReferenciaAplicar, 14, ConceptoAplicar, Now, IdCtaIVADevolucionIMPUESTOS, -1, CveIE, CveCompra:=CveCompraDeCDin, CveProveedor:=CveProveedor, ImporteMX:=-IVADevMN, ImporteME:=-IVADev, CveCuenta:=CveCuentaDevolucionIMPUESTOS) Then
|
||||
If ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, -IVADev, ReferenciaAplicar, 14, ConceptoAplicar, Now, IdCtaIVADevolucionIMPUESTOS, -1, CveIE, CveCompra:=CveCompraDeCDin, CveProveedor:=CveProveedor, ImporteMX:=-IVADevMN, ImporteME:=-IVADev) Then
|
||||
|
||||
CveCuentaDevolucionIMPUESTOS = CveCuentaIVAAcreditableDevDinC
|
||||
IdCtaIVADevolucionIMPUESTOS = IdCtaIVAAcreditableDevDinC
|
||||
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, -IVADev, ReferenciaAplicar, 19, ConceptoAplicar, Now, IdCtaIVADevolucionIMPUESTOS, -1, CveIE, CveCompra:=CveCompraDeCDin, CveProveedor:=CveProveedor, ImporteMX:=-IVADevMN, ImporteME:=-IVADev, CveCuenta:=CveCuentaDevolucionIMPUESTOS) Then
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, -IVADev, ReferenciaAplicar, 19, ConceptoAplicar, Now, IdCtaIVADevolucionIMPUESTOS, -1, CveIE, CveCompra:=CveCompraDeCDin, CveProveedor:=CveProveedor, ImporteMX:=-IVADevMN, ImporteME:=-IVADev) Then
|
||||
MsgError = "Ocurrió un error al registrar el asiento de impuestos de devolución"
|
||||
ErrorDevolucionImpuestos = True
|
||||
End If
|
||||
@@ -3497,17 +3487,15 @@ Partial Class Bancos_IE
|
||||
'Dim ObjContabilidad As New ClsContabilidad
|
||||
If ObjMov.GetRetCuenta(25, UsuarioActual.CveEmpresa) Then
|
||||
Try
|
||||
CveCuentaDevolucionIMPUESTOS = ObjMov.DtResultados.Rows(0)("IdCuentaIEPSxAcreditarSIG").ToString.ToEntero
|
||||
IdCtaIVADevolucionIMPUESTOS = ObjMov.DtResultados.Rows(0)("IdCuentaIEPSxAcreditar").ToString.ToEntero
|
||||
|
||||
If ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, -IEPSDev, ReferenciaAplicar, 25, ConceptoAplicar, Now, IdCtaIVADevolucionIMPUESTOS, -1, CveIE, CveCompra:=CveCompraDeCDin, CveProveedor:=CveProveedor, ImporteMX:=-IEPSDevMN, ImporteME:=-IEPSDev, CveCuenta:=CveCuentaDevolucionIMPUESTOS) Then
|
||||
If ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, -IEPSDev, ReferenciaAplicar, 25, ConceptoAplicar, Now, IdCtaIVADevolucionIMPUESTOS, -1, CveIE, CveCompra:=CveCompraDeCDin, CveProveedor:=CveProveedor, ImporteMX:=-IEPSDevMN, ImporteME:=-IEPSDev) Then
|
||||
|
||||
If ObjMov.GetRetCuenta(26, UsuarioActual.CveEmpresa) Then
|
||||
Try
|
||||
CveCuentaDevolucionIMPUESTOS = ObjMov.DtResultados.Rows(0)("IdCuentaIEPSAcreditableSIG").ToString.ToEntero
|
||||
IdCtaIVADevolucionIMPUESTOS = ObjMov.DtResultados.Rows(0)("IdCuentaIEPSAcreditable").ToString.ToEntero
|
||||
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, -IEPSDev, ReferenciaAplicar, 26, ConceptoAplicar, Now, IdCtaIVADevolucionIMPUESTOS, -1, CveIE, CveCompra:=CveCompraDeCDin, CveProveedor:=CveProveedor, ImporteMX:=-IEPSDevMN, ImporteME:=-IEPSDev, CveCuenta:=CveCuentaDevolucionIMPUESTOS) Then
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, -IEPSDev, ReferenciaAplicar, 26, ConceptoAplicar, Now, IdCtaIVADevolucionIMPUESTOS, -1, CveIE, CveCompra:=CveCompraDeCDin, CveProveedor:=CveProveedor, ImporteMX:=-IEPSDevMN, ImporteME:=-IEPSDev) Then
|
||||
MsgError = "Ocurrió un error al registrar el asiento de impuestos de devolución "
|
||||
ErrorDevolucionImpuestos = True
|
||||
End If
|
||||
@@ -6476,10 +6464,10 @@ Partial Class Bancos_IE
|
||||
|
||||
Protected Sub LnkCancelarComplemetno_Click(sender As Object, e As EventArgs)
|
||||
|
||||
If ChkConciliado.Checked Then
|
||||
Alert("El documento se encuentra conciliado, no se puede cancelar.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
'If ChkConciliado.Checked Then
|
||||
' Alert("El documento se encuentra conciliado, no se puede cancelar.", TipoMensaje.MsgAdvertencia)
|
||||
' Exit Sub
|
||||
'End If
|
||||
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).BindingContainer, GridViewRow)
|
||||
|
||||
|
||||
@@ -1661,6 +1661,40 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
If UsuarioActual.CveEmpresa.Contiene(119, 158) AndAlso CveMoneda = 2 AndAlso CveMonedaFiltro = 1 Then 'Si la venta viene en pesos y se va a pagar en DOLARES
|
||||
'fluctuación.
|
||||
Dim TCPago = TxtTCDolares.Text.ToDecimal
|
||||
|
||||
Dim ImporteFluctuacion As Decimal = 0 '((ImporteSeleccionado / TCPago) - TxtImporte.Text.ToDecimal)
|
||||
|
||||
Dim DtPrePoliza As DataTable = Nothing
|
||||
If ObjMov.GetPrePolizasDetalle(CvePrePoliza, UsuarioActual.CveEmpresa) Then
|
||||
DtPrePoliza = ObjMov.DtResultados.Copy
|
||||
End If
|
||||
|
||||
Dim PagoProveedoresME = DtPrePoliza.SUMD("ImporteMN", "CveConceptoContable = 312 AND TipoMovto = 0")
|
||||
Dim Bancos = DtPrePoliza.SUMD("ImporteMN", "CveConceptoContable = 30 AND TipoMovto = 1")
|
||||
Dim BancosComplementaria = DtPrePoliza.SUMD("ImporteMN", "CveConceptoContable = 204 AND TipoMovto = 1")
|
||||
|
||||
DtPrePoliza.Dispose()
|
||||
|
||||
ImporteFluctuacion = PagoProveedoresME - (Bancos + BancosComplementaria)
|
||||
|
||||
If ImporteFluctuacion.RoundSQL() <> 0 Then
|
||||
'SI EL PAGO DE PROVEEDORES ME ES MAYOR QUE BANCOS METER EL CONCEPTO DE GANANCIA
|
||||
If ImporteFluctuacion > 0 Then
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, Math.Abs(ImporteFluctuacion), Referencia, 64, ConceptoMovimiento, TxtFechaIncobrable.Text.ToDate, IdCtaContable:=UsuarioActual.Empresa.IdCuentaGananciaCambiaria, CveIE:=-1, IdSegmentoNegocio:=-1, CveSubProyecto:=CveSubProyecto, CveProveedor:=Me.CveProveedor, CveCompra:=-1, ImporteMX:=Math.Abs(ImporteFluctuacion), TipoCambio:=TipoCambio, TipoCambioPago:=TCPago) Then
|
||||
MsgError = "Ocurrio un error al saldar el movimiento"
|
||||
End If
|
||||
ElseIf ImporteFluctuacion < 0 Then
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, Math.Abs(ImporteFluctuacion), Referencia, 65, ConceptoMovimiento, TxtFechaIncobrable.Text.ToDate, IdCtaContable:=UsuarioActual.Empresa.IdCuentaPerdidaCambiaria, CveIE:=-1, IdSegmentoNegocio:=-1, CveSubProyecto:=CveSubProyecto, CveProveedor:=Me.CveProveedor, CveCompra:=-1, ImporteMX:=Math.Abs(ImporteFluctuacion), TipoCambio:=TipoCambio, TipoCambioPago:=TCPago) Then
|
||||
MsgError = "Ocurrio un error al saldar el movimiento"
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
Else
|
||||
If CveMoneda = 2 AndAlso CveMonedaFiltro = 1 Then 'Si la venta viene en pesos y se va a pagar en DOLARES
|
||||
TipoCambioPago = TxtTCDolares.Text.ToDecimal
|
||||
|
||||
@@ -69,7 +69,7 @@
|
||||
</li>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
||||
<asp:Label ID="LblTitulo" runat="server" Text="Catálogo de Ingreso / Egreso"></asp:Label>
|
||||
<asp:Label ID="LblTitulo" runat="server" Text="Reporteador Ingresos - Egresos"></asp:Label>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
</asp:Content>
|
||||
|
||||
@@ -4587,8 +4587,11 @@
|
||||
</div>
|
||||
<div class="row">
|
||||
<label class="col-md-2">U.M.:</label>
|
||||
<div class="col-md-10">
|
||||
<div class="col-md-4">
|
||||
<asp:DropDownList ID="DdlUnidadAlias" runat="server" Class="table-group-action-input form-control input-inline input-sm" Style="width: 125px !important;" DataTextField="UnidadMedida" DataValueField="CveUnidadMedida"></asp:DropDownList>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<asp:CheckBox ID="ChkAliasFlexible" Text="Alias Flexible:" runat="server" TextAlign="Left" AutoPostBack ="true" Visible="false" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1617,6 +1617,11 @@ Partial Class Compras_Compras
|
||||
DdlTipoGastoAsignar.DataSource = GlobalDTTiposGastos(UsuarioActual.CveEmpresa)
|
||||
DdlTipoGastoAsignar.DataBind()
|
||||
UpParametros.Update()
|
||||
|
||||
If UsuarioActual.CveRol = 1 OrElse UsuarioActual.CveEmpresa = 119 Then
|
||||
ChkAliasFlexible.Visible = True
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub CargaGvAcarreos(tCveProveedor As Integer)
|
||||
@@ -1649,7 +1654,7 @@ Partial Class Compras_Compras
|
||||
Private Function CargaFactura(CveFactura As Integer) As String
|
||||
Dim ObjeFacturas As New ClsCompras
|
||||
Dim RFC As String = ""
|
||||
If ObjeFacturas.GetFacturas(CveFactura, "-1", Now.AddYears(-3), Now, "-1", "-1", -1, -1, -1, -1, "-1", UsuarioActual.CveEmpresa) AndAlso ObjeFacturas.DtResultados.Rows.Count > 0 Then
|
||||
If ObjeFacturas.GetFacturas(CveFactura, "-1", Now.AddYears(-4), Now, "-1", "-1", -1, -1, -1, -1, "-1", UsuarioActual.CveEmpresa) AndAlso ObjeFacturas.DtResultados.Rows.Count > 0 Then
|
||||
Dim dr As DataRow = ObjeFacturas.DtResultados.Rows(0) ' no toma la cero, porque es el totalizador
|
||||
|
||||
Dim XMLDoc As New XmlDocument
|
||||
@@ -5962,10 +5967,6 @@ Partial Class Compras_Compras
|
||||
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
End If
|
||||
|
||||
If TipoCambioCompra > 1 AndAlso DdlMoneda.SelectedValue.ToEntero <> 1 Then Concepto += $" TC{TipoCambioCompra} ${importeMovimiento.FormatoNumero(2)}"
|
||||
@@ -6062,7 +6063,7 @@ Partial Class Compras_Compras
|
||||
If tipoCambioActual > 1 Then Concepto += $" TC{tipoCambioActual} ${importeMovimiento.FormatoNumero(2)}"
|
||||
Case 14 'IVA X Acreditar
|
||||
importeMovimiento = importeIVAxAcreditar
|
||||
importeMN = Math.Round(importeMovimiento, 2) * tipoCambioActual * Multiplicador
|
||||
importeMN = (importeMovimiento * tipoCambioActual * Multiplicador).RoundSQL
|
||||
If tipoCambioActual > 1 Then Concepto += $" TC{tipoCambioActual} ${importeMovimiento.FormatoNumero(2)}"
|
||||
PorcentajeImpuesto = PorcentajeIVA
|
||||
IdCtaContable = If(IdCtaIVAXAcreditar > 0, IdCtaIVAXAcreditar, 0)
|
||||
@@ -6382,30 +6383,30 @@ Partial Class Compras_Compras
|
||||
Else
|
||||
importeMovimiento = 0
|
||||
End If
|
||||
Case 285 'Ret IVA 6% Servicios
|
||||
'Case 285 'Ret IVA 6% Servicios
|
||||
|
||||
IdCtaContable = UsuarioActual.Empresa.Funcionalidad(578).ToEntero
|
||||
' IdCtaContable = UsuarioActual.Empresa.Funcionalidad(578).ToEntero
|
||||
|
||||
'If ObjConta.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) And Not IdCtaContable > 0 Then
|
||||
' If ObjConta.DtResultados.Rows.Count > 0 Then
|
||||
' IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCuentaRetIVACirculacion").ToString.ToEntero
|
||||
' End If
|
||||
'End If
|
||||
' 'If ObjConta.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) And Not IdCtaContable > 0 Then
|
||||
' ' If ObjConta.DtResultados.Rows.Count > 0 Then
|
||||
' ' IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCuentaRetIVACirculacion").ToString.ToEntero
|
||||
' ' End If
|
||||
' 'End If
|
||||
|
||||
|
||||
If DdlRetIVAConcepto.SelectedValue.ToEntero = 5 Then
|
||||
' If DdlRetIVAConcepto.SelectedValue.ToEntero = 5 Then
|
||||
|
||||
If CveMoneda = 2 Then
|
||||
importeMN = TxtRetIVA.Text.ToDecimal * TxtTC.Text.ToDecimal
|
||||
Else
|
||||
importeMN = TxtRetIVA.Text.ToDecimal
|
||||
importeMovimiento = TxtRetIVA.Text.ToDecimal
|
||||
' If CveMoneda = 2 Then
|
||||
' importeMN = TxtRetIVA.Text.ToDecimal * TxtTC.Text.ToDecimal
|
||||
' Else
|
||||
' importeMN = TxtRetIVA.Text.ToDecimal
|
||||
' importeMovimiento = TxtRetIVA.Text.ToDecimal
|
||||
|
||||
End If
|
||||
' End If
|
||||
|
||||
Else
|
||||
importeMovimiento = 0
|
||||
End If
|
||||
' Else
|
||||
' importeMovimiento = 0
|
||||
' End If
|
||||
Case 6 'Compra
|
||||
|
||||
Dim AgregaMercanciaInventario As Boolean = UsuarioActual.CveEmpresa.Contiene(1, 72, 80, 119, 140, 141, 152, 153, 154, 159, 160, 161, 162, 163) AndAlso UsuarioActual.Empresa.UsaInventarios AndAlso Not UsuarioActual.Empresa.Funcionalidad(126) = "1"
|
||||
@@ -8446,7 +8447,7 @@ Partial Class Compras_Compras
|
||||
|
||||
Dim Respuesta As Boolean = False
|
||||
|
||||
Dim IVADetalles As Decimal = TmpDT.SUM("IVA", " IVA > 0 ").ToDecimal
|
||||
Dim IVADetalles As Decimal = TmpDT.SUMD("IVA", " IVA > 0 ")
|
||||
Dim DiferenciaIVas As Decimal = TxtIVA.Text.ToDecimal - IVADetalles
|
||||
|
||||
|
||||
@@ -8459,8 +8460,9 @@ Partial Class Compras_Compras
|
||||
End If
|
||||
|
||||
For Each dRow As DataRow In TmpDT.Rows
|
||||
If GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=dRow("CvePS").ToString.ToEntero).Rows.Count > 0 Then
|
||||
Dim DrPS As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=dRow("CvePS").ToString.ToEntero).Rows(0)
|
||||
Dim DttPS As DataTable = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=dRow("CvePS").ToString.ToEntero)
|
||||
If DttPS.Rows.Count > 0 Then
|
||||
Dim DrPS As DataRow = DttPS.Rows(0)
|
||||
dRow("AplicaIEPS") = Boolean.Parse(DrPS("AplicaIEPS").ToString)
|
||||
dRow("IEPSGrabaIVA") = Boolean.Parse(DrPS("IEPSGrabaIVA").ToString)
|
||||
Else
|
||||
@@ -8486,7 +8488,7 @@ Partial Class Compras_Compras
|
||||
IndiceContador = IndiceContador + 1
|
||||
Next
|
||||
|
||||
IVADetalles = TmpDT.SUM("IVA", " IVA > 0 ").ToDecimal
|
||||
IVADetalles = TmpDT.SUMD("IVA", " IVA > 0 ")
|
||||
DiferenciaIVas = TxtIVA.Text.ToDecimal - IVADetalles
|
||||
|
||||
If Math.Abs(DiferenciaIVas) > 0.01D Then
|
||||
@@ -8506,21 +8508,16 @@ Partial Class Compras_Compras
|
||||
TmpDT.Rows(IndiceUltimo)("IVA") = TmpDT.Rows(IndiceUltimo)("IVA").ToString.ToDecimal + DiferenciaIVas
|
||||
End If
|
||||
|
||||
|
||||
|
||||
TmpDT.AcceptChanges()
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
|
||||
'Revalidacion de ajuste
|
||||
IVADetalles = TmpDT.SUM("IVA", " IVA > 0 ").ToDecimal
|
||||
IVADetalles = TmpDT.SUMD("IVA", " IVA > 0 ")
|
||||
DiferenciaIVas = TxtIVA.Text.ToDecimal - IVADetalles
|
||||
|
||||
|
||||
|
||||
If Math.Abs(DiferenciaIVas) > 0.01D Then
|
||||
Respuesta = False
|
||||
If IVADetalles > 0 Then
|
||||
@@ -8542,8 +8539,6 @@ Partial Class Compras_Compras
|
||||
Respuesta = True
|
||||
End If
|
||||
|
||||
|
||||
|
||||
If Respuesta Then
|
||||
|
||||
Dim IEPSPSDetalles As Decimal = TmpDT.SUMD("IEPSPS", " IEPSPS > 0 ")
|
||||
@@ -8552,11 +8547,9 @@ Partial Class Compras_Compras
|
||||
Dim DTConsultaIEPSPS As New DataTable
|
||||
DTConsultaIEPSPS = TmpDT.FiltraParametros(" AplicaIEPS = 'True'")
|
||||
|
||||
|
||||
Dim IndiceContador As Integer = 0
|
||||
Dim IndicePrimero As Integer = 0
|
||||
|
||||
|
||||
For Each dRow As DataRow In TmpDT.Rows
|
||||
If Boolean.Parse(dRow("AplicaIEPS").ToString) Then
|
||||
IndicePrimero = IndiceContador
|
||||
@@ -8590,12 +8583,6 @@ Partial Class Compras_Compras
|
||||
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Return Respuesta
|
||||
|
||||
End Function
|
||||
@@ -15471,7 +15458,7 @@ Partial Class Compras_Compras
|
||||
|
||||
Dim Cont As Integer = 0
|
||||
For Each gvr As GridViewRow In GvOC1.Rows
|
||||
RegistraScript($"CalculaTotalOCEdit('{gvr.DataKey("PS").Replace("'", "")}', {gvr.DataKey("CantidadPendienteVincular").ToString.ToDouble}, {gvr.FCTextBox("TxtCantidad").ClientID}, {gvr.FCTextBox("TxtPU").ClientID}, {gvr.FCTextBox("TxtTotalOC1").ClientID}, {gvr.DataKey("IEPSPS").ToString.ToDouble},{gvr.FCHiddenField("HdnOC1IEPSImporte").ClientID}, {gvr.DataKey("IVA").ToString.ToDouble},{gvr.FCHiddenField("HdnOC1IVA").ClientID},{gvr.DataKey("RetIVA").ToString.ToDouble},{gvr.FCHiddenField("HdnOC1RetIVA").ClientID},{gvr.DataKey("RetISR").ToString.ToDouble},{gvr.FCHiddenField("HdnOC1RetISR").ClientID},{gvr.DataKey("IEPSPS").ToString.ToDouble},{gvr.FCHiddenField("HdnOC1IEPSIVA").ClientID},{gvr.DataKey("Descuento")},{gvr.FCHiddenField("HdnOC1Descuento").ClientID},{gvr.DataKey("IVAPorcentaje").ToString.ToDouble},{gvr.DataKey("RetIVAPorcentaje").ToString.ToDouble},{gvr.DataKey("RetISRPorcentaje").ToString.ToDouble},{gvr.DataKey("IEPSPSPorcentaje").ToString.ToDouble},{gvr.DataKey("IEPSPSIVAPorcentaje").ToString.ToDouble});", $"Gv{Cont}")
|
||||
RegistraScript($"CalculaTotalOCEdit('{gvr.DataKey("PS").Replace("'", "")}', {gvr.DataKey("Cantidad").ToString.ToDouble}, {gvr.FCTextBox("TxtCantidad").ClientID}, {gvr.FCTextBox("TxtPU").ClientID}, {gvr.FCTextBox("TxtTotalOC1").ClientID}, {gvr.DataKey("IEPSPS").ToString.ToDouble},{gvr.FCHiddenField("HdnOC1IEPSImporte").ClientID}, {gvr.DataKey("IVA").ToString.ToDouble},{gvr.FCHiddenField("HdnOC1IVA").ClientID},{gvr.DataKey("RetIVA").ToString.ToDouble},{gvr.FCHiddenField("HdnOC1RetIVA").ClientID},{gvr.DataKey("RetISR").ToString.ToDouble},{gvr.FCHiddenField("HdnOC1RetISR").ClientID},{gvr.DataKey("IEPSPS").ToString.ToDouble},{gvr.FCHiddenField("HdnOC1IEPSIVA").ClientID},{gvr.DataKey("Descuento")},{gvr.FCHiddenField("HdnOC1Descuento").ClientID},{gvr.DataKey("IVAPorcentaje").ToString.ToDouble},{gvr.DataKey("RetIVAPorcentaje").ToString.ToDouble},{gvr.DataKey("RetISRPorcentaje").ToString.ToDouble},{gvr.DataKey("IEPSPSPorcentaje").ToString.ToDouble},{gvr.DataKey("IEPSPSIVAPorcentaje").ToString.ToDouble});", $"Gv{Cont}")
|
||||
Cont += 1
|
||||
Next
|
||||
|
||||
@@ -15487,7 +15474,7 @@ Partial Class Compras_Compras
|
||||
Protected Sub GvOC1_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvOC1.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
Dim JSCambiaScript = $"CalculaTotalOCEdit('{e.Row.DBCampo("PS").Replace("'", "")}', {e.Row.DBCampo("CantidadPendienteVincular").ToString.ToDouble}, {e.Row.FCTextBox("TxtCantidad").ClientID}, {e.Row.FCTextBox("TxtPU").ClientID}, {e.Row.FCTextBox("TxtTotalOC1").ClientID}, {e.Row.DBCampo("IEPSPS").ToString.ToDouble},{e.Row.FCHiddenField("HdnOC1IEPSImporte").ClientID}, {e.Row.DBCampo("IVA").ToString.ToDouble},{e.Row.FCHiddenField("HdnOC1IVA").ClientID},{e.Row.DBCampo("RetIVA").ToString.ToDouble},{e.Row.FCHiddenField("HdnOC1RetIVA").ClientID},{e.Row.DBCampo("RetISR").ToString.ToDouble},{e.Row.FCHiddenField("HdnOC1RetISR").ClientID},{e.Row.DBCampo("IEPSPS").ToString.ToDouble},{e.Row.FCHiddenField("HdnOC1IEPSIVA").ClientID},{e.Row.DBCampo("Descuento")},{e.Row.FCHiddenField("HdnOC1Descuento").ClientID},{e.Row.DBCampo("IVAPorcentaje").ToString.ToDouble},{e.Row.DBCampo("RetIVAPorcentaje").ToString.ToDouble},{e.Row.DBCampo("RetISRPorcentaje").ToString.ToDouble},{e.Row.DBCampo("IEPSPSPorcentaje").ToString.ToDouble},{e.Row.DBCampo("IEPSPSIVAPorcentaje").ToString.ToDouble});"
|
||||
Dim JSCambiaScript = $"CalculaTotalOCEdit('{e.Row.DBCampo("PS").Replace("'", "")}', {e.Row.DBCampo("Cantidad").ToString.ToDouble}, {e.Row.FCTextBox("TxtCantidad").ClientID}, {e.Row.FCTextBox("TxtPU").ClientID}, {e.Row.FCTextBox("TxtTotalOC1").ClientID}, {e.Row.DBCampo("IEPSPS").ToString.ToDouble},{e.Row.FCHiddenField("HdnOC1IEPSImporte").ClientID}, {e.Row.DBCampo("IVA").ToString.ToDouble},{e.Row.FCHiddenField("HdnOC1IVA").ClientID},{e.Row.DBCampo("RetIVA").ToString.ToDouble},{e.Row.FCHiddenField("HdnOC1RetIVA").ClientID},{e.Row.DBCampo("RetISR").ToString.ToDouble},{e.Row.FCHiddenField("HdnOC1RetISR").ClientID},{e.Row.DBCampo("IEPSPS").ToString.ToDouble},{e.Row.FCHiddenField("HdnOC1IEPSIVA").ClientID},{e.Row.DBCampo("Descuento")},{e.Row.FCHiddenField("HdnOC1Descuento").ClientID},{e.Row.DBCampo("IVAPorcentaje").ToString.ToDouble},{e.Row.DBCampo("RetIVAPorcentaje").ToString.ToDouble},{e.Row.DBCampo("RetISRPorcentaje").ToString.ToDouble},{e.Row.DBCampo("IEPSPSPorcentaje").ToString.ToDouble},{e.Row.DBCampo("IEPSPSIVAPorcentaje").ToString.ToDouble});"
|
||||
e.Row.FCTextBox("TxtCantidad").Attributes.Add("onkeyup", $"LimitaCantidadOC({e.Row.DBCampo("CantidadPendienteVincular")}, this);{JSCambiaScript}")
|
||||
e.Row.FCTextBox("TxtPU").Attributes.Add("onkeyup", JSCambiaScript)
|
||||
|
||||
@@ -18666,12 +18653,18 @@ Partial Class Compras_Compras
|
||||
UpPSAlias.Update()
|
||||
End Sub
|
||||
Protected Sub BtnAddPSAlias_Click(sender As Object, e As EventArgs) Handles BtnAddPSAlias.Click
|
||||
Dim PS As New ClsProductosServicios
|
||||
Dim CvePS = -1
|
||||
Dim tPS = ""
|
||||
Dim CveSubProyecto As Integer = TmpDT.Rows(HdnAliasInd.Value.ToEntero)("CveSubProyecto").ToString.ToEntero
|
||||
|
||||
Dim CvePS As Integer = -1
|
||||
Dim tPS As String = ""
|
||||
|
||||
CvePS = DdlPSAlias2.SelectedValue.ToEntero
|
||||
tPS = DdlPSAlias2.SelectedText
|
||||
If CvePS <= 0 Then
|
||||
Alert("No se ha seleccionado el producto.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
Dim CveSubProyecto As Integer = TmpDT.Rows(HdnAliasInd.Value.ToEntero)("CveSubProyecto").ToString.ToEntero
|
||||
|
||||
Dim DtpsTemp As DataTable = Nothing
|
||||
Dim CveContrato As Integer = GlobalDTContratos(UsuarioActual.CveEmpresa, -1, CveSubProyecto).FiltroPrimeroValor("CveContrato").ToEntero
|
||||
If CveContrato > 0 Then
|
||||
@@ -18685,9 +18678,9 @@ Partial Class Compras_Compras
|
||||
DtpsTemp = GetPSContratoDetalle(CveContrato, dttemp)
|
||||
End If
|
||||
|
||||
|
||||
If PS.AddPSAlias(System.Web.HttpUtility.HtmlDecode(TxtPSAlias.Text.Trim), CvePS, UsuarioActual.CveUsuario) Then
|
||||
GlobalDTProductosServiciosAlias(-1) = PS.DtResultados
|
||||
Dim PS As New ClsProductosServicios
|
||||
If PS.AddPSAlias(System.Web.HttpUtility.HtmlDecode(TxtPSAlias.Text.Trim), CvePS, ChkAliasFlexible.Checked, UsuarioActual.CveUsuario) Then
|
||||
GlobalDTProductosServiciosAlias(UsuarioActual.CveEmpresa) = PS.DtResultados
|
||||
|
||||
TmpDT.Rows(HdnAliasInd.Value.ToEntero)("CvePS") = CvePS
|
||||
TmpDT.Rows(HdnAliasInd.Value.ToEntero)("PS") = tPS
|
||||
@@ -20954,6 +20947,10 @@ Partial Class Compras_Compras
|
||||
UpFacturaNC.Update()
|
||||
UpMostrarTodos.Update()
|
||||
End Sub
|
||||
|
||||
Private Sub ChkAliasFlexible_CheckedChanged(sender As Object, e As EventArgs) Handles ChkAliasFlexible.CheckedChanged
|
||||
TxtPSAlias.Enabled = ChkAliasFlexible.Checked
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
Public Class MMensajeDevolucion
|
||||
|
||||
@@ -915,12 +915,206 @@ Partial Class PopUpVerFactura
|
||||
HttpContext.Current.Response.AddHeader("Content-Length", Archivo.Length.ToString())
|
||||
HttpContext.Current.Response.TransmitFile(Path)
|
||||
'HttpContext.Current.Response.Flush()
|
||||
HttpContext.Current.Response.End()
|
||||
HttpContext.Current.Response.End()
|
||||
Else
|
||||
|
||||
End If
|
||||
Archivo = Nothing
|
||||
End If
|
||||
End Sub
|
||||
|
||||
'Protected Sub LnkGenerarPDF_Click(sender As Object, e As EventArgs)
|
||||
' GeneraPDFFactura()
|
||||
'End Sub
|
||||
'Private Sub GeneraPDFFactura()
|
||||
' Try
|
||||
' Dim objFactura = CreaObjetosVenta()
|
||||
' PdfFactura(objFactura)
|
||||
' objFactura.Dispose()
|
||||
' Catch ex As Exception
|
||||
' OnError("Ocurrió un error al generar el PDF", ex)
|
||||
' End Try
|
||||
'End Sub
|
||||
|
||||
'Private Function CreaObjetosTraslado() As Modelos.Factura
|
||||
' Dim ObjFactura = New Modelos.Factura
|
||||
' ObjFactura.Version = "3.3"
|
||||
' ObjFactura.CveUsuario = UsuarioActual.CveUsuario
|
||||
' ObjFactura.CveEmpresa = UsuarioActual.CveEmpresa
|
||||
' ObjFactura.TipoCambio = 0
|
||||
' ObjFactura.ConvertirPesos = False
|
||||
' ObjFactura.TipoCambio = 0
|
||||
' ObjFactura.CveMoneda = 1
|
||||
' ObjFactura.Moneda = GlobalDTMonedas.FiltroPrimeroValor("Moneda", $"CveMoneda = {ObjFactura.CveMoneda} ")
|
||||
' ObjFactura.MonedaSAT = GlobalDTMonedas.FiltroPrimeroValor("AbreviaturaSAT", "CveMoneda = 1")
|
||||
' ObjFactura.MonedaAbreviatura = GlobalDTMonedas.FiltroPrimeroValor("Abreviatura", $"CveMoneda = {ObjFactura.CveMoneda} ")
|
||||
' ObjFactura.TipoDocto = "Tra"
|
||||
' ObjFactura.RefDocto = ""
|
||||
' ObjFactura.Folio = Folio.ToEntero
|
||||
' ObjFactura.Serie = "Tra"
|
||||
' ObjFactura.CveMesa = -1
|
||||
' ObjFactura.Fecha = Now
|
||||
' ObjFactura.CvePrePoliza = -1
|
||||
' ObjFactura.FechaPago = Now
|
||||
' ObjFactura.MotivoDescuento = ""
|
||||
' ObjFactura.Observaciones = ""
|
||||
' ObjFactura.FechaEjecucion = Now
|
||||
' ObjFactura.UsuarioCreo = UsuarioActual.Usuario
|
||||
' ObjFactura.CveCondicionEntrega = -1
|
||||
' ObjFactura.CondicionEntrega = ""
|
||||
' ObjFactura.NumeroCuenta = ""
|
||||
' ObjFactura.CondicionesPago = 0
|
||||
' ObjFactura.FormaPago = 0
|
||||
' ObjFactura.PedidoContrato = ""
|
||||
' ObjFactura.OrdenCompra = ""
|
||||
' ObjFactura.NumeroContrato = ""
|
||||
' ObjFactura.NumeroDescripcionContrato = ""
|
||||
' ObjFactura.DescripcionContrato = ""
|
||||
' ObjFactura.CveCorte = -1
|
||||
' ObjFactura.TipoDocumento = "Traspaso"
|
||||
' ObjFactura.Alfa1 = ""
|
||||
' ObjFactura.Alfa2 = ""
|
||||
' ObjFactura.Alfa3 = ""
|
||||
' ObjFactura.Descuento = 0
|
||||
' ObjFactura.Amortizacion = 0
|
||||
' ObjFactura.CveContrato = 0
|
||||
' ObjFactura.CveVendedor = 0
|
||||
' ObjFactura.FechaVencimiento = Now
|
||||
' ObjFactura.TipoEstatus = 0
|
||||
' ObjFactura.Det_OrdenCompra = ""
|
||||
' ObjFactura.Inv_CveEstatusEntrega = 0
|
||||
' ObjFactura.FormaPago33 = ""
|
||||
' ObjFactura.MetodoPago33 = ""
|
||||
' ObjFactura.UsoCFDI = ""
|
||||
' ObjFactura.CveClienteSucursal = 0
|
||||
' Dim CveSubProyecto As Integer = -1
|
||||
' If GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltraParametros($"CveAlmacen = {DdlAlmacen.SelectedValue}").Rows.Count > 0 Then
|
||||
' CveSubProyecto = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltraParametros($"CveAlmacen = {DdlAlmacen.SelectedValue}").Rows(0)("CveSubProyecto").ToString.ToEntero
|
||||
' End If
|
||||
' ObjFactura.CveSubProyecto = CveSubProyecto
|
||||
' ObjFactura.CveSubProyectoCobranza = CveSubProyecto
|
||||
' ObjFactura.CveSubProyectoEjecucion = CveSubProyecto
|
||||
|
||||
' ObjFactura.SubTotal = 0
|
||||
' ObjFactura.Descuento = 0
|
||||
' ObjFactura.Amortizacion = 0
|
||||
' ObjFactura.IVA = 0
|
||||
' ObjFactura.RetIVA = 0
|
||||
' ObjFactura.RetISR = 0
|
||||
' ObjFactura.IEPS = 0
|
||||
' ObjFactura.Total = 0
|
||||
' ObjFactura.RFCReceptor = "XAXX010101000"
|
||||
|
||||
' Dim dt As DataTable = DtMovimientos.Copy
|
||||
|
||||
' dt.Columns.Add("TotalImporte", Type.GetType("System.Double"))
|
||||
' dt.Columns.Add("Descuento", Type.GetType("System.Double"))
|
||||
' dt.Columns.Add("UM")
|
||||
' dt.Columns.Add("SATClaveUM")
|
||||
' dt.Columns.Add("SATClaveProdServ")
|
||||
' dt.Columns.Add("Noidentificacion")
|
||||
' dt.Columns.Add("CuentaPredial")
|
||||
' dt.Columns.Add("Obs")
|
||||
' dt.Columns.Add("ImporteIVA", Type.GetType("System.Double"))
|
||||
' dt.Columns.Add("PorcentajeIVA", Type.GetType("System.Double"))
|
||||
|
||||
|
||||
' For Each Row As DataRow In dt.Rows
|
||||
' Row("TotalImporte") = Row("Total")
|
||||
' Row("Descuento") = 0
|
||||
' Row("UM") = Row("UnidadMedida")
|
||||
' Row("SATClaveUM") = Row("SATClaveUnidadMedida")
|
||||
' Row("SATClaveProdServ") = Row("SATClavePS")
|
||||
' Row("Noidentificacion") = Row("Codigo")
|
||||
' Row("CuentaPredial") = ""
|
||||
' Row("Obs") = Row("Observaciones")
|
||||
' Row("ImporteIVA") = 0
|
||||
' Row("PorcentajeIVA") = 0
|
||||
' Next
|
||||
|
||||
' 'DETALLES
|
||||
' ObjFactura.DtDetalle = dt
|
||||
|
||||
' 'SUBPROYECTO
|
||||
' ObjFactura.SetSubProyectoMatriz(Me)
|
||||
' ObjFactura.SetSubProyecto(Me)
|
||||
|
||||
' ObjFactura.Inv_CveMovimiento = Me.CveMovimiento
|
||||
|
||||
' ObjFactura.Timbre = PreParaTimbreTraslado(ObjFactura)
|
||||
|
||||
' Return ObjFactura
|
||||
'End Function
|
||||
'Private Function PreParaTimbreTraslado(Obj As Modelos.Factura) As CFDITimbre
|
||||
' Dim Timbre As New CFDITimbre
|
||||
' Timbre.Comprobante.TipoComprobante = "T"
|
||||
' Timbre.Comprobante.Folio = Obj.Folio.ToString
|
||||
' Timbre.Comprobante.Serie = Obj.Serie
|
||||
' Timbre.Comprobante.Fecha = Obj.Fecha
|
||||
' Timbre.Comprobante.FormadePago = Obj.FormaPagoSAT33
|
||||
' Timbre.Comprobante.CondicionesdePago = Obj.FormaPago33
|
||||
' Timbre.Comprobante.MetodoPago = Obj.ClaveMetodoPagoSAT
|
||||
' Timbre.Comprobante.Subtotal = Obj.SubTotal
|
||||
' Timbre.Comprobante.Descuentos = Obj.Descuento
|
||||
' Timbre.Comprobante.Moneda = Obj.MonedaSAT
|
||||
' Timbre.Comprobante.TipoCambio = If(Obj.CveMoneda = 1, "1", Obj.TipoCambio.ToString)
|
||||
' Timbre.Comprobante.Total = Obj.Total
|
||||
|
||||
' Timbre.Comprobante.LugarExpedicion = Obj.SubProyecto.CP
|
||||
' Timbre.Comprobante.Confirmacion = ""
|
||||
|
||||
' Timbre.Receptor.RFC = "XAXX010101000"
|
||||
' Timbre.Receptor.Nombre = UsuarioActual.Empresa.Empresa
|
||||
' Timbre.Receptor.UsoCFDI = "P01"
|
||||
|
||||
' Dim totSubTotal As Decimal = Obj.SubTotal
|
||||
' Dim totIVA As Decimal = Obj.IVA
|
||||
' Dim totRetIVA As Decimal = Obj.RetIVA
|
||||
' Dim totRetISR As Decimal = Obj.RetISR
|
||||
' Dim i As Integer = 1
|
||||
|
||||
' 'DETALLES
|
||||
' Dim tPS As String = ""
|
||||
|
||||
' For Each drr As DataRow In Obj.DtDetalle.Rows
|
||||
' If drr("PS").ToString.Length = 1 Then
|
||||
' tPS = drr("Obs").ToString
|
||||
' Else
|
||||
' If drr("PS").ToString.Length = 0 Then
|
||||
' tPS = ""
|
||||
' Else
|
||||
' tPS = String.Format("{0} {1}", drr("PS"), drr("Obs"))
|
||||
' End If
|
||||
' End If
|
||||
|
||||
' 'CONDICIONANTE, ESPECIAL
|
||||
' If UsuarioActual.CveEmpresa = 15 Then drr("UM") = "" 'LES COMENTAN QUE NO DEBE IR LA ETIQUETA DE LA UNIDAD EN EL PRODUCTO
|
||||
|
||||
' Dim concepto As New CFDIConceptos With {.Cantidad = drr("Cantidad").ToString.ToDecimal,
|
||||
' .Descripcion = tPS,
|
||||
' .ValorUnitario = drr("PU").ToString.ToDecimal,
|
||||
' .Importe = drr("TotalImporte").ToString.ToDecimal,
|
||||
' .Descuento = drr("Descuento").ToString.ToDecimal,
|
||||
' .Unidad = drr("UM").ToString,
|
||||
' .ClaveUnidad = drr("SATClaveUM").ToString,
|
||||
' .ClaveProdServ = drr("SATClaveProdServ").ToString,
|
||||
' .Noidentificacion = drr("Noidentificacion").ToString,
|
||||
' .CuentaPredial = drr("CuentaPredial").ToString}
|
||||
' 'VERIFICA SUMA SUBTOTALES
|
||||
' If i = Obj.DtDetalle.Rows.Count AndAlso totSubTotal <> concepto.Importe Then 'PROCESO DE AJUSTA DE DECIMALES
|
||||
' concepto.Importe = totSubTotalW
|
||||
' End If
|
||||
' totSubTotal = totSubTotal - concepto.Importe
|
||||
|
||||
' 'SIEMPRE ESTAMOS AGREGANDO EL IVA
|
||||
' 'concepto.Impuestos.Add(New CFDIConceptosImpuestos With {.TrasladooRetencion = "T", .Base = concepto.Importe - concepto.Descuento, .TasaOCuota = drr("PorcentajeIVA").ToString.ToDecimal, .Impuesto = "002", .Importe = drr("ImporteIVA").ToString.ToDecimal})
|
||||
|
||||
' Timbre.Conceptos.Add(concepto)
|
||||
' i += 1
|
||||
' Next
|
||||
' Return Timbre
|
||||
'End Function
|
||||
|
||||
#End Region
|
||||
|
||||
#Region " OP = 'Vta,Fact' - IMPRIME PDF VENTAS"
|
||||
@@ -1441,7 +1635,7 @@ Partial Class PopUpVerFactura
|
||||
End If
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso CveCompra > 0 Then
|
||||
If ObjInventarios.RecepcionAlmacenGet(CveCompra, -1, UsuarioActual.CveEmpresa) AndAlso ObjInventarios.DtResultados.Rows.Count > 0 Then
|
||||
If ObjInventarios.RecepcionAlmacenGet(CveCompra, -1, -1, UsuarioActual.CveEmpresa, -1) AndAlso ObjInventarios.DtResultados.Rows.Count > 0 Then
|
||||
Dim DtFaltante As DataTable = ObjInventarios.DtResultados.FiltraParametros("CantidadF > 0")
|
||||
If DtFaltante.Rows.Count > 0 Then
|
||||
Dim SbPendientes As New StringBuilder
|
||||
@@ -2920,9 +3114,11 @@ Partial Class PopUpVerFactura
|
||||
Case 24 'SALIDA POR RESGUARDO
|
||||
If DtMovimientos(0)("CveTipoAlmacen").ToString.ToEntero = 20 Or DtMovimientos(0)("CveTipoAlmacen").ToString.ToEntero = 19 Then
|
||||
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
|
||||
Dim params As New List(Of ReportParameter)
|
||||
Dim ArchivoRuta As New System.IO.FileInfo(String.Format("{0}Formatos/Entradas.rdlc", UsuarioActual.Empresa.Ruta))
|
||||
Dim Archivo As String = String.Format("{0}Formatos/EntradaSalidaUniforme.rdlc", UsuarioActual.Empresa.Ruta)
|
||||
Dim params As New List(Of ReportParameter)
|
||||
|
||||
Dim ArchivoRuta As New System.IO.FileInfo(String.Format("{0}Formatos/EntradaSalidaUniforme.rdlc", UsuarioActual.Empresa.Ruta))
|
||||
Dim Archivo As String = String.Format("{0}Formatos/EntradaSalidaUniforme.rdlc", UsuarioActual.Empresa.Ruta)
|
||||
|
||||
If Not ArchivoRuta.Exists Then
|
||||
Archivo = "Empresas/Grales/Formatos/EntradaSalidaUniforme.rdlc"
|
||||
End If
|
||||
@@ -4839,7 +5035,7 @@ Partial Class PopUpVerFactura
|
||||
Nombre = DatosClienteSeleccionado("Nombre").ToString
|
||||
Ciudad = DatosClienteSeleccionado("Ciudad").ToString
|
||||
Estado = DatosClienteSeleccionado("Estado").ToString
|
||||
Direccion = DatosClienteSeleccionado("Direccion").ToString
|
||||
Direccion = String.Format("{0} {1}{2} COL. {3}", DatosClienteSeleccionado("Direccion"), DatosClienteSeleccionado("NoInt"), DatosClienteSeleccionado("NoExt"), DatosClienteSeleccionado("Colonia"))
|
||||
Telefono = DatosClienteSeleccionado("Telefono").ToString
|
||||
End If
|
||||
|
||||
|
||||
@@ -316,7 +316,7 @@
|
||||
|
||||
<asp:GridView ID="GvCompara" runat="server" GridLines="None" AutoGenerateColumns="False" EmptyDataText="" CssClass="table table-striped table-hover table-advance Widthall" OnRowDataBound="GvCompara_RowDataBound">
|
||||
<Columns>
|
||||
<asp:BoundField DataField="Msg" HeaderText="Mensaje" />
|
||||
<asp:BoundField DataField="Msg" HeaderText="Mensaje" ItemStyle-Width="200px" />
|
||||
<asp:BoundField DataField="FueConciliado" HeaderText="Conciliado" />
|
||||
<asp:BoundField DataField="Fecha" HeaderText="Fecha" DataFormatString="{0:d}" />
|
||||
<asp:BoundField DataField="ImporteMN" HeaderText="Importe" DataFormatString="{0:N2}" />
|
||||
|
||||
@@ -104,7 +104,7 @@ public partial class Contabilidad_RepIVA : ClsPaginas
|
||||
LblMsgAcreditable.Text = "La información presenta importes en negativo, estos no se incluirán en el archivo generado para DIOT";
|
||||
}
|
||||
|
||||
GvA.Columns[11].Visible = DtIVAAcreditable.SUM("IvaExentoImpo") > 0; // sino tiene valor la columna de importación de oculta
|
||||
GvA.Columns[10].Visible = DtIVAAcreditable.SUM("IvaExentoImpo") > 0; // sino tiene valor la columna de importación de oculta
|
||||
|
||||
|
||||
if (ObjCont.GetRepIVAAcumulado(txtFechaI.Text.ToDate(), txtFechaF.Text.ToDate(), Conciliado, 3, DdlCuenta.SelectedValue.ToEntero(), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa))
|
||||
|
||||
@@ -133,15 +133,7 @@ Partial Class Contabilidad2_RepBalanzaComprobacion
|
||||
Protected Sub GvIngresos_RowDataBound(sender As Object, e As GridViewRowEventArgs)
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
'If e.Row.DBCampo("Id").ToEntero = IdCuenta Then
|
||||
' e.Row.ControlStyle.Font.Bold = True
|
||||
' 'e.Row.ControlStyle.Font.Size = 9
|
||||
' 'e.Row.ControlStyle.Height = 30
|
||||
'Else
|
||||
' e.Row.ControlStyle.Font.Bold = False
|
||||
'End If
|
||||
|
||||
If e.Row.DBCampo("CtaMayor") = "1" Or e.Row.DBCampo("CtaMayor") = "1" Then
|
||||
If e.Row.DBCampo("CtaMayor") = "1" OrElse e.Row.DBCampo("CtaMayor") = "3" OrElse e.Row.DBCampo("CtaMayor") = "4" Then
|
||||
e.Row.ControlStyle.Font.Bold = True
|
||||
End If
|
||||
|
||||
@@ -167,8 +159,7 @@ Partial Class Contabilidad2_RepBalanzaComprobacion
|
||||
|
||||
'Total general
|
||||
If e.Row.DBCampo("Id") = "" Then
|
||||
'e.Row.Cells(2).HorizontalAlign = HorizontalAlign.NotSet
|
||||
'Dim TotSaldoID, TotSaldoIA As Double
|
||||
|
||||
e.Row.ControlStyle.Font.Bold = True
|
||||
e.Row.ControlStyle.Font.Size = 9
|
||||
e.Row.ControlStyle.Height = 30
|
||||
@@ -192,33 +183,6 @@ Partial Class Contabilidad2_RepBalanzaComprobacion
|
||||
|
||||
ImprimirReporte()
|
||||
|
||||
'Using sw As New StringWriter()
|
||||
' Using hw As New HtmlTextWriter(sw)
|
||||
|
||||
' Dim style As StringBuilder = New StringBuilder()
|
||||
' style.Append("<style> ")
|
||||
' style.Append(File.ReadAllText(ModExtensiones.DirectorioBaseEmpresas & "Styles\EstilosExcel.css"))
|
||||
' style.Append(" </style> ")
|
||||
' 'To Export all pages
|
||||
' 'Gv.AllowPaging = False
|
||||
' 'Gv.DataBind()
|
||||
' Tbl.RenderControl(hw)
|
||||
' Dim sr As New StringReader(sw.ToString())
|
||||
' Dim pdfDoc As New Document(PageSize.A2, 10.0F, 10.0F, 10.0F, 0.0F)
|
||||
' Dim htmlparser As New HTMLWorker(pdfDoc)
|
||||
' PdfWriter.GetInstance(pdfDoc, Response.OutputStream)
|
||||
' pdfDoc.Open()
|
||||
' htmlparser.Parse(sr)
|
||||
' pdfDoc.Close()
|
||||
|
||||
' Response.ContentType = "application/pdf"
|
||||
' Response.AddHeader("content-disposition", "attachment;filename=BalanzaComprobacion.pdf")
|
||||
' Response.Cache.SetCacheability(HttpCacheability.NoCache)
|
||||
' Response.Write(style.ToString)
|
||||
' Response.Write(pdfDoc)
|
||||
' Response.[End]()
|
||||
' End Using
|
||||
'End Using
|
||||
|
||||
End Sub
|
||||
'No quitar porque no funciona el exporta PDF
|
||||
@@ -228,7 +192,7 @@ Partial Class Contabilidad2_RepBalanzaComprobacion
|
||||
|
||||
|
||||
Protected Sub ImgExcel_Click(sender As Object, e As EventArgs) Handles ImgExcel.Click
|
||||
'GvDatos.ExportToExcel("BalanzaComprobacion")
|
||||
|
||||
ImprimirReporte("Excel")
|
||||
End Sub
|
||||
|
||||
|
||||
@@ -4580,7 +4580,7 @@ Partial Class Contratos_ContratoObra
|
||||
CveUnidadMedida = GlobalDTUnidadesMedida(CveEmpresa:=UsuarioActual.CveEmpresa).Rows(0)("CveUnidadMedida").ToString.ToEntero
|
||||
End If
|
||||
|
||||
If ObjPS.AddPS(CveClasificacion, 1, CveUnidadMedida, DrowPS("Codigo").ToString.Trim, "", "", DrowPS("Producto").ToString, DrowPS("PU").ToString.ToDouble, 0, 0, False, 0, False, If(TipoCargaPresupuesto = EnumTipoCargaPresupuesto.Ventas, True, False),
|
||||
If ObjPS.AddPS(CveClasificacion, 1, CveUnidadMedida, DrowPS("Codigo").ToString.Trim, "", "", DrowPS("Producto").ToString, DrowPS("PU").ToString.ToDouble, -1, 0, False, 0, False, If(TipoCargaPresupuesto = EnumTipoCargaPresupuesto.Ventas, True, False),
|
||||
UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 1, 1, CveTipoPS:=2, CveSATPS:=-1, CveMarca:=-1, CveTamaño:=-1, CveMedida:=-1, CveRinTamaño:=-1, CveModelo:=-1, Litraje:=-1, IEPSPorcentaje:=-1, CveClasificacion2:=-1, CveClasificacionDetalle:=-1) > 0 Then
|
||||
CvePS = ObjPS.CvePS
|
||||
Else
|
||||
@@ -4656,17 +4656,12 @@ Partial Class Contratos_ContratoObra
|
||||
|
||||
End If
|
||||
|
||||
|
||||
|
||||
If Not DTCargaPresupuestoManoObra Is Nothing And Not ErrorProceso Then
|
||||
|
||||
|
||||
For Each DrowPS As DataRow In DTCargaPresupuestoManoObra.Rows
|
||||
|
||||
Dim CveActividad As Integer = 0
|
||||
Dim Actividad As String
|
||||
|
||||
|
||||
If DrowPS("Actividad").ToString.Trim.Length > 0 Then
|
||||
GlobalDTRHActividades(UsuarioActual.CveEmpresa) = Nothing
|
||||
CveActividad = GlobalDTRHActividades(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveActividad", $" Actividad = '{ DrowPS("Actividad").ToString.Trim }'").ToEntero
|
||||
@@ -4691,14 +4686,11 @@ Partial Class Contratos_ContratoObra
|
||||
End If
|
||||
|
||||
ObjRH.Dispose()
|
||||
|
||||
End If
|
||||
|
||||
|
||||
If CveActividad > 0 And DrowPS("Cantidad").ToString.ToDouble > 0 And Not ErrorProceso Then
|
||||
|
||||
Actividad = GlobalDTRHActividades(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Actividad", $" CveActividad = {CveActividad}")
|
||||
|
||||
Dim Row As DataRow = DTPS.NewRow()
|
||||
Row("Cantidad") = DrowPS("Cantidad").ToString.ToDouble
|
||||
Row("CantidadContratada") = DrowPS("Cantidad").ToString.ToDouble
|
||||
@@ -4717,7 +4709,6 @@ Partial Class Contratos_ContratoObra
|
||||
Row("CveActividad") = CveActividad
|
||||
Row("CveSubTipoActivoFijo") = -1
|
||||
Row("Dias") = DrowPS("Dias").ToString.ToEntero
|
||||
|
||||
Row("NoIdentificacion") = ""
|
||||
Row("OCInterna") = ""
|
||||
Row("LimitarCantidad") = 0
|
||||
@@ -4905,7 +4896,6 @@ Partial Class Contratos_ContratoObra
|
||||
|
||||
Dim NrowTmpDT As DataRow = TmpDT.NewRow
|
||||
|
||||
|
||||
NrowTmpDT("Cantidad") = Row("Cantidad")
|
||||
NrowTmpDT("CantidadContratada") = Row("CantidadContratada")
|
||||
NrowTmpDT("CveUM") = Row("CveUM")
|
||||
@@ -4933,7 +4923,6 @@ Partial Class Contratos_ContratoObra
|
||||
NrowTmpDT("SubTipoActivoFijo") = Row("SubTipoActivoFijo")
|
||||
NrowTmpDT("Dias") = Row("Dias")
|
||||
|
||||
|
||||
NrowTmpDT("CveContratoDetalle") = ObjContratos.DtResultados.Rows(0)("CveContratoDetalle")
|
||||
|
||||
TmpDT.Rows.Add(NrowTmpDT)
|
||||
@@ -4946,7 +4935,6 @@ Partial Class Contratos_ContratoObra
|
||||
End If
|
||||
Next
|
||||
|
||||
|
||||
If ErrorProceso Then
|
||||
ObjContratos.RollBack()
|
||||
Alert("Se presento un error al cargar el presupuesto.", TipoMensaje.MsgError)
|
||||
|
||||
@@ -59,7 +59,7 @@ Partial Class RepContratosObraAvancesPartida
|
||||
CveContrato = If(Request("CveContrato") IsNot Nothing AndAlso Request("CveContrato").ToString.ToEntero > 0, Request("CveContrato").ToString.ToEntero, -1)
|
||||
NumeroContrato = If(Request("NumeroContrato") IsNot Nothing AndAlso Request("NumeroContrato").ToString.Length > 0, $"{Request("NumeroContrato").ToString}", "")
|
||||
|
||||
LblEstimacion.Text = If(Request("NumeroEstimacion") IsNot Nothing AndAlso Request("NumeroEstimacion").ToString.Length > 0, $"Contgrato { NumeroContrato } Estimacion {Request("NumeroEstimacion").ToString}", "")
|
||||
LblEstimacion.Text = If(Request("NumeroEstimacion") IsNot Nothing AndAlso Request("NumeroEstimacion").ToString.Length > 0, $"Contrato { NumeroContrato } Estimación {Request("NumeroEstimacion").ToString}", "")
|
||||
|
||||
|
||||
If CveEstimacion > 0 Then
|
||||
|
||||
@@ -944,6 +944,7 @@
|
||||
<FontFamily>Myriad Pro</FontFamily>
|
||||
<FontSize>9pt</FontSize>
|
||||
<FontWeight>Normal</FontWeight>
|
||||
<Format>n2</Format>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
|
||||
@@ -1963,6 +1963,7 @@
|
||||
<FontFamily>Myriad Pro</FontFamily>
|
||||
<FontSize>7.5pt</FontSize>
|
||||
<FontWeight>Normal</FontWeight>
|
||||
<Format>n2</Format>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
|
||||
@@ -771,6 +771,7 @@
|
||||
<FontFamily>Myriad Pro</FontFamily>
|
||||
<FontSize>9.64pt</FontSize>
|
||||
<FontWeight>Normal</FontWeight>
|
||||
<Format>n2</Format>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
|
||||
Binary file not shown.
@@ -104,7 +104,7 @@
|
||||
<ul class="list-inline" style="font-size: 12px;">
|
||||
<li>Vehículo:
|
||||
|
||||
<asp:DropDownList ID="DdlDispositivoFiltro" runat="server" Width="200px" DataTextField="Display" DataValueField="CveDispositivo" CssClass="form-control input-sm select2me">
|
||||
<asp:DropDownList ID="DdlDispositivoFiltro" runat="server" Width="200px" DataTextField="DisplayCliente" DataValueField="CveDispositivo" CssClass="form-control input-sm select2me">
|
||||
</asp:DropDownList>
|
||||
</li>
|
||||
<li>Estatus:
|
||||
@@ -161,13 +161,14 @@
|
||||
<Columns>
|
||||
<asp:BoundField DataField="Trayecto" HeaderText="Nombre del Trayecto" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="20%" />
|
||||
<asp:BoundField DataField="Dispositivo" HeaderText="Vehículo" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="15%" />
|
||||
<asp:BoundField DataField="Fecha" HeaderText="Fecha Ingreso" DataFormatString="{0:dd/MM/yyyy}" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="15%" />
|
||||
<asp:BoundField DataField="Fecha" HeaderText="Hora Ingreso" DataFormatString="{0:HH:mm:ss}" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="15%" />
|
||||
<asp:BoundField DataField="Fecha" HeaderText="Fecha Ingreso" DataFormatString="{0:dd/MM/yyyy}" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="10%" />
|
||||
<asp:BoundField DataField="Fecha" HeaderText="Hora Ingreso" DataFormatString="{0:HH:mm:ss}" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="10%" />
|
||||
<asp:TemplateField HeaderText="Estatus" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="15%">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LblEstatus" Text='<%# Eval("Estatus") %>' runat="server"></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField DataField="UltimoEvento" HeaderText="Evento" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="15%" />
|
||||
<asp:TemplateField HeaderText="Notificar" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="5%">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LnkEnviar" runat="server" Visible="false" OnClick="LnkEnviar_Click" CssClass="Texto" Text="<i class='fa fa-envelope fa-2'></i>" data-toggle="confirmation" data-popout="true" data-original-title="Desea enviar el estado del trayecto?" data-btn-ok-label="si" />
|
||||
@@ -209,7 +210,7 @@
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlDispositivo" DataTextField="Display" DataValueField="CveDispositivo" CssClass="form-control select2me" runat="server"></asp:DropDownList>
|
||||
<asp:DropDownList ID="DdlDispositivo" DataTextField="DisplayCliente" DataValueField="CveDispositivo" CssClass="form-control select2me" runat="server" Width="100%"></asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" InitialValue="-1" CssClass="help-block errorimput" ControlToValidate="DdlDispositivo" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Dispositivo''</b> es necesario, por favor ingréselo." ValidationGroup="GrpTrayecto"></asp:RequiredFieldValidator>
|
||||
<label for="<%= DdlDispositivo.ClientID.ToString()%>" style="width: 50%">Vehículo:</label>
|
||||
</div>
|
||||
@@ -318,7 +319,7 @@
|
||||
<label for="<%=DdlTrayecto.ClientID.ToString()%>">Trayecto:</label>
|
||||
</div>
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlDispositivoNuevo" DataTextField="Display" DataValueField="CveDispositivo" CssClass="form-control select2me" runat="server"></asp:DropDownList>
|
||||
<asp:DropDownList ID="DdlDispositivoNuevo" DataTextField="DisplayCliente" DataValueField="CveDispositivo" CssClass="form-control select2me" runat="server" Width="100%"></asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" InitialValue="-1" CssClass="help-block errorimput" ControlToValidate="DdlDispositivoNuevo" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Dispositivo''</b> es necesario, por favor ingréselo." ValidationGroup="GrpNuevo"></asp:RequiredFieldValidator>
|
||||
<label for="<%= DdlDispositivoNuevo.ClientID.ToString()%>" style="width: 50%">Vehículo:</label>
|
||||
</div>
|
||||
|
||||
@@ -56,16 +56,24 @@ Partial Class GPS_Trayectos
|
||||
CargaTrayectos()
|
||||
End Sub
|
||||
Public Sub CargaDispositivos()
|
||||
DdlDispositivo.DataSource = GlobalDTDispositivosUsuarios(UsuarioActual.CveCliente, UsuarioActual.CveUsuario)
|
||||
Dim DtDispositivos As DataTable = Nothing
|
||||
|
||||
Using ObjGPS As New ClsGPS
|
||||
If ObjGPS.DispositivosUsuariosGet(-1, 1, UsuarioActual.CveCliente, CveUsuario:=UsuarioActual.CveUsuario, ConcatenarDispuestos:=True) Then
|
||||
DtDispositivos = ObjGPS.DtResultados.Copy
|
||||
End If
|
||||
End Using
|
||||
|
||||
DdlDispositivo.DataSource = DtDispositivos 'GlobalDTDispositivosUsuarios(UsuarioActual.CveCliente, UsuarioActual.CveUsuario)
|
||||
DdlDispositivo.DataBind()
|
||||
DdlDispositivo.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
|
||||
DdlDispositivoNuevo.DataSource = GlobalDTDispositivosUsuarios(UsuarioActual.CveCliente, UsuarioActual.CveUsuario)
|
||||
DdlDispositivoNuevo.DataSource = DtDispositivos 'GlobalDTDispositivosUsuarios(UsuarioActual.CveCliente, UsuarioActual.CveUsuario)
|
||||
DdlDispositivoNuevo.DataBind()
|
||||
DdlDispositivoNuevo.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
|
||||
|
||||
DdlDispositivoFiltro.DataSource = GlobalDTDispositivosUsuarios(UsuarioActual.CveCliente, UsuarioActual.CveUsuario)
|
||||
DdlDispositivoFiltro.DataSource = DtDispositivos 'GlobalDTDispositivosUsuarios(UsuarioActual.CveCliente, UsuarioActual.CveUsuario)
|
||||
DdlDispositivoFiltro.DataBind()
|
||||
DdlDispositivoFiltro.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
|
||||
|
||||
@@ -68,12 +68,14 @@ Partial Class General_CatMarcas
|
||||
End If
|
||||
ObjPS.Dispose()
|
||||
CargaDatos()
|
||||
End Sub
|
||||
|
||||
Protected Sub LnkAgregarMarca_Click(sender As Object, e As EventArgs)
|
||||
LimpiaModal()
|
||||
Modalidad = "A"
|
||||
BtnGuardar.Text = "Agregar"
|
||||
DivEstatus.Visible = False
|
||||
UpModal.Update()
|
||||
RegistraScript("$('#DModalMarca').modal()")
|
||||
End Sub
|
||||
Protected Sub BtnGuardar_Click(sender As Object, e As EventArgs)
|
||||
|
||||
@@ -104,6 +104,10 @@
|
||||
<asp:LinkButton runat="server" ID="LnkCambioInventarioFisico" Visible="false" CssClass="" data-toggle="tooltip" data-placement="left" OnClick="LnkCambioInventarioFisico_Click"
|
||||
Text="<i class='fa fa-truck'></i> Inventario Fisico"></asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton runat="server" ID="LnkGenerarPDF" Visible="false" CssClass="" data-toggle="tooltip" data-placement="left" OnClick="LnkGenerarPDF_Click"
|
||||
title="Generar PDF Traslado" Text="<i class='fa fa-server'></i> Generar PDF Traslado"></asp:LinkButton>
|
||||
</li>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
|
||||
@@ -780,6 +780,11 @@ Partial Class Inventarios_EntradasSalidas
|
||||
HplDescargaPdf.NavigateUrl = String.Format("/Compras/PopUpVerFactura.aspx?P={0}", Encripta(String.Format("OP=DesPdfTra&CVEMOVIMIENTO={0}&EXT={1}&FOLIO={2}&TIPODOCTO={3}", CveMovimiento, "PDF", $"Tra-{Folio}", "Tra")))
|
||||
HplCartaPorte.Visible = True
|
||||
HplCartaPorte.NavigateUrl = String.Format("/Compras/PopUpVerFactura.aspx?P={0}", Encripta(String.Format("OP=CARPO&CVEMOV={0}", CveMovimiento)))
|
||||
|
||||
If UsuarioActual.CveRol = 1 Then
|
||||
LnkGenerarPDF.Visible = True
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
|
||||
@@ -3856,7 +3861,7 @@ Partial Class Inventarios_EntradasSalidas
|
||||
Dim Lote As String = If(TxtLoteSalida.Text = "", "", TxtLoteSalida.Text)
|
||||
Dim FechaCaducidad As Date = If(TxtCaducidadSalida.Text = "", MinFecha.ToShortDateString, TxtCaducidadSalida.Text).ToDate
|
||||
|
||||
If ObjInventario.GetExistenciasPS(DdlPSSalida.SelectedValue.ToEntero, CveUM, UsuarioActual.CveEmpresa, DdlAlmacenInventarioFisico.SelectedValue.ToEntero, PendientePorSurtir:=1, Lote:=lote, FechaCaducidad:=FechaCaducidad) >= TxtCantidadSalidaInv.Text.ToDouble Then
|
||||
If ObjInventario.GetExistenciasPS(DdlPSSalida.SelectedValue.ToEntero, CveUM, UsuarioActual.CveEmpresa, DdlAlmacenInventarioFisico.SelectedValue.ToEntero, PendientePorSurtir:=1, Lote:=Lote, FechaCaducidad:=FechaCaducidad) >= TxtCantidadSalidaInv.Text.ToDouble Then
|
||||
If Not DdlPSSalida.SelectedValue.ToEntero > 0 Then
|
||||
RegistraScript("playsonidito('142608__autistic-lucario__error.wav')")
|
||||
Alert("Es necesario especificar el producto.", TipoMensaje.MsgAdvertencia)
|
||||
@@ -5092,4 +5097,198 @@ Partial Class Inventarios_EntradasSalidas
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Protected Sub LnkGenerarPDF_Click(sender As Object, e As EventArgs)
|
||||
GeneraPDFFactura()
|
||||
End Sub
|
||||
Private Sub GeneraPDFFactura()
|
||||
Try
|
||||
Dim objFactura = CreaObjetosVenta()
|
||||
PdfFactura(objFactura)
|
||||
objFactura.Dispose()
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al generar el PDF", ex)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Private Function CreaObjetosVenta() As Modelos.Factura
|
||||
Dim ObjFactura = New Modelos.Factura
|
||||
ObjFactura.Version = "3.3"
|
||||
ObjFactura.CveUsuario = UsuarioActual.CveUsuario
|
||||
ObjFactura.CveEmpresa = UsuarioActual.CveEmpresa
|
||||
ObjFactura.TipoCambio = 0
|
||||
ObjFactura.ConvertirPesos = False
|
||||
ObjFactura.TipoCambio = 0
|
||||
ObjFactura.CveMoneda = 1
|
||||
ObjFactura.Moneda = GlobalDTMonedas.FiltroPrimeroValor("Moneda", $"CveMoneda = {ObjFactura.CveMoneda} ")
|
||||
ObjFactura.MonedaSAT = GlobalDTMonedas.FiltroPrimeroValor("AbreviaturaSAT", "CveMoneda = 1")
|
||||
ObjFactura.MonedaAbreviatura = GlobalDTMonedas.FiltroPrimeroValor("Abreviatura", $"CveMoneda = {ObjFactura.CveMoneda} ")
|
||||
ObjFactura.TipoDocto = "Tra"
|
||||
ObjFactura.RefDocto = ""
|
||||
ObjFactura.Folio = Folio.ToEntero
|
||||
ObjFactura.Serie = "Tra"
|
||||
ObjFactura.CveMesa = -1
|
||||
ObjFactura.Fecha = Now
|
||||
ObjFactura.CvePrePoliza = -1
|
||||
ObjFactura.FechaPago = Now
|
||||
ObjFactura.MotivoDescuento = ""
|
||||
ObjFactura.Observaciones = ""
|
||||
ObjFactura.FechaEjecucion = Now
|
||||
ObjFactura.UsuarioCreo = UsuarioActual.Usuario
|
||||
ObjFactura.CveCondicionEntrega = -1
|
||||
ObjFactura.CondicionEntrega = ""
|
||||
ObjFactura.NumeroCuenta = ""
|
||||
ObjFactura.CondicionesPago = 0
|
||||
ObjFactura.FormaPago = 0
|
||||
ObjFactura.PedidoContrato = ""
|
||||
ObjFactura.OrdenCompra = ""
|
||||
ObjFactura.NumeroContrato = ""
|
||||
ObjFactura.NumeroDescripcionContrato = ""
|
||||
ObjFactura.DescripcionContrato = ""
|
||||
ObjFactura.CveCorte = -1
|
||||
ObjFactura.TipoDocumento = "Traspaso"
|
||||
ObjFactura.Alfa1 = ""
|
||||
ObjFactura.Alfa2 = ""
|
||||
ObjFactura.Alfa3 = ""
|
||||
ObjFactura.Descuento = 0
|
||||
ObjFactura.Amortizacion = 0
|
||||
ObjFactura.CveContrato = 0
|
||||
ObjFactura.CveVendedor = 0
|
||||
ObjFactura.FechaVencimiento = Now
|
||||
ObjFactura.TipoEstatus = 0
|
||||
ObjFactura.Det_OrdenCompra = ""
|
||||
ObjFactura.Inv_CveEstatusEntrega = 0
|
||||
ObjFactura.FormaPago33 = ""
|
||||
ObjFactura.MetodoPago33 = ""
|
||||
ObjFactura.UsoCFDI = ""
|
||||
ObjFactura.CveClienteSucursal = 0
|
||||
Dim CveSubProyecto As Integer = -1
|
||||
If GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltraParametros($"CveAlmacen = {DdlAlmacen.SelectedValue}").Rows.Count > 0 Then
|
||||
CveSubProyecto = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltraParametros($"CveAlmacen = {DdlAlmacen.SelectedValue}").Rows(0)("CveSubProyecto").ToString.ToEntero
|
||||
End If
|
||||
ObjFactura.CveSubProyecto = CveSubProyecto
|
||||
ObjFactura.CveSubProyectoCobranza = CveSubProyecto
|
||||
ObjFactura.CveSubProyectoEjecucion = CveSubProyecto
|
||||
|
||||
ObjFactura.SubTotal = 0
|
||||
ObjFactura.Descuento = 0
|
||||
ObjFactura.Amortizacion = 0
|
||||
ObjFactura.IVA = 0
|
||||
ObjFactura.RetIVA = 0
|
||||
ObjFactura.RetISR = 0
|
||||
ObjFactura.IEPS = 0
|
||||
ObjFactura.Total = 0
|
||||
ObjFactura.RFCReceptor = "XAXX010101000"
|
||||
|
||||
Dim dt As DataTable = DtMovimientos.Copy
|
||||
|
||||
dt.Columns.Add("TotalImporte", Type.GetType("System.Double"))
|
||||
dt.Columns.Add("Descuento", Type.GetType("System.Double"))
|
||||
dt.Columns.Add("UM")
|
||||
dt.Columns.Add("SATClaveUM")
|
||||
dt.Columns.Add("SATClaveProdServ")
|
||||
dt.Columns.Add("Noidentificacion")
|
||||
dt.Columns.Add("CuentaPredial")
|
||||
dt.Columns.Add("Obs")
|
||||
dt.Columns.Add("ImporteIVA", Type.GetType("System.Double"))
|
||||
dt.Columns.Add("PorcentajeIVA", Type.GetType("System.Double"))
|
||||
|
||||
|
||||
For Each Row As DataRow In dt.Rows
|
||||
Row("TotalImporte") = Row("Total")
|
||||
Row("Descuento") = 0
|
||||
Row("UM") = Row("UnidadMedida")
|
||||
Row("SATClaveUM") = Row("SATClaveUnidadMedida")
|
||||
Row("SATClaveProdServ") = Row("SATClavePS")
|
||||
Row("Noidentificacion") = Row("Codigo")
|
||||
Row("CuentaPredial") = ""
|
||||
Row("Obs") = Row("Observaciones")
|
||||
Row("ImporteIVA") = 0
|
||||
Row("PorcentajeIVA") = 0
|
||||
Next
|
||||
|
||||
'DETALLES
|
||||
ObjFactura.DtDetalle = dt
|
||||
|
||||
'SUBPROYECTO
|
||||
ObjFactura.SetSubProyectoMatriz(Me)
|
||||
ObjFactura.SetSubProyecto(Me)
|
||||
|
||||
ObjFactura.Inv_CveMovimiento = Me.CveMovimiento
|
||||
|
||||
ObjFactura.Timbre = PreParaTimbre(ObjFactura)
|
||||
|
||||
Return ObjFactura
|
||||
End Function
|
||||
Private Function PreParaTimbre(Obj As Modelos.Factura) As CFDITimbre
|
||||
Dim Timbre As New CFDITimbre
|
||||
Timbre.Comprobante.TipoComprobante = "T"
|
||||
Timbre.Comprobante.Folio = Obj.Folio.ToString
|
||||
Timbre.Comprobante.Serie = Obj.Serie
|
||||
Timbre.Comprobante.Fecha = Obj.Fecha
|
||||
Timbre.Comprobante.FormadePago = Obj.FormaPagoSAT33
|
||||
Timbre.Comprobante.CondicionesdePago = Obj.FormaPago33
|
||||
Timbre.Comprobante.MetodoPago = Obj.ClaveMetodoPagoSAT
|
||||
Timbre.Comprobante.Subtotal = Obj.SubTotal
|
||||
Timbre.Comprobante.Descuentos = Obj.Descuento
|
||||
Timbre.Comprobante.Moneda = Obj.MonedaSAT
|
||||
Timbre.Comprobante.TipoCambio = If(Obj.CveMoneda = 1, "1", Obj.TipoCambio.ToString)
|
||||
Timbre.Comprobante.Total = Obj.Total
|
||||
|
||||
Timbre.Comprobante.LugarExpedicion = Obj.SubProyecto.CP
|
||||
Timbre.Comprobante.Confirmacion = ""
|
||||
|
||||
Timbre.Receptor.RFC = "XAXX010101000"
|
||||
Timbre.Receptor.Nombre = UsuarioActual.Empresa.Empresa
|
||||
Timbre.Receptor.UsoCFDI = "P01"
|
||||
|
||||
Dim totSubTotal As Decimal = Obj.SubTotal
|
||||
Dim totIVA As Decimal = Obj.IVA
|
||||
Dim totRetIVA As Decimal = Obj.RetIVA
|
||||
Dim totRetISR As Decimal = Obj.RetISR
|
||||
Dim i As Integer = 1
|
||||
|
||||
'DETALLES
|
||||
Dim tPS As String = ""
|
||||
|
||||
For Each drr As DataRow In Obj.DtDetalle.Rows
|
||||
If drr("PS").ToString.Length = 1 Then
|
||||
tPS = drr("Obs").ToString
|
||||
Else
|
||||
If drr("PS").ToString.Length = 0 Then
|
||||
tPS = ""
|
||||
Else
|
||||
tPS = String.Format("{0} {1}", drr("PS"), drr("Obs"))
|
||||
End If
|
||||
End If
|
||||
|
||||
'CONDICIONANTE, ESPECIAL
|
||||
If UsuarioActual.CveEmpresa = 15 Then drr("UM") = "" 'LES COMENTAN QUE NO DEBE IR LA ETIQUETA DE LA UNIDAD EN EL PRODUCTO
|
||||
|
||||
Dim concepto As New CFDIConceptos With {.Cantidad = drr("Cantidad").ToString.ToDecimal,
|
||||
.Descripcion = tPS,
|
||||
.ValorUnitario = drr("PU").ToString.ToDecimal,
|
||||
.Importe = drr("TotalImporte").ToString.ToDecimal,
|
||||
.Descuento = drr("Descuento").ToString.ToDecimal,
|
||||
.Unidad = drr("UM").ToString,
|
||||
.ClaveUnidad = drr("SATClaveUM").ToString,
|
||||
.ClaveProdServ = drr("SATClaveProdServ").ToString,
|
||||
.Noidentificacion = drr("Noidentificacion").ToString,
|
||||
.CuentaPredial = drr("CuentaPredial").ToString}
|
||||
'VERIFICA SUMA SUBTOTALES
|
||||
If i = Obj.DtDetalle.Rows.Count AndAlso totSubTotal <> concepto.Importe Then 'PROCESO DE AJUSTA DE DECIMALES
|
||||
concepto.Importe = totSubTotal
|
||||
End If
|
||||
totSubTotal = totSubTotal - concepto.Importe
|
||||
|
||||
'SIEMPRE ESTAMOS AGREGANDO EL IVA
|
||||
'concepto.Impuestos.Add(New CFDIConceptosImpuestos With {.TrasladooRetencion = "T", .Base = concepto.Importe - concepto.Descuento, .TasaOCuota = drr("PorcentajeIVA").ToString.ToDecimal, .Impuesto = "002", .Importe = drr("ImporteIVA").ToString.ToDecimal})
|
||||
|
||||
Timbre.Conceptos.Add(concepto)
|
||||
i += 1
|
||||
Next
|
||||
Return Timbre
|
||||
End Function
|
||||
|
||||
End Class
|
||||
|
||||
@@ -220,6 +220,8 @@ Partial Class Inventarios_Kardex
|
||||
If AplicaSerie Then GvM.Columns(9).Visible = True
|
||||
If AplicaLote Then GvM.Columns(10).Visible = True
|
||||
If AplicaCaducidad Then GvM.Columns(11).Visible = True
|
||||
If Not String.IsNullOrWhiteSpace(UsuarioActual.Empresa.Funcionalidad(147)) Then GvM.Columns(11).HeaderText = UsuarioActual.Empresa.Funcionalidad(147)
|
||||
|
||||
|
||||
Dim Drp As datarow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CveProducto).FiltroPrimero("")
|
||||
Dim AuxAplicaSerie As Boolean
|
||||
@@ -232,6 +234,7 @@ Partial Class Inventarios_Kardex
|
||||
LnkSeries.Visible = AuxAplicaSerie
|
||||
LnkCaducidad.Visible = AuxAplicaCad
|
||||
'CARGA INDICADORES
|
||||
|
||||
If UsuarioActual.TienePermisoProceso(201) Then
|
||||
DivIndicadores.Visible = True
|
||||
|
||||
@@ -363,7 +366,9 @@ Partial Class Inventarios_Kardex
|
||||
GvProductoCaducidad.DataSource = ObjInventarios.DtResultados
|
||||
GvProductoCaducidad.columns(2).visible = ObjInventarios.DtResultados.max("Serie") <> ""
|
||||
GvProductoCaducidad.columns(3).visible = ObjInventarios.DtResultados.max("Lote") <> ""
|
||||
GvProductoCaducidad.columns(4).visible = ObjInventarios.DtResultados.max("FechaCaducidad").todate > minfecha
|
||||
GvProductoCaducidad.Columns(4).Visible = ObjInventarios.DtResultados.MAX("FechaCaducidad").ToDate > MinFecha
|
||||
If Not String.IsNullOrWhiteSpace(UsuarioActual.Empresa.Funcionalidad(147)) Then GvProductoCaducidad.Columns(4).HeaderText = UsuarioActual.Empresa.Funcionalidad(147)
|
||||
|
||||
End If
|
||||
ObjInventarios.Dispose()
|
||||
GvProductoCaducidad.DataBind()
|
||||
|
||||
@@ -98,9 +98,15 @@ Partial Class Inventarios_Default
|
||||
Private Sub CargaDatos(CvePS As Integer, Tipo As Integer)
|
||||
|
||||
If ValidarFiltrosSeleccionados() OrElse CvePS > 0 Then
|
||||
Dim RestringirAlmacenes As Integer = -1
|
||||
If UsuarioActual.CveEmpresa = 119 Then
|
||||
RestringirAlmacenes = 1 'restringue los almacenes:Consignación,Productos Financieros Asignados,,roductos Financieros,Consumo Interno,Activo Fijo,Merma,Consignación de Contrato,Devolucion proveedor,
|
||||
End If
|
||||
|
||||
Dim ObjInventarios As New ClsInventarios()
|
||||
If ObjInventarios.GetExistenciasProducto(CvePS, -1, UsuarioActual.CveEmpresa, -1, FechaMovto:=DateTime.Today.AddDays(1).ToString("yyyy/MM/dd HH:mm"),
|
||||
ExcluyeApartados:=-1, ExcluyeAdelantado:=1, CveSubProyecto:=DdlSubProyecto.SelectedValue.ToEntero, ExcluyeTransitorios:=1, TopSelect:=100) Then
|
||||
ExcluyeApartados:=-1, ExcluyeAdelantado:=1, CveSubProyecto:=DdlSubProyecto.SelectedValue.ToEntero,
|
||||
ExcluyeTransitorios:=1, RestringirAlmacenes:=RestringirAlmacenes, TopSelect:=100) Then
|
||||
Dim dr As Data.DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePS).FiltroPrimero("")
|
||||
|
||||
If dr IsNot Nothing Then
|
||||
|
||||
@@ -991,7 +991,7 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
|
||||
Dim CargaSoloUsados As Boolean = False
|
||||
|
||||
If ObjInventario.RecepcionAlmacenGet(pCveCompra, BuscaEntregaDirecta, UsuarioActual.CveEmpresa) AndAlso ObjInventario.DtResultados.Rows.Count > 0 Then
|
||||
If ObjInventario.RecepcionAlmacenGet(pCveCompra, BuscaEntregaDirecta, -1, UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario) AndAlso ObjInventario.DtResultados.Rows.Count > 0 Then
|
||||
Dim DtRecepcion As DataTable = ObjInventario.DtResultados.Copy()
|
||||
Dim NumUsados = ObjInventario.DtResultados.COUNT("EsUsado", "EsUsado = True").ToEntero()
|
||||
Dim NumProductos = ObjInventario.DtResultados.COUNT("EsUsado", "EsUsado = False").ToEntero()
|
||||
@@ -1010,7 +1010,11 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
ValidarRecepcionUsados = True
|
||||
DtRecepcion = ObjInventario.DtResultados.Copy()
|
||||
|
||||
CargaAlmacenes(DtRecepcion.Rows(0)("CveSubProyecto").ToString.ToEntero, "22", CveTipoCompra)
|
||||
If TipoMovimiento = 3 Then
|
||||
CargaAlmacenes(DtRecepcion.Rows(0)("CveSubProyecto").ToString.ToEntero, "21", CveTipoCompra)
|
||||
Else
|
||||
CargaAlmacenes(DtRecepcion.Rows(0)("CveSubProyecto").ToString.ToEntero, "22", CveTipoCompra)
|
||||
End If
|
||||
|
||||
Else
|
||||
DtRecepcion = ObjInventario.DtResultados.Copy()
|
||||
@@ -2112,7 +2116,7 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
Dim VariableCampo = If(TipoMovimiento.Contiene(1, 3), "CantidadF", "CantidadS")
|
||||
Dim ObjComprasDif As New ClsInventarios
|
||||
Dim DtDatosCompra As New DataTable
|
||||
If ObjComprasDif.RecepcionAlmacenGet(CveCompraSurtir, BuscaEntregaDirecta, UsuarioActual.CveEmpresa) Then
|
||||
If ObjComprasDif.RecepcionAlmacenGet(CveCompraSurtir, BuscaEntregaDirecta, -1, UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario) Then
|
||||
DtDatosCompra = ObjComprasDif.DtResultados
|
||||
End If
|
||||
Dim CantidadGV = GvInv.Rows.Cast(Of GridViewRow)().Sum(Function(gvr) gvr.DataKey("CantidadF").ToDecimal)
|
||||
@@ -2863,7 +2867,8 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
|
||||
'VERIFICA SI TIENE ALMACEN VIRTUAL
|
||||
If CveAlmacenVirtual > 0 Then
|
||||
If ObjInventario.GetMovimientosDetalleVirtual(CveMovimiento, UsuarioActual.CveEmpresa, CveCompra:=CveCompraSurtir, ValidaUsadosCompra:=ValidarRecepcionUsados) Then
|
||||
ValidarRecepcionUsados = RecibidaCompleta
|
||||
If ObjInventario.GetMovimientosDetalleVirtual(CveMovimiento, UsuarioActual.CveEmpresa, CveCompra:=CveCompraSurtir, ValidaUsadosCompra:=ValidarRecepcionUsados) Then 'ValidarRecepcionUsados
|
||||
DtPSVirtual = ObjInventario.DtResultados
|
||||
End If
|
||||
|
||||
@@ -3130,7 +3135,7 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
|
||||
'VERIFICA SI TIENE PENDIENTE POR SURTIR
|
||||
If UsuarioActual.CveEmpresa = 140 AndAlso TipoMovimiento = 3 Then
|
||||
If ObjInventario.RecepcionAlmacenGet(CveCompraSurtir, -1, UsuarioActual.CveEmpresa) AndAlso ObjInventario.DtResultados.Rows.Count > 0 Then
|
||||
If ObjInventario.RecepcionAlmacenGet(CveCompraSurtir, -1, -1, UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario) AndAlso ObjInventario.DtResultados.Rows.Count > 0 Then
|
||||
Dim DtFaltante As DataTable = ObjInventario.DtResultados.FiltraParametros("CantidadF > 0")
|
||||
If DtFaltante.Rows.Count = 0 Then
|
||||
If Not ObjCompras.UpdateEstatusAlmacen(CveCompraSurtir, 2, UsuarioActual.CveUsuario) Then
|
||||
@@ -3647,7 +3652,7 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
|
||||
Alert(Msg.ToString, TipoMensaje.MsgInformacion)
|
||||
|
||||
If ObjInventario.RecepcionAlmacenGet(CveCompraSurtir, -1, UsuarioActual.CveEmpresa) Then
|
||||
If ObjInventario.RecepcionAlmacenGet(CveCompraSurtir, -1, -1, UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario) Then
|
||||
CreaDTInv(ObjInventario.DtResultados)
|
||||
CargaGVInv()
|
||||
BtnGuardar.Visible = True
|
||||
@@ -4783,6 +4788,4 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
|
||||
' Return Retorno
|
||||
'End Function
|
||||
|
||||
End Class
|
||||
|
||||
|
||||
@@ -2272,12 +2272,24 @@ Partial Class Inventarios_RecepcionUsados
|
||||
|
||||
Me.ObjRemisionNC.CveMetodoPago = ObjCliente.CveMetodoPago33
|
||||
|
||||
If GlobalDTMetodosPago.FiltraParametros(String.Format("CveMetodoPago = {0}", ObjCliente.CveMetodoPago33)).Rows.Count > 0 Then
|
||||
Me.ObjRemisionNC.MetodoPago = GlobalDTMetodosPago.FiltraParametros(String.Format("CveMetodoPago = {0}", ObjCliente.CveMetodoPago33)).Rows(0)("MetodoPago").ToString
|
||||
Else
|
||||
Me.ObjRemisionNC.CveMetodoPago = 1
|
||||
Me.ObjRemisionNC.MetodoPago = "Efectivo"
|
||||
If GlobalDTMetodosPago IsNot Nothing Then
|
||||
Dim DtMetodoPago = GlobalDTMetodosPago.FiltraParametros(String.Format("CveMetodoPago = {0}", ObjCliente.CveMetodoPago33))
|
||||
|
||||
If DtMetodoPago IsNot Nothing Then
|
||||
|
||||
If DtMetodoPago.Rows.Count > 0 Then
|
||||
Me.ObjRemisionNC.MetodoPago = DtMetodoPago.Rows(0)("MetodoPago").ToString
|
||||
Else
|
||||
Me.ObjRemisionNC.CveMetodoPago = 1
|
||||
Me.ObjRemisionNC.MetodoPago = "Efectivo"
|
||||
End If
|
||||
|
||||
DtMetodoPago.Dispose()
|
||||
DtMetodoPago = Nothing
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
164
Inventarios/RepExistenciaLote.aspx
Normal file
164
Inventarios/RepExistenciaLote.aspx
Normal file
@@ -0,0 +1,164 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepExistenciaLote.aspx.vb" Inherits="Inventarios_RepExistenciaLote" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="H" runat="Server">
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkImprimir" runat="server"><i class="fa fa-ad-pdf"></i> Generar PDF</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkExportar" runat="server"><i class="fa fa-ad-excel"></i> Generar Excel</asp:LinkButton>
|
||||
</li>
|
||||
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="Css" runat="Server">
|
||||
<style>
|
||||
|
||||
.dataTables_scrollHead{
|
||||
background-color:#95A5A6;
|
||||
color:white;
|
||||
}
|
||||
.table-scrollable{
|
||||
margin-top:0px!important;
|
||||
margin-bottom:0px!important;
|
||||
}
|
||||
.dataTables_scroll{
|
||||
padding-top:0px;
|
||||
}
|
||||
.Totales a{
|
||||
color: white;
|
||||
}
|
||||
</style>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="E" runat="Server">
|
||||
Reporte de Existencia Lote
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="C" runat="Server">
|
||||
|
||||
<%--Tabla con los campos para filtrar--%>
|
||||
<asp:UpdatePanel runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="portlet solid grey-cascade portlet-filter" style="">
|
||||
<div class="portlet-title portlet-filterT smalltitle" style="min-height: 49px; position: relative;">
|
||||
<div class="tools">
|
||||
<asp:Button ID="btConsultar" CssClass="btn btn-primary" runat="server" ValidationGroup="GrpConsultar" Text="Consultar" /></td>
|
||||
<a href="javascript:;" data-idchekbox="<%= chkexpand.ClientID%>" class=" <%= IIf(chkexpand.Checked = True, "collapse", "expand")%>"></a>
|
||||
<asp:CheckBox ID="chkexpand" CssClass="hidden" runat="server" />
|
||||
</div>
|
||||
<div class="titlefiltros caption magindate">
|
||||
<div class="row">
|
||||
<div class="col-md-1 truncate">Almacén</div>
|
||||
<div class="col-md-2">
|
||||
<asp:ListBox ID="DdlAlmacen" SelectionMode="Multiple" CssClass="form-control ddlFiltros input-sm select2me Widthall" DataTextField="Almacen" DataValueField="CveAlmacen" Style="width: 100%;" runat="server"></asp:ListBox>
|
||||
</div>
|
||||
<div class="col-md-1 truncate">Fecha Inicio</div>
|
||||
<div class="col-md-2 col-sm-2">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 95px !important; padding: 0px;">
|
||||
<asp:TextBox Style="width: 80px !important;" ID="TxtFechaI" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="ImgFechaI" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
</div>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaI" runat="server" TargetControlID="TxtFechaI" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="CEFechaI" TargetControlID="TxtFechaI" PopupButtonID="ImgFechaI" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="RFVInicio" runat="server" ControlToValidate="TxtFechaI" Display="None" ErrorMessage="El campo <b>''Fecha Inicio''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="GrpConsultar"></asp:RequiredFieldValidator>
|
||||
<asp:CompareValidator ID="CVInicio" runat="server" ControlToValidate="TxtFechaI" Display="None" ErrorMessage="El campo <b>''Fecha Inicio''</b> no tiene el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpConsultar"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="CVEIncio1" runat="server" HighlightCssClass="vco" TargetControlID="RFVInicio" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:ValidatorCalloutExtender ID="CVEIncio2" runat="server" HighlightCssClass="vco" TargetControlID="CVInicio" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-1 truncate">Fecha Fin</div>
|
||||
<div class="col-md-2 col-sm-2">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 95px !important; padding: 0px;">
|
||||
<asp:TextBox Style="width: 80px !important;" ID="TxtFechaF" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="ImgFechaF" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
</div>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaF" runat="server" TargetControlID="TxtFechaF" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="CalendarExtender1" TargetControlID="TxtFechaF" PopupButtonID="ImgFechaF" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="RFVFin" runat="server" ControlToValidate="TxtFechaF" Display="None" ErrorMessage="El campo <b>''Fecha Fin''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="GrpConsultar"></asp:RequiredFieldValidator>
|
||||
<asp:CompareValidator ID="CVFin" runat="server" ControlToValidate="TxtFechaF" Display="None" ErrorMessage="El campo <b>''Fecha Fin''</b> no tiene el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpConsultar"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="CVEFin1" runat="server" HighlightCssClass="vco" TargetControlID="RFVFin" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:ValidatorCalloutExtender ID="CVEFin2" runat="server" HighlightCssClass="vco" TargetControlID="CVFin" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body magindate" <%= IIf(chkexpand.Checked = True, "", "style=""display:none;""")%>>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-1 truncate">Proveedor</div>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlProveedor" runat="server" CssClass="form-control input-sm select2me" Width="100%" DataValueField="CveProveedor" DataTextField="RazonSocial"></asp:DropDownList>
|
||||
</div>
|
||||
<div class="col-md-1 truncate">Clasificación</div>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlClasificacion" runat="server" AutoPostBack="true" OnSelectedIndexChanged="DdlClasificacion_SelectedIndexChanged" CssClass="form-control input-sm select2me" Width="100%" DataValueField="CveClasificacion" DataTextField="Clasificacion"></asp:DropDownList>
|
||||
</div>
|
||||
<div class="col-md-1 truncate" style="width:50px !important" >PS</div>
|
||||
<div class="col-md-2">
|
||||
<ADS:Dropdownlost runat="server" ID="DdlPS" CssStyle="width: 100%;" CssClass="DdlPS" CssClassDdl="select2me " DataTextField="PSCodigo" DataValueField="CvePS" />
|
||||
<%--<asp:DropDownList ID="DdlPS" CssClass="form-control input-sm select2me" runat="server" Width="100%" DataTextField="PS" DataValueField="CvePS"></asp:DropDownList>--%>
|
||||
</div>
|
||||
<div runat="Server" id="DivMarca">
|
||||
<div class="col-md-1 truncate" style="width:50px !important" >Marca</div>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlMarca" runat="server" CssClass="form-control input-sm select2me" Width="100%" DataValueField="CveMarca" DataTextField="Marca"></asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-1 truncate">Personal</div>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlPersonal" runat="server" CssClass="form-control input-sm select2me" Width="100%" DataValueField="CvePersonal" DataTextField="CodigoNombreCompleto"></asp:DropDownList>
|
||||
</div>
|
||||
|
||||
<div class="col-md-1 truncate">Tipo Almacén:</div>
|
||||
<div class="col-md-2">
|
||||
<asp:ListBox ID="DdlTipoAlmacen" SelectionMode="Multiple" CssClass="form-control ddlFiltros input-sm select2me Widthall" DataTextField="TipoAlmacen" DataValueField="CveTipoAlmacen" Style="width: 100%;" runat="server"></asp:ListBox>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<br />
|
||||
<div class="row" >
|
||||
<div class="row col-md-12" align="right">
|
||||
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvM.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvM.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12" >
|
||||
<asp:UpdatePanel ID="UPPMov" runat="server" RenderMode="Inline" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvM" Width="100%" runat="server" data-sort="false" GridLines="None" CssClass="table table-smallpadding table-striped table-hover Widthall ScrollAD" ShowHeader="True" EmptyDataText="No se encontraron resultados." ShowHeaderWhenEmpty="true" AutoGenerateColumns="False" AllowPaging="False" ShowFooter="False">
|
||||
<Columns>
|
||||
<asp:BoundField DataField="Codigo" HeaderText="Codigo" />
|
||||
<asp:BoundField DataField="PS" HeaderText="PS" />
|
||||
<asp:BoundField DataField="Cantidad" HeaderText="Existencia" />
|
||||
<asp:BoundField DataField="Lote" HeaderText="Lote" />
|
||||
<asp:BoundField DataField="FechaCaducidad" HeaderText="Fecha Caducidad" DataFormatString = "{0:dd/MM/yyyy}" ItemStyle-Width="100px" />
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
|
||||
|
||||
</asp:Content>
|
||||
|
||||
514
Inventarios/RepExistenciaLote.aspx.vb
Normal file
514
Inventarios/RepExistenciaLote.aspx.vb
Normal file
@@ -0,0 +1,514 @@
|
||||
Imports System.Data
|
||||
Imports Extensiones
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
Imports System.IO
|
||||
|
||||
Partial Class Inventarios_RepExistenciaLote
|
||||
Inherits ClsPaginas
|
||||
#Region "propiedades"
|
||||
'Private ReadOnly Property reporteador As Microsoft.Reporting.WebForms.ReportViewer
|
||||
' Get
|
||||
' Return CType(Master.FindControl("ReportMaster"), Microsoft.Reporting.WebForms.ReportViewer)
|
||||
' End Get
|
||||
'End Property
|
||||
Private Property dt As DataTable
|
||||
Get
|
||||
Try
|
||||
dt = DirectCast(ViewState("dt"), DataTable)
|
||||
Return DirectCast(ViewState("dt"), DataTable)
|
||||
Catch ex As Exception
|
||||
Return Nothing
|
||||
End Try
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
ViewState("dt") = value
|
||||
End Set
|
||||
End Property
|
||||
Public Property DtEquivalencias() As DataTable
|
||||
Get
|
||||
Return CType(ViewState("dtReporte"), DataTable)
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
ViewState("dtReporte") = value
|
||||
End Set
|
||||
End Property
|
||||
Public Property FechaInicial As String
|
||||
Get
|
||||
Return ViewState("FechaInicial").ToString
|
||||
End Get
|
||||
Set(value As String)
|
||||
ViewState("FechaInicial") = value
|
||||
End Set
|
||||
End Property
|
||||
Public Property FechaFinal As String
|
||||
Get
|
||||
Return ViewState("FechaFinal").ToString
|
||||
End Get
|
||||
Set(value As String)
|
||||
ViewState("FechaFinal") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private ReadOnly Property PermiteClasificacion2 As Boolean
|
||||
Get
|
||||
Return (UsuarioActual.CveEmpresa.Contiene(72, 80))
|
||||
End Get
|
||||
End Property
|
||||
#End Region
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
If Not IsPostBack Then
|
||||
|
||||
TxtFechaI.Text = Now.AddMonths(-1).ToShortDateString
|
||||
TxtFechaF.Text = Now
|
||||
FechaInicial = "-1"
|
||||
FechaFinal = "-1"
|
||||
|
||||
CargaCombos()
|
||||
|
||||
GvM.DataBind()
|
||||
If Not IsNothing(Request("CveAlmacen")) Then
|
||||
DdlAlmacen.SelectedValue = Request("CveAlmacen").ToString()
|
||||
TxtFechaI.Text = "01/01/2000"
|
||||
If Not IsNothing(Request("FechaCorte")) Then
|
||||
TxtFechaF.Text = Request("FechaCorte")
|
||||
End If
|
||||
|
||||
If Not IsNothing(Request("FechaInicio")) And IsDate(Request("FechaInicio")) Then
|
||||
TxtFechaI.Text = Request("FechaInicio")
|
||||
End If
|
||||
|
||||
btConsultar_Click(Nothing, Nothing)
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub CargaCombos()
|
||||
|
||||
|
||||
DdlAlmacen.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1).FiltraParametros("") 'GlobalDTAlmacen(UsuarioActual.CveEmpresa)
|
||||
DdlAlmacen.DataBind()
|
||||
DdlAlmacen.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
If Not IsNothing(Request("CveAlmacen")) Then
|
||||
If DdlAlmacen.Items.FindByValue(Request("CveAlmacen").ToString) Is Nothing Then
|
||||
Dim CveAlmacen = Request("CveAlmacen").ToString
|
||||
Dim Almacen As String = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Almacen", $"CveAlmacen = {Request("CveAlmacen").ToString}")
|
||||
DdlAlmacen.Items.Insert(0, New ListItem(Almacen, CveAlmacen))
|
||||
End If
|
||||
Else
|
||||
DdlAlmacen.SelectedValuesIfExistM("-1")
|
||||
End If
|
||||
|
||||
'Llenar dropdownlist de proveedores
|
||||
DdlProveedor.DataSource = GlobalDTCompProveedores(UsuarioActual.CveEmpresa)
|
||||
DdlProveedor.DataBind()
|
||||
DdlProveedor.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
|
||||
'CARGA CLASIFICACIONES
|
||||
Dim ObjClasificaciones As New ClsClasificaciones
|
||||
If ObjClasificaciones.GetClasificacionesExistencias(UsuarioActual.CveEmpresa) Then
|
||||
DdlClasificacion.DataSource = ObjClasificaciones.DtResultados
|
||||
End If
|
||||
ObjClasificaciones.Dispose()
|
||||
DdlClasificacion.DataBind()
|
||||
DdlClasificacion.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
|
||||
|
||||
|
||||
|
||||
'Carga Productos
|
||||
DdlPS.setEsWebService(UsuarioActual.Empresa.Funcionalidad(105) = "1")
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(105) = "1" Then
|
||||
DdlPS.ddlWS.Attributes.Add("data-cveclasificacion", DdlClasificacion.SelectedValue)
|
||||
DdlPS.SelectedText = ""
|
||||
DdlPS.SelectedValue = "-1"
|
||||
Else
|
||||
DdlPS.ddl.Items.Clear()
|
||||
DdlPS.ddl.DataSource = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa, CveClasificacion:=DdlClasificacion.SelectedValue.ToEntero)
|
||||
DdlPS.ddl.DataBind()
|
||||
DdlPS.ddl.Items.Insert(0, New ListItem("Seleccione el Producto", "-1"))
|
||||
End If
|
||||
|
||||
|
||||
'Llenar dropdownlist de personal
|
||||
DdlPersonal.DataSource = GlobalDTRHPersonal(UsuarioActual.CveEmpresa)
|
||||
DdlPersonal.DataBind()
|
||||
DdlPersonal.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
|
||||
CargarMarcas()
|
||||
|
||||
DdlTipoAlmacen.DataSource = GlobalDTTipoAlmacen(1)
|
||||
DdlTipoAlmacen.DataBind()
|
||||
DdlTipoAlmacen.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub btConsultar_Click(sender As Object, e As EventArgs) Handles btConsultar.Click
|
||||
CargaDatos()
|
||||
End Sub
|
||||
|
||||
Private Sub CargaDatos()
|
||||
Dim Reporte As New ClsInventarios
|
||||
Dim rpt As DataTable = Nothing
|
||||
Dim CveMarca As Integer = -1
|
||||
|
||||
'Dim fechaI As String = If(TxtFechaI.Text.Trim <> "" AndAlso TxtFechaI.Text <> "__/__/____", TxtFechaI.Text, "-1")
|
||||
'Dim fechaF As String = If(TxtFechaF.Text.Trim <> "" AndAlso TxtFechaF.Text <> "__/__/____", TxtFechaF.Text, "-1")
|
||||
FechaInicial = If(TxtFechaI.Text.Trim <> "" AndAlso TxtFechaI.Text <> "__/__/____", TxtFechaI.Text, "-1")
|
||||
FechaFinal = If(TxtFechaF.Text.Trim <> "" AndAlso TxtFechaF.Text <> "__/__/____", TxtFechaF.Text, "-1")
|
||||
Dim TipoAlmacen As String = If(DdlTipoAlmacen.GetSelectedValuesM = "", "-1", DdlTipoAlmacen.GetSelectedValuesM)
|
||||
Dim Almacenes As String = If(DdlAlmacen.GetSelectedValuesM = "", "-1", DdlAlmacen.GetSelectedValuesM)
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(130) = "1" Then
|
||||
CveMarca = DdlMarca.SelectedValue.ToEntero
|
||||
End If
|
||||
|
||||
If Reporte.RepExistenciasLote(UsuarioActual.CveEmpresa, FechaInicial.ToDate, FechaFinal.ToDate, DdlProveedor.SelectedValue.ToEntero, Almacenes, DdlPS.SelectedValue.ToEntero,
|
||||
DdlClasificacion.SelectedValue.ToEntero, CveMarca, TipoAlmacen) Then
|
||||
If Reporte.DtResultados.Rows.Count > 0 Then
|
||||
GvM.DataSource = Reporte.DtResultados
|
||||
GvM.DataBind()
|
||||
ViewState("dtReporte") = Reporte.DtResultados
|
||||
dt = Reporte.DtResultados
|
||||
|
||||
End If
|
||||
|
||||
|
||||
End If
|
||||
Reporte.Dispose()
|
||||
UPPMov.Update()
|
||||
End Sub
|
||||
|
||||
Protected Sub DdlClasificacion_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
If UsuarioActual.Empresa.Funcionalidad(105) = "1" Then
|
||||
DdlPS.ddlWS.Attributes.Add("data-cveclasificacion", DdlClasificacion.SelectedValue)
|
||||
DdlPS.SelectedText = ""
|
||||
DdlPS.SelectedValue = "-1"
|
||||
Else
|
||||
DdlPS.ddl.Items.Clear()
|
||||
DdlPS.ddl.DataSource = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa, CveClasificacion:=DdlClasificacion.SelectedValue.ToEntero)
|
||||
DdlPS.ddl.DataBind()
|
||||
DdlPS.ddl.Items.Insert(0, New ListItem("Seleccione el Producto", "-1"))
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub GvM_RowCreated(sender As Object, e As GridViewRowEventArgs) Handles GvM.RowCreated
|
||||
|
||||
'If e.Row.RowType = DataControlRowType.Header Then
|
||||
' 'GENERO ENCABEZADO
|
||||
' Dim FC As New SortedList
|
||||
' FC.Add(0, "Código,1,2,Titulos")
|
||||
|
||||
' If ChkCodigoAlterno.Checked Then
|
||||
' FC.Add(1, "Código Alterno,1,2,Titulos")
|
||||
' End If
|
||||
|
||||
' FC.Add(10, "Descripción,1,2,Titulos")
|
||||
' FC.Add(20, "CANTIDAD,4,1,Titulos")
|
||||
' FC.Add(30, "IMPORTE,4,1,Titulos")
|
||||
|
||||
' Dim FC2 As New SortedList
|
||||
' FC2.Add(0, "Exist. inicial,1,1,Titulos")
|
||||
' FC2.Add(1, "Entradas,1,1S,Titulos")
|
||||
' FC2.Add(2, "Salidas,1,1,Titulos")
|
||||
' FC2.Add(3, "Exist. final,1,1,Titulos")
|
||||
' FC2.Add(4, "Saldo inicial,1,1,Titulos")
|
||||
' FC2.Add(5, "Entradas,1,1,Titulos")
|
||||
' FC2.Add(6, "Salidas,1,1,Titulos")
|
||||
' FC2.Add(7, "Saldo final,1,1,Titulos")
|
||||
|
||||
' GetMultiRowHeader(DirectCast(sender, GridView), e, FC2, "Titulosfijos")
|
||||
' GetMultiRowHeader(DirectCast(sender, GridView), e, FC, "Titulosfijos")
|
||||
|
||||
''End If
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub gvMovimientos_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvM.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
#Region "MARCA"
|
||||
Protected Sub CargarMarcas()
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(130) = "1" Then
|
||||
DivMarca.Visible = True
|
||||
|
||||
Dim ObjMarcas As New ClsProductosServicios
|
||||
ObjMarcas.GetMarcas(UsuarioActual.CveEmpresa)
|
||||
DdlMarca.DataSource = ObjMarcas.DtResultados
|
||||
ObjMarcas.Dispose()
|
||||
DdlMarca.DataBind()
|
||||
End If
|
||||
|
||||
DdlMarca.Items.Insert(0, New ListItem(" Todas ", "-1"))
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
#Region " EXPORTAR - PDF - EXCEL "
|
||||
Private Sub LnkExportar_Click(sender As Object, e As EventArgs) Handles LnkExportar.Click
|
||||
' GvM.ExportToExcel("Reporte de Entradas y Salidas")
|
||||
ImprimiReporte("EXCEL")
|
||||
End Sub
|
||||
Private Sub LnkImprimir_Click(sender As Object, e As EventArgs) Handles LnkImprimir.Click
|
||||
ImprimiReporte()
|
||||
End Sub
|
||||
|
||||
Protected Sub ImprimiReporte(Optional Formato As String = "PDF", Optional FormatoInventario As Boolean = False)
|
||||
|
||||
Dim RutaPDF As String
|
||||
Dim NombreArchivoDescarga = "ReporteExistenciaLotes"
|
||||
|
||||
RutaPDF = "Empresas/Grales/Formatos/RepExistenciaLotes.rdlc"
|
||||
|
||||
|
||||
Dim params As New List(Of ReportParameter)
|
||||
params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa))
|
||||
params.Add(New ReportParameter("LogoPath", New Uri(Server.MapPath(String.Format("~/Empresas/{0}/Logo.png", UsuarioActual.CveEmpresa))).AbsoluteUri))
|
||||
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
|
||||
params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString))
|
||||
|
||||
ImprimirPDF(RutaPDF, dt, params, NombreArchivoDescarga, Formato)
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
Protected Sub Lnkcompuxlsinventarios_Click(sender As Object, e As EventArgs)
|
||||
Dim continuar = True
|
||||
Try
|
||||
|
||||
Dim wb As New ClosedXML.Excel.XLWorkbook()
|
||||
Dim libro As ClosedXML.Excel.IXLWorksheet = wb.AddWorksheet("Reporte de inventarios")
|
||||
|
||||
|
||||
|
||||
Dim Fila As Integer = 0
|
||||
libro.Range(libro.Cell(Fila + 1, 1), libro.Cell(Fila + 2, 7)).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(217, 225, 242))
|
||||
libro.Range(libro.Cell(Fila + 3, 1), libro.Cell(Fila + 3, 7)).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(0, 176, 80))
|
||||
libro.Cell(Fila + 3, 5).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(166, 166, 166))
|
||||
libro.Range(libro.Cell(Fila + 1, 1), libro.Cell(Fila + 3, 7)).Style.Border.InsideBorder = ClosedXML.Excel.XLBorderStyleValues.Thin
|
||||
libro.Range(libro.Cell(Fila + 1, 1), libro.Cell(Fila + 3, 7)).Style.Border.OutsideBorder = ClosedXML.Excel.XLBorderStyleValues.Thin
|
||||
libro.Column(1).Width = 34.43
|
||||
libro.Cell(Fila + 1, 1).Value = "TIPO DO REGISTRO"
|
||||
libro.Cell(Fila + 2, 1).Value = "RECORD Type"
|
||||
libro.Cell(Fila + 3, 1).Value = "OBLIGATORIO"
|
||||
|
||||
libro.Column(2).Width = 24
|
||||
libro.Cell(Fila + 1, 2).Value = "Codigo del Partner"
|
||||
libro.Cell(Fila + 2, 2).Value = "Reporter_id "
|
||||
libro.Cell(Fila + 3, 2).Value = "OBLIGATORIO"
|
||||
|
||||
libro.Column(3).Width = 28.71
|
||||
libro.Cell(Fila + 1, 3).Value = "Nombre de la Empresa"
|
||||
libro.Cell(Fila + 2, 3).Value = "Reporter Company Name"
|
||||
libro.Cell(Fila + 3, 3).Value = "OBLIGATORIO"
|
||||
|
||||
libro.Column(4).Width = 23.57
|
||||
libro.Cell(Fila + 1, 4).Value = "CÓDIGO DEL PAÍS"
|
||||
libro.Cell(Fila + 2, 4).Value = "COUNTRY CD"
|
||||
libro.Cell(Fila + 3, 4).Value = "OBLIGATORIO"
|
||||
|
||||
libro.Column(5).Width = 17.57
|
||||
libro.Cell(Fila + 1, 5).Value = "Ubicación"
|
||||
libro.Cell(Fila + 2, 5).Value = "LOCATION"
|
||||
libro.Cell(Fila + 3, 5).Value = "OPCIONAL"
|
||||
|
||||
libro.Column(6).Width = 35.29
|
||||
libro.Cell(Fila + 1, 6).Value = "FECHA DEL INVENTARIO"
|
||||
libro.Cell(Fila + 2, 6).Value = "Period End Date"
|
||||
libro.Cell(Fila + 3, 6).Value = "OBLIGATORIO"
|
||||
|
||||
libro.Column(7).Width = 23.43
|
||||
libro.Cell(Fila + 1, 7).Value = "REENVIO"
|
||||
libro.Cell(Fila + 2, 7).Value = "RESUBMIT"
|
||||
libro.Cell(Fila + 3, 7).Value = "OBLIGATORIO"
|
||||
|
||||
libro.Column(8).Width = 29.29
|
||||
libro.Column(9).Width = 25
|
||||
libro.Column(10).Width = 18.14
|
||||
libro.Column(11).Width = 32.71
|
||||
libro.Column(12).Width = 13.57
|
||||
libro.Column(13).Width = 13
|
||||
libro.Column(14).Width = 32
|
||||
libro.Column(15).Width = 12.71
|
||||
libro.Column(16).Width = 13
|
||||
|
||||
|
||||
|
||||
Fila = Fila + 3
|
||||
|
||||
libro.Cell(Fila + 1, 1).Value = "IH"
|
||||
libro.Cell(Fila + 1, 2).Value = "10245068"
|
||||
libro.Cell(Fila + 1, 3).Value = "COMPUPROVEEDORES SA DE CV"
|
||||
libro.Cell(Fila + 1, 4).Value = "MX"
|
||||
libro.Cell(Fila + 1, 5).Value = ""
|
||||
libro.Cell(Fila + 1, 6).Value = String.Format("{0:yyyyMMdd}", TxtFechaF.Text.ToDate())
|
||||
libro.Cell(Fila + 1, 7).Value = "N"
|
||||
|
||||
|
||||
Fila = Fila + 1
|
||||
libro.Range(libro.Cell(Fila + 1, 1), libro.Cell(Fila + 2, 16)).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(217, 225, 242))
|
||||
libro.Range(libro.Cell(Fila + 3, 1), libro.Cell(Fila + 3, 16)).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(0, 176, 80))
|
||||
libro.Range(libro.Cell(Fila + 3, 3), libro.Cell(Fila + 3, 15)).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(166, 166, 166))
|
||||
libro.Cell(Fila + 3, 7).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(0, 176, 80))
|
||||
libro.Cell(Fila + 3, 10).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(0, 176, 80))
|
||||
libro.Range(libro.Cell(Fila + 1, 1), libro.Cell(Fila + 3, 16)).Style.Border.InsideBorder = ClosedXML.Excel.XLBorderStyleValues.Thin
|
||||
libro.Range(libro.Cell(Fila + 1, 1), libro.Cell(Fila + 3, 16)).Style.Border.OutsideBorder = ClosedXML.Excel.XLBorderStyleValues.Thin
|
||||
libro.Cell(Fila + 1, 1).Value = "TIPO DO REGISTRO"
|
||||
libro.Cell(Fila + 1, 2).Value = "NÚMERO DEL PRODUCTO"
|
||||
libro.Cell(Fila + 1, 3).Value = "OPCION DEL PRODUCTO"
|
||||
libro.Cell(Fila + 1, 4).Value = "UPC"
|
||||
libro.Cell(Fila + 1, 5).Value = "CODIGO SKU"
|
||||
libro.Cell(Fila + 1, 6).Value = "ORDENES DE COMPRAS EN ABIERTO "
|
||||
libro.Cell(Fila + 1, 7).Value = "INVENTARIO DISPONIBLE"
|
||||
libro.Cell(Fila + 1, 8).Value = "DEVOLUCIONES"
|
||||
libro.Cell(Fila + 1, 9).Value = "INVENTARIO RESERVADO"
|
||||
libro.Cell(Fila + 1, 10).Value = "INVENTARIO TOTAL"
|
||||
libro.Cell(Fila + 1, 11).Value = "EN TRANSITO"
|
||||
libro.Cell(Fila + 1, 12).Value = "VALOR UNITARIO DEL PRODUCTO HP"
|
||||
libro.Cell(Fila + 1, 13).Value = "VALOR TOTAL DEL INVENTARIO"
|
||||
libro.Cell(Fila + 1, 14).Value = "NOMBRE DE LA TIENDA"
|
||||
libro.Cell(Fila + 1, 15).Value = "Codigo de la tienda"
|
||||
libro.Cell(Fila + 1, 16).Value = "MONEDA"
|
||||
|
||||
Fila = Fila + 1
|
||||
libro.Cell(Fila + 1, 1).Value = "RECORD TYPE "
|
||||
libro.Cell(Fila + 1, 2).Value = "Partner Reported Product ID"
|
||||
libro.Cell(Fila + 1, 3).Value = "PROD_OPTION"
|
||||
libro.Cell(Fila + 1, 4).Value = "UPC"
|
||||
libro.Cell(Fila + 1, 5).Value = "Reseller product number "
|
||||
libro.Cell(Fila + 1, 6).Value = "Quantity on Order"
|
||||
libro.Cell(Fila + 1, 7).Value = "Quantity on Hand"
|
||||
libro.Cell(Fila + 1, 8).Value = "Quantity in stock allocated to be returned to supplier"
|
||||
libro.Cell(Fila + 1, 9).Value = "Reserved Inventory"
|
||||
libro.Cell(Fila + 1, 10).Value = "Quantity avail. for sale"
|
||||
libro.Cell(Fila + 1, 11).Value = "Quantity in float (In transit between partner warehouses)"
|
||||
libro.Cell(Fila + 1, 12).Value = "INVENTORY UNIT VALUE"
|
||||
libro.Cell(Fila + 1, 13).Value = "INVENTORY VALUATION"
|
||||
libro.Cell(Fila + 1, 14).Value = "Sell from name (For retailers, ""Store Name / Site Name"")"
|
||||
libro.Cell(Fila + 1, 15).Value = "Sell From Location ID"
|
||||
libro.Cell(Fila + 1, 16).Value = "CURRENCY"
|
||||
|
||||
Fila = Fila + 1
|
||||
libro.Cell(Fila + 1, 1).Value = "OBLIGATORIO"
|
||||
libro.Cell(Fila + 1, 2).Value = "OBLIGATORIO"
|
||||
libro.Cell(Fila + 1, 3).Value = "OPCIONAL"
|
||||
libro.Cell(Fila + 1, 4).Value = "OPCIONAL"
|
||||
libro.Cell(Fila + 1, 5).Value = "OPCIONAL"
|
||||
libro.Cell(Fila + 1, 6).Value = "OPCIONAL"
|
||||
libro.Cell(Fila + 1, 7).Value = "OBLIGATORIO"
|
||||
libro.Cell(Fila + 1, 8).Value = "OPCIONAL"
|
||||
libro.Cell(Fila + 1, 9).Value = "OPCIONAL"
|
||||
libro.Cell(Fila + 1, 10).Value = "OBLIGATORIO"
|
||||
libro.Cell(Fila + 1, 11).Value = "OPCIONAL"
|
||||
libro.Cell(Fila + 1, 12).Value = "OPCIONAL"
|
||||
libro.Cell(Fila + 1, 13).Value = "OPCIONAL"
|
||||
libro.Cell(Fila + 1, 14).Value = "OPCIONAL"
|
||||
libro.Cell(Fila + 1, 15).Value = "OPCIONAL"
|
||||
libro.Cell(Fila + 1, 16).Value = "OBLIGATORIO"
|
||||
|
||||
|
||||
If Not IsNothing(dt) AndAlso dt.Rows.Count > 0 Then
|
||||
|
||||
For Each row As DataRow In dt.Select("CvePS>0 AND SaldoFCant >0")
|
||||
|
||||
Fila = Fila + 1
|
||||
libro.Cell(Fila + 1, 1).Value = "ID" ' "TIPO DO REGISTRO"
|
||||
libro.Cell(Fila + 1, 2).Value = String.Format("'{0}", row("Codigo")) ' "NÚMERO DEL PRODUCTO"
|
||||
libro.Cell(Fila + 1, 3).Value = "" ' "OPCION DEL PRODUCTO"
|
||||
libro.Cell(Fila + 1, 4).Value = "" ' "UPC"
|
||||
libro.Cell(Fila + 1, 5).Value = "" ' "CODIGO SKU"
|
||||
libro.Cell(Fila + 1, 6).Value = "" ' "ORDENES DE COMPRAS EN ABIERTO "
|
||||
libro.Cell(Fila + 1, 7).Value = String.Format("{0}", row("SaldoFCant")) ' "INVENTARIO DISPONIBLE"
|
||||
'libro.Cell(Fila + 1, 7).Style.NumberFormat.Format = "N2"
|
||||
libro.Cell(Fila + 1, 8).Value = "" ' "DEVOLUCIONES"
|
||||
libro.Cell(Fila + 1, 9).Value = "" ' "INVENTARIO RESERVADO"
|
||||
libro.Cell(Fila + 1, 10).Value = String.Format("{0}", row("SaldoFCant")) ' "INVENTARIO TOTAL"
|
||||
'libro.Cell(Fila + 1, 10).Style.NumberFormat.Format = "$ #,##0.00"
|
||||
libro.Cell(Fila + 1, 11).Value = "" ' "EN TRANSITO"
|
||||
libro.Cell(Fila + 1, 12).Value = "" ' "VALOR UNITARIO DEL PRODUCTO HP"
|
||||
libro.Cell(Fila + 1, 13).Value = "" ' "VALOR TOTAL DEL INVENTARIO"
|
||||
libro.Cell(Fila + 1, 14).Value = "" ' "NOMBRE DE LA TIENDA"
|
||||
libro.Cell(Fila + 1, 15).Value = "" ' "Codigo de la tienda"
|
||||
libro.Cell(Fila + 1, 16).Value = "MXN" ' "MONEDA"
|
||||
Next
|
||||
End If
|
||||
|
||||
Fila = Fila + 1
|
||||
libro.Range(libro.Cell(Fila + 1, 1), libro.Cell(Fila + 2, 4)).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(217, 225, 242))
|
||||
libro.Range(libro.Cell(Fila + 3, 1), libro.Cell(Fila + 3, 4)).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(0, 176, 80))
|
||||
libro.Range(libro.Cell(Fila + 1, 1), libro.Cell(Fila + 3, 4)).Style.Border.InsideBorder = ClosedXML.Excel.XLBorderStyleValues.Thin
|
||||
libro.Range(libro.Cell(Fila + 1, 1), libro.Cell(Fila + 3, 4)).Style.Border.OutsideBorder = ClosedXML.Excel.XLBorderStyleValues.Thin
|
||||
libro.Cell(Fila + 1, 1).Value = "TIPO DEL REGISTRO"
|
||||
libro.Cell(Fila + 1, 2).Value = "TOTAL DE REGISTROS"
|
||||
libro.Cell(Fila + 1, 3).Value = "Suma del Inventario Disponible"
|
||||
libro.Cell(Fila + 1, 4).Value = "Suma del Inventario Total"
|
||||
|
||||
Fila = Fila + 1
|
||||
libro.Cell(Fila + 1, 1).Value = "RECORD TYPE"
|
||||
libro.Cell(Fila + 1, 2).Value = "COUNT OF RECORDS"
|
||||
libro.Cell(Fila + 1, 3).Value = "SUM OF “"On Hand”""
|
||||
libro.Cell(Fila + 1, 4).Value = "SUM OF “"Total Inventory"”"
|
||||
|
||||
|
||||
Fila = Fila + 1
|
||||
libro.Cell(Fila + 1, 1).Value = "OBLIGATORIO"
|
||||
libro.Cell(Fila + 1, 2).Value = "OBLIGATORIO"
|
||||
libro.Cell(Fila + 1, 3).Value = "OBLIGATORIO"
|
||||
libro.Cell(Fila + 1, 4).Value = "OBLIGATORIO"
|
||||
|
||||
Dim Codigo As Double = 0
|
||||
Dim SaldoFCant As Double = 0
|
||||
Dim SaldoFImp As Double = 0
|
||||
If Not IsNothing(dt) AndAlso dt.Rows.Count > 0 Then
|
||||
Codigo = dt.COUNT("Codigo", "CvePS>0")
|
||||
SaldoFCant = dt.SUM("SaldoFCant", "CvePS>0")
|
||||
SaldoFImp = dt.SUM("SaldoFImp", "CvePS>0")
|
||||
End If
|
||||
Fila = Fila + 1
|
||||
libro.Cell(Fila + 1, 1).Value = "IT"
|
||||
libro.Cell(Fila + 1, 2).Value = String.Format("{0}", Codigo)
|
||||
'libro.Cell(Fila + 1, 2).Style.NumberFormat.Format = "N2"
|
||||
libro.Cell(Fila + 1, 3).Value = String.Format("{0}", SaldoFCant)
|
||||
'libro.Cell(Fila + 1, 3).Style.NumberFormat.Format = "N2"
|
||||
libro.Cell(Fila + 1, 4).Value = String.Format("{0}", SaldoFCant)
|
||||
'libro.Cell(Fila + 1, 4).Style.NumberFormat.Format = "$ #,##0.00"
|
||||
|
||||
|
||||
''Guarda streem y descarga
|
||||
Dim fs As Stream = New MemoryStream()
|
||||
wb.SaveAs(fs)
|
||||
fs.Position = 0
|
||||
Dim memoryStream As New MemoryStream()
|
||||
Using input As Stream = fs
|
||||
input.CopyTo(memoryStream)
|
||||
End Using
|
||||
memoryStream.Position = 0
|
||||
|
||||
Response.Clear()
|
||||
Response.Buffer = True
|
||||
|
||||
Response.ContentType = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
|
||||
Response.AddHeader("content-disposition", String.Format("attachment;filename={0}.xlsx", "Reporte de Inventarios HP"))
|
||||
Response.BinaryWrite(memoryStream.ToArray())
|
||||
Response.End()
|
||||
|
||||
''endGuarda streem y descarga
|
||||
Catch
|
||||
|
||||
continuar = False
|
||||
End Try
|
||||
If Not continuar Then
|
||||
Alert("Ocurrió un error al gener el excel", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
End Sub
|
||||
End Class
|
||||
@@ -187,6 +187,11 @@
|
||||
<div class="col-md-2">
|
||||
<asp:CheckBox ID="ChkRecibido" runat="server" CssClass="make-switchsd" data-size="small" Text=" " />
|
||||
</div>
|
||||
<div class="col-md-1 truncate v-center" style="text-align: right!important">Tipo Almacen:</div>
|
||||
<div class="col-md-2 v-center">
|
||||
<asp:DropDownList ID="DdlTipoAlmacen" CssClass="form-control ddlFiltros input-sm select2me Widthall" DataTextField="TipoAlmacen" DataValueField="CveTipoAlmacen" Style="width: 100%;" runat="server"></asp:DropDownList>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -74,7 +74,7 @@ Partial Class RepTraspasoAlmacen
|
||||
|
||||
'Sucursales = IIf(DdlSubProyectos.GetSelectedValuesM = "", "-1", DdlSubProyectos.GetSelectedValuesM).ToString
|
||||
|
||||
If ObjInventarios.RepTraspasoAlmacen(FechaI.ToDate, FechaF.ToDate, DdlAlmacenOrigen.SelectedValue.ToEntero, DdlAlmacenDestino.SelectedValue.ToEntero, ChkRecibido.Checked, UsuarioActual.CveEmpresa) Then
|
||||
If ObjInventarios.RepTraspasoAlmacen(FechaI.ToDate, FechaF.ToDate, DdlAlmacenOrigen.SelectedValue.ToEntero, DdlAlmacenDestino.SelectedValue.ToEntero, ChkRecibido.Checked, DdlTipoAlmacen.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then
|
||||
GvDatos.DataSource = ObjInventarios.DtResultados
|
||||
DtInventarios = ObjInventarios.DtResultados
|
||||
GvDatos.Columns(5).Visible = DtInventarios.MAX("Serie") <> ""
|
||||
@@ -119,6 +119,12 @@ Partial Class RepTraspasoAlmacen
|
||||
DdlAlmacenOrigen.SelectedValue = "-1"
|
||||
DdlAlmacenOrigen.DataBind()
|
||||
DdlAlmacenOrigen.SelectedValueExist(UsuarioActual.CveAlmacen)
|
||||
|
||||
DdlTipoAlmacen.DataSource = GlobalDTTipoAlmacen(1).FiltraParametros("CveTipoAlmacen NOT IN (3,4,9,10,11,21)")
|
||||
DdlTipoAlmacen.DataBind()
|
||||
DdlTipoAlmacen.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
|
||||
|
||||
End Sub
|
||||
Private Sub CargaAlmacenDestino()
|
||||
DdlAlmacenDestino.DataSource = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltraParametros("CveTipoAlmacen NOT IN (3,4,9,10,11,21)")
|
||||
|
||||
@@ -615,7 +615,7 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
End If
|
||||
'Existencia= Inv.GetExistenciasPS(CvePS, CveUnidadMedida, UsuarioActual.CveEmpresa, DdlAlmacenOrigen.SelectedValue.ToEntero, FechaMovto:=TxtFecha.Text.ToDate.ToString("yyyy/MM/dd 23:59"), PendientePorSurtir:=1)
|
||||
|
||||
If Existencia > Cantidad Then
|
||||
If Existencia >= Cantidad Then
|
||||
'la primera vez valida, que la existencia global, cumpla, considerando lo pendiente por surtir
|
||||
'las segunda consulta, que tenga existencia, ya con los parametros especificos
|
||||
If (FechaCaducidad > MinFecha OrElse Not Serie.Contiene("", "-1") OrElse Not Lote.Contiene("", "-1")) Then
|
||||
@@ -647,6 +647,7 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
Else
|
||||
Alert("No hay existencia del producto", TipoMensaje.MsgAdvertencia)
|
||||
RegistraScript("playsonidito(''142608__autistic-lucario__error.wav'')")
|
||||
Retorno = False
|
||||
End If
|
||||
|
||||
Inv.Dispose()
|
||||
@@ -863,7 +864,7 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
'las segunda consulta, que tenga existencia, ya con los parametros especificos
|
||||
If FechaCaducidad > MinFecha OrElse (Lote <> "-1" AndAlso Lote <> "") Then
|
||||
If ObjInventario.GetExistenciasProducto(dr("CvePS").ToString.ToEntero, dr("CveUM").ToString.ToEntero, UsuarioActual.CveEmpresa, DdlAlmacenOrigen.SelectedValue.ToEntero, FechaMovto:=TxtFecha.Text.ToDateTime.ToString("yyyy/MM/dd HH:mm"), CveSeccionAlmacen:=CveSeccionAlmacen, Serie:=Serie, Lote:=Lote, Caducidad:=FechaCaducidad) Then
|
||||
ExistenciaEspecificada = ObjInventario.DtResultados.FiltroPrimeroValor("ExistenciaFinal", String.Format("CVeAlmacen = {0}", DdlAlmacenOrigen.SelectedValue)).ToDecimal
|
||||
ExistenciaEspecificada = ObjInventario.DtResultados.FiltroPrimeroValor("Existencia", String.Format("CveAlmacen = {0}", DdlAlmacenOrigen.SelectedValue)).ToDecimal
|
||||
End If
|
||||
|
||||
'ExistenciaEspecificada = ObjInventario.GetExistenciasPS(dr("CvePS").ToString.ToEntero, dr("CveUM").ToString.ToEntero, UsuarioActual.CveEmpresa, DdlAlmacenOrigen.SelectedValue.ToEntero, FechaMovto:=TxtFecha.Text.ToDate.ToString("yyyy/MM/dd 23:59"), CveSeccionAlmacen:=CveSeccionAlmacen, Serie:=Serie, Lote:=Lote, FechaCaducidad:=FechaCaducidad, PendientePorSurtir:=-1)
|
||||
@@ -1721,12 +1722,6 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
'FUNCIONALIDAD PISTOLA DE CODIGOS
|
||||
If UsuarioActual.Empresa.Funcionalidad(132) = "1" And e.Row.DBCampo("CodigoBarras").Trim <> "" Then
|
||||
e.Row.FCTextBox("TxtCantidad").Enabled = False
|
||||
@@ -1747,6 +1742,7 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
Dim TextoError As String = ""
|
||||
Dim Fecha As Date = TxtFechaRecepcion.Text.ToDate
|
||||
Dim CveMovimientoVirtualEntrada As Integer = 0
|
||||
Dim CveMovimientoSalidaTransitorio As Integer = 0
|
||||
Dim FolioVirtualEntrada As Integer = 0
|
||||
|
||||
Dim ObjInventario As New ClsInventarios
|
||||
@@ -1761,6 +1757,13 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
ErrorMovInv = True
|
||||
End If
|
||||
|
||||
|
||||
'AGREGAMOS LA SALIDA
|
||||
CveMovimientoSalidaTransitorio = ObjInventario.AddMovimiento(CveAlmacenTransitorio, 8, 1, Fecha, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1,
|
||||
Observaciones:=TxtObservacionesRecepcion.Text.Trim, CveAlmacenDestino:=GvDatosRecepcion.Rows(0).DataKey("CveAlmacenSalida").ToEntero,
|
||||
CveMovimientoRelacionado:=CveMovimientoEntrada, Modulo:="TA/G12")
|
||||
|
||||
|
||||
Dim CvePrePoliza As Integer = -1
|
||||
Dim Concepto As String = TxtObservacionesRecepcion.Text
|
||||
If Concepto = "" Then Concepto = "Cancelación Traspaso"
|
||||
@@ -1796,11 +1799,21 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
Exit For
|
||||
End If
|
||||
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntrada, Cantidad, GvRow.DataKey("CveUM").ToEntero, CvePS, PrecioUnitario, GvRow.DataKey("CveAF").ToEntero, -1, Serie:=GvRow.DataKey("Serie").ToString, Lote:=GvRow.DataKey("Lote"), FechaCaducidad:=GvRow.DataKey("FechaCaducidad").ToDate, CveMovimientoDetalleEntrada:=CveMovimientoDetalleSalida) Then
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntrada, Cantidad, GvRow.DataKey("CveUM").ToEntero, CvePS, PrecioUnitario, -1, -1, Serie:=GvRow.DataKey("Serie").ToString, Lote:=GvRow.DataKey("Lote"), FechaCaducidad:=GvRow.DataKey("FechaCaducidad").ToDate, CveMovimientoDetalleEntrada:=CveMovimientoDetalleSalida) Then
|
||||
ErrorMovInv = True
|
||||
TextoError = "Ocurrió un error al guardar los movimientos de entrada"
|
||||
Exit For
|
||||
End If
|
||||
'MOV, Alm, Transito
|
||||
If GvRow.DataKey("CveMovimientoDetalleTransitorio").ToString.ToEntero > 0 Then
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalidaTransitorio, Cantidad, GvRow.DataKey("CveUM").ToString.ToEntero, CvePS, PrecioUnitario, CveSeccionAlmacen:=-3, Serie:=GvRow.DataKey("Serie").ToString, Lote:=GvRow.DataKey("Lote").ToString, FechaCaducidad:=GvRow.DataKey("FechaCaducidad").ToDate, CveMovimientoDetalleEntrada:=GvRow.DataKey("CveMovimientoDetalleTransitorio").ToString.ToEntero) Then
|
||||
ErrorMovInv = True
|
||||
TextoError = "Ocurrió un error al guardar los movimientos de salida"
|
||||
Exit For
|
||||
End If
|
||||
Else
|
||||
CveMovimientoSalidaTransitorio = 0
|
||||
End If
|
||||
importe += Cantidad * PrecioUnitario
|
||||
End If
|
||||
End If
|
||||
@@ -1860,16 +1873,16 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
Dim IdCtaContable As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", String.Format("CveAlmacen = {0}", DdlAlmacenTransitorioRecepcion.SelectedValue.ToEntero)).ToEntero
|
||||
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, ImporteDecimal, TxtObservaciones.Text, 68, TxtObservaciones.Text, Fecha, IdCtaContable, -1,
|
||||
CveMovimientoAlmacen:=CveMovimientoEntrada, ImporteMX:=ImporteDecimal) Then
|
||||
CveMovimientoAlmacen:=CveMovimientoEntrada, ImporteMX:=ImporteDecimal, Contabilizable:=False) Then
|
||||
ErrorMovInv = True
|
||||
TextoError = "Ocurrió un error al cancelar el traspaso"
|
||||
End If
|
||||
|
||||
'If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, ImporteDecimal, TxtObservaciones.Text, 68, TxtObservaciones.Text, Fecha, IdCtaContable, -1,
|
||||
' CveMovimientoAlmacen:=CveMovimientoSalida, ImporteMX:=ImporteDecimal) Then
|
||||
' ErrorMovInv = True
|
||||
' TextoError = "Ocurrió un erro al cancelar el traspaso"
|
||||
'End If
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, ImporteDecimal, TxtObservaciones.Text, 68, TxtObservaciones.Text, Fecha, IdCtaContable, -1,
|
||||
CveMovimientoAlmacen:=CveMovimientoSalidaTransitorio, ImporteMX:=ImporteDecimal, Contabilizable:=False) Then
|
||||
ErrorMovInv = True
|
||||
TextoError = "Ocurrió un erro al cancelar el traspaso"
|
||||
End If
|
||||
End If
|
||||
|
||||
End If
|
||||
@@ -2632,6 +2645,7 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
ObjFactura.RetISR = 0
|
||||
ObjFactura.IEPS = 0
|
||||
ObjFactura.Total = 0
|
||||
ObjFactura.RFCReceptor = "XAXX010101000"
|
||||
|
||||
'DETALLES
|
||||
ObjFactura.DtDetalle = DtMovimientos
|
||||
|
||||
@@ -99,7 +99,7 @@ Partial Class OC_CatEstatus
|
||||
Dim ObjEstatus As New ClsOC
|
||||
If ObjEstatus.GetEstatus() Then
|
||||
ViewState("DTOCEstatus") = ObjEstatus.DtResultados.FiltraParametros(String.Format("CveEmpresa = {0}", UsuarioActual.CveEmpresa))
|
||||
GlobalDTOCEstatus(-1) = ObjEstatus.DtResultados
|
||||
GlobalDTOCEstatus(UsuarioActual.CveEmpresa) = ObjEstatus.DtResultados
|
||||
Else
|
||||
GvDatos.DataSource = Nothing
|
||||
End If
|
||||
|
||||
@@ -1102,7 +1102,7 @@
|
||||
<div class="portlet-title">
|
||||
<div class="caption font-green">
|
||||
<%--<i class="fa fa-users font-green"></i>--%>
|
||||
<span class="caption-subject bold uppercase">Cotizaciones Rapidas</span>
|
||||
<span class="caption-subject bold uppercase">Cotizaciones Rápidas</span>
|
||||
</div>
|
||||
<div class="actions">
|
||||
<div class="btn-group">
|
||||
|
||||
@@ -954,7 +954,7 @@
|
||||
|
||||
<asp:UpdatePanel ID="UpUniformesResguardo" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvUniformesResguardo" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron registros" DataKeyNames="CveAlmacen,CodigoPS,PU,CveUM,CveMovimiento,CveMovimientoDetalle,CvePS,AplicaSeccion,AplicaSerie,CveSeccionAlmacen,Cantidad,Serie" ToolTip=""
|
||||
<asp:GridView ID="GvUniformesResguardo" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron registros" DataKeyNames="CveAlmacen,CodigoPS,PU,CveUM,CveMovimiento,CveMovimientoDetalle,CvePS,AplicaSeccion,AplicaSerie,CveSeccionAlmacen,Cantidad,Serie,Saldo" ToolTip=""
|
||||
CssClass="table table-hover table-advance Widthall" GridLines="None">
|
||||
<Columns>
|
||||
<asp:HyperLinkField DataNavigateUrlFields="CveMovimiento" Target="_blank" HeaderText="Folio" DataNavigateUrlFormatString="../Inventarios/EntradasSalidas.aspx?CveMovimiento={0}" DataTextField="Folio" />
|
||||
@@ -979,7 +979,7 @@
|
||||
<asp:Literal ID="LtlObserbacion" runat="server" Text='<%# If(Eval("Observaciones").ToString = "", "ND", Eval("Observaciones")) %>'>></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>--%>
|
||||
<asp:BoundField runat="server" DataField="Cantidad" HeaderText="Cantidad" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:###,###}" />
|
||||
<asp:BoundField runat="server" DataField="Saldo" HeaderText="Cantidad" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:###,###}" />
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Left" HeaderText="Opciones">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LnkLiberar" runat="server" Enabled='<%# If(CInt(Eval("LiberadoConfirm")) > 0, False, True)%>' OnClick="LbLiberarUniforme" Style=' <%# If(CInt(Eval("LiberadoConfirm")) > 0, "color:red", "color:#337ab7")%>' Text='<%# If(CInt(Eval("LiberadoConfirm")) > 0, "Devuelto", "Liberar")%>' data-toggle='<%# If(CInt(Eval("LiberadoConfirm")) > 0, "collapse", "confirmation")%>' data-popout="true" data-original-title="¿Esta seguro que desea liberar el Resguardo?" data-btn-ok-label="si"></asp:LinkButton>
|
||||
|
||||
@@ -112,20 +112,20 @@
|
||||
<asp:TextBox ID="TxtUsuario" runat="server"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVUsuario" runat="server" ControlToValidate="TxtUsuario" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Usuario''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEUsuario" runat="server" HighlightCssClass="vco" TargetControlID="RFVUsuario" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
|
||||
|
||||
|
||||
<asp:LinkButton ID="LnkRestablecer" runat="server" ToolTip="Restablecer Contraseña" data-toggle="confirmation" data-popout="true">
|
||||
<i class="material-icons" style="font-size:20px;">vpn_lock</i>
|
||||
<asp:LinkButton ID="LnkRestablecer" runat="server" ToolTip="Restablecer Contraseña" data-toggle="confirmation" data-popout="true">
|
||||
<i class="material-icons" style="font-size:20px;">vpn_lock</i>
|
||||
</asp:LinkButton>
|
||||
<asp:LinkButton ID="LnkVerPass" runat="server" ToolTip="Ver Contraseña" Visible="false">
|
||||
<i class="material-icons" style="font-size:20px;">lock</i>
|
||||
<asp:LinkButton ID="LnkVerPass" runat="server" ToolTip="Ver Contraseña" Visible="false">
|
||||
<i class="material-icons" style="font-size:20px;">lock</i>
|
||||
</asp:LinkButton>
|
||||
<asp:LinkButton ID="LnkRenviaCorreo" runat="server" ToolTip="Reenviar Correo" Visible="false">
|
||||
<i class="material-icons" style="font-size:20px;">email</i>
|
||||
<asp:LinkButton ID="LnkRenviaCorreo" runat="server" ToolTip="Reenviar Correo" Visible="false">
|
||||
<i class="material-icons" style="font-size:20px;">email</i>
|
||||
</asp:LinkButton>
|
||||
<%--<asp:ImageButton ID="ImgRestablecer" runat="server" AlternateText="Restablecer Contraseña"
|
||||
ToolTip="Restablecer Contraseña" CausesValidation="False" ImageUrl="/Imagenes/ResetPassword.jpg"
|
||||
OnClientClick="return confirm('Está seguro que desea restablecer la contraseña?')" Height="16" Width="16" />--%>
|
||||
<%--<asp:ImageButton ID="ImgRestablecer" runat="server" AlternateText="Restablecer Contraseña"
|
||||
ToolTip="Restablecer Contraseña" CausesValidation="False" ImageUrl="/Imagenes/ResetPassword.jpg"
|
||||
OnClientClick="return confirm('Está seguro que desea restablecer la contraseña?')" Height="16" Width="16" />--%>
|
||||
</td>
|
||||
</tr>
|
||||
<tr runat="server" id="TrContraseña">
|
||||
@@ -162,27 +162,27 @@
|
||||
<ajax:ValidatorCalloutExtender ID="VCECorreo" runat="server" HighlightCssClass="vco" TargetControlID="RFVCorreo" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
</tr>
|
||||
<%--<tr>
|
||||
<td>Supervisa:</td>
|
||||
<td>
|
||||
<asp:DropDownList ID="DdlSupervisa" runat="server" AppendDataBoundItems="true" DataTextField="Nombre" DataValueField="CveUsuario" Width="400px" ValidationGroup="GrpGuardar">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
|
||||
<asp:RequiredFieldValidator ID="RFVSupervisa" runat="server" ControlToValidate="DdlSupervisa" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Supervisa''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOSupervisa" runat="server" HighlightCssClass="vco" TargetControlID="RFVSupervisa" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Autoriza:</td>
|
||||
<td>
|
||||
<asp:DropDownList ID="DdlAutoriza" runat="server" AppendDataBoundItems="true" DataTextField="Nombre" DataValueField="CveUsuario" Width="400px" ValidationGroup="GrpGuardar">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
|
||||
<asp:RequiredFieldValidator ID="RFVAutoriza" runat="server" ControlToValidate="DdlAutoriza" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Autoriza''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOAutoriza" runat="server" HighlightCssClass="vco" TargetControlID="RFVAutoriza" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
<%--<tr>
|
||||
<td>Supervisa:</td>
|
||||
<td>
|
||||
<asp:DropDownList ID="DdlSupervisa" runat="server" AppendDataBoundItems="true" DataTextField="Nombre" DataValueField="CveUsuario" Width="400px" ValidationGroup="GrpGuardar">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
|
||||
<asp:RequiredFieldValidator ID="RFVSupervisa" runat="server" ControlToValidate="DdlSupervisa" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Supervisa''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOSupervisa" runat="server" HighlightCssClass="vco" TargetControlID="RFVSupervisa" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Autoriza:</td>
|
||||
<td>
|
||||
<asp:DropDownList ID="DdlAutoriza" runat="server" AppendDataBoundItems="true" DataTextField="Nombre" DataValueField="CveUsuario" Width="400px" ValidationGroup="GrpGuardar">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
|
||||
<asp:RequiredFieldValidator ID="RFVAutoriza" runat="server" ControlToValidate="DdlAutoriza" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Autoriza''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOAutoriza" runat="server" HighlightCssClass="vco" TargetControlID="RFVAutoriza" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
</tr>--%>
|
||||
<tr>
|
||||
<td>Empresa:</td>
|
||||
@@ -212,8 +212,8 @@
|
||||
<asp:TextBox ID="TxtCodigoAcceso" runat="server" type="password" Width="400px"></asp:TextBox>
|
||||
</td>
|
||||
<td>
|
||||
<asp:LinkButton ID="LnkVerCodigoAcceso" runat="server" ToolTip="Ver Código Acceso">
|
||||
<i class="material-icons" style="font-size:20px;">lock</i>
|
||||
<asp:LinkButton ID="LnkVerCodigoAcceso" runat="server" ToolTip="Ver Código Acceso">
|
||||
<i class="material-icons" style="font-size:20px;">lock</i>
|
||||
</asp:LinkButton>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -369,7 +369,7 @@
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<EditItemTemplate>
|
||||
<asp:LinkButton ID="imgU" runat="server" AlternateText="Actualizar" CausesValidation="True" CommandName="Update" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-check'></i>" ValidationGroup="GrpEditAlmacen" />
|
||||
<asp:LinkButton ID="imgU" runat="server" AlternateText="Actualizar" CausesValidation="True" CommandName="Update" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-check'></i>" ValidationGroup="GrpEditAlmacen" />
|
||||
|
||||
<asp:LinkButton ID="imgC" runat="server" AlternateText="Cancelar" CausesValidation="False" CommandName="Cancel" CssClass="btn btn-circle btn-sm red" Text="<i class='fa fa-times'></i>" />
|
||||
</EditItemTemplate>
|
||||
@@ -455,7 +455,7 @@
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<EditItemTemplate>
|
||||
<asp:LinkButton ID="imgU" runat="server" AlternateText="Actualizar" CausesValidation="True" CommandName="Update" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-check'></i>" ValidationGroup="GrpEditSubProyecto" />
|
||||
<asp:LinkButton ID="imgU" runat="server" AlternateText="Actualizar" CausesValidation="True" CommandName="Update" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-check'></i>" ValidationGroup="GrpEditSubProyecto" />
|
||||
|
||||
<asp:LinkButton ID="imgC" runat="server" AlternateText="Cancelar" CausesValidation="False" CommandName="Cancel" CssClass="btn btn-circle btn-sm red" Text="<i class='fa fa-times'></i>" />
|
||||
</EditItemTemplate>
|
||||
@@ -501,6 +501,18 @@
|
||||
|
||||
<asp:TemplateField Visible="false">
|
||||
<ItemStyle HorizontalAlign="Center" />
|
||||
<HeaderTemplate>
|
||||
<table style="text-align: center; width: 100%">
|
||||
<tr>
|
||||
<td style="width: 30%; text-align: right">
|
||||
<asp:CheckBox ID="chkEstatusREQAll1" ClientIDMode="Static" runat="server" onclick="chkSeleccionarEstatus(chkEstatusREQAll1,'chkEstatusREQ1');" />
|
||||
</td>
|
||||
<td style="width: 70%; text-align: center">
|
||||
<asp:Label ID="LblTituloEstatusREQ1" runat="server"></asp:Label>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<table style="text-align: center; width: 100%">
|
||||
<tr>
|
||||
@@ -522,6 +534,18 @@
|
||||
|
||||
<asp:TemplateField Visible="false">
|
||||
<ItemStyle HorizontalAlign="Center" />
|
||||
<HeaderTemplate>
|
||||
<table style="text-align: center; width: 100%">
|
||||
<tr>
|
||||
<td style="width: 30%; text-align: right">
|
||||
<asp:CheckBox ID="chkEstatusREQAll2" ClientIDMode="Static" runat="server" onclick="chkSeleccionarEstatus(chkEstatusREQAll2,'chkEstatusREQ2');" />
|
||||
</td>
|
||||
<td style="width: 70%; text-align: center">
|
||||
<asp:Label ID="LblTituloEstatusREQ2" runat="server"></asp:Label>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<table style="text-align: center; width: 100%">
|
||||
<tr>
|
||||
@@ -543,6 +567,18 @@
|
||||
|
||||
<asp:TemplateField Visible="false">
|
||||
<ItemStyle HorizontalAlign="Center" />
|
||||
<HeaderTemplate>
|
||||
<table style="text-align: center; width: 100%">
|
||||
<tr>
|
||||
<td style="width: 30%; text-align: right">
|
||||
<asp:CheckBox ID="chkEstatusREQAll3" ClientIDMode="Static" runat="server" onclick="chkSeleccionarEstatus(chkEstatusREQAll3,'chkEstatusREQ3');" />
|
||||
</td>
|
||||
<td style="width: 70%; text-align: center">
|
||||
<asp:Label ID="LblTituloEstatusREQ3" runat="server"></asp:Label>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<table style="text-align: center; width: 100%">
|
||||
<tr>
|
||||
@@ -564,6 +600,18 @@
|
||||
|
||||
<asp:TemplateField Visible="false">
|
||||
<ItemStyle HorizontalAlign="Center" />
|
||||
<HeaderTemplate>
|
||||
<table style="text-align: center; width: 100%">
|
||||
<tr>
|
||||
<td style="width: 30%; text-align: right">
|
||||
<asp:CheckBox ID="chkEstatusREQAll4" ClientIDMode="Static" runat="server" onclick="chkSeleccionarEstatus(chkEstatusREQAll4,'chkEstatusREQ4');" />
|
||||
</td>
|
||||
<td style="width: 70%; text-align: center">
|
||||
<asp:Label ID="LblTituloEstatusREQ4" runat="server"></asp:Label>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<table style="text-align: center; width: 100%">
|
||||
<tr>
|
||||
@@ -585,6 +633,18 @@
|
||||
|
||||
<asp:TemplateField Visible="false">
|
||||
<ItemStyle HorizontalAlign="Center" />
|
||||
<HeaderTemplate>
|
||||
<table style="text-align: center; width: 100%">
|
||||
<tr>
|
||||
<td style="width: 30%; text-align: right">
|
||||
<asp:CheckBox ID="chkEstatusREQAll5" ClientIDMode="Static" runat="server" onclick="chkSeleccionarEstatus(chkEstatusREQAll5,'chkEstatusREQ5');" />
|
||||
</td>
|
||||
<td style="width: 70%; text-align: center">
|
||||
<asp:Label ID="LblTituloEstatusREQ5" runat="server"></asp:Label>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<table style="text-align: center; width: 100%">
|
||||
<tr>
|
||||
@@ -606,6 +666,18 @@
|
||||
|
||||
<asp:TemplateField Visible="false">
|
||||
<ItemStyle HorizontalAlign="Center" />
|
||||
<HeaderTemplate>
|
||||
<table style="text-align: center; width: 100%">
|
||||
<tr>
|
||||
<td style="width: 30%; text-align: right">
|
||||
<asp:CheckBox ID="chkEstatusREQAll6" ClientIDMode="Static" runat="server" onclick="chkSeleccionarEstatus(chkEstatusREQAll6,'chkEstatusREQ6');" />
|
||||
</td>
|
||||
<td style="width: 70%; text-align: center">
|
||||
<asp:Label ID="LblTituloEstatusREQ6" runat="server"></asp:Label>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<table style="text-align: center; width: 100%">
|
||||
<tr>
|
||||
@@ -627,6 +699,18 @@
|
||||
|
||||
<asp:TemplateField Visible="false">
|
||||
<ItemStyle HorizontalAlign="Center" />
|
||||
<HeaderTemplate>
|
||||
<table style="text-align: center; width: 100%">
|
||||
<tr>
|
||||
<td style="width: 30%; text-align: right">
|
||||
<asp:CheckBox ID="chkEstatusREQAll7" ClientIDMode="Static" runat="server" onclick="chkSeleccionarEstatus(chkEstatusREQAll7,'chkEstatusREQ7');" />
|
||||
</td>
|
||||
<td style="width: 70%; text-align: center">
|
||||
<asp:Label ID="LblTituloEstatusREQ7" runat="server"></asp:Label>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<table style="text-align: center; width: 100%">
|
||||
<tr>
|
||||
@@ -648,6 +732,18 @@
|
||||
|
||||
<asp:TemplateField Visible="false">
|
||||
<ItemStyle HorizontalAlign="Center" />
|
||||
<HeaderTemplate>
|
||||
<table style="text-align: center; width: 100%">
|
||||
<tr>
|
||||
<td style="width: 30%; text-align: right">
|
||||
<asp:CheckBox ID="chkEstatusREQAll8" ClientIDMode="Static" runat="server" onclick="chkSeleccionarEstatus(chkEstatusREQAll8,'chkEstatusREQ8');" />
|
||||
</td>
|
||||
<td style="width: 70%; text-align: center">
|
||||
<asp:Label ID="LblTituloEstatusREQ8" runat="server"></asp:Label>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<table style="text-align: center; width: 100%">
|
||||
<tr>
|
||||
@@ -669,6 +765,18 @@
|
||||
|
||||
<asp:TemplateField Visible="false">
|
||||
<ItemStyle HorizontalAlign="Center" />
|
||||
<HeaderTemplate>
|
||||
<table style="text-align: center; width: 100%">
|
||||
<tr>
|
||||
<td style="width: 30%; text-align: right">
|
||||
<asp:CheckBox ID="chkEstatusREQAll9" ClientIDMode="Static" runat="server" onclick="chkSeleccionarEstatus(chkEstatusREQAll9,'chkEstatusREQ9');" />
|
||||
</td>
|
||||
<td style="width: 70%; text-align: center">
|
||||
<asp:Label ID="LblTituloEstatusREQ9" runat="server"></asp:Label>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<table style="text-align: center; width: 100%">
|
||||
<tr>
|
||||
@@ -690,6 +798,18 @@
|
||||
|
||||
<asp:TemplateField Visible="false">
|
||||
<ItemStyle HorizontalAlign="Center" />
|
||||
<HeaderTemplate>
|
||||
<table style="text-align: center; width: 100%">
|
||||
<tr>
|
||||
<td style="width: 30%; text-align: right">
|
||||
<asp:CheckBox ID="chkEstatusREQAll10" ClientIDMode="Static" runat="server" onclick="chkSeleccionarEstatus(chkEstatusREQAll10,'chkEstatusREQ10');" />
|
||||
</td>
|
||||
<td style="width: 70%; text-align: center">
|
||||
<asp:Label ID="LblTituloEstatusREQ10" runat="server"></asp:Label>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<table style="text-align: center; width: 100%">
|
||||
<tr>
|
||||
@@ -723,6 +843,18 @@
|
||||
<asp:BoundField HeaderText="SubProyecto" DataField="SubProyecto" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:TemplateField Visible="false">
|
||||
<ItemStyle HorizontalAlign="Center" />
|
||||
<HeaderTemplate>
|
||||
<table style="text-align: center; width: 100%">
|
||||
<tr>
|
||||
<td style="width: 30%; text-align: right">
|
||||
<asp:CheckBox ID="chkEstatusAll1" ClientIDMode="Static" runat="server" onclick="chkSeleccionarEstatus(chkEstatusAll1,'chkEstatus1');" />
|
||||
</td>
|
||||
<td style="width: 70%; text-align: center">
|
||||
<asp:Label ID="LblTituloEstatus1" runat="server"></asp:Label>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<table style="text-align: center; width: 100%">
|
||||
<tr>
|
||||
@@ -744,6 +876,18 @@
|
||||
|
||||
<asp:TemplateField Visible="false">
|
||||
<ItemStyle HorizontalAlign="Center" />
|
||||
<HeaderTemplate>
|
||||
<table style="text-align: center; width: 100%">
|
||||
<tr>
|
||||
<td style="width: 30%; text-align: right">
|
||||
<asp:CheckBox ID="chkEstatusAll2" ClientIDMode="Static" runat="server" onclick="chkSeleccionarEstatus(chkEstatusAll2,'chkEstatus2');" />
|
||||
</td>
|
||||
<td style="width: 70%; text-align: center">
|
||||
<asp:Label ID="LblTituloEstatus2" runat="server"></asp:Label>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<table style="text-align: center; width: 100%">
|
||||
<tr>
|
||||
@@ -765,6 +909,18 @@
|
||||
|
||||
<asp:TemplateField Visible="false">
|
||||
<ItemStyle HorizontalAlign="Center" />
|
||||
<HeaderTemplate>
|
||||
<table style="text-align: center; width: 100%">
|
||||
<tr>
|
||||
<td style="width: 30%; text-align: right">
|
||||
<asp:CheckBox ID="chkEstatusAll3" ClientIDMode="Static" runat="server" onclick="chkSeleccionarEstatus(chkEstatusAll3,'chkEstatus3');" />
|
||||
</td>
|
||||
<td style="width: 70%; text-align: center">
|
||||
<asp:Label ID="LblTituloEstatus3" runat="server"></asp:Label>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<table style="text-align: center; width: 100%">
|
||||
<tr>
|
||||
@@ -786,6 +942,18 @@
|
||||
|
||||
<asp:TemplateField Visible="false">
|
||||
<ItemStyle HorizontalAlign="Center" />
|
||||
<HeaderTemplate>
|
||||
<table style="text-align: center; width: 100%">
|
||||
<tr>
|
||||
<td style="width: 30%; text-align: right">
|
||||
<asp:CheckBox ID="chkEstatusAll4" ClientIDMode="Static" runat="server" onclick="chkSeleccionarEstatus(chkEstatusAll4,'chkEstatus4');" />
|
||||
</td>
|
||||
<td style="width: 70%; text-align: center">
|
||||
<asp:Label ID="LblTituloEstatus4" runat="server"></asp:Label>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<table style="text-align: center; width: 100%">
|
||||
<tr>
|
||||
@@ -807,6 +975,18 @@
|
||||
|
||||
<asp:TemplateField Visible="false">
|
||||
<ItemStyle HorizontalAlign="Center" />
|
||||
<HeaderTemplate>
|
||||
<table style="text-align: center; width: 100%">
|
||||
<tr>
|
||||
<td style="width: 30%; text-align: right">
|
||||
<asp:CheckBox ID="chkEstatusAll5" ClientIDMode="Static" runat="server" onclick="chkSeleccionarEstatus(chkEstatusAll5,'chkEstatus5');" />
|
||||
</td>
|
||||
<td style="width: 70%; text-align: center">
|
||||
<asp:Label ID="LblTituloEstatus5" runat="server"></asp:Label>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<table style="text-align: center; width: 100%">
|
||||
<tr>
|
||||
@@ -828,6 +1008,18 @@
|
||||
|
||||
<asp:TemplateField Visible="false">
|
||||
<ItemStyle HorizontalAlign="Center" />
|
||||
<HeaderTemplate>
|
||||
<table style="text-align: center; width: 100%">
|
||||
<tr>
|
||||
<td style="width: 30%; text-align: right">
|
||||
<asp:CheckBox ID="chkEstatusAll6" ClientIDMode="Static" runat="server" onclick="chkSeleccionarEstatus(chkEstatusAll6,'chkEstatus6');" />
|
||||
</td>
|
||||
<td style="width: 70%; text-align: center">
|
||||
<asp:Label ID="LblTituloEstatus6" runat="server"></asp:Label>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<table style="text-align: center; width: 100%">
|
||||
<tr>
|
||||
@@ -849,6 +1041,18 @@
|
||||
|
||||
<asp:TemplateField Visible="false">
|
||||
<ItemStyle HorizontalAlign="Center" />
|
||||
<HeaderTemplate>
|
||||
<table style="text-align: center; width: 100%">
|
||||
<tr>
|
||||
<td style="width: 30%; text-align: right">
|
||||
<asp:CheckBox ID="chkEstatusAll7" ClientIDMode="Static" runat="server" onclick="chkSeleccionarEstatus(chkEstatusAll7,'chkEstatus7');" />
|
||||
</td>
|
||||
<td style="width: 70%; text-align: center">
|
||||
<asp:Label ID="LblTituloEstatus7" runat="server"></asp:Label>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<table style="text-align: center; width: 100%">
|
||||
<tr>
|
||||
@@ -870,6 +1074,18 @@
|
||||
|
||||
<asp:TemplateField Visible="false">
|
||||
<ItemStyle HorizontalAlign="Center" />
|
||||
<HeaderTemplate>
|
||||
<table style="text-align: center; width: 100%">
|
||||
<tr>
|
||||
<td style="width: 30%; text-align: right">
|
||||
<asp:CheckBox ID="chkEstatusAll8" ClientIDMode="Static" runat="server" onclick="chkSeleccionarEstatus(chkEstatusAll8,'chkEstatus8');" />
|
||||
</td>
|
||||
<td style="width: 70%; text-align: center">
|
||||
<asp:Label ID="LblTituloEstatus8" runat="server"></asp:Label>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<table style="text-align: center; width: 100%">
|
||||
<tr>
|
||||
@@ -891,6 +1107,18 @@
|
||||
|
||||
<asp:TemplateField Visible="false">
|
||||
<ItemStyle HorizontalAlign="Center" />
|
||||
<HeaderTemplate>
|
||||
<table style="text-align: center; width: 100%">
|
||||
<tr>
|
||||
<td style="width: 30%; text-align: right">
|
||||
<asp:CheckBox ID="chkEstatusAll9" ClientIDMode="Static" runat="server" onclick="chkSeleccionarEstatus(chkEstatusAll9,'chkEstatus9');" />
|
||||
</td>
|
||||
<td style="width: 70%; text-align: center">
|
||||
<asp:Label ID="LblTituloEstatus9" runat="server"></asp:Label>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<table style="text-align: center; width: 100%">
|
||||
<tr>
|
||||
@@ -912,6 +1140,18 @@
|
||||
|
||||
<asp:TemplateField Visible="false">
|
||||
<ItemStyle HorizontalAlign="Center" />
|
||||
<HeaderTemplate>
|
||||
<table style="text-align: center; width: 100%">
|
||||
<tr>
|
||||
<td style="width: 30%; text-align: right">
|
||||
<asp:CheckBox ID="chkEstatusAll10" ClientIDMode="Static" runat="server" onclick="chkSeleccionarEstatus(chkEstatusAll10,'chkEstatus10');" />
|
||||
</td>
|
||||
<td style="width: 70%; text-align: center">
|
||||
<asp:Label ID="LblTituloEstatus10" runat="server"></asp:Label>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<table style="text-align: center; width: 100%">
|
||||
<tr>
|
||||
@@ -1626,7 +1866,7 @@
|
||||
<div class="titlefiltros caption ">
|
||||
<div class="row">
|
||||
<div class="col-md-1">
|
||||
Empresa:
|
||||
Empresa:
|
||||
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
@@ -2054,7 +2294,7 @@
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<EditItemTemplate>
|
||||
<asp:LinkButton ID="imgU" runat="server" AlternateText="Actualizar" CausesValidation="True" CommandName="Update" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-check'></i>" ValidationGroup="GrpEditSubProyecto" />
|
||||
<asp:LinkButton ID="imgU" runat="server" AlternateText="Actualizar" CausesValidation="True" CommandName="Update" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-check'></i>" ValidationGroup="GrpEditSubProyecto" />
|
||||
|
||||
<asp:LinkButton ID="imgC" runat="server" AlternateText="Cancelar" CausesValidation="False" CommandName="Cancel" CssClass="btn btn-circle btn-sm red" Text="<i class='fa fa-times'></i>" />
|
||||
</EditItemTemplate>
|
||||
@@ -2415,7 +2655,7 @@
|
||||
<div class="modal-body">
|
||||
<div class="row">
|
||||
<div class="col-md-3">
|
||||
Usuario a clonar:
|
||||
Usuario a clonar:
|
||||
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
@@ -2507,7 +2747,7 @@
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-3" style="max-width: 150px;">
|
||||
IP:
|
||||
IP:
|
||||
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
@@ -2516,7 +2756,7 @@
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-3" style="max-width: 150px;">
|
||||
Mac:
|
||||
Mac:
|
||||
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
@@ -2527,18 +2767,18 @@
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<%--<div class="row">
|
||||
<div class="col-md-3" style="max-width: 150px;">
|
||||
Restrincción por Equipo:
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<asp:CheckBox ID="chkSessionxEquipo" runat="server" CssClass="chksino" Text=" " />
|
||||
</div>
|
||||
<%--<div class="row">
|
||||
<div class="col-md-3" style="max-width: 150px;">
|
||||
Restrincción por Equipo:
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<asp:CheckBox ID="chkSessionxEquipo" runat="server" CssClass="chksino" Text=" " />
|
||||
</div>
|
||||
</div>--%>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-3" style="max-width: 150px;">
|
||||
Aplica Restricción:
|
||||
Aplica Restricción:
|
||||
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
@@ -2880,103 +3120,114 @@
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
<script src="/Metronic/assets/global/plugins/jquery.pulsate.min.js"></script>
|
||||
<script src="/Scripts/DataTables.js"></script>
|
||||
<script type="text/javascript">
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
function chk1Change(chk1, img1) {
|
||||
if (chk1.checked == true)
|
||||
$get(img1).style.display = 'inline';
|
||||
else
|
||||
if (chk1.checked == true)
|
||||
$get(img1).style.display = 'inline';
|
||||
else
|
||||
$get(img1).style.display = 'none';
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function chk1Change(chk1, img1) {
|
||||
if (chk1.checked == true)
|
||||
$get(img1).style.display = 'inline';
|
||||
else
|
||||
$get(img1).style.display = 'none';
|
||||
}
|
||||
|
||||
function chkSeleccionarEstatus(chkall, cssChk) {
|
||||
$("." + cssChk + " input").not(this).prop('checked', chkall.checked);
|
||||
}
|
||||
|
||||
function chkMostrarLimitesCambio() {
|
||||
if (chkMostrarLimites.checked == true)
|
||||
$get('DivLimites').style.display = 'inline';
|
||||
else
|
||||
if (chkMostrarLimites.checked == true)
|
||||
$get('DivLimites').style.display = 'inline';
|
||||
else
|
||||
$get('DivLimites').style.display = 'none';
|
||||
}
|
||||
|
||||
|
||||
//function AplicaRestriccion(chk) {
|
||||
// if (chk.checked) {
|
||||
// $("#C_DivRestricciones").show(500)
|
||||
// } else {
|
||||
// $("#C_DivRestricciones").hide(500)
|
||||
// }
|
||||
//}
|
||||
|
||||
}
|
||||
|
||||
|
||||
//function AplicaRestriccion(chk) {
|
||||
// if (chk.checked) {
|
||||
// $("#C_DivRestricciones").show(500)
|
||||
// } else {
|
||||
// $("#C_DivRestricciones").hide(500)
|
||||
// }
|
||||
//}
|
||||
|
||||
function CambiaHoraInicio(txt) {
|
||||
$(".HI").val(txt.value);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function CambiaHoraFin(txt) {
|
||||
$(".HF").val(txt.value);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
function OrdenarGV() {
|
||||
var Tam = TamañoVentana();
|
||||
var Alto = Tam.height - 270;
|
||||
var Tam = TamañoVentana();
|
||||
var Alto = Tam.height - 270;
|
||||
if (Alto < 100) {
|
||||
Alto = 100;
|
||||
}
|
||||
}
|
||||
$('#GvModulosAcceso').DataTable({
|
||||
scrollY: Alto + 'px',
|
||||
scrollCollapse: true,
|
||||
paging: false,
|
||||
searching: false,
|
||||
scrollY: Alto + 'px',
|
||||
scrollCollapse: true,
|
||||
paging: false,
|
||||
searching: false,
|
||||
info: false
|
||||
});
|
||||
});
|
||||
$('#GvModulosAcceso').parent().parent().children().first().css("position", "static");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function OrdenarGVModulosAsignar() {
|
||||
$('#GvModulosAsignar').DataTable({
|
||||
retrieve: true,
|
||||
scrollY: '300px',
|
||||
scrollCollapse: true,
|
||||
paging: false,
|
||||
searching: false,
|
||||
retrieve: true,
|
||||
scrollY: '300px',
|
||||
scrollCollapse: true,
|
||||
paging: false,
|
||||
searching: false,
|
||||
info: false
|
||||
});
|
||||
});
|
||||
$('#GvModulosAsignar').parent().parent().children().first().css("position", "static");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function OrdenarGVPermisosAsignar() {
|
||||
$('#GvPermisosAsignar').DataTable({
|
||||
retrieve: true,
|
||||
scrollY: '300px',
|
||||
scrollCollapse: true,
|
||||
paging: false,
|
||||
searching: false,
|
||||
retrieve: true,
|
||||
scrollY: '300px',
|
||||
scrollCollapse: true,
|
||||
paging: false,
|
||||
searching: false,
|
||||
info: false
|
||||
});
|
||||
});
|
||||
$('#GvPermisosAsignar').parent().parent().children().first().css("position", "static");
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
$('.ajax__tab_outer').click(function () {
|
||||
$.fn.dataTable.tables({ visible: true, api: true }).columns.adjust();
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
function pageLoad() {
|
||||
if ($('#DivAdvertencia')) {
|
||||
$("#DivAdvertencia").pulsate("destroy");
|
||||
$("#DivAdvertencia").pulsate("destroy");
|
||||
jQuery('#DivAdvertencia').pulsate({
|
||||
color: "#faebcc"
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$.fn.dataTable.tables({ visible: true, api: true }).columns.adjust();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function ADSReady() {
|
||||
$.fn.dataTable.tables({ visible: true, api: true }).columns.adjust();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
</script>
|
||||
</asp:Content>
|
||||
|
||||
@@ -2473,7 +2473,17 @@ Partial Class Sistemas_UsuarioDetalle
|
||||
End Sub
|
||||
#Region "GRIDVIEW"
|
||||
|
||||
Protected Sub GvEstatusUsuariosREQ_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvEstatusUsuariosREQ.RowDataBound
|
||||
Protected Sub GvEstatusUsuariosREQ_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvEstatusUsuariosREQ.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.Header Then
|
||||
For i As Integer = 2 To GvEstatusUsuariosREQ.Columns.Count - 1
|
||||
Dim CveEstatus As Integer = GvEstatusUsuariosREQ.Columns(i).FooterText.ToEntero
|
||||
Dim idIndex As Integer = i - 1
|
||||
If CveEstatus > -1 Then
|
||||
e.Row.FCLabel($"LblTituloEstatusREQ{idIndex}").Text = GvEstatusUsuariosREQ.Columns(i).HeaderText
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
Dim tmpT As DataTable = DTEstatusSubProyectos.FiltraParametros(String.Format("CveSubProyecto = {0}", e.Row.DBCampo("CveSubProyecto").ToString))
|
||||
|
||||
@@ -2487,6 +2497,7 @@ Partial Class Sistemas_UsuarioDetalle
|
||||
Dim hdnCveEstatusUsuarios As HiddenField = e.Row.FCHiddenField($"hdnCveEstatusUsuarios{idIndex}")
|
||||
Dim lblSuperior As Label = e.Row.FCLabel($"lblSuperior{idIndex}")
|
||||
Dim lblLimites As Label = e.Row.FCLabel($"lblLimites{idIndex}")
|
||||
chkEstatus.CssClass = $"chkEstatusREQ{idIndex}"
|
||||
|
||||
Dim dtTemp As New DataTable
|
||||
Dim existenPermisosActuales As Boolean
|
||||
@@ -2599,7 +2610,18 @@ Partial Class Sistemas_UsuarioDetalle
|
||||
Next
|
||||
End If
|
||||
End Sub
|
||||
Protected Sub GvEstatusUsuariosOC_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvEstatusUsuariosOC.RowDataBound
|
||||
Protected Sub GvEstatusUsuariosOC_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvEstatusUsuariosOC.RowDataBound
|
||||
|
||||
If e.Row.RowType = DataControlRowType.Header Then
|
||||
For i As Integer = 2 To GvEstatusUsuariosOC.Columns.Count - 1
|
||||
Dim CveEstatus As Integer = GvEstatusUsuariosOC.Columns(i).FooterText.ToEntero
|
||||
Dim idIndex As Integer = i - 1
|
||||
If CveEstatus > -1 Then
|
||||
e.Row.FCLabel($"LblTituloEstatus{idIndex}").Text = GvEstatusUsuariosOC.Columns(i).HeaderText
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
Dim tmpT As DataTable = DTEstatusSubProyectos.FiltraParametros(String.Format("CveSubProyecto = {0}", e.Row.DBCampo("CveSubProyecto").ToString))
|
||||
|
||||
@@ -2612,8 +2634,8 @@ Partial Class Sistemas_UsuarioDetalle
|
||||
Dim ImgClasificaciones As LinkButton = e.Row.FCLinkButton($"ImgClasificaciones{idIndex}")
|
||||
Dim hdnCveEstatusUsuarios As HiddenField = e.Row.FCHiddenField($"hdnCveEstatusUsuarios{idIndex}")
|
||||
Dim lblSuperior As Label = e.Row.FCLabel($"lblSuperior{idIndex}")
|
||||
Dim lblLimites As Label = e.Row.FCLabel($"lblLimites{idIndex}")
|
||||
|
||||
Dim lblLimites As Label = e.Row.FCLabel($"lblLimites{idIndex}")
|
||||
chkEstatus.CssClass = $"chkEstatus{idIndex}"
|
||||
|
||||
Dim dtTemp As New DataTable
|
||||
Dim existenPermisosActuales As Boolean
|
||||
|
||||
@@ -274,6 +274,7 @@
|
||||
<li runat="server" id="DivPerfil" visible="false">
|
||||
<a runat="server" id="A1" href="/RH/MiPerfil.aspx" style="cursor: pointer;"><i class="fa fa-user"></i>Mi Perfil</a>
|
||||
</li>
|
||||
<li><asp:LinkButton ID="LnkDescargarManual" runat="server" Text="<i class='fa fa-download'></i> Descargar Manual SIG" OnClick="LnkDescargarManual_Click"></asp:LinkButton></li>
|
||||
<li><a onclick="javascript:AbrirVentana('/Sistemas/CatContrasenia.aspx');"><i class="fa fa-exchange"></i>Cambiar Contraseña</a></li>
|
||||
<li runat="server" id="DivConfiguracionEmpresa" visible="false"><a runat="server" id="BtnConfiguracionEmpresa" style="cursor: pointer;"><i class="fa fa-cog"></i>Configuración Empresa</a></li>
|
||||
<li><a runat="server" id="BtnCerrarSesion"><i class="fa fa-key"></i>Cerrar Sesión</a></li>
|
||||
|
||||
@@ -77,6 +77,7 @@ Partial Class Site
|
||||
If UsuarioActual.Empresa.CvePlataforma = 3 Then
|
||||
lnkFavicon.Href = "/Imagenes/favicongps.ico"
|
||||
tTitulo.Text = "SIGNALS GPS"
|
||||
LnkDescargarManual.Visible = False
|
||||
Else
|
||||
lnkFavicon.Href = "/Imagenes/favicon.ico"
|
||||
End If
|
||||
@@ -571,6 +572,34 @@ Partial Class Site
|
||||
UpNotificacionesFoliosSAT.Update()
|
||||
RegistraScript(String.Format("$('#{0}').modal();", pnlNotificacionSAT.ClientID))
|
||||
End Sub
|
||||
Protected Sub LnkDescargarManual_Click(sender As Object, e As EventArgs)
|
||||
Dim ruta As String = $"{ModExtensiones.DirectorioEmpresas}Grales\ManualSIG.pdf"
|
||||
|
||||
Dim Archivo As New System.IO.FileInfo(ruta)
|
||||
|
||||
Try
|
||||
If Archivo IsNot Nothing Then
|
||||
If Archivo.Exists Then
|
||||
|
||||
HttpContext.Current.Response.Clear()
|
||||
HttpContext.Current.Response.ClearContent()
|
||||
HttpContext.Current.Response.ContentType = "application/octet-stream"
|
||||
HttpContext.Current.Response.AppendHeader("Content-disposition", String.Format("attachment; filename={0}", "Manual Plataforma SIG 2021.pdf"))
|
||||
HttpContext.Current.Response.AddHeader("Content-Length", Archivo.Length.ToString())
|
||||
HttpContext.Current.Response.TransmitFile(ruta)
|
||||
Response.Flush() ' send it to the client to download
|
||||
HttpContext.Current.Response.SuppressContent = True
|
||||
HttpContext.Current.ApplicationInstance.CompleteRequest()
|
||||
Response.End()
|
||||
|
||||
Else
|
||||
Alert("El archivo no existe", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
|
||||
End If
|
||||
Catch ex As Exception
|
||||
End Try
|
||||
End Sub
|
||||
End Class
|
||||
Public Class TipoCambioActual
|
||||
Public Fecha As Date
|
||||
|
||||
@@ -154,7 +154,7 @@
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBuscar','{0}')", GVPrecios.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
</div>
|
||||
<asp:GridView ID="GVPrecios" runat="server" GridLines="None" DataKeyNames="CvePS, CvePrecioLista,PrecioLista,PS,Codigo,Codigo2,Porcentaje,CodigoPS"
|
||||
CssClass="table table-striped table-advance table-hover Widthall ScrollAD" AutoGenerateColumns="False" data-sort="true" EmptyDataText="No se encontraron registros" ToolTip="Listado de Nombres">
|
||||
CssClass="table table-striped table-advance table-hover Widthall ScrollAD" AutoGenerateColumns="False" data-sort="true" EmptyDataText="No se encontraron registros" >
|
||||
<Columns>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="center" ItemStyle-Width="5%">
|
||||
<ItemTemplate>
|
||||
@@ -188,8 +188,9 @@
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:BoundField DataField="UnidadMedida" NullDisplayText="N/A" ItemStyle-Width="10%" HeaderText="U.M." ItemStyle-HorizontalAlign="Center" />
|
||||
<asp:BoundField DataField="UnidadMedida" NullDisplayText="N/A" ItemStyle-Width="10%" HeaderText="U.M." />
|
||||
<asp:BoundField DataField="Moneda" NullDisplayText="N/A" ItemStyle-Width="10%" HeaderText="Moneda" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField DataField="CostoPromedio" NullDisplayText="-" ItemStyle-Width="5%" DataFormatString="{0:N2}" Visible="false" HeaderText="C. Promedio" ItemStyle-HorizontalAlign="right" />
|
||||
<asp:BoundField DataField="VentaMinima" NullDisplayText="N/A" ItemStyle-Width="10%" HeaderText="E. Mínimo" ItemStyle-HorizontalAlign="right" />
|
||||
|
||||
|
||||
@@ -238,7 +239,7 @@
|
||||
<a id="lnkAplicarPrecioSucursales" runat="server" class="btn btn-default" onclick="CambiaPrecioModal();">Aplicar</a>
|
||||
</div>
|
||||
</div>
|
||||
<asp:GridView ID="gvSucursal" runat="server" AutoGenerateColumns="False" DataKeyNames="CveSubProyecto" EmptyDataText="No se encontraron Sucursales" ToolTip="Listado de Sucursales habilitadas para Productos o Servicios"
|
||||
<asp:GridView ID="gvSucursal" runat="server" AutoGenerateColumns="False" DataKeyNames="CveSubProyecto" EmptyDataText="No se encontraron Sucursales" ToolTip="Sucursales habilitadas para Productos o Servicios"
|
||||
CssClass="table table-striped table-smallpadding table-advance table-hover Widthall" OnRowDataBound="gvSucursal_RowDataBound" Style="text-align: center;" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
|
||||
@@ -179,9 +179,12 @@ Partial Class Ventas_ActualizarPrecios
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then 'Empresa Acumuladores
|
||||
GVPrecios.Columns(2).Visible = True
|
||||
End If
|
||||
|
||||
If UsuarioActual.CveEmpresa = 153 Then 'Empresa servec
|
||||
GVPrecios.Columns(11).Visible = True
|
||||
End If
|
||||
|
||||
|
||||
dvDatos.Visible = True
|
||||
GVPrecios.DataBind()
|
||||
|
||||
@@ -400,28 +403,37 @@ Partial Class Ventas_ActualizarPrecios
|
||||
Alert("Debe Seleccionar la lista de precios a cargar. Favor de corregirlo", TipoMensaje.MsgError)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
'LA PRIMERA COLUMNA SIEMRPE ES CODIGO
|
||||
If Not dt.Columns(0).ColumnName = "Código" Then
|
||||
Alert("El nombre de la primera columna debe ser 'Codigo'. Favor de corregirlo", TipoMensaje.MsgError)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
Dim IndiceActualColExcel As Integer = 1
|
||||
Dim StrColPos As String() = {"primera", "segunda", "tecera", "cuarta"}
|
||||
|
||||
'SI ES EMPRESA DE ACUMULADORES SE AGREGA LA COLUMNA "Código CPK"
|
||||
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
|
||||
If Not dt.Columns(IndiceActualColExcel).ColumnName = "Código CPK" Then
|
||||
Alert("El nombre de la segunda columna debe ser 'Precio'. Favor de corregirlo", TipoMensaje.MsgError)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
IndiceActualColExcel += 1
|
||||
End If
|
||||
|
||||
If Not dt.Columns(IndiceActualColExcel).ColumnName = "Producto / Servicio" Then
|
||||
Alert($"El nombre de la {StrColPos(IndiceActualColExcel)} columna debe ser 'Producto / Servicio'. Favor de corregirlo", TipoMensaje.MsgError)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
IndiceActualColExcel += 1
|
||||
|
||||
If Not dt.Columns(IndiceActualColExcel).ColumnName = "Precio" Then
|
||||
Alert($"El nombre de la {StrColPos(IndiceActualColExcel)} columna debe ser 'Precio'. Favor de corregirlo", TipoMensaje.MsgError)
|
||||
Exit Sub
|
||||
End If
|
||||
If Not dt.Columns(1).ColumnName = "Producto / Servicio" Then
|
||||
Alert("El nombre de la segunda columna debe ser 'Producto / Servicio'. Favor de corregirlo", TipoMensaje.MsgError)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then 'Empresa Acumuladores
|
||||
If Not dt.Columns(3).ColumnName = "Precio" Then
|
||||
Alert("El nombre de la cuarta columna debe ser 'Precio'. Favor de corregirlo", TipoMensaje.MsgError)
|
||||
Exit Sub
|
||||
End If
|
||||
Else
|
||||
If Not dt.Columns(2).ColumnName = "Precio" Then
|
||||
Alert("El nombre de la tercera columna debe ser 'Precio'. Favor de corregirlo", TipoMensaje.MsgError)
|
||||
Exit Sub
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
dt.TableName = "Datos"
|
||||
@@ -483,11 +495,7 @@ Partial Class Ventas_ActualizarPrecios
|
||||
ObjPS.Dispose()
|
||||
End Try
|
||||
|
||||
'If RowNoEncontrados.Length > 0 Then
|
||||
' Alert("Los siguientes Productos o Servicios no se encontraron en la Base de Datos.<\BR>" & RowNoEncontrados, TipoMensaje.MsgAdvertencia)
|
||||
'Else
|
||||
' Alert("Se Cargaron " & NumRow & " Productos o Servicios correctamente.")
|
||||
'End If
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
@@ -173,10 +173,9 @@
|
||||
}
|
||||
|
||||
|
||||
.orange{
|
||||
color:orange;
|
||||
background-color:orange;
|
||||
|
||||
.orange {
|
||||
color: orange;
|
||||
background-color: orange;
|
||||
}
|
||||
</style>
|
||||
</asp:Content>
|
||||
@@ -879,6 +878,56 @@
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet light xspadding bordered" id="DivTrayectos" runat="server" visible="false">
|
||||
<div class="portlet-title">
|
||||
<div class="caption font-green">
|
||||
<i class="icon-pin font-green"></i>
|
||||
<span class="caption-subject bold uppercase">CONFIGURACIÓN DE TRAYECTOS:</span>
|
||||
</div>
|
||||
<div class="actions">
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body form">
|
||||
<asp:UpdatePanel runat="server" ID="UpTrayectos" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlAdminTrayecto" runat="server" CssClass="form-control input-sm select2me" OnSelectedIndexChanged="DdlAdminTrayecto_SelectedIndexChanged" AutoPostBack="true">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
<asp:ListItem Value="1" Text="Administrador de Trayectos"></asp:ListItem>
|
||||
<asp:ListItem Value="2" Text="Solo dispone unidades"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVAdminTrayecto" runat="server" InitialValue="-1" ControlToValidate="DdlAdminTrayecto" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo Administración''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<label for="<%= DdlAdminTrayecto.ClientID.ToString()%>">Tipo Administración:</label>
|
||||
<i></i>
|
||||
</div>
|
||||
<div id="DivUnidadesDisponibles" class="row" runat="server" visible="false">
|
||||
<div class="col-md-12">
|
||||
<div class="portlet light xspadding bordered">
|
||||
<div class="portlet-title">
|
||||
<div class="caption font-green">
|
||||
<i class="icon-pin font-green"></i>
|
||||
<span class="caption-subject bold uppercase">UNIDADES DISPONIBLES:</span>
|
||||
</div>
|
||||
<div class="tools">
|
||||
<a href="javascript:;" class="collapse" data-original-title="" title=""></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body form">
|
||||
<asp:GridView ID="GvUnidadesDisponibles" runat="server" AutoGenerateColumns="False" Width="100%"
|
||||
EmptyDataText="No se encontraron registros de documentos" CssClass="table table-striped table-hover Widthall ScrollAD mysmallbtn" data-sort="true" GridLines="None">
|
||||
<Columns>
|
||||
<asp:BoundField DataField="Display" ItemStyle-Width="40%" HeaderText="Vehículo" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField DataField="Cliente" ItemStyle-Width="60%" HeaderText="Cliente" ItemStyle-HorizontalAlign="Left" />
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -3222,8 +3271,8 @@
|
||||
</Triggers>--%>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<div style="text-align:right;">
|
||||
<span id="Contadorgps"><%=GvDatosGPS.Rows.Count %> </span> dispositivos
|
||||
<div style="text-align: right;">
|
||||
<span id="Contadorgps"><%=GvDatosGPS.Rows.Count %> </span>dispositivos
|
||||
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvDatosGPS.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvDatosGPS.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
</div>
|
||||
@@ -3233,7 +3282,7 @@
|
||||
<ContentTemplate>
|
||||
<asp:HiddenField ID="hdnArrayDispositivo" runat="server" Value="" ClientIDMode="Static" />
|
||||
<asp:Button ID="btnCargaArrayDisp" runat="server" Text="" Style="display: none" ClientIDMode="Static"></asp:Button>
|
||||
<asp:GridView ID="GvDatosGPS" runat="server" GridLines="None" ShowFooter="true" DataKeyNames="CveDispositivo,CveModelo,CveProveedorComunicacionCuenta,Display,Modelo,IMEI"
|
||||
<asp:GridView ID="GvDatosGPS" runat="server" GridLines="None" ShowFooter="true" DataKeyNames="CveDispositivo,CveModelo,CveProveedorComunicacionCuenta,Display,Modelo,IMEI,Dispuesto"
|
||||
CssClass="table table-striped table-advance table-hover Widthall" CellSpacing="0" Width="100%" AutoGenerateColumns="False"
|
||||
EmptyDataText="No se encontraron registros" ToolTip="Listado de Dispositivos">
|
||||
<Columns>
|
||||
@@ -3255,6 +3304,17 @@
|
||||
<asp:Label ID="LblEstatus" runat="server" Text=""></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%-- <asp:TemplateField HeaderText="Dispuesto" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Center" ItemStyle-VerticalAlign="Middle" FooterStyle-VerticalAlign="Middle" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LblDisponible" runat="server" Text=""></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>--%>
|
||||
<asp:TemplateField HeaderText="Disponible Trayectos" ItemStyle-Width="5%" ItemStyle-HorizontalAlign="Center" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LblDisponible" runat="server" Text=""></asp:Label>
|
||||
<asp:LinkButton ID="imgDisponer" OnClick="imgDisponer_Click" HeaderText="Disponer" runat="server" AlternateText="Disponer" CssClass="" Text="" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Editar" ItemStyle-Width="5%" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="imgE" HeaderText="Eliminar" runat="server" AlternateText="Editar" CausesValidation="False" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-pencil'></i>" />
|
||||
@@ -3960,7 +4020,7 @@
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Right" ItemStyle-Width="50px">
|
||||
<ItemTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LnkDownLoadDoc" CssClass="btn btn-circle btn-sm blue" OnClick="DownLoad_ClickDocumentacion" runat="server"
|
||||
Text="<i class='fa fa-download' style='color:white' title='Descargar Documento'></i>" CausesValidation="False" />
|
||||
</ItemTemplate>
|
||||
|
||||
@@ -715,7 +715,7 @@ Partial Class Clientes
|
||||
TdBusqueda.Visible = True
|
||||
HyperLink7.Visible = False
|
||||
ChkSist.Visible = False
|
||||
|
||||
DivTrayectos.Visible = True
|
||||
CargaEmpresasUsuario(UsuarioActual.CveEmpresa)
|
||||
End If
|
||||
|
||||
@@ -1633,14 +1633,15 @@ Partial Class Clientes
|
||||
End If
|
||||
|
||||
DdlMotivoTraslado.SelectedValueExist(ObjClientes.CveMotivoTraslado)
|
||||
TxtNumRegIdTrib.Text = ObjClientes.NumRegIdTrib
|
||||
|
||||
|
||||
'If ObjClientes.CveUsoCFDI > 0 Then DdlUsoCFDI.Items.RemoveAt(0)
|
||||
'If ObjClientes.CveMetodoPago33 > 0 Then DdlMetodoPago33.Items.RemoveAt(0)
|
||||
'If ObjClientes.CveFormaPago33 > 0 Then DdlFormaPago33.Items.RemoveAt(0)
|
||||
|
||||
'DIAS DE PAGO
|
||||
TxtNumRegIdTrib.Text = ObjClientes.NumRegIdTrib
|
||||
|
||||
DdlAdminTrayecto.SelectedValueExist(ObjClientes.DtResultados(0)("CveAdminTrayecto").ToString())
|
||||
DdlAdminTrayecto_SelectedIndexChanged(DdlAdminTrayecto, EventArgs.Empty)
|
||||
'If ObjClientes.CveUsoCFDI > 0 Then DdlUsoCFDI.Items.RemoveAt(0)
|
||||
'If ObjClientes.CveMetodoPago33 > 0 Then DdlMetodoPago33.Items.RemoveAt(0)
|
||||
'If ObjClientes.CveFormaPago33 > 0 Then DdlFormaPago33.Items.RemoveAt(0)
|
||||
|
||||
'DIAS DE PAGO
|
||||
If ObjClientes.RecepcionPagos <> "" AndAlso ObjClientes.RecepcionPagos.Length = 11 Then
|
||||
Dim array As String() = ObjClientes.RecepcionPagos.Split(New Char() {"-"c})
|
||||
If array(0) = "1" Then ChkLunes.Checked = True
|
||||
@@ -2573,7 +2574,7 @@ Partial Class Clientes
|
||||
CveFormaPago33:=DdlFormaPago33.SelectedValue.ToEntero(), CveMetodoPago33:=DdlMetodoPago33.SelectedValue.ToEntero(), DesglosaIEPS:=ChkDesglosarIEPS.Checked, AplicaComercioExterior:=ChkAplicaComercioExterior.Checked, CveTipoOperacion:=DdlTipoOperacion.SelectedValue.ToEntero(), CvePedimento:=DdlClavePedimento.SelectedValue.ToEntero(), CveIncoterm:=DdlIncoterm.SelectedValue.ToEntero(),
|
||||
CvePais:=DdlPais.SelectedValue.ToEntero(), CveEstado:=DdlEstado.SelectedValue.ToEntero(), CveMunicipio:=DdlMunicipio.SelectedValue.ToEntero(), CveColonia:=DdlColonia.SelectedValue.ToEntero(), CveMotivoTraslado:=IIf(DdlMotivoTraslado.SelectedValue = "-1", "0", DdlMotivoTraslado.SelectedValue).ToString().ToEntero(), NumRegIdTrib:=IIf(TxtNumRegIdTrib.Text = "", "-1", TxtNumRegIdTrib.Text).ToString(),
|
||||
ComExtEstado:=IIf(TxtComExtEstado.Text = "", "-1", TxtComExtEstado.Text).ToString(), ComExtMunicipio:=IIf(TxtComExtMunicipio.Text = "", "-1", TxtComExtMunicipio.Text).ToString(), ComExtColonia:=IIf(TxtComExtColonia.Text = "", "-1", TxtComExtColonia.Text).ToString(), RequiereOC:=ChkRequiereOC.Checked, LT:=LT, LG:=LG, EsDistribuidor:=ChkEsDistribuidor.Checked,
|
||||
TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero(), CargoUsado:=ChkCargoUsado.Checked, BonificacionUsado:=ChkBonificacionUsado.Checked, CveTipoRetencion:=DdlTipoRetencion.SelectedValue.ToEntero(), CorreoEntregaCompras:=TxtCorreoEntregaCompras.Text, CorreoEntregaAlmacen:=TxtCorreoEntregaAlmacen.Text, CveSATEstado:=DdlEstadoSAT.SelectedValue.ToEntero()) Then
|
||||
TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero(), CargoUsado:=ChkCargoUsado.Checked, BonificacionUsado:=ChkBonificacionUsado.Checked, CveTipoRetencion:=DdlTipoRetencion.SelectedValue.ToEntero(), CorreoEntregaCompras:=TxtCorreoEntregaCompras.Text, CorreoEntregaAlmacen:=TxtCorreoEntregaAlmacen.Text, CveSATEstado:=DdlEstadoSAT.SelectedValue.ToEntero(), CveAdminTrayecto:=If(DdlAdminTrayecto.SelectedValue.ToEntero() <= 0, 0, DdlAdminTrayecto.SelectedValue.ToEntero())) Then
|
||||
|
||||
ViewState("CveCliente") = ObjClientes.CveCliente
|
||||
|
||||
@@ -2668,7 +2669,7 @@ Partial Class Clientes
|
||||
CveMotivoTraslado:=IIf(DdlMotivoTraslado.SelectedValue = "-1", "0", DdlMotivoTraslado.SelectedValue).ToString().ToEntero(), NumRegIdTrib:=IIf(TxtNumRegIdTrib.Text = "", "-1", TxtNumRegIdTrib.Text).ToString(),
|
||||
ComExtEstado:=IIf(TxtComExtEstado.Text = "", "-1", TxtComExtEstado.Text).ToString(), ComExtMunicipio:=IIf(TxtComExtMunicipio.Text = "", "-1", TxtComExtMunicipio.Text).ToString(), ComExtColonia:=IIf(TxtComExtColonia.Text = "", "-1", TxtComExtColonia.Text).ToString(),
|
||||
ApellidoPaternoPF:=IIf(TxtApellidoPaterno.Text = "", "-1", TxtApellidoPaterno.Text).ToString(), ApellidoMaternoPF:=IIf(TxtApellidoMaterno.Text = "", "-1", TxtApellidoMaterno.Text).ToString(), NombresPF:=IIf(TxtNombres.Text = "", "-1", TxtNombres.Text).ToString(),
|
||||
RequiereOC:=ChkRequiereOC.Checked, LT:=LT, LG:=LG, EsDistribuidor:=ChkEsDistribuidor.Checked, TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero(), CargoUsado:=ChkCargoUsado.Checked, BonificacionUsado:=ChkBonificacionUsado.Checked, CveTipoRetencion:=DdlTipoRetencion.SelectedValue.ToEntero(), CorreoEntregaCompras:=TxtCorreoEntregaCompras.Text, CorreoEntregaAlmacen:=TxtCorreoEntregaAlmacen.Text, CveSATEstado:=DdlEstadoSAT.SelectedValue.ToEntero()) Then
|
||||
RequiereOC:=ChkRequiereOC.Checked, LT:=LT, LG:=LG, EsDistribuidor:=ChkEsDistribuidor.Checked, TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero(), CargoUsado:=ChkCargoUsado.Checked, BonificacionUsado:=ChkBonificacionUsado.Checked, CveTipoRetencion:=DdlTipoRetencion.SelectedValue.ToEntero(), CorreoEntregaCompras:=TxtCorreoEntregaCompras.Text, CorreoEntregaAlmacen:=TxtCorreoEntregaAlmacen.Text, CveSATEstado:=DdlEstadoSAT.SelectedValue.ToEntero(), CveAdminTrayecto:=If(DdlAdminTrayecto.SelectedValue.ToEntero() <= 0, 0, DdlAdminTrayecto.SelectedValue.ToEntero())) Then
|
||||
|
||||
|
||||
ObjClientes.LimpiaImpuestosLocales(CveCliente)
|
||||
@@ -5124,7 +5125,11 @@ Partial Class Clientes
|
||||
GvDatosGPS.DataSource = Nothing
|
||||
End If
|
||||
ObjGPS.Dispose()
|
||||
GvDatosGPS.DataBind()
|
||||
GvDatosGPS.DataBind()
|
||||
|
||||
GvDatosGPS.Columns(9).Visible = DdlAdminTrayecto.SelectedValue = "2"
|
||||
'GvDatosGPS.Columns(10).Visible = DdlAdminTrayecto.SelectedValue = "2"
|
||||
|
||||
UpDispositivos.Update()
|
||||
End Sub
|
||||
Private Sub CargaGlobalDispositos()
|
||||
@@ -5153,8 +5158,22 @@ Partial Class Clientes
|
||||
e.Row.FCLabel("LblEstatus").Text = "Inactivo"
|
||||
e.Row.FCLabel("LblEstatus").CssClass = "label label-danger"
|
||||
e.Row.FindControl("imgD").Visible = False
|
||||
End If
|
||||
|
||||
If CBool(e.Row.DBCampo("Dispuesto")) Then
|
||||
e.Row.FCLabel("LblDisponible").Text = "Si"
|
||||
e.Row.FCLabel("LblDisponible").CssClass = "label label-success"
|
||||
|
||||
e.Row.FCLinkButton("imgDisponer").CssClass = "btn btn-circle btn-sm red"
|
||||
e.Row.FCLinkButton("imgDisponer").Text = "<i class='fa fa-refresh'></i>"
|
||||
Else
|
||||
e.Row.FCLabel("LblDisponible").Text = "No"
|
||||
e.Row.FCLabel("LblDisponible").CssClass = "label label-default"
|
||||
|
||||
e.Row.FCLinkButton("imgDisponer").CssClass = "btn btn-circle btn-sm blue"
|
||||
e.Row.FCLinkButton("imgDisponer").Text = "<i class='fa fa-refresh'></i>"
|
||||
End If
|
||||
|
||||
End If
|
||||
e.Row.FCLinkButton("imgE").Attributes.Add("onclick", $"javascript:AbrirVentana('/GPS/WizardDispositivos.aspx?CveDispositivo={e.Row.DBCampo("CveDispositivo").ToString()}&CveCliente={CveCliente}&EsPopup=1', 801, 701);")
|
||||
End If
|
||||
End Sub
|
||||
@@ -10577,6 +10596,36 @@ Partial Class Clientes
|
||||
End Using
|
||||
|
||||
Return retorno
|
||||
End Function
|
||||
End Function
|
||||
Protected Sub DdlAdminTrayecto_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
DivUnidadesDisponibles.Visible = DdlAdminTrayecto.SelectedValue = "1"
|
||||
|
||||
GvDatosGPS.Columns(9).Visible = DdlAdminTrayecto.SelectedValue = "2"
|
||||
|
||||
If DivUnidadesDisponibles.Visible AndAlso Me.CveCliente > 0 Then
|
||||
Using ObjGPS As New ClsGPS
|
||||
If ObjGPS.GetUnidadesDispuestas(-1, -1, UsuarioActual.CveEmpresa) Then
|
||||
GvUnidadesDisponibles.DataSource = ObjGPS.DtResultados
|
||||
End If
|
||||
End Using
|
||||
GvUnidadesDisponibles.DataBind()
|
||||
End If
|
||||
|
||||
UpTrayectos.Update()
|
||||
UpDispositivos.Update()
|
||||
End Sub
|
||||
Protected Sub imgDisponer_Click(sender As Object, e As EventArgs)
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
Dim CveDispositivo As Integer = GvRow.DataKey("CveDispositivo").ToEntero()
|
||||
Dim ValorDisposicion As Boolean = CBool(GvRow.DataKey("Dispuesto"))
|
||||
|
||||
Using ObjGPS As New ClsGPS
|
||||
If ObjGPS.UpdateUnidadesDispuestas(CveDispositivo, Not ValorDisposicion) Then
|
||||
Alert("Se cambió el estatus de disposición")
|
||||
End If
|
||||
End Using
|
||||
|
||||
CargaDispositivos(DdlEstatusDispositivos.SelectedValue.ToEntero())
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
|
||||
@@ -4889,6 +4889,12 @@ Partial Class PV
|
||||
End If
|
||||
|
||||
If ChkAjuste.Checked Then
|
||||
|
||||
If DdlDistribuidor.SelectedValue.ToEntero() <= 0 Then
|
||||
Alert("Debe seleccionar un distribuidor", TipoMensaje.MsgAdvertencia)
|
||||
Return False
|
||||
End If
|
||||
|
||||
If TxtFechaAjuste.Text.ToDate > Now Then
|
||||
Alert("La fecha de compra no puede ser mayor a la de hoy.", TipoMensaje.MsgAdvertencia)
|
||||
Return False
|
||||
@@ -7590,6 +7596,11 @@ Partial Class PV
|
||||
'params.Add(New ReportParameter("Comprobante", TxtComprobante.Text))
|
||||
'params.Add(New ReportParameter("CodigoTD", TxtCodigoTD.Text))
|
||||
|
||||
If DdlDistribuidor.SelectedValue.ToEntero() <= 0 Then
|
||||
Alert("Debe seleccionar un distribuidor", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
Dim URLDescarga As New StringBuilder
|
||||
|
||||
URLDescarga.Append($"OP=AJUSTE&CVEPSAJUSTE={DdlPSAjuste.SelectedValue.ToEntero}&CVECLIENTE={CveCliente}&CVECLIENTEDISTRIBUIDOR={DdlDistribuidor.SelectedValue.ToEntero()}&CONSEC={TxtConsecutivoAjuste.Text.Trim}")
|
||||
|
||||
@@ -61,7 +61,7 @@
|
||||
<td class="text-right"><b>Sucursal:</b></td>
|
||||
<td>
|
||||
<asp:DropDownList ID="DdlSubProyecto" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Class="table-group-action-input form-control input-inline input-sm" Width="200px">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</td>
|
||||
<td class="text-right"><b>Estatus:</b></td>
|
||||
|
||||
@@ -1403,7 +1403,7 @@
|
||||
</asp:UpdatePanel>
|
||||
<asp:UpdatePanel ID="UPGVAlias" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GVAlias" runat="server" ShowHeader="True" AutoGenerateColumns="False" EmptyDataText="No se encontraron Alias del Producto o Servicio." CellPadding="1" CellSpacing="1" RowStyle-VerticalAlign="Middle" RowStyle-HorizontalAlign="Center" DataKeyNames="CvePS,PSAlias" CssClass="table table-striped table-advance table-hover" Style="text-align: center;" GridLines="None">
|
||||
<asp:GridView ID="GVAlias" runat="server" ShowHeader="True" AutoGenerateColumns="False" EmptyDataText="No se encontraron Alias del Producto o Servicio." CellPadding="1" CellSpacing="1" RowStyle-VerticalAlign="Middle" DataKeyNames="CvePS,PSAlias" CssClass="table table-striped table-advance table-hover" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
@@ -1411,6 +1411,12 @@
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="699px" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="Flex" runat="server" Text='<%#If(Eval("Flexible").ToString = "True", "Si", "No") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="50px" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:ImageButton ID="imgD" runat="server" AlternateText="Eliminar" CausesValidation="False" CommandName="Delete" ImageUrl="/Imagenes/Btn_Delete.png" OnClientClick="javascript:return C();" />
|
||||
|
||||
@@ -1455,7 +1455,7 @@ Partial Class ProductosyServicios
|
||||
Dim ObjAliasAdd As New ClsProductosServicios
|
||||
Dim TieneError = False
|
||||
|
||||
If ObjAliasAdd.AddPSAlias(TxtAlias.Text.ToString, CvePS, UsuarioActual.CveUsuario) Then
|
||||
If ObjAliasAdd.AddPSAlias(TxtAlias.Text.ToString, CvePS, False, UsuarioActual.CveUsuario) Then
|
||||
CargarAlias()
|
||||
UPGVAlias.Update()
|
||||
Alert("Alias " + TxtAlias.Text + " agregado.", TipoMensaje.MsgInformacion)
|
||||
@@ -1801,11 +1801,8 @@ Partial Class ProductosyServicios
|
||||
DivMarca.Visible = True
|
||||
End If
|
||||
|
||||
Dim ObjMarcas As New ClsProductosServicios
|
||||
ObjMarcas.GetMarcas(UsuarioActual.CveEmpresa)
|
||||
DdlMarca.DataSource = ObjMarcas.DtResultados
|
||||
DdlMarcaPSDes.DataSource = ObjMarcas.DtResultados
|
||||
ObjMarcas.Dispose()
|
||||
DdlMarca.DataSource = GlobalDTGralMarcas(UsuarioActual.CveEmpresa)
|
||||
DdlMarcaPSDes.DataSource = GlobalDTGralMarcas(UsuarioActual.CveEmpresa)
|
||||
DdlMarca.DataBind()
|
||||
DdlMarcaPSDes.DataBind()
|
||||
End If
|
||||
|
||||
@@ -85,11 +85,12 @@
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron comisiones con los filtros especificados" ToolTip="Listado de Comisiones" CssClass="table table-striped table-hover Widthall" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Factura" ItemStyle-Width="16%" ItemStyle-HorizontalAlign="Left">
|
||||
<asp:TemplateField HeaderText="Factura" ItemStyle-Width="12%" ItemStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLGrupo" Target="_blank" Text='<%# Eval("Grupo") %>' runat="server" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField HeaderText="Pago" DataField="CondicionesPagoTexto" ItemStyle-Width="4%" />
|
||||
<asp:BoundField HeaderText="Fecha" DataField="Fecha" ItemStyle-Width="8%" DataFormatString="{0:dd/MM/yyyy}" ItemStyle-HorizontalAlign="Center" />
|
||||
<asp:BoundField HeaderText="F. Venc" DataField="FechaVencimiento" ItemStyle-Width="8%" DataFormatString="{0:dd/MM/yyyy}" ItemStyle-HorizontalAlign="Center" />
|
||||
<asp:BoundField HeaderText="F. Pago" DataField="FechaPago" ItemStyle-Width="8%" DataFormatString="{0:dd/MM/yyyy}" ItemStyle-HorizontalAlign="Center" />
|
||||
|
||||
@@ -191,6 +191,12 @@
|
||||
<div class="col-md-2">
|
||||
<ADS:Dropdownlost runat="server" ID="DdlPS" CssStyle="width: 100%;" CssClass="DdlPS" CssClassDdl="select2me " DataTextField="PSCodigo" DataValueField="CvePS" />
|
||||
</div>
|
||||
<div class="col-md-1 truncate">
|
||||
Marca:
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<asp:Dropdownlist runat="server" ID="DdlMarcas" CssStyle="width: 100%;" CssClass="form-control input-small input-sm select2me" Width="100%" DataTextField="Marca" DataValueField="CveMarca" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -81,6 +81,10 @@ Partial Class Ventas_RepVentasUtilidad
|
||||
DdlPS.ddl.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
End If
|
||||
|
||||
DdlMarcas.DataSource = GlobalDTGralMarcas(UsuarioActual.CveEmpresa)
|
||||
DdlMarcas.DataBind()
|
||||
DdlMarcas.Items.Insert(0, New ListItem("Todas", "-1"))
|
||||
|
||||
Dim CveSubProyecto = If(Request("CveSubProyecto") IsNot Nothing, Request("CveSubProyecto").ToString, "-1").ToString
|
||||
Dim CveVendedor = If(Request("CveVendedor") IsNot Nothing AndAlso Request("CveVendedor") <> "", Request("CveVendedor"), "-1").ToString
|
||||
Dim CveCliente = If(Request("CveCliente") IsNot Nothing AndAlso Request("CveCliente") <> "", Request("CveCliente"), "-1").ToString
|
||||
@@ -90,6 +94,7 @@ Partial Class Ventas_RepVentasUtilidad
|
||||
Dim FechaF = If(Request("FechaF") IsNot Nothing, Request("FechaF").ToString, "-1").ToString
|
||||
Dim CveClasificacion = If(Request("CveClasificacion") IsNot Nothing AndAlso Request("CveClasificacion") <> "", Request("CveClasificacion"), "-1").ToString
|
||||
Dim CvePS = If(Request("CvePS") IsNot Nothing AndAlso Request("CvePS") <> "", Request("CvePS"), "-1").ToString
|
||||
Dim CveMarca = If(Request("CveMarca") IsNot Nothing AndAlso Request("CveMarca") <> "", Request("CveMarca"), "-1").ToString
|
||||
|
||||
DdlSubProyecto.SelectedValuesIfExistM(CveSubProyecto)
|
||||
DdlVendedor.SelectedValuesIfExistM(CveVendedor)
|
||||
@@ -105,6 +110,8 @@ Partial Class Ventas_RepVentasUtilidad
|
||||
DdlPS.SelectedText = "Todos"
|
||||
End If
|
||||
|
||||
DdlMarcas.SelectedValueExist(CveMarca)
|
||||
|
||||
txtFechaI.Text = FechaI
|
||||
txtFechaF.Text = FechaF
|
||||
|
||||
@@ -144,7 +151,7 @@ Partial Class Ventas_RepVentasUtilidad
|
||||
Dim Sucursales As String = IIf(DdlSubProyecto.GetSelectedValuesM = "", "-1", DdlSubProyecto.GetSelectedValuesM).ToString
|
||||
Dim Vendedores As String = IIf(DdlVendedor.GetSelectedValuesM = "", "-1", DdlVendedor.GetSelectedValuesM).ToString
|
||||
|
||||
If ObjVentas.GetReporteVentasUtilidad(Vendedores, DdlClientes.SelectedValue.ToEntero, Sucursales, FechaI, FechaF, UsuarioActual.CveEmpresa, DdlPS.SelectedValue.ToEntero, DdlClasificacion.SelectedValue.ToEntero) Then
|
||||
If ObjVentas.GetReporteVentasUtilidad(Vendedores, DdlClientes.SelectedValue.ToEntero, Sucursales, FechaI, FechaF, UsuarioActual.CveEmpresa, DdlPS.SelectedValue.ToEntero, DdlClasificacion.SelectedValue.ToEntero, DdlMarcas.SelectedValue.ToEntero) Then
|
||||
DtVentas = ObjVentas.DtResultados
|
||||
GvDatos.DataSource = ObjVentas.DtResultados
|
||||
GvDatos.DataBind()
|
||||
@@ -282,6 +289,7 @@ Partial Class Ventas_RepVentasUtilidad
|
||||
Dim Vendedor = If(DdlVendedor.GetSelectedText = "", "", $" <b>Vendedor:</b> {DdlVendedor.GetSelectedText}")
|
||||
Dim PS = If(DdlPS.SelectedValue = "-1", "", $" <b>P.S.:</b> {DdlPS.SelectedText}")
|
||||
Dim Clasificacion = If(DdlClasificacion.SelectedValue = "-1", "", $" <b>Clasificacion:</b> {DdlClasificacion.SelectedItem.Text}")
|
||||
Dim Marca = If(DdlMarcas.SelectedValue = "-1", "", $" <b>Marcas:</b> {DdlMarcas.SelectedItem.Text}")
|
||||
' Dim Grupo = DdlGrupo.SelectedItem.Text
|
||||
|
||||
Dim FechaIn As String = $" <b>Fecha Inicio:</b> {txtFechaI.Text}"
|
||||
@@ -294,7 +302,7 @@ Partial Class Ventas_RepVentasUtilidad
|
||||
Dim Sucursales As String = IIf(DdlSubProyecto.GetSelectedValuesM = "", "-1", DdlSubProyecto.GetSelectedValuesM).ToString
|
||||
Dim Vendedores As String = IIf(DdlVendedor.GetSelectedValuesM = "", "-1", DdlVendedor.GetSelectedValuesM).ToString
|
||||
|
||||
If ObjVentas.GetReporteVentasUtilidad(Vendedores, DdlClientes.SelectedValue.ToEntero, Sucursales, FechaI, FechaF, UsuarioActual.CveEmpresa, DdlPS.SelectedValue.ToEntero, DdlClasificacion.SelectedValue.ToEntero) Then
|
||||
If ObjVentas.GetReporteVentasUtilidad(Vendedores, DdlClientes.SelectedValue.ToEntero, Sucursales, FechaI, FechaF, UsuarioActual.CveEmpresa, DdlPS.SelectedValue.ToEntero, DdlClasificacion.SelectedValue.ToEntero, DdlMarcas.SelectedValue.ToEntero) Then
|
||||
|
||||
Dim FechaInicio As String = txtFechaI.Text
|
||||
Dim FechaFin As String = txtFechaF.Text
|
||||
|
||||
@@ -210,6 +210,12 @@
|
||||
<div class="col-md-2">
|
||||
<ADS:Dropdownlost runat="server" ID="DdlPS" CssStyle="width: 100%;" CssClass="DdlPS" CssClassDdl="select2me " DataTextField="PSCodigo" DataValueField="CvePS" />
|
||||
</div>
|
||||
<div class="col-md-1 truncate">
|
||||
Marca:
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<asp:Dropdownlist runat="server" ID="DdlMarcas" CssStyle="width: 100%;" CssClass="form-control input-small input-sm select2me" Width="100%" DataTextField="Marca" DataValueField="CveMarca" />
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -174,7 +174,7 @@ Partial Class Ventas_RepVentasUtilidadDetalle
|
||||
Dim Vendedores As String = IIf(DdlVendedor.GetSelectedValuesM = "", "-1", DdlVendedor.GetSelectedValuesM).ToString
|
||||
|
||||
If ObjVentas.GetReporteVentasUtilidadDetalle(Vendedores, If(CveVenta = -1, Orden, CveVenta), DdlClientes.SelectedValue.ToEntero, Sucursales,
|
||||
FechaI, FechaF, UsuarioActual.CveEmpresa, DdlPS.SelectedValue.ToEntero, DdlClasificacion.SelectedValue.ToEntero) Then
|
||||
FechaI, FechaF, UsuarioActual.CveEmpresa, DdlPS.SelectedValue.ToEntero, DdlClasificacion.SelectedValue.ToEntero, DdlMarcas.SelectedValue.ToEntero) Then
|
||||
DtVentas = ObjVentas.DtResultados
|
||||
GvDatos.DataSource = ObjVentas.DtResultados
|
||||
GvDatos.DataBind()
|
||||
@@ -286,6 +286,7 @@ Partial Class Ventas_RepVentasUtilidadDetalle
|
||||
Dim Vendedor = If(DdlVendedor.GetSelectedText = "", "", $" <b>Vendedor:</b> {DdlVendedor.GetSelectedText}")
|
||||
Dim PS = If(DdlPS.SelectedValue = "-1", "", $" <b>P.S.:</b> {DdlPS.SelectedText}")
|
||||
Dim Clasificacion = If(DdlClasificacion.SelectedValue = "-1", "", $" <b>Clasificacion:</b> {DdlClasificacion.SelectedItem.Text}")
|
||||
Dim Marcas = If(DdlMarcas.SelectedValue = "-1", "", $" <b>Marcas:</b> {DdlMarcas.SelectedItem.Text}")
|
||||
Dim FechaIn As String = $" <b>Fecha Inicio:</b> {txtFechaI.Text}"
|
||||
Dim FechaFn As String = $" <b>Fecha Fin:</b> {txtFechaF.Text}"
|
||||
If txtFechaI.Text = "" Then FechaIn = ""
|
||||
@@ -294,7 +295,7 @@ Partial Class Ventas_RepVentasUtilidadDetalle
|
||||
Dim Sucursales As String = IIf(DdlSubProyecto.GetSelectedValuesM = "", "-1", DdlSubProyecto.GetSelectedValuesM).ToString
|
||||
Dim Vendedores As String = IIf(DdlVendedor.GetSelectedValuesM = "", "-1", DdlVendedor.GetSelectedValuesM).ToString
|
||||
If ObjVentas.GetReporteVentasUtilidadDetalle(Vendedores, CveVenta, DdlClientes.SelectedValue.ToEntero, Sucursales,
|
||||
FechaI, FechaF, UsuarioActual.CveEmpresa, DdlPS.SelectedValue.ToEntero, DdlClasificacion.SelectedValue.ToEntero) Then
|
||||
FechaI, FechaF, UsuarioActual.CveEmpresa, DdlPS.SelectedValue.ToEntero, DdlClasificacion.SelectedValue.ToEntero, ddlmarcas.selectedvalue.toentero) Then
|
||||
|
||||
Dim FechaInicio As String = txtFechaI.Text
|
||||
Dim FechaFin As String = txtFechaF.Text
|
||||
@@ -356,7 +357,7 @@ Partial Class Ventas_RepVentasUtilidadDetalle
|
||||
Dim Sucursales As String = IIf(DdlSubProyecto.GetSelectedValuesM = "", "-1", DdlSubProyecto.GetSelectedValuesM).ToString
|
||||
Dim Vendedores As String = IIf(DdlVendedor.GetSelectedValuesM = "", "-1", DdlVendedor.GetSelectedValuesM).ToString
|
||||
If ObjVentas.GetReporteVentasUtilidadDetalle(Vendedores, CveVenta, DdlClientes.SelectedValue.ToEntero, Sucursales,
|
||||
FechaI, FechaF, UsuarioActual.CveEmpresa, DdlPS.SelectedValue.ToEntero, DdlClasificacion.SelectedValue.ToEntero) Then
|
||||
FechaI, FechaF, UsuarioActual.CveEmpresa, DdlPS.SelectedValue.ToEntero, DdlClasificacion.SelectedValue.ToEntero, DdlMarcas.SelectedValue.ToEntero) Then
|
||||
|
||||
Dim FechaInicio As String = txtFechaI.Text
|
||||
Dim FechaFin As String = txtFechaF.Text
|
||||
|
||||
@@ -90,6 +90,7 @@
|
||||
<asp:ListItem Text="Vendedor" Value="6"></asp:ListItem>
|
||||
<asp:ListItem Text="Producto/Servicio" Value="7"></asp:ListItem>
|
||||
<asp:ListItem Text="Clasificación" Value="8"></asp:ListItem>
|
||||
<asp:ListItem Text="Marca" Value="9"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<div class="col-md-1 truncate">
|
||||
@@ -165,6 +166,12 @@
|
||||
<div class="col-md-2">
|
||||
<ADS:Dropdownlost runat="server" ID="DdlPS" CssStyle="width: 100%;" CssClass="DdlPS" CssClassDdl="select2me " DataTextField="PSCodigo" DataValueField="CvePS" />
|
||||
</div>
|
||||
<div class="col-md-1 truncate">
|
||||
Marca:
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<asp:Dropdownlist runat="server" ID="DdlMarcas" CssStyle="width: 100%;" CssClass="form-control input-small input-sm select2me" Width="100%" DataTextField="Marca" DataValueField="CveMarca" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -207,7 +214,7 @@
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron Ventas Utilidad con los filtros especificados" ToolTip="Listado de Ventas"
|
||||
CssClass="table table-advance table-hover Widthall ScrollAD" data-sort="true" GridLines="None" Width="99%" OnRowDataBound="GvDatos_RowDataBound">
|
||||
<Columns>
|
||||
<asp:HyperLinkField ItemStyle-HorizontalAlign="Left" Target="_blank" HeaderText="Grupo" DataTextField="GPO" DataNavigateUrlFields="FechaI,FechaF,CveSubProyecto,CveCliente,CveVendedor,Grupo,GPO,CvePS,CveClasificacion" DataNavigateUrlFormatString="RepVentasUtilidad.aspx?FechaI={0}&FechaF={1}&CveSubProyecto={2}&CveCliente={3}&CveVendedor={4}&Gpo={5}&CveGpo={6}&CvePS={7}&CveClasificacion={8}" />
|
||||
<asp:HyperLinkField ItemStyle-HorizontalAlign="Left" Target="_blank" HeaderText="Grupo" DataTextField="GPO" DataNavigateUrlFields="FechaI,FechaF,CveSubProyecto,CveCliente,CveVendedor,Grupo,GPO,CvePS,CveClasificacion,CveMarca" DataNavigateUrlFormatString="RepVentasUtilidad.aspx?FechaI={0}&FechaF={1}&CveSubProyecto={2}&CveCliente={3}&CveVendedor={4}&Gpo={5}&CveGpo={6}&CvePS={7}&CveClasificacion={8}&CveMarca={9}" />
|
||||
<asp:BoundField ItemStyle-HorizontalAlign="Right" HeaderText="Ventas" DataField="Ventas" DataFormatString="{0:N2}" />
|
||||
<asp:BoundField ItemStyle-HorizontalAlign="Right" HeaderText="Descuento" DataField="Descuento" DataFormatString="{0:N2}" />
|
||||
<asp:BoundField ItemStyle-HorizontalAlign="Right" HeaderText="Bonificación" DataField="Bonificacion" DataFormatString="{0:N2}" />
|
||||
|
||||
@@ -86,6 +86,10 @@ Partial Class Ventas_RepVentasUtilidadPadre
|
||||
DdlPS.ddl.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
End If
|
||||
|
||||
DdlMarcas.DataSource = GlobalDTGralMarcas(UsuarioActual.CveEmpresa)
|
||||
DdlMarcas.DataBind()
|
||||
DdlMarcas.Items.Insert(0, New ListItem("Todas", "-1"))
|
||||
|
||||
LblNeto.Text = "0"
|
||||
LblPorNeto.Text = "0"
|
||||
End Sub
|
||||
@@ -110,7 +114,8 @@ Partial Class Ventas_RepVentasUtilidadPadre
|
||||
Dim ObjVentas As New ClsVentas
|
||||
If ObjVentas.GetReportePadreVentasUtilidad(If(DdlVendedor.GetSelectedValuesM = "", "-1", DdlVendedor.GetSelectedValuesM), DdlClientesWS.SelectedValue.ToEntero,
|
||||
If(DdlSubProyecto.GetSelectedValuesM = "", "-1", DdlSubProyecto.GetSelectedValuesM), txtFechaI.Text.ToDate, txtFechaF.Text.ToDate,
|
||||
UsuarioActual.CveEmpresa, DdlGrupo.SelectedValue.ToEntero, DdlPS.SelectedValue.ToEntero, DdlClasificacion.SelectedValue.ToEntero) Then
|
||||
UsuarioActual.CveEmpresa, DdlGrupo.SelectedValue.ToEntero, DdlPS.SelectedValue.ToEntero, DdlClasificacion.SelectedValue.ToEntero,
|
||||
DdlMarcas.SelectedValue.ToEntero) Then
|
||||
GvDatos.DataSource = ObjVentas.DtResultados
|
||||
DtDatos = ObjVentas.DtResultados
|
||||
End If
|
||||
@@ -225,10 +230,10 @@ Partial Class Ventas_RepVentasUtilidadPadre
|
||||
e.Row.CssClass = "Totales"
|
||||
e.Row.Cells(0).Text = "Total"
|
||||
Dim Css As String = "Texto"
|
||||
Dim Liga As String = String.Format("/Ventas/RepVentasUtilidad.aspx?FechaI={0}&FechaF={1}&CveSubProyecto={2}&CveCliente={3}&CveVendedor={4}&Gpo={5}&CveGpo={6}&CvePS={7}&CveClasificacion={8}",
|
||||
Dim Liga As String = String.Format("/Ventas/RepVentasUtilidad.aspx?FechaI={0}&FechaF={1}&CveSubProyecto={2}&CveCliente={3}&CveVendedor={4}&Gpo={5}&CveGpo={6}&CvePS={7}&CveClasificacion={8}&CveMarca={9}",
|
||||
e.Row.DBCampo("FechaI"), e.Row.DBCampo("FechaF"), e.Row.DBCampo("CveSubProyecto"), e.Row.DBCampo("CveCliente"), e.Row.DBCampo("CveVendedor"),
|
||||
e.Row.DBCampo("Grupo"), e.Row.DBCampo("GPO"), e.Row.DBCampo("CvePS"), e.Row.DBCampo("CveClasificacion"))
|
||||
e.Row.Cells(0).Text = "<a class=""" & Css & """ href=""" & Liga & """>" & e.Row.Cells(0).Text & "</a>"
|
||||
e.Row.DBCampo("Grupo"), e.Row.DBCampo("GPO"), e.Row.DBCampo("CvePS"), e.Row.DBCampo("CveClasificacion"), e.Row.DBCampo("CveMarca"))
|
||||
e.Row.Cells(0).Text = String.Format("<a class=""{0}"" href=""{1}"">{2}</a>", Css, Liga, e.Row.Cells(0).Text)
|
||||
Else
|
||||
e.Row.Cells(9).BackColor = Drawing.Color.LightGray
|
||||
End If
|
||||
@@ -261,6 +266,7 @@ Partial Class Ventas_RepVentasUtilidadPadre
|
||||
If DdlClasificacion.SelectedValue <> "-1" Then StrFiltro.AppendFormat(" <b>Clasificación</b>: {0}", DdlClasificacion.SelectedItem.Text)
|
||||
If DdlClientesWS.SelectedValue <> "-1" Then StrFiltro.AppendFormat(" <b>Cliente</b>: {0}", DdlClientesWS.SelectedText)
|
||||
If DdlVendedor.GetSelectedText <> "" Then StrFiltro.AppendFormat(" <b>Vendedor</b>: {0}", DdlVendedor.GetSelectedText)
|
||||
If DdlMarcas.SelectedValue <> "-1" Then StrFiltro.AppendFormat(" <b>Marcas</b>: {0}", DdlMarcas.SelectedItem.Text)
|
||||
Dim params As List(Of ReportParameter) = New List(Of ReportParameter)()
|
||||
Dim Imagen As System.IO.FileInfo = New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
|
||||
Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
||||
|
||||
@@ -6437,6 +6437,9 @@
|
||||
DataKeyNames="CveVenta,CveMetodoPago33,CveFormaPago33" CssClass="table table-striped table-advance table-hover Widthall mysmallbtn" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>
|
||||
<asp:CheckBox ID="ChkAllCxC" CssClass="gvcxcAllChe" onclick="chkSeleccionarNC();" runat="server" />
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:CheckBox ID="ChkCxC" CssClass="gvcxcChe" runat="server" />
|
||||
</ItemTemplate>
|
||||
@@ -7654,6 +7657,12 @@
|
||||
<script src="/Metronic/assets/global/scripts/jquery-sortable.js"></script>
|
||||
<script type="text/javascript">
|
||||
|
||||
//$('body').on('click', '.gvcxcAllChe input', function () { });
|
||||
|
||||
function chkSeleccionarNC() {
|
||||
$(".gvcxcChe input").not(this).click();
|
||||
}
|
||||
|
||||
//FUNCIONES PARA COMERCIO EXTERIOR
|
||||
function CalculaTotalUSD(TotalUSD, ValorUnitario, TxtCantidad) {
|
||||
TotalUSD.innerText = FormatoNumero(ToDouble(ValorUnitario.value) * ToDouble(TxtCantidad.value), 2);
|
||||
@@ -8211,21 +8220,56 @@
|
||||
Importe = Saldo;
|
||||
}
|
||||
|
||||
|
||||
Importe = Porcentaje * Importe / 100;
|
||||
|
||||
if (Chk.checked) {
|
||||
TxtTotalGv.value = FormatoNumero(ToDouble(TxtTotalGv.value) + ImporteSinPorcentaje, 2);
|
||||
TxtImporte.value = FormatoNumero(Importe, 2);
|
||||
$get('TxtNCImporte').value = FormatoNumero(ToDouble($get('TxtNCImporte').value) + Importe, 2);
|
||||
} else {
|
||||
TxtTotalGv.value = FormatoNumero(ToDouble(TxtTotalGv.value) - ImporteSinPorcentaje, 2);
|
||||
$get('TxtNCImporte').value = FormatoNumero(ToDouble($get('TxtNCImporte').value) - ToDouble(TxtImporte.value), 2);
|
||||
TxtImporte.value = "";
|
||||
}
|
||||
|
||||
if ('<%= UsuarioActual.Empresa.Funcionalidad(344) %>' == '1') {
|
||||
|
||||
if (Chk.checked) {
|
||||
//SI HAY RNC SELECCIONADAS
|
||||
if (ToDouble($get('TxtImportesRemisionesNC').value) > 0) {
|
||||
|
||||
let ImporteRestante = ToDouble($get('TxtImportesRemisionesNC').value) - ToDouble($get('TxtNCImporte').value)
|
||||
if (ImporteRestante < 0) {
|
||||
ImporteRestante = 0;
|
||||
}
|
||||
|
||||
if ((ToDouble(TxtTotalGv.value) + ImporteSinPorcentaje) > ImporteRestante) {
|
||||
TxtTotalGv.value = FormatoNumero(ToDouble(TxtTotalGv.value) + ImporteRestante, 2);
|
||||
}
|
||||
|
||||
if (Importe > ImporteRestante) {
|
||||
TxtImporte.value = FormatoNumero(ImporteRestante, 2);
|
||||
$get('TxtNCImporte').value = FormatoNumero(ToDouble($get('TxtNCImporte').value) + ToDouble(TxtImporte.value), 2);
|
||||
}else {
|
||||
$get('TxtNCImporte').value = FormatoNumero(ToDouble($get('TxtNCImporte').value) + Importe, 2);
|
||||
}
|
||||
|
||||
if (ToDouble(TxtImporte.value) <= 0) {
|
||||
Chk.checked = false;
|
||||
}
|
||||
|
||||
}else {
|
||||
TxtTotalGv.value = FormatoNumero(ToDouble(TxtTotalGv.value) + ImporteSinPorcentaje, 2);
|
||||
TxtImporte.value = FormatoNumero(Importe, 2);
|
||||
$get('TxtNCImporte').value = FormatoNumero(ToDouble($get('TxtNCImporte').value) + Importe, 2);
|
||||
}
|
||||
} else {
|
||||
TxtTotalGv.value = FormatoNumero(ToDouble(TxtTotalGv.value) - ImporteSinPorcentaje, 2);
|
||||
$get('TxtNCImporte').value = FormatoNumero(ToDouble($get('TxtNCImporte').value) - ToDouble(TxtImporte.value), 2);
|
||||
TxtImporte.value = "";
|
||||
}
|
||||
|
||||
CompararNC();
|
||||
}else {
|
||||
if (Chk.checked) {
|
||||
TxtTotalGv.value = FormatoNumero(ToDouble(TxtTotalGv.value) + ImporteSinPorcentaje, 2);
|
||||
TxtImporte.value = FormatoNumero(Importe, 2);
|
||||
$get('TxtNCImporte').value = FormatoNumero(ToDouble($get('TxtNCImporte').value) + Importe, 2);
|
||||
} else {
|
||||
TxtTotalGv.value = FormatoNumero(ToDouble(TxtTotalGv.value) - ImporteSinPorcentaje, 2);
|
||||
$get('TxtNCImporte').value = FormatoNumero(ToDouble($get('TxtNCImporte').value) - ToDouble(TxtImporte.value), 2);
|
||||
TxtImporte.value = "";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8270,6 +8314,18 @@
|
||||
Entro = 1;
|
||||
}
|
||||
|
||||
<%-- if ('<%= UsuarioActual.Empresa.Funcionalidad(344) %>' == '1') {
|
||||
let ImporteRestante = ToDouble($get('TxtImportesRemisionesNC').value) - ToDouble($get('TxtNCImporte').value)
|
||||
if (ImporteRestante > 0) {
|
||||
if (ImporteRestante < ImporteNuevo) {
|
||||
ImporteNuevo = ImporteRestante;
|
||||
}
|
||||
Entro = 1;
|
||||
}else {
|
||||
ImporteNuevo = 0;
|
||||
}
|
||||
}--%>
|
||||
|
||||
if (ImporteNuevo > Saldo) {
|
||||
ImporteNuevo = Saldo;
|
||||
Entro = 1;
|
||||
|
||||
@@ -6594,7 +6594,8 @@ Partial Class Ventas
|
||||
End If
|
||||
|
||||
Dim cvesubproyecto As String = DdlSubProyectoDatos.SelectedValue
|
||||
If UsuarioActual.Empresa.Funcionalidad(558) = "1" Then
|
||||
If UsuarioActual.Empresa.Funcionalidad(558) = "1" OrElse UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
|
||||
'cuando es empresa llantera (558) o cuando es empresa acumuladores
|
||||
cvesubproyecto = "-1"
|
||||
End If
|
||||
|
||||
@@ -6950,7 +6951,8 @@ Partial Class Ventas
|
||||
GvPS.Rows(e.NewEditIndex).FCDropDownList("DdlClasificacion").Enabled = False
|
||||
End If
|
||||
|
||||
If GvPS.Rows(e.NewEditIndex).DataKey("CvePromocionDetalle").ToString().ToEntero() > 0 Then
|
||||
'SI ES LLANTERA NO DEBE BLOQUEAR EL TEXTBOX
|
||||
If GvPS.Rows(e.NewEditIndex).DataKey("CvePromocionDetalle").ToString().ToEntero() > 0 AndAlso (Not UsuarioActual.Empresa.Funcionalidad(558) = "1") Then
|
||||
GvPS.Rows(e.NewEditIndex).FCTextBox("TxtDescuento").Enabled = False
|
||||
GvPS.Rows(e.NewEditIndex).FCTextBox("TxtDescuento").ToolTip = "No se puede editar el descuento porque viene de una promoción"
|
||||
End If
|
||||
@@ -6968,7 +6970,10 @@ Partial Class Ventas
|
||||
Dim CuentaPredial As String
|
||||
Cantidad = GvPS.Rows(e.RowIndex).FCTextBox("TxtCantidad").Text.ToDecimal
|
||||
PU = (GvPS.Rows(e.RowIndex).FCTextBox("TxtPrecio").Text.ToDecimal).RoundSQL(6)
|
||||
ObjDescuento.ImporteDescuento = (GvPS.Rows(e.RowIndex).FCTextBox("TxtDescuento").Text.ToDecimal).RoundSQL(NumeroDecimales)
|
||||
|
||||
Dim DescuentoManual As Decimal = (GvPS.Rows(e.RowIndex).FCTextBox("TxtDescuento").Text.ToDecimal).RoundSQL(NumeroDecimales)
|
||||
|
||||
ObjDescuento.ImporteDescuento = DescuentoManual
|
||||
CuentaPredial = GvPS.Rows(e.RowIndex).FCTextBox("TxtPredial").Text.Trim
|
||||
|
||||
If PU <= 0 AndAlso UsuarioActual.Empresa.Funcionalidad(558) = "1" Then
|
||||
@@ -6980,6 +6985,11 @@ Partial Class Ventas
|
||||
ObjDescuento = CalcularDescuentos(TmpDT.Rows(e.RowIndex)("CvePS").ToString().ToEntero(), Cantidad, PU)
|
||||
End If
|
||||
|
||||
'SI ESTA HABILITADO LA OPCION DE DESCUENTO, SE AGREGO UN DESCUENTO MANUAL Y NO TIENE PROMOCION
|
||||
If GvPS.Rows(e.RowIndex).FCTextBox("TxtDescuento").Enabled AndAlso (ObjDescuento.CvePromocionDetalle <= 0 AndAlso ObjDescuento.ImporteDescuento <= 0) AndAlso DescuentoManual > 0 Then
|
||||
ObjDescuento.ImporteDescuento = DescuentoManual
|
||||
End If
|
||||
|
||||
Dim CantidadOriginal As Decimal = GvPS.Rows(e.RowIndex).DataKey("Cantidad").ToDecimal()
|
||||
|
||||
Dim DatarowPS As DataRow = Nothing
|
||||
@@ -18707,6 +18717,14 @@ Partial Class Ventas
|
||||
TieneMovimientosContrato = DtMovimientosDetalles.COUNT("CveTipoAlmacen", "CveTipoAlmacen IN (11)") > 0
|
||||
|
||||
For Each dr As DataRow In DtMovimientos.Rows
|
||||
|
||||
'VERIFICA SI YA SE GENERARON LAS SALIDAS DE ALMACEN NECESARIAS
|
||||
If DtRemConceptosSurtidos IsNot Nothing Then
|
||||
If DtRemConceptosSurtidos.SUMD("Surtido") = DtRemConceptosSurtidos.SUMD("Cantidad") Then
|
||||
Exit For
|
||||
End If
|
||||
End If
|
||||
|
||||
'Obtenemos los Movimientos de salida
|
||||
If ObjInventario.GetMovimientos(dr("CveMovimiento").ToString().ToEntero(), ConceptoMovimiento, -1, UsuarioActual.CveEmpresa) Then
|
||||
|
||||
@@ -18788,7 +18806,8 @@ Partial Class Ventas
|
||||
If ConSalida AndAlso Not OcurrioError Then
|
||||
|
||||
If Not OcurrioError Then
|
||||
GeneroMovimientoAlmacen = GenerarMovimientoAlmacen(ObjInventario, MovDetalle, CveAlmacenParaSalida, CveConceptoSalidaAlmacen, CveMoneda, ObjFactura.CveVenta, AplicaMovimientoDetalleEntrada:=AplicaMovimientoDetalleEntrada, MovimientoPrePoliza:=True, ObjConta:=ObjConta) > 0
|
||||
Dim CveMovimientoSalidaAlmacen As Integer = GenerarMovimientoAlmacen(ObjInventario, MovDetalle, CveAlmacenParaSalida, CveConceptoSalidaAlmacen, CveMoneda, ObjFactura.CveVenta, AplicaMovimientoDetalleEntrada:=AplicaMovimientoDetalleEntrada, MovimientoPrePoliza:=True, ObjConta:=ObjConta)
|
||||
GeneroMovimientoAlmacen = CveMovimientoSalidaAlmacen > 0
|
||||
|
||||
If Not GeneroMovimientoAlmacen Then
|
||||
OcurrioError = True
|
||||
@@ -18796,7 +18815,7 @@ Partial Class Ventas
|
||||
End If
|
||||
|
||||
If Not OcurrioError AndAlso UsuarioActual.Empresa.Funcionalidad(573) = "1" Then
|
||||
OcurrioError = Not GenerarMovimientoAlmacenVirtual(CveRemision, ObjInventario, ObjFactura, ObjConta:=ObjConta)
|
||||
OcurrioError = Not GenerarMovimientoAlmacenVirtual(CveMovimientoSalidaAlmacen, CveAlmacenParaSalida, ObjInventario, ObjConta:=ObjConta)
|
||||
End If
|
||||
End If
|
||||
|
||||
@@ -19162,7 +19181,7 @@ Partial Class Ventas
|
||||
|
||||
Return Not OcurrioError
|
||||
End Function
|
||||
Private Function GenerarMovimientoAlmacenVirtual(CveRemision As Integer, ByRef ObjInventario As ClsInventarios, ObjFactura As Modelos.Factura, Optional ByRef ObjConta As ClsContabilidad = Nothing) As Boolean
|
||||
Private Function GenerarMovimientoAlmacenVirtual(CveMovimientoSalidaAlmacen As Integer, CveAlmacen As Integer, ByRef ObjInventario As ClsInventarios, Optional ByRef ObjConta As ClsContabilidad = Nothing) As Boolean
|
||||
Dim OcurrioError As Boolean = False
|
||||
|
||||
Try
|
||||
@@ -19170,54 +19189,21 @@ Partial Class Ventas
|
||||
Dim CveAlmacenVirtual As Integer = -1
|
||||
Dim CveConceptoMovimientoVirtual As Integer = 37
|
||||
Dim DtPSVirtual As DataTable = Nothing
|
||||
Dim DtTamanios As DataTable = Nothing
|
||||
Dim CveMovimientoReferencia As Integer = -1
|
||||
|
||||
'SI LA REMISION SE SURTIO CON USADOS UTILIZAR ESTE MOVIMIENTO
|
||||
If ObjInventario.GetInv_Mov(CveRemision, UsuarioActual.CveEmpresa) Then
|
||||
Dim RowMovimiento As DataRow = ObjInventario.DtResultados.FiltroPrimero("CvePS IS NULL AND (CveTipoAlmacen = 1 AND CveConcepto IN (3,8)) AND CveVenta > 0")
|
||||
|
||||
If RowMovimiento IsNot Nothing Then
|
||||
CveMovimientoReferencia = RowMovimiento("CveMovimiento").ToString().ToEntero()
|
||||
Dim tCveAlmacen = RowMovimiento("CveAlmacen").ToString().ToEntero()
|
||||
CveAlmacenVirtual = GlobalDTAlmacen(UsuarioActual.CveEmpresa, CveAlmacen:=tCveAlmacen).FiltroPrimeroValor("CveAlmacenVirtual").ToEntero()
|
||||
End If
|
||||
|
||||
Else
|
||||
OcurrioError = True
|
||||
End If
|
||||
|
||||
'SI NO SE SURTIO LA REMSION CON USADOS, UTILIZAR EL MOVIMIENTO DE SALIDA DEL INGRESO
|
||||
If CveMovimientoReferencia <= 0 Then
|
||||
If ObjInventario.GetInv_Mov(ObjFactura.CveVenta, UsuarioActual.CveEmpresa) Then
|
||||
Dim RowMovimiento As DataRow = ObjInventario.DtResultados.FiltroPrimero("CvePS IS NULL AND ( (CveTipoAlmacen = 1 AND CveConcepto IN (3,8)) OR (CveTipoAlmacen = 10 AND CveConcepto = 40) ) AND CveVenta > 0")
|
||||
|
||||
If RowMovimiento IsNot Nothing Then
|
||||
CveMovimientoReferencia = RowMovimiento("CveMovimiento").ToString().ToEntero()
|
||||
Dim tCveAlmacen = RowMovimiento("CveAlmacen").ToString().ToEntero()
|
||||
CveAlmacenVirtual = GlobalDTAlmacen(UsuarioActual.CveEmpresa, CveAlmacen:=tCveAlmacen).FiltroPrimeroValor("CveAlmacenVirtual").ToEntero()
|
||||
|
||||
Else
|
||||
OcurrioError = True
|
||||
End If
|
||||
|
||||
Else
|
||||
OcurrioError = True
|
||||
End If
|
||||
End If
|
||||
CveAlmacenVirtual = GlobalDTAlmacen(UsuarioActual.CveEmpresa, CveAlmacen:=CveAlmacen).FiltroPrimeroValor("CveAlmacenVirtual").ToEntero()
|
||||
|
||||
'SI TIENE ALMACEN VIRTUAL ASIGNADO GENERA EL MOVIMIENTO VIRTUAL
|
||||
If CveAlmacenVirtual > 0 Then
|
||||
|
||||
If ObjInventario.GetMovimientosDetalleVirtual(CveMovimientoReferencia, UsuarioActual.CveEmpresa) Then
|
||||
If ObjInventario.GetMovimientosDetalleVirtual(CveMovimientoSalidaAlmacen, UsuarioActual.CveEmpresa) Then
|
||||
DtPSVirtual = ObjInventario.DtResultados.Copy()
|
||||
Else
|
||||
OcurrioError = True
|
||||
End If
|
||||
|
||||
If Not OcurrioError AndAlso DtPSVirtual.Rows.Count > 0 Then
|
||||
If Not OcurrioError AndAlso DtPSVirtual IsNot Nothing AndAlso DtPSVirtual.Rows.Count > 0 Then
|
||||
|
||||
CveMovimientoVirtual = ObjInventario.AddMovimiento(CveAlmacenVirtual, CveConceptoMovimientoVirtual, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, ObjFactura.CveVenta, -1, -1, Modulo:="Vta/VV", CveMovimientoRelacionado:=CveMovimientoReferencia)
|
||||
CveMovimientoVirtual = ObjInventario.AddMovimiento(CveAlmacenVirtual, CveConceptoMovimientoVirtual, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, ObjFactura.CveVenta, -1, -1, Modulo:="Vta/VV2", CveMovimientoRelacionado:=CveMovimientoSalidaAlmacen)
|
||||
|
||||
If CveMovimientoVirtual > 0 Then
|
||||
For Each RowUsado As DataRow In DtPSVirtual.Rows
|
||||
@@ -19287,6 +19273,9 @@ Partial Class Ventas
|
||||
End If
|
||||
|
||||
End If
|
||||
Else
|
||||
Alert("No se tiene definido el almacen virtual.")
|
||||
OcurrioError = True
|
||||
End If
|
||||
|
||||
Catch ex As Exception
|
||||
@@ -24444,7 +24433,7 @@ Partial Class Ventas
|
||||
End If
|
||||
|
||||
'al gasto,Subtotal
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, SubtotalMovto, SubTotal, SerieFolio, CveConceptoDeduccion, ConceptoPartida, FechaPago, IdCuentaContableNoDeducible, -1, CveCliente:=CveCliente, CveVenta:=CveVenta, ImporteMX:=SubTotal, CveCuenta:=-1, TipoCambio:=TCVenta, TipoCambioPago:=TCPago) Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, SubtotalMovto, SubTotal, SerieFolio, CveConceptoDeduccion, ConceptoPartida, FechaPago, IdCuentaContableNoDeducible, -1, CveCliente:=CveCliente, CveVenta:=CveVenta, ImporteMX:=SubTotal, CveCuenta:=-1, TipoCambio:=TCVenta, TipoCambioPago:=TCPago, CveSubProyecto:=DdlSubProyectoDatos.SelectedValue.ToEntero()) Then
|
||||
MsgError = "Ocurrio un error al saldar el movimiento"
|
||||
End If
|
||||
|
||||
@@ -25055,6 +25044,14 @@ Partial Class Ventas
|
||||
End Sub
|
||||
|
||||
Protected Sub RblRNCTipo_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
ChkMostarProductosRNC.Checked = False
|
||||
DivRNCCargosDetalle.Visible = False
|
||||
DivRNCCargos.Visible = True
|
||||
|
||||
ChkMostarProductosRNCBon.Checked = False
|
||||
DivRNCBonificacionesDetalle.Visible = False
|
||||
DivRNCBonificaciones.Visible = True
|
||||
|
||||
Select Case RblRNCTipo.SelectedValue
|
||||
Case "1" 'CARGOS
|
||||
LtlCargos.Text = "CARGOS"
|
||||
@@ -25130,7 +25127,7 @@ Partial Class Ventas
|
||||
If ChkMostarProductosRNC.Checked Then
|
||||
DivRNCCargos.Visible = False
|
||||
DivRNCCargosDetalle.Visible = True
|
||||
CargaRNCDetalle(DdlVentaUsado.SelectedValue.ToEntero())
|
||||
CargaRNCDetalle(DdlVentaUsado.SelectedValue.ToEntero(), CargaSoloGarantias:=RblRNCTipo.SelectedValue = "3")
|
||||
Else
|
||||
DivRNCCargos.Visible = True
|
||||
DivRNCCargosDetalle.Visible = False
|
||||
@@ -25202,26 +25199,38 @@ Partial Class Ventas
|
||||
HdnSaldoMaximoUsados.Value = SaldoMaximoUsados.ToString()
|
||||
LtlSMU.Text = String.Format("{0:N2}", SaldoMaximoUsados)
|
||||
Else
|
||||
Dim ObjAcum As New ClsAcumuladores
|
||||
If ObjAcum.GetMovimientosDistribuidorResumen(CveCliente, UsuarioActual.CveEmpresa) Then
|
||||
Dim RowUsadosNC As DataRow = ObjAcum.DtResultados.Rows(2)
|
||||
DivSMU.Visible = True
|
||||
|
||||
Dim SaldoMaximo As Decimal = RowUsadosNC("ValorConImpuestos").ToString().ToDecimal()
|
||||
If CargarSoloGarantias Then
|
||||
Dim SaldoMaximo As Decimal = DtNC.SUMD("Saldo", "TipoRNC = 1 AND EsGarantia = True")
|
||||
If SaldoMaximo > 0 Then
|
||||
HdnSaldoMaximoUsados.Value = RowUsadosNC("ValorConImpuestos").ToString()
|
||||
LtlSMU.Text = RowUsadosNC("ValorConImpuestos").ToString().ToDecimal().FormatoNumero(2)
|
||||
HdnSaldoMaximoUsados.Value = SaldoMaximo.ToString()
|
||||
LtlSMU.Text = SaldoMaximo.FormatoNumero(2)
|
||||
Else
|
||||
HdnSaldoMaximoUsados.Value = "0"
|
||||
LtlSMU.Text = "0"
|
||||
End If
|
||||
|
||||
Else
|
||||
'DivSMU.Visible = False
|
||||
HdnSaldoMaximoUsados.Value = "0"
|
||||
LtlSMU.Text = "0"
|
||||
Dim ObjAcum As New ClsAcumuladores
|
||||
If ObjAcum.GetMovimientosDistribuidorResumen(CveCliente, UsuarioActual.CveEmpresa) Then
|
||||
Dim RowUsadosNC As DataRow = ObjAcum.DtResultados.Rows(2)
|
||||
DivSMU.Visible = True
|
||||
|
||||
Dim SaldoMaximo As Decimal = RowUsadosNC("ValorConImpuestos").ToString().ToDecimal()
|
||||
If SaldoMaximo > 0 Then
|
||||
HdnSaldoMaximoUsados.Value = RowUsadosNC("ValorConImpuestos").ToString()
|
||||
LtlSMU.Text = RowUsadosNC("ValorConImpuestos").ToString().ToDecimal().FormatoNumero(2)
|
||||
Else
|
||||
HdnSaldoMaximoUsados.Value = "0"
|
||||
LtlSMU.Text = "0"
|
||||
End If
|
||||
|
||||
Else
|
||||
'DivSMU.Visible = False
|
||||
HdnSaldoMaximoUsados.Value = "0"
|
||||
LtlSMU.Text = "0"
|
||||
End If
|
||||
ObjAcum.Dispose()
|
||||
End If
|
||||
ObjAcum.Dispose()
|
||||
|
||||
End If
|
||||
Else
|
||||
HdnSaldoMaximoUsados.Value = "0"
|
||||
@@ -25271,7 +25280,7 @@ Partial Class Ventas
|
||||
UpDescNC.Update()
|
||||
End Sub
|
||||
|
||||
Private Sub CargaRNCDetalle(Optional CveVentaUsado As Integer = -1)
|
||||
Private Sub CargaRNCDetalle(Optional CveVentaUsado As Integer = -1, Optional CargaSoloGarantias As Boolean = False)
|
||||
Dim DtNC As DataTable = Nothing
|
||||
|
||||
Dim ObjMovtos As New ClsMovimientos()
|
||||
@@ -25280,6 +25289,12 @@ Partial Class Ventas
|
||||
End If
|
||||
ObjMovtos.Dispose()
|
||||
|
||||
If CargaSoloGarantias Then
|
||||
TmpDTRNCDetalle = TmpDTRNCDetalle.FiltraParametros("EsGarantia = True")
|
||||
Else
|
||||
TmpDTRNCDetalle = TmpDTRNCDetalle.FiltraParametros("EsGarantia = False")
|
||||
End If
|
||||
|
||||
Me.TmpDTRNCDetalle.Columns.Add(New DataColumn("CveVentaDetalleNCGenerada", GetType(Integer)))
|
||||
|
||||
Me.TmpDTRNCDetalleSelecciondas = Nothing
|
||||
@@ -25311,18 +25326,30 @@ Partial Class Ventas
|
||||
End If
|
||||
|
||||
Else
|
||||
Dim ObjAcum As New ClsAcumuladores
|
||||
If ObjAcum.GetMovimientosDistribuidorResumen(CveCliente, UsuarioActual.CveEmpresa) Then
|
||||
Dim RowUsadosNC As DataRow = ObjAcum.DtResultados.Rows(2)
|
||||
DivSMU.Visible = True
|
||||
HdnSaldoMaximoUsados.Value = RowUsadosNC("ValorConImpuestos").ToString()
|
||||
LtlSMU.Text = RowUsadosNC("ValorConImpuestos").ToString().ToDecimal().FormatoNumero(2)
|
||||
If CargaSoloGarantias Then
|
||||
Dim SaldoMaximo As Decimal = TmpDTRNCDetalle.SUMD("Total", "TipoRNC = 1")
|
||||
If SaldoMaximo > 0 Then
|
||||
HdnSaldoMaximoUsados.Value = SaldoMaximo.ToString()
|
||||
LtlSMU.Text = SaldoMaximo.FormatoNumero(2)
|
||||
Else
|
||||
HdnSaldoMaximoUsados.Value = "0"
|
||||
LtlSMU.Text = "0"
|
||||
End If
|
||||
Else
|
||||
'DivSMU.Visible = False
|
||||
HdnSaldoMaximoUsados.Value = "0"
|
||||
LtlSMU.Text = "0"
|
||||
Dim ObjAcum As New ClsAcumuladores
|
||||
If ObjAcum.GetMovimientosDistribuidorResumen(CveCliente, UsuarioActual.CveEmpresa) Then
|
||||
Dim RowUsadosNC As DataRow = ObjAcum.DtResultados.Rows(2)
|
||||
DivSMU.Visible = True
|
||||
HdnSaldoMaximoUsados.Value = RowUsadosNC("ValorConImpuestos").ToString()
|
||||
LtlSMU.Text = RowUsadosNC("ValorConImpuestos").ToString().ToDecimal().FormatoNumero(2)
|
||||
Else
|
||||
'DivSMU.Visible = False
|
||||
HdnSaldoMaximoUsados.Value = "0"
|
||||
LtlSMU.Text = "0"
|
||||
End If
|
||||
ObjAcum.Dispose()
|
||||
End If
|
||||
ObjAcum.Dispose()
|
||||
|
||||
End If
|
||||
|
||||
UpModalRemisionesNC.Update()
|
||||
@@ -25344,9 +25371,9 @@ Partial Class Ventas
|
||||
Me.TmpDTRNCDetalleSelecciondas.Clear()
|
||||
|
||||
If CargarSoloGarantias Then
|
||||
GvDescNCCargosDetalle.DataSource = TmpDTRNCDetalle.FiltraParametros("TipoRNC = 1")
|
||||
GvDescNCCargosDetalle.DataSource = TmpDTRNCDetalle.FiltraParametros("TipoRNC = 1 AND EsGarantia = True")
|
||||
Else
|
||||
GvDescNCCargosDetalle.DataSource = TmpDTRNCDetalle.FiltraParametros("TipoRNC = 1")
|
||||
GvDescNCCargosDetalle.DataSource = TmpDTRNCDetalle.FiltraParametros("TipoRNC = 1 AND EsGarantia = False")
|
||||
End If
|
||||
GvDescNCCargosDetalle.DataBind()
|
||||
|
||||
@@ -25394,28 +25421,31 @@ Partial Class Ventas
|
||||
GvRemisionesNCBonDetalle.DataSource = TmpDTRNCDetalle.FiltraParametros("TipoRNC = 2")
|
||||
GvRemisionesNCBonDetalle.DataBind()
|
||||
|
||||
Dim ObjAcum As New ClsAcumuladores
|
||||
If ObjAcum.GetMovimientosDistribuidorResumen(CveCliente, UsuarioActual.CveEmpresa) Then
|
||||
Dim RowUsadosNC As DataRow = ObjAcum.DtResultados.Rows(5)
|
||||
DivSMU.Visible = True
|
||||
HdnSMUBon.Value = RowUsadosNC("ValorConImpuestos").ToString()
|
||||
LtlSMUBon.Text = RowUsadosNC("ValorConImpuestos").ToString().ToDecimal().FormatoNumero(2)
|
||||
If DdlVentaUsado.SelectedValue.ToEntero() > 0 Then
|
||||
Dim DtDetalleFactura As DataTable = Nothing
|
||||
Using ObjVentas As New ClsVentas
|
||||
If ObjVentas.GetVentaDetalle(DdlVentaUsado.SelectedValue.ToEntero()) Then
|
||||
DtDetalleFactura = ObjVentas.DtResultados.FiltraParametros("EsCargo = True")
|
||||
End If
|
||||
End Using
|
||||
Dim ImporteBon As Decimal = DtDetalleFactura.SUMD("PUBonificacion") * (1 + DtDetalleFactura.MAX("PorcentajeIVA").ToDecimal())
|
||||
|
||||
LtlSMUBon.Text = String.Format("{0:N2}", ImporteBon)
|
||||
HdnSMUBon.Value = ImporteBon.ToString()
|
||||
|
||||
DtDetalleFactura.Dispose()
|
||||
Else
|
||||
'DivSMU.Visible = False
|
||||
HdnSMUBon.Value = "0"
|
||||
LtlSMUBon.Text = "0"
|
||||
If TmpDTRNCBonificacionesSeleccionadas IsNot Nothing Then
|
||||
Dim SaldoMaximo As Decimal = TmpDTRNCBonificacionesSeleccionadas.SUMD("Saldo")
|
||||
If SaldoMaximo > 0 Then
|
||||
HdnSMUBon.Value = SaldoMaximo.ToString()
|
||||
LtlSMUBon.Text = SaldoMaximo.FormatoNumero(2)
|
||||
Else
|
||||
HdnSMUBon.Value = "0"
|
||||
LtlSMUBon.Text = "0"
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
ObjAcum.Dispose()
|
||||
|
||||
'Dim SaldoMaximoUsados As Decimal = Me.TmpDT.SUM("Total", "EsCargo = True").ToDecimal() + Me.TmpDT.SUM("ImporteIVA", "EsCargo = True").ToDecimal()
|
||||
|
||||
'If SaldoMaximoUsados > 0 Then
|
||||
' HdnSaldoMaximoUsados.Value = SaldoMaximoUsados.ToString()
|
||||
' LblSaldoMaximoUsados.Text = String.Format("{0:N2}", SaldoMaximoUsados)
|
||||
'Else
|
||||
' HdnSaldoMaximoUsados.Value = "0"
|
||||
' LblSaldoMaximoUsados.Text = "0"
|
||||
'End If
|
||||
|
||||
UpModalRemisionesNC.Update()
|
||||
End Sub
|
||||
@@ -25528,17 +25558,30 @@ Partial Class Ventas
|
||||
|
||||
'LtlSMUBon.Text = String.Format("{0:N2}", SMUBon)
|
||||
'HdnSMUBon.Value = SMUBon.ToString()
|
||||
If DdlVentaUsado.SelectedValue.ToEntero() > 0 Then
|
||||
Dim DtDetalleFactura As DataTable = Nothing
|
||||
Using ObjVentas As New ClsVentas
|
||||
If ObjVentas.GetVentaDetalle(DdlVentaUsado.SelectedValue.ToEntero()) Then
|
||||
DtDetalleFactura = ObjVentas.DtResultados.FiltraParametros("EsCargo = True")
|
||||
End If
|
||||
End Using
|
||||
Dim ImporteBon As Decimal = DtDetalleFactura.SUMD("PUBonificacion") * (1 + DtDetalleFactura.MAX("PorcentajeIVA").ToDecimal())
|
||||
|
||||
Dim ObjAcum2 As New ClsAcumuladores
|
||||
If ObjAcum2.GetMovimientosDistribuidorResumen(CveCliente, UsuarioActual.CveEmpresa) Then
|
||||
Dim RowUsadosNC As DataRow = ObjAcum2.DtResultados.Rows(5)
|
||||
HdnSMUBon.Value = RowUsadosNC("ValorConImpuestos").ToString()
|
||||
LtlSMUBon.Text = RowUsadosNC("ValorConImpuestos").ToString().ToDecimal().FormatoNumero(2)
|
||||
LtlSMUBon.Text = String.Format("{0:N2}", ImporteBon)
|
||||
HdnSMUBon.Value = ImporteBon.ToString()
|
||||
|
||||
DtDetalleFactura.Dispose()
|
||||
Else
|
||||
HdnSMUBon.Value = "0"
|
||||
LtlSMUBon.Text = "0"
|
||||
Dim SaldoMaximo As Decimal = TmpDTRNCBonificacionesSeleccionadas.SUMD("Saldo")
|
||||
If SaldoMaximo > 0 Then
|
||||
HdnSMUBon.Value = SaldoMaximo.ToString()
|
||||
LtlSMUBon.Text = SaldoMaximo.FormatoNumero(2)
|
||||
Else
|
||||
HdnSMUBon.Value = "0"
|
||||
LtlSMUBon.Text = "0"
|
||||
End If
|
||||
End If
|
||||
ObjAcum2.Dispose()
|
||||
|
||||
|
||||
UpModalRemisionesNC.Update()
|
||||
End If
|
||||
@@ -25728,6 +25771,7 @@ Partial Class Ventas
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
If e.Row.DBCampo("CveVentaDetalleRNC").ToEntero() = 0 Then
|
||||
e.Row.FCLiteral("TtlTotal").Text = DirectCast(GvRemisionesNCBonDetalle.DataSource, DataTable).SUMD("Total", $"CveVenta = {e.Row.DBCampo("CveVenta")}").FormatoNumero(2)
|
||||
e.Row.CssClass = "Totales"
|
||||
e.Row.FCCheckBox("ChkAplicar").Visible = False
|
||||
e.Row.FCTextBox("TxtCantidadRNC").Visible = False
|
||||
@@ -25769,6 +25813,7 @@ Partial Class Ventas
|
||||
Protected Sub GvRemisionesNCDetalle_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvRemisionesNCDetalle.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
If e.Row.DBCampo("CveVentaDetalleRNC").ToEntero() = 0 Then
|
||||
e.Row.FCLiteral("TtlTotal").Text = DirectCast(GvRemisionesNCDetalle.DataSource, DataTable).SUMD("Total", $"CveVenta = {e.Row.DBCampo("CveVenta")}").FormatoNumero(2)
|
||||
e.Row.CssClass = "Totales"
|
||||
e.Row.FCCheckBox("ChkAplicar").Visible = False
|
||||
e.Row.FCTextBox("TxtCantidadRNC").Visible = False
|
||||
@@ -25796,16 +25841,6 @@ Partial Class Ventas
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnAplicarNC_Click(sender As Object, e As EventArgs)
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(344) = "1" Then
|
||||
If ListaRemisionesNC IsNot Nothing AndAlso ListaRemisionesNC.Count > 0 Then
|
||||
If TxtImportesRemisionesNC.Text.ToDecimal() <> TxtNCImporte.Text.ToDecimal() Then
|
||||
Alert($"Los importes no coinciden", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
'SOLO APLICA SI NO HAY DOCUMENTOS QUE SELECCIONAR
|
||||
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
|
||||
If GvCxC.Rows.Count = 0 OrElse GvCxC.Rows.Cast(Of GridViewRow)().Count(Function(gvr) gvr.FCCheckBox("ChkCxC").Checked) = 0 Then
|
||||
@@ -25829,6 +25864,20 @@ Partial Class Ventas
|
||||
End Sub
|
||||
|
||||
Private Sub AplicarNotaCreditoDesdeVenta(Optional AplicaNuevoDocumento As Boolean = False)
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(344) = "1" Then
|
||||
If AplicaNuevoDocumento AndAlso TxtImportesRemisionesNC.Text.ToDecimal() > 0 Then
|
||||
TxtNCImporte.Text = TxtImportesRemisionesNC.Text
|
||||
End If
|
||||
|
||||
If ListaRemisionesNC IsNot Nothing AndAlso ListaRemisionesNC.Count > 0 Then
|
||||
If TxtImportesRemisionesNC.Text.ToDecimal() <> TxtNCImporte.Text.ToDecimal() Then
|
||||
Alert($"Los importes no coinciden", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
RegistraScript("$('#ModalAplicarNC').modal('hide');", "EscondeModalNC")
|
||||
|
||||
CveVentaUsadoDevolucionEfectivo = -1
|
||||
@@ -25998,11 +26047,11 @@ Partial Class Ventas
|
||||
PorcentajeIEPS = dr("PorcentajeIEPS").ToString().ToDecimal
|
||||
Into x = Group
|
||||
Select ImportePU = x.Sum(Function(s) s("ImportePU").ToString().ToDecimal),
|
||||
ImporteTotal = x.Sum(Function(s) s("ImporteTotal").ToString().ToDecimal),
|
||||
ImporteTotal = x.Sum(Function(s) s("ImporteTotal").ToString().ToDecimal).RoundSQL(2),
|
||||
ImporteIVA = x.Sum(Function(s) (s("ImporteIVA").ToString().ToDecimal)).RoundSQL(2), ' Math.Round(s("ImporteIVA").ToString().ToDecimal, 2)) * (1 + PorcentajeIEPS) * PorcentajeIVA,
|
||||
ImporteRetIVA = x.Sum(Function(s) Math.Round(s("ImporteRetIVA").ToString().ToDecimal, 2)),' Math.Round(s("ImportePU").ToString().ToDecimal, 2)) * PorcentajeRetIVA,
|
||||
ImporteRetISR = x.Sum(Function(s) Math.Round(s("ImporteRetISR").ToString().ToDecimal, 2)),' Math.Round(s("ImportePU").ToString().ToDecimal, 2)) * PorcentajeRetISR,
|
||||
ImporteIEPS = x.Sum(Function(s) Math.Round(s("ImporteIEPS").ToString().ToDecimal, 2)), 'Math.Round(s("ImportePU").ToString().ToDecimal, 2)) * PorcentajeIEPS,
|
||||
ImporteRetIVA = x.Sum(Function(s) (s("ImporteRetIVA").ToString().ToDecimal)).RoundSQL(2),' Math.Round(s("ImportePU").ToString().ToDecimal, 2)) * PorcentajeRetIVA,
|
||||
ImporteRetISR = x.Sum(Function(s) (s("ImporteRetISR").ToString().ToDecimal)).RoundSQL(2),' Math.Round(s("ImportePU").ToString().ToDecimal, 2)) * PorcentajeRetISR,
|
||||
ImporteIEPS = x.Sum(Function(s) (s("ImporteIEPS").ToString().ToDecimal)).RoundSQL(2), 'Math.Round(s("ImportePU").ToString().ToDecimal, 2)) * PorcentajeIEPS,
|
||||
PorcentajeIVA = PorcentajeIVA,
|
||||
PorcentajeRetIVA = PorcentajeRetIVA,
|
||||
PorcentajeRetISR = PorcentajeRetISR,
|
||||
@@ -26016,11 +26065,11 @@ Partial Class Ventas
|
||||
PorcentajeIEPS = dr("PorcentajeIEPS").ToString().ToDecimal
|
||||
Into x = Group
|
||||
Select ImportePU = x.Sum(Function(s) s("ImportePU").ToString().ToDecimal),
|
||||
ImporteTotal = x.Sum(Function(s) s("ImporteTotal").ToString().ToDecimal),
|
||||
ImporteTotal = x.Sum(Function(s) s("ImporteTotal").ToString().ToDecimal).RoundSQL(2),
|
||||
ImporteIVA = x.Sum(Function(s) (s("ImporteIVA").ToString().ToDecimal)).RoundSQL(2), ' Math.Round(s("ImporteIVA").ToString().ToDecimal, 2)) * (1 + PorcentajeIEPS) * PorcentajeIVA,
|
||||
ImporteRetIVA = x.Sum(Function(s) Math.Round(s("ImporteRetIVA").ToString().ToDecimal, 2)),' Math.Round(s("ImportePU").ToString().ToDecimal, 2)) * PorcentajeRetIVA,
|
||||
ImporteRetISR = x.Sum(Function(s) Math.Round(s("ImporteRetISR").ToString().ToDecimal, 2)),' Math.Round(s("ImportePU").ToString().ToDecimal, 2)) * PorcentajeRetISR,
|
||||
ImporteIEPS = x.Sum(Function(s) Math.Round(s("ImporteIEPS").ToString().ToDecimal, 2)), 'Math.Round(s("ImportePU").ToString().ToDecimal, 2)) * PorcentajeIEPS,
|
||||
ImporteRetIVA = x.Sum(Function(s) (s("ImporteRetIVA").ToString().ToDecimal)).RoundSQL(2),' Math.Round(s("ImportePU").ToString().ToDecimal, 2)) * PorcentajeRetIVA,
|
||||
ImporteRetISR = x.Sum(Function(s) (s("ImporteRetISR").ToString().ToDecimal)).RoundSQL(2),' Math.Round(s("ImportePU").ToString().ToDecimal, 2)) * PorcentajeRetISR,
|
||||
ImporteIEPS = x.Sum(Function(s) (s("ImporteIEPS").ToString().ToDecimal)).RoundSQL(2), 'Math.Round(s("ImportePU").ToString().ToDecimal, 2)) * PorcentajeIEPS,
|
||||
PorcentajeIVA = PorcentajeIVA,
|
||||
PorcentajeRetIVA = PorcentajeRetIVA,
|
||||
PorcentajeRetISR = PorcentajeRetISR,
|
||||
@@ -26037,6 +26086,19 @@ Partial Class Ventas
|
||||
DtImpuestos = query.QueryToDataTable(False)
|
||||
DtImpuestosBonificacion = queryBonificacion.QueryToDataTable(False)
|
||||
|
||||
'ASUSTO LA DIFERENCIA EN EL ÚLTIMO CONCEPTO
|
||||
If TipoDoctoNC = "Egs" AndAlso (Not AplicaNuevoDocumento) AndAlso AplicaNCMasiva AndAlso (Not NCDescuento) AndAlso AcumuladoNC > 0 Then
|
||||
'CODIGO PARA AJUSTE DE CENTAVO, SI EL IMPORTE TOTAL NO CUADRA CON LOS TOTALES
|
||||
Dim ImporteNC As Decimal = DtImpuestos.SUMD("ImporteTotal") + DtImpuestos.SUMD("ImporteIVA") + DtImpuestos.SUMD("ImporteIEPS") - DtImpuestos.SUMD("ImporteRetIVA") - DtImpuestos.SUMD("ImporteRetISR")
|
||||
|
||||
Dim difTmp As Decimal = AcumuladoNC - ImporteNC
|
||||
If Math.Abs(difTmp) > 0.00D Then
|
||||
Dim ImporteAjustado As Decimal = DtImpuestos.Rows(DtImpuestos.Rows.Count - 1)("ImporteTotal").ToString().ToDecimal + difTmp
|
||||
DtImpuestos.Rows(DtImpuestos.Rows.Count - 1)("ImporteTotal") = ImporteAjustado
|
||||
DtImpuestos.Rows(DtImpuestos.Rows.Count - 1)("ImportePU") = ImporteAjustado
|
||||
End If
|
||||
End If
|
||||
|
||||
If Not NCDescuento Then
|
||||
LimpiaDocumentoNC()
|
||||
End If
|
||||
@@ -26301,8 +26363,14 @@ Partial Class Ventas
|
||||
'SI ES ACUMULADOR LAS OBSERVACIOENS DEBEN SER EL NOMBRE DEL ACUMULADOR
|
||||
If GlobalDTAcumTamaños().FiltroPrimero($"CvePSCargo = {CvePSCargo}") IsNot Nothing Then
|
||||
Obs = RowUsado("CodigoPS").ToString()
|
||||
'Else
|
||||
' Obs = RowUsado("Obs").ToString()
|
||||
End If
|
||||
'SI TIENE BCI EN LAS OBSERVACIONES AGREGARLO A LA FACTURA
|
||||
If Not String.IsNullOrEmpty(RowUsado("Observaciones").ToString()) Then
|
||||
If String.IsNullOrEmpty(Obs) Then
|
||||
Obs = RowUsado("Observaciones").ToString()
|
||||
Else
|
||||
Obs = String.Format("{0} - {1}", Obs, RowUsado("Observaciones").ToString())
|
||||
End If
|
||||
End If
|
||||
|
||||
If Not String.IsNullOrEmpty(TxtNCObservaciones.Text.Trim()) Then
|
||||
@@ -26732,12 +26800,14 @@ Partial Class Ventas
|
||||
TmpDT.Columns.Add("TieneProntoPago", GetType(String))
|
||||
TmpDT.Columns.Add("ImporteProntoPago", GetType(Decimal))
|
||||
End If
|
||||
Dim FechaFactura As DateTime = Now
|
||||
|
||||
If AplicaNCMasiva OrElse AplicaNCUsado Then
|
||||
If ObjVentas.GetVenta(CveVentaNC, UsuarioActual.CveEmpresa) Then
|
||||
If ObjVentas.DtResultados.Rows.Count > 0 Then
|
||||
Total = ObjVentas.DtResultados()(0)("Total").ToString().ToDecimal
|
||||
SubTotal = ObjVentas.DtResultados()(0)("SubTotal").ToString().ToDecimal
|
||||
FechaFactura = ObjVentas.DtResultados()(0)("Fecha").ToString().ToDateTime()
|
||||
End If
|
||||
End If
|
||||
Else
|
||||
@@ -26758,7 +26828,7 @@ Partial Class Ventas
|
||||
Dim ImporteReferencia As Decimal = If(NivelTotal = 1, Total, SubTotal)
|
||||
Dim Porcentaje As Decimal = ((Importe * 100) / ImporteReferencia) / 100
|
||||
Dim FiltroStr As String = ""
|
||||
Dim importePuTemp As Decimal = 0
|
||||
|
||||
Dim TotalImpuestosLocalesVentaOriginal As Decimal = 0
|
||||
Dim TotalImpuestosLocalesRecalculado As Decimal = 0
|
||||
|
||||
@@ -26768,30 +26838,44 @@ Partial Class Ventas
|
||||
TotalImpuestosLocalesRecalculado = TotalImpuestosLocalesVentaOriginal * Porcentaje
|
||||
End If
|
||||
|
||||
Dim AplicaRedondeo As Boolean = True
|
||||
|
||||
If AplicaNCMasiva AndAlso Not NCDescuento Then
|
||||
AplicaRedondeo = False
|
||||
End If
|
||||
|
||||
For Each Dr As DataRow In DtImpuestosLocal.Rows
|
||||
FiltroStr = String.Format("ISNULL(PorcentajeIVA,0) = {0} AND ISNULL(PorcentajeRetIVA,0) = {1} AND ISNULL(PorcentajeRetISR,0) = {2} AND ISNULL(PorcentajeIEPS,0) = {3} AND ISNULL(CveSubProyecto,0) = {4} ", Dr("PorcentajeIVA").ToString().ToDecimal, Dr("PorcentajeRetIVA").ToString().ToDecimal, Dr("PorcentajeRetISR").ToString().ToDecimal, Dr("PorcentajeIEPS").ToString().ToDecimal, Dr("CveSubProyecto"))
|
||||
importePuTemp = (Porcentaje * (TmpDT.SUM("TotalImporte", FiltroStr).ToDecimal() - TmpDT.SUM("Descuento", FiltroStr).ToDecimal()))
|
||||
Dim importePuTemp As Decimal = (Porcentaje * (TmpDT.SUMD("Total", FiltroStr) - TmpDT.SUMD("Descuento", FiltroStr)))
|
||||
|
||||
If Not AplicaImpuestosLocales Then
|
||||
importePuTemp = importePuTemp - TotalImpuestosLocalesVentaOriginal
|
||||
End If
|
||||
|
||||
Dr("ImporteTotal") = importePuTemp.RoundSQL(2)
|
||||
Dr("ImporteIEPS") = (importePuTemp * Dr("PorcentajeIEPS").ToString().ToDecimal())
|
||||
|
||||
'A PARTIR DEL 2020 SE CAMBIO EL CALCULO PARA EL IVA CONSIDERANDO EL IEPS
|
||||
If FechaFactura.Year <= 2019 Then
|
||||
Dr("ImporteIVA") = (importePuTemp * Dr("PorcentajeIVA").ToString().ToDecimal())
|
||||
Else
|
||||
Dim TotalCalculableImpuestosIVA As Decimal = importePuTemp * (1 + Dr("PorcentajeIEPS").ToString().ToDecimal)
|
||||
Dr("ImporteIVA") = ((TotalCalculableImpuestosIVA) * Dr("PorcentajeIVA").ToString().ToDecimal)
|
||||
End If
|
||||
|
||||
Dr("ImporteRetIVA") = (importePuTemp * Dr("PorcentajeRetIVA").ToString().ToDecimal())
|
||||
Dr("ImporteRetISR") = (importePuTemp * Dr("PorcentajeRetISR").ToString().ToDecimal())
|
||||
Dr("ImportePU") = importePuTemp
|
||||
|
||||
If AplicaRedondeo Then
|
||||
Dr("ImporteIEPS") = Dr("ImporteIEPS").ToString().ToDecimal().RoundSQL(2)
|
||||
Dr("ImporteIVA") = Dr("ImporteIVA").ToString().ToDecimal().RoundSQL(2)
|
||||
Dr("ImporteRetIVA") = Dr("ImporteRetIVA").ToString().ToDecimal().RoundSQL(2)
|
||||
Dr("ImporteRetISR") = Dr("ImporteRetISR").ToString().ToDecimal().RoundSQL(2)
|
||||
Dr("ImportePU") = Dr("ImportePU").ToString().ToDecimal().RoundSQL(6)
|
||||
End If
|
||||
|
||||
|
||||
Dim TotalCalculableImpuestosIVA As Decimal = importePuTemp * (1 + Dr("PorcentajeIEPS").ToString().ToDecimal)
|
||||
|
||||
Dr("ImporteIEPS") = (importePuTemp * Dr("PorcentajeIEPS").ToString().ToDecimal()).RoundSQL(2)
|
||||
Dr("ImporteIVA") = ((TotalCalculableImpuestosIVA) * Dr("PorcentajeIVA").ToString().ToDecimal)
|
||||
Dr("ImporteRetIVA") = (importePuTemp * Dr("PorcentajeRetIVA").ToString().ToDecimal()).RoundSQL(2)
|
||||
Dr("ImporteRetISR") = (importePuTemp * Dr("PorcentajeRetISR").ToString().ToDecimal()).RoundSQL(2)
|
||||
|
||||
|
||||
'Dr("ImporteIVA") = (Porcentaje * TmpDT.SUM("ImporteIVA", FiltroStr)).RoundSQL(2)
|
||||
'Dr("ImporteRetIVA") = Math.Round(Porcentaje * TmpDT.SUM("ImporteRetIVA", FiltroStr), 2)
|
||||
'Dr("ImporteRetISR") = Math.Round(Porcentaje * TmpDT.SUM("ImporteRetISR", FiltroStr), 2)
|
||||
'Dr("ImporteIEPS") = Math.Round(Porcentaje * TmpDT.SUM("ImporteIEPS", FiltroStr), 2)
|
||||
Dr("ImportePU") = importePuTemp.RoundSQL(6) 'Dr("ImporteTotal").ToString().ToDecimal.RoundSQL(2) '(Dr("ImporteTotal").ToString().ToDecimal - Dr("ImporteIVA").ToString().ToDecimal - Dr("ImporteRetIVA").ToString().ToDecimal - Dr("ImporteRetISR").ToString().ToDecimal - Dr("ImporteIEPS").ToString().ToDecimal)
|
||||
Next
|
||||
|
||||
Dim importeNC = (DtImpuestosLocal.SUMD("ImporteTotal") + DtImpuestosLocal.SUMD("ImporteIVA") + DtImpuestosLocal.SUMD("ImporteIEPS") - DtImpuestosLocal.SUMD("ImporteRetIVA") - DtImpuestosLocal.SUMD("ImporteRetISR"))
|
||||
@@ -26800,14 +26884,15 @@ Partial Class Ventas
|
||||
Importe = Importe + TotalImpuestosLocalesRecalculado
|
||||
End If
|
||||
|
||||
'codigo para ajuste de centavo, si el importe total no cuadra con los totales
|
||||
Dim difTmp As Decimal = Importe - importeNC
|
||||
|
||||
If Math.Abs(difTmp) > 0.00D Then
|
||||
'asusto la diferencia en el último concepto
|
||||
Dim ImporteAjustado As Decimal = DtImpuestosLocal.Rows(DtImpuestosLocal.Rows.Count - 1)("ImporteTotal").ToString().ToDecimal + difTmp
|
||||
DtImpuestosLocal.Rows(DtImpuestosLocal.Rows.Count - 1)("ImporteTotal") = ImporteAjustado
|
||||
DtImpuestosLocal.Rows(DtImpuestosLocal.Rows.Count - 1)("ImportePU") = ImporteAjustado
|
||||
If AplicaRedondeo Then
|
||||
'ASUSTO LA DIFERENCIA EN EL ÚLTIMO CONCEPTO
|
||||
'CODIGO PARA AJUSTE DE CENTAVO, SI EL IMPORTE TOTAL NO CUADRA CON LOS TOTALES
|
||||
Dim difTmp As Decimal = Importe - importeNC
|
||||
If Math.Abs(difTmp) > 0.00D Then
|
||||
Dim ImporteAjustado As Decimal = DtImpuestosLocal.Rows(DtImpuestosLocal.Rows.Count - 1)("ImporteTotal").ToString().ToDecimal + difTmp
|
||||
DtImpuestosLocal.Rows(DtImpuestosLocal.Rows.Count - 1)("ImporteTotal") = ImporteAjustado
|
||||
DtImpuestosLocal.Rows(DtImpuestosLocal.Rows.Count - 1)("ImportePU") = ImporteAjustado
|
||||
End If
|
||||
End If
|
||||
|
||||
If Not NCDescuento Then
|
||||
@@ -30378,7 +30463,7 @@ Partial Class Ventas
|
||||
|
||||
|
||||
TxtImportesRemisionesNC.Text = TotalRemNCAplicado.FormatoNumero
|
||||
TxtNCImporte.Text = TotalRemNCAplicado.FormatoNumero
|
||||
'TxtNCImporte.Text = TotalRemNCAplicado.FormatoNumero
|
||||
|
||||
UpModalRemisionesNC.Update()
|
||||
UpAplicarNC.Update()
|
||||
|
||||
Reference in New Issue
Block a user