Merge -- Empresas
This commit is contained in:
@@ -421,9 +421,6 @@ Partial Class AC_RegNomina
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
Dim drt As DataRow
|
||||
|
||||
IDPoliza = objAC.AddPoliza(3, TxtConcepto.Text.Trim, 0, 0, UsuarioActual.CveUsuario, Fecha)
|
||||
If IDPoliza > 0 Then
|
||||
|
||||
|
||||
@@ -258,7 +258,7 @@ Public Class ClsContabilidad
|
||||
|
||||
Public Function UpdatePrePolizasDetalle(CvePrePolizaDetalle As Integer, Concepto As String, CveSubProyecto As Integer, IdCtaContable As Integer, TipoMovto As Boolean, ImporteMN As Decimal, Optional CveTipoGasto As Integer = -1,
|
||||
Optional CveConceptoContable As Integer = -1, Optional CveProveedor As Integer = -1, Optional CveCompra As Integer = -1, Optional CvePersonal As Integer = -1, Optional CveCliente As Integer = -1, Optional CveVenta As Integer = -1,
|
||||
Optional Referencia As String = "-1", Optional CveUsuarioModifico As Integer = -1, Optional CveCuenta As Integer = -1) As Boolean
|
||||
Optional Referencia As String = "-1", Optional CveUsuarioModifico As Integer = -1, Optional CveCuenta As Integer = -1, Optional PorcentajeImpuesto As Decimal = -1) As Boolean
|
||||
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
@@ -279,6 +279,7 @@ Public Class ClsContabilidad
|
||||
.Add("@CvePersonal", SqlDbType.Int).Value = CvePersonal
|
||||
.Add("@CveCliente", SqlDbType.Int).Value = CveCliente
|
||||
.Add("@CveVenta", SqlDbType.Int).Value = CveVenta
|
||||
.Add("@PorcentajeImpuesto", SqlDbType.Money).Value = PorcentajeImpuesto
|
||||
.Add("@CveUsuarioModifico", SqlDbType.Int).Value = CveUsuarioModifico
|
||||
.Add("@CveCuenta", SqlDbType.Int).Value = CveCuenta
|
||||
End With
|
||||
|
||||
@@ -2176,7 +2176,7 @@ Public Class ClsInventarios
|
||||
|
||||
#Region " INVENTARIOS - INVENTARIO FISICO "
|
||||
|
||||
Public Function AddInventarioFisico(CveEmpresa As Integer, InventarioFisico As String, Observaciones As String, Estatus As Integer, CveSubProyecto As Integer) As Boolean
|
||||
Public Function AddInventarioFisico(CveEmpresa As Integer, InventarioFisico As String, Observaciones As String, Estatus As Integer, CveSubProyecto As Integer, Optional ConAplicacion As Boolean = False) As Boolean
|
||||
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Inv_InventarioFisicoAdd")
|
||||
@@ -2186,6 +2186,7 @@ Public Class ClsInventarios
|
||||
.Add("@InventarioFisico", SqlDbType.VarChar).Value = InventarioFisico
|
||||
.Add("@Observaciones", SqlDbType.VarChar).Value = Observaciones
|
||||
.Add("@Estatus", SqlDbType.Int).Value = Estatus
|
||||
.Add("@ConAplicacion", SqlDbType.Int).Value = If(ConAplicacion, 1, 0)
|
||||
.Add("@CveInventarioFisico", SqlDbType.Int).Direction = ParameterDirection.Output
|
||||
End With
|
||||
|
||||
@@ -2582,6 +2583,101 @@ Public Class ClsInventarios
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function GetInventarioFisicoDetallesUsuarios(CveInventarioFisico As Integer, CveEmpresa As Integer) As Boolean
|
||||
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Inv_InventarioFisicoDetallesUsuariosGet")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveInventarioFisico", SqlDbType.Int).Value = CveInventarioFisico
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
End With
|
||||
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
|
||||
Catch Ex1 As SqlException
|
||||
Me.OnError("Ocurrió un error al obtener los usuarios del inventario fisico.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al obtener llos usuarios del inventario fisico.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
Public Function AddInventarioFisicoUsuarios(CveInventarioFisico As Integer, CveUsuario As Integer, Incluye As Boolean, Cerrado As Boolean, Bloqueado As Boolean) As Boolean
|
||||
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Inv_InventarioFisicoUsuariosAdd")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveInventarioFisico", SqlDbType.Int).Value = CveInventarioFisico
|
||||
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||
.Add("@Incluye", SqlDbType.Bit).Value = If(Incluye, 1, 0)
|
||||
.Add("@Cerrado", SqlDbType.Bit).Value = If(Cerrado, 1, 0)
|
||||
.Add("@Bloqueado", SqlDbType.Bit).Value = If(Bloqueado, 1, 0)
|
||||
|
||||
End With
|
||||
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
|
||||
Catch Ex1 As SqlException
|
||||
Me.OnError("Ocurrió un error al guardar los usuarios del inventario fisico.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al guardar los usuarios del inventario fisico.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
|
||||
Public Function RemoveInventarioFisicoUsuarios(CveInventarioFisico As Integer) As Boolean
|
||||
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Inv_InventarioFisicoUsuariosRemove")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveInventarioFisico", SqlDbType.Int).Value = CveInventarioFisico
|
||||
|
||||
End With
|
||||
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
|
||||
Catch Ex1 As SqlException
|
||||
Me.OnError("Ocurrió un error al eliminar los usuarios del inventario fisico.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al eliminar los usuarios servicio del inventario fisico.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function UpdateInventarioFisicoUsuarios(CveInventarioFisico As Integer, CveUsuario As Integer, Cerrado As Boolean, Bloqueado As Boolean) As Boolean
|
||||
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Inv_InventarioFisicoUsuariosUpdate")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveInventarioFisico", SqlDbType.Int).Value = CveInventarioFisico
|
||||
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||
.Add("@Cerrado", SqlDbType.Bit).Value = Cerrado
|
||||
.Add("@Bloqueado", SqlDbType.Bit).Value = Bloqueado
|
||||
|
||||
End With
|
||||
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
|
||||
Catch Ex1 As SqlException
|
||||
Me.OnError("Ocurrió un error al eliminar los usuarios del inventario fisico.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al eliminar los usuarios servicio del inventario fisico.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function GetInventarioFisicoDetallesProveedores(CveInventarioFisico As Integer, CveEmpresa As Integer) As Boolean
|
||||
|
||||
Dim Retorno As Boolean = False
|
||||
@@ -2767,12 +2863,13 @@ Public Class ClsInventarios
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
Public Function GetInventarioFisicoResultados(CveInventarioFisico As Integer, CveEmpresa As Integer) As Boolean
|
||||
Public Function GetInventarioFisicoResultados(CveInventarioFisico As Integer, CveEmpresa As Integer, Optional GPO As Integer = 1) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Inv_InventarioFisicoResultadosGet")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveInventarioFisico", SqlDbType.Int).Value = CveInventarioFisico
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
.Add("@GPO", SqlDbType.Int).Value = GPO
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
|
||||
@@ -1771,7 +1771,7 @@ Public Class ClsNominas
|
||||
#End Region
|
||||
|
||||
#Region ""
|
||||
Public Function GetPeriodos(CveTipoPeriodo As Integer, CveEmpresa As Integer, Ejercicio As Integer, Mes As Integer, CvePeriodo As Integer) As Boolean
|
||||
Public Function GetPeriodos(CveTipoPeriodo As Integer, CveEmpresa As Integer, Ejercicio As Integer, Mes As Integer, CvePeriodo As Integer, Optional CveEstatus As Integer = -1) As Boolean
|
||||
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Nom_PeriodosGet")
|
||||
@@ -1782,6 +1782,8 @@ Public Class ClsNominas
|
||||
.Add("@Mes", SqlDbType.Int).Value = Mes
|
||||
.Add("@CvePeriodo", SqlDbType.Int).Value = CvePeriodo
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
.Add("@CveEstatus", SqlDbType.Int).Value = CveEstatus
|
||||
|
||||
End With
|
||||
|
||||
Try
|
||||
@@ -2603,8 +2605,8 @@ Public Class ClsNominas
|
||||
End Try
|
||||
Return retorno
|
||||
End Function
|
||||
Public Function AddMovtoPermanente(cveConcepto As Int32, cvePersonal As Int32, descripcion As String, tipoDescuento As Int32, valor As Double, vecesAplicar As Int32, montoLimite As Decimal, fechaInicioAplicacion As String, estatus As Boolean, CveCuenta As Integer) As Boolean
|
||||
Dim retorno As Boolean = False
|
||||
Public Function AddMovtoPermanente(cveConcepto As Int32, cvePersonal As Int32, descripcion As String, tipoDescuento As Int32, valor As Double, vecesAplicar As Int32, montoLimite As Decimal, fechaInicioAplicacion As String, estatus As Boolean, CveCuenta As Integer) As Integer
|
||||
Dim retorno As Integer = 0
|
||||
DataAdapter("PA_AddMovtoPermanente", CommandType.StoredProcedure)
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
@@ -2618,15 +2620,16 @@ Public Class ClsNominas
|
||||
.Add("@fechaInicioAplicacion", SqlDbType.VarChar).Value = (fechaInicioAplicacion)
|
||||
.Add("@estatus", SqlDbType.Bit).Value = (estatus)
|
||||
.Add("@CveCuenta", SqlDbType.Int).Value = (CveCuenta)
|
||||
.Add("@CveMovtoPermanente", SqlDbType.Int).Direction = ParameterDirection.Output
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
retorno = True
|
||||
retorno = SqlAdapter.SelectCommand.Parameters("@IDConexion").Value.ToString.ToEntero
|
||||
Catch sqEx As SqlException
|
||||
retorno = False
|
||||
retorno = -1
|
||||
OnError("Ocurrió un error al agregar los movimientos permanentes.", sqEx, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
Catch ex As Exception
|
||||
retorno = False
|
||||
retorno = -1
|
||||
OnError("Ocurrió un error al agregar los movimientos permanentes.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End Try
|
||||
Return retorno
|
||||
|
||||
@@ -399,13 +399,13 @@ Public Class LogicNominas
|
||||
ObjOtrosPagos.Add(otrp)
|
||||
|
||||
|
||||
If Row("SATCveConcepto").ToString().ToEntero() = 7 AndAlso Row("Importe").ToString().ToDecimal > 0 Then 'Subsidio
|
||||
ObjDeducciones.Add(New CFDINominaDeducciones With {.TipoDeduccion = "002", ' codigo fijo
|
||||
.Clave = Row("Codigo").ToString(), .Concepto = "ISR", .Importe = Row("Importe").ToString().ToDecimal})
|
||||
If Row("SATCveConcepto").ToString().ToEntero() = 7 AndAlso Row("Importe").ToString().ToDecimal() > 0 Then 'Subsidio
|
||||
'ObjDeducciones.Add(New CFDINominaDeducciones With {.TipoDeduccion = "002", ' codigo fijo
|
||||
' .Clave = Row("Codigo").ToString(), .Concepto = "ISR", .Importe = Row("Importe").ToString().ToDecimal})
|
||||
End If
|
||||
If Row("SATCveConcepto").ToString().ToEntero() = 8 AndAlso Row("Importe").ToString().ToDecimal > 0 Then 'Subsidio
|
||||
ObjDeducciones.Add(New CFDINominaDeducciones With {.TipoDeduccion = "071", ' codigo fijo
|
||||
.Clave = Row("Codigo").ToString(), .Concepto = "(Ajuste en Subsidio para el empleo (efectivamente entregado al trabajador)", .Importe = Row("Importe").ToString().ToDecimal})
|
||||
If Row("SATCveConcepto").ToString().ToEntero() = 8 AndAlso Row("Importe").ToString().ToDecimal() > 0 Then 'Subsidio
|
||||
'ObjDeducciones.Add(New CFDINominaDeducciones With {.TipoDeduccion = "071", ' codigo fijo
|
||||
' .Clave = Row("Codigo").ToString(), .Concepto = "(Ajuste en Subsidio para el empleo (efectivamente entregado al trabajador)", .Importe = Row("Importe").ToString().ToDecimal})
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
@@ -3433,16 +3433,16 @@ Namespace Extensiones
|
||||
Public Class Archivo
|
||||
Public Sub New()
|
||||
filename = ""
|
||||
patch = "Temp\"
|
||||
path = "Temp\"
|
||||
descripcion = ""
|
||||
End Sub
|
||||
|
||||
Public Property filename As String
|
||||
Public Property patch As String
|
||||
Public Property path As String
|
||||
Public Property descripcion As String
|
||||
Public ReadOnly Property Extencion As String
|
||||
Public ReadOnly Property Extension As String
|
||||
Get
|
||||
Return IO.Path.GetExtension(String.Format("{0}{1}{2}", If(patch.Contains("Empresas"), ModExtensiones.DirectorioBaseEmpresas, AppDomain.CurrentDomain.BaseDirectory), patch, filename)).Replace(".", "")
|
||||
Return IO.Path.GetExtension(String.Format("{0}{1}{2}", If(path.Contains("Empresas"), ModExtensiones.DirectorioBaseEmpresas, AppDomain.CurrentDomain.BaseDirectory), path, filename)).Replace(".", "")
|
||||
End Get
|
||||
End Property
|
||||
Public ReadOnly Property filenameO As String
|
||||
@@ -3452,7 +3452,7 @@ Namespace Extensiones
|
||||
End Property
|
||||
Public ReadOnly Property FileUrl As String
|
||||
Get
|
||||
Return String.Format("{0}{1}{2}", If(patch.Contains("Empresas"), ModExtensiones.DirectorioBaseEmpresas, AppDomain.CurrentDomain.BaseDirectory), patch, filename)
|
||||
Return String.Format("{0}{1}{2}", If(path.Contains("Empresas"), ModExtensiones.DirectorioBaseEmpresas, AppDomain.CurrentDomain.BaseDirectory), path, filename)
|
||||
End Get
|
||||
End Property
|
||||
End Class
|
||||
|
||||
@@ -445,7 +445,7 @@ Public Class E48 : Implements IHttpHandler, IRequiresSessionState
|
||||
Property GlobalDTAlmacen(CveEmpresa As Integer, Optional CveTipoAlmacen As Integer = -1, Optional CveEstatus As Integer = 1, Optional CveAlmacen As Integer = -1) As DataTable
|
||||
Get
|
||||
Dim AppNombre As String = String.Format("GlobalDTAlmacen-{0}", CveEmpresa)
|
||||
Dim dttemp As DataTable
|
||||
Dim dttemp As DataTable = Nothing
|
||||
'sino existe, recarga los datos
|
||||
Dim ObjUsr As New ClsInventarios
|
||||
If ObjUsr.GetAlmacenes(-1, -1, CveEmpresa, -1) Then dttemp = ObjUsr.DtResultados
|
||||
|
||||
@@ -343,7 +343,7 @@ Public Class SIGFacturacionCiclica : Implements IHttpHandler, IRequiresSessionSt
|
||||
|
||||
Dim DtDetalle As DataTable = Nothing
|
||||
Dim objContratos As New ClsContratos
|
||||
If objContratos.GetContratosDetalle(DR("CveContrato").ToString.ToEntero) Then
|
||||
If objContratos.GetContratosDetalle(DR("CveContrato").ToString.ToEntero, UsuarioActual.CveUsuario) Then
|
||||
DtDetalle = objContratos.DtResultados.FiltraParametros("CveTipoPresupuesto=2")
|
||||
Else
|
||||
DtDetalle = Nothing
|
||||
|
||||
@@ -737,7 +737,7 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
|
||||
Dim UsaGlobal As Boolean = True
|
||||
|
||||
'verifica existencias
|
||||
If Pagina.Contiene("ventas/ventas", "oc/oc", "inv/traspaso") AndAlso CveEmpresa.Contiene(72, 80, 119, 140, 141, 152, 153, 159, 160, 161, 162, 163) Then
|
||||
If Pagina.Contiene("ventas/ventas", "oc/oc", "inv/traspaso") AndAlso CveEmpresa.Contiene(72, 80, 119, 140, 141, 152, 153, 159, 160, 161, 162, 163, 166) Then
|
||||
UsaGlobal = False
|
||||
|
||||
Dim objInv As New ClsInventarios
|
||||
|
||||
@@ -77,60 +77,14 @@ Partial Class Bancos_CargarConciliacionesBancarias
|
||||
Protected Sub BtnCargaExcel_Click(sender As Object, e As EventArgs)
|
||||
If TxtExcel.getfiles().Archivos.Count > 0 Then
|
||||
Dim file As Archivo = TxtExcel.getfiles().Archivos(0)
|
||||
Dim Directorio As String = AppDomain.CurrentDomain.BaseDirectory & file.patch
|
||||
Dim Tipo As String = If(file.Extencion.Contiene("xlsx", "xlsx", "xlsm", "xlsb"), "EXCEL", "CSV")
|
||||
Dim Directorio As String = AppDomain.CurrentDomain.BaseDirectory & file.path
|
||||
Dim Tipo As String = If(file.Extension.Contiene("xlsx", "xlsx", "xlsm", "xlsb"), "EXCEL", "CSV")
|
||||
CargaExcel(Directorio, file.filename, Tipo)
|
||||
Else
|
||||
Alert("No existe el archivo.Favor de subir un archivo csv o excel a la plataforma", TipoMensaje.MsgError)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Function ReadExcelFile(ByVal flatFilePath As String, ByVal firstRowHasHeaders As Boolean) As DataTable
|
||||
SpreadsheetInfo.SetLicense(ModExtensiones.SerialGemBoxSpreadsheet)
|
||||
Dim excelFile As ExcelFile = ExcelFile.Load(flatFilePath)
|
||||
|
||||
Dim unnamed As Integer = 0
|
||||
Dim cols As Integer
|
||||
Dim columns As String()
|
||||
Dim curRow As Integer = 0
|
||||
Dim curCol As Integer = 0
|
||||
Dim dataTable As DataTable = New DataTable()
|
||||
Dim worksheet As ExcelWorksheet = excelFile.Worksheets(0)
|
||||
|
||||
For cols = 0 To worksheet.Rows(0).AllocatedCells.Count - 1
|
||||
|
||||
If firstRowHasHeaders Then
|
||||
|
||||
If worksheet.Rows(0).Cells(cols).Value IsNot Nothing Then
|
||||
dataTable.Columns.Add(worksheet.Rows(0).Cells(cols).Value.ToString())
|
||||
Else
|
||||
dataTable.Columns.Add("Unnamed Column " & (System.Threading.Interlocked.Increment(unnamed)))
|
||||
End If
|
||||
|
||||
curRow = 1
|
||||
Else
|
||||
dataTable.Columns.Add("Column " & (cols + 1))
|
||||
End If
|
||||
Next
|
||||
|
||||
While curRow < worksheet.Rows.Count
|
||||
columns = New String(cols - 1) {}
|
||||
|
||||
For curCol = 0 To cols - 1
|
||||
|
||||
If worksheet.Rows(curRow).Cells(curCol).Value Is Nothing Then
|
||||
columns(curCol) = ""
|
||||
Else
|
||||
columns(curCol) = worksheet.Rows(curRow).Cells(curCol).Value.ToString()
|
||||
End If
|
||||
Next
|
||||
|
||||
dataTable.Rows.Add(columns)
|
||||
curRow += 1
|
||||
End While
|
||||
|
||||
Return dataTable
|
||||
End Function
|
||||
|
||||
Private Sub CargaExcel(Ruta As String, FileName As String, Tipo As String)
|
||||
If Not DdlCuenta.SelectedValue.ToEntero > 0 Then
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="HA" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="C" runat="Server">
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="portlet box blue-hoki">
|
||||
@@ -58,10 +58,18 @@
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<asp:TextBox ID="hdnTotal" runat="server" Style="text-align: right; display: none;" AutoComplete="off" Width="145px"></asp:TextBox>
|
||||
<hr />
|
||||
|
||||
<div class="row">
|
||||
<div class="row" id="divTipoDevolucion" runat="server" visible="false" style="margin-top: -20px;">
|
||||
<div class="col-md-12">
|
||||
<div class="col-md-5"></div>
|
||||
<asp:RadioButtonList ID="TipoDevolucion" runat="server" RepeatDirection="Horizontal" OnSelectedIndexChanged="TipoDevolucion_SelectedIndexChanged" AutoPostBack="true">
|
||||
<asp:ListItem Value="1" Text="Bancos"></asp:ListItem>
|
||||
<asp:ListItem Value="2" Text="Vía Nómina"></asp:ListItem>
|
||||
</asp:RadioButtonList>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" runat="server" id="DivBancos">
|
||||
<div class="col-md-6">
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
@@ -180,7 +188,49 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="row" runat="server" id="DivViaticos" visible="false" style="margin-bottom: 10px;">
|
||||
<div class="col-md-12">
|
||||
<div class="portlet-title">
|
||||
<div class="caption ">
|
||||
<span class="caption-subject font-yellow-gold bold uppercase">
|
||||
<asp:Literal ID="LtlMovtoPermanenteaddup" runat="server"></asp:Literal></span>
|
||||
</div>
|
||||
<div class="tools">
|
||||
<a href="javascript:;" class="collapse" data-original-title="" title=""></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body ">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtDescripcion" CssClass="form-control" runat="server"></asp:TextBox>
|
||||
<asp:Label runat="server" Text="Descripción:" AssociatedControlID="TxtDescripcion"></asp:Label>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:Label runat="server" Text="Concepto:" AssociatedControlID=""></asp:Label>
|
||||
<asp:DropDownList ID="DdlConcepto" runat="server" DataTextField="CodigoConcepto" DataValueField="CveConcepto" Class="form-control input-sm select2me" Width="100%" ValidationGroup="GrpGuardar"></asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:Label runat="server" Text="Valor:" AssociatedControlID=""></asp:Label>
|
||||
|
||||
<asp:TextBox ID="TxtValor" CssClass="form-control" runat="server"></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:Label runat="server" Text="Veces por Aplicar:" AssociatedControlID=""></asp:Label>
|
||||
|
||||
<asp:TextBox ID="TxtVecesAplicar" CssClass="form-control" runat="server"></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row" style="margin-bottom: 10px;">
|
||||
<div class="col-md-2">
|
||||
<label>Observaciones:</label>
|
||||
</div>
|
||||
@@ -189,6 +239,9 @@
|
||||
<asp:HiddenField ID="HdnObs" runat="server" ClientIDMode="Static" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
@@ -275,18 +328,18 @@
|
||||
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
|
||||
<script>
|
||||
function FnSuma(t, txt, importe) {
|
||||
debugger;
|
||||
if (t.checked) {
|
||||
txt.value = FormatoNumero(importe, 2);
|
||||
} else {
|
||||
txt.value = "";
|
||||
}
|
||||
|
||||
$get('TxtImporte').value = FormatoNumero(SumaValores(), 2);
|
||||
let valor = FormatoNumero(SumaValores(), 2);
|
||||
$('#hdnTotal').val(valor);
|
||||
$get('TxtImporte').value = valor;
|
||||
|
||||
}
|
||||
|
||||
function FnCambia(chk, txt, saldo, op, text) {
|
||||
debugger;
|
||||
if (op == 1) {
|
||||
if (txt.value != '') {
|
||||
chk.checked = true;
|
||||
@@ -301,7 +354,9 @@
|
||||
}
|
||||
}
|
||||
var Suma = SumaValores();
|
||||
$get('TxtImporte').value = FormatoNumero(Suma, 2);
|
||||
let valor = FormatoNumero(SumaValores(), 2);
|
||||
$('#C_hdnTotal').val(valor);
|
||||
$get('TxtImporte').value = valor;
|
||||
|
||||
if ($get('TxtTotal') != null) {
|
||||
$get('TxtTotal').value = FormatoNumero(Suma + (ToDouble($get('TxtComisiones').value * -1)), 2);
|
||||
|
||||
@@ -49,9 +49,11 @@ public partial class Bancos_Devoluciones : ClsPaginas
|
||||
CargaCliente();
|
||||
CargaProveedor();
|
||||
CargaPersonal();
|
||||
CargaConcepto();
|
||||
TxtImporte.Attributes.Add("disabled", "disabled");
|
||||
TxtComisiones.Attributes.Add("disabled", "disabled");
|
||||
TxtTotal.Attributes.Add("disabled", "disabled");
|
||||
TipoDevolucion.SelectedValue = "1";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -70,6 +72,7 @@ public partial class Bancos_Devoluciones : ClsPaginas
|
||||
LimpiarGV();
|
||||
LimpiarDDL();
|
||||
GvDevoluciones.Columns[7].Visible = true;
|
||||
divTipoDevolucion.Visible = false;
|
||||
break;
|
||||
case "2":
|
||||
tipo = "Ing";
|
||||
@@ -80,6 +83,7 @@ public partial class Bancos_Devoluciones : ClsPaginas
|
||||
LimpiarGV();
|
||||
LimpiarDDL();
|
||||
GvDevoluciones.Columns[7].Visible = false;
|
||||
divTipoDevolucion.Visible = false;
|
||||
break;
|
||||
case "3":
|
||||
tipo = "Ing";
|
||||
@@ -90,6 +94,7 @@ public partial class Bancos_Devoluciones : ClsPaginas
|
||||
LimpiarGV();
|
||||
LimpiarDDL();
|
||||
GvDevoluciones.Columns[7].Visible = false;
|
||||
divTipoDevolucion.Visible = true;
|
||||
break;
|
||||
case "4":
|
||||
tipo = "Ing";
|
||||
@@ -100,10 +105,28 @@ public partial class Bancos_Devoluciones : ClsPaginas
|
||||
LimpiarGV();
|
||||
LimpiarDDL();
|
||||
GvDevoluciones.Columns[7].Visible = false;
|
||||
divTipoDevolucion.Visible = false;
|
||||
break;
|
||||
}
|
||||
CargaTipoTransaccion(tipo);
|
||||
}
|
||||
|
||||
protected void TipoDevolucion_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
switch (TipoDevolucion.SelectedValue)
|
||||
{
|
||||
case "1":
|
||||
DivBancos.Visible = true;
|
||||
DivViaticos.Visible = false;
|
||||
break;
|
||||
case "2":
|
||||
DivBancos.Visible = false;
|
||||
DivViaticos.Visible = true;
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
protected void CargaTipoTransaccion(string tipo)
|
||||
{
|
||||
DdlTipoTransanccion.Items.Clear();
|
||||
@@ -136,7 +159,7 @@ public partial class Bancos_Devoluciones : ClsPaginas
|
||||
}
|
||||
protected void CargaPersonal()
|
||||
{
|
||||
DdlPersonal.DataSource = get_GlobalDTRHPersonal(UsuarioActual.CveEmpresa);
|
||||
DdlPersonal.DataSource = get_GlobalDTRHPersonal(UsuarioActual.CveEmpresa).FiltraParametros("", "NombreCompleto");
|
||||
DdlPersonal.DataBind();
|
||||
DdlPersonal.Items.Insert(0, new ListItem("Seleccione", "-1"));
|
||||
}
|
||||
@@ -315,19 +338,40 @@ public partial class Bancos_Devoluciones : ClsPaginas
|
||||
#region"GUARDAR"
|
||||
protected void BtnGuardar_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (TxtImporte.Text == "")
|
||||
if (OpcionDevolucion.SelectedValue.ToEntero() != 3 && TipoDevolucion.SelectedValue.ToString().ToEntero() != 2 && TxtImporte.Text == "")
|
||||
{
|
||||
Alert("Debe ingresar un importe", TipoMensaje.MsgAdvertencia);
|
||||
return;
|
||||
Alert("Debe ingresar un importe", TipoMensaje.MsgAdvertencia);
|
||||
return;
|
||||
}
|
||||
|
||||
if (OpcionDevolucion.SelectedValue.ToEntero() == 3 && TipoDevolucion.SelectedValue.ToString().ToEntero() == 2)
|
||||
{
|
||||
if (TxtValor.Text == "")
|
||||
{
|
||||
Alert("Debe ingresar un importe", TipoMensaje.MsgAdvertencia);
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
int valor = (TxtValor.Text.ToEntero() * TxtVecesAplicar.Text.ToEntero()).ToEntero();
|
||||
int total = hdnTotal.Text.ToEntero();
|
||||
if (valor <> total)
|
||||
{
|
||||
Alert("La cantidad total debe ser igual a lo seleccionado");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
ClsBancos ObjIE = new ClsBancos();
|
||||
ClsContabilidad ObjMov = new ClsContabilidad(ObjIE.IniciaTransacSQL());
|
||||
ClsCompras ObjComp = new ClsCompras(ObjIE.IniciaTransacSQL());
|
||||
ClsNominas ObjNom = new ClsNominas(ObjIE.IniciaTransacSQL());
|
||||
|
||||
string MsgError = "";
|
||||
string PagueseA = "";
|
||||
int CveIE = 0;
|
||||
int CveIE = -1;
|
||||
int CveConceptoContableBanco = 30;
|
||||
int CveConceptoContableDevolucion = 0;
|
||||
int CvePlantillaPoliza = 0;
|
||||
@@ -358,9 +402,9 @@ public partial class Bancos_Devoluciones : ClsPaginas
|
||||
break;
|
||||
case "3":
|
||||
PagueseA = DdlPersonal.SelectedItem.ToString();
|
||||
CveConceptoContableDevolucion = 250;
|
||||
CvePlantillaPoliza = 100;
|
||||
TipoMovoDevolucion = true;
|
||||
CveConceptoContableDevolucion = 250;
|
||||
break;
|
||||
case "4":
|
||||
PagueseA = DdlPersonal.SelectedItem.ToString();
|
||||
@@ -377,84 +421,135 @@ public partial class Bancos_Devoluciones : ClsPaginas
|
||||
|
||||
// DATOS PREPOLIZA
|
||||
if ( DdlTipoTransanccion.SelectedValue == "1" && UsuarioActual.CveEmpresa != 119) FolioFijo = TxtFolio.Text.ToEntero();
|
||||
CvePrePoliza = ObjMov.AddPrePolizas("Bancos/IE Devoluciones", CvePlantillaPoliza, TxtImporte.Text.Trim().ToDouble(), TxtImporte.Text.Trim().ToDouble(), CveMoneda, TxtFechaDocumento.Text.ToDate(), TxtObservaciones.Text.Trim(), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, FolioFijo: FolioFijo, ReglaFolioPoliza: ObjComp.ObtenerReglaFolio(DdlTipoTransanccion.SelectedValue, null, UsuarioActual.CveEmpresa), CveTipoPoliza: ObjMov.ObtenerTipoPoliza(DdlTipoTransanccion.SelectedValue, "-1", UsuarioActual.CveEmpresa));
|
||||
CvePrePoliza = ObjMov.AddPrePolizas("Bancos/IE Devoluciones", CvePlantillaPoliza, TxtImporte.Text.Trim().ToDouble(), TxtImporte.Text.Trim().ToDouble(), 1, TxtFechaDocumento.Text.ToDate(), TxtObservaciones.Text.Trim(), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, FolioFijo: FolioFijo, ReglaFolioPoliza: ObjComp.ObtenerReglaFolio(DdlTipoTransanccion.SelectedValue, null, UsuarioActual.CveEmpresa), CveTipoPoliza: ObjMov.ObtenerTipoPoliza(DdlTipoTransanccion.SelectedValue, "-1", UsuarioActual.CveEmpresa));
|
||||
|
||||
if (CvePrePoliza > 0)
|
||||
{
|
||||
string Conc = TxtObservaciones.Text == "" ? TxtFolio.Text : TxtObservaciones.Text;
|
||||
string Ref = TxtObservaciones.Text == "" ? TxtFolio.Text : TxtObservaciones.Text;
|
||||
|
||||
CveIE = ObjIE.AddBancos_IE(DdlCuenta.SelectedValue.ToEntero(), DdlTipoTransanccion.SelectedValue.ToEntero(), TxtFechaDocumento.Text.Trim().ToDate(), TxtFolio.Text.Trim(), PagueseA, TxtImporte.Text.Trim().ToDouble(), CveMoneda,
|
||||
TC, TxtObservaciones.Text.Trim(), "", false, false, -1, CvePrePoliza, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa);
|
||||
if (CveIE > 0)
|
||||
if (OpcionDevolucion.SelectedValue.ToEntero() == 3 && TipoDevolucion.SelectedValue.ToString().ToEntero() == 2)
|
||||
{
|
||||
//GUARDA PREPOLIZAS DETALLE DEVOLUCION
|
||||
|
||||
|
||||
int cveConcepto = DdlConcepto.SelectedValue.ToEntero();
|
||||
string descripcion = TxtDescripcion.Text;
|
||||
int tipoDescuento = 1;
|
||||
double valor = TxtValor.Text.ToDouble();
|
||||
int vecesAplicar = TxtVecesAplicar.Text.ToEntero();
|
||||
decimal montoLimite = 0;
|
||||
|
||||
string fechaInicioAplicacion = DateTime.Now.ToString("yyyy/MM/dd");
|
||||
bool estatus = true;
|
||||
int CveCuenta = -1;
|
||||
|
||||
if (ObjNom.AddMovtoPermanente(cveConcepto, cvePersonal, descripcion, tipoDescuento, valor, vecesAplicar, montoLimite, fechaInicioAplicacion, estatus, CveCuenta) < 0)
|
||||
{
|
||||
MsgError = "No se pudo insertar movimiento permanente";
|
||||
}
|
||||
|
||||
|
||||
foreach (GridViewRow gvr in GvDevoluciones.Rows)
|
||||
{
|
||||
if (gvr.FCCheckBox("Chk").Checked)
|
||||
{
|
||||
|
||||
if (OpcionDevolucion.SelectedValue.ToEntero() == 1)
|
||||
if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovoDevolucion, gvr.FCTextBox("TxtAbonar").Text.ToDecimal(), Ref, CveConceptoContableDevolucion, Conc, DateTime.Now, 0, -1, CveProveedor: cveProveedor, CvePersonal: cvePersonal, ImporteMX: gvr.FCTextBox("TxtAbonar").Text.ToDecimal(), CveIEDevolucion: CveIE))
|
||||
{
|
||||
if (gvr.FCTextBox("TxtIVA").Text.ToDecimal() > 0)
|
||||
{
|
||||
//INGxC
|
||||
if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, true, gvr.FCTextBox("TxtAbonar").Text.ToDecimal(), Ref, CveConceptoContableDevolucion, Conc, DateTime.Now, IDCtaContableDevolucion, -1, CveIE: gvr.DataKey("CveIE").ToEntero(), CveSubProyecto: DdlSubProyecto.SelectedValue.ToEntero(), CveCliente: DdlCliente.SelectedValue.ToEntero(), ImporteMX: gvr.FCTextBox("TxtAbonar").Text.ToDecimal(), CveIEDevolucion: CveIE))
|
||||
{
|
||||
MsgError = "No se pudo insertar concepto de devolución";
|
||||
}
|
||||
|
||||
//IVA
|
||||
if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, false, -gvr.FCTextBox("TxtIVA").Text.ToDecimal(), Ref, 13, Conc, DateTime.Now, UsuarioActual.Empresa.IdCuentaIVAxTrasladar, -1, CveIE, CveIEDevolucion: gvr.DataKey("CveIE").ToEntero(), CveSubProyecto: DdlSubProyecto.SelectedValue.ToEntero(), CveCliente: DdlCliente.SelectedValue.ToEntero(), ImporteMX: -gvr.FCTextBox("TxtIVA").Text.ToDecimal()))
|
||||
{
|
||||
MsgError = "No se pudo insertar concepto de IVA";
|
||||
}
|
||||
|
||||
if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, true, -gvr.FCTextBox("TxtIVA").Text.ToDecimal(), Ref, 61, Conc, DateTime.Now, UsuarioActual.Empresa.IdCuentaIVAxTrasladar, -1, CveIE, CveIEDevolucion: gvr.DataKey("CveIE").ToEntero(), CveSubProyecto: DdlSubProyecto.SelectedValue.ToEntero(), CveCliente: DdlCliente.SelectedValue.ToEntero(), ImporteMX: -gvr.FCTextBox("TxtIVA").Text.ToDecimal()))
|
||||
{
|
||||
MsgError = "No se pudo insertar concepto de IVA";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
//INGxC
|
||||
if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovoDevolucion, gvr.FCTextBox("TxtAbonar").Text.ToDecimal(), Ref, CveConceptoContableDevolucion, Conc, DateTime.Now, IDCtaContableDevolucion, -1, CveIE: CveIE, CveSubProyecto: DdlSubProyecto.SelectedValue.ToEntero(), CveCliente: DdlCliente.SelectedValue.ToEntero(), ImporteMX: gvr.FCTextBox("TxtAbonar").Text.ToDecimal(), CveIEDevolucion: gvr.DataKey("CveIE").ToEntero()))
|
||||
{
|
||||
MsgError = "No se pudo insertar concepto de bancos";
|
||||
}
|
||||
}
|
||||
MsgError = "No se pudo insertar concepto de Devolución";
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovoDevolucion, gvr.FCTextBox("TxtAbonar").Text.ToDecimal(), Ref, CveConceptoContableDevolucion, Conc, DateTime.Now, IDCtaContableDevolucion, -1, CveIE: gvr.DataKey("CveIE").ToEntero(), CveSubProyecto: DdlSubProyecto.SelectedValue.ToEntero(), CveProveedor: cveProveedor, CvePersonal: cvePersonal, ImporteMX: gvr.FCTextBox("TxtAbonar").Text.ToDecimal(), CveIEDevolucion: CveIE))
|
||||
//Decimal tTotal = (TxtValor.Text.ToDecimal() * TxtVecesAplicar.Text.ToDecimal()).RoundSQL();
|
||||
Decimal tTotal = gvr.FCTextBox("TxtAbonar").Text.ToDecimal();
|
||||
//GUARDA PREPOLIZAS DETALLE Via Nómina
|
||||
if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, !TipoMovoDevolucion, tTotal, Ref, 174, Conc, DateTime.Now, 0, -1, CveSubProyecto: DdlSubProyecto.SelectedValue.ToEntero(), CveCliente: cveCliente, CveProveedor: cveProveedor, CvePersonal: cvePersonal, ImporteMX: tTotal))
|
||||
{
|
||||
MsgError = "No se pudo insertar concepto de Devolución";
|
||||
break;
|
||||
}
|
||||
|
||||
// OTROS INGRESOS
|
||||
if (gvr.FCTextBox("TxtComision").Text.ToDecimal() != 0)
|
||||
{
|
||||
if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovoDevolucion, gvr.FCTextBox("TxtComision").Text.ToDecimal(), Ref, 78, Conc, DateTime.Now, UsuarioActual.Empresa.IdCuentaOtrosIngresos, -1, CveIE: gvr.DataKey("CveIE").ToEntero(), CveSubProyecto: DdlSubProyecto.SelectedValue.ToEntero(), CveProveedor: cveProveedor, CvePersonal: cvePersonal, ImporteMX: gvr.FCTextBox("TxtComision").Text.ToDecimal(), CveIEDevolucion: CveIE))
|
||||
{
|
||||
MsgError = "No se pudo insertar concepto de Devolución";
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
//GUARDA PREPOLIZAS DETALLE Bancos
|
||||
if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, !TipoMovoDevolucion, TxtImporte.Text.ToDecimal(), Ref, CveConceptoContableBanco, Conc, DateTime.Now, IDCtaContableBancos, -1, CveIE, CveSubProyecto: DdlSubProyecto.SelectedValue.ToEntero(), CveCliente: cveCliente, CveProveedor: cveProveedor, CvePersonal: cvePersonal, ImporteMX: TxtImporte.Text.ToDecimal()))
|
||||
{
|
||||
MsgError = "No se pudo insertar concepto de bancos";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
MsgError = "No se insertó movimiento bancario";
|
||||
}
|
||||
|
||||
CveIE = ObjIE.AddBancos_IE(DdlCuenta.SelectedValue.ToEntero(), DdlTipoTransanccion.SelectedValue.ToEntero(), TxtFechaDocumento.Text.Trim().ToDate(), TxtFolio.Text.Trim(), PagueseA, TxtImporte.Text.Trim().ToDouble(), CveMoneda,
|
||||
TC, TxtObservaciones.Text.Trim(), "", false, false, -1, CvePrePoliza, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa);
|
||||
if (CveIE > 0)
|
||||
{
|
||||
//GUARDA PREPOLIZAS DETALLE DEVOLUCION
|
||||
foreach (GridViewRow gvr in GvDevoluciones.Rows)
|
||||
{
|
||||
if (gvr.FCCheckBox("Chk").Checked)
|
||||
{
|
||||
|
||||
if (OpcionDevolucion.SelectedValue.ToEntero() == 1)
|
||||
{
|
||||
if (gvr.FCTextBox("TxtIVA").Text.ToDecimal() > 0)
|
||||
{
|
||||
//INGxC
|
||||
if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, true, gvr.FCTextBox("TxtAbonar").Text.ToDecimal(), Ref, CveConceptoContableDevolucion, Conc, DateTime.Now, IDCtaContableDevolucion, -1, CveIE: gvr.DataKey("CveIE").ToEntero(), CveSubProyecto: DdlSubProyecto.SelectedValue.ToEntero(), CveCliente: DdlCliente.SelectedValue.ToEntero(), ImporteMX: gvr.FCTextBox("TxtAbonar").Text.ToDecimal(), CveIEDevolucion: CveIE))
|
||||
{
|
||||
MsgError = "No se pudo insertar concepto de devolución";
|
||||
}
|
||||
|
||||
//IVA
|
||||
if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, false, -gvr.FCTextBox("TxtIVA").Text.ToDecimal(), Ref, 13, Conc, DateTime.Now, UsuarioActual.Empresa.IdCuentaIVAxTrasladar, -1, CveIE, CveIEDevolucion: gvr.DataKey("CveIE").ToEntero(), CveSubProyecto: DdlSubProyecto.SelectedValue.ToEntero(), CveCliente: DdlCliente.SelectedValue.ToEntero(), ImporteMX: -gvr.FCTextBox("TxtIVA").Text.ToDecimal()))
|
||||
{
|
||||
MsgError = "No se pudo insertar concepto de IVA";
|
||||
}
|
||||
|
||||
if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, true, -gvr.FCTextBox("TxtIVA").Text.ToDecimal(), Ref, 61, Conc, DateTime.Now, UsuarioActual.Empresa.IdCuentaIVAxTrasladar, -1, CveIE, CveIEDevolucion: gvr.DataKey("CveIE").ToEntero(), CveSubProyecto: DdlSubProyecto.SelectedValue.ToEntero(), CveCliente: DdlCliente.SelectedValue.ToEntero(), ImporteMX: -gvr.FCTextBox("TxtIVA").Text.ToDecimal()))
|
||||
{
|
||||
MsgError = "No se pudo insertar concepto de IVA";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
//INGxC
|
||||
if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovoDevolucion, gvr.FCTextBox("TxtAbonar").Text.ToDecimal(), Ref, CveConceptoContableDevolucion, Conc, DateTime.Now, IDCtaContableDevolucion, -1, CveIE: CveIE, CveSubProyecto: DdlSubProyecto.SelectedValue.ToEntero(), CveCliente: DdlCliente.SelectedValue.ToEntero(), ImporteMX: gvr.FCTextBox("TxtAbonar").Text.ToDecimal(), CveIEDevolucion: gvr.DataKey("CveIE").ToEntero()))
|
||||
{
|
||||
MsgError = "No se pudo insertar concepto de bancos";
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovoDevolucion, gvr.FCTextBox("TxtAbonar").Text.ToDecimal(), Ref, CveConceptoContableDevolucion, Conc, DateTime.Now, IDCtaContableDevolucion, -1, CveIE: gvr.DataKey("CveIE").ToEntero(), CveSubProyecto: DdlSubProyecto.SelectedValue.ToEntero(), CveProveedor: cveProveedor, CvePersonal: cvePersonal, ImporteMX: gvr.FCTextBox("TxtAbonar").Text.ToDecimal(), CveIEDevolucion: CveIE))
|
||||
{
|
||||
MsgError = "No se pudo insertar concepto de Devolución";
|
||||
break;
|
||||
}
|
||||
|
||||
// OTROS INGRESOS
|
||||
if (gvr.FCTextBox("TxtComision").Text.ToDecimal() != 0)
|
||||
{
|
||||
if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovoDevolucion, gvr.FCTextBox("TxtComision").Text.ToDecimal(), Ref, 78, Conc, DateTime.Now, UsuarioActual.Empresa.IdCuentaOtrosIngresos, -1, CveIE: gvr.DataKey("CveIE").ToEntero(), CveSubProyecto: DdlSubProyecto.SelectedValue.ToEntero(), CveProveedor: cveProveedor, CvePersonal: cvePersonal, ImporteMX: gvr.FCTextBox("TxtComision").Text.ToDecimal(), CveIEDevolucion: CveIE))
|
||||
{
|
||||
MsgError = "No se pudo insertar concepto de Devolución";
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//GUARDA PREPOLIZAS DETALLE Bancos
|
||||
if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, !TipoMovoDevolucion, TxtImporte.Text.ToDecimal(), Ref, CveConceptoContableBanco, Conc, DateTime.Now, IDCtaContableBancos, -1, CveIE, CveSubProyecto: DdlSubProyecto.SelectedValue.ToEntero(), CveCliente: cveCliente, CveProveedor: cveProveedor, CvePersonal: cvePersonal, ImporteMX: TxtImporte.Text.ToDecimal()))
|
||||
{
|
||||
MsgError = "No se pudo insertar concepto de bancos";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
MsgError = "No se insertó movimiento bancario";
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -537,23 +632,48 @@ public partial class Bancos_Devoluciones : ClsPaginas
|
||||
Msg.AppendFormat(@"<br/><br/><a class=""Texto"" target='_blank' href=""/Contabilidad/RegPoliza.aspx?IdPoliza={0}"">Ver Póliza</a>", IDPoliza);
|
||||
}
|
||||
ObjIE.Commit();
|
||||
|
||||
if (!Msg.ToString().Equals(""))
|
||||
{
|
||||
string AccionJS = String.Format(@"document.location.href=""{0}"";", HttpContext.Current.Request.Url.PathAndQuery);
|
||||
Alert(Msg.ToString(), TipoMensaje.MsgInformacion, String.Format(@"document.location.href=""{0}"";", HttpContext.Current.Request.Url.PathAndQuery));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ObjIE.RollBack();
|
||||
Msg.Clear();
|
||||
Alert(Msg.ToString(), TipoMensaje.MsgError);
|
||||
}
|
||||
|
||||
if (!Msg.ToString().Equals(""))
|
||||
{
|
||||
string AccionJS = String.Format(@"document.location.href=""{0}"";", HttpContext.Current.Request.Url.PathAndQuery);
|
||||
Alert(Msg.ToString(), TipoMensaje.MsgInformacion, String.Format(@"document.location.href=""{0}"";", HttpContext.Current.Request.Url.PathAndQuery));
|
||||
}
|
||||
|
||||
|
||||
ObjIE.Dispose();
|
||||
ObjMov.Dispose();
|
||||
ObjNom.Dispose();
|
||||
|
||||
|
||||
if (ObjComp != null)
|
||||
ObjComp.Dispose();
|
||||
}
|
||||
#endregion
|
||||
#endregion
|
||||
protected void CargaConcepto()
|
||||
{
|
||||
ClsNominas onom = new ClsNominas();
|
||||
|
||||
onom.GetConceptos(UsuarioActual.CveEmpresa);
|
||||
DataTable dt = onom.DtResultados.FiltraParametros(" FormulaTotal = 'FNC.[MovimientosPermanentes]'");
|
||||
DdlConcepto.Items.Clear();
|
||||
|
||||
DdlConcepto.DataSource = dt.FiltraParametros("Tipo ='D'");
|
||||
|
||||
DataRow drow = dt.NewRow();
|
||||
drow["CveConcepto"] = "-1";
|
||||
drow["Concepto"] = "Seleccione";
|
||||
dt.Rows.InsertAt(drow, 0);
|
||||
DdlConcepto.DataSource = dt;
|
||||
DdlConcepto.SelectedValueExist("-1");
|
||||
DdlConcepto.DataBind();
|
||||
onom.Dispose();
|
||||
//DdlConcepto.Items.Insert(0, new ListItem("Seleccione", "-1"));
|
||||
}
|
||||
}
|
||||
@@ -690,7 +690,7 @@ Partial Class Bancos_PopIEVentas
|
||||
If Not UsuarioActual.Empresa.Funcionalidad(529) = "1" AndAlso dr("FolioFiscal").ToString() <> "" Then
|
||||
|
||||
|
||||
Dim Valida As New ClsValidaCFDi(dr("FolioFiscal").ToString(), UsuarioActual.Empresa.RFC, dr("RFCReceptor").ToString, dr("Total").ToString.ToDecimal)
|
||||
Dim Valida As New ClsValidaCFDi(dr("FolioFiscal").ToString(), UsuarioActual.Empresa.RFC, dr("RFCReceptor").ToString, dr("Total").ToString.ToDecimal.RoundAD(2))
|
||||
|
||||
If Valida.EsValida > 0 Then
|
||||
If Valida.EsValida = 2 Then
|
||||
|
||||
@@ -150,7 +150,7 @@
|
||||
|
||||
<br />
|
||||
|
||||
<ajax:TabContainer ID="tabGeneral" runat="server" ActiveTabIndex="0" Width="100%" CssClass="tabBodyOverride">
|
||||
<ajax:TabContainer ID="tabGeneral" runat="server" ActiveTabIndex="0" Width="100%" >
|
||||
|
||||
<ajax:TabPanel ID="tabProveedores" runat="server" HeaderText="Proveedores">
|
||||
<ContentTemplate>
|
||||
|
||||
@@ -152,7 +152,7 @@ public partial class CRM_CatEmpresasCRM : ClsPaginas
|
||||
if( TxtExcel.getfiles().Archivos.Count > 0 )
|
||||
{
|
||||
Archivo file = TxtExcel.getfiles().Archivos[0];
|
||||
string Directorio = Server.MapPath("~") + file.patch;
|
||||
string Directorio = Server.MapPath("~") + file.path;
|
||||
|
||||
DataTable dt = ReadExcelFile(Directorio + file.filename, true);
|
||||
DataRowCollection Rows = dt.Rows;
|
||||
|
||||
@@ -687,8 +687,9 @@
|
||||
<div class="btn btn-default btn-circle btn-xs " data-toggle="tooltip" data-placement="top" title="Cambiar tipo de gasto"><i class="fa fa-arrow-circle-down" style="color: green" aria-hidden="true"></i></div>
|
||||
</span>
|
||||
</th>
|
||||
<th style="width: 80px">P.U. </th>
|
||||
<th style="width: 50px">% IVA </th>
|
||||
<th style="width: 100px">P.U. </th>
|
||||
<th style="width: 40px">% IVA </th>
|
||||
<th style="width: 40px">% IEPS </th>
|
||||
<th style="width: 80px">Total </th>
|
||||
<div id="dvNoDeducible" runat="server" visible="false">
|
||||
<th style="width: 80px">¿No Deducible? </th>
|
||||
@@ -787,58 +788,68 @@
|
||||
<%-- 7 --%>
|
||||
<asp:BoundField DataField="PU" DataFormatString="{0:#,##0.00####}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="100px" />
|
||||
<%-- 8 --%>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center" ItemStyle-Width="80px">
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Right" ItemStyle-Width="40px">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LblIVAPorcentaje" runat="server" Text='<%# String.Format("{0} {1}", (CDbl(Eval("IVAPorcentaje").ToString) * 100).ToString("#####"), If(CDbl(Eval("IVAPorcentaje").ToString) * 100 > 0, "%", "")) %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%-- 9 --%>
|
||||
<asp:BoundField DataField="Total" DataFormatString="{0:#,##0.00####}" ItemStyle-HorizontalAlign="Right" />
|
||||
<%-- 9 --%>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Right" ItemStyle-Width="40px">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LtlIEPSPSPorcentaje" runat="server" Text='<%# If(Eval("IEPSPSPorcentaje").ToString.Length > 0, (CDbl(Eval("IEPSPSPorcentaje").ToString) * 100).ToString("#####") & If(CDbl(Eval("IEPSPSPorcentaje").ToString) * 100 > 0, "%", ""), "") %>'></asp:Label>
|
||||
<%--<asp:Label ID="Label10" runat="server" Text='<%# Eval("IEPSPSPorcentaje").ToString %>'></asp:Label>--%>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
|
||||
|
||||
<%-- 10 --%>
|
||||
<asp:BoundField DataField="Total" DataFormatString="{0:#,##0.00####}" ItemStyle-HorizontalAlign="Right" />
|
||||
|
||||
<%-- 11 --%>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center" ControlStyle-Width="100px" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:CheckBox ID="ChkEsNoDeduciblePS" runat="server" Checked='<%# If(Eval("NoDeducible").ToString = "", 0, Eval("NoDeducible")) %>' AutoPostBack="true" OnCheckedChanged="ChkEsNoDeduciblePS_CheckedChanged" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<%-- 11 --%>
|
||||
<%-- 12 --%>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="imgE" runat="server" AlternateText="Editar" CausesValidation="False" CssClass="btn btn-circle btn-sm green" OnClick="Edit_Click" Text="<i class='fa fa-pencil'></i>" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%-- 12 --%>
|
||||
<%-- 13 --%>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="imgD" runat="server" AlternateText="Eliminar" CausesValidation="False" CommandName="Delete" CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="confirmar" data-btn-ok-label="si" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%-- 13 --%>
|
||||
<%-- 14 --%>
|
||||
<asp:TemplateField HeaderText="Clasificacion" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:DropDownList runat="server" ID="DdlAC5" CssClass="form-control input-sm select2me" AutoPostBack="true" DataTextField="CodigoClasificacion" DataValueField="CveClasificacion" Width="150px" OnSelectedIndexChanged="CompruebaSaldoAC" Visible="true"></asp:DropDownList>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%-- 14 --%>
|
||||
<%-- 15 --%>
|
||||
<asp:TemplateField HeaderText="Programa Operativo" Visible="False">
|
||||
<ItemTemplate>
|
||||
<asp:DropDownList runat="server" ID="DdlAC1" CssClass="form-control input-sm select2me" AutoPostBack="true" DataTextField="ProgramaOperativo" DataValueField="CveProgramaOperativo" Width="150px" OnSelectedIndexChanged="CompruebaSaldoAC"></asp:DropDownList>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%-- 15 --%>
|
||||
<%-- 16 --%>
|
||||
<asp:TemplateField HeaderText="Unidad Administrativa" Visible="False">
|
||||
<ItemTemplate>
|
||||
<asp:DropDownList runat="server" ID="DdlAC2" CssClass="form-control input-sm select2me" AutoPostBack="true" DataTextField="UnidadAdministrativa" DataValueField="CveUnidadAdministrativa" Width="150px" OnSelectedIndexChanged="CompruebaSaldoAC"></asp:DropDownList>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%-- 16 --%>
|
||||
<%-- 17 --%>
|
||||
<asp:TemplateField HeaderText="Fuente Financiamiento" Visible="False">
|
||||
<ItemTemplate>
|
||||
<asp:DropDownList runat="server" ID="DdlAC3" CssClass="form-control input-sm select2me" AutoPostBack="true" DataTextField="FuenteFinanciamiento" DataValueField="CveFuenteFinanciamiento" Width="150px" OnSelectedIndexChanged="CompruebaSaldoAC"></asp:DropDownList>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%-- 17 --%>
|
||||
<%-- 18 --%>
|
||||
<asp:TemplateField HeaderText="Tipo Gasto" Visible="False">
|
||||
<ItemTemplate>
|
||||
<asp:DropDownList runat="server" ID="DdlAC4" CssClass="form-control input-sm select2me" AutoPostBack="true" DataTextField="TipoGasto" DataValueField="CveTipoGasto" Width="100px" OnSelectedIndexChanged="CompruebaSaldoAC"></asp:DropDownList>
|
||||
@@ -4447,7 +4458,7 @@
|
||||
<ajax:FilteredTextBoxExtender ID="FTBEImportacion" runat="server" TargetControlID="txtImportacion" FilterType="Custom, Numbers" ValidChars="." />
|
||||
<%--<asp:TextBox ID="TxtIVAModal" ClientIDMode="Static" Enabled="false" runat="server" CssClass=" form-control " CausesValidation="true" MaxLength="12" ValidationGroup="GprAgregaPS"></asp:TextBox>
|
||||
<ajax:FilteredTextBoxExtender ID="FTBEIVA" runat="server" TargetControlID="TxtIVAModal" FilterType="Custom, Numbers" ValidChars="." />--%>
|
||||
<label for="<%= DdlIVA.ClientID.ToString()%>">Importación:</label>
|
||||
<label for="<%= DdlIVA.ClientID.ToString()%>">IVA Importación:</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
@@ -5359,8 +5370,8 @@
|
||||
</div>--%>
|
||||
|
||||
|
||||
<div id="DivmodalConmtrato" class="modal ADS fade">
|
||||
<div class="modal-dialog">
|
||||
<div id="DivmodalContrato" class="modal ADS fade">
|
||||
<div class="modal-dialog" style="width: 650px; min-width: 470px;">
|
||||
<asp:UpdatePanel ID="UpModalContrato" runat="server" class="modal-content rowpadding" tabindex="-1" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
@@ -5414,7 +5425,7 @@
|
||||
|
||||
<asp:TemplateField HeaderText="Producto">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LblPS" runat="server" CssClass="Texto" Text='<%# Eval("PS")%>' Width="250px"></asp:Label>
|
||||
<asp:Label ID="LblPS" runat="server" CssClass="Texto" Text='<%# Eval("PS")%>' ></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
@@ -5422,11 +5433,11 @@
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtCantidad" Text="" CssClass="txtcant" onkeyup="ValidateCantCon(this)" type="number" step="any"
|
||||
data-cantidad='<%# Eval("CantidadMax")%>' data-pu='<%# Eval("PU")%>' data-cve='<%# Eval("CveContratoDetalle") %>'
|
||||
Width="90" runat="server"></asp:TextBox>
|
||||
Width="70" runat="server"></asp:TextBox>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="PU">
|
||||
<asp:TemplateField HeaderText="PU" ItemStyle-HorizontalAlign="Right">
|
||||
<ItemTemplate>
|
||||
<span><%# Eval("PU", "{0:N2}")%></span>
|
||||
</ItemTemplate>
|
||||
|
||||
@@ -5824,9 +5824,7 @@ Partial Class Compras_Compras
|
||||
|
||||
Dim CveSubProyectoInsertar As Integer = -1
|
||||
Dim ConceptoContable As Integer = Row("CveConcepto").ToString.ToEntero
|
||||
If chkImportacion.Checked And ConceptoContable = 14 Then
|
||||
ConceptoContable = 287
|
||||
End If
|
||||
|
||||
Dim TipoMovimiento As Boolean = If(Row("TipoMovto").ToString = "True", True, False)
|
||||
Dim importeMovimiento As Decimal = 0
|
||||
Dim IdCtaContable As Integer = 0
|
||||
@@ -6005,6 +6003,9 @@ Partial Class Compras_Compras
|
||||
|
||||
PorcentajeImpuesto = PorcentajeIVA
|
||||
IdCtaContable = If(IdCtaIVAAcreditable > 0, IdCtaIVAAcreditable, 0)
|
||||
If chkImportacion.Checked Then
|
||||
ConceptoContable = 288
|
||||
End If
|
||||
|
||||
If ObjConta.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) And Not IdCtaContable > 0 Then
|
||||
If ObjConta.DtResultados.Rows.Count > 0 Then
|
||||
@@ -6035,6 +6036,11 @@ Partial Class Compras_Compras
|
||||
If tipoCambioActual > 1 Then Concepto += $" TC{tipoCambioActual} ${importeMovimiento.FormatoNumero(2)}"
|
||||
PorcentajeImpuesto = PorcentajeIVA
|
||||
IdCtaContable = If(IdCtaIVAXAcreditar > 0, IdCtaIVAXAcreditar, 0)
|
||||
|
||||
If chkImportacion.Checked Then
|
||||
ConceptoContable = 287
|
||||
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)("IdCuentaIVAxAcreditar").ToString.ToEntero
|
||||
@@ -7592,6 +7598,7 @@ Partial Class Compras_Compras
|
||||
|
||||
'** PRUEBA CUANDO SE AMORTIZA NC ANTES DE QUE SE REGISTRE NO DEBE TENER CONCEPTO 19 ** JM 01/06/2017 SE HIZO ESTO PARA LA FACTURA HRFA-8012831 DE VIGILANCIA
|
||||
'[IPP] NC NO DEBE REGISTRAR IMPUESTOS EN AMORTIZACIÓN 27/Agosto/2018
|
||||
Dim tConceptoContable As Integer
|
||||
If Not Ant.TipoMovto.Contiene("NC", "DEV") Then
|
||||
Dim PorcentajePagoAnt As Decimal = importeMovimiento / If(ListaDocumentos IsNot Nothing AndAlso ListaDocumentos.Count > 0 AndAlso ArrAnticipos IsNot Nothing AndAlso ArrAnticipos.Count > 0 AndAlso TxtTotal.Text.ToDecimal = 0, TmpDT.SUMD("ImporteConImpuestos"), TxtTotal.Text.ToDecimal)
|
||||
Dim ImporteIVA As Decimal = Math.Round(PorcentajePagoAnt * TxtIVA.Text.ToDecimal, 2)
|
||||
@@ -7599,12 +7606,20 @@ Partial Class Compras_Compras
|
||||
|
||||
If ImporteIVA <> 0 Then
|
||||
'Agregamos el 14
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteIVA, Referencia, 14, Concepto, FechaMovimiento, CtaIvaxAcreditar, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorLocal, CveAcreedor:=CveAcreedor, CveIE:=Ant.CveIE, CveColectiva:=CveColectiva, ImporteMX:=ImporteIVA * tipoCambioActual * Multiplicador, ImporteME:=If(tipoCambioActual = 1, 0, ImporteIVA), PorcentajeImpuesto:=PorcentajeImpuestoAnticipo, Contabilizable:=SeContabiliza) Then
|
||||
tConceptoContable = 14
|
||||
If chkImportacion.Checked Then
|
||||
tConceptoContable = 287
|
||||
End If
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteIVA, Referencia, tConceptoContable, Concepto, FechaMovimiento, CtaIvaxAcreditar, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorLocal, CveAcreedor:=CveAcreedor, CveIE:=Ant.CveIE, CveColectiva:=CveColectiva, ImporteMX:=ImporteIVA * tipoCambioActual * Multiplicador, ImporteME:=If(tipoCambioActual = 1, 0, ImporteIVA), PorcentajeImpuesto:=PorcentajeImpuestoAnticipo, Contabilizable:=SeContabiliza) Then
|
||||
ErrorPrepoliza = True
|
||||
End If
|
||||
|
||||
'Agregamos el 19
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimiento, ImporteIVA, Referencia, 19, Concepto, FechaMovimiento, CtaIvaAcreditable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorLocal, CveAcreedor:=CveAcreedor, CveIE:=Ant.CveIE, CveColectiva:=CveColectiva, ImporteMX:=ImporteIVA * tipoCambioActual * Multiplicador, ImporteME:=If(tipoCambioActual = 1, 0, ImporteIVA), PorcentajeImpuesto:=PorcentajeImpuestoAnticipo, Contabilizable:=SeContabiliza) Then
|
||||
tConceptoContable = 19
|
||||
If chkImportacion.Checked Then
|
||||
tConceptoContable = 288
|
||||
End If
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimiento, ImporteIVA, Referencia, tConceptoContable, Concepto, FechaMovimiento, CtaIvaAcreditable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorLocal, CveAcreedor:=CveAcreedor, CveIE:=Ant.CveIE, CveColectiva:=CveColectiva, ImporteMX:=ImporteIVA * tipoCambioActual * Multiplicador, ImporteME:=If(tipoCambioActual = 1, 0, ImporteIVA), PorcentajeImpuesto:=PorcentajeImpuestoAnticipo, Contabilizable:=SeContabiliza) Then
|
||||
ErrorPrepoliza = True
|
||||
End If
|
||||
End If
|
||||
@@ -8582,13 +8597,57 @@ Partial Class Compras_Compras
|
||||
Next
|
||||
|
||||
Else
|
||||
Alert("Los productos especificados en el lisado no tienen asigando impuesto IVA, favor de realizar la correción en el producto que aplique el impúesto.", TipoMensaje.MsgAdvertencia)
|
||||
Alert("Los productos especificados en el listado no tienen asignado impuesto IVA, favor de realizar la corrección en el producto que aplique el impuesto.", TipoMensaje.MsgAdvertencia)
|
||||
Respuesta = False
|
||||
End If
|
||||
Else
|
||||
Respuesta = True
|
||||
End If
|
||||
|
||||
|
||||
|
||||
If Respuesta Then
|
||||
|
||||
Dim IEPSPSDetalles As Decimal = TmpDT.SUM("IEPSPS", " IEPSPS > 0 ").ToDecimal
|
||||
Dim DiferenciaIEPSPS As Decimal = TxtIEPS.Text.ToDecimal - IEPSPSDetalles
|
||||
|
||||
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
|
||||
Exit For
|
||||
End If
|
||||
IndiceContador = IndiceContador + 1
|
||||
Next
|
||||
|
||||
If DiferenciaIEPSPS <> 0 Then
|
||||
|
||||
If DTConsultaIEPSPS.Rows.Count > 0 Then
|
||||
'Ajusta IPES en primer registro que aplique IEPS
|
||||
TmpDT.Rows(IndicePrimero)("IEPSPS") = TmpDT.Rows(IndicePrimero)("IEPSPS").ToString.ToDecimal + DiferenciaIEPSPS
|
||||
TmpDT.AcceptChanges()
|
||||
Else
|
||||
Respuesta = False
|
||||
Alert("Los productos especificados en el lisado no tienen asigando impuesto IEPS, favor de realizar la correción en el producto que aplique el impúesto.", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Return Respuesta
|
||||
|
||||
End Function
|
||||
@@ -9753,7 +9812,7 @@ Partial Class Compras_Compras
|
||||
Dim ObjInventario As New ClsInventarios(ObjCompra.IniciaTransacSQL)
|
||||
Dim ObjContabilidad As New ClsContabilidad(ObjCompra.IniciaTransacSQL)
|
||||
Dim ObjAF As New ClsAF(ObjCompra.IniciaTransacSQL)
|
||||
Dim ObjContaAC As ClsContPAQi '= New ClsContPAQi(UsuarioActual.Empresa)
|
||||
Dim ObjContaAC As ClsContPAQi = Nothing '= New ClsContPAQi(UsuarioActual.Empresa)
|
||||
|
||||
Dim Retorno As Boolean = True
|
||||
Dim CveEstatusFactura As Integer = HdnCveEstatusFactura.Value.ToEntero
|
||||
@@ -10957,11 +11016,12 @@ Partial Class Compras_Compras
|
||||
'e.Row.Cells(11).Width = Unit.Pixel(43)
|
||||
|
||||
If UsuarioActual.Empresa.UsaAC Then 'AndAlso (CveFactura > 0 Or CveCompra > 0)
|
||||
e.Row.Cells(12).Width = Unit.Pixel(150)
|
||||
e.Row.Cells(13).Width = Unit.Pixel(150)
|
||||
e.Row.Cells(14).Width = Unit.Pixel(150)
|
||||
e.Row.Cells(15).Width = Unit.Pixel(150)
|
||||
e.Row.Cells(16).Width = Unit.Pixel(100)
|
||||
e.Row.Cells(16).Width = Unit.Pixel(150)
|
||||
e.Row.Cells(17).Width = Unit.Pixel(150)
|
||||
e.Row.Cells(18).Width = Unit.Pixel(100)
|
||||
End If
|
||||
End If
|
||||
|
||||
@@ -11062,11 +11122,11 @@ Partial Class Compras_Compras
|
||||
|
||||
'CargaPresupuestosEgresos
|
||||
If UsuarioActual.Empresa.UsaAC Then
|
||||
e.Row.Cells(13).Visible = True
|
||||
e.Row.Cells(14).Visible = True
|
||||
e.Row.Cells(15).Visible = True
|
||||
e.Row.Cells(16).Visible = True
|
||||
e.Row.Cells(17).Visible = True
|
||||
e.Row.Cells(18).Visible = True
|
||||
|
||||
e.Row.FCDropDownList("DdlAC1").Items.Clear()
|
||||
e.Row.FCDropDownList("DdlAC1").DataSource = DtPresupuestos.FiltraParametros("", DistinctColumns:={"CveProgramaOperativo", "ProgramaOperativo"})
|
||||
@@ -11097,19 +11157,19 @@ Partial Class Compras_Compras
|
||||
'SI EL PRESUPUESTO DE EGRESOS VIENE DESDE LA OC, SE BLOQUEA PE
|
||||
If e.Row.DBCampo("CveOrdenCompraDetalle").ToEntero > 0 AndAlso e.Row.DBCampo("CvePresupuestoEgreso").ToEntero > 0 Then
|
||||
|
||||
e.Row.Cells(13).Enabled = False
|
||||
e.Row.Cells(14).Enabled = False
|
||||
e.Row.Cells(15).Enabled = False
|
||||
e.Row.Cells(16).Enabled = False
|
||||
e.Row.Cells(17).Enabled = False
|
||||
e.Row.Cells(18).Enabled = False
|
||||
End If
|
||||
Else
|
||||
|
||||
e.Row.Cells(13).Visible = False
|
||||
e.Row.Cells(14).Visible = False
|
||||
e.Row.Cells(15).Visible = False
|
||||
e.Row.Cells(16).Visible = False
|
||||
e.Row.Cells(17).Visible = False
|
||||
e.Row.Cells(18).Visible = False
|
||||
End If
|
||||
|
||||
End If
|
||||
@@ -13226,11 +13286,11 @@ Partial Class Compras_Compras
|
||||
|
||||
'Seccion Grid
|
||||
GvPS.Width = 1760
|
||||
GvPS.Columns(12).Visible = True
|
||||
GvPS.Columns(13).Visible = True
|
||||
GvPS.Columns(14).Visible = True
|
||||
GvPS.Columns(15).Visible = True
|
||||
GvPS.Columns(16).Visible = True
|
||||
GvPS.Columns(17).Visible = True
|
||||
|
||||
'Panel General
|
||||
UpPresupuestosAC.Visible = True
|
||||
@@ -17441,7 +17501,7 @@ Partial Class Compras_Compras
|
||||
CargaRetISRConcepto()
|
||||
|
||||
Dim NumNoDed As Integer = TmpDT.COUNT("CvePS", "NoDeducible = True ")
|
||||
If NumNoDed > 0 Then GvPS.Columns(10).Visible = True 'visualiza columnas de nodeducibles
|
||||
If NumNoDed > 0 Then GvPS.Columns(11).Visible = True 'visualiza columnas de nodeducibles
|
||||
|
||||
If DdlTipoComprobante.SelectedValue.Contiene("NC", "DEV") Then
|
||||
InicializaAplicaNCFact()
|
||||
@@ -17971,14 +18031,16 @@ Partial Class Compras_Compras
|
||||
|
||||
ViewState("RetIVA") = If(PS("RetIVA").ToString = "-1", ViewState("RetIVA"), PS("RetIVA").ToString).ToString
|
||||
ViewState("RetISR") = If(PS("RetISR").ToString = "-1", ViewState("RetISR"), PS("RetISR").ToString).ToString
|
||||
ViewState("IEPSPS") = If(PS("IEPSPorcentaje").ToString = "-1", ViewState("IEPSPS"), PS("IEPSPorcentaje").ToString).ToString
|
||||
If TxtIEPSModal.Text = "" Then
|
||||
TxtIEPSModal.Text = FormatoNumero(PS("IEPSPorcentaje").ToString.ToDecimal * 100, 0)
|
||||
End If
|
||||
ViewState("IEPSPSIVA") = If(PS("IEPSGrabaIVA").ToString = "True", PS("IEPSPorcentaje").ToString.ToDouble, 0)
|
||||
|
||||
|
||||
'TxtIVAModal.Text = FormatoNumero(ViewState("IVAPS").ToString().ToDouble * 100, 0)
|
||||
TxtRetIVAModal.Text = FormatoNumero(ViewState("RetIVA").ToString().ToDouble * 100, 0)
|
||||
TxtRetISRModal.Text = FormatoNumero(ViewState("RetISR").ToString().ToDouble * 100, 0)
|
||||
TxtIEPSModal.Text = FormatoNumero(ViewState("IEPSPS").ToString().ToDouble * 100, 0)
|
||||
|
||||
|
||||
UpIVA.Update()
|
||||
|
||||
@@ -20441,12 +20503,12 @@ Partial Class Compras_Compras
|
||||
If ChkEsNoDeducible.Checked Then
|
||||
EsNoDeducible = True
|
||||
dvNoDeducible.Visible = True
|
||||
GvPS.Columns(10).Visible = True
|
||||
GvPS.Columns(11).Visible = True
|
||||
UpEsNoDeduciblePS.Visible = True
|
||||
Else
|
||||
EsNoDeducible = False
|
||||
dvNoDeducible.Visible = False
|
||||
GvPS.Columns(10).Visible = False
|
||||
GvPS.Columns(11).Visible = False
|
||||
UpEsNoDeduciblePS.Visible = False
|
||||
End If
|
||||
'DivEsNoDeducible.Visible = False
|
||||
@@ -20787,7 +20849,7 @@ Partial Class Compras_Compras
|
||||
DdlTipoGastoContrato.DataBind()
|
||||
DdlTipoGasto.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
|
||||
RegistraScript("$('#DivmodalConmtrato').modal('show')")
|
||||
RegistraScript("$('#DivmodalContrato').modal('show')")
|
||||
UpModalContrato.Update()
|
||||
|
||||
End Sub
|
||||
@@ -20833,28 +20895,30 @@ Partial Class Compras_Compras
|
||||
|
||||
|
||||
Protected Sub BtnAplicarContrato_Click(sender As Object, e As EventArgs)
|
||||
|
||||
Dim PorcentajeIVA As Decimal = TmpDT.MAX("IVAPorcentaje").ToDecimal
|
||||
|
||||
TmpDT.Rows.Clear()
|
||||
|
||||
Dim CveTipoGastoObra As Integer = DdlTipoGastoContrato.SelectedValue.ToEntero
|
||||
Dim TuipoGasto As String = DdlTipoGastoContrato.SelectedItem.Text
|
||||
Dim TipoGasto As String = DdlTipoGastoContrato.SelectedItem.Text
|
||||
|
||||
For Each GvRow As GridViewRow In GvContratosControl.Rows
|
||||
|
||||
Dim CveContratoDetalle As Integer = GvRow.DataKey("CveContratoDetalle").ToEntero
|
||||
|
||||
Dim Cantidad As Double = GvRow.FCTextBox("TxtCantidad").Text.ToDouble
|
||||
Dim Cantidad As Decimal = GvRow.FCTextBox("TxtCantidad").Text.ToDecimal
|
||||
Dim CvePS As Integer = GvRow.DataKey("CvePS").ToEntero
|
||||
Dim PS As String = GvRow.DataKey("PS")
|
||||
Dim PU As Double = GvRow.DataKey("PU").ToDouble
|
||||
Dim TotalPS As Double = GvRow.FCTextBox("TxtImporte").Text.ToDouble
|
||||
Dim TotalPS As Decimal = GvRow.FCTextBox("TxtImporte").Text.ToDecimal
|
||||
Dim PU As Decimal
|
||||
|
||||
If Cantidad > 0 Then PU = TotalPS / Cantidad
|
||||
|
||||
Dim CveUnidadMedida As Integer = GvRow.DataKey("CveUnidadMedida").ToEntero
|
||||
Dim UMAbreviatura As String = GvRow.DataKey("Abreviatura").ToString
|
||||
|
||||
Dim SubProyecto As String = GvRow.DataKey("SubProyecto")
|
||||
Dim CveSubProyecto As Integer = GvRow.DataKey("CveSubProyecto").ToEntero
|
||||
Dim Codigo As String = "" 'GvRow.DataKey("Codigo")
|
||||
|
||||
Dim Proyecto As String = GvRow.DataKey("Proyecto")
|
||||
Dim CveProyecto As Integer = GvRow.DataKey("CveProyecto").ToEntero
|
||||
@@ -20863,24 +20927,23 @@ Partial Class Compras_Compras
|
||||
Dim RetIVA As Double = GvRow.DataKey("RetIVA").ToString.ToDouble
|
||||
Dim IvaPS As Double = GvRow.DataKey("IVA").ToString.ToDouble
|
||||
|
||||
If IvaPS = -1 Then
|
||||
IvaPS = PorcentajeIVA
|
||||
End If
|
||||
|
||||
IvaPS = IvaPS * TotalPS
|
||||
|
||||
Dim CveClasificacion As Integer = GvRow.DataKey("CveClasificacion").ToString.ToEntero
|
||||
Dim Clasificacion As String = GvRow.DataKey("Clasificacion")
|
||||
|
||||
|
||||
Dim IEPSPS As Double = GvRow.DataKey("IEPSPorcentaje").ToString.ToDouble
|
||||
Dim IEPSPSIVA As Double = If(GvRow.DataKey("IEPSGrabaIVA").ToString = "True", IEPSPS, 0)
|
||||
|
||||
Dim IdCuentaPorEjercer As Integer = -1
|
||||
Dim IdCuentaComprometido As Integer = -1
|
||||
|
||||
|
||||
|
||||
|
||||
If Cantidad > 0 Then
|
||||
|
||||
AddPS(Cantidad, CveUnidadMedida, UMAbreviatura, CveClasificacion, Clasificacion, CvePS, PS, 1, CveSubProyecto.ToString, SubProyecto, Proyecto, CveProyecto.ToString, "", PU, PU * Cantidad, IvaPS, RetIVA, RetISR, IEPSPS, IEPSPSIVA, 0, CveContratoDetalle:=CveContratoDetalle,
|
||||
CveTipoGasto:=CveTipoGastoObra, TipoGasto:=TuipoGasto)
|
||||
|
||||
AddPS(Cantidad, CveUnidadMedida, UMAbreviatura, CveClasificacion, Clasificacion, CvePS, PS, 1, CveSubProyecto.ToString, SubProyecto, Proyecto, CveProyecto.ToString, "", PU, PU * Cantidad, PorcentajeIVA, RetIVA, RetISR, IEPSPS, IEPSPSIVA, 0, PorcentajeIVA:=PorcentajeIVA, CveContratoDetalle:=CveContratoDetalle,
|
||||
CveTipoGasto:=CveTipoGastoObra, TipoGasto:=TipoGasto)
|
||||
|
||||
'ContratoObraAplciado = True
|
||||
|
||||
@@ -20890,7 +20953,7 @@ Partial Class Compras_Compras
|
||||
|
||||
AddPS2()
|
||||
If Not ChkContinualAgregandoControl.Checked Then
|
||||
RegistraScript("$('#DivmodalConmtrato').modal('hide')")
|
||||
RegistraScript("$('#DivmodalContrato').modal('hide')")
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
@@ -121,7 +121,7 @@ Partial Class Contabilidad_ContabilidadElectronica
|
||||
Str.AppendFormat("Sello=""{0}"" ", "123")
|
||||
Str.AppendFormat("noCertificado=""{0}"" ", "123")
|
||||
Str.AppendFormat("Certificado=""{0}"" ", "1234567890")
|
||||
Str.Append("xmlns:catalogocuentas=""www.sat.gob.mx/esquemas/ContabilidadE/1_1/CatalogoCuentas""")
|
||||
Str.Append("xmlns:catalogocuentas=""www.sat.gob.mx/esquemas/ContabilidadE/1_1/CatalogoCuentas"">")
|
||||
|
||||
'DETALLES
|
||||
For Each Dr As DataRow In DtCuentas.Rows
|
||||
@@ -183,20 +183,26 @@ Partial Class Contabilidad_ContabilidadElectronica
|
||||
Dim FechaI = String.Format("01/{0}/{1}", DdlPeriodo.SelectedValue.PadLeft(2, "0"c), DdlEjercicio.SelectedValue).ToDate
|
||||
Dim FechaF = FechaI.LastDayOfMonth
|
||||
Dim DtCuentas As New DataTable
|
||||
|
||||
Dim ObjConpaq As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
If ObjConpaq.GetBalanzaElectronica(FechaI, FechaF) Then
|
||||
DtCuentas = ObjConpaq.DtResultados
|
||||
If UsuarioActual.Empresa.TipoContabilidad = 1 Then
|
||||
Dim objconta As New ClsContabilidad
|
||||
If objconta.GetBalanzaComprobacion(FechaI, FechaF, UsuarioActual.CveEmpresa) Then
|
||||
DtCuentas = objconta.DtResultados
|
||||
End If
|
||||
objconta.Dispose()
|
||||
Else
|
||||
Dim ObjConpaq As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
If ObjConpaq.GetBalanzaElectronica(FechaI, FechaF) Then
|
||||
DtCuentas = ObjConpaq.DtResultados
|
||||
End If
|
||||
ObjConpaq.Dispose()
|
||||
End If
|
||||
ObjConpaq.Dispose()
|
||||
|
||||
|
||||
If DtCuentas IsNot Nothing AndAlso DtCuentas.Rows.Count > 0 Then
|
||||
Dim Str As New StringBuilder
|
||||
|
||||
'CABECERA
|
||||
Str.Append("<?xml version=""1.0"" encoding=""UTF-8""?>")
|
||||
Str.Append("<BCE:Balanza xsi:schemaLocation=""www.sat.gob.mx/esquemas/ContabilidadE/1_1/BalanzaComprobacion BalanzaComprobacion_1_1.xsd"" xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance"" Version=""1.1"" ")
|
||||
Str.Append("<BCE:Balanza xsi:schemaLocation=""www.sat.gob.mx/esquemas/ContabilidadE/1_1/BalanzaComprobacion/BalanzaComprobacion_1_1.xsd"" xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance"" Version=""1.1"" ")
|
||||
Str.AppendFormat("RFC=""{0}"" ", UsuarioActual.Empresa.RFC)
|
||||
Str.AppendFormat("Mes=""{0}"" ", DdlPeriodo.SelectedValue)
|
||||
Str.AppendFormat("Anio=""{0}"" ", DdlEjercicio.SelectedValue)
|
||||
@@ -212,11 +218,11 @@ Partial Class Contabilidad_ContabilidadElectronica
|
||||
'DETALLES
|
||||
For Each Dr As DataRow In DtCuentas.Rows
|
||||
Str.Append("<BCE:Ctas ")
|
||||
Str.AppendFormat("NumCta=""{0}"" ", Dr("NumCta"))
|
||||
Str.AppendFormat("SaldoIni=""{0}"" ", Dr("SaldoIni"))
|
||||
Str.AppendFormat("Debe=""{0}"" ", Dr("Debe"))
|
||||
Str.AppendFormat("Haber=""{0}"" ", Dr("Haber"))
|
||||
Str.AppendFormat("SaldoFin=""{0}"" ", Dr("SaldoFin"))
|
||||
Str.AppendFormat("NumCta=""{0}"" ", Dr("NumCta").ToString)
|
||||
Str.AppendFormat("SaldoIni=""{0}"" ", Dr("SaldoIni").ToString)
|
||||
Str.AppendFormat("Debe=""{0}"" ", Dr("Debe").ToString)
|
||||
Str.AppendFormat("Haber=""{0}"" ", Dr("Haber").ToString)
|
||||
Str.AppendFormat("SaldoFin=""{0}"" ", Dr("SaldoFin").ToString)
|
||||
Str.Append("/>")
|
||||
Next
|
||||
|
||||
@@ -225,7 +231,6 @@ Partial Class Contabilidad_ContabilidadElectronica
|
||||
'FIN
|
||||
Str.Append("</BCE:Balanza>")
|
||||
|
||||
|
||||
'GUARDA ARHIVO
|
||||
ArchivoBalanza = Server.MapPath(String.Format("~/Empresas/{0}/ContabilidadElectronica/{1}{2}{3}BN.xml", UsuarioActual.CveEmpresa, UsuarioActual.Empresa.RFC, DdlEjercicio.SelectedValue, DdlPeriodo.SelectedValue.PadLeft(2, "0"c)))
|
||||
|
||||
|
||||
@@ -311,7 +311,7 @@ Partial Class Contabilidad_FisImpuestos
|
||||
Comprobante = IO.Path.GetExtension(String.Format("{0}Temp\{1}", AppDomain.CurrentDomain.BaseDirectory, fileItem.filename)).Replace(".", "")
|
||||
filemove = fileItem.FileUrl
|
||||
RutaArchivo = String.Format("{0}{1}", RutaDirectorio, CveImpuesto)
|
||||
RutaArchivo = String.Format("{0}.{1}", RutaArchivo, fileItem.Extencion)
|
||||
RutaArchivo = String.Format("{0}.{1}", RutaArchivo, fileItem.Extension)
|
||||
|
||||
Try
|
||||
If Not Directory.Exists(RutaDirectorio) Then
|
||||
|
||||
@@ -1891,8 +1891,8 @@ Partial Class RegPoliza
|
||||
Private Sub BtnCargaExcel_Click(sender As Object, e As EventArgs) Handles BtnCargaExcel.Click
|
||||
If TxtExcel.getfiles().Archivos.Count > 0 Then
|
||||
Dim file As Archivo = TxtExcel.getfiles().Archivos(0)
|
||||
Dim Directorio As String = ModExtensiones.DirectorioBaseEmpresas & file.patch
|
||||
Dim Tipo As String = If(file.Extencion.Contiene("xlsx", "xlsx", "xlsm", "xlsb", "xls"), "EXCEL", "CSV")
|
||||
Dim Directorio As String = ModExtensiones.DirectorioBaseEmpresas & file.path
|
||||
Dim Tipo As String = If(file.Extension.Contiene("xlsx", "xlsx", "xlsm", "xlsb", "xls"), "EXCEL", "CSV")
|
||||
CargarArchivo(Directorio, file.FileUrl, Tipo)
|
||||
Else
|
||||
Alert("No existe el archivo. Favor de subir un archivo excel a la plataforma.", TipoMensaje.MsgError)
|
||||
|
||||
@@ -204,6 +204,7 @@
|
||||
<asp:DropDownList ID="DdlPersonal" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="NombreCompleto" DataValueField="CvePersonal" Width="160px" Visible="false"></asp:DropDownList>
|
||||
<ADS:Dropdownlost ID="DdlClientes" CssStyle="width: 100%;" CssClassDdl="select2me" runat="server" AppendDataBoundItems="true" DataTextField="NombreComercial" DataValueField="CveCliente" Width="160px" Visible="false" AutoPostBack="true"></ADS:Dropdownlost>
|
||||
<asp:DropDownList ID="DdlVentas" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="Folio" DataValueField="CveVenta" Width="160px" Visible="false"></asp:DropDownList>
|
||||
|
||||
</th>
|
||||
<th>
|
||||
<asp:DropDownList ID="DdlCuentaContable" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="CtaCodigo" DataValueField="Id" Width="160px">
|
||||
@@ -454,7 +455,7 @@
|
||||
<div class="portlet-body nomarginleftright form-horizontal form-row-sepe formnombottom ">
|
||||
|
||||
<asp:GridView ID="GvPrePoliza" runat="server" AutoGenerateColumns="False" CssClass="table table-striped table-advance table-hover mysmallbtn GvPrePoliza" GridLines="None"
|
||||
DataKeyNames="CvePrePolizaDetalle, CveConceptoContable, IdCtaContable, CveSubProyecto, CveTipoGasto,Referencia,CveVenta,CveCompra, CveProveedor, CveCliente, CvePersonal, CveCuenta" Width="100%" >
|
||||
DataKeyNames="CvePrePolizaDetalle, CveConceptoContable, IdCtaContable, CveSubProyecto, CveTipoGasto,Referencia,CveVenta,CveCompra, CveProveedor, CveCliente, CvePersonal, CveCuenta, PorcentajeImpuesto" Width="100%" >
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Movimiento</HeaderTemplate>
|
||||
@@ -729,6 +730,10 @@
|
||||
<ADS:Dropdownlost ID="DdlClientesE" CssStyle="width: 100%;" CssClassDdl="select2me" runat="server" AppendDataBoundItems="true" DataTextField="NombreComercial" DataValueField="CveCliente" Width="160px" Visible="false" AutoPostBack="true"></ADS:Dropdownlost>
|
||||
<asp:DropDownList ID="DdlVentasE" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="Folio" DataValueField="CveVenta" Width="160px" Visible="false"></asp:DropDownList>
|
||||
<asp:DropDownList ID="DdlClasificacionesE" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="Clasificacion" DataValueField="CveClasificacion" Width="160px" Visible="false"></asp:DropDownList>
|
||||
<asp:DropDownList ID="DdlPorcentajeIVAE" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" VISIBLE="false" Width="160px" >
|
||||
<asp:ListItem Text="16%" Value="0.16"></asp:ListItem>
|
||||
<asp:ListItem Text="8%" Value="0.08"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -331,7 +331,8 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
.Add("ContadoNumeroFolio", Type.GetType("System.String"))
|
||||
.Add("ContadoImporte", Type.GetType("System.Double"))
|
||||
.Add("ContadoBeneficiario", Type.GetType("System.String"))
|
||||
.Add("ContadoObservaciones", Type.GetType("System.String"))
|
||||
.Add("ContadoObservaciones", Type.GetType("System.String"))
|
||||
.Add("PorcentajeImpuesto", Type.GetType("System.Double"))
|
||||
.Add("Modificado", Type.GetType("System.Boolean"))
|
||||
|
||||
|
||||
@@ -578,7 +579,9 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
DdlConceptosContables.DataBind()
|
||||
End Sub
|
||||
|
||||
Private Sub DdlConceptosContables_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlConceptosContables.SelectedIndexChanged
|
||||
Private Sub DdlConceptosContables_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlConceptosContables.SelectedIndexChanged
|
||||
|
||||
|
||||
If DdlConceptosContables.SelectedValue.ToEntero.Contiene(5, 17, 201, 206, 14, 15, 16, 19, 25, 26, 21) Then
|
||||
CargaProveedores()
|
||||
DdlProveedores.Visible = True
|
||||
@@ -1051,7 +1054,8 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
row.DataKey("IdCtaContable").ToEntero, If(row.FCLiteral("TxtCargo").Text.ToDecimal <> 0, False, True), If(row.FCLiteral("TxtCargo").Text.ToDecimal <> 0,
|
||||
row.FCLiteral("TxtCargo").Text.ToDecimal, row.FCLiteral("TxtAbono").Text.ToDecimal), CveTipoGasto:=If(DdlTipoGasto.Visible, row.DataKey("CveTipoGasto").ToEntero, row.DataKey("CveTipoGasto").ToEntero),
|
||||
CveConceptoContable:=row.DataKey("CveConceptoContable").ToEntero, CveProveedor:=row.DataKey("CveProveedor").ToEntero, CveCompra:=row.DataKey("CveCompra").ToEntero,
|
||||
CveCliente:=row.DataKey("CveCliente").ToEntero, CveVenta:=row.DataKey("CveVenta").ToEntero, CvePersonal:=row.DataKey("CvePersonal").ToEntero, Referencia:=row.FCLiteral("TxtRef").Text, CveCuenta:=row.DataKey("CveCuenta").ToEntero, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
|
||||
CveCliente:=row.DataKey("CveCliente").ToEntero, CveVenta:=row.DataKey("CveVenta").ToEntero,
|
||||
CvePersonal:=row.DataKey("CvePersonal").ToEntero, Referencia:=row.FCLiteral("TxtRef").Text, CveCuenta:=row.DataKey("CveCuenta").ToEntero, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
|
||||
OcurrioError = True
|
||||
Exit For
|
||||
End If
|
||||
@@ -1065,7 +1069,7 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
ImporteMX:=If(row.FCLiteral("TxtCargo").Text.ToDecimal <> 0,
|
||||
row.FCLiteral("TxtCargo").Text.ToDecimal, row.FCLiteral("TxtAbono").Text.ToDecimal), CveProveedor:=row.DataKey("CveProveedor").ToEntero,
|
||||
CveCompra:=row.DataKey("CveCompra").ToEntero, CveCliente:=row.DataKey("CveCliente").ToEntero, CveVenta:=row.DataKey("CveVenta").ToEntero,
|
||||
CvePersonal:=row.DataKey("CvePersonal").ToEntero, CveCuenta:=row.DataKey("CveCuenta").ToEntero) Then
|
||||
CvePersonal:=row.DataKey("CvePersonal").ToEntero, CveCuenta:=row.DataKey("CveCuenta").ToEntero, PorcentajeImpuesto:=row.DataKey("PorcentajeImpuesto").ToDecimal) Then
|
||||
OcurrioError = True
|
||||
Exit For
|
||||
End If
|
||||
@@ -1119,6 +1123,7 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
Dim CveCuenta As Integer = GvPrePoliza.Rows(IndiceGrid).DataKey("CveCuenta").ToString.ToEntero
|
||||
Dim Cargo As Double = GvPrePoliza.Rows(IndiceGrid).FCLiteral("TxtCargo").Text.ToDouble
|
||||
Dim Abono As Double = GvPrePoliza.Rows(IndiceGrid).FCLiteral("TxtAbono").Text.ToDouble
|
||||
Dim PorcentajeImpuesto As Double = GvPrePoliza.Rows(IndiceGrid).DataKey("PorcentajeImpuesto").ToEntero
|
||||
|
||||
CargaConceptosContablesE()
|
||||
DdlConceptosContablesE.SelectedValueExist(CveConceptoContable)
|
||||
@@ -1187,7 +1192,11 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
DdlCuentaContableE.DataBind()
|
||||
DdlCuentaContableE.Items.Insert(0, New ListItem("Sin Asignar", "0"))
|
||||
End Sub
|
||||
Private Sub DdlConceptosContablesE_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlConceptosContablesE.SelectedIndexChanged
|
||||
Private Sub DdlConceptosContablesE_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlConceptosContablesE.SelectedIndexChanged
|
||||
Dim dr As DataRow = GlobalDTContaConceptosContables(DdlConceptosContablesE.SelectedValue.ToEntero).FiltroPrimero("")
|
||||
If dr IsNot Nothing Then
|
||||
DdlPorcentajeIVAE.Visible = dr("AplicaImpuesto") = "True"
|
||||
End If
|
||||
If DdlConceptosContablesE.SelectedValue.ToEntero.Contiene(5, 17, 201, 206, 14, 15, 16, 19, 25, 26, 21) Then
|
||||
CargaProveedoresE()
|
||||
DdlProveedoresE.Visible = True
|
||||
@@ -1303,9 +1312,14 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
dr("CvePersonal") = DdlPersonalE.SelectedValue.ToEntero
|
||||
dr("CveCliente") = DdlClientesE.SelectedValue.ToEntero
|
||||
dr("CveVenta") = DdlVentasE.SelectedValue.ToEntero
|
||||
dr("FolioFactura") = If(DdlComprasE.Visible = True, DdlComprasE.SelectedItem.ToString, If(DdlVentasE.Visible = True, DdlVentasE.SelectedItem.ToString, ""))
|
||||
If DdlComprasE.Visible = True AndAlso DdlComprasE.SelectedValue.ToEntero > 0 Then dr("FolioFactura") = DdlComprasE.SelectedItem.ToString()
|
||||
If DdlVentasE.Visible = True AndAlso DdlVentasE.SelectedValue.ToEntero > 0 Then dr("FolioFactura") = DdlVentasE.SelectedItem.ToString()
|
||||
dr("Modificado") = True
|
||||
|
||||
If DdlPorcentajeIVAE.Visible Then
|
||||
dr("PorcentajeImpuesto") = DdlPorcentajeIVAE.SelectedValue.ToDecimal
|
||||
End If
|
||||
|
||||
|
||||
DtMovimientos.Rows.Add(dr)
|
||||
DtMovimientos.AcceptChanges()
|
||||
@@ -1966,9 +1980,9 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
If TxtExcel.getfiles().Archivos.Count > 0 Then
|
||||
Dim file As Archivo = TxtExcel.getfiles().Archivos(0)
|
||||
|
||||
Dim Directorio As String = Server.MapPath("~") & file.patch
|
||||
Dim Directorio As String = Server.MapPath("~") & file.path
|
||||
|
||||
Dim Tipo As String = If(file.Extencion.Contiene("xlsx", "xlsx", "xlsm", "xlsb"), "EXCEL", "CSV")
|
||||
Dim Tipo As String = If(file.Extension.Contiene("xlsx", "xlsx", "xlsm", "xlsb"), "EXCEL", "CSV")
|
||||
CargarArchivo(Directorio, file.filename, Tipo)
|
||||
Else
|
||||
Alert("No existe el archivo.Favor de subir un archivo csv o excel a la plataforma", TipoMensaje.MsgError)
|
||||
|
||||
@@ -83,7 +83,7 @@ Partial Class Contratos_CatContratosPlantillas
|
||||
Alert("El nombre del archivo excede los 200 Caracteres permitidos favor de modificarlo.", TipoMensaje.MsgAdvertencia)
|
||||
URL = ""
|
||||
Exit Sub
|
||||
ElseIf fileItem.Extencion <> "doc" AndAlso fileItem.Extencion <> "docx" Then
|
||||
ElseIf fileItem.Extension <> "doc" AndAlso fileItem.Extension <> "docx" Then
|
||||
Alert("Solo se permiten archivos de tipo .doc o .docx, favor de modificarlo", TipoMensaje.MsgAdvertencia)
|
||||
URL = ""
|
||||
Exit Sub
|
||||
|
||||
@@ -2143,8 +2143,8 @@ Partial Class Contratos_Default
|
||||
Private Sub BtnCargaExcel_Click(sender As Object, e As EventArgs) Handles BtnCargaExcel.Click
|
||||
If TxtExcel.getfiles().Archivos.Count > 0 Then
|
||||
Dim file As Archivo = TxtExcel.getfiles().Archivos(0)
|
||||
Dim Directorio As String = ModExtensiones.DirectorioBaseEmpresas & file.patch
|
||||
Dim Tipo As String = If(file.Extencion.Contiene("xlsx", "xlsx", "xlsm", "xlsb"), "EXCEL", "CSV")
|
||||
Dim Directorio As String = ModExtensiones.DirectorioBaseEmpresas & file.path
|
||||
Dim Tipo As String = If(file.Extension.Contiene("xlsx", "xlsx", "xlsm", "xlsb"), "EXCEL", "CSV")
|
||||
CargarArchivo(Directorio, file.filename, Tipo)
|
||||
Else
|
||||
Alert("No existe el archivo. Favor de subir un archivo excel a la plataforma.", TipoMensaje.MsgError)
|
||||
|
||||
@@ -364,7 +364,7 @@ Partial Class Contratos_ContratoAvance
|
||||
Dim urlsave As String = String.Format("Empresas\{0}\Contrato\{1}\Anexos", UsuarioActual.CveEmpresa, CveContrato)
|
||||
|
||||
For Each fileItem As Archivo In guardarArchivos
|
||||
fileItem.filename.FilesMove(fileItem.filename.Replace($".{fileItem.Extencion}", ""), urlsave)
|
||||
fileItem.filename.FilesMove(fileItem.filename.Replace($".{fileItem.Extension}", ""), urlsave)
|
||||
Next
|
||||
|
||||
|
||||
@@ -428,7 +428,7 @@ Partial Class Contratos_ContratoAvance
|
||||
|
||||
Dim urlsave As String = String.Format("Empresas\{0}\Contrato\{1}\Anexos", UsuarioActual.CveEmpresa, CveContrato)
|
||||
For Each fileItem As Archivo In guardarArchivos
|
||||
fileItem.filename.FilesMove(fileItem.filename.Replace($".{fileItem.Extencion}", ""), urlsave)
|
||||
fileItem.filename.FilesMove(fileItem.filename.Replace($".{fileItem.Extension}", ""), urlsave)
|
||||
Next
|
||||
ObjContratos.Commit()
|
||||
|
||||
|
||||
@@ -302,18 +302,11 @@
|
||||
</tr>
|
||||
</table>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>--%>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ajax:TabContainer ID="Tab" runat="server" Width="100%" CssClass="tabBodyOverride" ActiveTabIndex="0">
|
||||
</asp:UpdatePanel>--%>
|
||||
|
||||
<ajax:TabContainer ID="Tab" runat="server" Width="100%" ActiveTabIndex="0">
|
||||
<ajax:TabPanel ID="TabInformacionGeneral" runat="server" HeaderText="Información General">
|
||||
<ContentTemplate>
|
||||
|
||||
|
||||
<ContentTemplate>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="portlet smmallpadding light bordered">
|
||||
@@ -810,7 +803,7 @@
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<asp:GridView ID="Gv" ClientIDMode="Static" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron Conceptos"
|
||||
DataKeyNames="CveContratoDetalle,CveUM, CvePS, Cantidad, PU,CveTipoPresupuesto,CveClasificacion,CodigoPS,LimitarCantidad,PS,OCInterna,NoIdentificacion,PermitirAvance,CantidadContratada"
|
||||
DataKeyNames="CveContratoDetalle,CveUM, CvePS, Cantidad, PU,CveTipoPresupuesto,CodigoPS,LimitarCantidad,PS,NoIdentificacion,PermitirAvance,CantidadContratada"
|
||||
ShowHeader="true" SelectedRowStyle-BackColor="#66CCFF" CssClass="table table-striped table-hover Widthall ScrollAD mysmallbtn" GridLines="None">
|
||||
<Columns>
|
||||
|
||||
@@ -824,13 +817,10 @@
|
||||
</EditItemTemplate>
|
||||
<ItemStyle Width="50px" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
|
||||
|
||||
<asp:TemplateField HeaderText="Concepto" ItemStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtPS" Text='<%# Eval("CodigoPS")%>' runat="server"></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="400px" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="U.M.">
|
||||
<ItemTemplate>
|
||||
@@ -839,10 +829,8 @@
|
||||
<EditItemTemplate>
|
||||
<asp:DropDownList ID="DdlUMEdit" runat="server" AutoPostBack="true" DataTextField="UnidadMedida" DataValueField="CveUnidadMedida" CssClass="table-group-action-input form-control input-inline input-small input-sm" Style="width: 75px !important;"></asp:DropDownList>
|
||||
</EditItemTemplate>
|
||||
<ItemStyle Width="100px" />
|
||||
</asp:TemplateField>
|
||||
|
||||
|
||||
<ItemStyle Width="80px" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Observacion" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LblObservacion" Text='<%# Eval("Observacion")%>' runat="server"></asp:Literal>
|
||||
@@ -851,9 +839,7 @@
|
||||
<asp:TextBox ID="TxtObservacion" runat="server" Text='<%# Eval("Observacion") %>' Width="70px"></asp:TextBox>
|
||||
</EditItemTemplate>
|
||||
<ItemStyle Width="75px" />
|
||||
</asp:TemplateField>
|
||||
|
||||
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Precio Unitario">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtPU" Text='<%# Eval("PU", "{0:###,###,##0.00##}")%>' runat="server"></asp:Literal>
|
||||
@@ -861,13 +847,13 @@
|
||||
<EditItemTemplate>
|
||||
<asp:TextBox ID="TxtPU" runat="server" Text='<%# Eval("PU", "{0:###,###,##0.00##}")%>' Width="90px"></asp:TextBox><ajax:FilteredTextBoxExtender ID="FilteredTextBoxExtenderPU" runat="server" TargetControlID="TxtPU" FilterType="Custom, Numbers" ValidChars=".," />
|
||||
</EditItemTemplate>
|
||||
<ItemStyle Width="150px" HorizontalAlign="Right" />
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Total">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LtTotal" CssClass="ltltotalgvx" data-value='<%# Eval("Total")%>' Text='<%# Eval("Total", "{0:###,###,##0.00##}")%>' runat="server"></asp:Label>
|
||||
<asp:Label ID="LtTotal" CssClass="ltltotalgvx" data-value='<%# Eval("Total")%>' Text='<%# Eval("Total", "{0:N2}")%>' runat="server"></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="150px" HorizontalAlign="Right" />
|
||||
<ItemStyle Width="100px" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Avance" Visible="false">
|
||||
<ItemTemplate>
|
||||
@@ -876,17 +862,12 @@
|
||||
data-toggle="confirmation" data-popout="true" data-original-title="¿Habilitar el avance?" data-btn-ok-label="si" ></asp:LinkButton>
|
||||
|
||||
<asp:CheckBox ID="CHKPAvance" Enabled="True" Visible="false" AutoPostBack="true" OnCheckedChanged="AvaClick" runat="server" />
|
||||
|
||||
|
||||
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="150px" HorizontalAlign="Right" />
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Editar" ItemStyle-Width="50px" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LnkEditarPresupuestoVentaDetalle" OnClick="LnkEditarPresupuestoVentaDetalle_Click" runat="server" AlternateText="Editar" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-pencil'></i>" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
|
||||
<%-- <asp:TemplateField HeaderText="Editar" ItemStyle-Width="50px" ItemStyle-HorizontalAlign="Center">
|
||||
<EditItemTemplate>
|
||||
@@ -901,15 +882,13 @@
|
||||
CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-pencil'></i>" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>--%>
|
||||
<asp:TemplateField HeaderText="Eliminar" ItemStyle-Width="50px" ItemStyle-HorizontalAlign="Center">
|
||||
<asp:TemplateField HeaderText="" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LnkEditarPresupuestoVentaDetalle" OnClick="LnkEditarPresupuestoVentaDetalle_Click" runat="server" AlternateText="Editar" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-pencil'></i>" />
|
||||
<asp:LinkButton ID="imgD" runat="server" AlternateText="Eliminar" CausesValidation="False" CommandName="Delete" CssClass="btn btn-circle btn-sm red"
|
||||
Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="Esta seguro de eliminar el concepto?" data-btn-ok-label="si" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
|
||||
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</div>
|
||||
@@ -972,7 +951,7 @@
|
||||
<div class="col-md-12">
|
||||
|
||||
<asp:GridView ID="GvInsumos" ClientIDMode="Static" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron Conceptos"
|
||||
DataKeyNames="CveContratoDetalle,CveUM, CvePS, Cantidad, PU,CveTipoPresupuesto,CveClasificacion,CodigoPS,LimitarCantidad,PS,NoIdentificacion,CantidadContratada,Dias,CveRubro,CveActividad,CveSubTipoActivoFijo" ShowHeader="true" SelectedRowStyle-BackColor="#66CCFF"
|
||||
DataKeyNames="CveContratoDetalle,CveUM, CvePS, Cantidad, PU,CveTipoPresupuesto,CodigoPS,LimitarCantidad,PS,NoIdentificacion,CantidadContratada,Dias,CveRubro,CveActividad,CveSubTipoActivoFijo" ShowHeader="true" SelectedRowStyle-BackColor="#66CCFF"
|
||||
CssClass="table table-striped table-hover Widthall ScrollAD mysmallbtn" GridLines="None">
|
||||
|
||||
<Columns>
|
||||
@@ -986,13 +965,10 @@
|
||||
</EditItemTemplate>
|
||||
<ItemStyle Width="50px" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
|
||||
|
||||
<asp:TemplateField HeaderText="Concepto" ItemStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtPS" Text='<%# Eval("CodigoPS")%>' runat="server"></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="400px" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="U.M.">
|
||||
<ItemTemplate>
|
||||
@@ -1001,7 +977,7 @@
|
||||
<EditItemTemplate>
|
||||
<asp:DropDownList ID="DdlUMEdit" runat="server" AutoPostBack="true" DataTextField="UnidadMedida" DataValueField="CveUnidadMedida" CssClass="table-group-action-input form-control input-inline input-small input-sm" Style="width: 75px !important;"></asp:DropDownList>
|
||||
</EditItemTemplate>
|
||||
<ItemStyle Width="100px" />
|
||||
<ItemStyle Width="80px" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Precio Unitario">
|
||||
<ItemTemplate>
|
||||
@@ -1010,14 +986,14 @@
|
||||
<EditItemTemplate>
|
||||
<asp:TextBox ID="TxtPU" runat="server" Text='<%# Eval("PU", "{0:###,###,##0.00##}")%>' Width="90px"></asp:TextBox><ajax:FilteredTextBoxExtender ID="FilteredTextBoxExtenderPU" runat="server" TargetControlID="TxtPU" FilterType="Custom, Numbers" ValidChars="." />
|
||||
</EditItemTemplate>
|
||||
<ItemStyle Width="150px" HorizontalAlign="Right" />
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Total">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LtTotal" CssClass="ltltotalgvx2" data-value='<%# Eval("Total")%>' Text='<%# Eval("Total", "{0:###,###,##0.00##}")%>' runat="server"></asp:Label>
|
||||
<asp:Label ID="LtTotal" CssClass="ltltotalgvx2" data-value='<%# Eval("Total")%>' Text='<%# Eval("Total", "{0:N2}")%>' runat="server"></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="150px" HorizontalAlign="Right" />
|
||||
<ItemStyle Width="100px" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Avance" Visible="false">
|
||||
@@ -1031,24 +1007,18 @@
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LtlDias" CssClass="ltltotalgvx2" Text='<%# Eval("Dias")%>' runat="server"></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="150px" HorizontalAlign="Right" />
|
||||
<ItemStyle Width="50px" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Limitar Cantidad" Visible="true">
|
||||
<asp:TemplateField HeaderText="Limitar" Visible="true">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LtlLimitarCantidad" CssClass="ltltotalgvx2" Text='<%# Eval("LimitarCantidad")%>' runat="server"></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="150px" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Editar" ItemStyle-Width="50px" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemStyle Width="50px" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LnkEditarPresupuestoControlDetalle" OnClick="LnkEditarPresupuestoControlDetalle_Click" runat="server" AlternateText="Editar" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-pencil'></i>" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Eliminar" ItemStyle-Width="50px" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="imgD" runat="server" AlternateText="Eliminar" CausesValidation="False" CommandName="Delete" CssClass="btn btn-circle btn-sm red"
|
||||
Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="Esta seguro de eliminar el concepto?" data-btn-ok-label="si" />
|
||||
</ItemTemplate>
|
||||
@@ -1147,7 +1117,7 @@
|
||||
|
||||
<asp:UpdatePanel ID="UPGVInt" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvInt" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron Conceptos" DataKeyNames="CveContratoDetalle,CveUM, CvePS, Cantidad, PU,CveTipoPresupuesto,CveClasificacion"
|
||||
<asp:GridView ID="GvInt" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron Conceptos" DataKeyNames="CveContratoDetalle,CveUM, CvePS, Cantidad, PU,CveTipoPresupuesto"
|
||||
ShowHeader="false" SelectedRowStyle-BackColor="#66CCFF" CssClass="table table-striped table-hover Widthall mysmallbtn" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Cantidad">
|
||||
@@ -1366,8 +1336,8 @@
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12" align="right">
|
||||
<input type="text" id="TxtFiltra" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtFiltra','{0}')", GvDatosAvance.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtFiltra','{0}')", GvDatosAvance.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
<input type="text" id="TxtFiltraAControl" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtFiltraAControl','{0}')", GvDatosAvanceControl.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtFiltraAControl','{0}')", GvDatosAvanceControl.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1375,12 +1345,12 @@
|
||||
<ContentTemplate>
|
||||
|
||||
<div id="dvCaCon" style="width: 100%; top: 30px">
|
||||
<table id="dTable" class="table Widthall ">
|
||||
<table id="dcTable" class="table Widthall ">
|
||||
<tr>
|
||||
<td width="25%" id="TH1" style="font-size: medium; text-align: center!important; background-color: #b9b9b9;"><strong>Clasificación</strong> </td>
|
||||
<td width="10%" id="TH2" style="font-size: medium; text-align: center!important; background-color: #dddddd;"><strong>Contratado</strong> </td>
|
||||
<td width="15%" id="TH3" style="font-size: medium; text-align: center!important; background-color: #b9b9b9;"><strong>Avance</strong> </td>
|
||||
<td width="15%" id="TH4" style="font-size: medium; text-align: center!important; background-color: #dddddd;"><strong>Faltante</strong> </td>
|
||||
<td id="THc1" style="font-size: medium; text-align: center!important; background-color: #b9b9b9;"><strong>Clasificación</strong> </td>
|
||||
<td width="15%" id="THc2" style="font-size: medium; text-align: center!important; background-color: #dddddd;"><strong>Contratado</strong> </td>
|
||||
<td width="20%" id="THc3" style="font-size: medium; text-align: center!important; background-color: #b9b9b9;"><strong>Avance</strong> </td>
|
||||
<td width="20%" id="THc4" style="font-size: medium; text-align: center!important; background-color: #dddddd;"><strong>Faltante</strong> </td>
|
||||
<%-- <td width="15%" id="TH5" style="font-size: medium; text-align: center!important; background-color: #b9b9b9;"><strong>Avance Por Facturar</strong> </td>
|
||||
<td width="10%" id="TH6" style="font-size: medium; text-align: center!important; background-color: #dddddd;"><strong>Anticipo</strong> </td>--%>
|
||||
</tr>
|
||||
@@ -1389,12 +1359,12 @@
|
||||
|
||||
<asp:GridView ID="GvDatosAvanceControl" ClientIDMode="Static" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron datos con los filtros especificados"
|
||||
DataKeyNames="CveClasificacion,CvePS,CodigoPS,Clasificacion,CveContratoDetalle,CveRubro"
|
||||
CssClass="table table-striped table-hover Widthall" BorderColor="#D3D3D3" GridLines="None">
|
||||
CssClass="table table-striped table-hover Widthall" GridLines="None">
|
||||
<Columns>
|
||||
<asp:BoundField HeaderText="Producto/Servicio" DataField="CodigoPS" ItemStyle-Width="30%" />
|
||||
<asp:BoundField HeaderText="Producto/Servicio" DataField="CodigoPS" />
|
||||
|
||||
<asp:BoundField HeaderText="Cantidad" DataField="ContratoCantidad" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:###,###,##0.00##}" ItemStyle-Width="7.5%" />
|
||||
<asp:BoundField HeaderText="Importe $" DataField="ContratoImporte" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:###,###,##0.00##}" ItemStyle-Width="7.5%" />
|
||||
<asp:BoundField HeaderText="Importe $" DataField="ContratoImporte" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:N2}" ItemStyle-Width="7.5%" />
|
||||
|
||||
<asp:TemplateField HeaderText="Cantidad" ItemStyle-Width="7.5%" ItemStyle-CssClass="Derecha">
|
||||
<ItemTemplate>
|
||||
@@ -1403,27 +1373,15 @@
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Importe $" ItemStyle-Width="7.5%" ItemStyle-CssClass="Derecha">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LBAvanceImporte" OnClick="MuestaModalVentasAvanceInterno" Text='<%# Eval("AvanceImporte", "{0:###,###,##0.00##}") %>' runat="server" />
|
||||
<asp:LinkButton ID="LBAvanceImporte" OnClick="MuestaModalVentasAvanceInterno" Text='<%# Eval("AvanceImporte", "{0:N2}") %>' runat="server" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField HeaderText="%" DataField="AvancePorcentaje" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="5%" />
|
||||
|
||||
<asp:BoundField HeaderText="Cantidad" DataField="FaltanteCantidad" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:###,###,##0.00##}" ItemStyle-Width="7.5%" />
|
||||
<asp:BoundField HeaderText="Importe $" DataField="FaltanteImporte" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:###,###,##0.00##}" ItemStyle-Width="7.5%" />
|
||||
<asp:BoundField HeaderText="Importe $" DataField="FaltanteImporte" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:N2}" ItemStyle-Width="7.5%" />
|
||||
<asp:BoundField HeaderText="%" DataField="FaltantePorcentaje" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="5%" />
|
||||
|
||||
<%-- <asp:TemplateField HeaderText="Cantidad" ItemStyle-Width="7.5%" ItemStyle-CssClass="Derecha">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LBAvanceXFacturarCantidad" OnClick="MuestaModalVentasAvance" Text='<%# Eval("AvanceXFacturarCantidad", "{0:###,###,##0.00##}") %>' runat="server" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Importe $" ItemStyle-Width="7.5%" ItemStyle-CssClass="Derecha">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LBAvanceXFacturarImporte" OnClick="MuestaModalVentasAvance" Text='<%# Eval("AvanceXFacturarImporte", "{0:###,###,##0.00##}") %>' runat="server" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField HeaderText="Importe $" DataField="Anticipos" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:###,###,##0.00##}" ItemStyle-Width="10%" />--%>
|
||||
|
||||
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
|
||||
@@ -2897,7 +2855,7 @@
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlRubro" runat="server" CssClass="table-group-action-input form-control input-inline input-sm select2me" Style="width: 100%;" AutoPostBack="true" OnSelectedIndexChanged="DdlRubro_SelectedIndexChanged">
|
||||
<asp:ListItem Value="2">Insumos</asp:ListItem>
|
||||
<asp:ListItem Value="5">Insumos-Indirecto</asp:ListItem>
|
||||
<asp:ListItem Value="5">Indirectos</asp:ListItem>
|
||||
<asp:ListItem Value="3">Mano de Obra</asp:ListItem>
|
||||
<asp:ListItem Value="4">Maquinaria Herramienta Flotilla</asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
@@ -2912,13 +2870,7 @@
|
||||
<asp:RequiredFieldValidator ID="RFVTxtCantidadInsumos" runat="server" ControlToValidate="TxtCantidadInsumos" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cantidad''</b> es necesario, por favor ingréselo." ValidationGroup="GrpAddPSControl"> </asp:RequiredFieldValidator>
|
||||
<label for="<%= TxtCantidadInsumos.ClientID.ToString()%>">Cantidad:</label>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright" runat="server" visible="false" id="DVClasificacion" >
|
||||
<asp:DropDownList ID="DdlClasificacionAddInsumos" runat="server" AutoPostBack="true" DataTextField="Clasificacion" DataValueField="CveClasificacion" CssClass="table-group-action-input form-control input-inline input-sm select2me" Style="width: 100%;"></asp:DropDownList>
|
||||
<label for="<%= DdlClasificacionAddInsumos.ClientID.ToString()%>">Clasificación:</label>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright" runat="server" visible="false" id="DVPS" >
|
||||
<label for="<%= DdlProductowsInsumos.ClientID.ToString()%>">Producto:</label>
|
||||
<ADS:Dropdownlost runat="server" ID="DdlProductowsInsumos" CssStyle="width: 100%;" CssClassDdl="form-control select2me" DataTextField="PSCodigo" DataValueField="CvePS" />
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -2,14 +2,11 @@
|
||||
Option Strict On
|
||||
|
||||
Imports System.Drawing
|
||||
Imports AspMap
|
||||
Imports Extensiones
|
||||
Imports System.Data
|
||||
Imports System.IO
|
||||
Imports System.Text
|
||||
Imports System.Threading
|
||||
Imports AspMap.Web
|
||||
Imports AspMap.Web.Extensions
|
||||
|
||||
Partial Class Contratos_ContratosSecciones
|
||||
Inherits ClsPaginas
|
||||
|
||||
3746
Empresas/166/Formatos/Cotizacion.rdlc
Normal file
3746
Empresas/166/Formatos/Cotizacion.rdlc
Normal file
File diff suppressed because it is too large
Load Diff
6262
Empresas/166/Formatos/Factura.rdlc
Normal file
6262
Empresas/166/Formatos/Factura.rdlc
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -113,7 +113,7 @@ Partial Class GPS_CatEventos
|
||||
If Not Directory.Exists(Path) Then
|
||||
Directory.CreateDirectory(Path)
|
||||
End If
|
||||
Dim directorioNew As String = String.Format("{0}\{1}.{2}", Path, Imagen, ArchivoImagen.Extencion)
|
||||
Dim directorioNew As String = String.Format("{0}\{1}.{2}", Path, Imagen, ArchivoImagen.Extension)
|
||||
If File.Exists(directorioNew) Then
|
||||
My.Computer.FileSystem.DeleteFile(directorioNew)
|
||||
End If
|
||||
@@ -123,7 +123,7 @@ Partial Class GPS_CatEventos
|
||||
If TxtUpSonido.getfiles().Archivos.Count > 0 Then
|
||||
Dim ArchivoSonido As Archivo = TxtUpSonido.getfiles().Archivos(0)
|
||||
Dim PathSonido As String = $"{ModExtensiones.DirectorioBaseEmpresas}Sonidos"
|
||||
Dim dirSonido As String = String.Format("{0}\{1}.{2}", PathSonido, Sonido, ArchivoSonido.Extencion)
|
||||
Dim dirSonido As String = String.Format("{0}\{1}.{2}", PathSonido, Sonido, ArchivoSonido.Extension)
|
||||
If File.Exists(dirSonido) Then
|
||||
My.Computer.FileSystem.DeleteFile(dirSonido)
|
||||
End If
|
||||
|
||||
@@ -139,7 +139,7 @@ Partial Class GPS_DispositivosControles
|
||||
If EsEditar = 0 Then
|
||||
If TxtCalibración.getfiles().Archivos.Count > 0 Then
|
||||
Dim Archivo As Archivo = TxtCalibración.getfiles().Archivos(0)
|
||||
If Archivo.Extencion <> "xls" AndAlso Archivo.Extencion <> "xlsx" Then
|
||||
If Archivo.Extension <> "xls" AndAlso Archivo.Extension <> "xlsx" Then
|
||||
GPS.RollBack()
|
||||
GPS.Dispose()
|
||||
Alert("El archivo de calibración debe de ser un archivo excel.")
|
||||
@@ -156,7 +156,7 @@ Partial Class GPS_DispositivosControles
|
||||
Try
|
||||
Dim Archivo As Archivo = TxtCalibración.getfiles().Archivos(0)
|
||||
Dim Path As String = $"{ModExtensiones.DirectorioBaseEmpresas}TablasCalibracion"
|
||||
Dim dirSonido As String = String.Format("{0}\{1}.{2}", Path, FormatearNombreArchivo(Archivo.filenameO), Archivo.Extencion)
|
||||
Dim dirSonido As String = String.Format("{0}\{1}.{2}", Path, FormatearNombreArchivo(Archivo.filenameO), Archivo.Extension)
|
||||
If File.Exists(dirSonido) Then
|
||||
My.Computer.FileSystem.DeleteFile(dirSonido)
|
||||
End If
|
||||
@@ -211,7 +211,7 @@ Partial Class GPS_DispositivosControles
|
||||
ElseIf EsEditar = 1 Then
|
||||
If TxtCalibración.getfiles().Archivos.Count > 0 Then
|
||||
Dim Archivo As Archivo = TxtCalibración.getfiles().Archivos(0)
|
||||
If Archivo.Extencion <> "xls" AndAlso Archivo.Extencion <> "xlsx" Then
|
||||
If Archivo.Extension <> "xls" AndAlso Archivo.Extension <> "xlsx" Then
|
||||
GPS.RollBack()
|
||||
GPS.Dispose()
|
||||
Alert("El archivo de calibración debe de ser un archivo excel.")
|
||||
@@ -227,7 +227,7 @@ Partial Class GPS_DispositivosControles
|
||||
If Not huboerror Then
|
||||
Dim Archivo As Archivo = TxtCalibración.getfiles().Archivos(0)
|
||||
Dim Path As String = $"{ModExtensiones.DirectorioBaseEmpresas}TablasCalibracion"
|
||||
Dim dirSonido As String = String.Format("{0}\{1}.{2}", Path, FormatearNombreArchivo(Archivo.filenameO), Archivo.Extencion)
|
||||
Dim dirSonido As String = String.Format("{0}\{1}.{2}", Path, FormatearNombreArchivo(Archivo.filenameO), Archivo.Extension)
|
||||
If File.Exists(dirSonido) Then
|
||||
My.Computer.FileSystem.DeleteFile(dirSonido)
|
||||
End If
|
||||
|
||||
@@ -94,7 +94,7 @@ Partial Class GPS_DispositivosControles
|
||||
If EsEditar = 0 Then
|
||||
If TxtCalibración.getfiles().Archivos.Count > 0 Then
|
||||
Dim Archivo As Archivo = TxtCalibración.getfiles().Archivos(0)
|
||||
If Archivo.Extencion <> "xls" AndAlso Archivo.Extencion <> "xlsx" Then
|
||||
If Archivo.Extension <> "xls" AndAlso Archivo.Extension <> "xlsx" Then
|
||||
GPS.RollBack()
|
||||
GPS.Dispose()
|
||||
Alert("El archivo de calibración debe de ser un archivo excel.")
|
||||
@@ -161,7 +161,7 @@ Partial Class GPS_DispositivosControles
|
||||
If Not huboerror Then
|
||||
Dim Archivo As Archivo = TxtCalibración.getfiles().Archivos(0)
|
||||
Dim Path As String = $"{AppDomain.CurrentDomain.BaseDirectory}TablasCalibracion"
|
||||
Dim dirSonido As String = String.Format("{0}\{1}.{2}", Path, FormatearNombreArchivo(Archivo.filenameO), Archivo.Extencion)
|
||||
Dim dirSonido As String = String.Format("{0}\{1}.{2}", Path, FormatearNombreArchivo(Archivo.filenameO), Archivo.Extension)
|
||||
If File.Exists(dirSonido) Then
|
||||
My.Computer.FileSystem.DeleteFile(dirSonido)
|
||||
End If
|
||||
|
||||
@@ -777,7 +777,7 @@ public partial class GPS_WizardDispositivos : ClsPaginas
|
||||
{
|
||||
Archivo Archivo = TxtCalibracion.getfiles().Archivos[0];
|
||||
string Path = $"{ModExtensiones.DirectorioBaseEmpresas}TablasCalibracion";
|
||||
string dirSonido = string.Format(@"{0}\{1}.{2}", Path, FormatearNombreArchivo(Archivo.filenameO), Archivo.Extencion);
|
||||
string dirSonido = string.Format(@"{0}\{1}.{2}", Path, FormatearNombreArchivo(Archivo.filenameO), Archivo.Extension);
|
||||
if (File.Exists(dirSonido)) { File.Delete(dirSonido); }
|
||||
File.Move(Archivo.FileUrl, dirSonido);
|
||||
SpreadsheetInfo.SetLicense(ModExtensiones.SerialGemBoxSpreadsheet());
|
||||
|
||||
@@ -19,9 +19,9 @@ Partial Class General_SaldosIniciales
|
||||
If TxtExcel.getfiles().Archivos.Count > 0 Then
|
||||
Dim file As Archivo = TxtExcel.getfiles().Archivos(0)
|
||||
|
||||
Dim Directorio As String = Server.MapPath("~") & file.patch
|
||||
Dim Directorio As String = Server.MapPath("~") & file.path
|
||||
|
||||
Dim Tipo As String = If(file.Extencion.Contiene("xlsx", "xlsx", "xlsm", "xlsb"), "EXCEL", "CSV")
|
||||
Dim Tipo As String = If(file.Extension.Contiene("xlsx", "xlsx", "xlsm", "xlsb"), "EXCEL", "CSV")
|
||||
CargarArchivo(Directorio, file.filename, Tipo)
|
||||
Else
|
||||
Alert("No existe el archivo.Favor de subir un archivo csv o excel a la plataforma", TipoMensaje.MsgError)
|
||||
|
||||
@@ -325,8 +325,8 @@ Partial Class Inventarios_AjustesSeccionAlmacen
|
||||
Protected Sub BtnCargaExcel_Click(sender As Object, e As EventArgs) Handles BtnCargaExcel.Click
|
||||
If TxtExcel.getfiles().Archivos.Count > 0 Then
|
||||
Dim file As Archivo = TxtExcel.getfiles().Archivos(0)
|
||||
Dim Directorio As String = AppDomain.CurrentDomain.BaseDirectory & file.patch
|
||||
Dim Tipo As String = If(file.Extencion.Contiene("xlsx", "xlsx", "xlsm", "xlsb"), "EXCEL", "")
|
||||
Dim Directorio As String = AppDomain.CurrentDomain.BaseDirectory & file.path
|
||||
Dim Tipo As String = If(file.Extension.Contiene("xlsx", "xlsx", "xlsm", "xlsb"), "EXCEL", "")
|
||||
If Tipo = "EXCEL" Then
|
||||
Dim CveAlmacen As Integer = DdlAlmacenExcel.SelectedValue.ToEntero()
|
||||
Dim CveSubProyecto As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto", $"CveAlmacen={CveAlmacen}")
|
||||
|
||||
@@ -4724,8 +4724,8 @@ Partial Class Inventarios_EntradasSalidas
|
||||
If DdlAlmacen.SelectedValue.ToEntero > 0 Then
|
||||
If TxtExcel.getfiles().Archivos.Count > 0 Then
|
||||
Dim file As Archivo = TxtExcel.getfiles().Archivos(0)
|
||||
Dim Directorio As String = AppDomain.CurrentDomain.BaseDirectory & file.patch
|
||||
Dim Tipo As String = If(file.Extencion.Contiene("xlsx", "xlsx", "xlsm", "xlsb", "xls"), "EXCEL", "CSV")
|
||||
Dim Directorio As String = AppDomain.CurrentDomain.BaseDirectory & file.path
|
||||
Dim Tipo As String = If(file.Extension.Contiene("xlsx", "xlsx", "xlsm", "xlsb", "xls"), "EXCEL", "CSV")
|
||||
CargarArchivo(Directorio, file.filename, Tipo)
|
||||
Else
|
||||
Alert("No existe el archivo. Favor de subir un archivo excel a la plataforma.", TipoMensaje.MsgError)
|
||||
|
||||
@@ -124,10 +124,17 @@
|
||||
<div class="modal-body">
|
||||
<asp:UpdatePanel ID="UpBodyInventarioFisico" UpdateMode="Conditional" runat="server">
|
||||
<ContentTemplate>
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtTitulo" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="50"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVTitulos" runat="server" CssClass="help-block errorimput" ControlToValidate="TxtTitulo" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Titulo''</b> es necesario, por favor ingréselo." ValidationGroup="GrpObligatorio"></asp:RequiredFieldValidator>
|
||||
<label for="<%= TxtTitulo.ClientID.ToString()%>">Titulo:</label>
|
||||
<div class="row">
|
||||
<div class="col-md-10">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtTitulo" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="50"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVTitulos" runat="server" CssClass="help-block errorimput" ControlToValidate="TxtTitulo" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Titulo''</b> es necesario, por favor ingréselo." ValidationGroup="GrpObligatorio"></asp:RequiredFieldValidator>
|
||||
<label for="<%= TxtTitulo.ClientID.ToString()%>">Titulo:</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<asp:CheckBox runat="server" ID="chkUsarApp" AutoPostBack="true" Text="Usar en App:"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtObservaciones" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="500"></asp:TextBox>
|
||||
@@ -402,7 +409,65 @@
|
||||
<asp:BoundField DataField="RazonSocial" HeaderText="Proveedor" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center" HeaderText="Comandos">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="imgD" runat="server" AlternateText="Eliminar" CausesValidation="False" OnClick="DeleteProveedor_Click" CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="Confirmar" data-btn-ok-label="si" />
|
||||
<asp:LinkButton ID="imgD" runat="server" AlternateText="Eliminar" CausesValidation="False" OnClick="DeleteProveedor_Click" CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="Confirmar" data-btn-ok-label="si"/>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6" runat="server" id="divUsuarios" >
|
||||
<div class="portlet light xspadding bordered" id="idUsuarios">
|
||||
<div class="portlet-title">
|
||||
<div class="caption font-green">
|
||||
<i class="icon-pin font-green"></i>
|
||||
<span class="caption-subject bold uppercase">Usuarios</span>
|
||||
</div>
|
||||
<div class="tools">
|
||||
<a href="javascript:;" class="collapse"></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body">
|
||||
<asp:UpdatePanel ID="upUsuarios" UpdateMode="Conditional" runat="server">
|
||||
<ContentTemplate>
|
||||
<div class="row">
|
||||
<div class="col-md-10">
|
||||
<label for="<%= DdlUsuarios.ClientID.ToString()%>">Usuarios:</label>
|
||||
<asp:DropDownList ID="DdlUsuarios" CssClass="form-control select2me" runat="server" DataTextField="Nombre" DataValueField="CveUsuario" Width="100%">
|
||||
</asp:DropDownList>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-2" style="margin-top:20px;">
|
||||
<asp:Button for="DdlUsuarios" ID="btnAddUsuarios" runat="server" CssClass="btn btn-primary btn-sm" Text="+" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<asp:GridView ID="gvUsuarios" runat="server" GridLines="None" DataKeyNames="CveUsuario, Nombre, Cerrado, Bloqueado" CssClass="table table-striped table-advance table-hover Widthall mysmallbtn ScrollAD" data-heightfijo="150" data-height="150" Width="380px" AutoGenerateColumns="False" EmptyDataText="">
|
||||
<Columns>
|
||||
<asp:BoundField DataField="Nombre" HeaderText="Usuarios" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center" HeaderText="Comandos">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="imgD" runat="server" AlternateText="Eliminar" OnClick="DeleteUsurios_Click" CausesValidation="False" CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="Confirmar" data-btn-ok-label="si" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center" HeaderText="Bloqueado">
|
||||
<ItemTemplate>
|
||||
<asp:CheckBox ID="chkBloqueado" runat="server" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center" HeaderText="Cerrado">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="imgCerrar" runat="server" AlternateText="Cerrar" OnClick="imgCerrar_Click" CausesValidation="False" CssClass="btn black" Text="<i class='fa fa-lock'></i>" data-toggle="confirmation" data-popout="true" data-original-title="Confirmar" data-btn-ok-label="si" style="padding-left: 7px;padding-bottom: 1px;padding-top: 1px;padding-right: 7px; color:black;"/>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
|
||||
@@ -32,6 +32,16 @@ Partial Class Inventarios_InventarioFisico
|
||||
ViewState("tDTProv") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property tDTUsuario As DataTable
|
||||
Get
|
||||
Return If(IsNothing(ViewState("tDTUsuario")), Nothing, CType(ViewState("tDTUsuario"), DataTable))
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
ViewState("tDTUsuario") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property tDTClasifExcluye As DataTable
|
||||
Get
|
||||
Return If(IsNothing(ViewState("tDTClasifExcluye")), Nothing, CType(ViewState("tDTClasifExcluye"), DataTable))
|
||||
@@ -78,10 +88,12 @@ Partial Class Inventarios_InventarioFisico
|
||||
CargDdlProveedor()
|
||||
CargaDdlProductosServicios()
|
||||
CargDdlAlmacen()
|
||||
CargaDdlUsuarios()
|
||||
CreaTmpClasificaciones()
|
||||
CreaTmpProductosServicios()
|
||||
CreaTmpAlmacen()
|
||||
CreaTmpProveedores()
|
||||
CreaTmpUsuario()
|
||||
CargaDatos(UsuarioActual.CveEmpresa)
|
||||
|
||||
End If
|
||||
@@ -145,6 +157,16 @@ Partial Class Inventarios_InventarioFisico
|
||||
GvProveedor.DataBind()
|
||||
UpProveedor.Update()
|
||||
End Sub
|
||||
|
||||
Private Sub CargaGvUsuarios()
|
||||
Dim ObjInventario As New ClsInventarios()
|
||||
If ObjInventario.GetInventarioFisicoDetallesUsuarios(HdnID.Value, UsuarioActual.CveEmpresa) Then
|
||||
gvUsuarios.DataSource = ObjInventario.DtResultados.FiltraParametros("Incluye = 1")
|
||||
End If
|
||||
ObjInventario.Dispose()
|
||||
gvUsuarios.DataBind()
|
||||
upUsuarios.Update()
|
||||
End Sub
|
||||
Private Sub CargaDdlSubProyectos()
|
||||
CargarCentrosDeCosto(Nothing, DdlSubProyecto, Nothing, LblSubProyecto)
|
||||
CargarCentrosDeCosto(Nothing, DdlFiltroSubProyecto, Nothing, LblFiltroSubProyecto)
|
||||
@@ -191,6 +213,15 @@ Partial Class Inventarios_InventarioFisico
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub CargaDdlUsuarios()
|
||||
Dim FiltroAD() As String = {"CveUsuario", "Usuario", "Nombre", "Contraseña", "CveEmpresa", "Rol", "Correo", "Empresa", "CveRol"}
|
||||
DdlUsuarios.DataSource = GlobalDTUsuarios.FiltraParametros(String.Format("CveEmpresa = {0} AND Estatus =1", UsuarioActual.CveEmpresa), "Rol ASC", FiltroAD)
|
||||
DdlUsuarios.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
DdlUsuarios.DataBind()
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
@@ -352,6 +383,7 @@ Partial Class Inventarios_InventarioFisico
|
||||
tDTProv.Columns.Add("Incluye", GetType(Integer))
|
||||
End Sub
|
||||
|
||||
|
||||
Protected Sub DeleteProveedor_Click(sender As Object, e As EventArgs)
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
tDTProv.Rows(GvRow.RowIndex.ToEntero).Delete()
|
||||
@@ -361,6 +393,69 @@ Partial Class Inventarios_InventarioFisico
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
#Region "USUARIOS"
|
||||
|
||||
Private Sub btnAddUsuarios_Click(sender As Object, e As EventArgs) Handles btnAddUsuarios.Click
|
||||
If DdlUsuarios.SelectedValue = -1 Then
|
||||
Alert("Tienes seleccionada la opcion 'Todos'.", TipoMensaje.MsgInformacion)
|
||||
GvPS.DataSource = Nothing
|
||||
GvPS.DataBind()
|
||||
tDTPS.Rows.Clear()
|
||||
Else
|
||||
Dim Row As DataRow = Nothing
|
||||
Row = tDTUsuario.NewRow
|
||||
Row("CveUsuario") = DdlUsuarios.SelectedValue.ToEntero
|
||||
Row("Nombre") = DdlUsuarios.SelectedItem.ToString
|
||||
Row("Cerrado") = False
|
||||
Row("Bloqueado") = False
|
||||
|
||||
tDTUsuario.Rows.Add(Row)
|
||||
gvUsuarios.DataSource = tDTUsuario
|
||||
gvUsuarios.DataBind()
|
||||
upUsuarios.Update()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub CreaTmpUsuario()
|
||||
tDTUsuario = New DataTable
|
||||
tDTUsuario.Columns.Add("CveUsuario", GetType(Integer))
|
||||
tDTUsuario.Columns.Add("Nombre", GetType(String))
|
||||
tDTUsuario.Columns.Add("Incluye", GetType(Integer))
|
||||
tDTUsuario.Columns.Add("Cerrado", GetType(Boolean))
|
||||
tDTUsuario.Columns.Add("Bloqueado", GetType(Boolean))
|
||||
|
||||
End Sub
|
||||
|
||||
Public Sub DeleteUsurios_Click(sender As Object, e As EventArgs)
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
tDTUsuario.Rows(GvRow.RowIndex.ToEntero).Delete()
|
||||
gvUsuarios.DataSource = tDTUsuario
|
||||
gvUsuarios.DataBind()
|
||||
upUsuarios.Update()
|
||||
End Sub
|
||||
|
||||
Public Sub imgCerrar_Click(sender As Object, e As EventArgs)
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
Dim Estado As Boolean = Convert.ToBoolean(tDTUsuario.Rows(GvRow.RowIndex.ToEntero).Item(3))
|
||||
If Estado Then
|
||||
tDTUsuario.Rows(GvRow.RowIndex.ToEntero).Item(3) = False
|
||||
Else
|
||||
tDTUsuario.Rows(GvRow.RowIndex.ToEntero).Item(3) = True
|
||||
End If
|
||||
Dim ObjInventario As New ClsInventarios()
|
||||
Dim CveUsuario As Integer = tDTUsuario.Rows(GvRow.RowIndex.ToEntero).Item(0).ToString().ToEntero()
|
||||
Dim Cerrado As Boolean = Convert.ToBoolean(tDTUsuario.Rows(GvRow.RowIndex.ToEntero).Item(3))
|
||||
Dim Bloqueado As Boolean = Convert.ToBoolean(tDTUsuario.Rows(GvRow.RowIndex.ToEntero).Item(4))
|
||||
|
||||
ObjInventario.UpdateInventarioFisicoUsuarios(HdnID.Value, CveUsuario, Cerrado, Bloqueado)
|
||||
gvUsuarios.DataSource = tDTUsuario
|
||||
gvUsuarios.DataBind()
|
||||
upUsuarios.Update()
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "INVENTARIO FISICO"
|
||||
Public Sub Delete_Click(sender As Object, e As EventArgs)
|
||||
Dim ObjInventario As New ClsInventarios()
|
||||
@@ -383,12 +478,16 @@ Partial Class Inventarios_InventarioFisico
|
||||
DdlPSExcluye.ddl.SelectedValueExist(-1)
|
||||
DdlClasificacion.SelectedValueExist(-1)
|
||||
DdlClasificacionExcluida.SelectedValueExist(-1)
|
||||
DdlUsuarios.SelectedValueExist(-1)
|
||||
|
||||
tDTUsuario.Rows.Clear()
|
||||
tDTClasif.Rows.Clear()
|
||||
tDTClasifExcluye.Rows.Clear()
|
||||
tDTPS.Rows.Clear()
|
||||
tDTPSExcluye.Rows.Clear()
|
||||
tALM.Rows.Clear()
|
||||
gvUsuarios.DataSource = Nothing
|
||||
gvUsuarios.DataBind()
|
||||
GvAlmacen.DataSource = Nothing
|
||||
GvAlmacen.DataBind()
|
||||
GvClasificacion.DataSource = Nothing
|
||||
@@ -411,11 +510,13 @@ Partial Class Inventarios_InventarioFisico
|
||||
CargaGvClasificacion()
|
||||
CargaGvProductosServicios()
|
||||
CargaGvProveedores()
|
||||
CargaGvUsuarios()
|
||||
tDTClasif = GvClasificacion.DataSource
|
||||
tDTClasifExcluye = GvClasificacionExcluida.DataSource
|
||||
tDTPS = GvPS.DataSource
|
||||
tDTPSExcluye = GvPSExcluye.DataSource
|
||||
tDTProv = GvProveedor.DataSource
|
||||
tDTUsuario = gvUsuarios.DataSource
|
||||
tALM = GvAlmacen.DataSource
|
||||
UpAddInventarioFisico.Update()
|
||||
RegistraScript(String.Format("$('#{0}').modal('show');", "divAddInventarioFisico"))
|
||||
@@ -434,12 +535,13 @@ Partial Class Inventarios_InventarioFisico
|
||||
tDTClasifExcluye.Rows.Clear()
|
||||
tALM.Rows.Clear()
|
||||
tDTProv.Rows.Clear()
|
||||
tDTUsuario.Rows.Clear()
|
||||
End If
|
||||
|
||||
DdlProductosServicios.ddl.SelectedValueExist(-1)
|
||||
DdlPSExcluye.ddl.SelectedValueExist(-1)
|
||||
DdlProveedor.ddl.SelectedValueExist(-1)
|
||||
|
||||
DdlUsuarios.SelectedValueExist(-1)
|
||||
DdlClasificacion.SelectedValueExist(-1)
|
||||
DdlClasificacionExcluida.SelectedValueExist(-1)
|
||||
|
||||
@@ -461,6 +563,8 @@ Partial Class Inventarios_InventarioFisico
|
||||
GvPSExcluye.DataBind()
|
||||
GvProveedor.DataSource = Nothing
|
||||
GvProveedor.DataBind()
|
||||
gvUsuarios.DataSource = Nothing
|
||||
gvUsuarios.DataBind()
|
||||
UpAddInventarioFisico.Update()
|
||||
RegistraScript("$('#divAddInventarioFisico').modal('show');")
|
||||
|
||||
@@ -524,6 +628,16 @@ Partial Class Inventarios_InventarioFisico
|
||||
|
||||
End If
|
||||
|
||||
If ErrorClasif = False Then
|
||||
For Each Gvr As GridViewRow In gvUsuarios.Rows
|
||||
If Not ObjInventario.AddInventarioFisicoUsuarios(HdnID.Value, Gvr.DataKey("CveUsuario").ToEntero, True, False, False) Then
|
||||
ErrorClasif = True
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
|
||||
End If
|
||||
|
||||
If ErrorClasif = False And CveInventarioFisico > 0 Then
|
||||
ObjInventario.Commit()
|
||||
Alert("Agregado Correctamente.", TipoMensaje.MsgInformacion)
|
||||
@@ -556,6 +670,10 @@ Partial Class Inventarios_InventarioFisico
|
||||
ErrorClasif = True
|
||||
End If
|
||||
|
||||
If Not ObjInventario.RemoveInventarioFisicoUsuarios(HdnID.Value) Then
|
||||
ErrorClasif = True
|
||||
End If
|
||||
|
||||
If ErrorClasif = False Then
|
||||
For Each Gvr As GridViewRow In GvAlmacen.Rows
|
||||
If Not ObjInventario.AddInventarioFisicoAlmacenes(HdnID.Value, Gvr.DataKey("CveAlmacen").ToEntero) Then
|
||||
@@ -606,6 +724,21 @@ Partial Class Inventarios_InventarioFisico
|
||||
|
||||
End If
|
||||
|
||||
If ErrorClasif = False Then
|
||||
Dim cerrado As Boolean = False
|
||||
Dim bloqueado As Boolean = False
|
||||
|
||||
For Each Gvr As GridViewRow In gvUsuarios.Rows
|
||||
cerrado = Convert.ToBoolean(Gvr.DataKey("Cerrado").ToString)
|
||||
bloqueado = Gvr.FCCheckBox("chkBloqueado").Checked
|
||||
|
||||
If Not ObjInventario.AddInventarioFisicoUsuarios(HdnID.Value, Gvr.DataKey("CveUsuario").ToEntero, True, cerrado, bloqueado) Then
|
||||
ErrorClasif = True
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
|
||||
End If
|
||||
|
||||
If ErrorClasif = False And HdnID.Value > 0 Then
|
||||
ObjInventario.Commit()
|
||||
@@ -634,9 +767,24 @@ Partial Class Inventarios_InventarioFisico
|
||||
|
||||
End If
|
||||
End Sub
|
||||
Protected Sub gvUsuarios_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles gvUsuarios.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
If Convert.ToBoolean(e.Row.DBCampo("Bloqueado")) Then
|
||||
e.Row.FCCheckBox("chkBloqueado").Checked = True
|
||||
End If
|
||||
If Convert.ToBoolean(e.Row.DBCampo("Cerrado")) Then
|
||||
e.Row.FCLinkButton("imgCerrar").Text = "<i class='fa fa-lock'></i>"
|
||||
Else
|
||||
e.Row.FCLinkButton("imgCerrar").Text = "<i class='fa fa-unlock'></i>"
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
#Region "ALMACEN"
|
||||
Public Sub DeleteAlmacen_Click(sender As Object, e As EventArgs)
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
@@ -689,4 +837,13 @@ Partial Class Inventarios_InventarioFisico
|
||||
|
||||
#End Region
|
||||
|
||||
Protected Sub chkUsarApp_CheckedChanged(sender As Object, e As EventArgs) Handles chkUsarApp.CheckedChanged
|
||||
|
||||
If chkUsarApp.Checked Then
|
||||
divUsuarios.Visible = True
|
||||
Else
|
||||
divUsuarios.Visible = False
|
||||
End If
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
@@ -369,9 +369,14 @@
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvIFD.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
<div style="display: inline-block;" id="SumFiltra"></div>
|
||||
</div>
|
||||
<asp:GridView ID="GvIFD" ClientIDMode="Static" runat="server" EmptyDataText="Aun no hay registros." AutoGenerateColumns="False" GridLines="None" DataKeyNames="CveInventarioFisicoDetalle, CvePS, SerieLote, Lote, FechaCaducidad, Cantidad, CveUnidadMedida" ShowHeaderWhenEmpty="True" CssClass="table table-striped table-hover Widthall">
|
||||
<asp:GridView ID="GvIFD" ClientIDMode="Static" runat="server" EmptyDataText="Aun no hay registros." AutoGenerateColumns="False" GridLines="None" DataKeyNames="CveInventarioFisicoDetalle, CvePS, SerieLote, Lote, FechaCaducidad, Cantidad, CveUnidadMedida, AplicaSerie, AplicaLote, AplicaCaducidad" ShowHeaderWhenEmpty="True" CssClass="table table-striped table-hover Widthall">
|
||||
<Columns>
|
||||
<asp:BoundField HeaderText="Fecha" DataField="FechaInvFisico" DataFormatString="{0:g}"></asp:BoundField>
|
||||
<asp:TemplateField HeaderText="Fecha" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:Literal runat="server" ID="ltlFecha" Text='<%#Eval("FechaInvFisico")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<HeaderStyle Width="160px"/>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField HeaderText="Código Barras" DataField="CodigoBarras" ItemStyle-HorizontalAlign="Left"></asp:BoundField>
|
||||
<asp:BoundField HeaderText="Código" DataField="Codigo" ItemStyle-HorizontalAlign="Left"></asp:BoundField>
|
||||
<asp:BoundField HeaderText="Producto" DataField="PS" ItemStyle-HorizontalAlign="Left"></asp:BoundField>
|
||||
@@ -380,15 +385,15 @@
|
||||
<asp:BoundField HeaderText="Lote" DataField="Lote" ItemStyle-HorizontalAlign="Left" Visible="false"></asp:BoundField>
|
||||
<asp:BoundField HeaderText="Fecha Caducidad" DataField="FechaCaducidad" ItemStyle-HorizontalAlign="Left" Visible="false" DataFormatString="{0:d}"></asp:BoundField>
|
||||
<asp:BoundField HeaderText="Cantidad" DataField="Cantidad" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right"></asp:BoundField>
|
||||
<asp:TemplateField HeaderText="Editar" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LnkEditar" OnClick="LnkEditar_Click" runat="server" AlternateText="Editar" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-pencil'></i>" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Eliminar" ItemStyle-HorizontalAlign="Center">
|
||||
<asp:BoundField HeaderText="Mal Estado" DataField="MalEstado" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right"></asp:BoundField>
|
||||
<asp:BoundField HeaderText="No Vendible" DataField="NoVendible" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right"></asp:BoundField>
|
||||
|
||||
<asp:TemplateField HeaderText="Comandos" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LnkEditar" OnClick="LnkEditar_Click" runat="server" AlternateText="Editar" CssClass="btn btn-circle btn-xs green" Text="<i class='fa fa-pencil'></i>" />
|
||||
<asp:LinkButton ID="imgD" runat="server" AlternateText="Eliminar" CausesValidation="False" CommandName="Delete" CssClass="btn btn-circle btn-xs red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="¿Estas seguro que desea eliminar el registro?" data-btn-ok-label="si" />
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Center"/>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
|
||||
@@ -296,10 +296,14 @@ Partial Class Inventarios_InventarioFisicoDetalle
|
||||
Dim Inventario As New ClsInventarios
|
||||
If Inventario.GetInventarioFisicoDetalle(CveInventarioFisico, ddlUsuario.SelectedValue.ToString.ToEntero) Then
|
||||
If Inventario.DtResultados.Rows.Count > 0 Then
|
||||
GvIFD.Columns(1).Visible = Inventario.DtResultados.MAX("CodigoBarras") <> ""
|
||||
GvIFD.Columns(4).Visible = Inventario.DtResultados.MAX("CveSeccionAlmacen", "CveSeccionAlmacen IS NOT NULL").ToEntero > 0
|
||||
GvIFD.Columns(5).Visible = Inventario.DtResultados.MAX("SerieLote") <> ""
|
||||
GvIFD.Columns(6).Visible = Inventario.DtResultados.MAX("Lote") <> ""
|
||||
GvIFD.Columns(7).Visible = Inventario.DtResultados.MAX("FechaCaducidad", "FechaCaducidad IS NOT NULL").ToDate > MinFecha
|
||||
GvIFD.Columns(9).Visible = Inventario.DtResultados.MAX("MalEstado", "MalEstado IS NOT NULL").ToEntero > 0
|
||||
GvIFD.Columns(10).Visible = Inventario.DtResultados.MAX("NoVendible", "NoVendible IS NOT NULL").ToEntero > 0
|
||||
|
||||
GvIFD.DataSource = Inventario.DtResultados '.AsEnumerable.OrderByDescending(Function(k) k!CveInventarioFisicoDetalle).Take(500).CopyToDataTable
|
||||
Else
|
||||
GvIFD.DataSource = Nothing
|
||||
@@ -648,15 +652,19 @@ Partial Class Inventarios_InventarioFisicoDetalle
|
||||
Private Sub LnkExcelUniverso_Click(sender As Object, e As EventArgs) Handles LnkExcelUniverso.Click
|
||||
Dim IncluyePS, ExcluyePS, IncluyeClasificacion, ExcluyeClasificacion, IncluyeProveedor As New StringBuilder
|
||||
Dim ObjInventario As New ClsInventarios
|
||||
|
||||
Dim DtPS As DataTable
|
||||
If ObjInventario.GetInventarioFisicoUniversoProductos(CveInventarioFisico, UsuarioActual.CveEmpresa) Then
|
||||
|
||||
If ObjInventario.DtResultados.Rows.Count > 0 Then
|
||||
DtPS = ObjInventario.DtResultados.FiltraParametros("", "", {"Codigo", "PS", "Clasificacion", "RazonSocial"})
|
||||
Else
|
||||
Alert("Error al consultar la informacion")
|
||||
End If
|
||||
End If
|
||||
Dim NombreArchivo As String
|
||||
SpreadsheetInfo.SetLicense(ModExtensiones.SerialGemBoxSpreadsheet)
|
||||
Dim workbook As New ExcelFile()
|
||||
Dim worksheet = workbook.Worksheets.Add("Productos")
|
||||
worksheet.InsertDataTable(ObjInventario.DtResultados, New InsertDataTableOptions() With
|
||||
worksheet.InsertDataTable(DtPS, New InsertDataTableOptions() With
|
||||
{
|
||||
.ColumnHeaders = True,
|
||||
.StartRow = 0,
|
||||
@@ -726,9 +734,13 @@ Partial Class Inventarios_InventarioFisicoDetalle
|
||||
HfCvePS.Value = GvRow.DataKey("CvePS").ToString
|
||||
HfCveUM.Value = GvRow.DataKey("CveUnidadMedida").ToString
|
||||
|
||||
TxtSerieLote.Text = GvRow.DataKey("SerieLote").ToString
|
||||
TxtLoteEdit.Text = GvRow.DataKey("Lote").ToString
|
||||
TxtFechaCaducida.Text = GvRow.DataKey("FechaCaducidad").ToString
|
||||
TxtSerieLote.Text = If(Convert.ToBoolean(GvRow.DataKey("AplicaSerie").ToString), GvRow.DataKey("SerieLote").ToString, "")
|
||||
TxtLoteEdit.Text = If(Convert.ToBoolean(GvRow.DataKey("AplicaLote").ToString), GvRow.DataKey("Lote").ToString, "")
|
||||
TxtFechaCaducida.Text = If(Convert.ToBoolean(GvRow.DataKey("AplicaCaducidad").ToString), If(GvRow.DataKey("FechaCaducidad").ToString <> "", GvRow.DataKey("FechaCaducidad").ToString.ToDate.ToShortDateString, ""), "")
|
||||
|
||||
TxtSerieLote.Enabled = Convert.ToBoolean(GvRow.DataKey("AplicaSerie").ToString)
|
||||
TxtLoteEdit.Enabled = Convert.ToBoolean(GvRow.DataKey("AplicaLote").ToString)
|
||||
TxtFechaCaducida.Enabled = Convert.ToBoolean(GvRow.DataKey("AplicaCaducidad").ToString)
|
||||
TxtCantidad.Text = GvRow.DataKey("Cantidad").ToString
|
||||
UpEditarPS.Update()
|
||||
|
||||
|
||||
@@ -371,8 +371,8 @@ Partial Class Inventarios_KardexAlmacen
|
||||
Protected Sub BtnAgregarProyeccion_Click(sender As Object, e As EventArgs)
|
||||
If TxtProyeccionExcel.getfiles().Archivos.Count > 0 Then
|
||||
Dim file As Archivo = TxtProyeccionExcel.getfiles().Archivos(0)
|
||||
Dim Directorio As String = Server.MapPath("~") & file.patch
|
||||
Dim Tipo As String = If(file.Extencion.Contiene("xlsx", "xlsx", "xlsm", "xlsb"), "EXCEL", "CSV")
|
||||
Dim Directorio As String = Server.MapPath("~") & file.path
|
||||
Dim Tipo As String = If(file.Extension.Contiene("xlsx", "xlsx", "xlsm", "xlsb"), "EXCEL", "CSV")
|
||||
CargarArchivo(Directorio, file.filename, Tipo)
|
||||
Else
|
||||
Alert("No existe el archivo.Favor de subir un archivo csv o excel a la plataforma", TipoMensaje.MsgError)
|
||||
|
||||
@@ -304,6 +304,50 @@
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<label style="font-size: 16px"><b>Productos Coincidentes</b></label>
|
||||
<div class="row">
|
||||
<div class="col-md-4" align="left" id="div1" runat="server">
|
||||
<asp:Label runat="server">Número de registros: <b><asp:Literal ID="LtlCoincidentes" runat="server"></asp:Literal></b></asp:Label>
|
||||
</div>
|
||||
<div class="col-md-8" align="right" id="divRegistradosCoinciden" runat="server">
|
||||
<input type="text" id="TxtBusqueda3" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda3','{0}')", GvC.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda3','{0}')", GvS.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<asp:GridView ID="GvC" data-sort="true" runat="server" EmptyDataText="Aun no hay registros." AutoGenerateColumns="False"
|
||||
CssClass="table table-striped table-hover Widthall ScrollAD" Style="text-align: center;" GridLines="None" DataKeyNames="CvePS">
|
||||
<Columns>
|
||||
<asp:TemplateField Visible="false">
|
||||
<HeaderTemplate>
|
||||
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="#">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LblC" runat="server" Font-Size="6pt"></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField HeaderText="Código Barras" DataField="CodigoBarras" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="Código" DataField="Codigo" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="Producto" DataField="PS" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="Sección Almacén" DataField="SeccionAlmacen"/>
|
||||
<asp:BoundField HeaderText="Serie" DataField="Serie" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="Lote" DataField="Lote" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="Fecha Caducidad" DataField="FechaCaducidad" ItemStyle-HorizontalAlign="Left" DataFormatString="{0:d}" />
|
||||
<asp:BoundField HeaderText="Existencia" DataField="CantidadAlmacen" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="Inv. Físico" DataField="CantidadInventarioFisico" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="Diferencia" DataField="Diferencia" DataFormatString="{0:#,###.##}" ItemStyle-Font-Bold="true" />
|
||||
<asp:BoundField HeaderText="Costo" DataField="Costo" DataFormatString="{0:#,##0.00}" ItemStyle-HorizontalAlign="Right" />
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<br />
|
||||
|
||||
@@ -82,7 +82,7 @@ Partial Class Inventarios_RepAnomalias
|
||||
dt = Inventario.DtResultados
|
||||
End If
|
||||
Else
|
||||
If Inventario.GetInventarioFisicoResultados(CveInventarioFisico, UsuarioActual.CveEmpresa) Then
|
||||
If Inventario.GetInventarioFisicoResultados(CveInventarioFisico, UsuarioActual.CveEmpresa, DdlGPO.SelectedValue.ToString.ToEntero) Then
|
||||
dt = Inventario.DtResultados
|
||||
End If
|
||||
End If
|
||||
@@ -155,7 +155,7 @@ Partial Class Inventarios_RepAnomalias
|
||||
If Inventario.GetInventarioFisicoDetallesProveedores(CveInventarioFisico, UsuarioActual.CveEmpresa) Then
|
||||
Dim dta As DataTable = Inventario.DtResultados
|
||||
Dim str As New StringBuilder
|
||||
If dta IsNot Nothing AndAlso dt.Rows.Count > 0 Then
|
||||
If dta IsNot Nothing AndAlso dta.Rows.Count > 0 Then
|
||||
|
||||
For Each dr As DataRow In dta.FiltraParametros("Incluye = 1").Rows
|
||||
str.AppendFormat("{0},", dr("RazonSocial"))
|
||||
@@ -187,6 +187,11 @@ Partial Class Inventarios_RepAnomalias
|
||||
GvF.DataBind()
|
||||
BanderaSerieLoteCad(GvF, DtF)
|
||||
|
||||
Dim DtC As DataTable = dt.FiltraParametros("Diferencia = 0")
|
||||
GvC.DataSource = DtC
|
||||
GvC.DataBind()
|
||||
BanderaSerieLoteCad(GvC, DtC)
|
||||
|
||||
Dim Script = ""
|
||||
If (GvF.Rows.Count > 0) Then
|
||||
GvF.UseAccessibleHeader = True
|
||||
@@ -204,6 +209,14 @@ Partial Class Inventarios_RepAnomalias
|
||||
LtlTotalRegistrosSobran.Text = GvS.Rows.Count.ToString
|
||||
End If
|
||||
|
||||
If (GvC.Rows.Count > 0) Then
|
||||
GvC.UseAccessibleHeader = True
|
||||
GvC.HeaderRow.TableSection = TableRowSection.TableHeader
|
||||
Script += "OrdenarGVS();"
|
||||
divRegistradosCoinciden.Visible = True
|
||||
LtlCoincidentes.Text = GvC.Rows.Count.ToString
|
||||
End If
|
||||
|
||||
PSIguales()
|
||||
RegistraScript(Script)
|
||||
|
||||
@@ -260,9 +273,9 @@ Partial Class Inventarios_RepAnomalias
|
||||
'End Sub
|
||||
|
||||
Private Sub LnkPDF_Click(sender As Object, e As EventArgs) Handles LnkPDF.Click
|
||||
ImprimirbytesPDF(Impimir, Formato:="PDF")
|
||||
ImprimirbytesPDF(Imprimir, Formato:="PDF")
|
||||
End Sub
|
||||
Protected Function Impimir() As Byte()
|
||||
Protected Function Imprimir() As Byte()
|
||||
Dim retorno As Byte() = Nothing
|
||||
|
||||
Dim Archivo As New System.IO.FileInfo(String.Format("{0}Formatos/RepAnomalias.rdlc", UsuarioActual.Empresa.Ruta))
|
||||
@@ -325,10 +338,12 @@ Partial Class Inventarios_RepAnomalias
|
||||
#End Region
|
||||
|
||||
Private Sub BanderaSerieLoteCad(Gv As GridView, resultado As DataTable)
|
||||
Gv.Columns(5).Visible = resultado.MAX("CveSeccionAlmacen").ToEntero > 0
|
||||
Gv.Columns(6).Visible = resultado.MAX("Serie") <> ""
|
||||
Gv.Columns(7).Visible = resultado.MAX("Lote") <> ""
|
||||
Gv.Columns(8).Visible = resultado.MAX("FechaCaducidad").ToDate > MinFecha
|
||||
If resultado IsNot Nothing Then
|
||||
Gv.Columns(5).Visible = resultado.MAX("CveSeccionAlmacen").ToEntero > 0
|
||||
Gv.Columns(6).Visible = resultado.MAX("Serie") <> ""
|
||||
Gv.Columns(7).Visible = resultado.MAX("Lote") <> ""
|
||||
Gv.Columns(8).Visible = resultado.MAX("FechaCaducidad").ToDate > MinFecha
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub LnkCrear_Click(sender As Object, e As EventArgs) Handles LnkCrear.Click
|
||||
|
||||
@@ -363,7 +363,7 @@ Partial Class Inventarios_RepMaximoMinimo
|
||||
Dim fileItem As Archivo = If(continuar, Filesgral(0), Nothing)
|
||||
|
||||
If continuar Then
|
||||
Dim FileExtension As String = fileItem.Extencion.ToUpper()
|
||||
Dim FileExtension As String = fileItem.Extension.ToUpper()
|
||||
|
||||
If FileExtension = "XLS" Or FileExtension = "XLSX" Or FileExtension = "CSV" Then
|
||||
Else
|
||||
|
||||
@@ -921,8 +921,8 @@ Partial Class Inventarios_TrasladoSolicitud
|
||||
Protected Sub BtnCargaExcel_Click(sender As Object, e As EventArgs) Handles BtnCargaExcel.Click
|
||||
If TxtExcel.getfiles().Archivos.Count > 0 Then
|
||||
Dim file As Archivo = TxtExcel.getfiles().Archivos(0)
|
||||
Dim Directorio As String = ModExtensiones.DirectorioBaseEmpresas & file.patch
|
||||
Dim Tipo As String = If(file.Extencion.Contiene("xlsx", "xlsx", "xlsm", "xlsb"), "EXCEL", "CSV")
|
||||
Dim Directorio As String = ModExtensiones.DirectorioBaseEmpresas & file.path
|
||||
Dim Tipo As String = If(file.Extension.Contiene("xlsx", "xlsx", "xlsm", "xlsb"), "EXCEL", "CSV")
|
||||
CargarArchivo(Directorio, file.filename, Tipo)
|
||||
Else
|
||||
Alert("No existe el archivo.Favor de subir un archivo csv o excel a la plataforma", TipoMensaje.MsgError)
|
||||
|
||||
@@ -2817,7 +2817,7 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
Protected Sub BtnCargaExcelConceptos_Click(sender As Object, e As EventArgs)
|
||||
If TxtExcelConceptos.getfiles().Archivos.Count > 0 Then
|
||||
Dim file As Archivo = TxtExcelConceptos.getfiles().Archivos(0)
|
||||
Dim Directorio As String = AppDomain.CurrentDomain.BaseDirectory & file.patch
|
||||
Dim Directorio As String = AppDomain.CurrentDomain.BaseDirectory & file.path
|
||||
CargarArchivoConceptos(Directorio, file.filename)
|
||||
RegistraScript("$('#DivCargaExcelConceptos').modal('hide');")
|
||||
Else
|
||||
|
||||
@@ -31,7 +31,7 @@ public partial class MF_CargaLayout : ClsPaginas
|
||||
|
||||
protected void BtnCargaArchivo_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (TxtArchivo.getfiles().Archivos.Count > 0)
|
||||
if (TxtArchivo.getfiles().Archivos.Count > 0)
|
||||
{
|
||||
|
||||
var File = TxtArchivo.getfiles().Archivos[0];
|
||||
|
||||
@@ -4,6 +4,14 @@
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
<style>
|
||||
|
||||
.chkChoice input
|
||||
{
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
</style>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
@@ -11,9 +19,59 @@
|
||||
Catálogo de periodos
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
<asp:UpdatePanel ID="UppAddAcciones" runat="server">
|
||||
<ContentTemplate>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkAddPeriodo" runat="server" Text="Agregar"><i class="fa fa-plus-circle"></i> Agregar</asp:LinkButton>
|
||||
</li>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
<asp:UpdatePanel ID="UpFiltros" runat="server" RenderMode="Inline" ViewStateMode="Inherit" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="portlet solid grey-cascade portlet-filter" style="">
|
||||
<div class="portlet-title portlet-filterT smalltitle " style="">
|
||||
<div class="tools">
|
||||
<asp:Button ID="BtnConsultar" runat="server" Text="Consultar" class="btn btn-primary" />
|
||||
</div>
|
||||
<div class="titlefiltros caption">
|
||||
<div class="row">
|
||||
<div class="col-md-1 truncate">Tipo Periodo:</div>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlTipoPeriodo" CssClass="select2me form-control" Width="80%" runat="server" AppendDataBoundItems="true" DataTextField="TipoPeriodo" DataValueField="CveTipoPeriodo" ValidationGroup="GrpGuardar">
|
||||
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVTipoPeriodo" runat="server" ControlToValidate="DdlTipoPeriodo" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo de Período''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpConsultar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOTipoPeriodo" runat="server" HighlightCssClass="vco" TargetControlID="RFVTipoPeriodo" Width="100px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
|
||||
<div class="col-md-1 truncate">Ejercicio:</div>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlEjercicio" DataTextField="Ejercicio" DataValueField="Ejercicio" CssClass="form-control input-sm select2me" runat="server">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
|
||||
<div class="col-md-1 truncate">Estatus:</div>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlEstatus" CssClass="select2me form-control" runat="server" AppendDataBoundItems="true" DataTextField="Estatus" DataValueField="CveEstatus" Width="80%" ValidationGroup="GrpConsutar">
|
||||
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
|
||||
<asp:ListItem Text="Actual" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Cerrado" Value="2"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body" style="display: none;">
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<div class="portlet light xspadding bordered " id="pnldl">
|
||||
<div class="portlet-title">
|
||||
<div class="caption ">
|
||||
@@ -129,97 +187,10 @@
|
||||
<th style="width: 10px;" colspan="2">Comandos</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tr class="ADtr">
|
||||
<th>
|
||||
<asp:DropDownList ID="DdlTipoPeriodo" CssClass="select2me form-control" Width="100%" runat="server" AppendDataBoundItems="true" DataTextField="TipoPeriodo" DataValueField="CveTipoPeriodo" ValidationGroup="GrpGuardar">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVTipoPeriodo" runat="server" ControlToValidate="DdlTipoPeriodo" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo de Período''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOTipoPeriodo" runat="server" HighlightCssClass="vco" TargetControlID="RFVTipoPeriodo" Width="100px"></ajax:ValidatorCalloutExtender>
|
||||
</th>
|
||||
<th>
|
||||
<asp:TextBox ID="TxtEjercicio" runat="server" CausesValidation="true" MaxLength="70" ValidationGroup="GrpGuardar" Width="70px" Enabled="false"></asp:TextBox>
|
||||
<%--<asp:RequiredFieldValidator ID="RFVEjercicio" runat="server" ControlToValidate="TxtEjercicio" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo de Período''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEjercicio" runat="server" HighlightCssClass="vco" TargetControlID="RFVEjercicio" Width="300px"></ajax:ValidatorCalloutExtender>--%>
|
||||
</th>
|
||||
<th>
|
||||
<asp:TextBox ID="TxtMes" runat="server" CausesValidation="true" MaxLength="70" ValidationGroup="GrpGuardar" Width="70px" Enabled="false"></asp:TextBox>
|
||||
<%--<asp:RequiredFieldValidator ID="RFVMes" runat="server" ControlToValidate="TxtMes" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo de Período''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCMes" runat="server" HighlightCssClass="vco" TargetControlID="RFVMes" Width="300px"></ajax:ValidatorCalloutExtender>--%>
|
||||
</th>
|
||||
<th>
|
||||
<asp:TextBox ID="TxtNumero" runat="server" CausesValidation="true" MaxLength="70" ValidationGroup="GrpGuardar" Width="70px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVNumero" runat="server" ControlToValidate="TxtNumero" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo de Período''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCNumero" runat="server" HighlightCssClass="vco" TargetControlID="RFVNumero" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</th>
|
||||
<th>
|
||||
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 110px !important; padding: 0px; margin-bottom: -10px;">
|
||||
<asp:TextBox ID="TxtFechaInicio" runat="server" CssClass="form-control" CausesValidation="true" Width="100%" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="ImgFechaInicio2" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
</div>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaInicio" runat="server" TargetControlID="TxtFechaInicio" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="CEFechaInicio" TargetControlID="TxtFechaInicio" PopupButtonID="ImgFechaInicio2" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="RFVFechaInicio" runat="server" ControlToValidate="TxtFechaInicio" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''FechaInicio''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<asp:CompareValidator ID="CVFechaInicio" runat="server" ControlToValidate="TxtFechaInicio" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''FechaInicio''</b> no tiene el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpGuardar"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOFechaInicio1" runat="server" HighlightCssClass="vco" TargetControlID="RFVFechaInicio" Width="3100px"></ajax:ValidatorCalloutExtender>
|
||||
|
||||
<ajax:ValidatorCalloutExtender ID="VCOFechaInicio2" runat="server" HighlightCssClass="vco" TargetControlID="CVFechaInicio" Width="3100px"></ajax:ValidatorCalloutExtender>
|
||||
|
||||
</th>
|
||||
<th>
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 110px !important; padding: 0px; margin-bottom: -10px;">
|
||||
<asp:TextBox ID="TxtFechaFin" runat="server" CssClass="form-control" CausesValidation="true" Width="100%" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="ImgFechaFin2" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
</div>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaFin" runat="server" TargetControlID="TxtFechaFin" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="CEFechaFin" TargetControlID="TxtFechaFin" PopupButtonID="ImgFechaFin2" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="RFVFechaFin" runat="server" ControlToValidate="TxtFechaFin" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''FechaFin''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<asp:CompareValidator ID="CVFechaFin" runat="server" ControlToValidate="TxtFechaFin" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''FechaFin''</b> no tiene el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpGuardar"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOFechaFin1" runat="server" HighlightCssClass="vco" TargetControlID="RFVFechaFin" Width="3100px"></ajax:ValidatorCalloutExtender>
|
||||
|
||||
<ajax:ValidatorCalloutExtender ID="VCOFechaFin2" runat="server" HighlightCssClass="vco" TargetControlID="CVFechaFin" Width="3100px"></ajax:ValidatorCalloutExtender>
|
||||
|
||||
</th>
|
||||
<th style="text-align: center">
|
||||
<asp:CheckBox ID="ChkEsInicioMes" runat="server" />
|
||||
</th>
|
||||
<th style="text-align: center">
|
||||
<asp:CheckBox ID="ChkEsFinMes" runat="server" />
|
||||
</th>
|
||||
<th style="text-align: center">
|
||||
<asp:CheckBox ID="ChkEsInicioSS" runat="server" />
|
||||
</th>
|
||||
<th style="text-align: center">
|
||||
<asp:CheckBox ID="ChkEsFinSS" runat="server" />
|
||||
</th>
|
||||
<th style="text-align: center">
|
||||
<asp:CheckBox ID="ChkEsInicioAño" runat="server" />
|
||||
</th>
|
||||
<th style="text-align: center">
|
||||
<asp:CheckBox ID="ChkEsFinAño" runat="server" />
|
||||
</th>
|
||||
<th style="text-align: center">
|
||||
<asp:CheckBox ID="ChkFueCalculado" runat="server" />
|
||||
</th>
|
||||
<th>
|
||||
<asp:DropDownList ID="DdlEstatus" CssClass="select2me form-control" runat="server" AppendDataBoundItems="true" DataTextField="Estatus" DataValueField="CveEstatus" Width="90px" ValidationGroup="GrpGuardar">
|
||||
<asp:ListItem Selected="True" Text="" Value="0"></asp:ListItem>
|
||||
<asp:ListItem Text="Actual" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Cerrado" Value="2"></asp:ListItem>
|
||||
|
||||
</asp:DropDownList>
|
||||
</th>
|
||||
<th style="text-align: center" colspan="2">
|
||||
<asp:LinkButton ID="LbAgregar" runat="server" CausesValidation="true" CssClass="btn btn-primary" Text="Agregar" ValidationGroup="GrpGuardar"></asp:LinkButton></th>
|
||||
</tr>
|
||||
</table>
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CvePeriodo" CssClass="table table-striped table-advance table-hover mysmallbtn ScrollAD Widthall GvDatos" data-tableheader=".tableheader"
|
||||
EmptyDataText="No se encontraron Tipo de Periodo Registrados" ToolTip="Listado de Tipo de Periodo" Style="margin-top: -10px;" GridLines="None" data-rows="0" ShowHeader="false">
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CvePeriodo, CveTipoPeriodo, Ejercicio, Numero, FechaInicio,FechaFin, EsInicioMes, EsFinMes, EsInicioSS, EsFinSS, EsInicioAño, EsFinAño, FueCalculado, Estatus"
|
||||
CssClass="table table-striped table-advance table-hover mysmallbtn ScrollAD Widthall GvDatos" data-tableheader=".tableheader" EmptyDataText="No se encontraron Tipo de Periodo Registrados" ToolTip="Listado de Tipo de Periodo"
|
||||
Style="margin-top: -10px;" GridLines="None" data-rows="0" ShowHeader="false">
|
||||
<Columns>
|
||||
<asp:TemplateField ItemStyle-Width="250px">
|
||||
<ItemTemplate>
|
||||
@@ -341,8 +312,6 @@
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:DropDownList ID="DdlEstatus" runat="server" CssClass="select2me form-control" AppendDataBoundItems="true" DataTextField="Estatus" Width="90px" ValidationGroup="GrpGuardar">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
<asp:ListItem Text="" Value="0"></asp:ListItem>
|
||||
<asp:ListItem Text="Actual" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Cerrado" Value="2"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
@@ -359,15 +328,9 @@
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>--%>
|
||||
<asp:TemplateField HeaderText="Editar" ItemStyle-Width="10px">
|
||||
<EditItemTemplate>
|
||||
<div style="width: 100%; text-align: center;">
|
||||
<asp:LinkButton CssClass="btn btn-circle btn-sm green mysmallbtn" Text="<i class='fa fa-check'></i>" ID="imgU" runat="server" AlternateText="Actualizar" CausesValidation="True" CommandName="Update" ValidationGroup="GrpGV"></asp:LinkButton>
|
||||
<asp:LinkButton CssClass="btn btn-circle btn-sm red mysmallbtn" Text="<i class='fa fa-ban'></i>" ID="imgC" runat="server" AlternateText="Cancelar" CausesValidation="False" CommandName="Cancel"></asp:LinkButton>
|
||||
</div>
|
||||
</EditItemTemplate>
|
||||
<ItemTemplate>
|
||||
<div style="width: 100%; text-align: center;">
|
||||
<asp:LinkButton ID="imgE" CssClass="btn btn-circle btn-sm blue mysmallbtn" Text="<i class='fa fa-pencil'></i>" runat="server" AlternateText="Editar" CausesValidation="False" CommandName="Edit"></asp:LinkButton>
|
||||
<asp:LinkButton ID="LnkEditar" OnClick="LnkEditar_Click" runat="server" AlternateText="Editar" CssClass="btn btn-circle btn-xs green" Text="<i class='fa fa-pencil'></i>" />
|
||||
</div>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
@@ -386,6 +349,121 @@
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
<div id="divAddPeriodo" class="modal ADS fade" role="dialog">
|
||||
<div class="modal-dialog modal" id="modal">
|
||||
<asp:UpdatePanel ID="UpAddInventarioFisico" class="modal-content rowpadding" tabindex="-1" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
<h4 class="modal-title" id="myModalLabel" runat="server"><asp:Label runat="server" ID="lblTiulomodal" Text="Agregar Periodo"></asp:Label></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<asp:UpdatePanel ID="UpModalPerido" UpdateMode="Conditional" runat="server">
|
||||
<ContentTemplate>
|
||||
<br />
|
||||
<div class="row">
|
||||
<div class="col-xs-2" style="text-align: left">Concepto:</div>
|
||||
<div class="col-xs-4">
|
||||
<asp:DropDownList ID="DdlTipoPeriodoAdd" CssClass="select2me form-control" runat="server" DataValueField="CveTipoPeriodo" DataTextField="TipoPeriodo" Width="100%"></asp:DropDownList>
|
||||
<asp:HiddenField runat="server" ID="hdnCvePerido" Value=""/>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
<div class="row">
|
||||
<div class="col-xs-2" style="text-align: left;">
|
||||
Numero:
|
||||
</div>
|
||||
<div class="col-xs-4">
|
||||
<asp:TextBox ID="TxtNumeroAdd" runat="server" CssClass=" form-control input-sm" CausesValidation="true" MaxLength="70" ValidationGroup="GrpGuardar" Width="100%"></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
<div class="row">
|
||||
<div class="col-xs-2" style="text-align: left; padding-top: 10px;">
|
||||
Fecha Inicio:
|
||||
</div>
|
||||
<div class="col-xs-4">
|
||||
<div class="input-group input-sm input-small date date-picker" data-date-format="dd/mm/yyyy" style="padding-left: 0px;">
|
||||
<asp:TextBox ID="TxtFechaInicioAdd" runat="server" CssClass="form-control" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton runat="server" ID="ImgCalendarioInicio" class="btn default"><i class="fa fa-calendar"></i></asp:LinkButton>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<ajax:MaskedEditExtender ID="MEEFechaInicioAdd" runat="server" TargetControlID="TxtFechaInicioAdd" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender ID="CalendarioInicio" runat="server" TargetControlID="TxtFechaInicioAdd" PopupButtonID="ImgCalendarioInicio" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="RFVFechaDocumentoInicio" runat="server" ControlToValidate="TxtFechaInicioAdd" Display="None" ErrorMessage="El campo <b>''FechaDocumento''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<asp:CompareValidator ID="CVFechaDocumentoInicio" runat="server" ControlToValidate="TxtFechaInicioAdd" Display="None" ErrorMessage="El campo <b>''FechaDocumento''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpGuardar"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOFechaDocumento1Inicio" runat="server" HighlightCssClass="vco" TargetControlID="RFVFechaDocumentoInicio" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOFechaDocumento2Inicio" runat="server" HighlightCssClass="vco" TargetControlID="CVFechaDocumentoInicio" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
<div class="col-xs-2" style="text-align: left; padding-top: 10px;">
|
||||
Fecha Fin:
|
||||
</div>
|
||||
<div class="col-xs-4">
|
||||
<div class="input-group input-sm input-small date date-picker" data-date-format="dd/mm/yyyy">
|
||||
<asp:TextBox ID="TxtFechaFinAdd" runat="server" CssClass="form-control" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton runat="server" ID="ImgCalendarioFin" class="btn default"><i class="fa fa-calendar"></i></asp:LinkButton>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<ajax:MaskedEditExtender ID="MEEFechaFinAdd" runat="server" TargetControlID="TxtFechaFinAdd" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender ID="CalendarioFin" runat="server" TargetControlID="TxtFechaFinAdd" PopupButtonID="ImgCalendarioFin" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="RFVFechaDocumentoFin" runat="server" ControlToValidate="TxtFechaFinAdd" Display="None" ErrorMessage="El campo <b>''FechaDocumento''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<asp:CompareValidator ID="CVFechaDocumentoFin" runat="server" ControlToValidate="TxtFechaFinAdd" Display="None" ErrorMessage="El campo <b>''FechaDocumento''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpGuardar"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOFechaDocumento1Fin" runat="server" HighlightCssClass="vco" TargetControlID="RFVFechaDocumentoFin" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOFechaDocumento2Fin" runat="server" HighlightCssClass="vco" TargetControlID="CVFechaDocumentoFin" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<asp:CheckBoxList ID="CBLchk" RepeatDirection="Horizontal" RepeatColumns="4" runat="server" CssClass="chkChoice" Width="100%">
|
||||
<asp:ListItem Text=" Incio Mes" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text=" Fin Mes" Value="2"></asp:ListItem>
|
||||
<asp:ListItem Text=" Inicio SS" Value="3"></asp:ListItem>
|
||||
<asp:ListItem Text=" Fin SS" Value="4"></asp:ListItem>
|
||||
<asp:ListItem Text=" Inicio Año" Value="5"></asp:ListItem>
|
||||
<asp:ListItem Text=" Fin Año" Value="6"></asp:ListItem>
|
||||
<asp:ListItem Text=" Calculado" Value="7"></asp:ListItem>
|
||||
</asp:CheckBoxList>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<br />
|
||||
<div class="row">
|
||||
<div class="col-xs-2" style="text-align: left;">
|
||||
Numero:
|
||||
</div>
|
||||
<div class="col-xs-4">
|
||||
<asp:DropDownList ID="DdlEstatusAdd" runat="server" CssClass="select2me form-control" AppendDataBoundItems="true" DataTextField="Estatus" Width="100%" ValidationGroup="GrpGuardar">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
<asp:ListItem Text="Actual" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Cerrado" Value="2"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="modal-footer">
|
||||
<asp:UpdatePanel ID="UpFooter" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:LinkButton ID="BtnAgregar" runat="server" CssClass="btn btn-primary" ValidationGroup="GrpObligatorio"> <i class='material-icons'>done_all</i> Guardar</asp:LinkButton>
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Cancelar</button>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
<script>function ADSBegin() { FiltrarTablaV2('.TxtBusqueda', '.GvDatos') }</script>
|
||||
|
||||
@@ -7,25 +7,33 @@ Imports Extensiones
|
||||
|
||||
Partial Class Nomina_CatPeriodos
|
||||
Inherits ClsPaginas
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
Private Property Comando As String
|
||||
Get
|
||||
Return ViewState("Comando").ToString
|
||||
End Get
|
||||
Set(value As String)
|
||||
ViewState("Comando") = value
|
||||
End Set
|
||||
End Property
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
ViewState("Orden") = ""
|
||||
CargaDatos()
|
||||
CargaTipoPeriodo()
|
||||
CargaTipoPeriodo()
|
||||
cargaEjercicios()
|
||||
CargaDatos()
|
||||
|
||||
''Permiso Registro
|
||||
'If PermisoRegistro Then
|
||||
' LbAgregar.Enabled = True
|
||||
'Else
|
||||
' LbAgregar.Enabled = False
|
||||
'End If
|
||||
End If
|
||||
''Permiso Registro
|
||||
'If PermisoRegistro Then
|
||||
' LbAgregar.Enabled = True
|
||||
'Else
|
||||
' LbAgregar.Enabled = False
|
||||
'End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Public Sub CargaDatos()
|
||||
Dim ObjNom_Periodos As New ClsNominas
|
||||
If ObjNom_Periodos.GetPeriodos(-1, UsuarioActual.CveEmpresa, Now.Year, -1, -1) Then
|
||||
If ObjNom_Periodos.GetPeriodos(DdlTipoPeriodo.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, DdlEjercicio.SelectedValue.ToEntero, -1, -1, DdlEstatus.SelectedValue.ToEntero) Then
|
||||
ViewState("DTNom_Periodos") = ObjNom_Periodos.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||
GlobalDTNom_Periodos = ObjNom_Periodos.DtResultados
|
||||
|
||||
@@ -42,44 +50,27 @@ Partial Class Nomina_CatPeriodos
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub LbAgregar_Click(sender As Object, e As System.EventArgs) Handles LbAgregar.Click
|
||||
Dim ObjNom_Periodos As New ClsNominas
|
||||
Dim Numero As Integer = TxtNumero.Text.Trim.ToEntero
|
||||
Dim EsInicioMes As Boolean = ChkEsInicioMes.Checked
|
||||
Dim EsFinMes As Boolean = ChkEsFinMes.Checked
|
||||
Dim EsInicioSS As Boolean = CBool(ChkEsInicioSS.Checked)
|
||||
Dim EsFinSS As Boolean = ChkEsFinSS.Checked
|
||||
Dim EsInicioAño As Boolean = ChkEsInicioAño.Checked
|
||||
Dim EsFinAño As Boolean = ChkEsFinAño.Checked
|
||||
Dim FueCalculado As Boolean = ChkFueCalculado.Checked
|
||||
Dim FechaInicio As Date = TxtFechaInicio.Text.Trim.ToDate
|
||||
Dim FechaFin As Date = TxtFechaFin.Text.Trim.ToDate
|
||||
Dim Mes As Integer = FechaFin.Month
|
||||
Dim Ejercicio As Integer = FechaFin.Year
|
||||
Dim CveTipoPeriodo As Integer = DdlTipoPeriodo.SelectedValue.ToEntero
|
||||
Dim Estatus As Integer = DdlEstatus.SelectedValue.ToEntero
|
||||
|
||||
If ObjNom_Periodos.AddPeriodo(CveTipoPeriodo, Ejercicio, Mes, Numero, FechaInicio, FechaFin, EsInicioMes, EsFinMes, ChkEsInicioSS.Checked, ChkEsFinAño.Checked, ChkEsInicioAño.Checked, ChkEsFinAño.Checked, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
||||
|
||||
Alert("El nuevo Periodo se guardó correctamente.", TipoMensaje.MsgInformacion)
|
||||
UpDatos.Update()
|
||||
ViewState("DTNom_Periodos") = ObjNom_Periodos.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||
GlobalDTNom_Periodos = ObjNom_Periodos.DtResultados
|
||||
CargaDatos()
|
||||
If String.IsNullOrEmpty(ViewState("Orden").ToString()) Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGrid("")
|
||||
End If
|
||||
|
||||
End If
|
||||
'ObjNom_Periodos.Dispose()
|
||||
End Sub
|
||||
|
||||
#Region " C O M B O S"
|
||||
Private Sub CargaTipoPeriodo()
|
||||
DdlTipoPeriodo.DataSource = GlobalDTTipoPeriodo
|
||||
DdlTipoPeriodoAdd.DataSource = GlobalDTTipoPeriodo
|
||||
|
||||
DdlTipoPeriodo.DataBind()
|
||||
DdlTipoPeriodoAdd.DataBind()
|
||||
End Sub
|
||||
|
||||
Private Sub cargaEjercicios()
|
||||
Dim ObjNom_Periodos As New ClsNominas
|
||||
If ObjNom_Periodos.GetEjercicios(UsuarioActual.CveEmpresa) Then
|
||||
DdlEjercicio.DataSource = ObjNom_Periodos.DtResultados
|
||||
Else
|
||||
DdlEjercicio.DataSource = Nothing
|
||||
End If
|
||||
ObjNom_Periodos.Dispose()
|
||||
DdlEjercicio.DataBind()
|
||||
DdlEjercicio.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
@@ -120,12 +111,23 @@ Partial Class Nomina_CatPeriodos
|
||||
e.Row.Cells(12).HorizontalAlign = HorizontalAlign.Center
|
||||
e.Row.Cells(13).HorizontalAlign = HorizontalAlign.Center
|
||||
e.Row.Cells(14).HorizontalAlign = HorizontalAlign.Center
|
||||
If e.Row.RowState = DataControlRowState.Edit OrElse e.Row.RowState = 5 Then
|
||||
e.Row.FCDropDownList("DdlTipoPeriodo").DataSource = GlobalDTTipoPeriodo
|
||||
e.Row.FCDropDownList("DdlTipoPeriodo").DataBind()
|
||||
e.Row.FCDropDownList("DdlTipoPeriodo").SelectedValue = e.Row.DBCampo("CveTipoPeriodo")
|
||||
e.Row.FCDropDownList("DdlEstatus").SelectedItem.Text = e.Row.DBCampo("Estatus")
|
||||
|
||||
e.Row.FCCheckBox("ChkEsInicioMes").Checked = Convert.ToBoolean(e.Row.DataKey("EsInicioMes").ToString)
|
||||
e.Row.FCCheckBox("ChkEsFinMes").Checked = Convert.ToBoolean(e.Row.DataKey("EsFinMes").ToString)
|
||||
e.Row.FCCheckBox("ChkEsInicioSS").Checked = Convert.ToBoolean(e.Row.DataKey("EsInicioSS").ToString)
|
||||
e.Row.FCCheckBox("ChkEsFinSS").Checked = Convert.ToBoolean(e.Row.DataKey("EsFinSS").ToString)
|
||||
e.Row.FCCheckBox("ChkEsInicioAño").Checked = Convert.ToBoolean(e.Row.DataKey("EsInicioAño").ToString)
|
||||
e.Row.FCCheckBox("ChkEsFinAño").Checked = Convert.ToBoolean(e.Row.DataKey("EsFinAño").ToString)
|
||||
e.Row.FCCheckBox("ChkFueCalculado").Checked = Convert.ToBoolean(e.Row.DataKey("FueCalculado").ToString)
|
||||
|
||||
If e.Row.DataKey("Estatus").ToString.ToEntero = 1 Then
|
||||
e.Row.FCLiteral("LtlEstatus").Text = "Actual"
|
||||
ElseIf e.Row.DataKey("Estatus").ToString.ToEntero = 2 Or e.Row.DataKey("Estatus").ToString.ToEntero = 3 Then
|
||||
e.Row.FCLiteral("LtlEstatus").Text = "Cerrado"
|
||||
Else
|
||||
e.Row.FCLiteral("LtlEstatus").Text = ""
|
||||
End If
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -156,51 +158,7 @@ Partial Class Nomina_CatPeriodos
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub GvDatos_RowUpdating(sender As Object, e As System.Web.UI.WebControls.GridViewUpdateEventArgs) Handles GvDatos.RowUpdating
|
||||
Dim ObjNom_Periodos As New ClsNominas
|
||||
Dim Numero As Integer = DirectCast(GvDatos.Rows(e.RowIndex).FindControl("TxtNumero"), TextBox).Text.Trim.ToEntero
|
||||
Dim EsInicioMes As Boolean = GvDatos.Rows(e.RowIndex).FCCheckBox("ChkEsInicioMes").Checked
|
||||
Dim EsFinMes As Boolean = GvDatos.Rows(e.RowIndex).FCCheckBox("ChkEsFinMes").Checked
|
||||
Dim EsInicioSS As Boolean = GvDatos.Rows(e.RowIndex).FCCheckBox("ChkEsInicioSS").Checked
|
||||
Dim EsFinSS As Boolean = GvDatos.Rows(e.RowIndex).FCCheckBox("ChkEsFinSS").Checked
|
||||
Dim EsInicioAño As Boolean = GvDatos.Rows(e.RowIndex).FCCheckBox("ChkEsInicioAño").Checked
|
||||
Dim EsFinAño As Boolean = GvDatos.Rows(e.RowIndex).FCCheckBox("ChkEsFinAño").Checked
|
||||
Dim FueCalculado As Boolean = GvDatos.Rows(e.RowIndex).FCCheckBox("ChkFueCalculado").Checked
|
||||
Dim FechaInicio As Date = DirectCast(GvDatos.Rows(e.RowIndex).FindControl("TxtFechaInicio"), TextBox).Text.Trim.ToDateTime
|
||||
Dim FechaFin As Date = DirectCast(GvDatos.Rows(e.RowIndex).FindControl("TxtFechaFin"), TextBox).Text.Trim.ToDateTime
|
||||
Dim Mes As Integer = FechaFin.Month
|
||||
Dim Ejercicio As Integer = FechaFin.Year
|
||||
Dim CveTipoPeriodo As Integer = DirectCast(GvDatos.Rows(e.RowIndex).FindControl("DdlTipoPeriodo"), DropDownList).SelectedValue.ToEntero
|
||||
Dim Estatus As Integer = DirectCast(GvDatos.Rows(e.RowIndex).FindControl("DdlEstatus"), DropDownList).SelectedValue.ToEntero
|
||||
|
||||
Dim CvePeriodo As Integer = GvDatos.DataKeys(e.RowIndex).Value.ToString.ToEntero
|
||||
|
||||
If ObjNom_Periodos.UpdatePeriodo(FechaInicio, FechaFin, EsInicioMes, EsFinMes, EsInicioSS, EsFinSS, EsInicioAño, EsFinAño, FueCalculado,
|
||||
CveTipoPeriodo, Ejercicio, Mes, Numero, Estatus, CvePeriodo, UsuarioActual.CveEmpresa) Then
|
||||
GvDatos.EditIndex = -1
|
||||
ViewState("DTNom_Periodos") = ObjNom_Periodos.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||
GlobalDTNom_Periodos = ObjNom_Periodos.DtResultados
|
||||
Alert("Los cambios se guardaron correctamente.", TipoMensaje.MsgInformacion)
|
||||
End If
|
||||
|
||||
ObjNom_Periodos.Dispose()
|
||||
|
||||
If ViewState("Orden").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGrid("")
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub GvDatos_RowEditing(sender As Object, e As System.Web.UI.WebControls.GridViewEditEventArgs) Handles GvDatos.RowEditing
|
||||
GvDatos.EditIndex = e.NewEditIndex
|
||||
If ViewState("Orden").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGrid("")
|
||||
End If
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
#Region "O R D E N A M I E N T O"
|
||||
@@ -239,4 +197,151 @@ Partial Class Nomina_CatPeriodos
|
||||
UpDatos.Update()
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
Private Sub LnkAddPeriodo_Click(sender As Object, e As EventArgs) Handles LnkAddPeriodo.Click
|
||||
LimpiarModal()
|
||||
Comando = "Agregar"
|
||||
lblTiulomodal.Text = "Agregar Periodo"
|
||||
RegistraScript("$('#divAddPeriodo').modal('show');")
|
||||
End Sub
|
||||
Protected Sub BtnAgregar_Click(sender As Object, e As System.EventArgs) Handles BtnAgregar.Click
|
||||
Dim ObjNom_Periodos As New ClsNominas
|
||||
|
||||
Dim EsInicioMes As Boolean
|
||||
Dim EsFinMes As Boolean
|
||||
Dim EsInicioSS As Boolean
|
||||
Dim EsFinSS As Boolean
|
||||
Dim EsInicioAño As Boolean
|
||||
Dim EsFinAño As Boolean
|
||||
Dim FueCalculado As Boolean
|
||||
Dim Numero As Integer = TxtNumeroAdd.Text.Trim.ToEntero
|
||||
Dim FechaInicio As Date = TxtFechaInicioAdd.Text.Trim.ToDate
|
||||
Dim FechaFin As Date = TxtFechaFinAdd.Text.Trim.ToDate
|
||||
Dim Mes As Integer = FechaFin.Month
|
||||
Dim Ejercicio As Integer = FechaFin.Year
|
||||
Dim CveTipoPeriodo As Integer = DdlTipoPeriodoAdd.SelectedValue.ToEntero
|
||||
Dim Estatus As Integer = DdlEstatusAdd.SelectedValue.ToEntero
|
||||
Dim CvePeriodo As Integer = hdnCvePerido.Value.ToEntero
|
||||
|
||||
For Each item As ListItem In CBLchk.Items
|
||||
Select Case item.Value.ToEntero()
|
||||
Case 1
|
||||
If item.Selected Then EsInicioMes = True Else EsInicioMes = False
|
||||
Case 2
|
||||
If item.Selected Then EsFinMes = True Else EsFinMes = False
|
||||
Case 3
|
||||
If item.Selected Then EsInicioSS = True Else EsInicioSS = False
|
||||
Case 4
|
||||
If item.Selected Then EsFinSS = True Else EsFinSS = False
|
||||
Case 5
|
||||
If item.Selected Then EsInicioAño = True Else EsInicioAño = False
|
||||
Case 6
|
||||
If item.Selected Then EsFinAño = True Else EsFinAño = False
|
||||
Case 7
|
||||
If item.Selected Then FueCalculado = True Else FueCalculado = False
|
||||
End Select
|
||||
Next
|
||||
If Comando = "Agregar" Then
|
||||
|
||||
If ObjNom_Periodos.AddPeriodo(CveTipoPeriodo, Ejercicio, Mes, Numero, FechaInicio, FechaFin, EsInicioMes, EsFinMes, EsInicioSS, EsFinSS, EsInicioAño, EsFinAño, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
||||
|
||||
Alert("El nuevo Periodo se guardó correctamente.", TipoMensaje.MsgInformacion)
|
||||
UpDatos.Update()
|
||||
ViewState("DTNom_Periodos") = ObjNom_Periodos.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||
GlobalDTNom_Periodos = ObjNom_Periodos.DtResultados
|
||||
CargaDatos()
|
||||
If String.IsNullOrEmpty(ViewState("Orden").ToString()) Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGrid("")
|
||||
End If
|
||||
|
||||
End If
|
||||
ElseIf Comando = "Actualizar" Then
|
||||
|
||||
If ObjNom_Periodos.UpdatePeriodo(FechaInicio, FechaFin, EsInicioMes, EsFinMes, EsInicioSS, EsFinSS, EsInicioAño, EsFinAño, FueCalculado, CveTipoPeriodo, Ejercicio, Mes, Numero, Estatus, CvePeriodo, UsuarioActual.CveEmpresa) Then
|
||||
|
||||
Alert("Los cambios se guardaron correctamente.", TipoMensaje.MsgInformacion)
|
||||
UpDatos.Update()
|
||||
ViewState("DTNom_Periodos") = ObjNom_Periodos.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||
GlobalDTNom_Periodos = ObjNom_Periodos.DtResultados
|
||||
CargaDatos()
|
||||
If String.IsNullOrEmpty(ViewState("Orden").ToString()) Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGrid("")
|
||||
End If
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
|
||||
RegistraScript("$('#divAddPeriodo').modal('hide');")
|
||||
|
||||
'ObjNom_Periodos.Dispose()
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnConsultar_Click(sender As Object, e As System.EventArgs) Handles BtnConsultar.Click
|
||||
CargaDatos()
|
||||
End Sub
|
||||
Protected Sub LnkEditar_Click(sender As Object, e As EventArgs)
|
||||
LimpiarModal()
|
||||
Comando = "Actualizar"
|
||||
lblTiulomodal.Text = "Actualizar Periodo"
|
||||
Dim GvRow As GridViewRow = DirectCast((DirectCast(sender, LinkButton)).NamingContainer, GridViewRow)
|
||||
DdlTipoPeriodoAdd.SelectedValueExist(GvRow.DataKey("CveTipoPeriodo").ToString.ToEntero)
|
||||
TxtNumeroAdd.Text = GvRow.DataKey("Numero").ToString
|
||||
TxtFechaInicioAdd.Text = GvRow.DataKey("FechaInicio").ToString
|
||||
TxtFechaFinAdd.Text = GvRow.DataKey("FechaFin").ToString
|
||||
DdlEstatusAdd.SelectedValueExist(GvRow.DataKey("Estatus").ToString.ToEntero)
|
||||
hdnCvePerido.Value = GvRow.DataKey("CvePeriodo").ToString
|
||||
For Each item As ListItem In CBLchk.Items
|
||||
Select Case item.Value.ToEntero()
|
||||
Case 1
|
||||
item.Selected = Convert.ToBoolean(GvRow.DataKey("EsInicioMes").ToString)
|
||||
Case 2
|
||||
item.Selected = Convert.ToBoolean(GvRow.DataKey("EsFinMes").ToString)
|
||||
Case 3
|
||||
item.Selected = Convert.ToBoolean(GvRow.DataKey("EsInicioSS").ToString)
|
||||
Case 4
|
||||
item.Selected = Convert.ToBoolean(GvRow.DataKey("EsFinSS").ToString)
|
||||
Case 5
|
||||
item.Selected = Convert.ToBoolean(GvRow.DataKey("EsInicioAño").ToString)
|
||||
Case 6
|
||||
item.Selected = Convert.ToBoolean(GvRow.DataKey("EsFinAño").ToString)
|
||||
Case 7
|
||||
item.Selected = Convert.ToBoolean(GvRow.DataKey("FueCalculado").ToString)
|
||||
End Select
|
||||
Next
|
||||
UpModalPerido.Update()
|
||||
|
||||
RegistraScript("$('#divAddPeriodo').modal('show')")
|
||||
End Sub
|
||||
|
||||
Private Sub LimpiarModal()
|
||||
DdlTipoPeriodoAdd.SelectedValueExist(-1)
|
||||
TxtNumeroAdd.Text = ""
|
||||
TxtFechaInicioAdd.Text = ""
|
||||
TxtFechaFinAdd.Text = ""
|
||||
DdlEstatusAdd.SelectedValueExist(-1)
|
||||
For Each item As ListItem In CBLchk.Items
|
||||
Select Case item.Value.ToEntero()
|
||||
Case 1
|
||||
item.Selected = False
|
||||
Case 2
|
||||
item.Selected = False
|
||||
Case 3
|
||||
item.Selected = False
|
||||
Case 4
|
||||
item.Selected = False
|
||||
Case 5
|
||||
item.Selected = False
|
||||
Case 6
|
||||
item.Selected = False
|
||||
Case 7
|
||||
item.Selected = False
|
||||
End Select
|
||||
Next
|
||||
UpModalPerido.Update()
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
@@ -1359,9 +1359,9 @@
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:Label runat="server" AssociatedControlID="DdlFormapagovacaciones">Forma de pago</asp:Label><br />
|
||||
<asp:DropDownList ID="DdlFormapagovacaciones" DataValueField="Cve" DataTextField="Texto" Width="100%" CssClass="form-control select2me " runat="server">
|
||||
<div class="form-group form-md-line-input input-iconright" style=" padding-top: 0px;">
|
||||
<asp:Label runat="server" AssociatedControlID="DdlFormapagovacaciones" style=" padding-bottom: 0px;margin-bottom: 0px;">Forma de pago</asp:Label><br />
|
||||
<asp:DropDownList ID="DdlFormapagovacaciones" DataValueField="Cve" style=" margin-top: -4px;" DataTextField="Texto" Width="100%" CssClass="form-control select2me " runat="server">
|
||||
<asp:ListItem Text="Pagadas por anticipado" Value="1" Selected="True"></asp:ListItem>
|
||||
<asp:ListItem Text="Por pagar" Value="2"></asp:ListItem>
|
||||
<asp:ListItem Text="Trabajadas" Value="3"></asp:ListItem>
|
||||
@@ -1374,11 +1374,36 @@
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtVacDiasExtra" CssClass="form-control input-sm " runat="server"></asp:TextBox>
|
||||
<asp:TextBox ID="TxtVacDiasExtra" CssClass="form-control input-sm " runat="server"></asp:TextBox>
|
||||
<asp:Label runat="server" AssociatedControlID="TxtVacDiasExtra">Días extras</asp:Label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtVacEjercicio" CssClass="form-control input-sm " Text="2021" runat="server"></asp:TextBox>
|
||||
<asp:Label runat="server" AssociatedControlID="TxtVacEjercicio">Ejercicio</asp:Label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
|
||||
<div style="padding-top: 0px; padding-bottom: 0px;">
|
||||
¿Prima Vacacional?
|
||||
</div>
|
||||
<asp:CheckBox ID="ChkVacPrimaVacacional" CssClass="chksino " Text=" " runat="server" />
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="col-md-6">
|
||||
|
||||
<div style="padding-top: 0px; padding-bottom: 0px;">
|
||||
¿Cobrar IMSS?
|
||||
</div>
|
||||
<asp:CheckBox ID="ChkVacCobrarIMSS" CssClass="chksino " Text=" " runat="server" />
|
||||
</div></div>
|
||||
</div>
|
||||
<div class="text-right">
|
||||
<asp:LinkButton ID="LnkSRVacacionesUP" OnClick="LnkSRVacacionesUP_Click" Visible="false" CssClass="btn btn-success" ValidationGroup="VG_Vacaciones" runat="server">Actualizar</asp:LinkButton>
|
||||
<asp:LinkButton ID="LnkSRVacacionesADD" OnClick="LnkSRVacacionesADD_Click" Visible="true" CssClass="btn btn-primary" ValidationGroup="VG_Vacaciones" runat="server">Guardar</asp:LinkButton>
|
||||
|
||||
@@ -13,6 +13,7 @@ using iTextSharp.text.pdf;
|
||||
using System.IO;
|
||||
using System.Data.SqlClient;
|
||||
using System.Configuration;
|
||||
using System.Collections.Specialized;
|
||||
|
||||
public partial class Nomina_Nomina2 : ClsPaginas
|
||||
{
|
||||
@@ -1095,7 +1096,28 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
}
|
||||
UpDatos.Update();
|
||||
}
|
||||
private void CreaObjetoEmpresa(ref Usuario UsuarioActual)
|
||||
{
|
||||
ClsSisEmpresas ObjEmpresa = new ClsSisEmpresas();
|
||||
if (ObjEmpresa.GetEmpresas(UsuarioActual.CveEmpresa, "-1", "-1", "-1", "-1"))
|
||||
{
|
||||
if (ObjEmpresa.GetEmpresasFuncionalidades(UsuarioActual.CveEmpresa))
|
||||
{
|
||||
System.Data.DataTable dttmp = ObjEmpresa.DtResultados;
|
||||
|
||||
HybridDictionary EmpresasFuncionalidades = new HybridDictionary();
|
||||
foreach (System.Data.DataRow Row in dttmp.Rows)
|
||||
EmpresasFuncionalidades.Add(Convert.ToInt32(Row["CveFuncionalidad"]), Row["Valor"].ToString());
|
||||
ObjEmpresa.Empresa.SetFuncionalidades(EmpresasFuncionalidades);
|
||||
}
|
||||
|
||||
UsuarioActual.Empresa = ObjEmpresa.Empresa;
|
||||
}
|
||||
else
|
||||
{
|
||||
}
|
||||
ObjEmpresa.Dispose();
|
||||
}
|
||||
protected void LnkTimbrar_Click(object sender, EventArgs e)
|
||||
{
|
||||
LinkButton lnk = (LinkButton)sender;
|
||||
@@ -1104,7 +1126,13 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
int CvePersonal = gvRow.DataKey("CvePersonal").ToEntero();
|
||||
int CveNomina = gvRow.DataKey("CveNomina").ToEntero();
|
||||
LogicNominas lognom = new LogicNominas();
|
||||
|
||||
Usuario UsuarioActual = null;
|
||||
using(ClsSisUsuarios ObjUsuario= new ClsSisUsuarios())
|
||||
{
|
||||
UsuarioActual =ObjUsuario.ValidaUsuario("jcaudillo", Encripta("45makako45"), "-1", 1);
|
||||
}
|
||||
CreaObjetoEmpresa(ref UsuarioActual);
|
||||
UsuarioActual.CveEmpresa = this.UsuarioActual.CveEmpresa;
|
||||
string Msg = lognom.TimbrarNomina(CveNomina, CvePersonal, CvePeriodo, UsuarioActual);
|
||||
if (Msg != null && Msg.Length > 0)
|
||||
{ Alert(Msg, TipoMensaje.MsgAdvertencia); }
|
||||
@@ -4558,8 +4586,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
bool Continuar;
|
||||
using (ClsNominas ObjMovt = new ClsNominas())
|
||||
{
|
||||
Continuar = ObjMovt.AddMovtoPermanente(cveConcepto, SRCvePersonal, descripcion, tipoDescuento, valor, vecesAplicar, montoLimite, fechaInicioAplicacion, estatus, CveCuenta);
|
||||
|
||||
Continuar = ObjMovt.AddMovtoPermanente(cveConcepto, SRCvePersonal, descripcion, tipoDescuento, valor, vecesAplicar, montoLimite, fechaInicioAplicacion, estatus, CveCuenta) > 0;
|
||||
}
|
||||
if (Continuar)
|
||||
{
|
||||
|
||||
@@ -2747,7 +2747,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
<div class="row col-md-12" align="right" runat="server" id="divBusqueda" visible="false">
|
||||
<div class="row col-md-12" align="right" runat="server" id="divBusqueda" visible="false">
|
||||
<input type="text" id="TxtBusqueda3" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda3','{0}');", GvContratosControl.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda3','{0}');", GvContratosControl.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
</div>
|
||||
@@ -2781,7 +2781,7 @@
|
||||
|
||||
<asp:TemplateField HeaderText="Importe">
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtImporte" Text="" data-cve='<%# Eval("CveContratoDetalle") %>' CssClass="txtimporte" type="number" step="any" Width="90" runat="server" onkeydown="keydownenabledtab(event)"></asp:TextBox>
|
||||
<asp:TextBox ID="TxtImporte" Text="" data-cve='<%# Eval("CveContratoDetalle") %>' CssClass="txtimporte" type="number" step="any" Width="90" runat="server" ></asp:TextBox>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
|
||||
272
OC/OC.aspx.vb
272
OC/OC.aspx.vb
@@ -4,6 +4,7 @@ Imports System.Data
|
||||
Imports Extensiones
|
||||
Imports System.IO
|
||||
Imports GemBox.Spreadsheet
|
||||
Imports Newtonsoft.Json
|
||||
|
||||
Partial Class OC
|
||||
Inherits ClsPaginas
|
||||
@@ -2095,141 +2096,122 @@ Partial Class OC
|
||||
End If
|
||||
|
||||
'Valida cantidad en contrato
|
||||
Dim ObjContratos As New ClsContratos
|
||||
|
||||
Dim TieneError As Boolean = False
|
||||
Dim Mensaje As String = ""
|
||||
Dim dttemp As DataTable = Nothing 'GlobalDTContratos(UsuarioActual.CveEmpresa).FiltraParametros(String.Format("CveSubProyecto = {0}", DdlSubProyecto.SelectedValue.ToString))
|
||||
If dttemp IsNot Nothing AndAlso dttemp.Rows.Count > 0 Then
|
||||
Dim drContrato As DataRow = dttemp.Rows(0)
|
||||
If ObjContratos.GetContratosDetalle(drContrato("CveContrato").ToString.ToEntero, UsuarioActual.CveEmpresa) Then
|
||||
Dim dtContratodetalle As DataTable = ObjContratos.DtResultados.FiltraParametros(String.Format("CvePS = {0}", DdlP2.SelectedValue.ToString))
|
||||
If dtContratodetalle IsNot Nothing AndAlso dtContratodetalle.Rows.Count > 0 Then
|
||||
Dim drContratoDetalle As DataRow = dtContratodetalle(0)
|
||||
If Convert.ToBoolean(drContratoDetalle("LimitarCantidad")) Then
|
||||
If ObjContratos.GetReporteContratosAvancesDetalleControl(drContrato("CveContrato").ToString.ToEntero, UsuarioActual.CveEmpresa) Then
|
||||
Dim dtContratodetalleControl As DataTable = ObjContratos.DtResultados.FiltraParametros(String.Format("CvePS = {0}", DdlP2.SelectedValue.ToString))
|
||||
If dtContratodetalleControl IsNot Nothing AndAlso dtContratodetalleControl.Rows.Count > 0 Then
|
||||
Dim drContratoDetalleControl As DataRow = dtContratodetalleControl(0)
|
||||
If TxtCant.Text.Trim.ToDouble > drContratoDetalleControl("FaltanteCantidad").ToString.ToDouble Then
|
||||
Mensaje = String.Format("La cantidad del Producto/Servicio debe ser menor o igual a {0}", drContratoDetalleControl("FaltanteCantidad").ToString)
|
||||
TieneError = True
|
||||
End If
|
||||
Else
|
||||
Mensaje = "Este producto no pertence al contrato seleccionado"
|
||||
TieneError = True
|
||||
End If
|
||||
Else
|
||||
Mensaje = "Error al consultar el contrato"
|
||||
End If
|
||||
End If
|
||||
Else
|
||||
Mensaje = "Este producto no pertence al contrato seleccionado"
|
||||
TieneError = True
|
||||
End If
|
||||
Else
|
||||
Mensaje = "Error al consultar el contrato"
|
||||
Dim dttemp As New DataTable ' GlobalDTContratos().FiltraParametros(String.Format("CveSubProyecto = {0}", DdlSubProyecto.SelectedValue.ToString))
|
||||
dttemp.Columns.Add("CveSubProyecto", GetType(Integer))
|
||||
dttemp.Columns.Add("CvePS", GetType(Integer))
|
||||
dttemp.Columns.Add("Cantidad", GetType(Decimal))
|
||||
dttemp.Columns.Add("PU", GetType(Decimal))
|
||||
|
||||
Dim DrPSValidar = dttemp.NewRow
|
||||
DrPSValidar("CveSubProyecto") = DdlSubProyecto.SelectedValue.ToString.ToEntero
|
||||
DrPSValidar("CvePS") = DdlP2.SelectedValue.ToString.ToEntero
|
||||
DrPSValidar("Cantidad") = TxtCant.Text.Trim.ToDecimal
|
||||
DrPSValidar("PU") = txtPrecioUnitario.Text.Trim.ToDecimal
|
||||
dttemp.Rows.Add(DrPSValidar)
|
||||
If UsuarioActual.Empresa.Funcionalidad(545) = "1" Then
|
||||
Dim dtPSInvalidos As String = ValidarPSContrato(dttemp)
|
||||
If dtPSInvalidos <> "" Then
|
||||
Alert(dtPSInvalidos, TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
End If
|
||||
|
||||
If Not TieneError Then
|
||||
|
||||
ObjContratos.Dispose()
|
||||
If DtDetalle IsNot Nothing Then
|
||||
Dim DrPS = GlobalDTPS(CveEmpresaActual, CvePS:=DdlP2.SelectedValue.ToEntero).FiltroPrimero("")
|
||||
If DrPS Is Nothing Then
|
||||
Alert("Ocurrió un error al cargar la información del producto. Por favor vuelva a intentar.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(532) = "1" Then
|
||||
Dim ObjCon As New ClsContratos
|
||||
Dim CvePresupuesto As Integer = 0
|
||||
Dim Autorizado As Double = 0
|
||||
Dim Ejercido As Double = 0
|
||||
If ObjCon.GetPresupuestos(-1, "-1", DdlSubProyecto.SelectedValue.ToEntero, 2, -1, UsuarioActual.CveEmpresa) Then
|
||||
If ObjCon.DtResultados.Rows.Count > 0 Then
|
||||
CvePresupuesto = ObjCon.DtResultados.Rows(0)("CvePresupuesto").ToString.ToEntero
|
||||
If CvePresupuesto > 0 Then
|
||||
If ObjCon.GetPresupuestosDetalle(CvePresupuesto, -1, UsuarioActual.CveEmpresa) Then
|
||||
If ObjCon.DtResultados.FiltraParametros($"CveClasificacion = {DdlClasificacion.SelectedValue.ToEntero} AND Importe > 0").Rows.Count > 0 Then
|
||||
Autorizado = ObjCon.DtResultados.FiltraParametros($"CveClasificacion = {DdlClasificacion.SelectedValue.ToEntero} AND Importe > 0").Rows(0)("Importe").ToString.ToDouble
|
||||
End If
|
||||
If DtDetalle IsNot Nothing Then
|
||||
Dim DrPS = GlobalDTPS(CveEmpresaActual, CvePS:=DdlP2.SelectedValue.ToEntero).FiltroPrimero("")
|
||||
If DrPS Is Nothing Then
|
||||
Alert("Ocurrió un error al cargar la información del producto. Por favor vuelva a intentar.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(532) = "1" Then
|
||||
Dim ObjCon As New ClsContratos
|
||||
Dim CvePresupuesto As Integer = 0
|
||||
Dim Autorizado As Double = 0
|
||||
Dim Ejercido As Double = 0
|
||||
If ObjCon.GetPresupuestos(-1, "-1", DdlSubProyecto.SelectedValue.ToEntero, 2, -1, UsuarioActual.CveEmpresa) Then
|
||||
If ObjCon.DtResultados.Rows.Count > 0 Then
|
||||
CvePresupuesto = ObjCon.DtResultados.Rows(0)("CvePresupuesto").ToString.ToEntero
|
||||
If CvePresupuesto > 0 Then
|
||||
If ObjCon.GetPresupuestosDetalle(CvePresupuesto, -1, UsuarioActual.CveEmpresa) Then
|
||||
If ObjCon.DtResultados.FiltraParametros($"CveClasificacion = {DdlClasificacion.SelectedValue.ToEntero} AND Importe > 0").Rows.Count > 0 Then
|
||||
Autorizado = ObjCon.DtResultados.FiltraParametros($"CveClasificacion = {DdlClasificacion.SelectedValue.ToEntero} AND Importe > 0").Rows(0)("Importe").ToString.ToDouble
|
||||
End If
|
||||
If ObjCon.GetPresupuestosRep(CvePresupuesto, -1, 1, $"01/09/{DateTime.Now.Year - 1}".ToDate, Now, UsuarioActual.CveEmpresa, DdlProyecto.SelectedValue.ToEntero,
|
||||
DdlSubProyecto.SelectedValue.ToEntero, UsuarioActual.CveUsuario, DdlClasificacion.SelectedValue.ToEntero) Then
|
||||
If ObjCon.DtResultados.Rows.Count > 0 Then
|
||||
Ejercido = ObjCon.DtResultados.Rows(0)("Ejercido").ToString.ToDouble
|
||||
End If
|
||||
End If
|
||||
If ObjCon.GetPresupuestosRep(CvePresupuesto, -1, 1, $"01/09/{DateTime.Now.Year - 1}".ToDate, Now, UsuarioActual.CveEmpresa, DdlProyecto.SelectedValue.ToEntero,
|
||||
DdlSubProyecto.SelectedValue.ToEntero, UsuarioActual.CveUsuario, DdlClasificacion.SelectedValue.ToEntero) Then
|
||||
If ObjCon.DtResultados.Rows.Count > 0 Then
|
||||
Ejercido = ObjCon.DtResultados.Rows(0)("Ejercido").ToString.ToDouble
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
ObjCon.Dispose()
|
||||
End If
|
||||
ObjCon.Dispose()
|
||||
|
||||
If CvePresupuesto > 0 And Autorizado > 0 Then
|
||||
Dim Diferencia As Double = (Ejercido + If(txtPrecioUnitario.Text.ToDouble > 0, (txtPrecioUnitario.Text.ToDouble * TxtCant.Text.ToDouble) - TxtDescuentoAdd.Text.ToDouble, 0)) - Autorizado
|
||||
If Diferencia > 0 Then
|
||||
Alert($"No hay presupuesto disponible en el subproyecto <b>{DdlSubProyecto.SelectedItem.Text}</b> y la clasificación <b>{DdlClasificacion.SelectedItem.Text}</b> se excede por <b>{Diferencia.FormatoNumero}</b>", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
If CvePresupuesto > 0 And Autorizado > 0 Then
|
||||
Dim Diferencia As Double = (Ejercido + If(txtPrecioUnitario.Text.ToDouble > 0, (txtPrecioUnitario.Text.ToDouble * TxtCant.Text.ToDouble) - TxtDescuentoAdd.Text.ToDouble, 0)) - Autorizado
|
||||
If Diferencia > 0 Then
|
||||
Alert($"No hay presupuesto disponible en el subproyecto <b>{DdlSubProyecto.SelectedItem.Text}</b> y la clasificación <b>{DdlClasificacion.SelectedItem.Text}</b> se excede por <b>{Diferencia.FormatoNumero}</b>", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
Dim RetISR As Double = DrPS("RetISR").ToString.ToDouble
|
||||
Dim RetIVA As Double = DrPS("RetIVA").ToString.ToDouble
|
||||
Dim IvaPS As Double = DrPS("IVA").ToString.ToDouble
|
||||
|
||||
'If IvaPS = -1 Then 'IVA DE LA SUCURSAL
|
||||
' IvaPS = GlobalDTSubProyectos(-1, DdlSubProyecto.SelectedValue.ToEntero).FiltroPrimeroValor("IVA").ToDouble
|
||||
'End If
|
||||
|
||||
Dim IEPSPS As Double = DrPS("IEPSPorcentaje").ToString.ToDouble
|
||||
Dim IEPSPSIVA As Double = If(DrPS("IEPSGrabaIVA").ToString = "True", DrPS("IEPSPorcentaje").ToString.ToDouble, 0)
|
||||
Dim IdCuentaPorEjercer As Integer = If(HdnCveCuentaPorEjercer.Value = String.Empty, -1, HdnCveCuentaPorEjercer.Value.ToEntero)
|
||||
Dim IdCuentaComprometido As Integer = If(HdnCveCuentaComprometido.Value = String.Empty, -1, HdnCveCuentaComprometido.Value.ToEntero)
|
||||
Dim Proyecto As String = If(DdlProyecto.SelectedValue.ToString.ToEntero > 0, DdlProyecto.SelectedItem.Text, "Sin Proyecto")
|
||||
Dim SubProyecto As String = If(DdlSubProyecto.SelectedValue.ToString.ToEntero > 0, DdlSubProyecto.SelectedItem.Text, "Sin SubProyecto")
|
||||
Dim TotalPS As Double = If(txtPrecioUnitario.Text.ToDouble > 0, (txtPrecioUnitario.Text.ToDouble * TxtCant.Text.ToDouble) - TxtDescuentoAdd.Text.ToDouble, 0)
|
||||
Dim ImportePS As Double = If(txtPrecioUnitario.Text.ToDouble > 0, txtPrecioUnitario.Text.ToDouble, 0)
|
||||
Dim CveOrdenCompraDetalle As Integer = DtDetalle.MAX("CveOrdenCompraDetalle").ToEntero + 100
|
||||
|
||||
'Si es Proveedor Extranjero el IVA es 0%
|
||||
If GlobalDTCompProveedores(CveEmpresaActual).FiltraParametros($"CveProveedor = {DdlProveedores.SelectedValue} AND RFC = 'XEXX010101000'").Rows.Count = 1 Then
|
||||
IvaPS = 0
|
||||
End If
|
||||
|
||||
AddPS(TxtCant.Text, DdlP2.SelectedValue.ToEntero, DdlP2.SelectedText, TxtObsPS.Text, ImportePS, TxtDescuentoAdd.Text.ToDouble, TotalPS,
|
||||
CboUnidadMedida.SelectedValue.ToEntero, IvaPS, IEPSPS, IEPSPSIVA, DdlClasificacion.SelectedValue.ToEntero, CboUnidadMedida.SelectedItem.Text, DdlClasificacion.SelectedItem.Text, DdlProyecto.SelectedValue.ToEntero, Proyecto,
|
||||
DdlSubProyecto.SelectedValue.ToEntero, SubProyecto, LblCodigo.Text, HdnCveActivoFijo.Value.ToEntero, 0, CveOrdenCompraDetalle, CveOrdenCompra, IdCuentaPorEjercer,
|
||||
IdCuentaComprometido, DdlACGeneral1.SelectedValue.ToEntero, DdlACGeneral2.SelectedValue.ToEntero, DdlACGeneral3.SelectedValue.ToEntero, DdlACGeneral4.SelectedValue.ToEntero,
|
||||
DdlACGeneral5.SelectedValue.ToEntero, RetIVA, RetISR, CveCultivoCuadroDetalle:=DdlCultivosCuadro.SelectedValue.ToEntero, Cuadro:=DdlCultivosCuadro.SelectedItem.Text)
|
||||
|
||||
TxtCant.Text = ""
|
||||
CboUnidadMedida.SelectedIndex = 0
|
||||
DdlClasificacion.SelectedIndex = 0
|
||||
DdlP2.SelectedValue = "-1"
|
||||
DdlP2.SelectedText = "Seleccione un producto o servicio"
|
||||
txtPrecioUnitario.Text = ""
|
||||
TxtObsPS.Text = ""
|
||||
HdnCveActivoFijo.Value = ""
|
||||
LblCodigo.Text = ""
|
||||
LblCvePOA.Text = ""
|
||||
TxtCant.Focus()
|
||||
|
||||
Total.Text = "0.00"
|
||||
TxtDescuentoAdd.Text = "0.00"
|
||||
|
||||
End If
|
||||
|
||||
CargaSuperior()
|
||||
CargaDatosDetalles()
|
||||
|
||||
UPPDetalle.Update()
|
||||
Else
|
||||
Alert(Mensaje, TipoMensaje.MsgAdvertencia)
|
||||
Dim RetISR As Double = DrPS("RetISR").ToString.ToDouble
|
||||
Dim RetIVA As Double = DrPS("RetIVA").ToString.ToDouble
|
||||
Dim IvaPS As Double = DrPS("IVA").ToString.ToDouble
|
||||
|
||||
'If IvaPS = -1 Then 'IVA DE LA SUCURSAL
|
||||
' IvaPS = GlobalDTSubProyectos(-1, DdlSubProyecto.SelectedValue.ToEntero).FiltroPrimeroValor("IVA").ToDouble
|
||||
'End If
|
||||
|
||||
Dim IEPSPS As Double = DrPS("IEPSPorcentaje").ToString.ToDouble
|
||||
Dim IEPSPSIVA As Double = If(DrPS("IEPSGrabaIVA").ToString = "True", DrPS("IEPSPorcentaje").ToString.ToDouble, 0)
|
||||
Dim IdCuentaPorEjercer As Integer = If(HdnCveCuentaPorEjercer.Value = String.Empty, -1, HdnCveCuentaPorEjercer.Value.ToEntero)
|
||||
Dim IdCuentaComprometido As Integer = If(HdnCveCuentaComprometido.Value = String.Empty, -1, HdnCveCuentaComprometido.Value.ToEntero)
|
||||
Dim Proyecto As String = If(DdlProyecto.SelectedValue.ToString.ToEntero > 0, DdlProyecto.SelectedItem.Text, "Sin Proyecto")
|
||||
Dim SubProyecto As String = If(DdlSubProyecto.SelectedValue.ToString.ToEntero > 0, DdlSubProyecto.SelectedItem.Text, "Sin SubProyecto")
|
||||
Dim TotalPS As Double = If(txtPrecioUnitario.Text.ToDouble > 0, (txtPrecioUnitario.Text.ToDouble * TxtCant.Text.ToDouble) - TxtDescuentoAdd.Text.ToDouble, 0)
|
||||
Dim ImportePS As Double = If(txtPrecioUnitario.Text.ToDouble > 0, txtPrecioUnitario.Text.ToDouble, 0)
|
||||
Dim CveOrdenCompraDetalle As Integer = DtDetalle.MAX("CveOrdenCompraDetalle").ToEntero + 100
|
||||
|
||||
'Si es Proveedor Extranjero el IVA es 0%
|
||||
If GlobalDTCompProveedores(CveEmpresaActual).FiltraParametros($"CveProveedor = {DdlProveedores.SelectedValue} AND RFC = 'XEXX010101000'").Rows.Count = 1 Then
|
||||
IvaPS = 0
|
||||
End If
|
||||
|
||||
AddPS(TxtCant.Text, DdlP2.SelectedValue.ToEntero, DdlP2.SelectedText, TxtObsPS.Text, ImportePS, TxtDescuentoAdd.Text.ToDouble, TotalPS,
|
||||
CboUnidadMedida.SelectedValue.ToEntero, IvaPS, IEPSPS, IEPSPSIVA, DdlClasificacion.SelectedValue.ToEntero, CboUnidadMedida.SelectedItem.Text, DdlClasificacion.SelectedItem.Text, DdlProyecto.SelectedValue.ToEntero, Proyecto,
|
||||
DdlSubProyecto.SelectedValue.ToEntero, SubProyecto, LblCodigo.Text, HdnCveActivoFijo.Value.ToEntero, 0, CveOrdenCompraDetalle, CveOrdenCompra, IdCuentaPorEjercer,
|
||||
IdCuentaComprometido, DdlACGeneral1.SelectedValue.ToEntero, DdlACGeneral2.SelectedValue.ToEntero, DdlACGeneral3.SelectedValue.ToEntero, DdlACGeneral4.SelectedValue.ToEntero,
|
||||
DdlACGeneral5.SelectedValue.ToEntero, RetIVA, RetISR, CveCultivoCuadroDetalle:=DdlCultivosCuadro.SelectedValue.ToEntero, Cuadro:=DdlCultivosCuadro.SelectedItem.Text)
|
||||
|
||||
TxtCant.Text = ""
|
||||
CboUnidadMedida.SelectedIndex = 0
|
||||
DdlClasificacion.SelectedIndex = 0
|
||||
DdlP2.SelectedValue = "-1"
|
||||
DdlP2.SelectedText = "Seleccione un producto o servicio"
|
||||
txtPrecioUnitario.Text = ""
|
||||
TxtObsPS.Text = ""
|
||||
HdnCveActivoFijo.Value = ""
|
||||
LblCodigo.Text = ""
|
||||
LblCvePOA.Text = ""
|
||||
TxtCant.Focus()
|
||||
|
||||
Total.Text = "0.00"
|
||||
TxtDescuentoAdd.Text = "0.00"
|
||||
|
||||
End If
|
||||
ObjContratos.Dispose()
|
||||
|
||||
CargaSuperior()
|
||||
CargaDatosDetalles()
|
||||
|
||||
UPPDetalle.Update()
|
||||
End Sub
|
||||
Private Sub AddPS(Cantidad As String, CvePS As Integer, PS As String, Observaciones As String, Importe As Double, Descuento As Double, Total As Double, CveUnidadMedida As Integer, IVAPS As Double, IEPSPS As Double, IEPSPSIVA As Double, CveClasificacion As Integer,
|
||||
UM As String, Clasificacion As String, CveProyecto As Integer, Proyecto As String, CveSubProyecto As Integer, SubProyecto As String, CodigoAF As String, CveActivoFijo As Integer, TipoDato As Integer,
|
||||
@@ -2505,6 +2487,15 @@ Partial Class OC
|
||||
TieneError = True
|
||||
End If
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(545) = "1" Then
|
||||
Dim dtPSInvalidos As String = ValidarPSContrato(DtDetalle.FiltraParametros("", "", {"CveSubProyecto", "CvePS", "Cantidad", "PU"}))
|
||||
If dtPSInvalidos <> "" Then
|
||||
Alert(dtPSInvalidos, TipoMensaje.MsgAdvertencia)
|
||||
TieneError = True
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
Return TieneError
|
||||
End Function
|
||||
Protected Sub BtnGuardar_Click(sender As Object, e As EventArgs) Handles BtnGuardar.Click
|
||||
@@ -6369,8 +6360,8 @@ Partial Class OC
|
||||
Protected Sub BtnCargaExcel_Click(sender As Object, e As EventArgs) Handles BtnCargaExcel.Click
|
||||
If TxtExcel.getfiles().Archivos.Count > 0 Then
|
||||
Dim file As Archivo = TxtExcel.getfiles().Archivos(0)
|
||||
Dim Directorio As String = AppDomain.CurrentDomain.BaseDirectory & file.patch
|
||||
Dim Tipo As String = If(file.Extencion.Contiene("xlsx", "xlsx", "xlsm", "xlsb"), "EXCEL", "CSV")
|
||||
Dim Directorio As String = AppDomain.CurrentDomain.BaseDirectory & file.path
|
||||
Dim Tipo As String = If(file.Extension.Contiene("xlsx", "xlsx", "xlsm", "xlsb"), "EXCEL", "CSV")
|
||||
CargarArchivo(Directorio, file.filename, Tipo)
|
||||
Else
|
||||
Alert("No existe el archivo. Favor de subir un archivo excel a la plataforma.", TipoMensaje.MsgError)
|
||||
@@ -7746,7 +7737,7 @@ Partial Class OC
|
||||
Protected Sub BtnCargaExcelCot_Click(sender As Object, e As EventArgs)
|
||||
If TxtExcelCot.getfiles().Archivos.Count > 0 Then
|
||||
Dim file As Archivo = TxtExcelCot.getfiles().Archivos(0)
|
||||
Dim Directorio As String = AppDomain.CurrentDomain.BaseDirectory & file.patch
|
||||
Dim Directorio As String = AppDomain.CurrentDomain.BaseDirectory & file.path
|
||||
CargarArchivoCot(Directorio, file.filename)
|
||||
|
||||
CargaCotizaciones(CveOrdenCompra)
|
||||
@@ -8522,8 +8513,9 @@ Partial Class OC
|
||||
CargaSuperior()
|
||||
CargaDatosDetalles()
|
||||
|
||||
|
||||
RegistraScript("$('#DivmodalConmtrato').modal('hide')")
|
||||
If Not ChkContinualAgregandoControl.Checked Then
|
||||
RegistraScript("$('#DivmodalConmtrato').modal('hide')")
|
||||
End If
|
||||
UPPDetalle.Update()
|
||||
|
||||
|
||||
@@ -8544,4 +8536,40 @@ Partial Class OC
|
||||
DdlCultivosCuadroEdit.SelectedValueExist(CveCultivoCuadroDetalle)
|
||||
|
||||
End Sub
|
||||
|
||||
Private Function ValidarPSContrato(DtPS As DataTable) As String
|
||||
Dim Retorno As String = ""
|
||||
Dim objContratos As New ClsContratos
|
||||
Dim TempPS As String = JsonConvert.SerializeObject(DtPS).ToString
|
||||
Dim MensajeProducto As String = ""
|
||||
Dim MensajeCantidad As String = ""
|
||||
Dim MensajeImporte As String = ""
|
||||
If objContratos.ValidaPSContrato(TempPS) Then
|
||||
If objContratos.DtResultados.Rows.Count > 0 Then
|
||||
MensajeProducto = "Los siguientes productos no pertenece al contrato seleccionado: "
|
||||
MensajeCantidad = "Los siguientes productos sobrepasan la cantidad faltante del contrato seleccionado: "
|
||||
MensajeImporte = "Los siguientes productos sobrepasan los importes faltantes del contrato seleccionado: "
|
||||
For Each dr As DataRow In objContratos.DtResultados.Rows
|
||||
If dr("ProductoNoContratado").ToString.ToEntero = 1 Then
|
||||
MensajeProducto += String.Format("<br/> {0}", dr("PS"))
|
||||
ElseIf dr("CantidadSobrePasada").ToString.ToEntero = 1 Then
|
||||
MensajeCantidad += String.Format("<br/> {0} - Cantidad maxima: {1}", dr("PS"), dr("FaltanteCantidad"))
|
||||
ElseIf dr("ImporteSobrePasado").ToString.ToEntero = 1 Then
|
||||
MensajeImporte += String.Format("<br/> {0} - Importe maximo: {1}", dr("PS"), dr("FaltanteImporte"))
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
End If
|
||||
|
||||
If MensajeProducto.Length <> 64 Then
|
||||
Retorno = MensajeProducto
|
||||
ElseIf MensajeCantidad.Length <> 84 Then
|
||||
Retorno = MensajeCantidad
|
||||
ElseIf MensajeImporte.Length <> 86 Then
|
||||
Retorno = MensajeImporte
|
||||
End If
|
||||
|
||||
Return Retorno
|
||||
|
||||
End Function
|
||||
End Class
|
||||
|
||||
@@ -335,8 +335,8 @@ public partial class OI_MinutaDetalle : ClsPaginas
|
||||
foreach (Archivo item in TxtArchivo.getfiles().Archivos)
|
||||
{
|
||||
archivoname = item.filenameO;
|
||||
ArchivoExtencion = string.Format("{0}{1}", (item.Extencion.Length > 0 ? "." : ""), item.Extencion);
|
||||
rutaarchivoOri = string.Format("{0}{1}{2}", AppDomain.CurrentDomain.BaseDirectory, item.patch, item.filename);
|
||||
ArchivoExtencion = string.Format("{0}{1}", (item.Extension.Length > 0 ? "." : ""), item.Extension);
|
||||
rutaarchivoOri = string.Format("{0}{1}{2}", AppDomain.CurrentDomain.BaseDirectory, item.path, item.filename);
|
||||
}
|
||||
bool Continuar = true;
|
||||
|
||||
@@ -490,8 +490,8 @@ public partial class OI_MinutaDetalle : ClsPaginas
|
||||
foreach (Archivo item in TxtTareaArchivo.getfiles().Archivos)
|
||||
{
|
||||
archivoname = item.filenameO;
|
||||
ArchivoExtencion = string.Format("{0}{1}", (item.Extencion.Length > 0 ? "." : ""), item.Extencion);
|
||||
rutaarchivoOri = string.Format("{0}{1}{2}", AppDomain.CurrentDomain.BaseDirectory, item.patch, item.filename);
|
||||
ArchivoExtencion = string.Format("{0}{1}", (item.Extension.Length > 0 ? "." : ""), item.Extension);
|
||||
rutaarchivoOri = string.Format("{0}{1}{2}", AppDomain.CurrentDomain.BaseDirectory, item.path, item.filename);
|
||||
}
|
||||
|
||||
|
||||
@@ -614,8 +614,8 @@ public partial class OI_MinutaDetalle : ClsPaginas
|
||||
foreach (Archivo item in TxtAgendaArchivo.getfiles().Archivos)
|
||||
{
|
||||
archivoname = item.filenameO;
|
||||
ArchivoExtencion = string.Format("{0}{1}", (item.Extencion.Length > 0 ? "." : ""), item.Extencion);
|
||||
rutaarchivoOri = string.Format("{0}{1}{2}", AppDomain.CurrentDomain.BaseDirectory, item.patch, item.filename);
|
||||
ArchivoExtencion = string.Format("{0}{1}", (item.Extension.Length > 0 ? "." : ""), item.Extension);
|
||||
rutaarchivoOri = string.Format("{0}{1}{2}", AppDomain.CurrentDomain.BaseDirectory, item.path, item.filename);
|
||||
}
|
||||
|
||||
|
||||
@@ -709,8 +709,8 @@ public partial class OI_MinutaDetalle : ClsPaginas
|
||||
foreach (Archivo item in Txtfilecomentario.getfiles().Archivos)
|
||||
{
|
||||
archivoname = item.filenameO;
|
||||
ArchivoExtencion = string.Format("{0}{1}", (item.Extencion.Length > 0 ? "." : ""), item.Extencion);
|
||||
rutaarchivoOri = string.Format("{0}{1}{2}", AppDomain.CurrentDomain.BaseDirectory, item.patch, item.filename);
|
||||
ArchivoExtencion = string.Format("{0}{1}", (item.Extension.Length > 0 ? "." : ""), item.Extension);
|
||||
rutaarchivoOri = string.Format("{0}{1}{2}", AppDomain.CurrentDomain.BaseDirectory, item.path, item.filename);
|
||||
}
|
||||
using (ClsOIEventos objoi = new ClsOIEventos())
|
||||
{
|
||||
|
||||
@@ -134,8 +134,8 @@ public partial class OI_Proyecto : ClsPaginas
|
||||
//foreach (Archivo item in TxtArchivo.getfiles().Archivos)
|
||||
//{
|
||||
// archivoname = item.filenameO;
|
||||
// ArchivoExtencion = string.Format("{0}{1}", (item.Extencion.Length > 0 ? "." : ""), item.Extencion);
|
||||
// rutaarchivoOri = string.Format("{0}{1}{2}", ModExtensiones.DirectorioBaseEmpresas, item.patch, item.filename);
|
||||
// ArchivoExtencion = string.Format("{0}{1}", (item.Extension.Length > 0 ? "." : ""), item.Extension);
|
||||
// rutaarchivoOri = string.Format("{0}{1}{2}", ModExtensiones.DirectorioBaseEmpresas, item.path, item.filename);
|
||||
//}
|
||||
|
||||
|
||||
|
||||
@@ -100,8 +100,8 @@ public partial class OI_RepProyectos : ClsPaginas
|
||||
//foreach (Archivo item in TxtArchivo.getfiles().Archivos)
|
||||
//{
|
||||
// archivoname = item.filenameO;
|
||||
// ArchivoExtencion = string.Format("{0}{1}", (item.Extencion.Length > 0 ? "." : ""), item.Extencion);
|
||||
// rutaarchivoOri = string.Format("{0}{1}{2}", ModExtensiones.DirectorioBaseEmpresas, item.patch, item.filename);
|
||||
// ArchivoExtencion = string.Format("{0}{1}", (item.Extension.Length > 0 ? "." : ""), item.Extension);
|
||||
// rutaarchivoOri = string.Format("{0}{1}{2}", ModExtensiones.DirectorioBaseEmpresas, item.path, item.filename);
|
||||
//}
|
||||
|
||||
|
||||
|
||||
@@ -715,8 +715,8 @@ public partial class OI_TareaDetalle : ClsPaginas
|
||||
foreach (Archivo item in TxtArchivo.getfiles().Archivos)
|
||||
{
|
||||
archivoname = item.filenameO;
|
||||
ArchivoExtencion = string.Format("{0}{1}", (item.Extencion.Length > 0 ? "." : ""), item.Extencion);
|
||||
rutaarchivoOri = string.Format("{0}{1}{2}", AppDomain.CurrentDomain.BaseDirectory, item.patch, item.filename);
|
||||
ArchivoExtencion = string.Format("{0}{1}", (item.Extension.Length > 0 ? "." : ""), item.Extension);
|
||||
rutaarchivoOri = string.Format("{0}{1}{2}", AppDomain.CurrentDomain.BaseDirectory, item.path, item.filename);
|
||||
}
|
||||
|
||||
|
||||
@@ -1118,8 +1118,8 @@ public partial class OI_TareaDetalle : ClsPaginas
|
||||
foreach (Archivo item in Txtfilecomentario.getfiles().Archivos)
|
||||
{
|
||||
archivoname = item.filenameO;
|
||||
ArchivoExtencion = string.Format("{0}{1}", (item.Extencion.Length > 0 ? "." : ""), item.Extencion);
|
||||
rutaarchivoOri = string.Format("{0}{1}{2}", AppDomain.CurrentDomain.BaseDirectory, item.patch, item.filename);
|
||||
ArchivoExtencion = string.Format("{0}{1}", (item.Extension.Length > 0 ? "." : ""), item.Extension);
|
||||
rutaarchivoOri = string.Format("{0}{1}{2}", AppDomain.CurrentDomain.BaseDirectory, item.path, item.filename);
|
||||
}
|
||||
using (ClsOIEventos objoi = new ClsOIEventos())
|
||||
{
|
||||
@@ -1209,8 +1209,8 @@ public partial class OI_TareaDetalle : ClsPaginas
|
||||
foreach (Archivo item in txtActualizarArchivo.getfiles().Archivos)
|
||||
{
|
||||
archivoname = item.filenameO;
|
||||
ArchivoExtencion = string.Format("{0}{1}", (item.Extencion.Length > 0 ? "." : ""), item.Extencion);
|
||||
rutaarchivoOri = string.Format("{0}{1}{2}", AppDomain.CurrentDomain.BaseDirectory, item.patch, item.filename);
|
||||
ArchivoExtencion = string.Format("{0}{1}", (item.Extension.Length > 0 ? "." : ""), item.Extension);
|
||||
rutaarchivoOri = string.Format("{0}{1}{2}", AppDomain.CurrentDomain.BaseDirectory, item.path, item.filename);
|
||||
}
|
||||
string ruta = string.Format("{0}OIFiles\\", UsuarioActual.Empresa.Ruta);
|
||||
if (!System.IO.Directory.Exists(ruta))
|
||||
|
||||
@@ -493,8 +493,8 @@ Partial Class Sistemas_WizardRegistro
|
||||
Case 4
|
||||
If TxtFormatoFactura.getfiles().Archivos().Count > 0 Then
|
||||
Dim FormatoFactura As Archivo = TxtFormatoFactura.getfiles().Archivos(0)
|
||||
Dim PathFormato = $"{UsuarioActual.Empresa.Ruta}Formatos\"
|
||||
Dim dirFormato As String = String.Format("{0}\Factura.{1}", PathFormato, FormatoFactura.Extencion)
|
||||
Dim PathFormato = $"{ModExtensiones.DirectorioBaseEmpresas}Empresas\{CveEmpresa}\Formatos\"
|
||||
Dim dirFormato As String = String.Format("{0}\Factura.{1}", PathFormato, FormatoFactura.Extension)
|
||||
If File.Exists(dirFormato) Then
|
||||
My.Computer.FileSystem.DeleteFile(dirFormato)
|
||||
End If
|
||||
@@ -1940,7 +1940,7 @@ Partial Class Sistemas_WizardRegistro
|
||||
If TxtAddUnidadesMedida.getfiles().Archivos.Count > 0 Then
|
||||
Dim file As Archivo = TxtAddUnidadesMedida.getfiles().Archivos(0)
|
||||
Dim Directorio As String = ModExtensiones.DirectorioBaseEmpresas & file.patch
|
||||
Dim Tipo As String = If(file.Extencion.Contiene("xlsx", "xlsx", "xlsm", "xlsb"), "EXCEL", "CSV")
|
||||
Dim Tipo As String = If(file.Extension.Contiene("xlsx", "xlsx", "xlsm", "xlsb"), "EXCEL", "CSV")
|
||||
CargarExcelUnidadesMedida(Directorio, file.filename, Tipo)
|
||||
Else
|
||||
Alert("No existe el archivo.Favor de subir un archivo csv o excel a la plataforma", TipoMensaje.MsgError)
|
||||
@@ -2433,7 +2433,7 @@ Partial Class Sistemas_WizardRegistro
|
||||
If TxtAddProveedor.getfiles().Archivos.Count > 0 Then
|
||||
Dim file As Archivo = TxtAddProveedor.getfiles().Archivos(0)
|
||||
Dim Directorio As String = ModExtensiones.DirectorioBaseEmpresas & file.patch
|
||||
Dim Tipo As String = If(file.Extencion.Contiene("xlsx", "xlsx", "xlsm", "xlsb"), "EXCEL", "CSV")
|
||||
Dim Tipo As String = If(file.Extension.Contiene("xlsx", "xlsx", "xlsm", "xlsb"), "EXCEL", "CSV")
|
||||
CargarArchivoProveedor(Directorio, file.filename, Tipo)
|
||||
Else
|
||||
Alert("No existe el archivo.Favor de subir un archivo csv o excel a la plataforma", TipoMensaje.MsgError)
|
||||
@@ -2615,7 +2615,7 @@ Partial Class Sistemas_WizardRegistro
|
||||
If TxtAddClientes.getfiles().Archivos.Count > 0 Then
|
||||
Dim file As Archivo = TxtAddClientes.getfiles().Archivos(0)
|
||||
Dim Directorio As String = ModExtensiones.DirectorioBaseEmpresas & file.patch
|
||||
Dim Tipo As String = If(file.Extencion.Contiene("xlsx", "xlsx", "xlsm", "xlsb"), "EXCEL", "CSV")
|
||||
Dim Tipo As String = If(file.Extension.Contiene("xlsx", "xlsx", "xlsm", "xlsb"), "EXCEL", "CSV")
|
||||
CargarArchivoCliente(Directorio, file.filename, Tipo)
|
||||
Else
|
||||
Alert("No existe el archivo.Favor de subir un archivo csv o excel a la plataforma", TipoMensaje.MsgError)
|
||||
@@ -2807,7 +2807,7 @@ Partial Class Sistemas_WizardRegistro
|
||||
If TxtAddFactura.getfiles().Archivos.Count > 0 Then
|
||||
Dim file As Archivo = TxtAddFactura.getfiles().Archivos(0)
|
||||
Dim Directorio As String = ModExtensiones.DirectorioBaseEmpresas & file.patch
|
||||
Dim Tipo As String = If(file.Extencion.Contiene("xlsx", "xlsx", "xlsm", "xlsb"), "EXCEL", "CSV")
|
||||
Dim Tipo As String = If(file.Extension.Contiene("xlsx", "xlsx", "xlsm", "xlsb"), "EXCEL", "CSV")
|
||||
CargarArchivoFactura(Directorio, file.filename, Tipo)
|
||||
Else
|
||||
Alert("No existe el archivo.Favor de subir un archivo csv o excel a la plataforma", TipoMensaje.MsgError)
|
||||
|
||||
@@ -327,7 +327,7 @@ Partial Class RH_ActualizacionMasiva
|
||||
End If
|
||||
End Using
|
||||
If continuar Then
|
||||
Dim FileExtension As String = fileItem.Extencion.ToUpper()
|
||||
Dim FileExtension As String = fileItem.Extension.ToUpper()
|
||||
|
||||
If FileExtension = "XLS" Or FileExtension = "XLSX" Or FileExtension = "CSV" Then
|
||||
Else
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -177,8 +177,8 @@ public partial class UserControl_TareaNueva : System.Web.UI.UserControl
|
||||
foreach (Archivo item in TxtArchivo.getfiles().Archivos)
|
||||
{
|
||||
archivoname = item.filenameO;
|
||||
ArchivoExtencion = string.Format("{0}{1}", (item.Extencion.Length > 0 ? "." : ""), item.Extencion);
|
||||
rutaarchivoOri = string.Format("{0}{1}{2}", AppDomain.CurrentDomain.BaseDirectory, item.patch, item.filename);
|
||||
ArchivoExtencion = string.Format("{0}{1}", (item.Extension.Length > 0 ? "." : ""), item.Extension);
|
||||
rutaarchivoOri = string.Format("{0}{1}{2}", AppDomain.CurrentDomain.BaseDirectory, item.path, item.filename);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -389,7 +389,7 @@ Partial Class Ventas_ActualizarPrecios
|
||||
|
||||
If TxtExcel.getfiles().Archivos.Count > 0 Then
|
||||
Dim file As Archivo = TxtExcel.getfiles().Archivos(0)
|
||||
Dim Directorio As String = AppDomain.CurrentDomain.BaseDirectory & file.patch
|
||||
Dim Directorio As String = AppDomain.CurrentDomain.BaseDirectory & file.path
|
||||
CargarArchivo(Directorio, file.filename)
|
||||
Else
|
||||
Alert("No existe el archivo. Favor de subir un archivo excel a la plataforma.", TipoMensaje.MsgError)
|
||||
|
||||
@@ -74,7 +74,7 @@
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Vendedor" ItemStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlVendedor" runat="server" Text='<%# Eval("Vendedor", " {0}") %>'></asp:Literal>
|
||||
<asp:Literal ID="LtlVendedor" runat="server" Text='<%# Eval("Vendedor") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:TextBox ID="TxtVendedor" runat="server" CausesValidation="true" MaxLength="50" Text='<%# Eval("Vendedor") %>' ValidationGroup="GrpGV" Width="234px"></asp:TextBox>
|
||||
@@ -84,7 +84,7 @@
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Clasificación superior">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlClasificacionSup" runat="server" Text='<%# Eval("ClasificacionSup", " {0}") %>'></asp:Literal>
|
||||
<asp:Literal ID="LtlClasificacionSup" runat="server" Text='<%# Eval("ClasificacionSup") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:TextBox ID="TxtClasificacionSup" runat="server" CausesValidation="true" MaxLength="50" Text='<%# Eval("ClasificacionSup") %>' ValidationGroup="GrpGV" Width="234px"></asp:TextBox>
|
||||
|
||||
@@ -221,7 +221,7 @@ Partial Class CatMetasVendedores
|
||||
Private Sub BtnCargaExcel_Click(sender As Object, e As EventArgs) Handles BtnCargaExcel.Click
|
||||
If TxtExcel.getfiles().Archivos.Count > 0 Then
|
||||
Dim file As Archivo = TxtExcel.getfiles().Archivos(0)
|
||||
Dim Directorio As String = AppDomain.CurrentDomain.BaseDirectory & file.patch
|
||||
Dim Directorio As String = AppDomain.CurrentDomain.BaseDirectory & file.path
|
||||
CargarArchivo(Directorio, file.filename)
|
||||
Else
|
||||
Alert("No existe el archivo. Favor de subir un archivo excel a la plataforma.", TipoMensaje.MsgError)
|
||||
|
||||
@@ -8,7 +8,6 @@ Imports System.Data
|
||||
Imports Extensiones
|
||||
Imports Newtonsoft.Json
|
||||
Imports Newtonsoft.Json.Linq
|
||||
Imports WebServiceApp
|
||||
Imports System.Globalization
|
||||
Imports System.Web.Script.Services
|
||||
Imports System.Web.Script.Serialization
|
||||
|
||||
@@ -16,10 +16,6 @@ public partial class reporteador : ClsPaginas
|
||||
return ViewState["rutaArchivo"].ToString();
|
||||
}
|
||||
set { ViewState["rutaArchivo"] = value; }
|
||||
}
|
||||
protected void Page_PreInit(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
@@ -272,6 +272,14 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user