Merge branch 'master' of http://oirigoyen@192.168.10.111:8383/SIG.git
This commit is contained in:
@@ -6599,26 +6599,6 @@ Public Class ClsContabilidad
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function UpdateCompraTCValuacion(CveCompra As Integer, TCValuacion As Decimal) As Boolean
|
||||
Dim Retorno = False
|
||||
|
||||
DataAdapter("PA_Conta_ComprasTCValuacionUpdate")
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveCompra", SqlDbType.Int).Value = CveCompra
|
||||
.Add("@TCValuacion", SqlDbType.Decimal).Value = TCValuacion
|
||||
End With
|
||||
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
Me.OnError("Ocurrió un error al actualizar el tipo de cambio", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "IDisposable Support"
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
Option Strict On
|
||||
Option Explicit On
|
||||
|
||||
Imports System
|
||||
Imports System.Data
|
||||
Imports System.Data.SqlClient
|
||||
Imports Extensiones
|
||||
@@ -4111,6 +4112,32 @@ Public Class ClsGenerales
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
Public Function GetMediosTransporte(CveOrigen As Integer, Estatus As Boolean, CveEmpresa As Integer, CveTipoNomina As Integer, CveSubProyecto As Integer, Tipo As Integer, GPO As Integer) As Boolean
|
||||
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Agro_OrigenGet")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveOrigen", SqlDbType.Int).Value = CveOrigen
|
||||
.Add("@Estatus", SqlDbType.Bit).Value = Estatus
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
.Add("@CveTipoNomina", SqlDbType.Int).Value = CveTipoNomina
|
||||
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
|
||||
.Add("@Tipo", SqlDbType.Int).Value = Tipo
|
||||
.Add("@GPO", SqlDbType.Int).Value = GPO
|
||||
End With
|
||||
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
OnError($"Ocurrió un error al obtener los medios de transporte.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
|
||||
End Class
|
||||
|
||||
|
||||
|
||||
@@ -3052,6 +3052,27 @@ Public Class ClsNominas
|
||||
#End Region
|
||||
|
||||
|
||||
Public Function GetAsistenciabetweendate(CveEmpresa As Integer, FechaInicio As DateTime, FechaFin As DateTime) As Boolean
|
||||
Dim retorno As Boolean = False
|
||||
Try
|
||||
DTSet = New DataSet()
|
||||
DataAdapter("PA_RH_AsistenciaBetweenDates", CommandType.StoredProcedure)
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
.Add("@FechaInicio", SqlDbType.DateTime).Value = FechaInicio
|
||||
.Add("@FechaFin", SqlDbType.DateTime).Value = FechaFin
|
||||
End With
|
||||
SqlAdapter.Fill(Data)
|
||||
retorno = True
|
||||
Catch sqEx As SqlException
|
||||
retorno = False
|
||||
OnError("Ocurrió un error al obtener la asistencia de nomina.", sqEx, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
Catch ex As Exception
|
||||
retorno = False
|
||||
OnError("Ocurrió un error al obtener la asistencia de nomina.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End Try
|
||||
Return retorno
|
||||
End Function
|
||||
|
||||
Public Sub addParameters(varsql As String, sqltipe As SqlDbType, valor As Object)
|
||||
SqlAdapter.SelectCommand.Parameters.Add(varsql, sqltipe).Value = valor
|
||||
|
||||
@@ -1091,13 +1091,17 @@ Public Class ClsPaginas
|
||||
' Application("GlobalDTSucursales") = value
|
||||
' End Set
|
||||
'End Property
|
||||
Property GlobalDTSATUsosCFDI(Optional EsPersonaFisica As Integer = -1) As DataTable
|
||||
Property GlobalDTSATUsosCFDI(Optional EsPersonaFisica As Integer = -1, Optional RegimenFiscalReceptor As String = "-1") As DataTable
|
||||
Get
|
||||
If EsPersonaFisica <> -1 Then
|
||||
Dim Tipo As String = ""
|
||||
If EsPersonaFisica = 1 Then Tipo = "AplicaPersonaFisica = 1" Else Tipo = "AplicaPersonaMoral = 1"
|
||||
Dim Tipo As New StringBuilder
|
||||
If EsPersonaFisica = 1 Then Tipo.Append("AplicaPersonaFisica = 1") Else Tipo.Append("AplicaPersonaMoral = 1")
|
||||
|
||||
Dim Dv As New DataView(DirectCast(Application("GlobalDTSATUsosCFDI"), DataTable), Tipo, " UsoCFDIDescripcion", DataViewRowState.CurrentRows)
|
||||
If RegimenFiscalReceptor <> "-1" Then
|
||||
Tipo.AppendFormat("AND RegimenFiscalReceptor LIKE '%{0}%'", RegimenFiscalReceptor)
|
||||
End If
|
||||
|
||||
Dim Dv As New DataView(DirectCast(Application("GlobalDTSATUsosCFDI"), DataTable), Tipo.ToString(), " UsoCFDIDescripcion", DataViewRowState.CurrentRows)
|
||||
GlobalDTSATUsosCFDI = Dv.ToTable
|
||||
Dv.Dispose()
|
||||
Else
|
||||
|
||||
@@ -7180,6 +7180,31 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
Public Function UpPersonalSupervisorMasiva(CveEmpresa As Integer, CveUsuario As Integer, registros As List(Of RequestUpSupervisorMasiva)) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
Dim xmlProductos As System.Xml.Linq.XDocument = Nothing
|
||||
If registros IsNot Nothing AndAlso registros.Count > 0 Then
|
||||
xmlProductos = New System.Xml.Linq.XDocument(New System.Xml.Linq.XElement("registros", From x In registros Select New System.Xml.Linq.XElement("registro", New System.Xml.Linq.XElement("CvePersonal", x.CvePersonal), New System.Xml.Linq.XElement("CveUsuario", x.CveUsuario), New System.Xml.Linq.XElement("CveCliente", x.CveCliente))))
|
||||
End If
|
||||
Data = New DataTable
|
||||
SqlDataAdapter("PA_RH_PersonalSupervisorMasivaUP")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||
.Add("@xmlRegistros", SqlDbType.Xml).Value = xmlProductos.ToString()
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch Ex1 As SqlException
|
||||
Me.OnError("Ocurrió un error al guardar los supervisores.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al guardar los supervisores.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End Try
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
'Public msgsError As New StringBuilder()
|
||||
'Public Sub OnError(Mensaje As String, Exeption As Exception, Optional InfoAdicional As String = "")
|
||||
' GuardaLog(String.Format("{0} DESCRIPCIÓN DETALLADA: {1} {2} {3}", Mensaje, Exeption.ToString, vbCrLf, InfoAdicional))
|
||||
@@ -7236,3 +7261,8 @@ Public Class RequestUpAsistenciaDetalle
|
||||
Public Property CveSubProyecto As Integer
|
||||
Public Property Motivo As String
|
||||
End Class
|
||||
Public Class RequestUpSupervisorMasiva
|
||||
Public Property CvePersonal As Integer
|
||||
Public Property CveUsuario As Integer
|
||||
Public Property CveCliente As Integer
|
||||
End Class
|
||||
@@ -745,7 +745,8 @@ Public Class ClsVentas
|
||||
Public Function UpdateEstatusFactura(Estatus As Integer, FolioFiscal As String, SelloSAT As String, FechaCancelacion As DateTime, CveVenta As Integer,
|
||||
Optional IdPolizaCancelacion As Integer = -1, Optional CvePAC As Integer = -1, Optional CveEstatusRefacturacion As Integer = 0,
|
||||
Optional CveUsuarioCambiaEstatus As Integer = -1, Optional FechaCambioEstatus As String = "-1", Optional RFCReceptor As String = "-1",
|
||||
Optional CveMotivoCancelacion As Integer = -1, Optional MotivoCancelacion As String = "", Optional EstadoCancelacion As String = "") As Boolean
|
||||
Optional CveMotivoCancelacion As Integer = -1, Optional MotivoCancelacion As String = "", Optional EstadoCancelacion As String = "",
|
||||
Optional CveEstadoCancelacion As Integer = 0) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_VentasUpdateEstatus")
|
||||
@@ -765,6 +766,7 @@ Public Class ClsVentas
|
||||
.Add("@CveMotivoCancelacion", SqlDbType.Int).Value = CveMotivoCancelacion
|
||||
.Add("@MotivoCancelacion", SqlDbType.VarChar).Value = MotivoCancelacion
|
||||
.Add("@EstadoCancelacion", SqlDbType.VarChar).Value = EstadoCancelacion
|
||||
.Add("@CveEstadoCancelacion", SqlDbType.TinyInt).Value = CveEstadoCancelacion
|
||||
End With
|
||||
|
||||
Try
|
||||
@@ -855,7 +857,7 @@ Public Class ClsVentas
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
Public Function UpdateCancelaVenta(CveVenta As Integer, FechaCancelacion As DateTime, SelloCancelacionSAT As String, CveEmpresa As Integer, Optional CvePAC As Integer = -1, Optional CveEstatusRefacturacion As Integer = 0, Optional EstadoCancelacion As String = "") As Boolean
|
||||
Public Function UpdateCancelaVenta(CveVenta As Integer, FechaCancelacion As DateTime, SelloCancelacionSAT As String, CveEmpresa As Integer, Optional CvePAC As Integer = -1, Optional CveEstatusRefacturacion As Integer = 0, Optional EstadoCancelacion As String = "", Optional CveEstadoCancelacion As Integer = 0) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_Vta_VentasCancelacion")
|
||||
@@ -868,6 +870,7 @@ Public Class ClsVentas
|
||||
.Add("@CvePAC", SqlDbType.SmallInt).Value = CvePAC
|
||||
.Add("@CveEstatusRefacturacion", SqlDbType.TinyInt).Value = CveEstatusRefacturacion
|
||||
.Add("@EstadoCancelacion", SqlDbType.VarChar).Value = EstadoCancelacion
|
||||
.Add("@CveEstadoCancelacion", SqlDbType.TinyInt).Value = CveEstadoCancelacion
|
||||
.Add("@Cancelada", SqlDbType.SmallInt).Direction = ParameterDirection.Output
|
||||
End With
|
||||
|
||||
|
||||
@@ -4636,8 +4636,8 @@ Namespace Modelos
|
||||
''' Cancela la factura para poder realizar la refacturacion
|
||||
''' </summary>
|
||||
''' <returns></returns>
|
||||
Public Function CancelarPorRefacturacion(CveMotivoCancelacion As Integer, Motivo As String, Optional FolioSustitucion As String = "", Optional ValidarSAT As Boolean = False) As MCancelacionVentaMensaje
|
||||
Return CancelarVenta(Me, Me.UsuarioActual, EsRefacturacion:=True, CveMotivoCancelacion:=CveMotivoCancelacion, MotivoCancelacion:=Motivo, FolioSustitucion:=FolioSustitucion, ValidarSAT:=ValidarSAT)
|
||||
Public Function CancelarPorRefacturacion(CveMotivoCancelacion As Integer, Motivo As String, Optional FolioSustitucion As String = "", Optional ValidarSAT As Boolean = False, Optional CveEstadoCancelacion As Integer = 0) As MCancelacionVentaMensaje
|
||||
Return CancelarVenta(Me, Me.UsuarioActual, EsRefacturacion:=True, CveMotivoCancelacion:=CveMotivoCancelacion, MotivoCancelacion:=Motivo, FolioSustitucion:=FolioSustitucion, ValidarSAT:=ValidarSAT, CveEstadoCancelacion:=CveEstadoCancelacion)
|
||||
End Function
|
||||
''' <summary>
|
||||
''' Cancela la factura y realiza las operaciones correspondientes
|
||||
@@ -4645,15 +4645,15 @@ Namespace Modelos
|
||||
''' <param name="RealizarDevolucionAlmacen"></param>
|
||||
''' <param name="ListaRemisionesCancelar"></param>
|
||||
''' <returns></returns>
|
||||
Public Function CancelarFactura(RealizarDevolucionAlmacen As Boolean, Optional ListaRemisionesCancelar As List(Of Integer) = Nothing, Optional CveMotivoCancelacion As Integer = -1, Optional Motivo As String = "", Optional ValidarSAT As Boolean = True) As MCancelacionVentaMensaje
|
||||
Public Function CancelarFactura(RealizarDevolucionAlmacen As Boolean, Optional ListaRemisionesCancelar As List(Of Integer) = Nothing, Optional CveMotivoCancelacion As Integer = -1, Optional Motivo As String = "", Optional ValidarSAT As Boolean = True, Optional CveEstadoCancelacion As Integer = 0) As MCancelacionVentaMensaje
|
||||
'Comprobante emitido con errores sin relación
|
||||
Return CancelarVenta(Me, Me.UsuarioActual, RealizarDevolucionAlmacen:=RealizarDevolucionAlmacen, ListaRemisionesCancelar:=ListaRemisionesCancelar, CveMotivoCancelacion:=CveMotivoCancelacion, MotivoCancelacion:=Motivo)
|
||||
Return CancelarVenta(Me, Me.UsuarioActual, RealizarDevolucionAlmacen:=RealizarDevolucionAlmacen, ListaRemisionesCancelar:=ListaRemisionesCancelar, CveMotivoCancelacion:=CveMotivoCancelacion, MotivoCancelacion:=Motivo, CveEstadoCancelacion:=CveEstadoCancelacion)
|
||||
End Function
|
||||
|
||||
Private Function CancelarVenta(ObjFactura As Modelos.Factura, UsuarioActual As Usuario, Optional EsRefacturacion As Boolean = False, Optional RealizarDevolucionAlmacen As Boolean = False,
|
||||
Optional ListaRemisionesCancelar As List(Of Integer) = Nothing, Optional CveEstatusFacturaAsignado As Integer = -1,
|
||||
Optional FechaCancelacion As String = "-1", Optional AcuseCancelacion As String = "",
|
||||
Optional CveMotivoCancelacion As Integer = -1, Optional MotivoCancelacion As String = "", Optional FolioSustitucion As String = "", Optional ValidarSAT As Boolean = True) As MCancelacionVentaMensaje
|
||||
Optional ListaRemisionesCancelar As List(Of Integer) = Nothing, Optional CveEstatusFacturaAsignado As Integer = -1, Optional FechaCancelacion As String = "-1",
|
||||
Optional AcuseCancelacion As String = "", Optional CveMotivoCancelacion As Integer = -1, Optional MotivoCancelacion As String = "",
|
||||
Optional FolioSustitucion As String = "", Optional ValidarSAT As Boolean = True, Optional CveEstadoCancelacion As Integer = 0) As MCancelacionVentaMensaje
|
||||
Dim Retorno As New MCancelacionVentaMensaje()
|
||||
Dim ErrorList As New List(Of String)
|
||||
|
||||
@@ -4801,6 +4801,7 @@ Namespace Modelos
|
||||
|
||||
Dim CveEstatusRefacturacion As Integer = If(ObjFactura.CveEstatusRefacturacion <= 0, 0, ObjFactura.CveEstatusRefacturacion)
|
||||
|
||||
|
||||
If Not EsRefacturacion Then
|
||||
CveEstatusRefacturacion = 0
|
||||
End If
|
||||
@@ -4828,7 +4829,7 @@ Namespace Modelos
|
||||
Dim Continuar As Boolean = False
|
||||
Dim ContinuarCancelacion As Boolean = False
|
||||
Dim ObtenerAcuse As Boolean = False
|
||||
Dim RequiereAceptacion As Boolean = False
|
||||
Dim RequiereAceptacion As Boolean = True
|
||||
Dim Mensaje As String = ""
|
||||
|
||||
Dim CveSATMotivoCancelacion As Integer = -1
|
||||
@@ -4845,6 +4846,14 @@ Namespace Modelos
|
||||
CveEstatusFacturaAsignado = 23
|
||||
End If
|
||||
|
||||
'SI NO SE ASIGNA EL ESTATUS DE CANCELACION, TOMA EL GUARADO DE LA FACTURA
|
||||
CveEstadoCancelacion = If(CveEstadoCancelacion <= 0, ObjFactura.CveEstadoCancelacion, CveEstadoCancelacion)
|
||||
|
||||
'SI YA SE CONOCE EL ESTADO DE CANCELACION, NO LO VERIFICA ANTE EL SAT
|
||||
If CveEstadoCancelacion > 0 Then
|
||||
ValidarSAT = False
|
||||
End If
|
||||
|
||||
If CveEstatusFacturaAsignado <= 0 Then
|
||||
Try
|
||||
If ObjFactura.FolioFiscal <> "" AndAlso (UsuarioActual.Empresa.FacturaProduccion OrElse UsuarioActual.CveEmpresa = 1) Then
|
||||
@@ -4919,22 +4928,26 @@ Namespace Modelos
|
||||
If Vigencia.EstatusCancelacion.ToUpper() = "EN PROCESO" Then
|
||||
CveEstatus = 20
|
||||
ContinuarCancelacion = False
|
||||
RequiereAceptacion = True
|
||||
ElseIf Vigencia.EsCancelable.ToUpper() = "CANCELABLE CON ACEPTACIÓN" Then
|
||||
CveEstatus = 20
|
||||
ContinuarCancelacion = True
|
||||
RequiereAceptacion = True
|
||||
ElseIf Vigencia.EsCancelable.ToUpper() = "CANCELABLE SIN ACEPTACIÓN" Then
|
||||
ContinuarCancelacion = True
|
||||
RequiereAceptacion = False
|
||||
CveEstatus = 5
|
||||
End If
|
||||
|
||||
Else
|
||||
If Vigencia.EsCancelable.ToUpper() = "CANCELABLE SIN ACEPTACIÓN" Then
|
||||
ContinuarCancelacion = True
|
||||
RequiereAceptacion = False
|
||||
CveEstatus = 5
|
||||
Else
|
||||
CveEstatus = 20
|
||||
ContinuarCancelacion = False
|
||||
RequiereAceptacion = True
|
||||
CancelacionFecha = Now.Date
|
||||
CancelacionAcuse = ""
|
||||
End If
|
||||
@@ -4951,10 +4964,19 @@ Namespace Modelos
|
||||
CancelacionFecha = Now.Date
|
||||
CancelacionAcuse = ""
|
||||
|
||||
Dim diasTimbrado As Decimal = DateDiff(DateInterval.Day, ObjFactura.FechaCP, Now)
|
||||
'VERICA SI YA SE TIENE EL ESTADO DE CANCELACION, PARA SABER SI REQUIERE ACEPTACION
|
||||
If CveEstadoCancelacion > 0 Then
|
||||
If CveEstadoCancelacion = 1 Then
|
||||
RequiereAceptacion = False
|
||||
ElseIf CveEstadoCancelacion = 2 Then
|
||||
RequiereAceptacion = True
|
||||
End If
|
||||
Else
|
||||
Dim diasTimbrado As Decimal = DateDiff(DateInterval.Day, ObjFactura.FechaCP, Now)
|
||||
|
||||
If ObjFactura.Total < 5000D OrElse diasTimbrado <= 3 OrElse ObjFactura.Cliente.RFC.Contiene("XAXX010101000", "XEXX010101000") Then
|
||||
RequiereAceptacion = False
|
||||
If ObjFactura.Total < 1000D OrElse diasTimbrado <= 1 OrElse ObjFactura.Cliente.RFC.Contiene("XAXX010101000", "XEXX010101000") Then
|
||||
RequiereAceptacion = False
|
||||
End If
|
||||
End If
|
||||
|
||||
End If
|
||||
@@ -5596,13 +5618,14 @@ Namespace Modelos
|
||||
|
||||
|
||||
If CveEstatus.Contiene(4, 5) Then
|
||||
If Not ObjVentas.UpdateCancelaVenta(CveVenta, CancelacionFecha, CancelacionAcuse, UsuarioActual.CveEmpresa, CvePACCancelacion, CveEstatusRefacturacion, EstadoCancelacion:=EstadoCancelacion) Then
|
||||
If Not ObjVentas.UpdateCancelaVenta(CveVenta, CancelacionFecha, CancelacionAcuse, UsuarioActual.CveEmpresa, CvePACCancelacion, CveEstatusRefacturacion, EstadoCancelacion:=EstadoCancelacion, CveEstadoCancelacion:=CveEstadoCancelacion) Then
|
||||
ErrorCancelar = True
|
||||
MensajeError = "Ocurrió un error al guardar el estatus de cancelación."
|
||||
End If
|
||||
Else
|
||||
If Not ObjVentas.UpdateEstatusFactura(CveEstatus, FolioFiscal, CancelacionAcuse, CancelacionFecha, CveVenta, IDPoliza, CvePAC:=CvePACCancelacion, CveEstatusRefacturacion:=CveEstatusRefacturacion,
|
||||
CveUsuarioCambiaEstatus:=UsuarioActual.CveUsuario, FechaCambioEstatus:=Now.ToString("yyyy-MM-dd HH:mm:ss.mmm"), CveMotivoCancelacion:=CveMotivoCancelacion, MotivoCancelacion:=MotivoCancelacion, EstadoCancelacion:=EstadoCancelacion) Then
|
||||
CveUsuarioCambiaEstatus:=UsuarioActual.CveUsuario, FechaCambioEstatus:=Now.ToString("yyyy-MM-dd HH:mm:ss.mmm"), CveMotivoCancelacion:=CveMotivoCancelacion,
|
||||
MotivoCancelacion:=MotivoCancelacion, EstadoCancelacion:=EstadoCancelacion, CveEstadoCancelacion:=CveEstadoCancelacion) Then
|
||||
ErrorCancelar = True
|
||||
MensajeError = "Ocurrió un error al guardar el estatus de cancelación."
|
||||
End If
|
||||
@@ -6257,6 +6280,7 @@ Namespace Modelos
|
||||
Public Property RFCReceptor As String = ""
|
||||
Public Property ServicioDomicilio As Boolean
|
||||
Public Property CveEstatusRefacturacion As Integer = 0
|
||||
Public Property CveEstadoCancelacion As Integer = 0
|
||||
Public Property NuevaFactura As Integer
|
||||
Public Property EnviarCorreo As Boolean = False
|
||||
Public Property ErrorList As List(Of String)
|
||||
|
||||
@@ -242,9 +242,9 @@
|
||||
</div>
|
||||
|
||||
<div class="col-md-2" style="text-align: right!important">
|
||||
<asp:Button Text="Generar Proveedores" runat="server" ID="BtnGeneraCompras" OnClick="BtnGeneraCompras_Click" Style="margin-left: 30px;" class="btn btn-primary" ValidationGroup="GrpGuardarCompras" />
|
||||
<asp:Button Text="Generar Proveedores" runat="server" ID="BtnGeneraCompras" Visible="false" OnClick="BtnGeneraCompras_Click" Style="margin-left: 30px;" class="btn btn-primary" ValidationGroup="GrpGuardarCompras" />
|
||||
<asp:HiddenField ID="HdnProveedorCvePrePoliza" runat="server" />
|
||||
<asp:Button ID="BtnProveedoresRemove" runat="server" Text="Eliminar" OnClick="BtnProveedoresRemove_Click" class="btn btn-primary" /></div>
|
||||
<asp:Button ID="BtnProveedoresRemove" runat="server" Text="Eliminar" Visible="false" OnClick="BtnProveedoresRemove_Click" class="btn btn-primary" /></div>
|
||||
|
||||
</div>
|
||||
|
||||
@@ -256,7 +256,7 @@
|
||||
<Columns>
|
||||
<asp:HyperLinkField HeaderText="Proveedor" DataTextField="NombreComercial" Target="_blank" DataNavigateUrlFormatString="/Compras/Proveedores.aspx?CveProveedor={0}" DataNavigateUrlFields="CveProveedor" />
|
||||
<asp:HyperLinkField HeaderText="# Facturas" DataTextField="SerieFolio" Target="_blank" DataNavigateUrlFormatString="/Compras/Compras.aspx?CveCompra={0}" DataNavigateUrlFields="CveCompra"/>
|
||||
<asp:BoundField DataField="TipoDocto" HeaderText="Tipo" />
|
||||
<asp:BoundField DataField="TipoDocto" HeaderText="Tipo" />
|
||||
<asp:BoundField DataField="TipoCambio" HeaderText="TipoCambio" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="Saldo USD" DataField="Saldo" DataFormatString="{0:N2}" ItemStyle-Width="100" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="Fluctuación Pesos" DataField="FluctuacionTotal" DataFormatString="{0:N2}" ItemStyle-Width="100" ItemStyle-HorizontalAlign="Right" />
|
||||
@@ -335,7 +335,7 @@
|
||||
<asp:TextBox ID="TxtConceptoVentas" Style="text-transform: uppercase;" runat="server" MaxLength="100" CssClass="form-control " Width="90%"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVTxtConceptoVentas" runat="server" CssClass="help-block errorimput" ControlToValidate="TxtConceptoVentas"
|
||||
ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Concepto''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarVentas"></asp:RequiredFieldValidator>
|
||||
<label for="<%= TxtConceptoCompras.ClientID.ToString()%>">Concepto:</label>
|
||||
<label for="<%= TxtConceptoVentas.ClientID.ToString()%>">Concepto:</label>
|
||||
<i></i>
|
||||
</div>
|
||||
|
||||
@@ -347,22 +347,19 @@
|
||||
</label>
|
||||
<asp:RequiredFieldValidator ID="RFVDdlsubProyectoVentas" runat="server" CssClass="help-block errorimput" InitialValue="-1" ControlToValidate="DdlsubProyectoVentas" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo es necesario, por favor ingréselo." ValidationGroup="GrpGuardarVentas"></asp:RequiredFieldValidator>
|
||||
<i></i>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-6" style="text-align: right!important">
|
||||
<asp:Button Text="Generar Clientes" runat="server" ID="BtnGeneraVentas" OnClick="BtnGeneraVentas_Click" Style="margin-left: 30px;" class="btn btn-primary" ValidationGroup="GrpGuardarVentas" />
|
||||
<asp:Button Text="Generar Ventas" runat="server" ID="BtnGeneraVentas" Visible="false" OnClick="BtnGeneraVentas_Click" Style="margin-left: 30px;" class="btn btn-primary" ValidationGroup="GrpGuardarVentas" />
|
||||
<asp:HiddenField ID="HdnClienteCvePrePoliza" runat="server" />
|
||||
<asp:Button ID="BtnClientesRemove" runat="server" Text="Eliminar" Visible="false" OnClick="BtnClientesRemove_Click" class="btn btn-primary" /></div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<br />
|
||||
|
||||
|
||||
|
||||
<br />
|
||||
|
||||
<asp:GridView ID="GvVentas" Width="99%" runat="server" AutoGenerateColumns="False"
|
||||
DataKeyNames="TipoCambio,Fluctuacion,CveVenta,SerieFolio,CveIE,IdCtaContComplementaria,TipoDocto,CveIE" EmptyDataText="No se Encontraron Cuentas Bancarias."
|
||||
DataKeyNames="TipoCambio,Fluctuacion,CveVenta,SerieFolio,CveIE,IdCtaContComplementaria,TipoDocto" EmptyDataText="No se Encontraron Cuentas Bancarias."
|
||||
ToolTip="Listado de Cuentas Bancarias" CssClass="table table-hover table-striped ScrollAD mysmallbtn" GridLines="None">
|
||||
<Columns>
|
||||
<asp:HyperLinkField DataTextField="Nombre" HeaderText="Cliente" Target="_blank" DataNavigateUrlFormatString="/Ventas/Clientes.aspx?CveCliente={0}" DataNavigateUrlFields="CveCliente" />
|
||||
@@ -380,11 +377,9 @@
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
<ajax:TabPanel runat="server" ID="TabCuentasBancarias" HeaderText="Cuentas Bancarias">
|
||||
<ContentTemplate>
|
||||
|
||||
<ContentTemplate>
|
||||
<br />
|
||||
<div class="row">
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-5 form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtConceptoBancos" Style="text-transform: uppercase;" runat="server" MaxLength="100" CssClass="form-control " Width="90%"></asp:TextBox>
|
||||
@@ -402,17 +397,12 @@
|
||||
</label>
|
||||
<asp:RequiredFieldValidator ID="RFVDdlSubproyectoBancos" runat="server" CssClass="help-block errorimput" InitialValue="-1" ControlToValidate="DdlSubproyectoBancos" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo es necesario, por favor ingréselo." ValidationGroup="GrpGuardarBancos"></asp:RequiredFieldValidator>
|
||||
<i></i>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class="col-md-6" style="text-align: right!important">
|
||||
<asp:Button Text="Generar Bancos" runat="server" ID="BtnGeneraBancos" OnClick="BtnGeneraBancos_Click" Style="margin-left: 30px;" class="btn btn-primary" ValidationGroup="GrpGuardarBancos" />
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<br />
|
||||
<asp:GridView ID="GvCuentas" Width="99%" runat="server" AutoGenerateColumns="False"
|
||||
@@ -438,12 +428,7 @@
|
||||
</ajax:TabPanel>
|
||||
<ajax:TabPanel runat="server" ID="TabDeudores" HeaderText="Deudores">
|
||||
<ContentTemplate>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<br />
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-5 form-group form-md-line-input input-iconright">
|
||||
@@ -462,8 +447,7 @@
|
||||
</label>
|
||||
<asp:RequiredFieldValidator ID="RFVRFVDdlSubProyectoDeudores" runat="server" CssClass="help-block errorimput" InitialValue="-1" ControlToValidate="DdlSubProyectoDeudores" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo es necesario, por favor ingréselo." ValidationGroup="GrpGuardarDeudores"></asp:RequiredFieldValidator>
|
||||
<i></i>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-6" style="text-align: right!important">
|
||||
<asp:Button Text="Generar Deudores" runat="server" ID="BtnGeneraDedudores" OnClick="BtnGeneraDedudores_Click" Style="margin-left: 30px;" class="btn btn-primary" ValidationGroup="GrpGuardarDeudores" />
|
||||
@@ -514,20 +498,23 @@
|
||||
<asp:RequiredFieldValidator ID="RFVDdlSubProyectoAcreedores" runat="server" CssClass="help-block errorimput" InitialValue="-1" ControlToValidate="DdlSubProyectoAcreedores" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo es necesario, por favor ingréselo." ValidationGroup="GrpGuardarAcreedores"></asp:RequiredFieldValidator>
|
||||
<i></i>
|
||||
</div>
|
||||
<div class="col-md-6" style="text-align: right!important">
|
||||
<asp:Button Text="Generar Acreedores" runat="server" ID="BtnGeneraAcreedores" OnClick="BtnGeneraAcreedores_Click" Style="margin-left: 30px;" class="btn btn-primary" ValidationGroup="GrpGuardarAcreedores" />
|
||||
<div class="col-md-3" style="text-align: right!important">
|
||||
<asp:Button Text="Generar Acreedores" runat="server" ID="BtnGeneraAcreedores" Visible="false" OnClick="BtnGeneraAcreedores_Click" Style="margin-left: 30px;" class="btn btn-primary" ValidationGroup="GrpGuardarAcreedores" />
|
||||
<asp:HiddenField ID="HdnAcreedorCvePrePoliza" runat="server" />
|
||||
<asp:Button ID="BtnAcreedoresRemove" runat="server" Text="Eliminar" Visible="false" OnClick="BtnAcreedoresRemove_Click" class="btn btn-primary" />
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
|
||||
</div>
|
||||
|
||||
<br />
|
||||
|
||||
<asp:GridView ID="GvAcreedores" Width="99%" runat="server" AutoGenerateColumns="False"
|
||||
DataKeyNames="CveCompra,CveProveedor,Fluctuacion,SerieFolio,IdCtaContComplementaria,CveIE"
|
||||
DataKeyNames="CveCompra,CveProveedor,TipoCambio,Fluctuacion,SerieFolio,IdCtaContComplementaria,CveIE"
|
||||
EmptyDataText="No se Encontraron compras pendientes de pagar." ToolTip="Listado de Compras"
|
||||
CssClass="table table-hover table-striped ScrollAD mysmallbtn" GridLines="None">
|
||||
<Columns>
|
||||
<asp:HyperLinkField HeaderText="Proveedor" DataTextField="NombreComercial" Target="_blank" ItemStyle-HorizontalAlign="Left" DataNavigateUrlFormatString="/Compras/Proveedores.aspx?CveProveedor={0}" DataNavigateUrlFields="CveProveedor" />
|
||||
<asp:BoundField HeaderText="# Facturas" DataField="SerieFolio" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:HyperLinkField HeaderText="# Facturas" DataTextField="SerieFolio" Target="_blank" DataNavigateUrlFormatString="/Compras/Compras.aspx?CveCompra={0}" DataNavigateUrlFields="CveCompra"/>
|
||||
<asp:BoundField DataField="TipoCambio" HeaderText="TipoCambio" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="Saldo USD" DataField="Saldo" DataFormatString="{0:N2}" ItemStyle-Width="100" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="Fluctuación Pesos" DataField="Fluctuacion" DataFormatString="{0:N2}" ItemStyle-Width="100" ItemStyle-HorizontalAlign="Right" />
|
||||
@@ -535,6 +522,7 @@
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
<asp:Label ID="LblTotalAcreedores" runat="server" Text=""></asp:Label>
|
||||
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
<ajax:TabPanel runat="server" ID="TabFilial" HeaderText="Filial">
|
||||
@@ -559,20 +547,17 @@
|
||||
</label>
|
||||
<asp:RequiredFieldValidator ID="RFVDdlSubProyectoFiliales" runat="server" CssClass="help-block errorimput" InitialValue="-1" ControlToValidate="DdlSubProyectoFiliales" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo es necesario, por favor ingréselo." ValidationGroup="GrpGuardarFiliales"></asp:RequiredFieldValidator>
|
||||
<i></i>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-6" style="text-align: right!important">
|
||||
<asp:Button Text="Generar Filiales" runat="server" ID="BtnGeneraFiliales" OnClick="BtnGeneraFiliales_Click" Style="margin-left: 30px;" class="btn btn-primary" ValidationGroup="GrpGuardarFiliales" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<br />
|
||||
|
||||
<br />
|
||||
|
||||
<div style="float: right; margin-right: 50px;">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<asp:GridView ID="GvFiliales" Width="99%" runat="server" AutoGenerateColumns="False"
|
||||
DataKeyNames="IdCtaAfectable,TipoCambio,Fluctuacion,RazonSocial,CveIE,Folio"
|
||||
|
||||
@@ -168,7 +168,11 @@ Partial Class Bancos_FluctuacionCambiaria
|
||||
Dim PerdidaAux As Double = Perdida.SUM("Fluctuacion", "Fluctuacion < 0").Abs
|
||||
Dim GanaciaAux As Double = Ganancias.SUM("Fluctuacion", "Fluctuacion > 0")
|
||||
|
||||
Dim Final As Double = GanaciaAux - PerdidaAux
|
||||
Dim Final As Double = GanaciaAux - PerdidaAux
|
||||
HdnClienteCvePrePoliza.Value = ObjBancos.DtResultados.MAX("CvePrePoliza").ToString
|
||||
HdnCveFluctuacionBitacora.Value = ObjBancos.DtResultados.MAX("CveFluctuacionBitacora").ToString
|
||||
BtnClientesRemove.Visible = HdnClienteCvePrePoliza.Value.ToEntero > 0
|
||||
BtnGeneraVentas.Visible = Not HdnClienteCvePrePoliza.Value.ToEntero > 0
|
||||
|
||||
IImagenFinalVentas.Attributes("class") = If(Final > 0, "widget-thumb-icon bg-green-jungle fa fa-usd", "widget-thumb-icon bg-red fa fa-usd")
|
||||
|
||||
@@ -255,6 +259,11 @@ Partial Class Bancos_FluctuacionCambiaria
|
||||
If ObjBancos.GetFluctuaciones(FechaUltimoDiaMes, 6, UsuarioActual.CveEmpresa) Then
|
||||
GvAcreedores.DataSource = ObjBancos.DtResultados
|
||||
LblTotalAcreedores.Text = ObjBancos.DtResultados.SUM("Fluctuacion").FormatoNumero
|
||||
HdnAcreedorCvePrePoliza.Value = ObjBancos.DtResultados.MAX("CvePrePoliza").ToString
|
||||
HdnCveFluctuacionBitacora.Value = ObjBancos.DtResultados.MAX("CveFluctuacionBitacora").ToString
|
||||
BtnAcreedoresRemove.Visible = HdnAcreedorCvePrePoliza.Value.ToEntero > 0
|
||||
BtnGeneraAcreedores.Visible = Not HdnAcreedorCvePrePoliza.Value.ToEntero > 0
|
||||
|
||||
Else
|
||||
GvAcreedores.DataSource = Nothing
|
||||
Alert("Ocurrio un error al cargar los acreedores", TipoMensaje.MsgAdvertencia)
|
||||
@@ -344,7 +353,6 @@ Partial Class Bancos_FluctuacionCambiaria
|
||||
ErrorRegistrar = True
|
||||
Exit For
|
||||
End If
|
||||
|
||||
Next
|
||||
|
||||
Banco.UpdateFluctuacionesBitacoraPrePoliza(CvePrePoliza, 1, CveBitacora, UsuarioActual.CveEmpresa)
|
||||
@@ -353,9 +361,11 @@ Partial Class Bancos_FluctuacionCambiaria
|
||||
|
||||
If Not ErrorRegistrar Then
|
||||
Conta.Commit()
|
||||
BtnGeneraCompras.Visible = False
|
||||
Alert(String.Format("La Fluctuación se ha generado <br/> <a href='/Contabilidad/RegPrePoliza.aspx?CvePrePoliza={0}'>Ver PrePóliza</a>", CvePrePoliza), TipoMensaje.MsgInformacion)
|
||||
Else
|
||||
Conta.RollBack()
|
||||
Conta.RollBack()
|
||||
Alert("Error al generar la fluctuación", TipoMensaje.MsgError)
|
||||
End If
|
||||
Conta.Dispose()
|
||||
End Sub
|
||||
@@ -448,13 +458,14 @@ Partial Class Bancos_FluctuacionCambiaria
|
||||
ErrorRegistrar = True
|
||||
End If
|
||||
|
||||
|
||||
If Not ErrorRegistrar Then
|
||||
Conta.Commit()
|
||||
BtnGeneraVentas.Visible = False
|
||||
Alert(String.Format("La Fluctuación se ha generado <br/> <a href='/Contabilidad/RegPrePoliza.aspx?CvePrePoliza={0}'>Ver PrePóliza</a>", CvePrePoliza), TipoMensaje.MsgInformacion)
|
||||
|
||||
Else
|
||||
Conta.RollBack()
|
||||
Alert("Error al generar la fluctuación", TipoMensaje.MsgError)
|
||||
End If
|
||||
Conta.Dispose()
|
||||
End Sub
|
||||
@@ -731,7 +742,6 @@ Partial Class Bancos_FluctuacionCambiaria
|
||||
Dim Banco As New ClsBancos(Conta.IniciaTransacSQL())
|
||||
Dim CvePrePoliza As Integer = Conta.AddPrePolizas("Banc/FluctuaA", 1, 0, 0, 1, FechaUltimoDiaMes, TxtConceptoAcreedores.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||
Dim idCta As Integer = 0
|
||||
Dim CveCuenta As Integer = 0
|
||||
Dim CveCuentaPerdida, CveCuentaGanancia As Integer
|
||||
Dim idCtaPerdida, IdCtaGanancia As Integer
|
||||
Dim TipoMovto As Boolean = False
|
||||
@@ -750,23 +760,21 @@ Partial Class Bancos_FluctuacionCambiaria
|
||||
Total = LblTotalAcreedores.Text.ToDecimal
|
||||
If Total > 0 Then
|
||||
CveConceptoContable = 64
|
||||
CveCuenta = CveCuentaGanancia
|
||||
idCta = IdCtaGanancia
|
||||
TipoMovto = True
|
||||
Else
|
||||
CveConceptoContable = 65
|
||||
CveCuenta = CveCuentaPerdida
|
||||
idCta = idCtaPerdida
|
||||
TipoMovto = False
|
||||
End If
|
||||
|
||||
Dim TCUltimaFluctuacion As Decimal = GlobalTipoCambio(FechaUltimoDiaMes).ToDecimal()
|
||||
|
||||
If Not Conta.AddPrePolizasDetalle(CvePrePoliza, TipoMovto, Math.Abs(Total), "Fluctuación Acreedores", CveConceptoContable, "Fluctuación Acreedores", Now, idCta, 0, ImporteMX:=Math.Abs(Total), CveCuenta:=CveCuenta, CveSubProyecto:=DdlSubProyectoAcreedores.SelectedValue.ToEntero) Then
|
||||
If Not Conta.AddPrePolizasDetalle(CvePrePoliza, TipoMovto, Math.Abs(Total), "Fluctuación Acreedores", CveConceptoContable, "Fluctuación Acreedores", Now, idCta, 0, ImporteMX:=Math.Abs(Total), CveSubProyecto:=DdlSubProyectoAcreedores.SelectedValue.ToEntero) Then
|
||||
ErrorRegistrar = True
|
||||
End If
|
||||
|
||||
Dim CveBitacora As Integer = Banco.AddFluctuacionesBitacora(-1, FechaUltimoDiaMes, 1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||
Dim CveBitacora As Integer = Banco.AddFluctuacionesBitacora(-1, FechaUltimoDiaMes, 6, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||
If CveBitacora <= 0 Then
|
||||
ErrorRegistrar = True
|
||||
End If
|
||||
@@ -778,26 +786,26 @@ Partial Class Bancos_FluctuacionCambiaria
|
||||
IdCtaComplementaria = gvr.DataKey("IdCtaContComplementaria").ToString().ToEntero()
|
||||
|
||||
'movimiento de complementaria
|
||||
If Not Conta.AddPrePolizasDetalle(CvePrePoliza, False, Total, gvr.DataKey("SerieFolio"), 202, gvr.DataKey("SerieFolio"), Now, IdCtaComplementaria, 0, CveCompra:=gvr.DataKey("CveCompra").ToEntero, TipoCambio:=TC, ImporteMX:=Total, ImporteME:=Total, CveCuenta:=CveCuentaComplementaria) Then
|
||||
If Not Conta.AddPrePolizasDetalle(CvePrePoliza, False, Total, gvr.DataKey("SerieFolio"), 202, gvr.DataKey("SerieFolio"), Now, IdCtaComplementaria, 0, CveCompra:=gvr.DataKey("CveCompra").ToEntero, TipoCambio:=TC, TipoCambioPago:=gvr.DataKey("TipoCambio").ToDecimal, ImporteMX:=Total, ImporteME:=Total, CveIE:=gvr.DataKey("CveIE").ToEntero) Then
|
||||
ErrorRegistrar = True
|
||||
Exit For
|
||||
End If
|
||||
|
||||
'If Not Conta.UpdateCompraTCValuacion(gvr.DataKey("CveCompra").ToEntero, TCValuacion:=TCUltimaFluctuacion) Then
|
||||
' ErrorRegistrar = True
|
||||
' Exit For
|
||||
'End If
|
||||
|
||||
If Not Conta.UpdateTCValuacion(-1, gvr.DataKey("CveCompra").ToEntero, gvr.DataKey("CveIE").ToEntero, TCUltimaFluctuacion, UsuarioActual.CveEmpresa) Then
|
||||
ErrorRegistrar = True
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
|
||||
Banco.UpdateFluctuacionesBitacoraPrePoliza(CvePrePoliza, 5, CveBitacora, UsuarioActual.CveEmpresa)
|
||||
|
||||
Banco.UpdateFluctuacionesBitacoraPrePoliza(CvePrePoliza, 6, CveBitacora, UsuarioActual.CveEmpresa)
|
||||
|
||||
If Not ErrorRegistrar Then
|
||||
Conta.Commit()
|
||||
BtnGeneraAcreedores.Visible = False
|
||||
Alert(String.Format("La Fluctuación se ha generado <br/> <a href='/Contabilidad/RegPrePoliza.aspx?CvePrePoliza={0}'>Ver Póliza</a>", CvePrePoliza), TipoMensaje.MsgInformacion)
|
||||
Else
|
||||
Conta.RollBack()
|
||||
Alert("Error al generar la fluctuación", TipoMensaje.MsgError)
|
||||
End If
|
||||
Conta.Dispose()
|
||||
Banco.Dispose()
|
||||
@@ -884,4 +892,30 @@ Partial Class Bancos_FluctuacionCambiaria
|
||||
Banco.Dispose()
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnClientesRemove_Click(sender As Object, e As EventArgs)
|
||||
Dim Banco As New ClsBancos
|
||||
Banco.IniciaTransacSQL()
|
||||
|
||||
If Banco.FluctuacionesBitacoraPrePolizaRemove(HdnClienteCvePrePoliza.Value.ToEntero, 2, HdnCveFluctuacionBitacora.Value.ToEntero, UsuarioActual.CveEmpresa) Then
|
||||
Banco.Commit()
|
||||
Alert("Flucturación eliminada.")
|
||||
Else
|
||||
Banco.RollBack()
|
||||
End If
|
||||
Banco.Dispose()
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnAcreedoresRemove_Click(sender As Object, e As EventArgs)
|
||||
Dim Banco As New ClsBancos
|
||||
Banco.IniciaTransacSQL()
|
||||
|
||||
If Banco.FluctuacionesBitacoraPrePolizaRemove(HdnAcreedorCvePrePoliza.Value.ToEntero, 6, HdnCveFluctuacionBitacora.Value.ToEntero, UsuarioActual.CveEmpresa) Then
|
||||
Banco.Commit()
|
||||
Alert("Flucturación eliminada.")
|
||||
Else
|
||||
Banco.RollBack()
|
||||
End If
|
||||
Banco.Dispose()
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
@@ -1370,9 +1370,9 @@
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Motivo" Visible="true" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="15%">
|
||||
<asp:TemplateField HeaderText="Motivo" Visible="true" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="30%">
|
||||
<ItemTemplate>
|
||||
<asp:DropDownList runat="server" id="DdlMotivoCancelacion" DataTextField="CodigoSATDescripcion" DataValueField="CveMotivoCancelacion" CssClass="select2me" Visible ="false">
|
||||
<asp:DropDownList runat="server" id="DdlMotivoCancelacion" DataTextField="CodigoSATDescripcion" DataValueField="CveMotivoCancelacion" CssClass="form-control input-sm select2me" Visible ="false">
|
||||
</asp:DropDownList>
|
||||
<asp:Literal runat="server" ID="LtlMotivoCancelacion" Text='<%# Eval("MotivoCancelacion") %>'> </asp:Literal>
|
||||
</ItemTemplate>
|
||||
|
||||
@@ -5902,16 +5902,20 @@ Partial Class Bancos_IE
|
||||
e.Row.FCDropDownList("DdlMotivoCancelacion").DataBind()
|
||||
e.Row.FCDropDownList("DdlMotivoCancelacion").Items.Insert(0, New ListItem("Seleccione Uno", "-1"))
|
||||
|
||||
If e.Row.DataKey("Estatus").ToEntero = 1 Then
|
||||
e.Row.FCLiteral("LtlMotivoCancelacion").Visible = True
|
||||
End If
|
||||
|
||||
Else
|
||||
e.Row.FCLinkButton("LnkCancelarComplemetno").Visible = False
|
||||
e.Row.FCDropDownList("DdlMotivoCancelacion").Visible = False
|
||||
|
||||
If e.Row.DataKey("Estatus").ToEntero = 2 Then
|
||||
e.Row.FCLiteral("LtlMotivoCancelacion").Visible = True
|
||||
End If
|
||||
End If
|
||||
|
||||
If e.Row.DataKey("Estatus").ToEntero = 2 Then
|
||||
e.Row.FCLiteral("LtlMotivoCancelacion").Visible = True
|
||||
Else
|
||||
e.Row.FCDropDownList("DdlMotivoCancelacion").Visible = False
|
||||
End If
|
||||
|
||||
|
||||
ElseIf e.Row.DataKey("Tipo") = "Egs" Then
|
||||
|
||||
|
||||
@@ -1016,7 +1016,7 @@ Partial Class PopUpVerFactura
|
||||
Private Sub ImprimeFormatoCartaPorte(CveMovimiento As Integer)
|
||||
If CveMovimiento > 0 Then
|
||||
Dim ObjInv As New ClsInventarios
|
||||
|
||||
|
||||
Dim SerieFolio As String = ""
|
||||
Dim DomicilioSucursal As String = ""
|
||||
Dim LugarFecha As String = ""
|
||||
|
||||
@@ -474,6 +474,12 @@ Partial Class ContabilidadC_RegPrePoliza
|
||||
CargaCuentasContables()
|
||||
End If
|
||||
|
||||
If dr("Modulo").ToString.Contiene("Banc/FluctuaA", "Banc/FluctuaC", "Banc/FluctuaV", "Banc/FluctuaFilial") Then
|
||||
|
||||
BtnEliminar.Enabled = False
|
||||
BtnEliminar.ToolTip = "No se puede eliminar al prepóliza, eliminarlos desde el módulo"
|
||||
End If
|
||||
|
||||
ObjContabilidad.GetContabilizacionDiarioDetalle(CvePrePoliza)
|
||||
|
||||
DtMovimientos = ObjContabilidad.DtResultados.FiltraParametros($"CveEmpresa = {UsuarioActual.CveEmpresa}")
|
||||
@@ -2114,7 +2120,7 @@ Partial Class ContabilidadC_RegPrePoliza
|
||||
Dim NombreArchivo As String
|
||||
SpreadsheetInfo.SetLicense(ModExtensiones.SerialGemBoxSpreadsheet)
|
||||
Dim workbook As New ExcelFile()
|
||||
Dim worksheet = workbook.Worksheets.Add(DdlPlantilla2.SelectedItem.Text.ToString())
|
||||
Dim worksheet = workbook.Worksheets.Add(DdlPlantilla2.SelectedItem.Text.Substring(1, 30))
|
||||
|
||||
Dim CvePlantilla As Integer = DdlPlantilla2.SelectedValue.ToEntero()
|
||||
Dim Dt As DataTable = GlobalDTContaPlantillasPolizasDetalle(CvePlantilla).FiltraParametros(String.Format("CveEmpresa={0}", UsuarioActual.CveEmpresa), "Orden")
|
||||
|
||||
@@ -594,7 +594,6 @@
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="TxtRef" runat="server" Text='<%# Eval("Referencia") %>'></asp:Literal><br />
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Left" Width="280px" />
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField>
|
||||
@@ -602,7 +601,6 @@
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="TxtConcepto" runat="server" Text='<%# Eval("Concepto") %>'></asp:Literal><br />
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Left" Width="400px" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>
|
||||
@@ -635,9 +633,8 @@
|
||||
<asp:TemplateField Visible="false">
|
||||
<HeaderTemplate>TC</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlTC" runat="server" Text='<%# String.Format("{0}-${1}", Eval("TC"), Eval("ImporteME", "{0:N2}")) %>'></asp:Literal><br />
|
||||
<asp:Literal ID="LtlTC" runat="server" Text='<%# String.Format("{0}-${1}", Eval("TC", "{0:#.####}"), Eval("ImporteME", "{0:N2}")) %>'></asp:Literal><br />
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Left" Width="300px" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Cargo</HeaderTemplate>
|
||||
@@ -666,14 +663,14 @@
|
||||
<asp:LinkButton ID="LnkGvPrePolizaEliminar" OnClick="LnkGvPrePolizaEliminar_Click" runat="server" AlternateText="Eliminar" 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>
|
||||
<ItemStyle HorizontalAlign="Right" Width="80px" />
|
||||
<ItemStyle Width="120px" />
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField >
|
||||
<ItemTemplate>
|
||||
<asp:CheckBox runat="server" ID="chkModificado" Checked="false" Visible="false"/>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Right" Width="0px" />
|
||||
<ItemStyle HorizontalAlign="Right" Width="5px" />
|
||||
</asp:TemplateField>
|
||||
|
||||
</Columns>
|
||||
|
||||
@@ -495,6 +495,12 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
ObjContabilidad.GetContabilizacionDiarioDetalle(CvePrePoliza)
|
||||
DtMovimientos = ObjContabilidad.DtResultados.FiltraParametros($"CveEmpresa = {UsuarioActual.CveEmpresa}")
|
||||
|
||||
If dr("Modulo").ToString.Contiene("Banc/FluctuaA", "Banc/FluctuaC", "Banc/FluctuaV", "Banc/FluctuaFilial") Then
|
||||
|
||||
BtnEliminar.Enabled = False
|
||||
BtnEliminar.ToolTip = "No se puede eliminar al prepóliza, eliminarlos desde el módulo"
|
||||
End If
|
||||
|
||||
|
||||
'DtMovimientos.DefaultView.Sort = "OrdenPP"
|
||||
'DtMovimientos = DtMovimientos.DefaultView.ToTable
|
||||
|
||||
@@ -3343,7 +3343,7 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
Dim PesoKg As Decimal = DrPS("PesoKg").ToString.ToDecimal
|
||||
Dim SATClaveUnidadMedida As String = DrPS("SATClaveUnidadMedida").ToString.Trim
|
||||
|
||||
If CveSATPS > 0 And PesoKg > 0 And SATClaveUnidadMedida.Length > 0 Then
|
||||
If CveSATPS > 0 AndAlso PesoKg > 0 AndAlso SATClaveUnidadMedida.Length > 0 Then
|
||||
Respuesta = True
|
||||
Else
|
||||
Respuesta = False
|
||||
|
||||
@@ -22,6 +22,28 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
{
|
||||
get { return 5; }
|
||||
}
|
||||
|
||||
private DateTime FechaInicioPeriodo
|
||||
{
|
||||
get
|
||||
{
|
||||
if (ViewState["FechaInicioPeriodo"] == null) { return DateTime.Now; }
|
||||
else { return (DateTime)ViewState["FechaInicioPeriodo"]; }
|
||||
}
|
||||
|
||||
set { ViewState["FechaInicioPeriodo"] = value; }
|
||||
}
|
||||
private DateTime FechaFinPeriodo
|
||||
{
|
||||
get
|
||||
{
|
||||
if (ViewState["FechaFinPeriodo"] == null) { return DateTime.Now.AddDays(1); }
|
||||
else { return (DateTime)ViewState["FechaFinPeriodo"]; }
|
||||
}
|
||||
|
||||
set { ViewState["FechaFinPeriodo"] = value; }
|
||||
}
|
||||
|
||||
private DataTable dtNomConceptos
|
||||
{
|
||||
get
|
||||
@@ -422,7 +444,6 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
dtempleados = null;
|
||||
dtConceptos = null;
|
||||
DataTable dtPeriodo = new DataTable();
|
||||
DataTable dtasistencia = new DataTable();
|
||||
LnkAutorizar.Visible = false;
|
||||
Estatus = 5;
|
||||
if (FiltCvePeriodo > 0)
|
||||
@@ -438,6 +459,10 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
int CvePrePolizaProvisionAsimilados = drow["CvePrePolizaAsimilables"].ToString().ToEntero();
|
||||
int CvePrePolizaProrrateo = drow["CvePrePolizaProrrateo"].ToString().ToEntero();
|
||||
|
||||
|
||||
FechaInicioPeriodo = (DateTime)dtPeriodo.Rows[0]["FechaInicio"];
|
||||
FechaFinPeriodo = (DateTime)dtPeriodo.Rows[0]["FechaFin"];
|
||||
|
||||
//LnkConceptoEmpleado.Visible = (Estatus == 1);
|
||||
LnkRegistrarProvision.Visible = (Estatus >= 2);//&& (CvePrePolizaProvision <= 0 || UsuarioActual.CveUsuario == 100);
|
||||
LnkRegistrarProvision.Text = CvePrePolizaProvision <= 0 ? "<i class=\"fa fa-thumbs-up\" aria-hidden=\"true\" ></i>Registrar provisión" : "<i class=\"fa fa-thumbs-up\" aria-hidden=\"true\" ></i>Regenerar provisión";
|
||||
@@ -466,7 +491,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
dtempleadosConceptos = objnom.DTSetResultados.Tables[4];
|
||||
dtConceptos = objnom.DTSetResultados.Tables[0];
|
||||
dtPeriodo = objnom.DTSetResultados.Tables[1];
|
||||
dtasistencia = objnom.DTSetResultados.Tables[2];
|
||||
//dtasistencia = objnom.DTSetResultados.Tables[2];
|
||||
CvePeriodoSeleccionado = FiltCvePeriodo;
|
||||
continuar = true;
|
||||
}
|
||||
@@ -826,74 +851,87 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
GvNominas.DataSource = null;
|
||||
GvNominas.DataBind();
|
||||
}
|
||||
if (cargaasistencia)
|
||||
{
|
||||
if (dtPeriodo != null && dtPeriodo.Rows.Count > 0)
|
||||
{
|
||||
|
||||
DateTime FechaInicio = (DateTime)dtPeriodo.Rows[0]["FechaInicio"];
|
||||
DateTime FechaFin = (DateTime)dtPeriodo.Rows[0]["FechaFin"];
|
||||
StringBuilder gvasistencia = new StringBuilder();
|
||||
gvasistencia.Append("<div><table class=\"table table-striped table-hover mysmallbtn Widthall ScrollAD gvasistencia \" data-rows=\"1\" data-heighterror=\"360\"><tbody>");
|
||||
if (true)
|
||||
{
|
||||
DateTime fecha = FechaInicio;
|
||||
|
||||
gvasistencia.Append("<tr class=\"Titulos ADtr\">");
|
||||
gvasistencia.Append("<th>Nombre</th>");
|
||||
while (fecha <= FechaFin)
|
||||
{
|
||||
gvasistencia.AppendFormat("<th>{0:dd/MM/yyyy}</th>", fecha);
|
||||
fecha = fecha.AddDays(1);
|
||||
}
|
||||
gvasistencia.Append("</tr>");
|
||||
}
|
||||
string tipo = "";
|
||||
foreach (DataRow rempl in dtempleados.FiltraParametros("CvePersonal>0").Rows)
|
||||
{
|
||||
int CvePersonal = rempl["CvePersonal"].ToString().ToEntero();
|
||||
string nombre = rempl["Nombre"].ToString();
|
||||
string Codigo = rempl["Codigo"].ToString();
|
||||
DateTime fecha = FechaInicio; int HorasDobles, HorasTriples;
|
||||
gvasistencia.Append("<tr>");
|
||||
gvasistencia.AppendFormat("<td><a class=\"Texto sline\" href=\"/RH/Personal.aspx?CvePersonal={0}\"><span style=\"display:inline-block;min-width:31px;\">{2}</span> <span style=\"display:inline-block;\">{1}</span></a></td>", CvePersonal, nombre, Codigo);
|
||||
while (fecha <= FechaFin)
|
||||
{
|
||||
DataRow drow = dtasistencia.FiltroPrimero(string.Format("Fecha='{0:yyyy/MM/dd}' AND CvePersonal={1}", fecha, CvePersonal));
|
||||
tipo = "-";
|
||||
if (drow != null)
|
||||
{
|
||||
tipo = string.Format("{0} ({1}%)", drow["Tipo"], drow["PorcentajePago"]);
|
||||
HorasDobles = drow["HorasDobles"].ToString().ToEntero();
|
||||
HorasTriples = drow["HorasTriples"].ToString().ToEntero();
|
||||
if (HorasDobles > 0)
|
||||
{
|
||||
|
||||
tipo = string.Format("{0}<br/>{1} horas dobles", tipo, HorasDobles);
|
||||
}
|
||||
if (HorasTriples > 0)
|
||||
{
|
||||
|
||||
tipo = string.Format("{0}<br/>{1} horas triple", tipo, HorasTriples);
|
||||
}
|
||||
drow.Delete();
|
||||
}
|
||||
gvasistencia.AppendFormat("<td> <a onclick=\"openasis({1},'{2}')\"> {0} </a></td>", tipo, CvePersonal, fecha);
|
||||
fecha = fecha.AddDays(1);
|
||||
}
|
||||
gvasistencia.Append("</tr>");
|
||||
}
|
||||
gvasistencia.Append("</tbody></table></div>");
|
||||
ltlGvAsistencia.Text = gvasistencia.ToString();
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
if (cargaasistencia && dtPeriodo != null && dtPeriodo.Rows.Count > 0)
|
||||
{
|
||||
cargarasistencia();
|
||||
}
|
||||
if (dtempleados != null)
|
||||
{
|
||||
LnkAutorizar.Visible = (dtempleados.COUNT("CvePersonal", "CvePersonal > 0 AND NomAutorizado =0") > 0) || (Estatus < 2);
|
||||
LnkCancelarNomina.Visible = (dtempleados.COUNT("CvePersonal", "CvePersonal > 0 AND NomAutorizado =1 AND SeTimbro=0") > 0);
|
||||
}
|
||||
UpDatos.Update();
|
||||
}
|
||||
public void cargarasistencia()
|
||||
{
|
||||
|
||||
|
||||
|
||||
|
||||
DateTime FechaInicio = FechaInicioPeriodo;
|
||||
DateTime FechaFin = FechaFinPeriodo;
|
||||
DataTable dtasistencia;
|
||||
using (ClsNominas objnom = new ClsNominas())
|
||||
{
|
||||
objnom.GetAsistenciabetweendate(UsuarioActual.CveEmpresa, FechaInicio, FechaFin);
|
||||
dtasistencia = objnom.DtResultados;
|
||||
}
|
||||
StringBuilder gvasistencia = new StringBuilder();
|
||||
gvasistencia.Append("<div><table class=\"table table-striped table-hover mysmallbtn Widthall ScrollAD gvasistencia \" data-rows=\"1\" data-heighterror=\"360\"><tbody>");
|
||||
if (true)
|
||||
{
|
||||
DateTime fecha = FechaInicio;
|
||||
|
||||
gvasistencia.Append("<tr class=\"Titulos ADtr\">");
|
||||
gvasistencia.Append("<th>Nombre</th>");
|
||||
while (fecha <= FechaFin)
|
||||
{
|
||||
gvasistencia.AppendFormat("<th>{0:dd/MM/yyyy}</th>", fecha);
|
||||
fecha = fecha.AddDays(1);
|
||||
}
|
||||
gvasistencia.Append("</tr>");
|
||||
}
|
||||
string tipo = "";
|
||||
foreach (DataRow rempl in dtempleados.FiltraParametros("CvePersonal>0").Rows)
|
||||
{
|
||||
int CvePersonal = rempl["CvePersonal"].ToString().ToEntero();
|
||||
string nombre = rempl["Nombre"].ToString();
|
||||
string Codigo = rempl["Codigo"].ToString();
|
||||
DateTime fecha = FechaInicio; int HorasDobles, HorasTriples;
|
||||
gvasistencia.Append("<tr>");
|
||||
gvasistencia.AppendFormat("<td><a class=\"Texto sline\" href=\"/RH/Personal.aspx?CvePersonal={0}\"><span style=\"display:inline-block;min-width:31px;\">{2}</span> <span style=\"display:inline-block;\">{1}</span></a></td>", CvePersonal, nombre, Codigo);
|
||||
while (fecha <= FechaFin)
|
||||
{
|
||||
DataRow drow = dtasistencia.FiltroPrimero(string.Format("Fecha='{0:yyyy/MM/dd}' AND CvePersonal={1}", fecha, CvePersonal));
|
||||
tipo = "-";
|
||||
if (drow != null)
|
||||
{
|
||||
tipo = string.Format("{0} ({1}%)", drow["Tipo"], drow["PorcentajePago"]);
|
||||
HorasDobles = drow["HorasDobles"].ToString().ToEntero();
|
||||
HorasTriples = drow["HorasTriples"].ToString().ToEntero();
|
||||
if (HorasDobles > 0)
|
||||
{
|
||||
|
||||
tipo = string.Format("{0}<br/>{1} horas dobles", tipo, HorasDobles);
|
||||
}
|
||||
if (HorasTriples > 0)
|
||||
{
|
||||
|
||||
tipo = string.Format("{0}<br/>{1} horas triple", tipo, HorasTriples);
|
||||
}
|
||||
drow.Delete();
|
||||
}
|
||||
gvasistencia.AppendFormat("<td> <a onclick=\"openasis({1},'{2}')\"> {0} </a></td>", tipo, CvePersonal, fecha);
|
||||
fecha = fecha.AddDays(1);
|
||||
}
|
||||
gvasistencia.Append("</tr>");
|
||||
}
|
||||
gvasistencia.Append("</tbody></table></div>");
|
||||
ltlGvAsistencia.Text = gvasistencia.ToString();
|
||||
|
||||
|
||||
}
|
||||
private void setGVNominas()
|
||||
{
|
||||
@@ -1240,7 +1278,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
if (CveNomina > 0)
|
||||
{
|
||||
|
||||
|
||||
|
||||
DdlMotivoCancelacion.Items.Insert(0, new ListItem("Seleccione", "-1"));
|
||||
using (ClsNominas Nom = new ClsNominas())
|
||||
{
|
||||
@@ -1256,7 +1294,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
string SerieFolio = Nom.SerieFolio;
|
||||
DataRow rowc = get_GlobalDTMotivosCancelacionEmpresa(UsuarioActual.CveEmpresa).FiltroPrimero(string.Format("CveMotivoCancelacion={0}", DdlMotivoCancelacion.SelectedValue));
|
||||
int CveMotivoCancelacion = -1;
|
||||
if(rowc != null)
|
||||
if (rowc != null)
|
||||
{
|
||||
CveMotivoCancelacion = rowc["CveSATMotivoCancelacion"].ToString().ToEntero();
|
||||
}
|
||||
|
||||
@@ -3,6 +3,51 @@
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
<style>
|
||||
.Titulos2 {
|
||||
background-color: #dfdfdf !important;
|
||||
}
|
||||
|
||||
.Titulos2:hover {
|
||||
background-color: #dfdfdf !important;
|
||||
}
|
||||
|
||||
.Titulos3 {
|
||||
background-color: #eee !important;
|
||||
}
|
||||
|
||||
.Titulos3:hover {
|
||||
background-color: #eee !important;
|
||||
}
|
||||
|
||||
table.GvDatos input {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
table.GvDatos th:nth-child(1),
|
||||
table.GvDatos th:nth-child(2),
|
||||
table.GvDatos th:nth-child(3),
|
||||
table.GvDatos th:nth-child(4) {
|
||||
text-align: left !important;
|
||||
}
|
||||
|
||||
table.GvDatos.Columns4 th:nth-child(5) {
|
||||
text-align: left !important;
|
||||
}
|
||||
|
||||
table.GvDatos tr:not(.Titulos3):not(.Titulos2) td:nth-last-child(2) {
|
||||
text-align: center !important;
|
||||
}
|
||||
|
||||
table.GvDatos tr:not(.Titulos3):not(.Titulos2) td:nth-last-child(1),
|
||||
table.GvDatos tr:not(.Titulos3):not(.Titulos2) th:nth-last-child(1) {
|
||||
width: 100px;
|
||||
}
|
||||
|
||||
.actions .btn-group .btn {
|
||||
margin-right: 8px;
|
||||
}
|
||||
</style>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
@@ -10,19 +55,37 @@
|
||||
Cargas Masivas
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
<li><asp:HyperLink data-toggle="modal" data-target="#DModalCargaexcel" runat="server"><i class="fa fa-ad-excel" style="margin-right:5px"></i> Carga Masiva</asp:HyperLink></li>
|
||||
<li>
|
||||
<asp:HyperLink data-toggle="modal" data-target="#DModalCargaexcel" runat="server"><i class="fa fa-ad-excel" style="margin-right:5px"></i> Carga Masiva</asp:HyperLink></li>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
<asp:UpdatePanel ID="UPFiltros" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="portlet solid grey-cascade portlet-filter" style="">
|
||||
<div class="portlet-title portlet-filterT" style="">
|
||||
<div class="tools">
|
||||
<asp:Button ID="BtnConsultar" runat="server" Text="Consultar" class="btn btn-primary" />
|
||||
<a href="javascript:;" class="expand"></a>
|
||||
<a onclick="document.getElementById('C_BtnConsultar').click();" class="reload"></a>
|
||||
</div>
|
||||
<div class="titlefiltros caption " style="font-size: 120%">
|
||||
<div class="portlet solid grey-cascade portlet-filter">
|
||||
<div class="portlet-title portlet-filterT smalltitle">
|
||||
<div class="titlefiltros caption">
|
||||
|
||||
<div class="row">
|
||||
<asp:Label runat="server" CssClass="col-md-1">Turno: </asp:Label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlTurno" runat="server" AppendDataBoundItems="true" DataTextField="Turno" DataValueField="CveTurno" CssClass="select2me form-control" Style="width: 100% !important;" ValidationGroup="GrpGuardar">
|
||||
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
|
||||
<asp:Label ID="LblProyecto" CssClass="col-md-1 compoonenlabel" runat="server" Text="Proyecto:" Style="max-width: 100%"></asp:Label>
|
||||
<div runat="server" id="divddlproyeto" class="col-md-2">
|
||||
<asp:DropDownList ID="DdlProyecto" runat="server" AppendDataBoundItems="true" CssClass="select2me form-control" AutoPostBack="true" DataTextField="Proyecto" DataValueField="CveProyecto" Style="width: 100% !important;" ValidationGroup="GrpGuardar">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<asp:Label ID="LblSubProyeccto" CssClass="col-md-1 compoonenlabel" runat="server" Text="SubProyecto:" Style="max-width: 103px;"></asp:Label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlSubProyecto" runat="server" AppendDataBoundItems="true" CssClass="select2me form-control" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Style="width: 100% !important;" ValidationGroup="GrpGuardar">
|
||||
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
<ul class="list-inline">
|
||||
<%--<li>Cliente:
|
||||
<asp:Button ID="BtnCargarClientes" runat="server" ClientIDMode="Static" Text="CargarClientes" Style="display: none;" />
|
||||
@@ -30,23 +93,14 @@
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</li>--%>
|
||||
<li>Proyecto:
|
||||
<asp:DropDownList ID="DdlProyecto" runat="server" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="Proyecto" DataValueField="CveProyecto" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 200px !important;" ValidationGroup="GrpGuardar">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</li>
|
||||
<li>SubProyecto:
|
||||
<asp:DropDownList ID="DdlSubProyecto" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 200px !important;" ValidationGroup="GrpGuardar">
|
||||
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</li>
|
||||
<li style="width: 297px;"> Turno:
|
||||
<asp:DropDownList ID="DdlTurno" runat="server" AppendDataBoundItems="true" DataTextField="Turno" DataValueField="CveTurno" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 100px !important;" ValidationGroup="GrpGuardar">
|
||||
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="tools">
|
||||
<asp:Button ID="BtnConsultar" runat="server" Text="Consultar" class="btn btn-primary" />
|
||||
<a href="javascript:;" class="expand"></a>
|
||||
<a onclick="document.getElementById('C_BtnConsultar').click();" class="reload"></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body" style="display: none; font-size: 120%">
|
||||
<ul class="list-inline">
|
||||
@@ -62,98 +116,130 @@
|
||||
</asp:UpdatePanel>
|
||||
<br />
|
||||
<asp:UpdatePanel ID="UPDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div style="text-align:right">
|
||||
<asp:Button ID="BtnGuardar" runat="server" Text="Guardar Cambios" ValidationGroup="GrpGuardar" class="btn btn-primary" />
|
||||
<br />
|
||||
<br />
|
||||
<ContentTemplate>
|
||||
|
||||
|
||||
<div class="portlet light xspadding bordered " id="pnldl">
|
||||
<div class="portlet-title">
|
||||
<div class="caption ">
|
||||
<i class="fa fa-bookmark font-yellow-gold"></i>
|
||||
<span class="caption-subject font-yellow-gold bold uppercase">Información</span>
|
||||
</div>
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CvePersonal, CveSubProyecto" EmptyDataText="No se encontraron Ventas con los filtros especificados" ToolTip="Listado de Asistencias"
|
||||
CssClass="table table-striped table-advance table-hover Widthall" Style="margin-top: -10px; text-align: center;" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Nombre</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlNombre" runat="server" Text='<%# String.Format("{0}-{1}", Eval("Codigo"), Eval("Nombre"))%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="250px" HorizontalAlign="Left" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Proyecto</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal runat="server" Text='<%# Eval("Proyecto") %>'></asp:Literal>
|
||||
<%--<asp:DropDownList ID="DdlGVProyecto" runat="server" AutoPostBack="True" DataTextField="Proyecto" DataValueField="CveProyecto" OnSelectedIndexChanged="DdlGVProyecto_SelectedIndexChanged" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 190px !important;"></asp:DropDownList>--%>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Left" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Sub Proyecto</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal runat="server" Text='<%# Eval("SubProyecto") %>'></asp:Literal>
|
||||
<%--<asp:DropDownList ID="DdlGVSubProyecto" runat="server" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 190px !important;"></asp:DropDownList>--%>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Left" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Turno</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal runat="server" Text='<%# Eval("Turno") %>'></asp:Literal>
|
||||
<%--<asp:DropDownList ID="DdlTurno" runat="server" DataTextField="Turno" DataValueField="CveTurno" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 90px !important;"></asp:DropDownList>--%>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Left" />
|
||||
</asp:TemplateField>
|
||||
<%--<asp:TemplateField>
|
||||
<HeaderTemplate>Supervisor</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal runat="server" Text='<%# Eval("Proyecto") %>'></asp:Literal>
|
||||
<asp:DropDownList ID="DdlSupervisor" runat="server" DataTextField="Nombre" DataValueField="CveUsuario" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 140px !important;">
|
||||
</asp:DropDownList>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Left" />
|
||||
</asp:TemplateField>--%>
|
||||
<asp:TemplateField HeaderStyle-Width="80px">
|
||||
<HeaderTemplate>SDD</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtSalarioDiario" runat="server" MaxLength="10" Text='<%# Eval("SalarioDiario", "{0:N2}") %>' Width="50px"></asp:TextBox>
|
||||
<asp:CompareValidator ID="CVSalarioDiario" runat="server" ControlToValidate="TxtSalarioDiario" Display="None" ErrorMessage="El campo <b>''Salario Diario''</b> no tiene el formato correcto, por favor corrija e intente de nuevo (Solo formato numérico)." Operator="DataTypeCheck" Type="Currency" ValidationGroup="GrpGuardar"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOSalarioDiario" runat="server" HighlightCssClass="vco" TargetControlID="CVSalarioDiario" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Left" />
|
||||
</asp:TemplateField >
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>SDI</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtSDI" runat="server" MaxLength="10" Text='<%# Eval("SDI", "{0:N2}") %>' Width="50px"></asp:TextBox>
|
||||
<asp:CompareValidator ID="CVSDI" runat="server" ControlToValidate="TxtSDI" Display="None" ErrorMessage="El campo <b>''SDI''</b> no tiene el formato correcto, por favor corrija e intente de nuevo (Solo formato numérico)." Operator="DataTypeCheck" Type="Currency" ValidationGroup="GrpGuardar"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOSDI" runat="server" HighlightCssClass="vco" TargetControlID="CVSDI" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Left" Width="80px" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderStyle-Width="80px">
|
||||
<HeaderTemplate>SD IMSS</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtSalarioCotizado" runat="server" MaxLength="10" Text='<%# Eval("SalarioDiarioSS", "{0:N2}") %>' Width="60px"></asp:TextBox>
|
||||
<asp:CompareValidator ID="CVSDT" runat="server" ControlToValidate="TxtSalarioCotizado" Display="None" ErrorMessage="El campo <b>''Salario Diario Cotizado''</b> no tiene el formato correcto, por favor corrija e intente de nuevo (Solo formato numérico)." Operator="DataTypeCheck" Type="Currency" ValidationGroup="GrpGuardar"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOSDT" runat="server" HighlightCssClass="vco" TargetControlID="CVSDT" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Left" />
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderStyle-Width="80px">
|
||||
<HeaderTemplate>¿CALCULAR SDI?</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:CheckBox ID="ChkCalcularSDI" runat="server" />
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Left" />
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<RowStyle CssClass="Texto" />
|
||||
<HeaderStyle CssClass="Titulos" />
|
||||
</asp:GridView>
|
||||
<div class="tools">
|
||||
<a href="javascript:;" class="collapse" data-original-title="" title=""></a>
|
||||
<a href="javascript:;" class="fullscreen" data-original-title="" title=""></a>
|
||||
</div>
|
||||
<div style="float: right;">
|
||||
<asp:TextBox CssClass="TxtBusqueda form-control input-sm" runat="server" onkeyup="FiltrarTablaV2('.TxtBusqueda','.GvDatos')" Style="display: inline-block; margin-right: -20px; width: 150px;"></asp:TextBox>
|
||||
<a href="javascript:;" onclick="FiltrarTablaV2('.TxtBusqueda','.GvDatos')" style="margin-top: -3px;" class="btn btn-circle btn-sm font-bold yellow-gold"><i class="icon-magnifier" style="font-weight: bold;"></i></a>
|
||||
</div>
|
||||
<div class="actions">
|
||||
<div class="btn-group">
|
||||
<asp:Button ID="BtnGuardarSupervisor" OnClick="BtnGuardarSupervisor_Click" runat="server" Text="Guardar supervisor" class="btn btn-primary" />
|
||||
<asp:Button ID="BtnGuardar" OnClick="BtnGuardar_Click" runat="server" Text="Guardar salario" ValidationGroup="GrpGuardar" class="btn btn-primary" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body ">
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CvePersonal, CveSubProyecto" ToolTip="Listado de Asistencias" ShowHeaderWhenEmpty="true"
|
||||
CssClass="table table-striped table-advance table-hover Widthall ScrollAD GvDatos" Style="" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Codigo</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlCodigo" runat="server" Text='<%# String.Format("<a href=""/RH/Personal.aspx?CvePersonal={1}"" target=""_Blank"">{0}</a>", Eval("Codigo"), Eval("CvePersonal")) %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="50px" HorizontalAlign="Left" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Nombre</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlNombre" runat="server" Text='<%# String.Format("<a href=""/RH/Personal.aspx?CvePersonal={1}"" target=""_Blank"">{0}</a>", Eval("Nombre"), Eval("CvePersonal"))%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="250px" HorizontalAlign="Left" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Proyecto</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal runat="server" Text='<%# Eval("Proyecto") %>'></asp:Literal>
|
||||
<%--<asp:DropDownList ID="DdlGVProyecto" runat="server" AutoPostBack="True" DataTextField="Proyecto" DataValueField="CveProyecto" OnSelectedIndexChanged="DdlGVProyecto_SelectedIndexChanged" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 190px !important;"></asp:DropDownList>--%>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Left" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Literal runat="server" Text='<%# Eval("SubProyecto") %>'></asp:Literal>
|
||||
<%--<asp:DropDownList ID="DdlGVSubProyecto" runat="server" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 190px !important;"></asp:DropDownList>--%>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Left" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Turno</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal runat="server" Text='<%# Eval("Turno") %>'></asp:Literal>
|
||||
<%--<asp:DropDownList ID="DdlTurno" runat="server" DataTextField="Turno" DataValueField="CveTurno" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 90px !important;"></asp:DropDownList>--%>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Left" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderStyle-Width="80px">
|
||||
<HeaderTemplate>SDD</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtSalarioDiario" runat="server" MaxLength="10" Text='<%# Eval("SalarioDiario", "{0:N2}") %>' Width="70px"></asp:TextBox>
|
||||
<asp:CompareValidator ID="CVSalarioDiario" runat="server" ControlToValidate="TxtSalarioDiario" Display="None" ErrorMessage="El campo <b>''Salario Diario''</b> no tiene el formato correcto, por favor corrija e intente de nuevo (Solo formato numérico)." Operator="DataTypeCheck" Type="Currency" ValidationGroup="GrpGuardar"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOSalarioDiario" runat="server" HighlightCssClass="vco" TargetControlID="CVSalarioDiario" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Left" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>SDI</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtSDI" runat="server" MaxLength="10" Text='<%# Eval("SDI", "{0:N2}") %>' Width="70px"></asp:TextBox>
|
||||
<asp:CompareValidator ID="CVSDI" runat="server" ControlToValidate="TxtSDI" Display="None" ErrorMessage="El campo <b>''SDI''</b> no tiene el formato correcto, por favor corrija e intente de nuevo (Solo formato numérico)." Operator="DataTypeCheck" Type="Currency" ValidationGroup="GrpGuardar"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOSDI" runat="server" HighlightCssClass="vco" TargetControlID="CVSDI" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Left" Width="80px" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderStyle-Width="80px">
|
||||
<HeaderTemplate>SD IMSS</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtSalarioCotizado" runat="server" MaxLength="10" Text='<%# Eval("SalarioDiarioSS", "{0:N2}") %>' Width="70px"></asp:TextBox>
|
||||
<asp:CompareValidator ID="CVSDT" runat="server" ControlToValidate="TxtSalarioCotizado" Display="None" ErrorMessage="El campo <b>''Salario Diario Cotizado''</b> no tiene el formato correcto, por favor corrija e intente de nuevo (Solo formato numérico)." Operator="DataTypeCheck" Type="Currency" ValidationGroup="GrpGuardar"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOSDT" runat="server" HighlightCssClass="vco" TargetControlID="CVSDT" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Left" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderStyle-Width="80px">
|
||||
<HeaderTemplate>¿CALCULAR SDI?</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:CheckBox ID="ChkCalcularSDI" runat="server" />
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Left" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Supervisor</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:DropDownList ID="DdlSupervisor" runat="server" DataTextField="Nombre" DataValueField="CveUsuario" CssClass=" select2me" Style="width: 140px !important;">
|
||||
</asp:DropDownList>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Left" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Cliente</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<ADS:Dropdownlost CssClassDdl="select2me" ID="DdlClientes" Width="140" data-metodo="getcliente" UsaWebService="true" runat="server" DataTextField="NombreComercial" DataValueField="CveCliente" CssStyle="width: 140px"></ADS:Dropdownlost>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Left" />
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<RowStyle CssClass="Texto" />
|
||||
<HeaderStyle CssClass="Titulos" />
|
||||
</asp:GridView>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
|
||||
<div id="DModalCargaexcel" class="modal ADS fade" role="dialog">
|
||||
<asp:UpdatePanel ID="UpCargarexcel" class="modal-dialog" tabindex="-1" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
@@ -200,15 +286,17 @@
|
||||
<div class="portlet-body rowpadding ">
|
||||
<div class="row">
|
||||
<div class="col-sm-6">Calcular Salario Diario Integrado</div>
|
||||
<div class="col-sm-6"> <asp:CheckBox ID="ChkCalcularSDIXLS" Text=" " CssClass="chksino" runat="server" /></div>
|
||||
<div class="col-sm-6">
|
||||
<asp:CheckBox ID="ChkCalcularSDIXLS" Text=" " CssClass="chksino" runat="server" />
|
||||
</div>
|
||||
</div>
|
||||
<asp:TextBox ID="TxtArchivoNomina" CssClass="ADSdropzone hidden" runat="server"></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal-footer">
|
||||
<asp:LinkButton ID="LnkCargarSalarios" OnClick="LnkCargarSalarios_Click" CssClass="btn btn-primary" runat="server">Procesar</asp:LinkButton>
|
||||
<div class="modal-footer">
|
||||
<asp:LinkButton ID="LnkCargarSalarios" OnClick="LnkCargarSalarios_Click" CssClass="btn btn-primary" runat="server">Procesar</asp:LinkButton>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
|
||||
@@ -12,7 +12,15 @@ Partial Class RH_ActualizacionMasiva
|
||||
SetPermisos()
|
||||
|
||||
'DdlCliente.Attributes.Add("onclick", "CargaClientes();")
|
||||
CargaProyecto()
|
||||
'CargaProyecto()
|
||||
CargarCentrosDeCosto(DdlProyecto, DdlSubProyecto, LblProyecto, LblSubProyeccto)
|
||||
divddlproyeto.Visible = DdlProyecto.Visible
|
||||
GvDatos.Columns(2).Visible = DdlProyecto.Visible
|
||||
GvDatos.Columns(3).HeaderText = LblSubProyeccto.Text
|
||||
GvDatos.DataSource = New DataTable()
|
||||
GvDatos.DataBind()
|
||||
|
||||
GvDatos.CssClass = String.Format("{0} {1}", GvDatos.CssClass, If(DdlProyecto.Visible, "Columns4", ""))
|
||||
CargaTurnos()
|
||||
CargaSupervisores()
|
||||
End If
|
||||
@@ -70,16 +78,6 @@ Partial Class RH_ActualizacionMasiva
|
||||
' DdlCliente.Attributes.Remove("onclick")
|
||||
'End Sub
|
||||
|
||||
Private Sub CargaProyecto()
|
||||
ViewState("DTProyectos") = GlobalDTProyectos(UsuarioActual.Empresa.CveEmpresa)
|
||||
|
||||
Dim Row As DataRow = DirectCast(ViewState("DTProyectos"), DataTable).NewRow()
|
||||
Row("CveProyecto") = -1 : Row("Proyecto") = "Sin Proyecto asignado"
|
||||
DirectCast(ViewState("DTProyectos"), DataTable).Rows.InsertAt(Row, 0)
|
||||
|
||||
DdlProyecto.DataSource = GlobalDTProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, 1)
|
||||
DdlProyecto.DataBind()
|
||||
End Sub
|
||||
|
||||
Private Sub CargaSubProyecto()
|
||||
ViewState("DTSubProyectos") = GlobalDTSubProyectos(DdlProyecto.SelectedValue.ToEntero)
|
||||
@@ -90,20 +88,18 @@ Partial Class RH_ActualizacionMasiva
|
||||
End Sub
|
||||
|
||||
Private Sub CargaTurnos()
|
||||
ViewState("DTTurno") = GlobalDTTurno.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||
DdlTurno.DataSource = GlobalDTTurno.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||
ViewState("DTTurno") = GlobalDTTurno.FiltraParametros(String.Format("CveEmpresa = {0}", UsuarioActual.CveEmpresa))
|
||||
DdlTurno.DataSource = GlobalDTTurno.FiltraParametros(String.Format("CveEmpresa = {0}", UsuarioActual.CveEmpresa))
|
||||
DdlTurno.DataBind()
|
||||
End Sub
|
||||
|
||||
Private Sub CargaSupervisores()
|
||||
ViewState("DTUsuarios") = GlobalDTUsuarios.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa & " AND EsSupervisorRH = 1 ")
|
||||
ViewState("DTUsuarios") = GlobalDTUsuarios.FiltraParametros(String.Format("CveEmpresa = {0} AND EsSupervisorRH = 1 ", UsuarioActual.CveEmpresa))
|
||||
|
||||
Dim Row As DataRow = DirectCast(ViewState("DTUsuarios"), DataTable).NewRow()
|
||||
Row("CveUsuario") = -1 : Row("Nombre") = "Sin Supervisor Asignado"
|
||||
DirectCast(ViewState("DTUsuarios"), DataTable).Rows.InsertAt(Row, 0)
|
||||
|
||||
'DdlSupervisor.DataSource = GlobalDTUsuarios.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa & " AND EsSupervisorRH = 1 ")
|
||||
'DdlSupervisor.DataBind()
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
@@ -113,9 +109,10 @@ Partial Class RH_ActualizacionMasiva
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnConsultar_Click(sender As Object, e As System.EventArgs) Handles BtnConsultar.Click
|
||||
|
||||
Using ObjPersonal As New ClsRH
|
||||
|
||||
consultardata()
|
||||
End Sub
|
||||
Public Sub consultardata()
|
||||
Using ObjPersonal As New ClsRH()
|
||||
If ObjPersonal.GetPersonalMasivo(DdlTurno.SelectedValue.ToEntero, DdlProyecto.SelectedValue.ToEntero, DdlSubProyecto.SelectedValue.ToEntero, -1, UsuarioActual.CveEmpresa) Then
|
||||
GvDatos.DataSource = ObjPersonal.DtResultados
|
||||
Else
|
||||
@@ -123,7 +120,6 @@ Partial Class RH_ActualizacionMasiva
|
||||
End If
|
||||
End Using
|
||||
|
||||
|
||||
GvDatos.DataBind()
|
||||
UPDatos.Update()
|
||||
End Sub
|
||||
@@ -154,18 +150,21 @@ Partial Class RH_ActualizacionMasiva
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
If e.Row.DBCampo("Turno") = "" AndAlso e.Row.DBCampo("Nombre") = "" Then
|
||||
e.Row.FCLiteral("LtlNombre").Text = "<b>Sub Proyecto:</b> " & If(e.Row.DBCampo("SubProyecto") = String.Empty, "Sin Proyecto Asignado", e.Row.DBCampo("SubProyecto"))
|
||||
e.Row.Cells(0).ColumnSpan = 7
|
||||
For i As Integer = 1 To 6
|
||||
e.Row.FCLiteral("LtlCodigo").Text = String.Format("<b>{0}:</b> {1}", LblSubProyeccto.Text, If(e.Row.DBCampo("SubProyecto") = String.Empty, "Sin Proyecto Asignado", e.Row.DBCampo("SubProyecto")))
|
||||
|
||||
e.Row.Cells(0).ColumnSpan = 11
|
||||
For i As Integer = 1 To 10
|
||||
e.Row.Cells(i).Visible = False
|
||||
Next
|
||||
e.Row.CssClass = "Titulos2"
|
||||
e.Row.Cells(0).HorizontalAlign = HorizontalAlign.Left
|
||||
ElseIf e.Row.DBCampo("Turno") <> "" AndAlso e.Row.DBCampo("Nombre") = "" Then
|
||||
e.Row.FCLiteral("LtlNombre").Text = "<b>Turno:</b> " & e.Row.DBCampo("Turno")
|
||||
e.Row.Cells(0).ColumnSpan = 7
|
||||
For i As Integer = 1 To 6
|
||||
e.Row.FCLiteral("LtlCodigo").Text = String.Format("<b>Turno:</b> {0}", e.Row.DBCampo("Turno"))
|
||||
e.Row.Cells(0).ColumnSpan = 11
|
||||
For i As Integer = 1 To 10
|
||||
e.Row.Cells(i).Visible = False
|
||||
Next
|
||||
e.Row.CssClass = "Titulos3"
|
||||
e.Row.Cells(0).HorizontalAlign = HorizontalAlign.Left
|
||||
Else
|
||||
'If e.Row.DBCampo("CveProyecto") <> String.Empty Then e.Row.FCDropDownList("DdlGVProyecto").SelectedValue = e.Row.DBCampo("CveProyecto")
|
||||
@@ -177,6 +176,14 @@ Partial Class RH_ActualizacionMasiva
|
||||
|
||||
e.Row.FCTextBox("TxtSalarioCotizado").Text = e.Row.FCTextBox("TxtSalarioCotizado").Text.Replace(",", "")
|
||||
|
||||
e.Row.FCDropDownList("DdlSupervisor").DataSource = DTUsuarios
|
||||
e.Row.FCDropDownList("DdlSupervisor").DataBind()
|
||||
e.Row.FCDropDownList("DdlSupervisor").Items.Insert(0, New ListItem("Sin Supervisor Asignado", "-1"))
|
||||
e.Row.FCDropDownList("DdlSupervisor").SelectedValueExist(e.Row.DBCampo("CveSupervisor").ToString())
|
||||
|
||||
e.Row.FCDropDownLost("DdlClientes").SelectedValue = e.Row.DBCampo("CveCliente")
|
||||
e.Row.FCDropDownLost("DdlClientes").SelectedText = e.Row.DBCampo("Cliente")
|
||||
|
||||
''Deshabilita todo
|
||||
'e.Row.Cells(1).Enabled = True : e.Row.Cells(2).Enabled = True : e.Row.Cells(3).Enabled = True : e.Row.Cells(4).Enabled = True
|
||||
'e.Row.Cells(5).Enabled = True : e.Row.Cells(6).Enabled = True : e.Row.Cells(7).Enabled = True
|
||||
@@ -188,7 +195,7 @@ Partial Class RH_ActualizacionMasiva
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnGuardar_Click(sender As Object, e As System.EventArgs) Handles BtnGuardar.Click
|
||||
Protected Sub BtnGuardar_Click(sender As Object, e As System.EventArgs)
|
||||
'Dim ObjPersonal As New ClsRH
|
||||
'ObjPersonal.IniciaTransacSQL()
|
||||
|
||||
@@ -309,7 +316,7 @@ Partial Class RH_ActualizacionMasiva
|
||||
Response.BinaryWrite(memoryStream.ToArray())
|
||||
Response.[End]()
|
||||
Catch ex As Exception
|
||||
Alert("Ocurrio un error al generar el Formato de salario" & ex.ToString())
|
||||
Alert(String.Format("Ocurrio un error al generar el Formato de salario {0}", ex.ToString()))
|
||||
End Try
|
||||
End Sub
|
||||
Protected Sub LnkCargarSalarios_Click(sender As Object, e As EventArgs)
|
||||
@@ -344,8 +351,7 @@ Partial Class RH_ActualizacionMasiva
|
||||
DTEXcel = Extensiones.ModExtensiones.ReadExcelFile(fileItem.FileUrl, True).FiltraParametros(" LEN(Codigo)>0 ")
|
||||
Catch ex As Exception
|
||||
continuar = False
|
||||
stringError = "Ocurrio un Error al procesar el excel "
|
||||
String.Format("{0} " & vbCrLf & "{0}", stringError, ex.ToString()).GuardaLog()
|
||||
String.Format("Ocurrio un Error al procesar el excel {0}{1}", vbCrLf, ex.ToString()).GuardaLog()
|
||||
End Try
|
||||
End If
|
||||
If continuar Then
|
||||
@@ -386,4 +392,30 @@ Partial Class RH_ActualizacionMasiva
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnGuardarSupervisor_Click(sender As Object, e As EventArgs)
|
||||
Dim CvePersonal As Integer = 0
|
||||
Dim listpersonal As New List(Of RequestUpSupervisorMasiva)
|
||||
For Each Row As GridViewRow In GvDatos.Rows
|
||||
CvePersonal = Row.DataKey("CvePersonal").ToEntero()
|
||||
If CvePersonal > 0 Then
|
||||
listpersonal.Add(New RequestUpSupervisorMasiva() With {.CvePersonal = CvePersonal, .CveUsuario = Row.FCDropDownList("DdlSupervisor").SelectedValue.ToEntero(),
|
||||
.CveCliente = Row.FCDropDownLost("DdlClientes").SelectedValue.ToEntero()})
|
||||
End If
|
||||
Next
|
||||
Dim continuar As Boolean = False
|
||||
Using ObjPersonal As ClsRH = New ClsRH()
|
||||
ObjPersonal.IniciaTransacSQL()
|
||||
If ObjPersonal.UpPersonalSupervisorMasiva(UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario, listpersonal) Then
|
||||
ObjPersonal.Commit()
|
||||
continuar = True
|
||||
Alert("La información se guardó correctamente.", TipoMensaje.MsgInformacion)
|
||||
Else
|
||||
ObjPersonal.RollBack()
|
||||
End If
|
||||
End Using
|
||||
If continuar Then
|
||||
consultardata()
|
||||
End If
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
@@ -1141,7 +1141,10 @@
|
||||
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList Width="100%" ID="DdlMedioTransporte" CssClass="form-control input-sm select2me" runat="server" DataTextField="MedioTransporte" DataValueField="CveMedioTransporte" ValidationGroup="GrpGuardar">
|
||||
<asp:DropDownList Width="100%" ID="DdlMedioTransporte" CssClass="form-control input-sm select2me" runat="server" AutoPostBack="true"
|
||||
DataTextField="Nombre" DataValueField="CveOrigen" ValidationGroup="GrpGuardar">
|
||||
</asp:DropDownList>
|
||||
<%-- <asp:DropDownList Width="100%" ID="DdlMedioTransporte" CssClass="form-control input-sm select2me" runat="server" DataTextField="MedioTransporte" DataValueField="CveMedioTransporte" ValidationGroup="GrpGuardar">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
<asp:ListItem Value="1" Text="Hermosillo"></asp:ListItem>
|
||||
<asp:ListItem Value="2" Text="Taxi-1"></asp:ListItem>
|
||||
@@ -1151,7 +1154,7 @@
|
||||
<asp:ListItem Value="7" Text="Taxi-5"></asp:ListItem>
|
||||
<asp:ListItem Value="6" Text="Taxi-6"></asp:ListItem>
|
||||
<asp:ListItem Value="8" Text="Costa"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</asp:DropDownList>--%>
|
||||
<asp:Label AssociatedControlID="DdlMedioTransporte" runat="server" Text="Medio transporte:"></asp:Label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -62,7 +62,7 @@ Partial Class RH_CatPersonal
|
||||
CargaJornada()
|
||||
CargaEstados()
|
||||
CargaSatRiesgoPuesto()
|
||||
|
||||
CargaMedioTransporte()
|
||||
LoadDefaultValues()
|
||||
|
||||
|
||||
@@ -288,6 +288,18 @@ Partial Class RH_CatPersonal
|
||||
'End If
|
||||
UpSubProyecto.Update()
|
||||
End Sub
|
||||
Private Sub CargaMedioTransporte()
|
||||
Dim objgenerales As New ClsGenerales()
|
||||
objgenerales.GetMediosTransporte(-1, True, UsuarioActual.CveEmpresa, -1, -1, -1, -1)
|
||||
DdlMedioTransporte.Items.Clear()
|
||||
DdlMedioTransporte.DataSource = objgenerales.DtResultados
|
||||
DdlMedioTransporte.DataBind()
|
||||
'filtro por usuario subproyecto/sucursal vsh
|
||||
'If UsuarioActual.CveEmpresa = 7 Then
|
||||
' DdlSubProyectoAsignado.DataSource = GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa, 1).FiltraParametros($"CveSubProyecto = { UsuarioActual.CveSubProyecto }")
|
||||
'End If
|
||||
'UpSubProyecto.Update()
|
||||
End Sub
|
||||
|
||||
Private Sub CargaTipoCentroCosto()
|
||||
|
||||
|
||||
@@ -71,15 +71,21 @@ function log(mensaje) {
|
||||
}
|
||||
function FiltrarTabla(idtxt, idtable, idcontador) {
|
||||
if ($('#' + idtxt).val() == '') { $('table#' + idtable + ' tr').css('display', 'table-row'); }
|
||||
else { $('table#' + idtable + ' tr:not(.ADtr)').css('display', 'none'); $('table#' + idtable + ' tr:contains("' + $('#' + idtxt).val() + '")').css('display', 'table-row'); }
|
||||
else {
|
||||
$('table#' + idtable + ' tr:not(.ADtr)').css('display', 'none'); $('table#' + idtable + ' tr:contains("' + $('#' + idtxt).val() + '")').css('display', 'table-row');
|
||||
$('div.ADScroller .ADScroller-header table#' + idtable + ' tr:not(.ADtr)').css('display', '');
|
||||
}
|
||||
if ($('#' + idcontador).length > 0) {
|
||||
$('#' + idcontador).html($('#' + idtable + ' tr:visible').length);
|
||||
}
|
||||
}
|
||||
|
||||
function FiltrarTablaV2(idtxt, idtable, idcontador) {
|
||||
if ($(idtxt).val() == '') { $(idtable + ' tr').css('display', 'table-row'); }
|
||||
else { $(idtable + ' tr:not(.ADtr)').css('display', 'none'); $(idtable + ' tr:contains("' + $(idtxt).val() + '")').css('display', 'table-row'); }
|
||||
if ($(idtxt).val() == '') { $(idtable + ' tr').css('display', ''); }
|
||||
else {
|
||||
$(idtable + ' tr:not(.ADtr)').css('display', 'none'); $(idtable + ' tr:contains("' + $(idtxt).val() + '")').css('display', '');
|
||||
$('div.ADScroller .ADScroller-header '+idtable + ' tr:not(.ADtr)').css('display', '');
|
||||
}
|
||||
if ($('#' + idcontador).length > 0) {
|
||||
$('#' + idcontador).html($(idtable + ' tr:visible').length);
|
||||
}
|
||||
|
||||
@@ -215,7 +215,7 @@
|
||||
</div>
|
||||
<div class="form-group form-md-line-input form-md-floating-label input-iconright">
|
||||
<asp:Label runat="server" Text="Clasificación" AssociatedControlID="DdlClasificacion"></asp:Label>
|
||||
<asp:DropDownList ID="DdlClasificacion" CssClass="form-control input-sm select2me" runat="server" AutoPostBack="true" DataTextField="Clasificacion" DataValueField="CveClasificacion" Width="100%">
|
||||
<asp:DropDownList ID="DdlClasificacion" CssClass="form-control input-sm select2me" runat="server" AutoPostBack="true" DataTextField="Clasificacion" DataValueField="CveClasificacion" Width="100%" OnSelectedIndexChanged="DdlClasificacion_SelectedIndexChanged" >
|
||||
<asp:ListItem Selected="True" Text="Seleccione la Clasificación (Todas)" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
|
||||
@@ -224,13 +224,14 @@ public partial class Ventas_RepConciliacionEmitidosSat : ClsPaginas
|
||||
ClsCGame ObjCGame = new ClsCGame(ObjVentas.IniciaTransacSQL());
|
||||
ClsEdocumentacion ObjDocCliente = new ClsEdocumentacion(ObjVentas.IniciaTransacSQL());
|
||||
ClsAcumuladores ObjAcum = new ClsAcumuladores(ObjVentas.IniciaTransacSQL());
|
||||
//ClsContPAQi ObjContPaq = null;
|
||||
ClsContPAQi ObjContPaq = null;
|
||||
//StringBuilder MensajeAlert = new StringBuilder() ;
|
||||
Modelos.Factura.MMensajeFactura Resp = new Modelos.Factura.MMensajeFactura();
|
||||
DataTable DtDetalle = objfact.DtDetalle;
|
||||
try
|
||||
{
|
||||
// objfact.GuardarVenta(ref objfact, ref ObjVentas, ref ObjConta, ref ObjInventario, ref ObjContr, ref DtDetalle, objfact.CveNCaVincular, ref ObjContPaq, ref ObjBancos, ref ObjOS, ref ObjEventos, ref ObjCGame, ref ObjClientes, ref Resp, ObjAcum: ObjAcum);
|
||||
objfact.GuardarVenta(ref objfact, ref ObjVentas, ref ObjConta, ref ObjInventario, ref ObjContr, ref DtDetalle, objfact.CveNCaVincular, ref ObjContPaq,
|
||||
ref ObjBancos, ref ObjOS, ref ObjEventos, ref ObjCGame, ref ObjClientes, false, ObjAcum,ref Resp);
|
||||
|
||||
}
|
||||
catch (Exception e)
|
||||
@@ -803,6 +804,28 @@ public partial class Ventas_RepConciliacionEmitidosSat : ClsPaginas
|
||||
}
|
||||
//String.Format("/Compras/PopUpVerFactura.aspx?P={0}", Encripta(String.Format("OP=FactVta&CVEVENTA={0}&EXT={1}&SERIEFOLIO={2}&TIPODOCTO={3}", CveVenta, "XML", DbRowVenta("SerieFolio"), DbRowVenta("TipoDocto"))))
|
||||
}
|
||||
|
||||
protected void DdlClasificacion_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
int CveClasificacion = DdlClasificacion.SelectedValue.ToEntero();
|
||||
if (UsuarioActual.Empresa.Funcionalidad(141).ToString() == "1")
|
||||
{
|
||||
|
||||
DdlPS.setEsWebService(true);
|
||||
DdlPS.ddlWS.Attributes.Add("data-cveclasificacion", CveClasificacion.ToString());
|
||||
DdlPS.ddlWS.Attributes.Add("data-pagina", "ventas/ventas");
|
||||
DdlPS.ddlWS.Attributes.Add("data-Estatus", "1");
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
DdlPS.setEsWebService(false);
|
||||
DdlPS.ddl.DataSource = get_GlobalDTPSSimplificado(UsuarioActual.CveEmpresa, CveClasificacion: CveClasificacion, Estatus: 1, AplicaParaVenta: 1);
|
||||
DdlPS.ddl.DataBind();
|
||||
}
|
||||
UpModalDefaults.Update();
|
||||
}
|
||||
}
|
||||
namespace ADSistemaLibrary2.SatXml
|
||||
{
|
||||
|
||||
@@ -1267,6 +1267,15 @@ Partial Class Ventas
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property CveEstadoCancelacion As Integer
|
||||
Get
|
||||
Return If(IsNothing(ViewState("CveEstadoCancelacion")), 0, CType(ViewState("CveEstadoCancelacion"), Integer))
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("CveEstadoCancelacion") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property PermiteCredito As Boolean
|
||||
Get
|
||||
Return If(IsNothing(ViewState("PermiteCredito")), False, CBool(ViewState("PermiteCredito")))
|
||||
@@ -1321,6 +1330,14 @@ Partial Class Ventas
|
||||
ViewState("RFCReceptorVenta") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property RegimenFiscalCliente As String
|
||||
Get
|
||||
Return IfNull(ViewState("RegimenFiscalCliente"), "").ToString()
|
||||
End Get
|
||||
Set(value As String)
|
||||
ViewState("RegimenFiscalCliente") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property Adjunto As String
|
||||
Get
|
||||
Return If(IsNothing(ViewState("Adjunto")), "", ViewState("Adjunto").ToString())
|
||||
@@ -2245,6 +2262,7 @@ Partial Class Ventas
|
||||
SeCancelaRemisionProceso = False
|
||||
TotalOriginal = 0
|
||||
CveAlmacenDevolucion = 0
|
||||
Me.CveEstadoCancelacion = 0
|
||||
|
||||
txtFechaICot.Text = Now.AddMonths(-3).ToShortDateString
|
||||
TxtFechaIRem.Text = Now.AddMonths(-3).ToShortDateString
|
||||
@@ -2478,6 +2496,25 @@ Partial Class Ventas
|
||||
HlFacturasRelaciondas.Visible = True
|
||||
End If
|
||||
|
||||
If Request("CveOrdenProduccion") IsNot Nothing AndAlso IsNumeric(Request("CveOrdenProduccion")) AndAlso Request("CveOrdenProduccion").ToEntero() > 0 Then
|
||||
DdlSubProyectoDatos.SelectedValueExist(11954)
|
||||
Using ObjVentas As New ClsNominas
|
||||
|
||||
If ObjVentas.ManifiestoForVtaGet(UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario, "", -Request("CveOrdenProduccion").ToEntero()) Then
|
||||
TmpDT = ObjVentas.DtResultados
|
||||
TmpDT.Columns.Add("EntregaDirecta", GetType(Integer))
|
||||
TmpDT.Columns.Add("CveMovimientoDetallePedido", GetType(Integer))
|
||||
TmpDT.Columns.Add("CveVentaDetalleRNC", GetType(Integer))
|
||||
TmpDT.Columns.Add("TieneProntoPago", GetType(String))
|
||||
TmpDT.Columns.Add("ImporteProntoPago", GetType(Decimal))
|
||||
GvPS.DataSource = ObjVentas.DtResultados
|
||||
GvPS.DataBind()
|
||||
|
||||
'IEPS A NIVEL DETALLE
|
||||
'TxtIEPS.Text = If(TmpDT.SUM("IEPS") > 0, TmpDT.SUM("IEPS").FormatoNumero, TxtIEPS.Text)
|
||||
End If
|
||||
End Using
|
||||
End If
|
||||
If Request("CveEmbarqueManifiesto") IsNot Nothing AndAlso IsNumeric(Request("CveEmbarqueManifiesto")) AndAlso Request("CveEmbarqueManifiesto").ToEntero() > 0 Then
|
||||
DdlMoneda.SelectedValueExist(2)
|
||||
Using ObjVentas As New ClsNominas
|
||||
@@ -5662,8 +5699,12 @@ Partial Class Ventas
|
||||
'End If
|
||||
End Sub
|
||||
Private Sub CargaUsoCFDI()
|
||||
DdlUsoCFDI.DataSource = GlobalDTSATUsosCFDI(UsuarioActual.Empresa.EsPersonaFisica)
|
||||
DdlSucursalUsoCFDI.DataSource = GlobalDTSATUsosCFDI(UsuarioActual.Empresa.EsPersonaFisica)
|
||||
If UsuarioActual.Empresa.Funcionalidad(350) <> "1" Then
|
||||
RegimenFiscalCliente = "-1"
|
||||
End If
|
||||
|
||||
DdlUsoCFDI.DataSource = GlobalDTSATUsosCFDI(UsuarioActual.Empresa.EsPersonaFisica, RegimenFiscalReceptor:=RegimenFiscalCliente)
|
||||
DdlSucursalUsoCFDI.DataSource = GlobalDTSATUsosCFDI(UsuarioActual.Empresa.EsPersonaFisica, RegimenFiscalReceptor:=RegimenFiscalCliente)
|
||||
|
||||
DdlUsoCFDI.DataBind()
|
||||
DdlSucursalUsoCFDI.DataBind()
|
||||
@@ -5945,6 +5986,10 @@ Partial Class Ventas
|
||||
ViewState("CliLocalidad") = If(ObjCliente.Localidad.Trim.Length = 0, ObjCliente.Ciudad.Trim, ObjCliente.Localidad.Trim)
|
||||
ViewState("CliPais") = ObjCliente.Pais
|
||||
ImprimeNombreSucursal = ObjCliente.ImprimeNombreSucursal
|
||||
If UsuarioActual.Empresa.Funcionalidad(350) = "1" Then
|
||||
RegimenFiscalCliente = ObjCliente.DtResultados(0)("CodigoRegimenFiscal").ToString()
|
||||
CargaUsoCFDI()
|
||||
End If
|
||||
'ViewState("NumCtaPago") = ObjCliente.NumCtaPago
|
||||
ViewState("ClienteDesglosaIEPS") = ObjCliente.DesglosaIEPS
|
||||
If Not ClienteDesglosaIEPS Then
|
||||
@@ -10092,8 +10137,8 @@ Partial Class Ventas
|
||||
'si es cancelacion, debe de conservar el folio actual
|
||||
If Not EsCancelacion Then ObjFactura.Folio = If(EstablecioFolio Or VistaPrevia Or (CveVenta > 0 And (NuevaFactura.Contiene(0, 2))), TxtFolio.Text.Trim.ToEntero(), -1)
|
||||
|
||||
'SI ES FACTURACION DE REMISION O COTIZACION NO TOMAR EL FOLIO QUE SE MUESTRA
|
||||
If Not EsCancelacion AndAlso ObjFactura.Folio > 0 AndAlso TipoDoctoViejo.Contiene("Rem", "Cot") Then
|
||||
'SI NO ESTABLECIO UN FOLIO FIJO Y SI ES FACTURACION DE REMISION O COTIZACION NO TOMAR EL FOLIO QUE SE MUESTRA
|
||||
If Not EstablecioFolio AndAlso (Not EsCancelacion AndAlso ObjFactura.Folio > 0 AndAlso TipoDoctoViejo.Contiene("Rem", "Cot")) Then
|
||||
ObjFactura.Folio = -1
|
||||
End If
|
||||
|
||||
@@ -19239,6 +19284,7 @@ Partial Class Ventas
|
||||
End Sub
|
||||
Protected Sub TxtFolio_TextChanged(sender As Object, e As System.EventArgs) Handles TxtFolio.TextChanged
|
||||
ViewState("EstablecioFolio") = True
|
||||
Alert("Se estableció el Folio Fijo para el nuevo documento.")
|
||||
End Sub
|
||||
Private Sub HabilitarFacturacionSucursal()
|
||||
trsucursalciente.Visible = True
|
||||
@@ -20716,12 +20762,14 @@ Partial Class Ventas
|
||||
|
||||
If Vigencia.EsCancelable = "Cancelable sin aceptación" Then
|
||||
'script = "BtnRefacturacionConfirmarAceptacion();"
|
||||
Me.CveEstadoCancelacion = 1
|
||||
sb.AppendFormat("<b>{0}</b> <br/>", Vigencia.EsCancelable)
|
||||
sb.Append("Está seguro de realizar la refacturación?.")
|
||||
End If
|
||||
|
||||
If Vigencia.EsCancelable = "Cancelable con aceptación" OrElse String.IsNullOrEmpty(Vigencia.EsCancelable) Then
|
||||
'script = "BtnRefacturacionConfirmar();"
|
||||
Me.CveEstadoCancelacion = 2
|
||||
sb.AppendFormat("<b>{0}</b> <br/>", "Cancelable con aceptación")
|
||||
sb.Append("Está seguro de cancelar el documento para realizar la refacturación?.")
|
||||
End If
|
||||
@@ -23441,6 +23489,13 @@ Partial Class Ventas
|
||||
sb.Append("<b>No encontrado</b> <br/>")
|
||||
sb.Append("Está seguro de cancelar el documento?.")
|
||||
Else
|
||||
'GUARDA EL ESTADO DE CANCELACION
|
||||
If Vigencia.EsCancelable.ToUpper() = "CANCELABLE CON ACEPTACIÓN" Then
|
||||
Me.CveEstadoCancelacion = 2
|
||||
ElseIf Vigencia.EsCancelable.ToUpper() = "CANCELABLE SIN ACEPTACIÓN" Then
|
||||
Me.CveEstadoCancelacion = 1
|
||||
End If
|
||||
|
||||
sb.AppendFormat("<b>{0}</b> <br/>", Vigencia.EsCancelable)
|
||||
If Vigencia.EsCancelable.ToUpper() <> "NO CANCELABLE" Then
|
||||
sb.Append("Está seguro de cancelar el documento?.")
|
||||
@@ -23628,7 +23683,7 @@ Partial Class Ventas
|
||||
'ObjE.AddEventoBitacora(msgBitacora, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveVenta:=CveVenta)
|
||||
'ObjE.Dispose()
|
||||
|
||||
resp = ObjFacturaCancelacion.CancelarPorRefacturacion(DdlMotivoRefacturacion.SelectedValue.ToEntero(), TxtMotivoRefac.Text.Trim())
|
||||
resp = ObjFacturaCancelacion.CancelarPorRefacturacion(DdlMotivoRefacturacion.SelectedValue.ToEntero(), TxtMotivoRefac.Text.Trim(), CveEstadoCancelacion:=Me.CveEstadoCancelacion)
|
||||
Else
|
||||
Dim ListaRemisionesCancelar As New List(Of Integer)
|
||||
If ChkCanRem.Checked Then
|
||||
@@ -23641,7 +23696,7 @@ Partial Class Ventas
|
||||
|
||||
ObjFacturaCancelacion.CveAlmacenDevolucion = CveAlmacenDevolucion
|
||||
|
||||
resp = ObjFacturaCancelacion.CancelarFactura(ChkDevAlm.Checked, ListaRemisionesCancelar, CveMotivoCancelacion:=DdlMotivoCancelacion.SelectedValue.ToEntero(), Motivo:=TxtMotivoCancelacion.Text.Trim())
|
||||
resp = ObjFacturaCancelacion.CancelarFactura(ChkDevAlm.Checked, ListaRemisionesCancelar, CveMotivoCancelacion:=DdlMotivoCancelacion.SelectedValue.ToEntero(), Motivo:=TxtMotivoCancelacion.Text.Trim(), CveEstadoCancelacion:=Me.CveEstadoCancelacion)
|
||||
End If
|
||||
|
||||
SWatch.Stop()
|
||||
@@ -30543,7 +30598,11 @@ Partial Class Ventas
|
||||
|
||||
BtnEmitirImprimir.Text = "Facturar"
|
||||
DdlTipoComprobante.SelectedValue = "Ing"
|
||||
TxtFecha.Text = Now.ToShortDateString()
|
||||
|
||||
If Not (EstablecioFolio AndAlso UsuarioActual.TienePermisoProceso(130)) Then
|
||||
TxtFecha.Text = Now.ToShortDateString()
|
||||
End If
|
||||
|
||||
UpPS.Update()
|
||||
UpFacturar.Update()
|
||||
|
||||
@@ -31261,7 +31320,9 @@ Partial Class Ventas
|
||||
|
||||
Dim TipoDoctoViejo As String = DdlTipoComprobante.SelectedValue
|
||||
DdlTipoComprobante.SelectedValue = TipoDoctoNuevo
|
||||
TxtFecha.Text = Now.ToString()
|
||||
If Not (EstablecioFolio AndAlso UsuarioActual.TienePermisoProceso(130)) Then
|
||||
TxtFecha.Text = Now.ToString()
|
||||
End If
|
||||
TxtFechaPago.Text = If(TipoDoctoViejo = "Rem" AndAlso EsDiasCreditoFijo, Now.AddDays(DiasCredito), If(DdlTipoComprobante.SelectedValue = "Rem", Now.AddDays(PlazoCobranzaRemision), Now.AddDays(PlazoCobranza))).ToShortDateString
|
||||
TxtFechaEjecucion.Text = Now.ToString()
|
||||
|
||||
|
||||
@@ -412,6 +412,8 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user