Merge branch 'master' of http://192.168.10.111:8383/SIG
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -4606,7 +4606,7 @@ Partial Class Bancos_IE
|
||||
End If
|
||||
|
||||
|
||||
If Not ErrorCancelarComplemento Then
|
||||
If CveMotivoCancelacion > 0 AndAlso CveSATMotivoCancelacion > 0 Then
|
||||
|
||||
Dim ObjCancelacion As New Timbrado
|
||||
If EstatusSATCancelado(FolioFiscalCancelar, UsuarioActual.Empresa.RFC, RFCReceptorCancelar) Then
|
||||
@@ -4621,7 +4621,7 @@ Partial Class Bancos_IE
|
||||
Else
|
||||
If ObjCancelacion.CFDICancelar(UsuarioActual.Empresa, FolioFiscalCancelar, 0, RFCReceptorCancelar, UsuarioActual.Empresa.RFC, CvePACCancelacion, CveSATMotivoCancelacion:=CveSATMotivoCancelacion) Then
|
||||
|
||||
If Banc.UpdateComplementoPago(CveComplementoPagoCancelar, "-1", -1, UsuarioActual.CveEmpresa, 2, CvePACCancelacion, FechaCancelacion:=ObjCancelacion.CancelacionFecha, SelloCancelacion:=ObjCancelacion.CancelacionAcuse) Then
|
||||
If Banc.UpdateComplementoPago(CveComplementoPagoCancelar, "-1", -1, UsuarioActual.CveEmpresa, 2, CvePACCancelacion, FechaCancelacion:=ObjCancelacion.CancelacionFecha, SelloCancelacion:=ObjCancelacion.CancelacionAcuse, CveSATMotivoCancelacion:=CveSATMotivoCancelacion) Then
|
||||
CargaComplementosPago()
|
||||
RegistraScript("$('#ModalCancelarComplemetno').modal('hide');")
|
||||
ErrorCancelarComplemento = False
|
||||
@@ -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 = ""
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -187,11 +187,18 @@
|
||||
<asp:TextBox ID="TxtTotal" runat="server" CssClass="form-control input-sm" Visible="false" MaxLength="12" Width="140px" placeholder="Total" Enabled="false" ClientIDMode="Static" Style="text-align: right;"></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" runat="server" id="rowComisiones">
|
||||
<label class="col-md-2" runat="server" id="lblpagocomisiones">Otros Ingresos:</label>
|
||||
<div class="col-md-3">
|
||||
<div class="row">
|
||||
<div class="col-md-2" runat="server" id="rowComisiones1">Otros Ingresos:</div>
|
||||
<div class="col-md-3" runat="server" id="rowComisiones2">
|
||||
<asp:CheckBox ID="ChkAjusteOI" runat="server" AutoPostBack="true" />
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-md-2" runat="server" id="DvLiquidacion1" visible="false">Liquidación:</div>
|
||||
<div class="col-md-3" runat="server" id="DvLiquidacion2" visible="false">
|
||||
<asp:CheckBox ID="ChkLiquidacion" OnCheckedChanged="ChkLiquidacion_CheckedChanged" runat="server" AutoPostBack="true" />
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<asp:UpdatePanel ID="UpCuentaDeposito" UpdateMode="Conditional" runat="server">
|
||||
@@ -264,6 +271,8 @@
|
||||
DataKeyNames="TipoDocto,CveVenta,CveCliente,SerieFolio,Original,SubTotal,IVA,IEPS,RetIVA,RetISR,Num3,CveSubProyecto,CveMoneda,Saldo,TipoCambio, RFC,UUID,Fecha,PorcentajeIVA,DescuentoProntoPago,CveTipoRetencion,Descuento,ClaveMetodoPagoSAT"
|
||||
CssClass="table table-striped table-advance table-hover Widthall" Style="text-align: center;" GridLines="None">
|
||||
<Columns>
|
||||
|
||||
<%--0--%>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>
|
||||
<input type="checkbox" id="ChkAll" onclick="CheckAll();" />
|
||||
@@ -272,58 +281,84 @@
|
||||
<asp:CheckBox ID="Chk" CssClass="chkgv" runat="server"></asp:CheckBox>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%--1--%>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Left">
|
||||
<HeaderTemplate>Venta</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HplF" CssClass="Texto" NavigateUrl='<%# Eval("CveVenta", "/Ventas/Ventas.aspx?CveVenta={0}")%>' Text='<%# Eval("SerieFolio")%>' runat="server"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField HeaderText="Tipo Docto" DataField="TipoDocto" ItemStyle-HorizontalAlign="Center" />
|
||||
<%--<asp:HyperLinkField DataNavigateUrlFields="CveCompra" DataNavigateUrlFormatString="/Compras/Compras.aspx?CveCompra={0}" DataTextField="SerieFolio" HeaderText="Factura" ControlStyle-CssClass="Texto" />--%>
|
||||
<%--2--%>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center">
|
||||
<HeaderTemplate>Fecha Venta</HeaderTemplate>
|
||||
<HeaderTemplate>Tipo<br> Docto</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlTipoDocto" runat="server" Text='<%# Eval("TipoDocto") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%--3--%>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center">
|
||||
<HeaderTemplate>Fecha<br> Venta</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlFecha" runat="server" Text='<%# Eval("Fecha", "{0:d}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%--4--%>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center">
|
||||
<HeaderTemplate>Fecha Vencimiento</HeaderTemplate>
|
||||
<HeaderTemplate>Fecha <br> Vencimiento</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlFechaVenci" runat="server" Text='<%# Eval("FechaVencimiento", "{0:d}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%--5--%>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center">
|
||||
<HeaderTemplate>Días Vencidos</HeaderTemplate>
|
||||
<HeaderTemplate>Días<br> Vencidos</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlDiasVencido" runat="server" Text='<%# Eval("DiasVencidos", "{0}") %>'></asp:Literal>
|
||||
<asp:Literal ID="LtlDiasVencido" runat="server" Text='<%# Eval("DiasVencidos", "{0}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField HeaderText="Método de Pago" DataField="ClaveMetodoPagoSAT" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="Forma de Pago" DataField="FormaPago" ItemStyle-HorizontalAlign="Left" />
|
||||
<%--6--%>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Left">
|
||||
<HeaderTemplate>Método<br> de Pago</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlMetodoPago" runat="server" Text='<%# Eval("ClaveMetodoPagoSAT", "{0}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%--7--%>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Left">
|
||||
<HeaderTemplate>Forma<br> de Pago</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlFormaPago" runat="server" Text='<%# Eval("FormaPago", "{0}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%--8--%>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Right">
|
||||
<HeaderTemplate>Monto Compra</HeaderTemplate>
|
||||
<HeaderTemplate>Monto <br> Compra</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlSaldoOriginal" runat="server" Text='<%# Eval("Original", "{0:N2}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%--9--%>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center">
|
||||
<HeaderTemplate></HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="LtlMoneda" runat="server" Text='<%# Eval("TMoneda", "{0}") %>' Style="text-decoration: none" Enabled="false" ForeColor="#333333"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%--10--%>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Abonado</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlAbonado" runat="server" Text='<%# Eval("Abonado", "{0:N2}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%--11--%>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Saldo</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlSaldo" runat="server" Text='<%# Eval("Saldo", "{0:N2}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%--12--%>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center">
|
||||
<HeaderTemplate>Abonar</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
@@ -331,6 +366,7 @@
|
||||
<asp:RangeValidator ID="RVAbonar" runat="server" Enabled="false" Type="Currency" MinimumValue="0" MaximumValue='<%# Eval("Saldo", "{0:N2}") %>' ErrorMessage="*" ControlToValidate="TxtAbonar" Display="Dynamic"></asp:RangeValidator>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%--13--%>
|
||||
<asp:TemplateField Visible="false">
|
||||
<HeaderTemplate>Ot. Ing.</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
@@ -338,33 +374,96 @@
|
||||
<asp:RangeValidator ID="RVComision" runat="server" Enabled="false" ErrorMessage="*" ControlToValidate="TxtComision" Display="Dynamic" Type="Double"></asp:RangeValidator>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%--14--%>
|
||||
<asp:TemplateField Visible="false" ItemStyle-HorizontalAlign="Center">
|
||||
<HeaderTemplate>Descuento Pronto Pago</HeaderTemplate>
|
||||
<HeaderTemplate>Descuento<br>Pronto Pago</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlDescuentoProntoPago" runat="server" Text='<%# Eval("DescuentoProntoPago", "{0:N2}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Generar NC" Visible="false" >
|
||||
<%--15--%>
|
||||
<asp:TemplateField Visible="false" >
|
||||
<HeaderTemplate>Generar<br> NC</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:CheckBox ID="ChkGenerarNC" CssClass="chkgv" runat="server" Visible="false" Enabled="false"></asp:CheckBox>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
|
||||
<%--16--%>
|
||||
<asp:TemplateField Visible="false">
|
||||
<HeaderTemplate>Col. 1</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtLiquidacionCol1" Width="50px" runat="server" Style="text-align: right;" ></asp:TextBox>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%--17--%>
|
||||
<asp:TemplateField Visible="false">
|
||||
<HeaderTemplate>Col. 2</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtLiquidacionCol2" Width="50px" runat="server" Style="text-align: right;" ></asp:TextBox>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%--18--%>
|
||||
<asp:TemplateField Visible="false">
|
||||
<HeaderTemplate>Col. 3</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtLiquidacionCol3" Width="50px" runat="server" Style="text-align: right;" ></asp:TextBox>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%--19--%>
|
||||
<asp:TemplateField Visible="false">
|
||||
<HeaderTemplate>Col. 4</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtLiquidacionCol4" Width="50px" runat="server" Style="text-align: right;" ></asp:TextBox>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%--20--%>
|
||||
<asp:TemplateField Visible="false">
|
||||
<HeaderTemplate>Col. 5</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtLiquidacionCol5" Width="50px" runat="server" Style="text-align: right;" ></asp:TextBox>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%--21--%>
|
||||
<asp:TemplateField Visible="false">
|
||||
<HeaderTemplate>Col. 6</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtLiquidacionCol6" Width="50px" runat="server" Style="text-align: right;" ></asp:TextBox>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%--22--%>
|
||||
<asp:TemplateField Visible="false">
|
||||
<HeaderTemplate>Col. 7</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtLiquidacionCol7" Width="50px" runat="server" Style="text-align: right;" ></asp:TextBox>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%--23--%>
|
||||
<asp:TemplateField Visible="false">
|
||||
<HeaderTemplate>Total<br>Liquidación</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtLiquidacionCol8" Width="50px" runat="server" Style="text-align: right;" onkeypress="return disablekeys();"></asp:TextBox>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<%--24--%>
|
||||
<asp:TemplateField ItemStyle-Width="300px">
|
||||
<HeaderTemplate>Auxiliar</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlAux" runat="server"></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%--25--%>
|
||||
<asp:TemplateField Visible="False">
|
||||
<HeaderTemplate>CveVenta</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HplF2" CssClass="btn-success" Text='<%# Eval("CveVenta")%>' runat="server"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
|
||||
<%--26--%>
|
||||
<asp:TemplateField >
|
||||
<HeaderTemplate>Complemento Pago</HeaderTemplate>
|
||||
<HeaderTemplate>Complemento<br> Pago</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal runat="server" ID="LtlComplemento" Text="<i class='fa fa-check text-success ' aria-hidden='true'></i>" ></asp:Literal>
|
||||
</ItemTemplate>
|
||||
@@ -508,7 +607,7 @@
|
||||
<script type="text/javascript">
|
||||
var Ventas = '';
|
||||
|
||||
function FnSuma(t, txt, importe) {
|
||||
function FnSuma(t, txt, importe, CveVenta) {
|
||||
|
||||
var chkPesosBancos = $get("ChkPagarPesos");
|
||||
var chkDolaresBancos = $get("ChkPagarDolares");
|
||||
@@ -518,6 +617,14 @@
|
||||
txt.value = FormatoNumero(importe, 2);
|
||||
} else {
|
||||
txt.value = "";
|
||||
|
||||
let ClsSelLiquidacionVenta = ".ClsSelLiquidacionVenta" + CveVenta;
|
||||
let ClsSelLiquidacionVentaTotal = ".ClsSelLiquidacionVentaTotal" + CveVenta;
|
||||
|
||||
$(ClsSelLiquidacionVenta).val('');
|
||||
$(ClsSelLiquidacionVentaTotal).val('');
|
||||
|
||||
|
||||
}
|
||||
//if (typeof t2 === "undefined") {
|
||||
|
||||
@@ -548,6 +655,8 @@
|
||||
var facDolares = false;
|
||||
var div = document.getElementById("DivTC")
|
||||
|
||||
let totalLiquidacion = 0.0;
|
||||
|
||||
if ($get('TxtTC') != null) {
|
||||
tc = ToDouble($get('TxtTC').value);
|
||||
}
|
||||
@@ -602,6 +711,22 @@
|
||||
}
|
||||
$get('TxtObservaciones').value = $get('HdnObs').value + ' Ventas: ' + Ventas;
|
||||
|
||||
|
||||
|
||||
|
||||
$(".ClsSelLiquidacion").each(function () {
|
||||
|
||||
let valorString = $(this).val();
|
||||
valorString = valorString.replace(/,/g, '');
|
||||
|
||||
if (valorString.trim().length > 0) {
|
||||
totalLiquidacion = totalLiquidacion + parseFloat(valorString);
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
if ($get('TxtOtrosImportes') != null) {
|
||||
if (pagoMultiple != 0) {
|
||||
$get('TxtOtrosImportes').value = FormatoNumero(Comision, 2);
|
||||
@@ -612,12 +737,12 @@
|
||||
|
||||
}
|
||||
else {
|
||||
return Importe + parseFloat(Comision);
|
||||
return Importe + parseFloat(Comision) - totalLiquidacion;
|
||||
}
|
||||
|
||||
}
|
||||
else {
|
||||
return Importe
|
||||
return Importe - totalLiquidacion
|
||||
}
|
||||
}
|
||||
|
||||
@@ -790,5 +915,44 @@
|
||||
TipoCambioActual = TipoCambioTxt;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
function SumaLiquidacion(txt, CveVenta, pagoMultiple, monedaPago) {
|
||||
|
||||
let ClsSelLiquidacionVenta = ".ClsSelLiquidacionVenta" + CveVenta;
|
||||
let ClsSelLiquidacionVentaTotal = ".ClsSelLiquidacionVentaTotal" + CveVenta;
|
||||
let Total = 0.0;
|
||||
|
||||
|
||||
$( ClsSelLiquidacionVenta).each(function () {
|
||||
|
||||
let valorString = $(this).val();
|
||||
valorString = valorString.replace(/,/g, '');
|
||||
|
||||
if (valorString.trim().length > 0) {
|
||||
Total = Total + parseFloat(valorString);
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
$(ClsSelLiquidacionVentaTotal).each(function () {
|
||||
$(this).val(Total);
|
||||
FormatoMoneda2($(this));
|
||||
});
|
||||
|
||||
|
||||
FormatoMoneda(txt);
|
||||
|
||||
var Suma = SumaValores(pagoMultiple, monedaPago);
|
||||
$get('TxtImporte').value = FormatoNumero(Suma, 2);
|
||||
|
||||
}
|
||||
|
||||
function disablekeys()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
</script>
|
||||
</asp:Content>
|
||||
|
||||
@@ -257,7 +257,7 @@ Partial Class Ventas_ClientesAbonar
|
||||
|
||||
IdCuentaBancaria = 0
|
||||
|
||||
TxtOtrosImportes.Attributes.Add("onKeyUp", String.Format("FnSuma(this,{0},{1});", "TxtTotal", 0))
|
||||
TxtOtrosImportes.Attributes.Add("onKeyUp", String.Format("FnSuma(this,{0},{1},-1);", "TxtTotal", 0))
|
||||
|
||||
If CveMoneda > 0 Then LbTipoMoneda.Text = String.Format("Pago en {0}", GlobalDTMonedas.FiltraParametros(String.Format("CveMoneda = {0}", CveMoneda)).Rows(0)("Moneda"))
|
||||
|
||||
@@ -292,6 +292,12 @@ Partial Class Ventas_ClientesAbonar
|
||||
|
||||
RVTxtFechaDocumento.MaximumValue = Now.ToString("dd/MM/yyyy")
|
||||
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(590) = "1" Then
|
||||
DvLiquidacion1.Visible = True
|
||||
DvLiquidacion2.Visible = True
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
If (CveMonedaFiltro = 2 And ChkPagarPesos.Checked) Then
|
||||
@@ -497,6 +503,7 @@ Partial Class Ventas_ClientesAbonar
|
||||
End Sub
|
||||
|
||||
Protected Sub GvCxC_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvCxC.RowDataBound
|
||||
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
Dim moneda As Integer = 0
|
||||
If e.Row.RowIndex = 0 Then
|
||||
@@ -507,6 +514,19 @@ Partial Class Ventas_ClientesAbonar
|
||||
e.Row.Cells(3).Visible = False
|
||||
e.Row.Cells(4).Visible = False
|
||||
e.Row.BackColor = Drawing.Color.LightGray
|
||||
|
||||
|
||||
e.Row.FCTextBox("TxtLiquidacionCol1").Visible = False
|
||||
e.Row.FCTextBox("TxtLiquidacionCol2").Visible = False
|
||||
e.Row.FCTextBox("TxtLiquidacionCol3").Visible = False
|
||||
e.Row.FCTextBox("TxtLiquidacionCol4").Visible = False
|
||||
e.Row.FCTextBox("TxtLiquidacionCol5").Visible = False
|
||||
e.Row.FCTextBox("TxtLiquidacionCol6").Visible = False
|
||||
e.Row.FCTextBox("TxtLiquidacionCol7").Visible = False
|
||||
e.Row.FCTextBox("TxtLiquidacionCol8").Visible = False
|
||||
|
||||
|
||||
|
||||
End If
|
||||
If e.Row.RowIndex = 1 Then
|
||||
e.Row.Cells(0).Width = Unit.Pixel(25)
|
||||
@@ -548,9 +568,9 @@ Partial Class Ventas_ClientesAbonar
|
||||
End Select
|
||||
|
||||
If e.Row.DBCampo("DescuentoProntoPago").ToDecimal() > 0 Then
|
||||
e.Row.FCCheckBox("Chk").Attributes.Add("onclick", String.Format("FnSuma(this,{0},{1}); FnCambia({2},this,{1},0,{3},{4}); FnSeleccionaNC({5},{6},{0});", e.Row.FCTextBox("TxtAbonar").ClientID, e.Row.DBCampo("Saldo"), e.Row.FCCheckBox("Chk").ClientID, CveMonedaFiltro, moneda, e.Row.FCCheckBox("Chk").ClientID, e.Row.FCCheckBox("ChkGenerarNC").ClientID))
|
||||
e.Row.FCCheckBox("Chk").Attributes.Add("onclick", String.Format("FnSuma(this,{0},{1},{5}); FnCambia({2},this,{1},0,{3},{4}); FnSeleccionaNC({5},{6},{0});", e.Row.FCTextBox("TxtAbonar").ClientID, e.Row.DBCampo("Saldo"), e.Row.FCCheckBox("Chk").ClientID, CveMonedaFiltro, moneda, e.Row.FCCheckBox("Chk").ClientID, e.Row.FCCheckBox("ChkGenerarNC").ClientID, e.Row.DBCampo("CveVenta")))
|
||||
Else
|
||||
e.Row.FCCheckBox("Chk").Attributes.Add("onclick", String.Format("FnSuma(this,{0},{1}); FnCambia({2},this,{1},0,{3},{4});", e.Row.FCTextBox("TxtAbonar").ClientID, e.Row.DBCampo("Saldo"), e.Row.FCCheckBox("Chk").ClientID, CveMonedaFiltro, moneda))
|
||||
e.Row.FCCheckBox("Chk").Attributes.Add("onclick", String.Format("FnSuma(this,{0},{1},{5}); FnCambia({2},this,{1},0,{3},{4},{5});", e.Row.FCTextBox("TxtAbonar").ClientID, e.Row.DBCampo("Saldo"), e.Row.FCCheckBox("Chk").ClientID, CveMonedaFiltro, moneda, e.Row.DBCampo("CveVenta")))
|
||||
End If
|
||||
|
||||
If Not UsuarioActual.Empresa.Funcionalidad(536) = "1" Then
|
||||
@@ -578,9 +598,32 @@ Partial Class Ventas_ClientesAbonar
|
||||
|
||||
If e.Row.DBCampo("DescuentoProntoPago").ToDecimal() > 0 AndAlso e.Row.DBCampo("DiasVencidos").ToEntero() <= 0 Then
|
||||
e.Row.FCCheckBox("ChkGenerarNC").Visible = True
|
||||
e.Row.FCCheckBox("ChkGenerarNC").Attributes.Add("onclick", String.Format("FnSuma(this,{0},{1}); FnCambia({2},this,{1},0,{3},{4}); FnEditarImporte({2}, {0});", e.Row.FCTextBox("TxtAbonar").ClientID, e.Row.DBCampo("Saldo").ToDecimal - e.Row.DBCampo("DescuentoProntoPago").ToDecimal, e.Row.FCCheckBox("ChkGenerarNC").ClientID, CveMonedaFiltro, moneda))
|
||||
e.Row.FCCheckBox("ChkGenerarNC").Attributes.Add("onclick", String.Format("FnSuma(this,{0},{1},{5}); FnCambia({2},this,{1},0,{3},{4}); FnEditarImporte({2}, {0});", e.Row.FCTextBox("TxtAbonar").ClientID, e.Row.DBCampo("Saldo").ToDecimal - e.Row.DBCampo("DescuentoProntoPago").ToDecimal, e.Row.FCCheckBox("ChkGenerarNC").ClientID, CveMonedaFiltro, moneda, e.Row.DBCampo("CveVenta")))
|
||||
End If
|
||||
|
||||
e.Row.FCTextBox("TxtLiquidacionCol1").Attributes.Add("class", $"ClsSelLiquidacion ClsSelLiquidacionVenta{e.Row.DBCampo("CveVenta").ToEntero}")
|
||||
e.Row.FCTextBox("TxtLiquidacionCol2").Attributes.Add("class", $"ClsSelLiquidacion ClsSelLiquidacionVenta{e.Row.DBCampo("CveVenta").ToEntero}")
|
||||
e.Row.FCTextBox("TxtLiquidacionCol3").Attributes.Add("class", $"ClsSelLiquidacion ClsSelLiquidacionVenta{e.Row.DBCampo("CveVenta").ToEntero}")
|
||||
e.Row.FCTextBox("TxtLiquidacionCol4").Attributes.Add("class", $"ClsSelLiquidacion ClsSelLiquidacionVenta{e.Row.DBCampo("CveVenta").ToEntero}")
|
||||
e.Row.FCTextBox("TxtLiquidacionCol5").Attributes.Add("class", $"ClsSelLiquidacion ClsSelLiquidacionVenta{e.Row.DBCampo("CveVenta").ToEntero}")
|
||||
e.Row.FCTextBox("TxtLiquidacionCol6").Attributes.Add("class", $"ClsSelLiquidacion ClsSelLiquidacionVenta{e.Row.DBCampo("CveVenta").ToEntero}")
|
||||
e.Row.FCTextBox("TxtLiquidacionCol7").Attributes.Add("class", $"ClsSelLiquidacion ClsSelLiquidacionVenta{e.Row.DBCampo("CveVenta").ToEntero}")
|
||||
e.Row.FCTextBox("TxtLiquidacionCol8").Attributes.Add("class", $"ClsSelLiquidacionVentaTotal{e.Row.DBCampo("CveVenta").ToEntero}")
|
||||
|
||||
|
||||
e.Row.FCTextBox("TxtLiquidacionCol1").Attributes.Add("onkeyup", $"SumaLiquidacion(this,{e.Row.DBCampo("CveVenta").ToString},{CveMonedaFiltro},{ moneda})")
|
||||
e.Row.FCTextBox("TxtLiquidacionCol2").Attributes.Add("onkeyup", $"SumaLiquidacion(this,{e.Row.DBCampo("CveVenta").ToString},{CveMonedaFiltro},{ moneda})")
|
||||
e.Row.FCTextBox("TxtLiquidacionCol3").Attributes.Add("onkeyup", $"SumaLiquidacion(this,{e.Row.DBCampo("CveVenta").ToString},{CveMonedaFiltro},{ moneda})")
|
||||
e.Row.FCTextBox("TxtLiquidacionCol4").Attributes.Add("onkeyup", $"SumaLiquidacion(this,{e.Row.DBCampo("CveVenta").ToString},{CveMonedaFiltro},{ moneda})")
|
||||
e.Row.FCTextBox("TxtLiquidacionCol5").Attributes.Add("onkeyup", $"SumaLiquidacion(this,{e.Row.DBCampo("CveVenta").ToString},{CveMonedaFiltro},{ moneda})")
|
||||
e.Row.FCTextBox("TxtLiquidacionCol6").Attributes.Add("onkeyup", $"SumaLiquidacion(this,{e.Row.DBCampo("CveVenta").ToString},{CveMonedaFiltro},{ moneda})")
|
||||
e.Row.FCTextBox("TxtLiquidacionCol7").Attributes.Add("onkeyup", $"SumaLiquidacion(this,{e.Row.DBCampo("CveVenta").ToString},{CveMonedaFiltro},{ moneda})")
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Else
|
||||
e.Row.FCTextBox("TxtAbonar").Visible = False
|
||||
e.Row.FCTextBox("TxtComision").Visible = False
|
||||
@@ -823,7 +866,9 @@ Partial Class Ventas_ClientesAbonar
|
||||
|
||||
'inserto las ventas que voy a pagar
|
||||
For Each gvr As GridViewRow In GvCxC.Rows
|
||||
|
||||
If gvr.FCCheckBox("Chk").Checked Then
|
||||
|
||||
Dim ObjFactura As Modelos.Factura = Nothing
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
|
||||
@@ -861,6 +906,7 @@ Partial Class Ventas_ClientesAbonar
|
||||
If gvr.DataKey("TipoDocto") = "Ant" AndAlso UsuarioActual.CveEmpresa.Contiene(1, 119, 158) Then EsAnticipoEspecial = True
|
||||
|
||||
If dtConceptos IsNot Nothing Then
|
||||
|
||||
For Each Row As DataRow In dtConceptos.Rows
|
||||
|
||||
Dim ConceptoContable = Row("CveConcepto").ToString.ToEntero
|
||||
@@ -1487,7 +1533,84 @@ Partial Class Ventas_ClientesAbonar
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
Next
|
||||
|
||||
|
||||
Dim ImporteLiquidacion1 As Decimal = gvr.FCTextBox("TxtLiquidacionCol1").Text.ToDecimal
|
||||
Dim ImporteLiquidacion2 As Decimal = gvr.FCTextBox("TxtLiquidacionCol2").Text.ToDecimal
|
||||
Dim ImporteLiquidacion3 As Decimal = gvr.FCTextBox("TxtLiquidacionCol3").Text.ToDecimal
|
||||
Dim ImporteLiquidacion4 As Decimal = gvr.FCTextBox("TxtLiquidacionCol4").Text.ToDecimal
|
||||
Dim ImporteLiquidacion5 As Decimal = gvr.FCTextBox("TxtLiquidacionCol5").Text.ToDecimal
|
||||
Dim ImporteLiquidacion6 As Decimal = gvr.FCTextBox("TxtLiquidacionCol6").Text.ToDecimal
|
||||
Dim ImporteLiquidacion7 As Decimal = gvr.FCTextBox("TxtLiquidacionCol7").Text.ToDecimal
|
||||
|
||||
Dim CveClasificacionCol1 As Integer = 21267
|
||||
Dim CveClasificacionCol2 As Integer = 21229
|
||||
Dim CveClasificacionCol3 As Integer = 21520
|
||||
Dim CveClasificacionCol4 As Integer = 21519
|
||||
Dim CveClasificacionCol5 As Integer = 21547
|
||||
Dim CveClasificacionCol6 As Integer = 21572
|
||||
Dim CveClasificacionCol7 As Integer = 21571
|
||||
|
||||
Dim CveSubProyectoLiquidacion As Integer = gvr.DataKey("CveSubProyecto").ToEntero
|
||||
|
||||
Dim CveConceptoLiquidacion As Integer = 51
|
||||
|
||||
If ImporteLiquidacion1 <> 0 Then
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, ImporteLiquidacion1, "Liquidacion Col 1", CveConceptoLiquidacion, "Liquidacion Col 2", Now, -1, -1, CveIE, gvr.FCHyperLink("HplF2").Text.ToEntero, -1, CveSubProyectoLiquidacion, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=ImporteLiquidacion1 * tipoCambioPago, TipoCambio:=TipoCambioGeneral, TipoCambioPago:=tipoCambioPago, PorcentajeImpuesto:=0, CveClasificacion:=CveClasificacionCol1) Then
|
||||
MsgError = "No se pudo insertar la póliza"
|
||||
Exit For
|
||||
End If
|
||||
End If
|
||||
|
||||
If ImporteLiquidacion2 <> 0 Then
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, ImporteLiquidacion2, "Liquidacion Col 2", CveConceptoLiquidacion, "Liquidacion Col 2", Now, -1, -1, CveIE, gvr.FCHyperLink("HplF2").Text.ToEntero, -1, CveSubProyectoLiquidacion, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=ImporteLiquidacion2 * tipoCambioPago, TipoCambio:=TipoCambioGeneral, TipoCambioPago:=tipoCambioPago, PorcentajeImpuesto:=0, CveClasificacion:=CveClasificacionCol2) Then
|
||||
MsgError = "No se pudo insertar la póliza"
|
||||
Exit For
|
||||
End If
|
||||
End If
|
||||
|
||||
If ImporteLiquidacion3 <> 0 Then
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, ImporteLiquidacion3, "Liquidacion Col 4", CveConceptoLiquidacion, "Liquidacion Col 3", Now, -1, -1, CveIE, gvr.FCHyperLink("HplF2").Text.ToEntero, -1, CveSubProyectoLiquidacion, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=ImporteLiquidacion3 * tipoCambioPago, TipoCambio:=TipoCambioGeneral, TipoCambioPago:=tipoCambioPago, PorcentajeImpuesto:=0, CveClasificacion:=CveClasificacionCol3) Then
|
||||
MsgError = "No se pudo insertar la póliza"
|
||||
Exit For
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
If ImporteLiquidacion4 <> 0 Then
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, ImporteLiquidacion4, "Liquidacion Col 4", CveConceptoLiquidacion, "Liquidacion Col 4", Now, -1, -1, CveIE, gvr.FCHyperLink("HplF2").Text.ToEntero, -1, CveSubProyectoLiquidacion, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=ImporteLiquidacion4 * tipoCambioPago, TipoCambio:=TipoCambioGeneral, TipoCambioPago:=tipoCambioPago, PorcentajeImpuesto:=0, CveClasificacion:=CveClasificacionCol4) Then
|
||||
MsgError = "No se pudo insertar la póliza"
|
||||
Exit For
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
|
||||
If ImporteLiquidacion5 <> 0 Then
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, ImporteLiquidacion5, "Liquidacion Col 5", CveConceptoLiquidacion, "Liquidacion Col 5", Now, -1, -1, CveIE, gvr.FCHyperLink("HplF2").Text.ToEntero, -1, CveSubProyectoLiquidacion, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=ImporteLiquidacion5 * tipoCambioPago, TipoCambio:=TipoCambioGeneral, TipoCambioPago:=tipoCambioPago, PorcentajeImpuesto:=0, CveClasificacion:=CveClasificacionCol5) Then
|
||||
MsgError = "No se pudo insertar la póliza"
|
||||
Exit For
|
||||
End If
|
||||
End If
|
||||
|
||||
If ImporteLiquidacion6 <> 0 Then
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, ImporteLiquidacion6, "Liquidacion Col 6", CveConceptoLiquidacion, "Liquidacion Col 6", Now, -1, -1, CveIE, gvr.FCHyperLink("HplF2").Text.ToEntero, -1, CveSubProyectoLiquidacion, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=ImporteLiquidacion6 * tipoCambioPago, TipoCambio:=TipoCambioGeneral, TipoCambioPago:=tipoCambioPago, PorcentajeImpuesto:=0, CveClasificacion:=CveClasificacionCol6) Then
|
||||
MsgError = "No se pudo insertar la póliza"
|
||||
Exit For
|
||||
End If
|
||||
End If
|
||||
|
||||
If ImporteLiquidacion7 <> 0 Then
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, ImporteLiquidacion7, "Liquidacion Col 7", CveConceptoLiquidacion, "Liquidacion Col 7", Now, -1, -1, CveIE, gvr.FCHyperLink("HplF2").Text.ToEntero, -1, CveSubProyectoLiquidacion, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=ImporteLiquidacion7 * tipoCambioPago, TipoCambio:=TipoCambioGeneral, TipoCambioPago:=tipoCambioPago, PorcentajeImpuesto:=0, CveClasificacion:=CveClasificacionCol7) Then
|
||||
MsgError = "No se pudo insertar la póliza"
|
||||
Exit For
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
|
||||
End If
|
||||
If gvr.FCCheckBox("ChkGenerarNC").Checked AndAlso ObjFactura IsNot Nothing Then
|
||||
ObjFactura.DescuentoProntoPago = gvr.DataKey("DescuentoProntoPago").ToDecimal()
|
||||
@@ -3136,4 +3259,46 @@ Partial Class Ventas_ClientesAbonar
|
||||
Calendario.EndDate = DateTime.Now
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
#Region "LIQUIDACION"
|
||||
|
||||
Protected Sub ChkLiquidacion_CheckedChanged(sender As Object, e As EventArgs)
|
||||
|
||||
|
||||
If ChkLiquidacion.Checked Then
|
||||
'16-23
|
||||
GvCxC.Columns(16).Visible = True
|
||||
GvCxC.Columns(17).Visible = True
|
||||
GvCxC.Columns(18).Visible = True
|
||||
GvCxC.Columns(19).Visible = True
|
||||
GvCxC.Columns(20).Visible = True
|
||||
GvCxC.Columns(21).Visible = True
|
||||
GvCxC.Columns(22).Visible = True
|
||||
GvCxC.Columns(23).Visible = True
|
||||
|
||||
GvCxC.Columns(26).Visible = False
|
||||
|
||||
Else
|
||||
GvCxC.Columns(16).Visible = False
|
||||
GvCxC.Columns(17).Visible = False
|
||||
GvCxC.Columns(18).Visible = False
|
||||
GvCxC.Columns(19).Visible = False
|
||||
GvCxC.Columns(20).Visible = False
|
||||
GvCxC.Columns(21).Visible = False
|
||||
GvCxC.Columns(22).Visible = False
|
||||
GvCxC.Columns(23).Visible = False
|
||||
|
||||
GvCxC.Columns(26).Visible = True
|
||||
|
||||
|
||||
End If
|
||||
|
||||
UPVentas.Update()
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
End Class
|
||||
|
||||
@@ -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
|
||||
{
|
||||
|
||||
@@ -1170,11 +1170,13 @@
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:Literal ID="LtlPU" runat="server" Text='<%# Eval("PU") %>' Visible="false"></asp:Literal>
|
||||
<asp:TextBox ID="TxtPrecio" runat="server" CausesValidation="true" MaxLength="12" Text='<%# Eval("PU") %>' ValidationGroup="GprGV" Width="78px" Height="24px"></asp:TextBox>
|
||||
<asp:TextBox ID="TxtPrecio" runat="server" CausesValidation="true" MaxLength="12" Text='<%# Eval("PU", "{0:0.00####}") %>' ValidationGroup="GprGV" Width="78px" Height="24px"></asp:TextBox>
|
||||
<ajax:FilteredTextBoxExtender ID="SoloNumeros" runat="server" TargetControlID="TxtPrecio" FilterType="Custom, Numbers" ValidChars="." />
|
||||
<asp:RequiredFieldValidator ID="RFVPrecio" runat="server" ControlToValidate="TxtPrecio" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Precio''</b> es necesario, por favor ingréselo." ValidationGroup="GprGV"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCPrecio" runat="server" HighlightCssClass="vco" TargetControlID="RFVPrecio" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
|
||||
<asp:CustomValidator ID="CVPrecioEdit" runat="server" ClientValidationFunction="ValidaDecimal6digits" ControlToValidate="TxtPrecio" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Precio''</b> no tiene el formato correcto. Por favor rectifique y vuelva a intentar." ValidateEmptyText="True" ValidationGroup="GprGV"></asp:CustomValidator>
|
||||
|
||||
<ajax:ValidatorCalloutExtender ID="VCEPrecioEdit" runat="server" HighlightCssClass="vco" TargetControlID="CVPrecioEdit" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
@@ -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
|
||||
@@ -23110,7 +23158,7 @@ Partial Class Ventas
|
||||
|
||||
If ObjVentas.EliminarVenta(CveVenta) Then
|
||||
ObjVentas.Commit()
|
||||
Alert("La venta ha sido eliminada correctamente.", TipoMensaje.MsgInformacion)
|
||||
Alert("La venta ha sido eliminada correctamente.", TipoMensaje.MsgInformacion, "document.location.href=""/Ventas/Clientes.aspx?CveCliente=" & CveCliente & """;")
|
||||
Else
|
||||
ObjVentas.RollBack()
|
||||
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