Merge branch 'master' of http://oirigoyen@192.168.10.111:8383/SIG.git
This commit is contained in:
@@ -875,6 +875,23 @@ Public Class ClsAcumuladores
|
|||||||
End Try
|
End Try
|
||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
Public Function UpdatePolizaVirtual(CvePolizaVirtual As Integer, CveMarca As Integer, FechaUsado As DateTime) As Boolean
|
||||||
|
Dim Retorno As Boolean = False
|
||||||
|
SqlDataAdapter("PA_Vta_PolizaVirtualUpdate")
|
||||||
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
|
.Add("@CvePolizaVirtual", SqlDbType.Int).Value = CvePolizaVirtual
|
||||||
|
.Add("@CveMarca", SqlDbType.Int).Value = CveMarca
|
||||||
|
.Add("@FechaUsado", SqlDbType.DateTime).Value = FechaUsado
|
||||||
|
End With
|
||||||
|
Try
|
||||||
|
SqlAdapter.Fill(Data)
|
||||||
|
Retorno = True
|
||||||
|
Catch ex As SqlException
|
||||||
|
OnError("Ocurrió un al actualizar el envio de la poliza virtual. ", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||||
|
End Try
|
||||||
|
Return Retorno
|
||||||
|
End Function
|
||||||
Public Function UpdateEnvioPolizaVirutal(CvePolizaVirtual As Integer, Envio As Boolean, FechaEnvio As DateTime, CodigoUnico As String) As Boolean
|
Public Function UpdateEnvioPolizaVirutal(CvePolizaVirtual As Integer, Envio As Boolean, FechaEnvio As DateTime, CodigoUnico As String) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
SqlDataAdapter("PA_Vta_PolizaVirtualEnvioUpdate")
|
SqlDataAdapter("PA_Vta_PolizaVirtualEnvioUpdate")
|
||||||
|
|||||||
@@ -196,7 +196,7 @@ Public Class ClsCompras
|
|||||||
Optional CveOC As Integer = -1, Optional CveCajaChica As Integer = -1, Optional CvePersonal As Integer = -1, Optional NumeroReembolso As String = "-1", Optional CveProveedorSucursal As Integer = -1,
|
Optional CveOC As Integer = -1, Optional CveCajaChica As Integer = -1, Optional CvePersonal As Integer = -1, Optional NumeroReembolso As String = "-1", Optional CveProveedorSucursal As Integer = -1,
|
||||||
Optional AplicoPromocion As Boolean = False, Optional PorcentajeIVA As Double = 0, Optional CveMetodoPago As Integer = -1, Optional CveRetIVAConcepto As Integer = -1, Optional CveConceptoContableAlmacen As Integer = -1,
|
Optional AplicoPromocion As Boolean = False, Optional PorcentajeIVA As Double = 0, Optional CveMetodoPago As Integer = -1, Optional CveRetIVAConcepto As Integer = -1, Optional CveConceptoContableAlmacen As Integer = -1,
|
||||||
Optional CveRetISRConcepto As Integer = -1, Optional NoDeducible As Boolean = False, Optional CveTipoCompra As Integer = -1, Optional TotalOriginal As Double = 0, Optional CveTipoConcepto As Integer = 1, Optional CveFactura As Integer = -1,
|
Optional CveRetISRConcepto As Integer = -1, Optional NoDeducible As Boolean = False, Optional CveTipoCompra As Integer = -1, Optional TotalOriginal As Double = 0, Optional CveTipoConcepto As Integer = 1, Optional CveFactura As Integer = -1,
|
||||||
Optional CveContrato As Integer = -1) As Boolean
|
Optional CveContrato As Integer = -1, Optional EsImportacion As Boolean = False) As Boolean
|
||||||
|
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
|
|
||||||
@@ -248,6 +248,8 @@ Public Class ClsCompras
|
|||||||
.Add("@CveTipoConcepto", SqlDbType.Int).Value = CveTipoConcepto
|
.Add("@CveTipoConcepto", SqlDbType.Int).Value = CveTipoConcepto
|
||||||
.Add("@CveFactura", SqlDbType.Int).Value = CveFactura
|
.Add("@CveFactura", SqlDbType.Int).Value = CveFactura
|
||||||
.Add("@CveContrato", SqlDbType.Int).Value = CveContrato
|
.Add("@CveContrato", SqlDbType.Int).Value = CveContrato
|
||||||
|
.Add("@EsImportacion", SqlDbType.Bit).Value = EsImportacion
|
||||||
|
|
||||||
End With
|
End With
|
||||||
|
|
||||||
Try
|
Try
|
||||||
|
|||||||
@@ -514,6 +514,23 @@ Public Class ClsNominas
|
|||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
Public Function DeleteNom_NominasDetalles(CveConcepto As Integer, CvePersonal As Integer, CvePeriodo As Integer) As Boolean
|
||||||
|
Dim Retorno As Boolean = False
|
||||||
|
|
||||||
|
DataAdapter("PA_Nom_NominasDetallesDelete")
|
||||||
|
SqlAdapter.SelectCommand.Parameters.Add("@CveConcepto", SqlDbType.Int).Value = CveConcepto
|
||||||
|
SqlAdapter.SelectCommand.Parameters.Add("@CvePersonal", SqlDbType.Int).Value = CvePersonal
|
||||||
|
SqlAdapter.SelectCommand.Parameters.Add("@CvePeriodo", SqlDbType.Int).Value = CvePeriodo
|
||||||
|
|
||||||
|
Try
|
||||||
|
SqlAdapter.Fill(Data)
|
||||||
|
Retorno = True
|
||||||
|
Catch ex As Exception
|
||||||
|
Me.OnError("Ocurrió un error al eliminar el Movimiento de Nomina.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||||
|
End Try
|
||||||
|
|
||||||
|
Return Retorno
|
||||||
|
End Function
|
||||||
Public Function RemoveNom_NominasDetalles(CveNominaDetalle As Integer) As Boolean
|
Public Function RemoveNom_NominasDetalles(CveNominaDetalle As Integer) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
|
|
||||||
@@ -2108,13 +2125,14 @@ Public Class ClsNominas
|
|||||||
Return retorno
|
Return retorno
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Function GetCalculoSBC(CveEmpresa As Integer, FechaCalculo As String) As Boolean
|
Public Function GetCalculoSBC(CveEmpresa As Integer, Tipo As Integer, FechaCalculo As String) As Boolean
|
||||||
Dim retorno As Boolean = False
|
Dim retorno As Boolean = False
|
||||||
Try
|
Try
|
||||||
DTSet = New DataSet()
|
DTSet = New DataSet()
|
||||||
DataAdapter("PA_GetCalculoSBC", CommandType.StoredProcedure)
|
DataAdapter("PA_GetCalculoSBC", CommandType.StoredProcedure)
|
||||||
With SqlAdapter.SelectCommand.Parameters
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||||
|
.Add("@Tipo", SqlDbType.Int).Value = Tipo
|
||||||
.Add("@Fecha", SqlDbType.Date).Value = FechaCalculo
|
.Add("@Fecha", SqlDbType.Date).Value = FechaCalculo
|
||||||
End With
|
End With
|
||||||
|
|
||||||
@@ -2514,6 +2532,97 @@ Public Class ClsNominas
|
|||||||
End Function
|
End Function
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
|
|
||||||
|
#Region "CRUD_RH_TablasValores"
|
||||||
|
Public Function RH_TablasValoresGet(cveEmpresa As Int32, tipo As Int32) As Boolean
|
||||||
|
Dim retorno As Boolean = False
|
||||||
|
Try
|
||||||
|
DataAdapter("PA_RH_TablasValoresGet", CommandType.StoredProcedure)
|
||||||
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
|
.Add("@CveEmpresa", SqlDbType.Int).Value = cveEmpresa
|
||||||
|
.Add("@Tipo", SqlDbType.Int).Value = tipo
|
||||||
|
End With
|
||||||
|
SqlAdapter.Fill(Data)
|
||||||
|
|
||||||
|
retorno = True
|
||||||
|
Catch sqEx As SqlException
|
||||||
|
retorno = False
|
||||||
|
OnError("Ocurrió un error al obtener las tablas de nomina.", sqEx, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||||
|
Catch ex As Exception
|
||||||
|
retorno = False
|
||||||
|
OnError("Ocurrió un error al obtener las tablas de nomina.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||||
|
End Try
|
||||||
|
Return retorno
|
||||||
|
End Function
|
||||||
|
Public Function RH_TablasValoresAdd(cveEmpresa As Int32, fecha As DateTime, tipo As Int32, valor As Decimal) As Boolean
|
||||||
|
Dim retorno As Boolean = False
|
||||||
|
|
||||||
|
Try
|
||||||
|
DataAdapter("PA_RH_TablasValoresAdd", CommandType.StoredProcedure)
|
||||||
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
|
.Add("@CveEmpresa", SqlDbType.Int).Value = cveEmpresa
|
||||||
|
.Add("@Tipo", SqlDbType.Int).Value = tipo
|
||||||
|
.Add("@fecha", SqlDbType.DateTime).Value = fecha
|
||||||
|
.Add("@valor", SqlDbType.Money).Value = valor
|
||||||
|
End With
|
||||||
|
SqlAdapter.Fill(Data)
|
||||||
|
|
||||||
|
retorno = True
|
||||||
|
Catch sqEx As SqlException
|
||||||
|
retorno = False
|
||||||
|
OnError("Ocurrió un error al obtener las tablas de nomina.", sqEx, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||||
|
Catch ex As Exception
|
||||||
|
retorno = False
|
||||||
|
OnError("Ocurrió un error al obtener las tablas de nomina.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||||
|
End Try
|
||||||
|
Return retorno
|
||||||
|
End Function
|
||||||
|
Public Function RH_TablasValoresUp(cveEmpresa As Int32, fecha As DateTime, tipo As Int32, valor As Decimal) As Boolean
|
||||||
|
Dim retorno As Boolean = False
|
||||||
|
|
||||||
|
Try
|
||||||
|
DataAdapter("PA_RH_TablasValoresUp", CommandType.StoredProcedure)
|
||||||
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
|
.Add("@CveEmpresa", SqlDbType.Int).Value = cveEmpresa
|
||||||
|
.Add("@Tipo", SqlDbType.Int).Value = tipo
|
||||||
|
.Add("@fecha", SqlDbType.DateTime).Value = fecha
|
||||||
|
.Add("@valor", SqlDbType.Money).Value = valor
|
||||||
|
End With
|
||||||
|
SqlAdapter.Fill(Data)
|
||||||
|
|
||||||
|
retorno = True
|
||||||
|
Catch sqEx As SqlException
|
||||||
|
retorno = False
|
||||||
|
OnError("Ocurrió un error al obtener las tablas de nomina.", sqEx, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||||
|
Catch ex As Exception
|
||||||
|
retorno = False
|
||||||
|
OnError("Ocurrió un error al obtener las tablas de nomina.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||||
|
End Try
|
||||||
|
Return retorno
|
||||||
|
End Function
|
||||||
|
Public Function RH_TablasValoresRemove(cveEmpresa As Int32, fecha As DateTime, tipo As Int32) As Boolean
|
||||||
|
Dim retorno As Boolean = False
|
||||||
|
Try
|
||||||
|
DataAdapter("PA_RH_TablasValoresRemove", CommandType.StoredProcedure)
|
||||||
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
|
.Add("@CveEmpresa", SqlDbType.Int).Value = cveEmpresa
|
||||||
|
.Add("@Tipo", SqlDbType.Int).Value = tipo
|
||||||
|
.Add("@fecha", SqlDbType.DateTime).Value = fecha
|
||||||
|
End With
|
||||||
|
SqlAdapter.Fill(Data)
|
||||||
|
|
||||||
|
retorno = True
|
||||||
|
Catch sqEx As SqlException
|
||||||
|
retorno = False
|
||||||
|
OnError("Ocurrió un error al obtener las tablas de nomina.", sqEx, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||||
|
Catch ex As Exception
|
||||||
|
retorno = False
|
||||||
|
OnError("Ocurrió un error al obtener las tablas de nomina.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||||
|
End Try
|
||||||
|
Return retorno
|
||||||
|
End Function
|
||||||
|
#End Region
|
||||||
|
|
||||||
#Region "IDisposable Support"
|
#Region "IDisposable Support"
|
||||||
' IDisposable
|
' IDisposable
|
||||||
Protected Overridable Sub Dispose(ByVal disposing As Boolean)
|
Protected Overridable Sub Dispose(ByVal disposing As Boolean)
|
||||||
|
|||||||
@@ -6473,7 +6473,7 @@ Public Class ClsPaginas
|
|||||||
If Vta.SubProyecto.CP.ToEntero > 0 Then SBDomicilioSucursal.AppendFormat(", CP: {0}", Vta.SubProyecto.CP)
|
If Vta.SubProyecto.CP.ToEntero > 0 Then SBDomicilioSucursal.AppendFormat(", CP: {0}", Vta.SubProyecto.CP)
|
||||||
If CiudadSucursal.Length > 0 Then SBDomicilioSucursal.AppendFormat(", {0}", CiudadSucursal)
|
If CiudadSucursal.Length > 0 Then SBDomicilioSucursal.AppendFormat(", {0}", CiudadSucursal)
|
||||||
If Vta.SubProyecto.Pais.Length > 0 Then SBDomicilioSucursal.AppendFormat(", {0}", Vta.SubProyecto.Pais)
|
If Vta.SubProyecto.Pais.Length > 0 Then SBDomicilioSucursal.AppendFormat(", {0}", Vta.SubProyecto.Pais)
|
||||||
If Not String.IsNullOrEmpty(Vta.SubProyecto.Telefono) AndAlso UsuarioActual.CveEmpresa = 141 Then SBDomicilioSucursal.AppendFormat(", Tel: {0}", Vta.SubProyecto.Telefono)
|
If Not String.IsNullOrEmpty(Vta.SubProyecto.Telefono) AndAlso UsuarioActual.CveEmpresa.Contiene(141, 152, 159, 160, 161, 162) Then SBDomicilioSucursal.AppendFormat(", Tel: {0}", Vta.SubProyecto.Telefono)
|
||||||
|
|
||||||
DomicilioSucursal = SBDomicilioSucursal.ToString
|
DomicilioSucursal = SBDomicilioSucursal.ToString
|
||||||
|
|
||||||
@@ -6718,7 +6718,7 @@ Public Class ClsPaginas
|
|||||||
params.Add(New ReportParameter("ClienteTelefono", Vta.ClienteSucursal.TelefonoSucursal))
|
params.Add(New ReportParameter("ClienteTelefono", Vta.ClienteSucursal.TelefonoSucursal))
|
||||||
ElseIf Vta.CveCliente.ToEntero > 0 Then
|
ElseIf Vta.CveCliente.ToEntero > 0 Then
|
||||||
params.Add(New ReportParameter("ClienteContactoMail", Vta.Cliente.MailCotizacion))
|
params.Add(New ReportParameter("ClienteContactoMail", Vta.Cliente.MailCotizacion))
|
||||||
params.Add(New ReportParameter("ClienteTelefono", If(Vta.TipoDocto.Contiene("Ing", "Rem") AndAlso Vta.Cliente.RFC = "XAXX010101000", Vta.TelefonoGenerico, Vta.Cliente.Telefono)))
|
params.Add(New ReportParameter("ClienteTelefono", If(Vta.TipoDocto.Contiene("Ing", "Rem") AndAlso Vta.Cliente.Telefono.Length > 6, Vta.TelefonoGenerico, Vta.Cliente.Telefono)))
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If UsuarioActual.CveEmpresa.Contiene(17) Then
|
If UsuarioActual.CveEmpresa.Contiene(17) Then
|
||||||
|
|||||||
@@ -1742,7 +1742,7 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo
|
|||||||
Calle As String, NumExt As String, NumInt As String, Colonia As String, CP As String, Ciudad As String, CveEstado As Integer, Telefono As String, Celular As String, RFC As String, CURP As String,
|
Calle As String, NumExt As String, NumInt As String, Colonia As String, CP As String, Ciudad As String, CveEstado As Integer, Telefono As String, Celular As String, RFC As String, CURP As String,
|
||||||
NombrePadre As String, NombreMadre As String, CveSATBanco As Integer, CveSATRiesgoPuesto As Integer, CveSATRegimenContratacion As Integer, CveClienteAsignado As Integer, CveSubProyecto As Integer, URL As String, CveSupervisor As Integer, CLABE As String, BancoNumCuenta As String,
|
NombrePadre As String, NombreMadre As String, CveSATBanco As Integer, CveSATRiesgoPuesto As Integer, CveSATRegimenContratacion As Integer, CveClienteAsignado As Integer, CveSubProyecto As Integer, URL As String, CveSupervisor As Integer, CLABE As String, BancoNumCuenta As String,
|
||||||
CveJornada As Integer, IdCtaContPersonal As Integer, CtaContPersonal As String, IdCtaContPrestamos As Integer, CtaContPrestamos As String, CveUsuario As Integer, CveEmpresa As Integer, CveUsuarioNomina As Integer, Optional CveSubProyectoZona As Integer = Nothing, Optional CveUniforme As Integer = -1,
|
CveJornada As Integer, IdCtaContPersonal As Integer, CtaContPersonal As String, IdCtaContPrestamos As Integer, CtaContPrestamos As String, CveUsuario As Integer, CveEmpresa As Integer, CveUsuarioNomina As Integer, Optional CveSubProyectoZona As Integer = Nothing, Optional CveUniforme As Integer = -1,
|
||||||
Optional TelefonoExtension As String = "-1", Optional CelularPersonal As String = "-1", Optional TelefonoMarcadoRapido As String = "-1", Optional ContactoAlterno As String = "-1", Optional CveTipodeSalario As Integer = 1) As Boolean
|
Optional TelefonoExtension As String = "-1", Optional CelularPersonal As String = "-1", Optional TelefonoMarcadoRapido As String = "-1", Optional ContactoAlterno As String = "-1", Optional CveTipodeSalario As Integer = 1, Optional Sindicalizado As Boolean = False) As Boolean
|
||||||
|
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
|
|
||||||
@@ -1823,7 +1823,8 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo
|
|||||||
.Add("@TelefonoMarcadoRapido", SqlDbType.VarChar).Value = TelefonoMarcadoRapido
|
.Add("@TelefonoMarcadoRapido", SqlDbType.VarChar).Value = TelefonoMarcadoRapido
|
||||||
.Add("@ContactoAlterno", SqlDbType.VarChar).Value = ContactoAlterno
|
.Add("@ContactoAlterno", SqlDbType.VarChar).Value = ContactoAlterno
|
||||||
.Add("@CveTipodeSalario", SqlDbType.Int).Value = CveTipodeSalario
|
.Add("@CveTipodeSalario", SqlDbType.Int).Value = CveTipodeSalario
|
||||||
|
.Add("@Sindicalizado", SqlDbType.Bit).Value = Sindicalizado
|
||||||
|
|
||||||
.Add("@RETURN_VALUE", SqlDbType.Int).Direction = ParameterDirection.ReturnValue
|
.Add("@RETURN_VALUE", SqlDbType.Int).Direction = ParameterDirection.ReturnValue
|
||||||
|
|
||||||
End With
|
End With
|
||||||
@@ -1855,7 +1856,7 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo
|
|||||||
NombrePadre As String, NombreMadre As String, CveSATBanco As Integer, CveSATRiesgoPuesto As Integer, CveSATRegimenContratacion As Integer, CveClienteAsignado As Integer, CveSubProyecto As Integer, CvePersonal As Integer, URL As String, CveSupervisor As Integer, CLABE As String, BancoNumCuenta As String,
|
NombrePadre As String, NombreMadre As String, CveSATBanco As Integer, CveSATRiesgoPuesto As Integer, CveSATRegimenContratacion As Integer, CveClienteAsignado As Integer, CveSubProyecto As Integer, CvePersonal As Integer, URL As String, CveSupervisor As Integer, CLABE As String, BancoNumCuenta As String,
|
||||||
CveJornada As Integer, IdCtaContPersonal As Integer, CtaContPersonal As String, IdCtaContPrestamos As Integer, CtaContPrestamos As String, CveEmpresa As Integer, CveUsuarioNomina As Integer, Optional CveSubProyectoZona As Integer = Nothing, Optional CveUniforme As Integer = -1,
|
CveJornada As Integer, IdCtaContPersonal As Integer, CtaContPersonal As String, IdCtaContPrestamos As Integer, CtaContPrestamos As String, CveEmpresa As Integer, CveUsuarioNomina As Integer, Optional CveSubProyectoZona As Integer = Nothing, Optional CveUniforme As Integer = -1,
|
||||||
Optional TelefonoExtension As String = "-1", Optional CelularPersonal As String = "-1", Optional TelefonoMarcadoRapido As String = "-1", Optional ContactoAlterno As String = "-1", Optional CveUsuarioModifico As Integer = -1,
|
Optional TelefonoExtension As String = "-1", Optional CelularPersonal As String = "-1", Optional TelefonoMarcadoRapido As String = "-1", Optional ContactoAlterno As String = "-1", Optional CveUsuarioModifico As Integer = -1,
|
||||||
Optional FechaActivo As Date = MinFecha, Optional FechaReingreso As Date = MinFecha, Optional CveTipodeSalario As Integer = 1) As Boolean
|
Optional FechaActivo As Date = MinFecha, Optional FechaReingreso As Date = MinFecha, Optional CveTipodeSalario As Integer = 1, Optional Sindicalizado As Integer = -1) As Boolean
|
||||||
|
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
|
|
||||||
@@ -1940,7 +1941,8 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo
|
|||||||
.Add("@FechaActivo", SqlDbType.Date).Value = FechaActivo
|
.Add("@FechaActivo", SqlDbType.Date).Value = FechaActivo
|
||||||
.Add("@FechaReingreso", SqlDbType.Date).Value = FechaReingreso
|
.Add("@FechaReingreso", SqlDbType.Date).Value = FechaReingreso
|
||||||
.Add("@CveTipodeSalario", SqlDbType.Int).Value = CveTipodeSalario
|
.Add("@CveTipodeSalario", SqlDbType.Int).Value = CveTipodeSalario
|
||||||
|
.Add("@Sindicalizado", SqlDbType.Int).Value = Sindicalizado
|
||||||
|
|
||||||
End With
|
End With
|
||||||
|
|
||||||
Try
|
Try
|
||||||
|
|||||||
@@ -1268,17 +1268,19 @@ Public Class ClsVentas
|
|||||||
|
|
||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
Public Function UpdateVentaDetalleRemision(CveVenta As Integer, CvePS As Integer, Cantidad As Double, PU As Double, IEPS As Double, PorcentajeIEPS As Decimal, Observaciones As String, Optional CveUsuarioModifico As Integer = -1) As Boolean
|
Public Function UpdateVentaDetalleRemision(CveVenta As Integer, CvePS As Integer, Cantidad As Decimal, PU As Decimal, IEPS As Decimal, PorcentajeIEPS As Decimal, IVA As Decimal, PorcentajeIVA As Decimal, Observaciones As String, Optional CveUsuarioModifico As Integer = -1) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
DataAdapter("PA_VentasDetalleRemisionUpdate")
|
DataAdapter("PA_VentasDetalleRemisionUpdate")
|
||||||
|
|
||||||
With SqlAdapter.SelectCommand.Parameters
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
.Add("@CveVentaDetalle", SqlDbType.Int).Value = CveVenta
|
.Add("@CveVentaDetalle", SqlDbType.Int).Value = CveVenta
|
||||||
.Add("@CvePS", SqlDbType.Int).Value = CvePS
|
.Add("@CvePS", SqlDbType.Int).Value = CvePS
|
||||||
.Add("@Cantidad", SqlDbType.Float).Value = Cantidad
|
.Add("@Cantidad", SqlDbType.Decimal).Value = Cantidad
|
||||||
.Add("@PU", SqlDbType.Float).Value = PU
|
.Add("@PU", SqlDbType.Decimal).Value = PU
|
||||||
.Add("@IEPS", SqlDbType.Float).Value = IEPS
|
.Add("@IEPS", SqlDbType.Decimal).Value = IEPS
|
||||||
.Add("@PorcentajeIEPS", SqlDbType.Float).Value = PorcentajeIEPS
|
.Add("@PorcentajeIEPS", SqlDbType.Decimal).Value = PorcentajeIEPS
|
||||||
|
.Add("@IVA", SqlDbType.Decimal).Value = IVA
|
||||||
|
.Add("@PorcentajeIVA", SqlDbType.Decimal).Value = PorcentajeIVA
|
||||||
.Add("@Observaciones", SqlDbType.VarChar).Value = Observaciones
|
.Add("@Observaciones", SqlDbType.VarChar).Value = Observaciones
|
||||||
.Add("@CveUsuarioModifico", SqlDbType.Int).Value = CveUsuarioModifico
|
.Add("@CveUsuarioModifico", SqlDbType.Int).Value = CveUsuarioModifico
|
||||||
End With
|
End With
|
||||||
|
|||||||
@@ -88,6 +88,7 @@ Public Class LogicNominas
|
|||||||
Dim NombreCompleto As String = ""
|
Dim NombreCompleto As String = ""
|
||||||
|
|
||||||
Dim CURP As String = ""
|
Dim CURP As String = ""
|
||||||
|
Dim Sindicalizado As Boolean = False
|
||||||
Dim NumeroSS As String = ""
|
Dim NumeroSS As String = ""
|
||||||
Dim FechaInicioContrato As String = ""
|
Dim FechaInicioContrato As String = ""
|
||||||
Dim CodigoTipoContrato As String = ""
|
Dim CodigoTipoContrato As String = ""
|
||||||
@@ -101,6 +102,7 @@ Public Class LogicNominas
|
|||||||
Dim ClaveBanco As String = ""
|
Dim ClaveBanco As String = ""
|
||||||
Dim BancoNumCuenta As String = ""
|
Dim BancoNumCuenta As String = ""
|
||||||
Dim SDI As Double = 0
|
Dim SDI As Double = 0
|
||||||
|
Dim SalarioDiarioSS As Double = 0
|
||||||
Dim ClaveEstado As String = ""
|
Dim ClaveEstado As String = ""
|
||||||
|
|
||||||
Dim ObjIncapacidades As New List(Of CFDINominaIncapacidades)
|
Dim ObjIncapacidades As New List(Of CFDINominaIncapacidades)
|
||||||
@@ -120,6 +122,7 @@ Public Class LogicNominas
|
|||||||
RFC = objPersonal.RFC
|
RFC = objPersonal.RFC
|
||||||
NombreCompleto = objPersonal.NombreCompleto
|
NombreCompleto = objPersonal.NombreCompleto
|
||||||
|
|
||||||
|
Sindicalizado = objPersonal.DtResultados.Rows(0)("Sindicalizado").ToString().ToUpper().Contiene("TRUE", "1")
|
||||||
CURP = objPersonal.CURP
|
CURP = objPersonal.CURP
|
||||||
NumeroSS = objPersonal.NumeroSS
|
NumeroSS = objPersonal.NumeroSS
|
||||||
FechaInicioContrato = objPersonal.FechaInicioContrato.ToString()
|
FechaInicioContrato = objPersonal.FechaInicioContrato.ToString()
|
||||||
@@ -134,6 +137,7 @@ Public Class LogicNominas
|
|||||||
ClaveBanco = objPersonal.ClaveBanco
|
ClaveBanco = objPersonal.ClaveBanco
|
||||||
BancoNumCuenta = objPersonal.BancoNumCuenta
|
BancoNumCuenta = objPersonal.BancoNumCuenta
|
||||||
SDI = objPersonal.SDI
|
SDI = objPersonal.SDI
|
||||||
|
SalarioDiarioSS = objPersonal.SalarioDiarioSS
|
||||||
ClaveEstado = objPersonal.ClaveEstado
|
ClaveEstado = objPersonal.ClaveEstado
|
||||||
|
|
||||||
AntiguedadSemanas = DateDiff(DateInterval.Weekday, objPersonal.FechaIngreso, Now).ToEntero()
|
AntiguedadSemanas = DateDiff(DateInterval.Weekday, objPersonal.FechaIngreso, Now).ToEntero()
|
||||||
@@ -368,8 +372,8 @@ Public Class LogicNominas
|
|||||||
cfdi.Nomina.Receptor.CodigoBanco = ClaveBanco
|
cfdi.Nomina.Receptor.CodigoBanco = ClaveBanco
|
||||||
cfdi.Nomina.Receptor.NumeroCuenta = BancoNumCuenta
|
cfdi.Nomina.Receptor.NumeroCuenta = BancoNumCuenta
|
||||||
cfdi.Nomina.Receptor.SDI = SDI
|
cfdi.Nomina.Receptor.SDI = SDI
|
||||||
cfdi.Nomina.Receptor.SBC = SDI
|
cfdi.Nomina.Receptor.SBC = SalarioDiarioSS
|
||||||
cfdi.Nomina.Receptor.Sindicalizado = ""
|
cfdi.Nomina.Receptor.Sindicalizado = If(Sindicalizado, "Si", "No")
|
||||||
cfdi.Nomina.Receptor.CodigoEntidadFederativa = ClaveEstado
|
cfdi.Nomina.Receptor.CodigoEntidadFederativa = ClaveEstado
|
||||||
|
|
||||||
cfdi.Conceptos.Add(New CFDIConceptos With {.Cantidad = 1, .ClaveUnidad = "ACT", .ClaveProdServ = "84111505", .Descripcion = "Pago de nómina", .ValorUnitario = cfdi.Comprobante.Subtotal, .Importe = cfdi.Comprobante.Subtotal, .Descuento = cfdi.Nomina.TotalDeducciones.ToString().ToDecimal()})
|
cfdi.Conceptos.Add(New CFDIConceptos With {.Cantidad = 1, .ClaveUnidad = "ACT", .ClaveProdServ = "84111505", .Descripcion = "Pago de nómina", .ValorUnitario = cfdi.Comprobante.Subtotal, .Importe = cfdi.Comprobante.Subtotal, .Descuento = cfdi.Nomina.TotalDeducciones.ToString().ToDecimal()})
|
||||||
|
|||||||
@@ -392,22 +392,37 @@ Public Class E141 : Implements IHttpHandler
|
|||||||
Select Case Metodo
|
Select Case Metodo
|
||||||
Case "CrearActualizarProductos"
|
Case "CrearActualizarProductos"
|
||||||
respuesta = CrearActualizarProductos(If(FiltrarTodos = "1", True, False))
|
respuesta = CrearActualizarProductos(If(FiltrarTodos = "1", True, False))
|
||||||
|
If respuesta Then
|
||||||
|
retorno = "True"
|
||||||
|
Else
|
||||||
|
retorno = "False"
|
||||||
|
End If
|
||||||
|
Case "CrearActualizarProductosJson"
|
||||||
|
retorno = CrearActualizarProductosJson(If(FiltrarTodos = "1", True, False))
|
||||||
Case "ActualizarPrecios"
|
Case "ActualizarPrecios"
|
||||||
respuesta = ActualizarPrecios(If(FiltrarTodos = "1", True, False))
|
respuesta = ActualizarPrecios(If(FiltrarTodos = "1", True, False))
|
||||||
|
If respuesta Then
|
||||||
|
retorno = "True"
|
||||||
|
Else
|
||||||
|
retorno = "False"
|
||||||
|
End If
|
||||||
Case "ActualizarExistencias"
|
Case "ActualizarExistencias"
|
||||||
respuesta = ActualizarExistencias()
|
respuesta = ActualizarExistencias()
|
||||||
|
If respuesta Then
|
||||||
|
retorno = "True"
|
||||||
|
Else
|
||||||
|
retorno = "False"
|
||||||
|
End If
|
||||||
Case "ActualizarVendedores"
|
Case "ActualizarVendedores"
|
||||||
respuesta = ActualizarVendedores(If(FiltrarTodos = "1", True, False))
|
respuesta = ActualizarVendedores(If(FiltrarTodos = "1", True, False))
|
||||||
|
If respuesta Then
|
||||||
|
retorno = "True"
|
||||||
|
Else
|
||||||
|
retorno = "False"
|
||||||
|
End If
|
||||||
End Select
|
End Select
|
||||||
|
|
||||||
If respuesta Then
|
|
||||||
retorno = "True"
|
|
||||||
Else
|
|
||||||
retorno = "False"
|
|
||||||
End If
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
context.Response.Write(retorno)
|
context.Response.Write(retorno)
|
||||||
@@ -1962,6 +1977,25 @@ Public Class E141 : Implements IHttpHandler
|
|||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
Private Function CrearActualizarProductosJson(Todos As Boolean) As String
|
||||||
|
Dim payload = New JObject()
|
||||||
|
|
||||||
|
Dim CountPeticiones As Integer = 0, CountPeticionesExitosas As Integer = 0
|
||||||
|
|
||||||
|
Dim DtPS As DataTable = Nothing
|
||||||
|
Using ObjPS As New ClsProductosServicios
|
||||||
|
'OBTERNER PRECIOS DE PUBLICO GENERAL
|
||||||
|
If ObjPS.GetProductosModificados(CveEmpresa, 44, If(Todos, -1, 1)) Then
|
||||||
|
DtPS = ObjPS.DtResultados.Copy()
|
||||||
|
End If
|
||||||
|
End Using
|
||||||
|
|
||||||
|
If DtPS IsNot Nothing Then
|
||||||
|
payload.Add(New JProperty("products", GenerarPayloadProductos(DtPS)))
|
||||||
|
End If
|
||||||
|
|
||||||
|
Return payload.ToString()
|
||||||
|
End Function
|
||||||
Private Function GenerarPayloadProductos(DtPS As DataTable) As JArray
|
Private Function GenerarPayloadProductos(DtPS As DataTable) As JArray
|
||||||
Dim ArrayPS As New JArray
|
Dim ArrayPS As New JArray
|
||||||
For Each RowPS As DataRow In DtPS.Rows
|
For Each RowPS As DataRow In DtPS.Rows
|
||||||
|
|||||||
@@ -163,7 +163,7 @@ Partial Class Bancos_DepositosCaja
|
|||||||
CveSubProyecto = DdlSubProyectoDeposito.SelectedValue.ToEntero
|
CveSubProyecto = DdlSubProyectoDeposito.SelectedValue.ToEntero
|
||||||
CveClasificacion = DdlClasificacion.SelectedValue.ToEntero
|
CveClasificacion = DdlClasificacion.SelectedValue.ToEntero
|
||||||
|
|
||||||
If Not ObjContabilidad.AddPrePolizasDetalle(NuevaCvePrePoliza, False, Comision, DdlClasificacion.SelectedItem.Text, 51, DdlClasificacion.SelectedItem.Text, Fecha, IdCuentaBancariaOrigen, -1, CveClasificacion:=CveClasificacion, CveSubProyecto:=CveSubProyecto, ImporteMX:=Comision * TipoCambio, CveCuenta:=CveCuentaBancariaOrigen) Then
|
If Not ObjContabilidad.AddPrePolizasDetalle(NuevaCvePrePoliza, True, Comision, DdlClasificacion.SelectedItem.Text, 51, DdlClasificacion.SelectedItem.Text, Fecha, IdCuentaBancariaOrigen, -1, CveClasificacion:=CveClasificacion, CveSubProyecto:=CveSubProyecto, ImporteMX:=Comision * TipoCambio, CveCuenta:=CveCuentaBancariaOrigen) Then
|
||||||
OcurrioError = True
|
OcurrioError = True
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|||||||
@@ -47,8 +47,7 @@ Partial Class Bancos_PopIECompras
|
|||||||
Set(value As Integer)
|
Set(value As Integer)
|
||||||
ViewState("CveCompra") = value
|
ViewState("CveCompra") = value
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
Private Property CveTipoConcepto As Integer
|
Private Property CveTipoConcepto As Integer
|
||||||
Get
|
Get
|
||||||
Return ViewState("CveTipoConcepto").ToString.ToEntero
|
Return ViewState("CveTipoConcepto").ToString.ToEntero
|
||||||
@@ -474,6 +473,21 @@ Partial Class Bancos_PopIECompras
|
|||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
Private Property EsImportacion As Boolean
|
||||||
|
Get
|
||||||
|
|
||||||
|
If ViewState("EsImportacion") Is Nothing Then
|
||||||
|
Return False
|
||||||
|
Else
|
||||||
|
Return CBool(ViewState("EsImportacion"))
|
||||||
|
End If
|
||||||
|
|
||||||
|
End Get
|
||||||
|
Set(value As Boolean)
|
||||||
|
ViewState("EsImportacion") = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -735,6 +749,7 @@ Partial Class Bancos_PopIECompras
|
|||||||
TxtImporte.Text = dr("Saldo").ToString.ToDouble.FormatoNumero
|
TxtImporte.Text = dr("Saldo").ToString.ToDouble.FormatoNumero
|
||||||
|
|
||||||
SaldoVenta = dr("Saldo").ToString.ToDouble
|
SaldoVenta = dr("Saldo").ToString.ToDouble
|
||||||
|
EsImportacion = CBool(dr("EsImportacion"))
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
@@ -1589,7 +1604,19 @@ Partial Class Bancos_PopIECompras
|
|||||||
|
|
||||||
|
|
||||||
Dim CveSubProyectoInsertar As Integer = -1
|
Dim CveSubProyectoInsertar As Integer = -1
|
||||||
Dim ConceptoContable = Row("CveConcepto").ToString.ToEntero
|
Dim ConceptoContable = Row("CveConcepto").ToString.ToEntero
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(558) = "1" Then
|
||||||
|
If ConceptoContable.Contiene(14, 19) AndAlso CveCompra > 0 Then
|
||||||
|
If EsImportacion Then
|
||||||
|
If ConceptoContable = 14 Then
|
||||||
|
ConceptoContable = 287
|
||||||
|
Else
|
||||||
|
ConceptoContable = 288
|
||||||
|
End If
|
||||||
|
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End If
|
||||||
TipoMovimiento = If(Row("TipoMovto").ToString = "True", True, False)
|
TipoMovimiento = If(Row("TipoMovto").ToString = "True", True, False)
|
||||||
Dim ImporteMovimiento As Decimal = 0
|
Dim ImporteMovimiento As Decimal = 0
|
||||||
Dim ImporteMX As Decimal = 0
|
Dim ImporteMX As Decimal = 0
|
||||||
@@ -2635,6 +2662,230 @@ Partial Class Bancos_PopIECompras
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
Case 287 'Iva por Acreditar
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(521) = "1" Then
|
||||||
|
'funcionalidad que toma el 100% del pago para acreditamiento de iva
|
||||||
|
Dim TotalImporte As Decimal
|
||||||
|
|
||||||
|
If CveMoneda = 1 AndAlso CveMonedaCompra = 1 Then
|
||||||
|
TotalImporte = ImportePagado.ToString.ToDecimal
|
||||||
|
ElseIf CveMoneda = 1 AndAlso CveMonedaCompra = 2 Then
|
||||||
|
TotalImporte = Math.Round(ImportePagado.ToString.ToDecimal / tipoCambioPago, 2)
|
||||||
|
ElseIf CveMoneda = 2 AndAlso CveMonedaCompra = 1 Then
|
||||||
|
TotalImporte = Math.Round(ImportePagado.ToString.ToDecimal * tipoCambioPago, 2)
|
||||||
|
ElseIf CveMoneda = 2 AndAlso CveMonedaCompra = 2 Then
|
||||||
|
TotalImporte = ImportePagado.ToString.ToDecimal
|
||||||
|
End If
|
||||||
|
|
||||||
|
If TotalImporte = CompraSaldo Then
|
||||||
|
If CveMoneda = 1 AndAlso CveMonedaCompra = 1 Then
|
||||||
|
ImporteMovimiento = MovimientoPagar.IVA
|
||||||
|
ImporteMX = ImporteMovimiento
|
||||||
|
ElseIf CveMoneda = 1 AndAlso CveMonedaCompra = 2 Then
|
||||||
|
ImporteMovimiento = MovimientoPagar.IVA
|
||||||
|
ImporteMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioCompra)
|
||||||
|
ElseIf CveMoneda = 2 AndAlso CveMonedaCompra = 1 Then
|
||||||
|
ImporteMovimiento = MovimientoPagar.IVA
|
||||||
|
ImporteMX = ImporteMovimiento * tipoCambioCompra
|
||||||
|
ElseIf CveMoneda = 2 AndAlso CveMonedaCompra = 2 Then
|
||||||
|
ImporteMovimiento = MovimientoPagar.IVA
|
||||||
|
ImporteMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioCompra)
|
||||||
|
End If
|
||||||
|
ImporteMovimiento = Math.Round(ImporteMovimiento, 2)
|
||||||
|
ImporteMX = Math.Round(ImporteMX, 2)
|
||||||
|
TimpocambioGeneral = tipoCambioCompra
|
||||||
|
|
||||||
|
If tipoCambioCompra > 1 Then ConceptoMovimiento += $" TC:{tipoCambioCompra} ${ImporteMovimiento.FormatoNumero(2)}"
|
||||||
|
Else
|
||||||
|
ImporteMovimiento = 0
|
||||||
|
ImporteMX = 0
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
If CveMoneda = 1 AndAlso CveMonedaCompra = 1 Then
|
||||||
|
ImporteMovimiento = MovimientoPagar.IVA * PorcentajePago
|
||||||
|
ImporteMX = ImporteMovimiento
|
||||||
|
ElseIf CveMoneda = 1 AndAlso CveMonedaCompra = 2 Then
|
||||||
|
ImporteMovimiento = (MovimientoPagar.IVA * PorcentajePago)
|
||||||
|
ImporteMX = ImporteMovimiento * tipoCambioCompra
|
||||||
|
ElseIf CveMoneda = 2 AndAlso CveMonedaCompra = 1 Then
|
||||||
|
ImporteMovimiento = (MovimientoPagar.IVA * PorcentajePago)
|
||||||
|
ImporteMX = ImporteMovimiento * tipoCambioCompra
|
||||||
|
ElseIf CveMoneda = 2 AndAlso CveMonedaCompra = 2 Then
|
||||||
|
ImporteMovimiento = (MovimientoPagar.IVA * PorcentajePago)
|
||||||
|
ImporteMX = ImporteMovimiento * tipoCambioCompra
|
||||||
|
End If
|
||||||
|
ImporteMovimiento = Math.Round(ImporteMovimiento, 2)
|
||||||
|
ImporteMX = Math.Round(ImporteMX, 2)
|
||||||
|
TimpocambioGeneral = If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioCompra)
|
||||||
|
|
||||||
|
If tipoCambioCompra > 1 Then ConceptoMovimiento += $" TC:{tipoCambioCompra} ${ImporteMovimiento.FormatoNumero(2)}"
|
||||||
|
End If
|
||||||
|
|
||||||
|
PorcentajeImpuesto = MovimientoPagar.PorcentajeIVA
|
||||||
|
Dim IdCtaIVAXAcreditar As Integer = 0
|
||||||
|
Dim IdCtaIVAAcreditable As Integer = 0
|
||||||
|
|
||||||
|
If GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeImpuesto).Rows.Count > 0 Then
|
||||||
|
IdCtaIVAXAcreditar = GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeImpuesto).Rows(0)("IdCtaIVAXAcreditar").ToString.ToEntero
|
||||||
|
IdCtaIVAAcreditable = GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeImpuesto).Rows(0)("IdCtaIVAAcreditable").ToString.ToEntero
|
||||||
|
End If
|
||||||
|
|
||||||
|
IdCtaContable = If(IdCtaIVAXAcreditar > 0, IdCtaIVAXAcreditar, 0)
|
||||||
|
|
||||||
|
If ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) And Not IdCtaContable > 0 Then
|
||||||
|
If ObjMov.DtResultados.Rows.Count > 0 Then
|
||||||
|
IdCtaContable = ObjMov.DtResultados.Rows(0)("IdCtaContable").ToString.ToEntero
|
||||||
|
CveCuenta = ObjMov.DtResultados.Rows(0)("IdCtaContableSIG").ToString.ToEntero
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
Case 288 'Iva Acreditable
|
||||||
|
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(521) = "1" Then
|
||||||
|
'funcionalidad que toma el 100% del pago para acreditamiento de iva
|
||||||
|
Dim TotalImporte As Decimal
|
||||||
|
|
||||||
|
If CveMoneda = 1 AndAlso CveMonedaCompra = 1 Then
|
||||||
|
TotalImporte = ImportePagado.ToString.ToDecimal
|
||||||
|
ElseIf CveMoneda = 1 AndAlso CveMonedaCompra = 2 Then
|
||||||
|
TotalImporte = Math.Round(ImportePagado.ToString.ToDecimal / tipoCambioPago, 2)
|
||||||
|
ElseIf CveMoneda = 2 AndAlso CveMonedaCompra = 1 Then
|
||||||
|
TotalImporte = Math.Round(ImportePagado.ToString.ToDecimal * tipoCambioPago, 2)
|
||||||
|
ElseIf CveMoneda = 2 AndAlso CveMonedaCompra = 2 Then
|
||||||
|
TotalImporte = ImportePagado.ToString.ToDecimal
|
||||||
|
End If
|
||||||
|
|
||||||
|
If TotalImporte = CompraSaldo Then
|
||||||
|
If CveMoneda = 1 AndAlso CveMonedaCompra = 1 Then
|
||||||
|
ImporteMovimiento = MovimientoPagar.IVADeducible
|
||||||
|
ImporteMX = ImporteMovimiento
|
||||||
|
ElseIf CveMoneda = 1 AndAlso CveMonedaCompra = 2 Then
|
||||||
|
ImporteMovimiento = (MovimientoPagar.IVADeducible)
|
||||||
|
ImporteMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioCompra)
|
||||||
|
ElseIf CveMoneda = 2 AndAlso CveMonedaCompra = 1 Then
|
||||||
|
ImporteMovimiento = (MovimientoPagar.IVADeducible)
|
||||||
|
ImporteMX = ImporteMovimiento * tipoCambioCompra
|
||||||
|
ElseIf CveMoneda = 2 AndAlso CveMonedaCompra = 2 Then
|
||||||
|
ImporteMovimiento = (MovimientoPagar.IVADeducible)
|
||||||
|
ImporteMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioCompra)
|
||||||
|
End If
|
||||||
|
ImporteMovimiento = Math.Round(ImporteMovimiento, 2)
|
||||||
|
ImporteMX = Math.Round(ImporteMX, 2)
|
||||||
|
TimpocambioGeneral = If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioCompra)
|
||||||
|
|
||||||
|
If tipoCambioPago > 1 Then ConceptoMovimiento += $" TC:{tipoCambioPago} ${ImporteMovimiento.FormatoNumero(2)}"
|
||||||
|
Else
|
||||||
|
ImporteMovimiento = 0
|
||||||
|
ImporteMX = 0
|
||||||
|
End If
|
||||||
|
|
||||||
|
Else
|
||||||
|
If CveMoneda = 1 AndAlso CveMonedaCompra = 1 Then
|
||||||
|
ImporteMovimiento = (MovimientoPagar.IVADeducible * PorcentajePago).RoundSQL
|
||||||
|
ImporteMX = ImporteMovimiento
|
||||||
|
ElseIf CveMoneda = 1 AndAlso CveMonedaCompra = 2 Then
|
||||||
|
ImporteMovimiento = (MovimientoPagar.IVADeducible * PorcentajePago)
|
||||||
|
ImporteMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioCompra)
|
||||||
|
ElseIf CveMoneda = 2 AndAlso CveMonedaCompra = 1 Then
|
||||||
|
ImporteMovimiento = (MovimientoPagar.IVADeducible * PorcentajePago)
|
||||||
|
ImporteMX = ImporteMovimiento * tipoCambioCompra
|
||||||
|
ElseIf CveMoneda = 2 AndAlso CveMonedaCompra = 2 Then
|
||||||
|
ImporteMovimiento = (MovimientoPagar.IVADeducible * PorcentajePago)
|
||||||
|
ImporteMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioCompra)
|
||||||
|
End If
|
||||||
|
ImporteMovimiento = Math.Round(ImporteMovimiento, 2)
|
||||||
|
ImporteMX = Math.Round(ImporteMX, 2)
|
||||||
|
TimpocambioGeneral = If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioCompra)
|
||||||
|
|
||||||
|
If tipoCambioPago > 1 Then ConceptoMovimiento += $" TC:{tipoCambioPago} ${ImporteMovimiento.FormatoNumero(2)}"
|
||||||
|
End If
|
||||||
|
|
||||||
|
If MovimientoPagar.IVANoDeducible.ToString.ToDecimal > 0 Then
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(521) = "1" Then
|
||||||
|
'funcionalidad que toma el 100% del pago para acreditamiento de iva
|
||||||
|
Dim TotalImporte As Decimal
|
||||||
|
|
||||||
|
If CveMoneda = 1 AndAlso CveMonedaCompra = 1 Then
|
||||||
|
TotalImporte = ImportePagado.ToString.ToDecimal
|
||||||
|
ElseIf CveMoneda = 1 AndAlso CveMonedaCompra = 2 Then
|
||||||
|
TotalImporte = Math.Round(ImportePagado.ToString.ToDecimal / tipoCambioPago, 2)
|
||||||
|
ElseIf CveMoneda = 2 AndAlso CveMonedaCompra = 1 Then
|
||||||
|
TotalImporte = Math.Round(ImportePagado.ToString.ToDecimal * tipoCambioPago, 2)
|
||||||
|
ElseIf CveMoneda = 2 AndAlso CveMonedaCompra = 2 Then
|
||||||
|
TotalImporte = ImportePagado.ToString.ToDecimal
|
||||||
|
End If
|
||||||
|
|
||||||
|
If TotalImporte = CompraSaldo Then
|
||||||
|
If CveMoneda = 1 AndAlso CveMonedaCompra = 1 Then
|
||||||
|
ImporteMovimientoNoDeducible = MovimientoPagar.IVANoDeducible
|
||||||
|
ImporteMXNoDeducible = ImporteMovimientoNoDeducible
|
||||||
|
ElseIf CveMoneda = 1 AndAlso CveMonedaCompra = 2 Then
|
||||||
|
ImporteMovimientoNoDeducible = (MovimientoPagar.IVANoDeducible)
|
||||||
|
ImporteMXNoDeducible = ImporteMovimientoNoDeducible * If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioCompra)
|
||||||
|
ElseIf CveMoneda = 2 AndAlso CveMonedaCompra = 1 Then
|
||||||
|
ImporteMovimientoNoDeducible = (MovimientoPagar.IVANoDeducible)
|
||||||
|
ImporteMXNoDeducible = ImporteMovimientoNoDeducible * tipoCambioCompra
|
||||||
|
ElseIf CveMoneda = 2 AndAlso CveMonedaCompra = 2 Then
|
||||||
|
ImporteMovimientoNoDeducible = (MovimientoPagar.IVANoDeducible)
|
||||||
|
ImporteMXNoDeducible = ImporteMovimientoNoDeducible * If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioCompra)
|
||||||
|
End If
|
||||||
|
ImporteMovimientoNoDeducible = Math.Round(ImporteMovimientoNoDeducible, 2)
|
||||||
|
ImporteMXNoDeducible = Math.Round(ImporteMX, 2)
|
||||||
|
TimpocambioGeneral = If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioCompra)
|
||||||
|
|
||||||
|
If tipoCambioPago > 1 Then ConceptoMovimiento += $" TC:{tipoCambioPago} ${ImporteMovimientoNoDeducible.FormatoNumero(2)}"
|
||||||
|
Else
|
||||||
|
ImporteMovimientoNoDeducible = 0
|
||||||
|
ImporteMXNoDeducible = 0
|
||||||
|
End If
|
||||||
|
|
||||||
|
Else
|
||||||
|
If CveMoneda = 1 AndAlso CveMonedaCompra = 1 Then
|
||||||
|
ImporteMovimientoNoDeducible = MovimientoPagar.IVANoDeducible * PorcentajePago
|
||||||
|
ImporteMXNoDeducible = ImporteMovimientoNoDeducible
|
||||||
|
ElseIf CveMoneda = 1 AndAlso CveMonedaCompra = 2 Then
|
||||||
|
ImporteMovimientoNoDeducible = (MovimientoPagar.IVANoDeducible * PorcentajePago)
|
||||||
|
ImporteMXNoDeducible = ImporteMovimientoNoDeducible * If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioCompra)
|
||||||
|
ElseIf CveMoneda = 2 AndAlso CveMonedaCompra = 1 Then
|
||||||
|
ImporteMovimientoNoDeducible = (MovimientoPagar.IVANoDeducible * PorcentajePago)
|
||||||
|
ImporteMXNoDeducible = ImporteMovimientoNoDeducible * tipoCambioCompra
|
||||||
|
ElseIf CveMoneda = 2 AndAlso CveMonedaCompra = 2 Then
|
||||||
|
ImporteMovimientoNoDeducible = (MovimientoPagar.IVANoDeducible * PorcentajePago)
|
||||||
|
ImporteMXNoDeducible = ImporteMovimientoNoDeducible * If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioCompra)
|
||||||
|
End If
|
||||||
|
ImporteMovimientoNoDeducible = Math.Round(ImporteMovimientoNoDeducible, 2)
|
||||||
|
ImporteMXNoDeducible = Math.Round(ImporteMXNoDeducible, 2)
|
||||||
|
TimpocambioGeneral = If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioCompra)
|
||||||
|
|
||||||
|
If tipoCambioPago > 1 Then ConceptoMovimiento += $" TC:{tipoCambioPago} ${ImporteMovimientoNoDeducible.FormatoNumero(2)}"
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
PorcentajeImpuesto = MovimientoPagar.PorcentajeIVA
|
||||||
|
Dim IdCtaIVAXAcreditar As Integer = 0
|
||||||
|
Dim IdCtaIVAAcreditable As Integer = 0
|
||||||
|
Dim IdCtaContableNoIVA As Integer = 0
|
||||||
|
|
||||||
|
If GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeImpuesto).Rows.Count > 0 Then
|
||||||
|
IdCtaIVAXAcreditar = GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeImpuesto).Rows(0)("IdCtaIVAXAcreditar").ToString.ToEntero
|
||||||
|
IdCtaIVAAcreditable = GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeImpuesto).Rows(0)("IdCtaIVAAcreditable").ToString.ToEntero
|
||||||
|
IdCtaContableNoIVA = GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeImpuesto).Rows(0)("IdCtaIVANoAcreditable").ToString.ToEntero
|
||||||
|
End If
|
||||||
|
|
||||||
|
IdCtaContable = If(IdCtaIVAAcreditable > 0, IdCtaIVAAcreditable, 0)
|
||||||
|
|
||||||
|
If ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) And Not IdCtaContable > 0 Then
|
||||||
|
If ObjMov.DtResultados.Rows.Count > 0 Then
|
||||||
|
IdCtaContable = ObjMov.DtResultados.Rows(0)("IdCtaContable").ToString.ToEntero
|
||||||
|
CveCuenta = ObjMov.DtResultados.Rows(0)("IdCtaContableSIG").ToString.ToEntero
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
If MovimientoPagar.IVANoDeducible > 0 Then
|
||||||
|
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, If(ConceptoContable = 30, TxtFolio.Text.Trim, TxtObservaciones.Text), 280, ConceptoMovimiento, Fecha, IdCtaContableNoIVA, -1, CveIE, -1, CveCompra, -1, CveProveedor:=CveProveedor2, ImporteMX:=ImporteMXNoDeducible, CveCuenta:=CveCuenta, TipoCambio:=TimpocambioGeneral, CvePersonal:=CvePersonal, PorcentajeImpuesto:=PorcentajeImpuesto) Then
|
||||||
|
MsgError = "No se pudo insertar la póliza"
|
||||||
|
End If
|
||||||
|
End If
|
||||||
'Case 280 'Iva Acreditable No Deducible
|
'Case 280 'Iva Acreditable No Deducible
|
||||||
' If UsuarioActual.Empresa.Funcionalidad(521) = "1" Then
|
' If UsuarioActual.Empresa.Funcionalidad(521) = "1" Then
|
||||||
' 'funcionalidad que toma el 100% del pago para acreditamiento de iva
|
' 'funcionalidad que toma el 100% del pago para acreditamiento de iva
|
||||||
|
|||||||
@@ -718,79 +718,76 @@ Partial Class Bancos_PopIEVentas
|
|||||||
Validada = True
|
Validada = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
CveCliente = dr("CveCliente").ToString.ToEntero
|
||||||
If Validada Then
|
CveClienteOriginal = dr("CveCliente").ToString.ToEntero
|
||||||
|
HdnCveCliente.Value = CveCliente.ToString
|
||||||
CveCliente = dr("CveCliente").ToString.ToEntero
|
CargaCliente(CveCliente, "-1")
|
||||||
CveClienteOriginal = dr("CveCliente").ToString.ToEntero
|
CveMoneda = dr("CveMoneda").ToString.ToEntero
|
||||||
HdnCveCliente.Value = CveCliente.ToString
|
CveMonedaVenta = dr("CveMoneda").ToString.ToEntero
|
||||||
CargaCliente(CveCliente, "-1")
|
CveMonedaFiltros = dr("CveMoneda").ToString.ToEntero
|
||||||
CveMoneda = dr("CveMoneda").ToString.ToEntero
|
NombreCliente = GlobalDTCliente(UsuarioActual.CveEmpresa, CveCliente:=CveCliente).FiltroPrimeroValor("Nombre", String.Format("CveCliente = {0}", CveCliente))
|
||||||
CveMonedaVenta = dr("CveMoneda").ToString.ToEntero
|
SerieFolio = dr("SerieFolio").ToString
|
||||||
CveMonedaFiltros = dr("CveMoneda").ToString.ToEntero
|
TipoCambioOriginal = dr("TipoCambio").ToString.ToDecimal
|
||||||
NombreCliente = GlobalDTCliente(UsuarioActual.CveEmpresa, CveCliente:=CveCliente).FiltroPrimeroValor("Nombre", String.Format("CveCliente = {0}", CveCliente))
|
CveSubProyectoVenta = dr("CveSubProyecto").ToString.ToEntero
|
||||||
SerieFolio = dr("SerieFolio").ToString
|
|
||||||
TipoCambioOriginal = dr("TipoCambio").ToString.ToDecimal
|
LblMetodoPAgo.Text = $"{dr("ClaveMetodoPagoSATStr").ToString() }"
|
||||||
CveSubProyectoVenta = dr("CveSubProyecto").ToString.ToEntero
|
|
||||||
|
'Configuración de Modalidad Update
|
||||||
LblMetodoPAgo.Text = $"{dr("ClaveMetodoPagoSATStr").ToString() }"
|
|
||||||
|
'Dim RFCCliente As String = GlobalDTCliente(UsuarioActual.CveEmpresa).FiltroPrimeroValor("RFC", $"CveCliente = {CveCliente} ")
|
||||||
|
|
||||||
|
If Not UsuarioActual.Empresa.Funcionalidad(536) = "1" Then
|
||||||
|
If dr("TipoDocto").ToString = "Rem" Then
|
||||||
|
Alert("Los documentos de tipo Remisión no se permite realizar el pago", TipoMensaje.MsgAdvertencia)
|
||||||
|
BtnGuardar.Visible = False
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
'Configuración de Modalidad Update
|
MovimientoPagar = New IEMovimiento
|
||||||
|
MovimientoPagar.SubTotal = dr("SubTotal").ToString.ToDecimal
|
||||||
|
MovimientoPagar.IVA = dr("IVA").ToString.ToDecimal
|
||||||
|
MovimientoPagar.RetIVA = dr("RetIVA").ToString.ToDecimal
|
||||||
|
MovimientoPagar.RetISR = dr("RetISR").ToString.ToDecimal
|
||||||
|
MovimientoPagar.Total = dr("Total").ToString.ToDecimal
|
||||||
|
MovimientoPagar.Saldo = dr("Saldo").ToString.ToDecimal
|
||||||
|
MovimientoPagar.IEPS = dr("IEPS").ToString.ToDecimal
|
||||||
|
MovimientoPagar.PorcentajeIVA = dr("PorcentajeIVA").ToString.ToDecimal
|
||||||
|
|
||||||
'Dim RFCCliente As String = GlobalDTCliente(UsuarioActual.CveEmpresa).FiltroPrimeroValor("RFC", $"CveCliente = {CveCliente} ")
|
LtlTitulo.Text = "Cuentas por Cobrar"
|
||||||
|
LtlTipo2.Text = "Folio de la Venta"
|
||||||
|
LtlTipo3.Text = "Fecha de la Venta"
|
||||||
|
LtlSaldo.Text = If(CveMoneda = 1, $"{dr("Saldo").ToString.FormatoNumero}{" MXN"}", $"{dr("Saldo").ToString.FormatoNumero}{" USD"}")
|
||||||
|
LtlFechaVenta.Text = dr("Fecha").ToString.ToDate.ToShortDateString()
|
||||||
|
LtlFolio.Text = dr("SerieFolio").ToString
|
||||||
|
|
||||||
|
TxtFolio.Enabled = True
|
||||||
|
TxtFechaDocumento.Enabled = True
|
||||||
|
Calendario.Enabled = True
|
||||||
|
TxtPagueseA.Enabled = False
|
||||||
|
TxtImporte.Enabled = True
|
||||||
|
|
||||||
|
DdlCuenta.Enabled = True
|
||||||
|
|
||||||
|
DdlTipoTransaccion.Enabled = True
|
||||||
|
TxtObservaciones.Enabled = True
|
||||||
|
|
||||||
|
RVImporte.Enabled = True
|
||||||
|
RVImporte.MaximumValue = dr("Saldo").ToString.ToDouble.ToString.FormatoNumero
|
||||||
|
TxtImporte.Text = dr("Saldo").ToString.ToDouble.FormatoNumero
|
||||||
|
|
||||||
|
FechaVenta = dr("Fecha").ToString.ToDate
|
||||||
|
SaldoVenta = dr("Saldo").ToString.ToDouble
|
||||||
|
|
||||||
|
|
||||||
If Not UsuarioActual.Empresa.Funcionalidad(536) = "1" Then
|
'Cortes de Caja
|
||||||
If dr("TipoDocto").ToString = "Rem" Then
|
If UsuarioActual.TienePermisoProceso(160) Then
|
||||||
Alert("Los documentos de tipo Remisión no se permite realizar el pago", TipoMensaje.MsgAdvertencia)
|
CargaCorteCaja()
|
||||||
BtnGuardar.Visible = False
|
End If
|
||||||
End If
|
|
||||||
End If
|
|
||||||
|
|
||||||
|
If Not Validada Then
|
||||||
|
BtnGuardar.Visible = False
|
||||||
MovimientoPagar = New IEMovimiento
|
|
||||||
MovimientoPagar.SubTotal = dr("SubTotal").ToString.ToDecimal
|
|
||||||
MovimientoPagar.IVA = dr("IVA").ToString.ToDecimal
|
|
||||||
MovimientoPagar.RetIVA = dr("RetIVA").ToString.ToDecimal
|
|
||||||
MovimientoPagar.RetISR = dr("RetISR").ToString.ToDecimal
|
|
||||||
MovimientoPagar.Total = dr("Total").ToString.ToDecimal
|
|
||||||
MovimientoPagar.Saldo = dr("Saldo").ToString.ToDecimal
|
|
||||||
MovimientoPagar.IEPS = dr("IEPS").ToString.ToDecimal
|
|
||||||
MovimientoPagar.PorcentajeIVA = dr("PorcentajeIVA").ToString.ToDecimal
|
|
||||||
|
|
||||||
LtlTitulo.Text = "Cuentas por Cobrar"
|
|
||||||
LtlTipo2.Text = "Folio de la Venta"
|
|
||||||
LtlTipo3.Text = "Fecha de la Venta"
|
|
||||||
LtlSaldo.Text = If(CveMoneda = 1, $"{dr("Saldo").ToString.FormatoNumero}{" MXN"}", $"{dr("Saldo").ToString.FormatoNumero}{" USD"}")
|
|
||||||
LtlFechaVenta.Text = dr("Fecha").ToString.ToDate.ToShortDateString()
|
|
||||||
LtlFolio.Text = dr("SerieFolio").ToString
|
|
||||||
|
|
||||||
TxtFolio.Enabled = True
|
|
||||||
TxtFechaDocumento.Enabled = True
|
|
||||||
Calendario.Enabled = True
|
|
||||||
TxtPagueseA.Enabled = False
|
|
||||||
TxtImporte.Enabled = True
|
|
||||||
|
|
||||||
DdlCuenta.Enabled = True
|
|
||||||
|
|
||||||
DdlTipoTransaccion.Enabled = True
|
|
||||||
TxtObservaciones.Enabled = True
|
|
||||||
|
|
||||||
RVImporte.Enabled = True
|
|
||||||
RVImporte.MaximumValue = dr("Saldo").ToString.ToDouble.ToString.FormatoNumero
|
|
||||||
TxtImporte.Text = dr("Saldo").ToString.ToDouble.FormatoNumero
|
|
||||||
|
|
||||||
FechaVenta = dr("Fecha").ToString.ToDate
|
|
||||||
SaldoVenta = dr("Saldo").ToString.ToDouble
|
|
||||||
|
|
||||||
|
|
||||||
'Cortes de Caja
|
|
||||||
If UsuarioActual.TienePermisoProceso(160) Then
|
|
||||||
CargaCorteCaja()
|
|
||||||
End If
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
@@ -1388,8 +1385,6 @@ Partial Class Bancos_PopIEVentas
|
|||||||
#Region "G U A R D A R"
|
#Region "G U A R D A R"
|
||||||
Private Sub BtnGuardar_Click(sender As Object, e As EventArgs) Handles BtnGuardar.Click
|
Private Sub BtnGuardar_Click(sender As Object, e As EventArgs) Handles BtnGuardar.Click
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Dim FechaFactura As Date = FechaVenta
|
Dim FechaFactura As Date = FechaVenta
|
||||||
Dim FechaDocumentoPago As Date = TxtFechaDocumento.Text.ToDate
|
Dim FechaDocumentoPago As Date = TxtFechaDocumento.Text.ToDate
|
||||||
|
|
||||||
|
|||||||
@@ -51,7 +51,7 @@
|
|||||||
<asp:LinkButton ID="imgCalendario" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
<asp:LinkButton ID="imgCalendario" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||||
</span>
|
</span>
|
||||||
<ajax:MaskedEditExtender ID="MEEFechaI" runat="server" TargetControlID="txtFechaI" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
<ajax:MaskedEditExtender ID="MEEFechaI" runat="server" TargetControlID="txtFechaI" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||||
<ajax:CalendarExtender runat="server" ID="Calendario" TargetControlID="txtFechaI" PopupButtonID="ImgCalendario" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
<ajax:CalendarExtender runat="server" ID="Calendario" TargetControlID="txtFechaI" PopupButtonID="ImgCalendario" PopupPosition="BottomLeft" Enabled="True"></ajax:CalendarExtender>
|
||||||
<asp:RequiredFieldValidator ID="rfvFechaI" runat="server" ControlToValidate="txtFechaI" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>
|
<asp:RequiredFieldValidator ID="rfvFechaI" runat="server" ControlToValidate="txtFechaI" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>
|
||||||
<asp:CompareValidator ID="cvFechaI" runat="server" ControlToValidate="txtFechaI" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida"></asp:CompareValidator>
|
<asp:CompareValidator ID="cvFechaI" runat="server" ControlToValidate="txtFechaI" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida"></asp:CompareValidator>
|
||||||
<ajax:ValidatorCalloutExtender ID="vcoFfvFI" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
|
<ajax:ValidatorCalloutExtender ID="vcoFfvFI" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||||
|
|||||||
@@ -1006,6 +1006,7 @@ Partial Class Bancos_ProveedoresAbonar
|
|||||||
'inserto las compras que voy a pagar
|
'inserto las compras que voy a pagar
|
||||||
For Each gvr As GridViewRow In GvCxP.Rows
|
For Each gvr As GridViewRow In GvCxP.Rows
|
||||||
If gvr.FCCheckBox("Chk").Checked Then
|
If gvr.FCCheckBox("Chk").Checked Then
|
||||||
|
Dim EsImportacion As Boolean = False
|
||||||
|
|
||||||
'Tipos de cambio
|
'Tipos de cambio
|
||||||
If CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then 'Si la venta viene en Pesos y se va a pagar en Pesos
|
If CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then 'Si la venta viene en Pesos y se va a pagar en Pesos
|
||||||
@@ -1032,7 +1033,6 @@ Partial Class Bancos_ProveedoresAbonar
|
|||||||
|
|
||||||
If ObjMov.GetPlantillaConceptos(UsuarioActual.CveEmpresa, CvePlantillaPoliza) Then
|
If ObjMov.GetPlantillaConceptos(UsuarioActual.CveEmpresa, CvePlantillaPoliza) Then
|
||||||
For Each Row As DataRow In ObjMov.DtResultados.Rows
|
For Each Row As DataRow In ObjMov.DtResultados.Rows
|
||||||
|
|
||||||
ConceptoContable = Row("CveConcepto").ToString.ToEntero
|
ConceptoContable = Row("CveConcepto").ToString.ToEntero
|
||||||
TipoMovimiento = If(Row("TipoMovto").ToString = "True", True, False)
|
TipoMovimiento = If(Row("TipoMovto").ToString = "True", True, False)
|
||||||
ImporteMovimiento = 0
|
ImporteMovimiento = 0
|
||||||
@@ -1042,6 +1042,27 @@ Partial Class Bancos_ProveedoresAbonar
|
|||||||
Referencia = gvr.DataKey("SerieFolio").ToString
|
Referencia = gvr.DataKey("SerieFolio").ToString
|
||||||
Dim PorcentajeImpuesto As Decimal = 0
|
Dim PorcentajeImpuesto As Decimal = 0
|
||||||
|
|
||||||
|
If ConceptoContable.Contiene(14, 19) AndAlso gvr.DataKey("CveCompra").ToEntero > 0 Then
|
||||||
|
Dim objcompras As New ClsCompras
|
||||||
|
objcompras.GetCompras(gvr.DataKey("CveCompra").ToEntero, "-1", "-1", -1, -1, UsuarioActual.CveEmpresa)
|
||||||
|
If objcompras.DtResultados IsNot Nothing AndAlso objcompras.DtResultados.Rows.Count > 0 Then
|
||||||
|
Dim dr As DataRow = objcompras.DtResultados.Rows(0)
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(558) = "1" Then
|
||||||
|
If dr("EsImportacion").ToString = "True" Then
|
||||||
|
EsImportacion = True
|
||||||
|
If ConceptoContable = 14 Then
|
||||||
|
ConceptoContable = 287
|
||||||
|
Else
|
||||||
|
ConceptoContable = 288
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
EsImportacion = False
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
Select Case ConceptoContable
|
Select Case ConceptoContable
|
||||||
Case 17 'Pago Proveedores
|
Case 17 'Pago Proveedores
|
||||||
|
|
||||||
@@ -1736,6 +1757,72 @@ Partial Class Bancos_ProveedoresAbonar
|
|||||||
CveCuenta = ObjMov.DtResultados.Rows(0)("IdCuentaIVAxAcreditarSIG").ToString.ToEntero
|
CveCuenta = ObjMov.DtResultados.Rows(0)("IdCuentaIVAxAcreditarSIG").ToString.ToEntero
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
Case 287 'Iva X Acreditar Importacion
|
||||||
|
Dim TotalImporte As Decimal = gvr.FCTextBox("TxtAbonar").Text.ToDecimal
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(521) = "1" Then
|
||||||
|
'funcionalidad que toma el 100% del pago para acreditamiento de iva
|
||||||
|
|
||||||
|
If TotalImporte = gvr.DataKey("Saldo").ToDecimal Then
|
||||||
|
If CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
|
||||||
|
ImporteMovimiento = gvr.DataKey("IVA").ToDecimal
|
||||||
|
importeMX = ImporteMovimiento
|
||||||
|
ElseIf CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
||||||
|
tipoCambioCompra = gvr.DataKey("TipoCambio").ToDecimal
|
||||||
|
ImporteMovimiento = gvr.DataKey("IVA").ToDecimal
|
||||||
|
importeMX = ImporteMovimiento * tipoCambioCompra
|
||||||
|
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
|
||||||
|
ImporteMovimiento = gvr.DataKey("IVA").ToDecimal
|
||||||
|
importeMX = ImporteMovimiento * tipoCambioCompra
|
||||||
|
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
||||||
|
tipoCambioCompra = gvr.DataKey("TipoCambio").ToDecimal
|
||||||
|
ImporteMovimiento = gvr.DataKey("IVA").ToDecimal
|
||||||
|
importeMX = ImporteMovimiento * tipoCambioCompra
|
||||||
|
End If
|
||||||
|
ImporteMovimiento = Math.Round(ImporteMovimiento, 2, MidpointRounding.AwayFromZero)
|
||||||
|
importeMX = Math.Round(importeMX, 2)
|
||||||
|
|
||||||
|
If tipoCambioCompra > 1 Then ConceptoMovimiento += $" TC:{tipoCambioCompra} ${ImporteMovimiento.FormatoNumero(2)}"
|
||||||
|
Else
|
||||||
|
ImporteMovimiento = 0
|
||||||
|
importeMX = 0
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
ImporteMovimiento = gvr.DataKey("IVAPorPagar").ToDecimal * PorcentajePago
|
||||||
|
|
||||||
|
|
||||||
|
If CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
|
||||||
|
importeMX = ImporteMovimiento
|
||||||
|
ElseIf CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
||||||
|
tipoCambioCompra = gvr.DataKey("TipoCambio").ToDecimal
|
||||||
|
importeMX = ImporteMovimiento * tipoCambioCompra
|
||||||
|
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
|
||||||
|
importeMX = ImporteMovimiento * tipoCambioCompra
|
||||||
|
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
||||||
|
tipoCambioCompra = gvr.DataKey("TipoCambio").ToDecimal
|
||||||
|
importeMX = ImporteMovimiento * tipoCambioCompra
|
||||||
|
End If
|
||||||
|
ImporteMovimiento = Math.Round(ImporteMovimiento, 2, MidpointRounding.AwayFromZero)
|
||||||
|
importeMX = Math.Round(importeMX, 2, MidpointRounding.AwayFromZero)
|
||||||
|
|
||||||
|
If tipoCambioCompra > 1 Then ConceptoMovimiento += $" TC:{tipoCambioCompra} ${ImporteMovimiento.FormatoNumero(2)}"
|
||||||
|
End If
|
||||||
|
TipoCambioGeneral = If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
|
||||||
|
|
||||||
|
PorcentajeImpuesto = gvr.DataKey("PorcentajeIVA").ToDecimal
|
||||||
|
Dim IdCtaIVAXAcreditar As Integer = 0
|
||||||
|
Dim IdCtaIVAAcreditable As Integer = 0
|
||||||
|
|
||||||
|
If GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeImpuesto).Rows.Count > 0 Then
|
||||||
|
IdCtaIVAXAcreditar = GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeImpuesto).Rows(0)("IdCtaIVAXAcreditar").ToString.ToEntero
|
||||||
|
IdCtaIVAAcreditable = GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeImpuesto).Rows(0)("IdCtaIVAAcreditable").ToString.ToEntero
|
||||||
|
End If
|
||||||
|
IdCtaContable = If(IdCtaIVAXAcreditar > 0, IdCtaIVAXAcreditar, 0)
|
||||||
|
If ImporteMovimiento <> 0 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) And Not IdCtaContable > 0 Then
|
||||||
|
If ObjMov.DtResultados.Rows.Count > 0 Then
|
||||||
|
IdCtaContable = ObjMov.DtResultados.Rows(0)("IdCtaContable").ToString.ToEntero
|
||||||
|
CveCuenta = ObjMov.DtResultados.Rows(0)("IdCtaContableSIG").ToString.ToEntero
|
||||||
|
End If
|
||||||
|
End If
|
||||||
Case 19 'Iva Acreditado
|
Case 19 'Iva Acreditado
|
||||||
Dim TotalImporte As Decimal = gvr.FCTextBox("TxtAbonar").Text.ToDecimal
|
Dim TotalImporte As Decimal = gvr.FCTextBox("TxtAbonar").Text.ToDecimal
|
||||||
If UsuarioActual.Empresa.Funcionalidad(521) = "1" Then
|
If UsuarioActual.Empresa.Funcionalidad(521) = "1" Then
|
||||||
@@ -1817,6 +1904,88 @@ Partial Class Bancos_ProveedoresAbonar
|
|||||||
CveCuenta = ObjMov.DtResultados.Rows(0)("IdCuentaIVAAcreditableSIG").ToString.ToEntero
|
CveCuenta = ObjMov.DtResultados.Rows(0)("IdCuentaIVAAcreditableSIG").ToString.ToEntero
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
Case 288 'Iva Acreditado
|
||||||
|
Dim TotalImporte As Decimal = gvr.FCTextBox("TxtAbonar").Text.ToDecimal
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(521) = "1" Then
|
||||||
|
'funcionalidad que toma el 100% del pago para acreditamiento de iva
|
||||||
|
If TotalImporte = gvr.DataKey("Saldo").ToDecimal Then
|
||||||
|
If CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
|
||||||
|
ImporteMovimiento = gvr.DataKey("IVADeducible").ToDecimal
|
||||||
|
importeMX = ImporteMovimiento
|
||||||
|
ElseIf CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
||||||
|
tipoCambioCompra = gvr.DataKey("TipoCambio").ToDecimal
|
||||||
|
ImporteMovimiento = gvr.DataKey("IVADeducible").ToDecimal
|
||||||
|
importeMX = gvr.DataKey("IVADeducible").ToDecimal * If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
|
||||||
|
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
|
||||||
|
ImporteMovimiento = gvr.DataKey("IVADeducible").ToDecimal
|
||||||
|
importeMX = ImporteMovimiento * tipoCambioCompra
|
||||||
|
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
||||||
|
tipoCambioCompra = gvr.DataKey("TipoCambio").ToDecimal
|
||||||
|
ImporteMovimiento = gvr.DataKey("IVADeducible").ToDecimal
|
||||||
|
importeMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
|
||||||
|
End If
|
||||||
|
ImporteMovimiento = Math.Round(ImporteMovimiento, 2, MidpointRounding.AwayFromZero)
|
||||||
|
importeMX = Math.Round(importeMX, 2, MidpointRounding.AwayFromZero)
|
||||||
|
|
||||||
|
If TipoCambioPago > 1 Then ConceptoMovimiento += $" TC:{TipoCambioPago} ${ImporteMovimiento.FormatoNumero(2)}"
|
||||||
|
Else
|
||||||
|
ImporteMovimiento = 0
|
||||||
|
importeMX = 0
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
ImporteMovimiento = gvr.DataKey("IVAPorPagar").ToDecimal * PorcentajePago
|
||||||
|
|
||||||
|
If CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
|
||||||
|
importeMX = ImporteMovimiento
|
||||||
|
ElseIf CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
||||||
|
tipoCambioCompra = gvr.DataKey("TipoCambio").ToDecimal
|
||||||
|
importeMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
|
||||||
|
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
|
||||||
|
importeMX = ImporteMovimiento * tipoCambioCompra
|
||||||
|
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
||||||
|
tipoCambioCompra = gvr.DataKey("TipoCambio").ToDecimal
|
||||||
|
|
||||||
|
importeMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
|
||||||
|
End If
|
||||||
|
ImporteMovimiento = Math.Round(ImporteMovimiento, 2, MidpointRounding.AwayFromZero)
|
||||||
|
importeMX = Math.Round(importeMX, 2, MidpointRounding.AwayFromZero)
|
||||||
|
|
||||||
|
If TipoCambioPago > 1 Then ConceptoMovimiento += $" TC:{TipoCambioPago} ${ImporteMovimiento.FormatoNumero(2)}"
|
||||||
|
End If
|
||||||
|
TipoCambioGeneral = If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
PorcentajeImpuesto = gvr.DataKey("PorcentajeIVA").ToDecimal
|
||||||
|
Dim IdCtaIVAXAcreditar As Integer = 0
|
||||||
|
Dim IdCtaIVAAcreditable As Integer = 0
|
||||||
|
Dim IdCtaContableNoIVA As Integer = 0
|
||||||
|
|
||||||
|
If GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeImpuesto).Rows.Count > 0 Then
|
||||||
|
IdCtaIVAXAcreditar = GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeImpuesto).Rows(0)("IdCtaIVAXAcreditar").ToString.ToEntero
|
||||||
|
IdCtaIVAAcreditable = GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeImpuesto).Rows(0)("IdCtaIVAAcreditable").ToString.ToEntero
|
||||||
|
IdCtaContableNoIVA = GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeImpuesto).Rows(0)("IdCtaIVANoAcreditable").ToString.ToEntero
|
||||||
|
End If
|
||||||
|
IdCtaContable = If(IdCtaIVAAcreditable > 0, IdCtaIVAAcreditable, 0)
|
||||||
|
|
||||||
|
'se registra el iva no acreditable
|
||||||
|
If gvr.DataKey("IVAPorPagarNoDeducible").ToDecimal > 0 Then
|
||||||
|
|
||||||
|
Dim ImporteNOIVA As Decimal = gvr.DataKey("IVAPorPagarNoDeducible").ToDecimal * PorcentajePago
|
||||||
|
|
||||||
|
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteNOIVA, Referencia, 280, ConceptoMovimiento, FechaMovimiento, IdCtaContableNoIVA, -1, CveIE, CveCompra:=gvr.DataKey("CveCompra").ToEntero, CveProveedor:=CveProveedor, ImporteMX:=ImporteNOIVA, ImporteME:=If(TipoCambioPago = 1, 0, ImporteMovimiento), CveCuenta:=CveCuenta, TipoCambio:=TipoCambioGeneral, PorcentajeImpuesto:=PorcentajeImpuesto) Then
|
||||||
|
MsgError = "No se pudo insertar la póliza"
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
If ImporteMovimiento <> 0 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) And Not IdCtaContable > 0 Then
|
||||||
|
If ObjMov.DtResultados.Rows.Count > 0 Then
|
||||||
|
IdCtaContable = ObjMov.DtResultados.Rows(0)("IdCtaContable").ToString.ToEntero
|
||||||
|
CveCuenta = ObjMov.DtResultados.Rows(0)("IdCtaContableSIG").ToString.ToEntero
|
||||||
|
End If
|
||||||
|
End If
|
||||||
Case 25 'IEPS X Acreditar
|
Case 25 'IEPS X Acreditar
|
||||||
Dim TotalImporte As Decimal = gvr.FCTextBox("TxtAbonar").Text.ToDecimal
|
Dim TotalImporte As Decimal = gvr.FCTextBox("TxtAbonar").Text.ToDecimal
|
||||||
ImporteMovimiento = gvr.DataKey("IEPSPorPagar").ToDecimal * PorcentajePago
|
ImporteMovimiento = gvr.DataKey("IEPSPorPagar").ToDecimal * PorcentajePago
|
||||||
@@ -2219,6 +2388,7 @@ Partial Class Bancos_ProveedoresAbonar
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
'Agrego el IVA
|
'Agrego el IVA
|
||||||
|
|
||||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, gvr.DataKey("IVA").ToDecimal * PorcentajePago, TxtObservaciones.Text, 14, TxtObservaciones.Text, Now, IdCtaIVAXAcreditar, -1, CveIE, CveCompra:=gvr.DataKey("CveCompra").ToEntero, CveProveedor:=CveProveedor, ImporteMX:=gvr.DataKey("IVA").ToDecimal * PorcentajePago) Then
|
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, gvr.DataKey("IVA").ToDecimal * PorcentajePago, TxtObservaciones.Text, 14, TxtObservaciones.Text, Now, IdCtaIVAXAcreditar, -1, CveIE, CveCompra:=gvr.DataKey("CveCompra").ToEntero, CveProveedor:=CveProveedor, ImporteMX:=gvr.DataKey("IVA").ToDecimal * PorcentajePago) Then
|
||||||
MsgError = "Detalle"
|
MsgError = "Detalle"
|
||||||
|
|
||||||
@@ -3392,6 +3562,7 @@ Partial Class Bancos_ProveedoresAbonar
|
|||||||
Private Sub RVTxtFechaDocumento_Init(sender As Object, e As EventArgs) Handles RVTxtFechaDocumento.Init
|
Private Sub RVTxtFechaDocumento_Init(sender As Object, e As EventArgs) Handles RVTxtFechaDocumento.Init
|
||||||
RVTxtFechaDocumento.MaximumValue = DateTime.Now.ToShortDateString
|
RVTxtFechaDocumento.MaximumValue = DateTime.Now.ToShortDateString
|
||||||
RVTxtFechaDocumentoMenor.MinimumValue = DateTime.Now.AddMonths(-4).ToShortDateString
|
RVTxtFechaDocumentoMenor.MinimumValue = DateTime.Now.AddMonths(-4).ToShortDateString
|
||||||
|
RVTxtFechaDocumentoMenor.MaximumValue = DateTime.Now.ToShortDateString
|
||||||
Calendario.EndDate = DateTime.Now
|
Calendario.EndDate = DateTime.Now
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|||||||
@@ -48,8 +48,9 @@ Partial Class Bancos_RepCobradoPagadoDetalle
|
|||||||
' GvDatos.Columns(5).HeaderText = "Cobrado"
|
' GvDatos.Columns(5).HeaderText = "Cobrado"
|
||||||
' End If
|
' End If
|
||||||
'End If
|
'End If
|
||||||
|
If Modalidad <> 0 Then
|
||||||
CargaDatos()
|
CargaDatos()
|
||||||
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|||||||
@@ -1068,10 +1068,10 @@ public partial class CRM_Acercamiento : ClsPaginas
|
|||||||
ClsOIEventos ObjEventos = new ClsOIEventos();
|
ClsOIEventos ObjEventos = new ClsOIEventos();
|
||||||
DateTime FechaInicio = TxtFechaInicioAgenda.Text.ToDateTime();
|
DateTime FechaInicio = TxtFechaInicioAgenda.Text.ToDateTime();
|
||||||
int CveContactoAgendar = DdlContactoAgenda.SelectedValue.ToEntero();
|
int CveContactoAgendar = DdlContactoAgenda.SelectedValue.ToEntero();
|
||||||
|
int CveEmpresaCRM = DdlEmpresaCRM.SelectedValue.ToEntero();
|
||||||
int CveEtapa = HdfEtapaSeleccionada.Value.ToEntero() == -1 ? CveEtapaActual : HdfEtapaSeleccionada.Value.ToEntero();
|
int CveEtapa = HdfEtapaSeleccionada.Value.ToEntero() == -1 ? CveEtapaActual : HdfEtapaSeleccionada.Value.ToEntero();
|
||||||
|
|
||||||
if (ObjEventos.AddEventoAgenda(DdlTipoAgenda.SelectedValue.ToEntero(), TxtAsuntoAgenda.Text, TxtDescripcionAgenda.Text, DdlPrioridadAgenda.SelectedValue.ToEntero(), FechaInicio, FechaInicio, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveTipoProcesoCRM: CveTipoProceso, CveAcercamientoCRM: CveAcercamiento, CveContactoCRM: CveContactoAgendar, CveEtapaProcesoCRM: CveEtapa))
|
if (ObjEventos.AddEventoAgenda(DdlTipoAgenda.SelectedValue.ToEntero(), TxtAsuntoAgenda.Text, TxtDescripcionAgenda.Text, DdlPrioridadAgenda.SelectedValue.ToEntero(), FechaInicio, FechaInicio, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveTipoProcesoCRM: CveTipoProceso, CveAcercamientoCRM: CveAcercamiento, CveContactoCRM: CveContactoAgendar, CveEtapaProcesoCRM: CveEtapa, CveEmpresaCRM:CveEmpresaCRM))
|
||||||
{
|
{
|
||||||
limpiarModalAgendar();
|
limpiarModalAgendar();
|
||||||
RegistraScript("$('#ModalAgenda').modal('hide')");
|
RegistraScript("$('#ModalAgenda').modal('hide')");
|
||||||
|
|||||||
@@ -514,6 +514,12 @@
|
|||||||
</asp:DropDownList>
|
</asp:DropDownList>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="form-group proveedoreespes" runat="server" id="divImportacion" visible="false">
|
||||||
|
<span class="whitoutcol linewhitsize proveedoreespes">Importación </span>
|
||||||
|
<div class="whitoutcol whitoutcol">
|
||||||
|
<asp:CheckBox runat="server" ID="chkImportacion"> </asp:CheckBox>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
@@ -4427,7 +4433,7 @@
|
|||||||
<asp:UpdatePanel ID="UpIVA" runat="server" UpdateMode="Conditional">
|
<asp:UpdatePanel ID="UpIVA" runat="server" UpdateMode="Conditional">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-3">
|
<div class="col-md-3" id="divIVA" runat="server" visible="false">
|
||||||
<div class="form-group form-md-line-input input-iconright">
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
<asp:DropDownList ID="DdlIVA" CssClass="form-control select2me" Style="width: 100%; display: inline-block;" runat="server" Enabled="false">
|
<asp:DropDownList ID="DdlIVA" CssClass="form-control select2me" Style="width: 100%; display: inline-block;" runat="server" Enabled="false">
|
||||||
<asp:ListItem Selected="True" Value="1.08">8%</asp:ListItem>
|
<asp:ListItem Selected="True" Value="1.08">8%</asp:ListItem>
|
||||||
@@ -4439,6 +4445,15 @@
|
|||||||
<label for="<%= DdlIVA.ClientID.ToString()%>">% IVA:</label>
|
<label for="<%= DdlIVA.ClientID.ToString()%>">% IVA:</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="col-md-3" id="divImporteImportacion" runat="server" visible="false">
|
||||||
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
|
<asp:TextBox ID="txtImportacion" ClientIDMode="Static" runat="server" CssClass=" form-control " CausesValidation="true"></asp:TextBox>
|
||||||
|
<ajax:FilteredTextBoxExtender ID="FTBEImportacion" runat="server" TargetControlID="txtImportacion" FilterType="Custom, Numbers" ValidChars="." />
|
||||||
|
<%--<asp:TextBox ID="TxtIVAModal" ClientIDMode="Static" Enabled="false" runat="server" CssClass=" form-control " CausesValidation="true" MaxLength="12" ValidationGroup="GprAgregaPS"></asp:TextBox>
|
||||||
|
<ajax:FilteredTextBoxExtender ID="FTBEIVA" runat="server" TargetControlID="TxtIVAModal" FilterType="Custom, Numbers" ValidChars="." />--%>
|
||||||
|
<label for="<%= DdlIVA.ClientID.ToString()%>">Importación:</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
<div class="form-group form-md-line-input input-iconright">
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
<asp:TextBox ID="TxtRetIVAModal" ClientIDMode="Static" Enabled="false" runat="server" CssClass=" form-control " CausesValidation="true" MaxLength="12" ValidationGroup="GprAgregaPS"></asp:TextBox>
|
<asp:TextBox ID="TxtRetIVAModal" ClientIDMode="Static" Enabled="false" runat="server" CssClass=" form-control " CausesValidation="true" MaxLength="12" ValidationGroup="GprAgregaPS"></asp:TextBox>
|
||||||
@@ -6613,9 +6628,19 @@
|
|||||||
$('#LblTotalContrato').text(SubTotal);
|
$('#LblTotalContrato').text(SubTotal);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
function ChkImportacion(chk) {
|
||||||
|
|
||||||
|
if (chk.checked == true) {
|
||||||
|
$('#divIVA').css("display", "none");
|
||||||
|
$('#divImporteImportacion').css("display", "block");
|
||||||
|
debugger;
|
||||||
|
} else {
|
||||||
|
$('#divIVA').css("display", "none");
|
||||||
|
$("#divImporteImportacion").css("display", "block");
|
||||||
|
debugger;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function ValidateCantCon(variable) {
|
function ValidateCantCon(variable) {
|
||||||
|
|
||||||
|
|||||||
@@ -1623,6 +1623,13 @@ Partial Class Compras_Compras
|
|||||||
'End If
|
'End If
|
||||||
|
|
||||||
'RegistraScript("ScrollVentanaAddProducto();")
|
'RegistraScript("ScrollVentanaAddProducto();")
|
||||||
|
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(558) = "1" Then
|
||||||
|
divImportacion.Visible = True
|
||||||
|
chkImportacion.Attributes.Add("onclick", "ChkImportacion(this);")
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#Region "C A R G A S"
|
#Region "C A R G A S"
|
||||||
@@ -3009,6 +3016,14 @@ Partial Class Compras_Compras
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
'Tiene Importacion
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(558) = "1" Then
|
||||||
|
If dr("EsImportacion").ToString = "True" Then
|
||||||
|
chkImportacion.Checked = True
|
||||||
|
Else
|
||||||
|
chkImportacion.Checked = False
|
||||||
|
End If
|
||||||
|
End If
|
||||||
CargaComplementosPago()
|
CargaComplementosPago()
|
||||||
|
|
||||||
Else
|
Else
|
||||||
@@ -4507,6 +4522,7 @@ Partial Class Compras_Compras
|
|||||||
Dim EntregaDirecta = False
|
Dim EntregaDirecta = False
|
||||||
|
|
||||||
Dim ConceptoPoliza As String = String.Format("{0} - {1}{2} - {3}", NombreProveedor, TxtSerie.Text, TxtFolio.Text, TxtDescripcion.Text.Trim)
|
Dim ConceptoPoliza As String = String.Format("{0} - {1}{2} - {3}", NombreProveedor, TxtSerie.Text, TxtFolio.Text, TxtDescripcion.Text.Trim)
|
||||||
|
Dim EsImportacion As Boolean = chkImportacion.Checked 'funcion para empresas llanteras
|
||||||
|
|
||||||
'TIPO CAMBIO MANUAL CON COMPRA NUEVA
|
'TIPO CAMBIO MANUAL CON COMPRA NUEVA
|
||||||
Dim TipoCambioGuardar As Decimal = 1
|
Dim TipoCambioGuardar As Decimal = 1
|
||||||
@@ -4616,7 +4632,7 @@ Partial Class Compras_Compras
|
|||||||
Else
|
Else
|
||||||
CveConceptoContableAlmacen = 205
|
CveConceptoContableAlmacen = 205
|
||||||
End If
|
End If
|
||||||
If OCVinculada And Not (CveImportacion > 0 Or CveFlete > 0) Then
|
If OCVinculada AndAlso DdlOCVinculaInv.visible AndAlso Not (CveImportacion > 0 Or CveFlete > 0) Then
|
||||||
CveConceptoContableAlmacen = DdlOCVinculaInv.SelectedValue.ToEntero
|
CveConceptoContableAlmacen = DdlOCVinculaInv.SelectedValue.ToEntero
|
||||||
End If
|
End If
|
||||||
If UsuarioActual.CveEmpresa.Contiene(72, 80, 140, 141) And Not (CveImportacion > 0 Or CveFlete > 0) Then 'se comento, RMF. 2020.08.19, no le hallo sentido
|
If UsuarioActual.CveEmpresa.Contiene(72, 80, 140, 141) And Not (CveImportacion > 0 Or CveFlete > 0) Then 'se comento, RMF. 2020.08.19, no le hallo sentido
|
||||||
@@ -4671,12 +4687,13 @@ Partial Class Compras_Compras
|
|||||||
|
|
||||||
|
|
||||||
'Compra
|
'Compra
|
||||||
|
|
||||||
If ObjCompras.AddCompra(DdlTipoComprobante.SelectedValue, TxtDescripcion.Text.Trim, TxtSerie.Text.Trim, TxtFolio.Text.Trim, TxtFolioSecundario.Text.Trim, CveProveedor, TxtSubTotal.Text.ToDouble, TxtDescuento.Text.ToDouble,
|
If ObjCompras.AddCompra(DdlTipoComprobante.SelectedValue, TxtDescripcion.Text.Trim, TxtSerie.Text.Trim, TxtFolio.Text.Trim, TxtFolioSecundario.Text.Trim, CveProveedor, TxtSubTotal.Text.ToDouble, TxtDescuento.Text.ToDouble,
|
||||||
LblAmortizacion.Text.ToDouble, TxtIVA.Text.ToDouble, TxtRetIVA.Text.ToDouble, TxtRetISR.Text.ToDouble, TxtIEPS.Text.ToDouble, TxtOtrosImpuestos.Text.ToDouble,
|
LblAmortizacion.Text.ToDouble, TxtIVA.Text.ToDouble, TxtRetIVA.Text.ToDouble, TxtRetISR.Text.ToDouble, TxtIEPS.Text.ToDouble, TxtOtrosImpuestos.Text.ToDouble,
|
||||||
TxtRedondeo.Text.ToDouble, TxtTotal.Text.ToDouble, TxtFecha.Text.Trim.ToDate, DdlMoneda.SelectedValue.ToEntero, TipoCambio, TxtFechaPago.Text.Trim.ToDate, ChkAplicaNotaCredito.Checked, TxtObsFact.Text.Trim, CveEstatusFactura,
|
TxtRedondeo.Text.ToDouble, TxtTotal.Text.ToDouble, TxtFecha.Text.Trim.ToDate, DdlMoneda.SelectedValue.ToEntero, TipoCambio, TxtFechaPago.Text.Trim.ToDate, ChkAplicaNotaCredito.Checked, TxtObsFact.Text.Trim, CveEstatusFactura,
|
||||||
CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, IdPoliza, CveCajaChica:=CveCajaChica, CvePersonal:=CvePersonal, NumeroReembolso:=NumeroReembolso, CveProveedorSucursal:=DdlProveedorSucursal.SelectedValue.ToEntero,
|
CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, IdPoliza, CveCajaChica:=CveCajaChica, CvePersonal:=CvePersonal, NumeroReembolso:=NumeroReembolso, CveProveedorSucursal:=DdlProveedorSucursal.SelectedValue.ToEntero,
|
||||||
AplicoPromocion:=ChkOCPromocion.Checked, PorcentajeIVA:=PorcentajeIVA, CveMetodoPago:=CveMetodoPago, CveRetIVAConcepto:=If(DdlRetIVAConcepto.Items.Count > 0, DdlRetIVAConcepto.SelectedValue.ToEntero, -1), CveConceptoContableAlmacen:=CveConceptoContableAlmacen,
|
AplicoPromocion:=ChkOCPromocion.Checked, PorcentajeIVA:=PorcentajeIVA, CveMetodoPago:=CveMetodoPago, CveRetIVAConcepto:=If(DdlRetIVAConcepto.Items.Count > 0, DdlRetIVAConcepto.SelectedValue.ToEntero, -1), CveConceptoContableAlmacen:=CveConceptoContableAlmacen,
|
||||||
CveRetISRConcepto:=If(DdlRetISRConcepto.Items.Count > 0, DdlRetISRConcepto.SelectedValue.ToEntero, -1), NoDeducible:=EsNoDeducible, CveTipoCompra:=DdlTipoCompra.SelectedValue.ToEntero, TotalOriginal:=TotalOriginal, CveTipoConcepto:=CveTipoConcepto) Then
|
CveRetISRConcepto:=If(DdlRetISRConcepto.Items.Count > 0, DdlRetISRConcepto.SelectedValue.ToEntero, -1), NoDeducible:=EsNoDeducible, CveTipoCompra:=DdlTipoCompra.SelectedValue.ToEntero, TotalOriginal:=TotalOriginal, CveTipoConcepto:=CveTipoConcepto, EsImportacion:=EsImportacion) Then
|
||||||
|
|
||||||
ViewState("CveCompra") = ObjCompras.CveCompra
|
ViewState("CveCompra") = ObjCompras.CveCompra
|
||||||
If ObjCompras.DtResultados.Rows.Count > 0 Then ViewState("CompraFolio") = ObjCompras.DtResultados.Rows(0)("vFolio").ToString
|
If ObjCompras.DtResultados.Rows.Count > 0 Then ViewState("CompraFolio") = ObjCompras.DtResultados.Rows(0)("vFolio").ToString
|
||||||
@@ -5844,8 +5861,11 @@ Partial Class Compras_Compras
|
|||||||
For Each Row As DataRow In DTPlatilla.Rows
|
For Each Row As DataRow In DTPlatilla.Rows
|
||||||
|
|
||||||
Dim CveSubProyectoInsertar As Integer = -1
|
Dim CveSubProyectoInsertar As Integer = -1
|
||||||
|
|
||||||
Dim ConceptoContable As Integer = Row("CveConcepto").ToString.ToEntero
|
Dim ConceptoContable As Integer = Row("CveConcepto").ToString.ToEntero
|
||||||
|
If chkImportacion.Checked And ConceptoContable = 14 Then
|
||||||
|
ConceptoContable = 287
|
||||||
|
|
||||||
|
End If
|
||||||
Dim TipoMovimiento As Boolean = If(Row("TipoMovto").ToString = "True", True, False)
|
Dim TipoMovimiento As Boolean = If(Row("TipoMovto").ToString = "True", True, False)
|
||||||
Dim importeMovimiento As Decimal = 0
|
Dim importeMovimiento As Decimal = 0
|
||||||
Dim IdCtaContable As Integer = 0
|
Dim IdCtaContable As Integer = 0
|
||||||
@@ -6077,6 +6097,21 @@ Partial Class Compras_Compras
|
|||||||
CveCuenta = ObjConta.DtResultados.Rows(0)("IdCuentaIVAxAcreditarSIG").ToString.ToEntero
|
CveCuenta = ObjConta.DtResultados.Rows(0)("IdCuentaIVAxAcreditarSIG").ToString.ToEntero
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
Case 287 'IVA X Acreditar
|
||||||
|
importeMovimiento = importeIVAxAcreditar
|
||||||
|
importeMN = Math.Round(importeMovimiento, 2) * tipoCambioActual * Multiplicador
|
||||||
|
If tipoCambioActual > 1 Then Concepto += $" TC{tipoCambioActual} ${importeMovimiento.FormatoNumero(2)}"
|
||||||
|
PorcentajeImpuesto = PorcentajeIVA
|
||||||
|
IdCtaContable = If(IdCtaIVAXAcreditar > 0, IdCtaIVAXAcreditar, 0)
|
||||||
|
If ObjConta.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) And Not IdCtaContable > 0 Then
|
||||||
|
If ObjConta.DtResultados.Rows.Count > 0 Then
|
||||||
|
IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCtaContable").ToString.ToEntero
|
||||||
|
CveCuenta = ObjConta.DtResultados.Rows(0)("IdCtaContableSIG").ToString.ToEntero
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
Case 25 'IEPS X Acreditar
|
Case 25 'IEPS X Acreditar
|
||||||
If Not DdlTipoComprobante.SelectedValue.Contiene("Ant") Then
|
If Not DdlTipoComprobante.SelectedValue.Contiene("Ant") Then
|
||||||
importeMovimiento = ImporteIEPSxAcreditar
|
importeMovimiento = ImporteIEPSxAcreditar
|
||||||
@@ -6517,7 +6552,7 @@ Partial Class Compras_Compras
|
|||||||
End If
|
End If
|
||||||
Case 6 'Compra
|
Case 6 'Compra
|
||||||
|
|
||||||
Dim AgregaMercanciaInventario As Boolean = UsuarioActual.CveEmpresa.Contiene(1, 72, 80, 119, 140, 141, 152, 159, 160, 161, 162, 163) AndAlso UsuarioActual.Empresa.UsaInventarios AndAlso Not UsuarioActual.Empresa.Funcionalidad(126) = "1"
|
Dim AgregaMercanciaInventario As Boolean = UsuarioActual.CveEmpresa.Contiene(1, 72, 80, 119, 140, 141, 152, 153, 154, 159, 160, 161, 162, 163) AndAlso UsuarioActual.Empresa.UsaInventarios AndAlso Not UsuarioActual.Empresa.Funcionalidad(126) = "1"
|
||||||
|
|
||||||
Dim RegistraConcepto225 As Boolean = UsuarioActual.Empresa.UsaInventarios AndAlso DdlTipoComprobante.SelectedValue.Contiene("NC", "DEV") AndAlso Not UsuarioActual.Empresa.Funcionalidad(126) = "1"
|
Dim RegistraConcepto225 As Boolean = UsuarioActual.Empresa.UsaInventarios AndAlso DdlTipoComprobante.SelectedValue.Contiene("NC", "DEV") AndAlso Not UsuarioActual.Empresa.Funcionalidad(126) = "1"
|
||||||
|
|
||||||
@@ -9167,6 +9202,32 @@ Partial Class Compras_Compras
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
Case 287 'Iva X Acreditar importacion
|
||||||
|
If Not gvr.DataKey("TipoDocto").Contiene("NC", "DEV", "Ant") Then
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(521) = "1" Then
|
||||||
|
If sumaAmortizacion = CompraSaldo Then
|
||||||
|
ImporteMovimiento = TxtIVA.Text.ToDecimal
|
||||||
|
|
||||||
|
If ImporteMovimiento > 0 Then
|
||||||
|
IVACompleto = True
|
||||||
|
End If
|
||||||
|
|
||||||
|
Else
|
||||||
|
ImporteMovimiento = 0
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
ImporteMovimiento = Math.Round(PorcentajePago * TxtIVA.Text.ToDecimal, 2)
|
||||||
|
End If
|
||||||
|
importeMN = ImporteMovimiento * tipoCambio
|
||||||
|
PorcentajeImpuesto = TmpDT.MAX("IVAPorcentaje").ToDecimal
|
||||||
|
IdCtaContable = If(IdCtaIVAXAcreditar > 0, IdCtaIVAXAcreditar, 0)
|
||||||
|
If ObjConta.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) And Not IdCtaContable > 0 Then
|
||||||
|
If ObjConta.DtResultados.Rows.Count > 0 Then
|
||||||
|
IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCuentaIVAxAcreditar").ToString.ToEntero
|
||||||
|
CveCuenta = ObjConta.DtResultados.Rows(0)("IdCuentaIVAxAcreditarSIG").ToString.ToEntero
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End If
|
||||||
Case 19 'Iva Acreditado
|
Case 19 'Iva Acreditado
|
||||||
If Not gvr.DataKey("TipoDocto").Contiene("NC", "DEV", "Ant") Then
|
If Not gvr.DataKey("TipoDocto").Contiene("NC", "DEV", "Ant") Then
|
||||||
If UsuarioActual.Empresa.Funcionalidad(521) = "1" Then
|
If UsuarioActual.Empresa.Funcionalidad(521) = "1" Then
|
||||||
@@ -17757,6 +17818,15 @@ Partial Class Compras_Compras
|
|||||||
|
|
||||||
UpPSS.Update()
|
UpPSS.Update()
|
||||||
RegistraScript(String.Format("$('#{0}').modal('show');", "divAddProducto"))
|
RegistraScript(String.Format("$('#{0}').modal('show');", "divAddProducto"))
|
||||||
|
If chkImportacion.Checked Then
|
||||||
|
divImporteImportacion.Visible = True
|
||||||
|
divIVA.Visible = False
|
||||||
|
|
||||||
|
Else
|
||||||
|
divIVA.Visible = True
|
||||||
|
divImporteImportacion.Visible = False
|
||||||
|
|
||||||
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
Private Sub LimpiaAgregar()
|
Private Sub LimpiaAgregar()
|
||||||
|
|
||||||
@@ -18198,9 +18268,14 @@ Partial Class Compras_Compras
|
|||||||
If PSRow IsNot Nothing Then
|
If PSRow IsNot Nothing Then
|
||||||
SATClavePS = PSRow("SATClavePS").ToString.ToEntero
|
SATClavePS = PSRow("SATClavePS").ToString.ToEntero
|
||||||
End If
|
End If
|
||||||
|
Dim IVA As Double
|
||||||
|
If chkImportacion.Checked Then
|
||||||
|
IVA = (txtImportacion.Text.Trim.ToDouble / (TxtCantidad.Text.Trim.ToDouble * TxtPrecio.Text.Trim.ToDouble))
|
||||||
|
Else
|
||||||
|
IVA = Math.Round(DdlIVA.SelectedValue.ToDouble - 1, 2)
|
||||||
|
End If
|
||||||
AddPS(TxtCantidad.Text.Trim.ToDouble, ddlUM.SelectedValue.ToEntero, ddlUM.SelectedItem.Text, DdlClasificacion.SelectedValue.ToEntero, DdlClasificacion.SelectedItem.Text, DdlPS.SelectedValue.ToEntero, DdlPS.SelectedText, HdnTipoPS.Value.ToEntero,
|
AddPS(TxtCantidad.Text.Trim.ToDouble, ddlUM.SelectedValue.ToEntero, ddlUM.SelectedItem.Text, DdlClasificacion.SelectedValue.ToEntero, DdlClasificacion.SelectedItem.Text, DdlPS.SelectedValue.ToEntero, DdlPS.SelectedText, HdnTipoPS.Value.ToEntero,
|
||||||
DdlSubProyecto.SelectedValue.ToString, DdlSubProyecto.SelectedItem.Text, DdlProyecto.SelectedItem.Text, DdlProyecto.SelectedValue.ToString, TxtObsPS.Text.Trim, TxtPrecio.Text.Trim.ToDouble, Total, Math.Round(DdlIVA.SelectedValue.ToDouble - 1, 2),
|
DdlSubProyecto.SelectedValue.ToString, DdlSubProyecto.SelectedItem.Text, DdlProyecto.SelectedItem.Text, DdlProyecto.SelectedValue.ToString, TxtObsPS.Text.Trim, TxtPrecio.Text.Trim.ToDouble, Total, IVA,
|
||||||
TxtRetIVAModal.Text.ToDouble / 100, TxtRetISRModal.Text.ToDouble / 100, TxtIEPSModal.Text.ToDouble / 100, 0, TxtDescuentoModal.Text.ToDouble, OtrosGastos:=TxtOtrosGastos.Text.ToDouble, CveTipoGasto:=DdlTipoGasto.SelectedValue.ToEntero, TipoGasto:=DdlTipoGasto.SelectedItem.Text,
|
TxtRetIVAModal.Text.ToDouble / 100, TxtRetISRModal.Text.ToDouble / 100, TxtIEPSModal.Text.ToDouble / 100, 0, TxtDescuentoModal.Text.ToDouble, OtrosGastos:=TxtOtrosGastos.Text.ToDouble, CveTipoGasto:=DdlTipoGasto.SelectedValue.ToEntero, TipoGasto:=DdlTipoGasto.SelectedItem.Text,
|
||||||
NoDeducible:=ChkEsNoDeduciblePS.Checked, CveSATPS:=SATClavePS)
|
NoDeducible:=ChkEsNoDeduciblePS.Checked, CveSATPS:=SATClavePS)
|
||||||
|
|
||||||
|
|||||||
@@ -70,13 +70,25 @@
|
|||||||
<asp:UpdatePanel runat="server">
|
<asp:UpdatePanel runat="server">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
<li>
|
<li>
|
||||||
<asp:LinkButton ID="LnkExcel" runat="server" Visible="true" data-target="#DivCargaExcel"><i class="far fa-file-excel" style="font-weight:bold;"></i> Cargar Excel</asp:LinkButton>
|
<asp:LinkButton ID="LnkExcel" runat="server" Visible="true" data-target="#DivCargaExcel"><i class="fa fa-ad-excel" style="font-weight:bold;"></i> Cargar Excel</asp:LinkButton>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<asp:LinkButton ID="LnkComplementoPago" runat="server" Visible="false" OnClick="LnkComplementoPago_Click" Style="color: #686868;"><i class="fa fa-money" style="color:#686868;"></i> Crear Complemento de Pago</asp:LinkButton>
|
<asp:LinkButton ID="LnkComplementoPago" runat="server" Visible="false" OnClick="LnkComplementoPago_Click" Style="color: #686868;"><i class="fa fa-money" style="color:#686868;"></i> Crear Complemento de Pago</asp:LinkButton>
|
||||||
</li>
|
</li>
|
||||||
|
<li>
|
||||||
|
<asp:LinkButton ID="LnkImprimirPDF" runat="server" Visible="false" OnClick="LnkImprimirPDF_Click" Style="color: #686868;"><i class="fa fa-ad-pdf" style="color:#686868;"></i> Imprmir PDF's</asp:LinkButton>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<asp:LinkButton ID="LnkComprobante" runat="server" Visible="false" data-toggle="modal" data-target="#ModalUpload" Style="color: #686868;"><i class="fa fa-ad-pdf" style="color:#686868;"></i> Cargar Comprobante</asp:LinkButton>
|
||||||
|
</li>
|
||||||
|
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
|
<Triggers>
|
||||||
|
<asp:PostBackTrigger ControlID="LnkImprimirPDF" />
|
||||||
|
<asp:PostBackTrigger ControlID="LnkComprobante" />
|
||||||
|
</Triggers>
|
||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
|
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||||
|
|
||||||
@@ -783,7 +795,50 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div id="ModalUpload" class="modal ADS fade" role="dialog">
|
||||||
|
<div class="modal-dialog">
|
||||||
|
|
||||||
|
<!-- Modal content-->
|
||||||
|
<div class="modal-content">
|
||||||
|
<div class="modal-header ">
|
||||||
|
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||||
|
<h4 class="modal-title">Subir Archivo</h4>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="modal-body">
|
||||||
|
<asp:UpdatePanel runat="server" ID="UpCargarArchivo" UpdateMode="Conditional">
|
||||||
|
<ContentTemplate>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-12" style="text-align: center;">
|
||||||
|
<label style="color: red;">Nota: Si ya tiene un comprobante este sera reemplazado</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-12">
|
||||||
|
<asp:TextBox ID="TxtCargarArchivo" CssClass="ADSdropzone hidden" data-maxFile="1" Text="" runat="server"></asp:TextBox>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<%--<div>
|
||||||
|
|
||||||
|
</div>--%>
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<asp:UpdatePanel runat="server">
|
||||||
|
<ContentTemplate>
|
||||||
|
<asp:Button ID="BtnGuardarArchivo" runat="server" ClientIDMode="Static" Text="Guardar" CssClass="btn btn-primary" />
|
||||||
|
<button type="button" class="btn btn-danger" data-dismiss="modal">Cancelar</button>
|
||||||
|
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<script src="/Metronic/assets/global/plugins/dropzone/dropzone.js"></script>
|
<script src="/Metronic/assets/global/plugins/dropzone/dropzone.js"></script>
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||||
|
|||||||
@@ -5,6 +5,9 @@ Imports Extensiones
|
|||||||
Imports System.Linq
|
Imports System.Linq
|
||||||
Imports System.Web.Services
|
Imports System.Web.Services
|
||||||
Imports GemBox.Spreadsheet
|
Imports GemBox.Spreadsheet
|
||||||
|
Imports System.IO
|
||||||
|
Imports iTextSharp.text.pdf
|
||||||
|
Imports Microsoft.Reporting.WebForms
|
||||||
|
|
||||||
Partial Class ContabilidadC_RegPrePoliza
|
Partial Class ContabilidadC_RegPrePoliza
|
||||||
Inherits ClsPaginas
|
Inherits ClsPaginas
|
||||||
@@ -167,12 +170,32 @@ Partial Class ContabilidadC_RegPrePoliza
|
|||||||
ViewState("IdPoliza") = value
|
ViewState("IdPoliza") = value
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
Public Property Tick As String
|
||||||
|
Get
|
||||||
|
Return CType(ViewState("Tick"), String)
|
||||||
|
End Get
|
||||||
|
Set(value As String)
|
||||||
|
ViewState("Tick") = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Property CveIE As Integer
|
||||||
|
Get
|
||||||
|
Return CType(ViewState("CveIE"), Integer)
|
||||||
|
End Get
|
||||||
|
Set(value As Integer)
|
||||||
|
ViewState("CveIE") = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||||
|
|
||||||
If Not Page.IsPostBack Then
|
If Not Page.IsPostBack Then
|
||||||
|
Tick = DateTime.Now.Ticks.ToString
|
||||||
|
|
||||||
If UsuarioActual.Empresa.TipoContabilizacion = 1 OrElse UsuarioActual.Empresa.TipoContabilidad = 1 Then
|
If UsuarioActual.Empresa.TipoContabilizacion = 1 OrElse UsuarioActual.Empresa.TipoContabilidad = 1 Then
|
||||||
Response.Redirect(Request.Url.PathAndQuery.Replace("RegPrePoliza", "RegPrePolizaS"))
|
Response.Redirect(Request.Url.PathAndQuery.Replace("RegPrePoliza", "RegPrePolizaS"))
|
||||||
@@ -265,8 +288,8 @@ Partial Class ContabilidadC_RegPrePoliza
|
|||||||
ViewState("CveSubProyecto") = Request("CveSubProyecto").ToEntero
|
ViewState("CveSubProyecto") = Request("CveSubProyecto").ToEntero
|
||||||
ViewState("CveTurno") = Request("CveTurno").ToEntero
|
ViewState("CveTurno") = Request("CveTurno").ToEntero
|
||||||
|
|
||||||
DdlPlantilla.Items.Add(New ListItem("Pago Nomina", "61"))
|
'DdlPlantilla.Items.Add(New ListItem("Pago Nomina", "61"))
|
||||||
DdlPlantilla.SelectedValue = "61"
|
'DdlPlantilla.SelectedValue = "61"
|
||||||
DdlPlantilla.Enabled = False
|
DdlPlantilla.Enabled = False
|
||||||
DivAgregarConceptos.Visible = False
|
DivAgregarConceptos.Visible = False
|
||||||
|
|
||||||
@@ -485,19 +508,19 @@ Partial Class ContabilidadC_RegPrePoliza
|
|||||||
'Asignamos los Subproyectos
|
'Asignamos los Subproyectos
|
||||||
e.Row.FCDropDownList("DdlSubProyecto").DataSource = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa)
|
e.Row.FCDropDownList("DdlSubProyecto").DataSource = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa)
|
||||||
e.Row.FCDropDownList("DdlSubProyecto").DataBind()
|
e.Row.FCDropDownList("DdlSubProyecto").DataBind()
|
||||||
e.Row.FCDropDownList("DdlSubProyecto").Items.Insert(0, New ListItem(" - ", "-1"))
|
'e.Row.FCDropDownList("DdlSubProyecto").Items.Insert(0, New ListItem(" - ", "-1"))
|
||||||
e.Row.FCDropDownList("DdlSubProyecto").SelectedValueExist(e.Row.DataKey("CveSubProyecto"))
|
e.Row.FCDropDownList("DdlSubProyecto").SelectedValueExist(e.Row.DataKey("CveSubProyecto"))
|
||||||
|
|
||||||
'Asignamos los Tipos de Gasto
|
'Asignamos los Tipos de Gasto
|
||||||
e.Row.FCDropDownList("DdlTipoGasto").DataSource = GlobalDTTiposGastos(UsuarioActual.CveEmpresa)
|
e.Row.FCDropDownList("DdlTipoGasto").DataSource = GlobalDTTiposGastos(UsuarioActual.CveEmpresa)
|
||||||
e.Row.FCDropDownList("DdlTipoGasto").DataBind()
|
e.Row.FCDropDownList("DdlTipoGasto").DataBind()
|
||||||
e.Row.FCDropDownList("DdlTipoGasto").Items.Insert(0, New ListItem("Sin Asignar", "-1"))
|
'e.Row.FCDropDownList("DdlTipoGasto").Items.Insert(0, New ListItem("Sin Asignar", "-1"))
|
||||||
e.Row.FCDropDownList("DdlTipoGasto").SelectedValueExist(e.Row.DataKey("CveTipoGasto"))
|
e.Row.FCDropDownList("DdlTipoGasto").SelectedValueExist(e.Row.DataKey("CveTipoGasto"))
|
||||||
|
|
||||||
'ASignamos las CuentasContables
|
'ASignamos las CuentasContables
|
||||||
e.Row.FCDropDownList("DdlCtaContable").DataSource = Session("DtCuentas")
|
e.Row.FCDropDownList("DdlCtaContable").DataSource = Session("DtCuentas")
|
||||||
e.Row.FCDropDownList("DdlCtaContable").DataBind()
|
e.Row.FCDropDownList("DdlCtaContable").DataBind()
|
||||||
e.Row.FCDropDownList("DdlCtaContable").Items.Insert(0, New ListItem("Sin Asignar", "0"))
|
'e.Row.FCDropDownList("DdlCtaContable").Items.Insert(0, New ListItem("Sin Asignar", "0"))
|
||||||
e.Row.FCDropDownList("DdlCtaContable").SelectedValueExist(e.Row.DataKey("IdCtaContable"))
|
e.Row.FCDropDownList("DdlCtaContable").SelectedValueExist(e.Row.DataKey("IdCtaContable"))
|
||||||
|
|
||||||
TxtTotalCargos.Text = (TxtTotalCargos.Text.ToDouble + e.Row.FCTextBox("TxtCargo").Text.ToDouble).ToString.FormatoNumero
|
TxtTotalCargos.Text = (TxtTotalCargos.Text.ToDouble + e.Row.FCTextBox("TxtCargo").Text.ToDouble).ToString.FormatoNumero
|
||||||
@@ -511,6 +534,12 @@ Partial Class ContabilidadC_RegPrePoliza
|
|||||||
If CveConceptoContable.Contiene(68) Then e.Row.FCHyperLink("HlReferencia").NavigateUrl = String.Format("/Inventarios/EntradasSalidas.aspx?CveMovimiento={0}", e.Row.DBCampo("CveMovimientoAlmacen"))
|
If CveConceptoContable.Contiene(68) Then e.Row.FCHyperLink("HlReferencia").NavigateUrl = String.Format("/Inventarios/EntradasSalidas.aspx?CveMovimiento={0}", e.Row.DBCampo("CveMovimientoAlmacen"))
|
||||||
If CveConceptoContable.Contiene(30, 204) Then e.Row.FCHyperLink("HlReferencia").NavigateUrl = String.Format("/Bancos/IE.aspx?CveIE={0}", e.Row.DBCampo("CveIE"))
|
If CveConceptoContable.Contiene(30, 204) Then e.Row.FCHyperLink("HlReferencia").NavigateUrl = String.Format("/Bancos/IE.aspx?CveIE={0}", e.Row.DBCampo("CveIE"))
|
||||||
|
|
||||||
|
If CveConceptoContable.Contiene(30) AndAlso UsuarioActual.CveRol = 1 Then
|
||||||
|
LnkImprimirPDF.Visible = True
|
||||||
|
LnkComprobante.Visible = True
|
||||||
|
CveIE = e.Row.DBCampo("CveIE").ToString.ToEntero
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
'e.Row.FCHyperLink("HlReferencia").NavigateUrl = CveConceptoContable
|
'e.Row.FCHyperLink("HlReferencia").NavigateUrl = CveConceptoContable
|
||||||
|
|
||||||
@@ -1724,6 +1753,235 @@ Partial Class ContabilidadC_RegPrePoliza
|
|||||||
Protected Sub LnkComplementoPago_Click(sender As Object, e As EventArgs)
|
Protected Sub LnkComplementoPago_Click(sender As Object, e As EventArgs)
|
||||||
GeneraTimbre(CvePrePoliza)
|
GeneraTimbre(CvePrePoliza)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Protected Sub LnkImprimirPDF_Click(sender As Object, e As EventArgs)
|
||||||
|
Dim pdf() As Byte
|
||||||
|
Dim filtro() As String = {"CveCompra", "CveIE", "CveConceptoContable"}
|
||||||
|
Dim filtroComplemento() As String = {"CveIE"}
|
||||||
|
Dim Pathpdf As New List(Of String)
|
||||||
|
Dim nombre As String = "recibo"
|
||||||
|
Dim pdfs = New List(Of Byte())
|
||||||
|
Dim Path As String
|
||||||
|
Dim Factura() As Byte
|
||||||
|
Dim dt As DataTable = DtMovimientos.FiltraParametros("", "", filtro)
|
||||||
|
Dim ObjCompra As New ClsCompras
|
||||||
|
Dim ObjIE As New ClsBancos()
|
||||||
|
Dim i As Integer = 0
|
||||||
|
Dim pathPoliza As String
|
||||||
|
Try
|
||||||
|
|
||||||
|
|
||||||
|
Path = ImprimirPolizaPDF(IdPoliza)
|
||||||
|
pathPoliza = Path
|
||||||
|
If File.Exists(Path) Then
|
||||||
|
Pathpdf.Add(Path)
|
||||||
|
End If
|
||||||
|
|
||||||
|
For Each Row As DataRow In dt.Rows
|
||||||
|
If Row("CveConceptoContable").ToString.ToEntero = 30 Then
|
||||||
|
If Row("CveIE").ToString.ToEntero > 0 Then
|
||||||
|
If ObjIE.GetBancosIE(Row("CveIE").ToString.ToEntero, UsuarioActual.CveEmpresa) Then
|
||||||
|
If ObjIE.DtResultados.Rows.Count > 0 Then
|
||||||
|
Path = String.Format("{0}IE\{1}", UsuarioActual.Empresa.Ruta, ObjIE.Comprobante.ToString)
|
||||||
|
If File.Exists(Path) Then
|
||||||
|
Dim formato As String = System.IO.Path.GetExtension(Path)
|
||||||
|
If formato.ToLower.Contiene(".jpg", ".png", ".jpeg") Then
|
||||||
|
Dim ComprobantePDF As String = String.Format("{0}\{1}\comprobante.pdf", AppDomain.CurrentDomain.BaseDirectory, Tick)
|
||||||
|
Using crea_archivo = New iTextSharp.text.Document
|
||||||
|
PdfWriter.GetInstance(crea_archivo, New FileStream(ComprobantePDF, FileMode.Create))
|
||||||
|
crea_archivo.Open()
|
||||||
|
Dim image As iTextSharp.text.Image = iTextSharp.text.Image.GetInstance(Path)
|
||||||
|
crea_archivo.Add(image)
|
||||||
|
End Using
|
||||||
|
Pathpdf.Add(ComprobantePDF)
|
||||||
|
|
||||||
|
Else
|
||||||
|
Pathpdf.Add(Path)
|
||||||
|
End If
|
||||||
|
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
If Row("CveConceptoContable").ToString.ToEntero.Contiene(17, 309, 312) Then
|
||||||
|
If ObjCompra.GetCompras(Row("CveCompra").ToString.ToEntero, "-1", "-1", -1, -1, UsuarioActual.CveEmpresa) Then
|
||||||
|
If ObjCompra.DtResultados IsNot Nothing AndAlso ObjCompra.DtResultados.Rows.Count > 0 Then
|
||||||
|
Dim dr As DataRow = ObjCompra.DtResultados.Rows(0)
|
||||||
|
Dim RFC As String = dr("RFC").ToString
|
||||||
|
Dim CveFactura As String = dr("CveFactura").ToString
|
||||||
|
Path = String.Format("{0}Compras\{1}\{2}.pdf", UsuarioActual.Empresa.Ruta, RFC, CveFactura)
|
||||||
|
If File.Exists(Path) Then
|
||||||
|
|
||||||
|
Pathpdf.Add(Path)
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
|
||||||
|
dt = DtMovimientos.FiltraParametros("", "", filtroComplemento)
|
||||||
|
For Each Row As DataRow In dt.Rows
|
||||||
|
If ObjCompra.GetCompraComplementoPago(-1, UsuarioActual.CveEmpresa, Row("CveIE").ToString.ToEntero) Then
|
||||||
|
If ObjCompra.DtResultados IsNot Nothing AndAlso ObjCompra.DtResultados.Rows.Count > 0 Then
|
||||||
|
Dim dr As DataRow = ObjCompra.DtResultados.Rows(0)
|
||||||
|
Dim RFC As String = dr("RFCde").ToString
|
||||||
|
Dim CveFactura As String = dr("CveFactura").ToString
|
||||||
|
If CveFactura <> "" Then
|
||||||
|
Path = String.Format("{0}Compras\{1}\{2}.pdf", UsuarioActual.Empresa.Ruta, RFC, CveFactura)
|
||||||
|
If File.Exists(Path) Then
|
||||||
|
Pathpdf.Add(Path)
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
|
||||||
|
MergePdfFiles(Pathpdf.ToArray)
|
||||||
|
If File.Exists(pathPoliza) Then
|
||||||
|
Directory.Delete(String.Format("{0}{1}", AppDomain.CurrentDomain.BaseDirectory, Tick), True)
|
||||||
|
End If
|
||||||
|
|
||||||
|
Catch ex As Exception
|
||||||
|
Alert("Error")
|
||||||
|
End Try
|
||||||
|
End Sub
|
||||||
|
Private Function ImprimirPolizaPDF(IdPoliza As Integer) As String
|
||||||
|
Dim ObjConta As New ClsContabilidad
|
||||||
|
'Dim ObjPoliza As New ClsContPAQi(UsuarioActual.Empresa)
|
||||||
|
|
||||||
|
Dim Archivo As New System.IO.FileInfo(String.Format("{0}Formatos/Polizas.rdlc", UsuarioActual.Empresa.Ruta))
|
||||||
|
Dim params As New List(Of ReportParameter)
|
||||||
|
Dim Bytes As Byte() = Nothing
|
||||||
|
|
||||||
|
|
||||||
|
'If ObjPoliza.GetPoliza(IdPoliza, -1, -1, -1, -1) AndAlso ObjPoliza.DtResultados.Rows.Count > 0 Then
|
||||||
|
If ObjConta.GetPrePolizasDetalle(CvePrePoliza) AndAlso ObjConta.DtResultados.Rows.Count > 0 Then
|
||||||
|
Try
|
||||||
|
|
||||||
|
|
||||||
|
Dim dtVC As DataTable
|
||||||
|
Dim dr As DataRow
|
||||||
|
dtVC = ObjConta.DtResultados
|
||||||
|
dr = dtVC.Rows(0)
|
||||||
|
Dim ruta As String = ""
|
||||||
|
|
||||||
|
params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa))
|
||||||
|
params.Add(New ReportParameter("TipoPoliza", dr("CveTipoPoliza").ToString))
|
||||||
|
params.Add(New ReportParameter("Finicio", dr("Fecha").ToString.ToDate.ToShortDateString))
|
||||||
|
params.Add(New ReportParameter("FFin", dr("Fecha").ToString.ToDate.ToShortDateString))
|
||||||
|
params.Add(New ReportParameter("Fecha", dr("Fecha").ToString.ToDate.ToShortDateString))
|
||||||
|
'params.Add(New ReportParameter("Nombre", dr("Cuenta").ToString))
|
||||||
|
'params.Add(New ReportParameter("Cuenta", dr("Codigo").ToString))
|
||||||
|
params.Add(New ReportParameter("Numero", dr("FolioPoliza").ToString))
|
||||||
|
params.Add(New ReportParameter("Moneda", ""))
|
||||||
|
params.Add(New ReportParameter("CodigoPostal", ""))
|
||||||
|
|
||||||
|
If UsuarioActual.CveEmpresa = 119 Then
|
||||||
|
params.Add(New ReportParameter("UsuarioRegistro", GlobalDTUsuarios(dr("CveUsuario").ToString.ToEntero).FiltroPrimeroValor("Nombre")))
|
||||||
|
End If
|
||||||
|
|
||||||
|
If Archivo.Exists Then
|
||||||
|
ruta = UsuarioActual.Empresa.Ruta & "Formatos/Polizas.rdlc"
|
||||||
|
Else
|
||||||
|
ruta = "Empresas/Grales/Formatos/Polizas.rdlc"
|
||||||
|
End If
|
||||||
|
|
||||||
|
Bytes = StreamPDF(ruta, dtVC, params, "ppoliza")
|
||||||
|
|
||||||
|
If Not File.Exists(String.Format("{0}{1}\{2}.pdf", AppDomain.CurrentDomain.BaseDirectory, Tick, IdPoliza.ToString)) Then
|
||||||
|
DirectoryExistsCreate(String.Format("{0}{1}", AppDomain.CurrentDomain.BaseDirectory, Tick))
|
||||||
|
File.WriteAllBytes(String.Format("{0}\{1}\{2}.pdf", AppDomain.CurrentDomain.BaseDirectory, Tick, IdPoliza.ToString), Bytes)
|
||||||
|
End If
|
||||||
|
|
||||||
|
Return String.Format("{0}\{1}\{2}.pdf", AppDomain.CurrentDomain.BaseDirectory, Tick, IdPoliza.ToString)
|
||||||
|
Catch ex As Exception
|
||||||
|
Alert("ggg")
|
||||||
|
End Try
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
ObjConta.Dispose()
|
||||||
|
|
||||||
|
End Function
|
||||||
|
Private Sub MergePdfFiles(ByVal pdfFiles() As String)
|
||||||
|
Dim result As Boolean = False
|
||||||
|
Dim pdfCount As Integer = 0
|
||||||
|
Dim f As Integer = 0
|
||||||
|
Dim fileName As String
|
||||||
|
Dim reader As iTextSharp.text.pdf.PdfReader = Nothing
|
||||||
|
Dim pageCount As Integer = 0
|
||||||
|
Dim pdfDoc As iTextSharp.text.Document = Nothing
|
||||||
|
Dim writer As PdfWriter = Nothing
|
||||||
|
Dim cb As PdfContentByte = Nothing
|
||||||
|
|
||||||
|
Dim page As PdfImportedPage = Nothing
|
||||||
|
Dim rotation As Integer = 0
|
||||||
|
|
||||||
|
|
||||||
|
Try
|
||||||
|
pdfCount = pdfFiles.Length
|
||||||
|
If pdfCount > 0 Then
|
||||||
|
fileName = pdfFiles(f)
|
||||||
|
reader = New iTextSharp.text.pdf.PdfReader(fileName)
|
||||||
|
pageCount = reader.NumberOfPages
|
||||||
|
pdfDoc = New iTextSharp.text.Document(reader.GetPageSizeWithRotation(1), 18, 18, 18, 18)
|
||||||
|
writer = PdfWriter.GetInstance(pdfDoc, New FileStream(String.Format("{0}\{1}\Salida.pdf", AppDomain.CurrentDomain.BaseDirectory, Tick), FileMode.Create))
|
||||||
|
|
||||||
|
With pdfDoc
|
||||||
|
.Open()
|
||||||
|
End With
|
||||||
|
cb = writer.DirectContent
|
||||||
|
While f < pdfCount
|
||||||
|
Dim i As Integer = 0
|
||||||
|
While i < pageCount
|
||||||
|
i += 1
|
||||||
|
pdfDoc.SetPageSize(reader.GetPageSizeWithRotation(i))
|
||||||
|
pdfDoc.NewPage()
|
||||||
|
page = writer.GetImportedPage(reader, i)
|
||||||
|
rotation = reader.GetPageRotation(i)
|
||||||
|
If rotation = 90 Then
|
||||||
|
cb.AddTemplate(page, 0, -1.0F, 1.0F, 0, 0, reader.GetPageSizeWithRotation(i).Height)
|
||||||
|
ElseIf rotation = 270 Then
|
||||||
|
cb.AddTemplate(page, 0, 1.0F, -1.0F, 0, reader.GetPageSizeWithRotation(i).Width + 60, -30)
|
||||||
|
Else
|
||||||
|
cb.AddTemplate(page, 1.0F, 0, 0, 1.0F, 0, 0)
|
||||||
|
End If
|
||||||
|
End While
|
||||||
|
f += 1
|
||||||
|
If f < pdfCount Then
|
||||||
|
fileName = pdfFiles(f)
|
||||||
|
reader = New iTextSharp.text.pdf.PdfReader(fileName)
|
||||||
|
pageCount = reader.NumberOfPages
|
||||||
|
End If
|
||||||
|
End While
|
||||||
|
|
||||||
|
|
||||||
|
pdfDoc.Close()
|
||||||
|
|
||||||
|
Dim Archivo As New System.IO.FileInfo(String.Format("{0}\{1}\Salida.pdf", AppDomain.CurrentDomain.BaseDirectory, Tick))
|
||||||
|
|
||||||
|
If Archivo.Exists Then
|
||||||
|
HttpContext.Current.Response.Clear()
|
||||||
|
HttpContext.Current.Response.ClearContent()
|
||||||
|
HttpContext.Current.Response.ContentType = "application/octet-stream"
|
||||||
|
HttpContext.Current.Response.AppendHeader("Content-disposition", String.Format("attachment; filename={0}", Archivo.Name))
|
||||||
|
HttpContext.Current.Response.AddHeader("Content-Length", Archivo.Length.ToString())
|
||||||
|
HttpContext.Current.Response.TransmitFile(String.Format("{0}\{1}\Salida.pdf", AppDomain.CurrentDomain.BaseDirectory, Tick))
|
||||||
|
Response.Flush() ' send it to the client to download
|
||||||
|
HttpContext.Current.Response.SuppressContent = True
|
||||||
|
HttpContext.Current.ApplicationInstance.CompleteRequest()
|
||||||
|
|
||||||
|
End If
|
||||||
|
result = True
|
||||||
|
End If
|
||||||
|
Catch ex As Exception
|
||||||
|
End Try
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
|
|
||||||
@@ -1945,7 +2203,7 @@ Partial Class ContabilidadC_RegPrePoliza
|
|||||||
Next
|
Next
|
||||||
If Not TieneError Then
|
If Not TieneError Then
|
||||||
ObjConta.Commit()
|
ObjConta.Commit()
|
||||||
Alert(String.Format("<br/><br/>Prepóliza: <b><a href = ""/Contabilidad/RegPrePoliza.aspx?CvePrePoliza={0}"" class=""texto"" target=""_blank"" >{1}</a></b>", CvePrePoliza, ObjConta.ContaFolio))
|
Alert(String.Format("<br/><br/>Prepóliza: <b><a href=""/Contabilidad/RegPrePoliza.aspx?CvePrePoliza={0}"" class=""texto"" target=""_blank"" >{1}</a></b>", CvePrePoliza, ObjConta.ContaFolio))
|
||||||
|
|
||||||
Alert($"Se agregó la póliza {ObjConta.ContaFolio}")
|
Alert($"Se agregó la póliza {ObjConta.ContaFolio}")
|
||||||
|
|
||||||
@@ -2014,5 +2272,41 @@ Partial Class ContabilidadC_RegPrePoliza
|
|||||||
Return dataTable
|
Return dataTable
|
||||||
|
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
Protected Sub BtnGuardarArchivo_Click(sender As Object, e As EventArgs) Handles BtnGuardarArchivo.Click
|
||||||
|
Dim ObjIE As New ClsBancos
|
||||||
|
Dim Comprobante As String = ""
|
||||||
|
|
||||||
|
Dim Filesgral As List(Of Archivo) = TxtCargarArchivo.getfiles().Archivos
|
||||||
|
If Filesgral.Count > 0 Then
|
||||||
|
Dim fileItem As Archivo = Filesgral(0)
|
||||||
|
Dim Path As String = HttpContext.Current.Request.ApplicationPath
|
||||||
|
Comprobante = IO.Path.GetExtension(String.Format("{0}Temp\{1}", AppDomain.CurrentDomain.BaseDirectory, fileItem.filename)).Replace(".", "")
|
||||||
|
|
||||||
|
Path = Extensiones.DirectorioBaseEmpresas
|
||||||
|
Path += String.Format("Empresas/{0}/IE", UsuarioActual.CveEmpresa)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
If Not Directory.Exists(Path) Then
|
||||||
|
Directory.CreateDirectory(Path)
|
||||||
|
End If
|
||||||
|
Path += $"/{CveIE}.{Comprobante}"
|
||||||
|
If File.Exists(Path) Then
|
||||||
|
File.Delete(Path)
|
||||||
|
End If
|
||||||
|
My.Computer.FileSystem.MoveFile(fileItem.FileUrl, Path)
|
||||||
|
End If
|
||||||
|
TxtCargarArchivo.Text = ""
|
||||||
|
RegistraScript("$('#ModalUpload').modal('hide')", "hidemodal1")
|
||||||
|
|
||||||
|
If ObjIE.UpdateComprobanteIE(Comprobante.Replace("."c, ""), CveIE) Then
|
||||||
|
Alert("El Comprobante se guardo exitosamente.", TipoMensaje.MsgInformacion)
|
||||||
|
End If
|
||||||
|
|
||||||
|
ObjIE.Dispose()
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|
||||||
|
|||||||
@@ -67,9 +67,17 @@
|
|||||||
<asp:Label ID="LblEncabezado" runat="server" Text=" Registro de Póliza"></asp:Label>
|
<asp:Label ID="LblEncabezado" runat="server" Text=" Registro de Póliza"></asp:Label>
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||||
<li>
|
<asp:UpdatePanel runat="server">
|
||||||
<asp:LinkButton ID="LnkComplementoPago" runat="server" Visible="false" OnClick="LnkComplementoPago_Click" Style="color: #686868;"><i class="fa fa-money" style="color:#686868;"></i> Crear Complemento de Pago</asp:LinkButton>
|
<ContentTemplate>
|
||||||
</li>
|
<li>
|
||||||
|
<asp:LinkButton ID="LnkExcel" runat="server" Visible="true" data-target="#DivCargaExcel"><i class="far fa-file-excel" style="font-weight:bold;"></i> Cargar Excel</asp:LinkButton>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<asp:LinkButton ID="LnkComplementoPago" runat="server" Visible="false" OnClick="LnkComplementoPago_Click" Style="color: #686868;"><i class="fa fa-money" style="color:#686868;"></i> Crear Complemento de Pago</asp:LinkButton>
|
||||||
|
</li>
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
|
||||||
<asp:UpdatePanel runat="server">
|
<asp:UpdatePanel runat="server">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
<li>
|
<li>
|
||||||
@@ -779,6 +787,54 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div id="DivCargaExcel" class="modal ADS fade" role="dialog">
|
||||||
|
<div class="modal-dialog">
|
||||||
|
<!-- Modal content-->
|
||||||
|
<div class="modal-content">
|
||||||
|
<div class="modal-header ">
|
||||||
|
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||||
|
<h4 class="modal-title">Agregar Excel</h4>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body">
|
||||||
|
<div class="row">
|
||||||
|
<label class="col-md-2 truncate" style="text-align: right;">Plantilla:</label>
|
||||||
|
<div class="col-md-10">
|
||||||
|
<asp:DropDownList ID="DdlPlantilla2" runat="server" DataValueField="CvePlantillaPoliza" DataTextField="PlantillaPoliza" class="select2me" Width="100%"></asp:DropDownList>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-12">
|
||||||
|
<h3>Arraste o haga click para subir el archivo Excel</h3>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-11" style="margin-left: 30px; margin-right: 30px; margin-bottom: 10px;">
|
||||||
|
<asp:TextBox ID="TxtExcel" CssClass="ADSdropzone hidden" Text="" data-maxFile="1" runat="server"></asp:TextBox>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-3" style="text-align: left">
|
||||||
|
<asp:UpdatePanel ID="UpDescargar" runat="server" UpdateMode="Conditional">
|
||||||
|
<ContentTemplate>
|
||||||
|
<asp:Button ID="BtnDescargar" runat="server" CssClass="btn btn-warning" Text="Descargar Formato" />
|
||||||
|
</ContentTemplate>
|
||||||
|
<Triggers>
|
||||||
|
<asp:PostBackTrigger ControlID="BtnDescargar" />
|
||||||
|
</Triggers>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="col-md-9" style="text-align: right">
|
||||||
|
<asp:Button ID="BtnCargaExcel" runat="server" CssClass="btn btn-success" Text="Aceptar"></asp:Button>
|
||||||
|
<button type="button" class="btn btn-danger" data-dismiss="modal">Cancelar</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<script src="/Metronic/assets/global/plugins/dropzone/dropzone.js"></script>
|
<script src="/Metronic/assets/global/plugins/dropzone/dropzone.js"></script>
|
||||||
|
|||||||
@@ -4,11 +4,12 @@ Imports System.Data
|
|||||||
Imports Extensiones
|
Imports Extensiones
|
||||||
Imports System.Linq
|
Imports System.Linq
|
||||||
Imports System.Web.Services
|
Imports System.Web.Services
|
||||||
|
Imports GemBox.Spreadsheet
|
||||||
|
|
||||||
Partial Class ContabilidadC_RegPrePolizaS
|
Partial Class ContabilidadC_RegPrePolizaS
|
||||||
Inherits ClsPaginas
|
Inherits ClsPaginas
|
||||||
|
|
||||||
|
|
||||||
#Region "Propiedades"
|
#Region "Propiedades"
|
||||||
Public Property ArregloMovs As ArrayList
|
Public Property ArregloMovs As ArrayList
|
||||||
Get
|
Get
|
||||||
@@ -157,9 +158,9 @@ Partial Class ContabilidadC_RegPrePolizaS
|
|||||||
Set(value As Integer)
|
Set(value As Integer)
|
||||||
ViewState("IndiceGrid") = value
|
ViewState("IndiceGrid") = value
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||||
|
|
||||||
If Not Page.IsPostBack Then
|
If Not Page.IsPostBack Then
|
||||||
@@ -483,16 +484,29 @@ Partial Class ContabilidadC_RegPrePolizaS
|
|||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub CargaPlantillas(TipoPlantilla As Integer)
|
Private Sub CargaPlantillas(TipoPlantilla As Integer)
|
||||||
|
|
||||||
'GvPlantillas.DataSource = GlobalDTContaPlantillasPolizas(UsuarioActual.CveEmpresa, TipoPlantilla)
|
'GvPlantillas.DataSource = GlobalDTContaPlantillasPolizas(UsuarioActual.CveEmpresa, TipoPlantilla)
|
||||||
'GvPlantillas.DataBind()
|
'GvPlantillas.DataBind()
|
||||||
|
|
||||||
DdlPlantilla.DataSource = GlobalDTContaPlantillasPolizas(UsuarioActual.CveEmpresa, TipoPlantilla)
|
If UsuarioActual.CveEmpresa.Contiene(120) Then
|
||||||
DdlPlantilla.DataBind()
|
DdlPlantilla.DataSource = GlobalDTContaPlantillasPolizas(UsuarioActual.CveEmpresa, -1)
|
||||||
DdlPlantilla.Items.Insert(0, New ListItem("Plantilla Personalizada", "53"))
|
DdlPlantilla2.DataSource = GlobalDTContaPlantillasPolizas(UsuarioActual.CveEmpresa, -1)
|
||||||
End Sub
|
|
||||||
|
Else
|
||||||
|
DdlPlantilla.DataSource = GlobalDTContaPlantillasPolizas(UsuarioActual.CveEmpresa, TipoPlantilla)
|
||||||
|
DdlPlantilla2.DataSource = GlobalDTContaPlantillasPolizas(UsuarioActual.CveEmpresa, TipoPlantilla)
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
DdlPlantilla.DataBind()
|
||||||
|
DdlPlantilla.Items.Insert(0, New ListItem("Plantilla Personalizada", "53"))
|
||||||
|
|
||||||
|
DdlPlantilla2.DataBind()
|
||||||
|
DdlPlantilla2.Items.Insert(0, New ListItem("Plantilla Personalizada", "53"))
|
||||||
|
End Sub
|
||||||
|
|
||||||
Private Sub CargaConceptos()
|
Private Sub CargaConceptos()
|
||||||
DdlConceptosContables.DataSource = GlobalDTContaConceptosContables(-1)
|
DdlConceptosContables.DataSource = GlobalDTContaConceptosContables(-1)
|
||||||
DdlConceptosContables.DataBind()
|
DdlConceptosContables.DataBind()
|
||||||
@@ -543,8 +557,9 @@ Partial Class ContabilidadC_RegPrePolizaS
|
|||||||
|
|
||||||
Private Sub CargaCuentasContables()
|
Private Sub CargaCuentasContables()
|
||||||
Dim ObjConta As New ClsContabilidad
|
Dim ObjConta As New ClsContabilidad
|
||||||
If ObjConta.GetCuentas(-1, "-1", -1, UsuarioActual.CveEmpresa) Then
|
If ObjConta.GetCuentas(-1, "-1", 1, UsuarioActual.CveEmpresa) Then
|
||||||
DdlCtaContable.DataSource = ObjConta.DtResultados
|
DdlCtaContable.DataSource = ObjConta.DtResultados
|
||||||
|
DtCuentasContables = ObjConta.DtResultados
|
||||||
End If
|
End If
|
||||||
ObjConta.Dispose()
|
ObjConta.Dispose()
|
||||||
DdlCtaContable.DataBind()
|
DdlCtaContable.DataBind()
|
||||||
@@ -1338,7 +1353,7 @@ Partial Class ContabilidadC_RegPrePolizaS
|
|||||||
dr("IdCuenta") = DdlCtaContable.SelectedValue
|
dr("IdCuenta") = DdlCtaContable.SelectedValue
|
||||||
|
|
||||||
If DdlCtaContable.SelectedValue.ToEntero > 0 Then
|
If DdlCtaContable.SelectedValue.ToEntero > 0 Then
|
||||||
Dim drr As DataRow = DtCuentasContables.FiltroPrimero(String.Format("Id={0}", DdlCtaContable.SelectedValue))
|
Dim drr As DataRow = DtCuentasContables.FiltroPrimero(String.Format("CveCuenta={0}", DdlCtaContable.SelectedValue))
|
||||||
If drr IsNot Nothing Then
|
If drr IsNot Nothing Then
|
||||||
CodigoCuenta = drr("CuentaFormato").ToString()
|
CodigoCuenta = drr("CuentaFormato").ToString()
|
||||||
NombreCuenta = drr("Nombre").ToString()
|
NombreCuenta = drr("Nombre").ToString()
|
||||||
@@ -1406,7 +1421,7 @@ Partial Class ContabilidadC_RegPrePolizaS
|
|||||||
dr("IdCuenta") = DdlCtaContable.SelectedValue
|
dr("IdCuenta") = DdlCtaContable.SelectedValue
|
||||||
|
|
||||||
If DdlCtaContable.SelectedValue.ToEntero > 0 Then
|
If DdlCtaContable.SelectedValue.ToEntero > 0 Then
|
||||||
Dim drr As DataRow = DtCuentasContables.FiltroPrimero(String.Format("Id={0}", DdlCtaContable.SelectedValue))
|
Dim drr As DataRow = DtCuentasContables.FiltroPrimero(String.Format("CveCuenta={0}", DdlCtaContable.SelectedValue))
|
||||||
If drr IsNot Nothing Then
|
If drr IsNot Nothing Then
|
||||||
CodigoCuenta = drr("CuentaFormato").ToString()
|
CodigoCuenta = drr("CuentaFormato").ToString()
|
||||||
NombreCuenta = drr("Nombre").ToString()
|
NombreCuenta = drr("Nombre").ToString()
|
||||||
@@ -1457,8 +1472,8 @@ Partial Class ContabilidadC_RegPrePolizaS
|
|||||||
TxtAbono.Text = ""
|
TxtAbono.Text = ""
|
||||||
TxtReferencia.Text = ""
|
TxtReferencia.Text = ""
|
||||||
TxtDescripcion.Text = ""
|
TxtDescripcion.Text = ""
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#Region "PESTAÑA INFORMACION GENERAL DE BANCO IE"
|
#Region "PESTAÑA INFORMACION GENERAL DE BANCO IE"
|
||||||
Public Sub Bancos_Click(sender As Object, e As EventArgs)
|
Public Sub Bancos_Click(sender As Object, e As EventArgs)
|
||||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||||
@@ -1510,9 +1525,9 @@ Partial Class ContabilidadC_RegPrePolizaS
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
ObjContabilidad.Dispose()
|
ObjContabilidad.Dispose()
|
||||||
End Sub
|
End Sub
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
Protected Sub DdlTipoGasto_SelectedIndexChanged(sender As Object, e As EventArgs)
|
Protected Sub DdlTipoGasto_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||||
If UpPrePoliza.Visible Then
|
If UpPrePoliza.Visible Then
|
||||||
For Each Gvr As GridViewRow In GvPrePoliza.Rows
|
For Each Gvr As GridViewRow In GvPrePoliza.Rows
|
||||||
@@ -1669,11 +1684,11 @@ Partial Class ContabilidadC_RegPrePolizaS
|
|||||||
ObjConta.Dispose()
|
ObjConta.Dispose()
|
||||||
|
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
#Region "COMPLEMENTO DE PAGO"
|
#Region "COMPLEMENTO DE PAGO"
|
||||||
|
|
||||||
Private Sub GeneraTimbre(CvePrePoliza As Integer)
|
Private Sub GeneraTimbre(CvePrePoliza As Integer)
|
||||||
Dim Str As New StringBuilder
|
Dim Str As New StringBuilder
|
||||||
Dim Banco As New ClsBancos
|
Dim Banco As New ClsBancos
|
||||||
@@ -1730,10 +1745,211 @@ Partial Class ContabilidadC_RegPrePolizaS
|
|||||||
|
|
||||||
Protected Sub LnkComplementoPago_Click(sender As Object, e As EventArgs)
|
Protected Sub LnkComplementoPago_Click(sender As Object, e As EventArgs)
|
||||||
GeneraTimbre(CvePrePoliza)
|
GeneraTimbre(CvePrePoliza)
|
||||||
End Sub
|
End Sub
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#Region "E X C E L"
|
||||||
|
|
||||||
|
|
||||||
|
Private Sub LnkExcel_Click(sender As Object, e As EventArgs) Handles LnkExcel.Click
|
||||||
|
RegistraScript(String.Format("$('#{0}').modal();", "DivCargaExcel"))
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Protected Sub BtnDescargar_Click(sender As Object, e As EventArgs) Handles BtnDescargar.Click
|
||||||
|
Dim NombreArchivo As String
|
||||||
|
SpreadsheetInfo.SetLicense(ModExtensiones.SerialGemBoxSpreadsheet)
|
||||||
|
Dim workbook As New ExcelFile()
|
||||||
|
Dim worksheet = workbook.Worksheets.Add(DdlPlantilla2.SelectedItem.Text.ToString)
|
||||||
|
|
||||||
|
Dim CvePlantilla As Integer = DdlPlantilla2.SelectedValue.ToEntero
|
||||||
|
Dim Dt As DataTable = GlobalDTContaPlantillasPolizasDetalle(CvePlantilla).FiltraParametros(String.Format("CveEmpresa={0}", UsuarioActual.CveEmpresa), "Orden")
|
||||||
|
|
||||||
|
Dim DtExcel As DataTable = (From row As DataRow In Dt.Rows
|
||||||
|
Select New With
|
||||||
|
{
|
||||||
|
.ConceptoAdministrativo = row.Item("ConceptoContable"),
|
||||||
|
.Cuenta = row.Item("Codigo"),
|
||||||
|
.NombreCuenta = row.Item("NombreCuenta"),
|
||||||
|
.Cargo = "",
|
||||||
|
.Abono = "",
|
||||||
|
.Referencia = "",
|
||||||
|
.Concepto = "",
|
||||||
|
.SubProyecto = row.Item("SubProyecto"),
|
||||||
|
.CveConceptoContable = row.Item("CveConcepto"),
|
||||||
|
.CveSubProyecto = IIf(row.Item("CveSubProyecto").ToString.ToEntero > 0, row.Item("CveSubProyecto"), -1),
|
||||||
|
.IdCtaContable = IIf(row.Item("IdCtaContable").ToString.ToEntero > 0, row.Item("IdCtaContable"), -1),
|
||||||
|
.CveCuenta = row.Item("CveCuenta")
|
||||||
|
}).QueryToDataTable(True)
|
||||||
|
|
||||||
|
worksheet.InsertDataTable(DtExcel, New InsertDataTableOptions() With
|
||||||
|
{
|
||||||
|
.ColumnHeaders = True,
|
||||||
|
.StartRow = 0,
|
||||||
|
.StartColumn = 0
|
||||||
|
})
|
||||||
|
|
||||||
|
Dim columnCount = worksheet.CalculateMaxUsedColumns()
|
||||||
|
For i = 0 To columnCount
|
||||||
|
worksheet.Columns(i).AutoFit(1, worksheet.Rows(0), worksheet.Rows(worksheet.Rows.Count - 1))
|
||||||
|
Next
|
||||||
|
worksheet.Columns("I").Hidden = True
|
||||||
|
worksheet.Columns("J").Hidden = True
|
||||||
|
worksheet.Columns("K").Hidden = True
|
||||||
|
worksheet.Columns("L").Hidden = True
|
||||||
|
|
||||||
|
|
||||||
|
NombreArchivo = DdlPlantilla2.SelectedItem.Text.ToString
|
||||||
|
workbook.Save(Response, $"{NombreArchivo}.xlsx", SaveOptions.XlsxDefault)
|
||||||
|
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Protected Sub BtnCargaExcel_Click(sender As Object, e As EventArgs) Handles BtnCargaExcel.Click
|
||||||
|
If TxtExcel.getfiles().Archivos.Count > 0 Then
|
||||||
|
Dim file As Archivo = TxtExcel.getfiles().Archivos(0)
|
||||||
|
|
||||||
|
Dim Directorio As String = Server.MapPath("~") & file.patch
|
||||||
|
|
||||||
|
Dim Tipo As String = If(file.Extencion.Contiene("xlsx", "xlsx", "xlsm", "xlsb"), "EXCEL", "CSV")
|
||||||
|
CargarArchivo(Directorio, file.filename, Tipo)
|
||||||
|
Else
|
||||||
|
Alert("No existe el archivo.Favor de subir un archivo csv o excel a la plataforma", TipoMensaje.MsgError)
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
Private Sub CargarArchivo(Ruta As String, FileName As String, Tipo As String)
|
||||||
|
Dim dt As New DataTable
|
||||||
|
' Conexion As Odbc.OdbcConnection = Nothing
|
||||||
|
Dim ErrorArchivo = False
|
||||||
|
Dim ErrorExcel = False
|
||||||
|
|
||||||
|
dt = ReadExcelFile(Ruta + FileName, True)
|
||||||
|
|
||||||
|
|
||||||
|
If Not ErrorArchivo Then
|
||||||
|
|
||||||
|
If Not dt.Columns(0).ColumnName = "ConceptoAdministrativo" Then
|
||||||
|
Alert("El nombre de la primera columna debe ser 'ConceptoAdmin'. Favor de corregirlo", TipoMensaje.MsgError)
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
If Not dt.Columns(1).ColumnName = "Cuenta" Then
|
||||||
|
Alert("El nombre de la segunda columna debe ser 'Cuenta'.Favor de corregirlo", TipoMensaje.MsgError)
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
If Not dt.Columns(2).ColumnName = "NombreCuenta" Then
|
||||||
|
Alert("El nombre de la tercera columna debe ser 'NombreCuenta'.Favor de corregirlo", TipoMensaje.MsgError)
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
If Not dt.Columns(3).ColumnName = "Cargo" Then
|
||||||
|
Alert("El nombre de la cuarta columna debe ser 'Cargo'. Favor de corregirlo", TipoMensaje.MsgError)
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
If Not dt.Columns(4).ColumnName = "Abono" Then
|
||||||
|
Alert("El nombre de la quinta columna debe ser 'Abono' .Favor de corregirlo", TipoMensaje.MsgError)
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
If Not dt.Columns(5).ColumnName = "Referencia" Then
|
||||||
|
Alert("El nombre de la sexta columna debe ser 'Referencia'. Favor de corregirlo", TipoMensaje.MsgError)
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
If Not dt.Columns(6).ColumnName = "Concepto" Then
|
||||||
|
Alert("El nombre de la séptima columna debe ser 'Concepto'.Favor de corregirlo", TipoMensaje.MsgError)
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
If Not dt.Columns(7).ColumnName = "SubProyecto" Then
|
||||||
|
Alert("El nombre de la octava columna debe ser 'SubProyecto'. Favor de corregirlo", TipoMensaje.MsgError)
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
If Not ErrorArchivo Then
|
||||||
|
|
||||||
|
|
||||||
|
Dim ObjConta As New ClsContabilidad()
|
||||||
|
ObjConta.IniciaTransacSQL()
|
||||||
|
Try
|
||||||
|
Dim TieneError As Boolean = False
|
||||||
|
Dim ContadorUpdate As Integer = 0
|
||||||
|
Dim ContadorError As Integer = 0
|
||||||
|
Dim NombreCuenta As String = ""
|
||||||
|
Dim CvePrePoliza As Integer = 0
|
||||||
|
Dim Cuenta As String = ""
|
||||||
|
Dim Reporte As New StringBuilder
|
||||||
|
Dim TotalCargos As Integer = 0
|
||||||
|
Dim TotalAbonos As Integer = 0
|
||||||
|
|
||||||
|
|
||||||
|
CvePrePoliza = ObjConta.AddPrePolizas("Contabilidad/RegPrePolizaExcel", DdlPlantilla2.SelectedValue.ToEntero, TotalCargos, TotalAbonos, 1, TxtFecha.Text.ToDate, DdlPlantilla2.SelectedItem.Text.ToString, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveTipoPoliza:=DdlTipoPolizaAdd.SelectedValue.ToEntero)
|
||||||
|
|
||||||
|
|
||||||
|
For Each Row As DataRow In dt.Rows
|
||||||
|
NombreCuenta = Row("NombreCuenta").ToString
|
||||||
|
Cuenta = Row("Cuenta").ToString
|
||||||
|
|
||||||
|
Dim Importe As Decimal = If(Row("Cargo").ToString.ToDecimal <> 0, Row("Cargo").ToString.ToDecimal, Row("Abono").ToString.ToDecimal)
|
||||||
|
Dim Concepto As String = Row("Concepto").ToString
|
||||||
|
Dim Referencia As String = Row("Referencia").ToString
|
||||||
|
Dim IdCuenta As Integer = -1
|
||||||
|
Dim CveSubProyecto As Integer = Row("CveSubProyecto").ToString.ToEntero
|
||||||
|
Dim TipoMovto As Boolean = If(Row("Cargo").ToString.ToDecimal <> 0, False, True)
|
||||||
|
Dim YaExiste As Boolean = False
|
||||||
|
Dim CveConceptoContable As Integer = Row("CveConceptoContable").ToString.ToEntero
|
||||||
|
Dim IdCtaContable As Integer = Row("IdCtaContable").ToString.ToEntero
|
||||||
|
|
||||||
|
|
||||||
|
If Importe <> 0 Then
|
||||||
|
|
||||||
|
If ObjConta.GetCuentas(-1, Cuenta.Replace("-", ""), 1, UsuarioActual.CveEmpresa) Then
|
||||||
|
If ObjConta.DtResultados.Rows.Count > 0 Then
|
||||||
|
IdCuenta = ObjConta.DtResultados().FiltroPrimeroValor("CveCuenta").ToEntero
|
||||||
|
'TipoCuenta = ObjConta.DtResultados().FiltroPrimeroValor("Tipo")
|
||||||
|
Else
|
||||||
|
Reporte.AppendLine($"{Cuenta} - {NombreCuenta} - {Importe} </br>")
|
||||||
|
TieneError = True
|
||||||
|
YaExiste = True
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
TieneError = True
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
If YaExiste = False Then
|
||||||
|
If IdCuenta > 0 Then
|
||||||
|
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovto, Importe, "", CveConceptoContable, Concepto, Now.ToDate, IdCtaContable, -1, ImporteMX:=Importe, CveSubProyecto:=CveSubProyecto, CveCuenta:=IdCuenta) Then
|
||||||
|
TieneError = True
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
IdCuenta = -2
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
Next
|
||||||
|
If Not TieneError Then
|
||||||
|
ObjConta.Commit()
|
||||||
|
Alert(String.Format("<br/><br/>Prepóliza: <b><a href = ""/Contabilidad/RegPrePolizas.aspx?CvePrePoliza={0}"" class=""texto"" target=""_blank"" >{1}</a></b>", CvePrePoliza, "Ver"))
|
||||||
|
|
||||||
|
Alert($"Se agregó la póliza {ObjConta.ContaFolio}")
|
||||||
|
|
||||||
|
Else
|
||||||
|
Alert($"No encontraron las siguientes cuentas: {Reporte.ToString} ", TipoMensaje.MsgError)
|
||||||
|
ObjConta.RollBack()
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
Catch ex As Exception
|
||||||
|
ObjConta.RollBack()
|
||||||
|
End Try
|
||||||
|
|
||||||
|
ObjConta.Dispose()
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
#End Region
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|
||||||
|
|||||||
@@ -894,6 +894,10 @@ Partial Class Contratos_Default
|
|||||||
GRidsPresupuestos.Visible = True
|
GRidsPresupuestos.Visible = True
|
||||||
msjpresupuestos.Visible = False
|
msjpresupuestos.Visible = False
|
||||||
|
|
||||||
|
If ObjContratos.CveContratoTipo = 30 Then
|
||||||
|
Server.Transfer(String.Format("/Contratos/ContratoObra.aspx?CveContrato={0}", CveContrato))
|
||||||
|
End If
|
||||||
|
|
||||||
If ArchivoUpdate = ObjContratos.Archivo.ToString Then
|
If ArchivoUpdate = ObjContratos.Archivo.ToString Then
|
||||||
LinkArchivo.Visible = True
|
LinkArchivo.Visible = True
|
||||||
LinkArchivo.HRef = String.Format("{0}{1}", Ruta, ObjContratos.Archivo.ToString)
|
LinkArchivo.HRef = String.Format("{0}{1}", Ruta, ObjContratos.Archivo.ToString)
|
||||||
|
|||||||
@@ -192,7 +192,7 @@
|
|||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
|
|
||||||
<asp:TemplateField HeaderText="Procentaje">
|
<asp:TemplateField HeaderText="Porcentaje">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:TextBox ID="TxtPorcentaje" Text="" CssClass="txtporcentaje" data-cve='<%# Eval("CveContratoDetalle") %>' type="number" step="any" Width="90" runat="server"></asp:TextBox>
|
<asp:TextBox ID="TxtPorcentaje" Text="" CssClass="txtporcentaje" data-cve='<%# Eval("CveContratoDetalle") %>' type="number" step="any" Width="90" runat="server"></asp:TextBox>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
|
|||||||
@@ -103,7 +103,7 @@
|
|||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li>
|
<li>
|
||||||
<asp:LinkButton ID="LnkModalAddMaquinariaFlotilla" Visible="false" runat="server" OnClick="LnkModalAddMaquinariaFlotilla_Click"> <i class="fa fa-file-excel-o" style="font-weight:bold;"></i>Agregar Maquionaria Flotilla Herramienta</asp:LinkButton>
|
<asp:LinkButton ID="LnkModalAddMaquinariaFlotilla" Visible="false" runat="server" OnClick="LnkModalAddMaquinariaFlotilla_Click"> <i class="fa fa-file-excel-o" style="font-weight:bold;"></i>Agregar Maquinaria-Flotilla-Herramienta</asp:LinkButton>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
|
|||||||
@@ -1340,12 +1340,26 @@
|
|||||||
<FontWeight>Bold</FontWeight>
|
<FontWeight>Bold</FontWeight>
|
||||||
</Style>
|
</Style>
|
||||||
</TextRun>
|
</TextRun>
|
||||||
|
<TextRun>
|
||||||
|
<Value xml:space="preserve"> </Value>
|
||||||
|
<Style>
|
||||||
|
<FontFamily>calibri</FontFamily>
|
||||||
|
<FontWeight>Bold</FontWeight>
|
||||||
|
</Style>
|
||||||
|
</TextRun>
|
||||||
|
<TextRun>
|
||||||
|
<Value>="<b>Próxima Rotación y Balanceo: </b>" & FormatDateTime(CDate(Parameters!Fecha.Value).AddMonths(6), DateFormat.ShortDate) & " <b>Próxima Alineacion: </b>" & FormatDateTime(CDate(Parameters!Fecha.Value).AddMonths(6), DateFormat.ShortDate)</Value>
|
||||||
|
<MarkupType>HTML</MarkupType>
|
||||||
|
<Style>
|
||||||
|
<FontFamily>calibri</FontFamily>
|
||||||
|
</Style>
|
||||||
|
</TextRun>
|
||||||
</TextRuns>
|
</TextRuns>
|
||||||
<Style />
|
<Style />
|
||||||
</Paragraph>
|
</Paragraph>
|
||||||
</Paragraphs>
|
</Paragraphs>
|
||||||
<rd:DefaultName>Textbox1</rd:DefaultName>
|
<rd:DefaultName>Textbox1</rd:DefaultName>
|
||||||
<Top>9.6829cm</Top>
|
<Top>9.66322cm</Top>
|
||||||
<Left>1.10521cm</Left>
|
<Left>1.10521cm</Left>
|
||||||
<Height>0.62233cm</Height>
|
<Height>0.62233cm</Height>
|
||||||
<Width>9.17089cm</Width>
|
<Width>9.17089cm</Width>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Report xmlns="http://schemas.microsoft.com/sqlserver/reporting/2016/01/reportdefinition" xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner">
|
<Report xmlns="http://schemas.microsoft.com/sqlserver/reporting/2010/01/reportdefinition" xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner">
|
||||||
<AutoRefresh>0</AutoRefresh>
|
<AutoRefresh>0</AutoRefresh>
|
||||||
<DataSources>
|
<DataSources>
|
||||||
<DataSource Name="DsOC">
|
<DataSource Name="DsOC">
|
||||||
@@ -1340,6 +1340,20 @@
|
|||||||
<FontWeight>Bold</FontWeight>
|
<FontWeight>Bold</FontWeight>
|
||||||
</Style>
|
</Style>
|
||||||
</TextRun>
|
</TextRun>
|
||||||
|
<TextRun>
|
||||||
|
<Value xml:space="preserve"> </Value>
|
||||||
|
<Style>
|
||||||
|
<FontFamily>calibri</FontFamily>
|
||||||
|
<FontWeight>Bold</FontWeight>
|
||||||
|
</Style>
|
||||||
|
</TextRun>
|
||||||
|
<TextRun>
|
||||||
|
<Value>="<b>Próxima Rotación y Balanceo: </b>" & FormatDateTime(CDate(Parameters!Fecha.Value).AddMonths(6), DateFormat.ShortDate) & " <b>Próxima Alineacion: </b>" & FormatDateTime(CDate(Parameters!Fecha.Value).AddMonths(6), DateFormat.ShortDate)</Value>
|
||||||
|
<MarkupType>HTML</MarkupType>
|
||||||
|
<Style>
|
||||||
|
<FontFamily>calibri</FontFamily>
|
||||||
|
</Style>
|
||||||
|
</TextRun>
|
||||||
</TextRuns>
|
</TextRuns>
|
||||||
<Style />
|
<Style />
|
||||||
</Paragraph>
|
</Paragraph>
|
||||||
@@ -3567,509 +3581,7 @@
|
|||||||
<Prompt>ReportParameter1</Prompt>
|
<Prompt>ReportParameter1</Prompt>
|
||||||
</ReportParameter>
|
</ReportParameter>
|
||||||
</ReportParameters>
|
</ReportParameters>
|
||||||
<ReportParametersLayout>
|
|
||||||
<GridLayoutDefinition>
|
|
||||||
<NumberOfColumns>2</NumberOfColumns>
|
|
||||||
<NumberOfRows>50</NumberOfRows>
|
|
||||||
<CellDefinitions>
|
|
||||||
<CellDefinition>
|
|
||||||
<ColumnIndex>0</ColumnIndex>
|
|
||||||
<RowIndex>0</RowIndex>
|
|
||||||
<ParameterName>ClienteCodigo</ParameterName>
|
|
||||||
</CellDefinition>
|
|
||||||
<CellDefinition>
|
|
||||||
<ColumnIndex>1</ColumnIndex>
|
|
||||||
<RowIndex>0</RowIndex>
|
|
||||||
<ParameterName>ClienteNombre</ParameterName>
|
|
||||||
</CellDefinition>
|
|
||||||
<CellDefinition>
|
|
||||||
<ColumnIndex>0</ColumnIndex>
|
|
||||||
<RowIndex>1</RowIndex>
|
|
||||||
<ParameterName>ClienteDireccion</ParameterName>
|
|
||||||
</CellDefinition>
|
|
||||||
<CellDefinition>
|
|
||||||
<ColumnIndex>1</ColumnIndex>
|
|
||||||
<RowIndex>1</RowIndex>
|
|
||||||
<ParameterName>ClienteLugar</ParameterName>
|
|
||||||
</CellDefinition>
|
|
||||||
<CellDefinition>
|
|
||||||
<ColumnIndex>0</ColumnIndex>
|
|
||||||
<RowIndex>2</RowIndex>
|
|
||||||
<ParameterName>ClienteTelefono</ParameterName>
|
|
||||||
</CellDefinition>
|
|
||||||
<CellDefinition>
|
|
||||||
<ColumnIndex>1</ColumnIndex>
|
|
||||||
<RowIndex>2</RowIndex>
|
|
||||||
<ParameterName>ClienteContacto</ParameterName>
|
|
||||||
</CellDefinition>
|
|
||||||
<CellDefinition>
|
|
||||||
<ColumnIndex>0</ColumnIndex>
|
|
||||||
<RowIndex>3</RowIndex>
|
|
||||||
<ParameterName>ClienteContactoMail</ParameterName>
|
|
||||||
</CellDefinition>
|
|
||||||
<CellDefinition>
|
|
||||||
<ColumnIndex>1</ColumnIndex>
|
|
||||||
<RowIndex>3</RowIndex>
|
|
||||||
<ParameterName>ImporteLetra</ParameterName>
|
|
||||||
</CellDefinition>
|
|
||||||
<CellDefinition>
|
|
||||||
<ColumnIndex>0</ColumnIndex>
|
|
||||||
<RowIndex>4</RowIndex>
|
|
||||||
<ParameterName>Observaciones</ParameterName>
|
|
||||||
</CellDefinition>
|
|
||||||
<CellDefinition>
|
|
||||||
<ColumnIndex>1</ColumnIndex>
|
|
||||||
<RowIndex>4</RowIndex>
|
|
||||||
<ParameterName>CveVendedor</ParameterName>
|
|
||||||
</CellDefinition>
|
|
||||||
<CellDefinition>
|
|
||||||
<ColumnIndex>0</ColumnIndex>
|
|
||||||
<RowIndex>5</RowIndex>
|
|
||||||
<ParameterName>Status</ParameterName>
|
|
||||||
</CellDefinition>
|
|
||||||
<CellDefinition>
|
|
||||||
<ColumnIndex>1</ColumnIndex>
|
|
||||||
<RowIndex>5</RowIndex>
|
|
||||||
<ParameterName>FechaSolicitud</ParameterName>
|
|
||||||
</CellDefinition>
|
|
||||||
<CellDefinition>
|
|
||||||
<ColumnIndex>0</ColumnIndex>
|
|
||||||
<RowIndex>6</RowIndex>
|
|
||||||
<ParameterName>Folio</ParameterName>
|
|
||||||
</CellDefinition>
|
|
||||||
<CellDefinition>
|
|
||||||
<ColumnIndex>1</ColumnIndex>
|
|
||||||
<RowIndex>6</RowIndex>
|
|
||||||
<ParameterName>Descuento</ParameterName>
|
|
||||||
</CellDefinition>
|
|
||||||
<CellDefinition>
|
|
||||||
<ColumnIndex>0</ColumnIndex>
|
|
||||||
<RowIndex>7</RowIndex>
|
|
||||||
<ParameterName>SubTotal</ParameterName>
|
|
||||||
</CellDefinition>
|
|
||||||
<CellDefinition>
|
|
||||||
<ColumnIndex>1</ColumnIndex>
|
|
||||||
<RowIndex>7</RowIndex>
|
|
||||||
<ParameterName>IVA</ParameterName>
|
|
||||||
</CellDefinition>
|
|
||||||
<CellDefinition>
|
|
||||||
<ColumnIndex>0</ColumnIndex>
|
|
||||||
<RowIndex>8</RowIndex>
|
|
||||||
<ParameterName>Total</ParameterName>
|
|
||||||
</CellDefinition>
|
|
||||||
<CellDefinition>
|
|
||||||
<ColumnIndex>1</ColumnIndex>
|
|
||||||
<RowIndex>8</RowIndex>
|
|
||||||
<ParameterName>Fecha</ParameterName>
|
|
||||||
</CellDefinition>
|
|
||||||
<CellDefinition>
|
|
||||||
<ColumnIndex>0</ColumnIndex>
|
|
||||||
<RowIndex>9</RowIndex>
|
|
||||||
<ParameterName>DescFinanciero</ParameterName>
|
|
||||||
</CellDefinition>
|
|
||||||
<CellDefinition>
|
|
||||||
<ColumnIndex>1</ColumnIndex>
|
|
||||||
<RowIndex>9</RowIndex>
|
|
||||||
<ParameterName>VigInsCon</ParameterName>
|
|
||||||
</CellDefinition>
|
|
||||||
<CellDefinition>
|
|
||||||
<ColumnIndex>0</ColumnIndex>
|
|
||||||
<RowIndex>10</RowIndex>
|
|
||||||
<ParameterName>Universidades</ParameterName>
|
|
||||||
</CellDefinition>
|
|
||||||
<CellDefinition>
|
|
||||||
<ColumnIndex>1</ColumnIndex>
|
|
||||||
<RowIndex>10</RowIndex>
|
|
||||||
<ParameterName>CECOP</ParameterName>
|
|
||||||
</CellDefinition>
|
|
||||||
<CellDefinition>
|
|
||||||
<ColumnIndex>0</ColumnIndex>
|
|
||||||
<RowIndex>11</RowIndex>
|
|
||||||
<ParameterName>InfraEducativa</ParameterName>
|
|
||||||
</CellDefinition>
|
|
||||||
<CellDefinition>
|
|
||||||
<ColumnIndex>1</ColumnIndex>
|
|
||||||
<RowIndex>11</RowIndex>
|
|
||||||
<ParameterName>DomicilioSucursal</ParameterName>
|
|
||||||
</CellDefinition>
|
|
||||||
<CellDefinition>
|
|
||||||
<ColumnIndex>0</ColumnIndex>
|
|
||||||
<RowIndex>12</RowIndex>
|
|
||||||
<ParameterName>MetodoPago</ParameterName>
|
|
||||||
</CellDefinition>
|
|
||||||
<CellDefinition>
|
|
||||||
<ColumnIndex>1</ColumnIndex>
|
|
||||||
<RowIndex>12</RowIndex>
|
|
||||||
<ParameterName>Vencimiento</ParameterName>
|
|
||||||
</CellDefinition>
|
|
||||||
<CellDefinition>
|
|
||||||
<ColumnIndex>0</ColumnIndex>
|
|
||||||
<RowIndex>13</RowIndex>
|
|
||||||
<ParameterName>FolioFiscal</ParameterName>
|
|
||||||
</CellDefinition>
|
|
||||||
<CellDefinition>
|
|
||||||
<ColumnIndex>1</ColumnIndex>
|
|
||||||
<RowIndex>13</RowIndex>
|
|
||||||
<ParameterName>FechaCertificacion</ParameterName>
|
|
||||||
</CellDefinition>
|
|
||||||
<CellDefinition>
|
|
||||||
<ColumnIndex>0</ColumnIndex>
|
|
||||||
<RowIndex>14</RowIndex>
|
|
||||||
<ParameterName>SelloCFDI</ParameterName>
|
|
||||||
</CellDefinition>
|
|
||||||
<CellDefinition>
|
|
||||||
<ColumnIndex>1</ColumnIndex>
|
|
||||||
<RowIndex>14</RowIndex>
|
|
||||||
<ParameterName>CadenaSAT</ParameterName>
|
|
||||||
</CellDefinition>
|
|
||||||
<CellDefinition>
|
|
||||||
<ColumnIndex>0</ColumnIndex>
|
|
||||||
<RowIndex>15</RowIndex>
|
|
||||||
<ParameterName>SelloSAT</ParameterName>
|
|
||||||
</CellDefinition>
|
|
||||||
<CellDefinition>
|
|
||||||
<ColumnIndex>1</ColumnIndex>
|
|
||||||
<RowIndex>15</RowIndex>
|
|
||||||
<ParameterName>CiudadSucursal</ParameterName>
|
|
||||||
</CellDefinition>
|
|
||||||
<CellDefinition>
|
|
||||||
<ColumnIndex>0</ColumnIndex>
|
|
||||||
<RowIndex>16</RowIndex>
|
|
||||||
<ParameterName>Serie</ParameterName>
|
|
||||||
</CellDefinition>
|
|
||||||
<CellDefinition>
|
|
||||||
<ColumnIndex>1</ColumnIndex>
|
|
||||||
<RowIndex>16</RowIndex>
|
|
||||||
<ParameterName>QR</ParameterName>
|
|
||||||
</CellDefinition>
|
|
||||||
<CellDefinition>
|
|
||||||
<ColumnIndex>0</ColumnIndex>
|
|
||||||
<RowIndex>17</RowIndex>
|
|
||||||
<ParameterName>ClienteRFC</ParameterName>
|
|
||||||
</CellDefinition>
|
|
||||||
<CellDefinition>
|
|
||||||
<ColumnIndex>1</ColumnIndex>
|
|
||||||
<RowIndex>17</RowIndex>
|
|
||||||
<ParameterName>FormaPago</ParameterName>
|
|
||||||
</CellDefinition>
|
|
||||||
<CellDefinition>
|
|
||||||
<ColumnIndex>0</ColumnIndex>
|
|
||||||
<RowIndex>18</RowIndex>
|
|
||||||
<ParameterName>LogoPath</ParameterName>
|
|
||||||
</CellDefinition>
|
|
||||||
<CellDefinition>
|
|
||||||
<ColumnIndex>1</ColumnIndex>
|
|
||||||
<RowIndex>18</RowIndex>
|
|
||||||
<ParameterName>Prueba</ParameterName>
|
|
||||||
</CellDefinition>
|
|
||||||
<CellDefinition>
|
|
||||||
<ColumnIndex>0</ColumnIndex>
|
|
||||||
<RowIndex>19</RowIndex>
|
|
||||||
<ParameterName>VendedorNombre</ParameterName>
|
|
||||||
</CellDefinition>
|
|
||||||
<CellDefinition>
|
|
||||||
<ColumnIndex>1</ColumnIndex>
|
|
||||||
<RowIndex>19</RowIndex>
|
|
||||||
<ParameterName>VendedorCelular</ParameterName>
|
|
||||||
</CellDefinition>
|
|
||||||
<CellDefinition>
|
|
||||||
<ColumnIndex>0</ColumnIndex>
|
|
||||||
<RowIndex>20</RowIndex>
|
|
||||||
<ParameterName>VendedorMail</ParameterName>
|
|
||||||
</CellDefinition>
|
|
||||||
<CellDefinition>
|
|
||||||
<ColumnIndex>1</ColumnIndex>
|
|
||||||
<RowIndex>20</RowIndex>
|
|
||||||
<ParameterName>VendedorTelefono</ParameterName>
|
|
||||||
</CellDefinition>
|
|
||||||
<CellDefinition>
|
|
||||||
<ColumnIndex>0</ColumnIndex>
|
|
||||||
<RowIndex>21</RowIndex>
|
|
||||||
<ParameterName>Moneda</ParameterName>
|
|
||||||
</CellDefinition>
|
|
||||||
<CellDefinition>
|
|
||||||
<ColumnIndex>1</ColumnIndex>
|
|
||||||
<RowIndex>21</RowIndex>
|
|
||||||
<ParameterName>TipoCambio</ParameterName>
|
|
||||||
</CellDefinition>
|
|
||||||
<CellDefinition>
|
|
||||||
<ColumnIndex>0</ColumnIndex>
|
|
||||||
<RowIndex>22</RowIndex>
|
|
||||||
<ParameterName>CondicionPago</ParameterName>
|
|
||||||
</CellDefinition>
|
|
||||||
<CellDefinition>
|
|
||||||
<ColumnIndex>1</ColumnIndex>
|
|
||||||
<RowIndex>22</RowIndex>
|
|
||||||
<ParameterName>CadenaOriginal</ParameterName>
|
|
||||||
</CellDefinition>
|
|
||||||
<CellDefinition>
|
|
||||||
<ColumnIndex>0</ColumnIndex>
|
|
||||||
<RowIndex>23</RowIndex>
|
|
||||||
<ParameterName>SerieCertificadoSAT</ParameterName>
|
|
||||||
</CellDefinition>
|
|
||||||
<CellDefinition>
|
|
||||||
<ColumnIndex>1</ColumnIndex>
|
|
||||||
<RowIndex>23</RowIndex>
|
|
||||||
<ParameterName>Tipo</ParameterName>
|
|
||||||
</CellDefinition>
|
|
||||||
<CellDefinition>
|
|
||||||
<ColumnIndex>0</ColumnIndex>
|
|
||||||
<RowIndex>24</RowIndex>
|
|
||||||
<ParameterName>NumCta</ParameterName>
|
|
||||||
</CellDefinition>
|
|
||||||
<CellDefinition>
|
|
||||||
<ColumnIndex>1</ColumnIndex>
|
|
||||||
<RowIndex>24</RowIndex>
|
|
||||||
<ParameterName>CertificadoContribuyente</ParameterName>
|
|
||||||
</CellDefinition>
|
|
||||||
<CellDefinition>
|
|
||||||
<ColumnIndex>0</ColumnIndex>
|
|
||||||
<RowIndex>25</RowIndex>
|
|
||||||
<ParameterName>Amortizacion</ParameterName>
|
|
||||||
</CellDefinition>
|
|
||||||
<CellDefinition>
|
|
||||||
<ColumnIndex>1</ColumnIndex>
|
|
||||||
<RowIndex>25</RowIndex>
|
|
||||||
<ParameterName>SubTotal2</ParameterName>
|
|
||||||
</CellDefinition>
|
|
||||||
<CellDefinition>
|
|
||||||
<ColumnIndex>0</ColumnIndex>
|
|
||||||
<RowIndex>26</RowIndex>
|
|
||||||
<ParameterName>RetIVA</ParameterName>
|
|
||||||
</CellDefinition>
|
|
||||||
<CellDefinition>
|
|
||||||
<ColumnIndex>1</ColumnIndex>
|
|
||||||
<RowIndex>26</RowIndex>
|
|
||||||
<ParameterName>RetISR</ParameterName>
|
|
||||||
</CellDefinition>
|
|
||||||
<CellDefinition>
|
|
||||||
<ColumnIndex>0</ColumnIndex>
|
|
||||||
<RowIndex>27</RowIndex>
|
|
||||||
<ParameterName>TipoDocumento</ParameterName>
|
|
||||||
</CellDefinition>
|
|
||||||
<CellDefinition>
|
|
||||||
<ColumnIndex>1</ColumnIndex>
|
|
||||||
<RowIndex>27</RowIndex>
|
|
||||||
<ParameterName>AplicaPagare</ParameterName>
|
|
||||||
</CellDefinition>
|
|
||||||
<CellDefinition>
|
|
||||||
<ColumnIndex>0</ColumnIndex>
|
|
||||||
<RowIndex>28</RowIndex>
|
|
||||||
<ParameterName>Ref</ParameterName>
|
|
||||||
</CellDefinition>
|
|
||||||
<CellDefinition>
|
|
||||||
<ColumnIndex>1</ColumnIndex>
|
|
||||||
<RowIndex>28</RowIndex>
|
|
||||||
<ParameterName>Sucursal</ParameterName>
|
|
||||||
</CellDefinition>
|
|
||||||
<CellDefinition>
|
|
||||||
<ColumnIndex>0</ColumnIndex>
|
|
||||||
<RowIndex>29</RowIndex>
|
|
||||||
<ParameterName>ClienteDiasCredito</ParameterName>
|
|
||||||
</CellDefinition>
|
|
||||||
<CellDefinition>
|
|
||||||
<ColumnIndex>1</ColumnIndex>
|
|
||||||
<RowIndex>29</RowIndex>
|
|
||||||
<ParameterName>OC</ParameterName>
|
|
||||||
</CellDefinition>
|
|
||||||
<CellDefinition>
|
|
||||||
<ColumnIndex>0</ColumnIndex>
|
|
||||||
<RowIndex>30</RowIndex>
|
|
||||||
<ParameterName>MonedaAbreviatura</ParameterName>
|
|
||||||
</CellDefinition>
|
|
||||||
<CellDefinition>
|
|
||||||
<ColumnIndex>1</ColumnIndex>
|
|
||||||
<RowIndex>30</RowIndex>
|
|
||||||
<ParameterName>UsuarioImprimio</ParameterName>
|
|
||||||
</CellDefinition>
|
|
||||||
<CellDefinition>
|
|
||||||
<ColumnIndex>0</ColumnIndex>
|
|
||||||
<RowIndex>31</RowIndex>
|
|
||||||
<ParameterName>FechaImpresion</ParameterName>
|
|
||||||
</CellDefinition>
|
|
||||||
<CellDefinition>
|
|
||||||
<ColumnIndex>1</ColumnIndex>
|
|
||||||
<RowIndex>31</RowIndex>
|
|
||||||
<ParameterName>ClienteCalle</ParameterName>
|
|
||||||
</CellDefinition>
|
|
||||||
<CellDefinition>
|
|
||||||
<ColumnIndex>0</ColumnIndex>
|
|
||||||
<RowIndex>32</RowIndex>
|
|
||||||
<ParameterName>ClienteColonia</ParameterName>
|
|
||||||
</CellDefinition>
|
|
||||||
<CellDefinition>
|
|
||||||
<ColumnIndex>1</ColumnIndex>
|
|
||||||
<RowIndex>32</RowIndex>
|
|
||||||
<ParameterName>ClienteCiudad</ParameterName>
|
|
||||||
</CellDefinition>
|
|
||||||
<CellDefinition>
|
|
||||||
<ColumnIndex>0</ColumnIndex>
|
|
||||||
<RowIndex>33</RowIndex>
|
|
||||||
<ParameterName>ClienteMunicipio</ParameterName>
|
|
||||||
</CellDefinition>
|
|
||||||
<CellDefinition>
|
|
||||||
<ColumnIndex>1</ColumnIndex>
|
|
||||||
<RowIndex>33</RowIndex>
|
|
||||||
<ParameterName>ClienteEstado</ParameterName>
|
|
||||||
</CellDefinition>
|
|
||||||
<CellDefinition>
|
|
||||||
<ColumnIndex>0</ColumnIndex>
|
|
||||||
<RowIndex>34</RowIndex>
|
|
||||||
<ParameterName>ClienteCP</ParameterName>
|
|
||||||
</CellDefinition>
|
|
||||||
<CellDefinition>
|
|
||||||
<ColumnIndex>1</ColumnIndex>
|
|
||||||
<RowIndex>34</RowIndex>
|
|
||||||
<ParameterName>ClientePais</ParameterName>
|
|
||||||
</CellDefinition>
|
|
||||||
<CellDefinition>
|
|
||||||
<ColumnIndex>0</ColumnIndex>
|
|
||||||
<RowIndex>35</RowIndex>
|
|
||||||
<ParameterName>ClienteNoInt</ParameterName>
|
|
||||||
</CellDefinition>
|
|
||||||
<CellDefinition>
|
|
||||||
<ColumnIndex>1</ColumnIndex>
|
|
||||||
<RowIndex>35</RowIndex>
|
|
||||||
<ParameterName>ClienteNoExt</ParameterName>
|
|
||||||
</CellDefinition>
|
|
||||||
<CellDefinition>
|
|
||||||
<ColumnIndex>0</ColumnIndex>
|
|
||||||
<RowIndex>36</RowIndex>
|
|
||||||
<ParameterName>EnvioDireccion</ParameterName>
|
|
||||||
</CellDefinition>
|
|
||||||
<CellDefinition>
|
|
||||||
<ColumnIndex>1</ColumnIndex>
|
|
||||||
<RowIndex>36</RowIndex>
|
|
||||||
<ParameterName>EnvioColonia</ParameterName>
|
|
||||||
</CellDefinition>
|
|
||||||
<CellDefinition>
|
|
||||||
<ColumnIndex>0</ColumnIndex>
|
|
||||||
<RowIndex>37</RowIndex>
|
|
||||||
<ParameterName>EnvioCiudad</ParameterName>
|
|
||||||
</CellDefinition>
|
|
||||||
<CellDefinition>
|
|
||||||
<ColumnIndex>1</ColumnIndex>
|
|
||||||
<RowIndex>37</RowIndex>
|
|
||||||
<ParameterName>EnvioEstado</ParameterName>
|
|
||||||
</CellDefinition>
|
|
||||||
<CellDefinition>
|
|
||||||
<ColumnIndex>0</ColumnIndex>
|
|
||||||
<RowIndex>38</RowIndex>
|
|
||||||
<ParameterName>EnvioCP</ParameterName>
|
|
||||||
</CellDefinition>
|
|
||||||
<CellDefinition>
|
|
||||||
<ColumnIndex>1</ColumnIndex>
|
|
||||||
<RowIndex>38</RowIndex>
|
|
||||||
<ParameterName>EstatusFactura</ParameterName>
|
|
||||||
</CellDefinition>
|
|
||||||
<CellDefinition>
|
|
||||||
<ColumnIndex>0</ColumnIndex>
|
|
||||||
<RowIndex>39</RowIndex>
|
|
||||||
<ParameterName>EstatusEntrega</ParameterName>
|
|
||||||
</CellDefinition>
|
|
||||||
<CellDefinition>
|
|
||||||
<ColumnIndex>1</ColumnIndex>
|
|
||||||
<RowIndex>39</RowIndex>
|
|
||||||
<ParameterName>EnvioNoExt</ParameterName>
|
|
||||||
</CellDefinition>
|
|
||||||
<CellDefinition>
|
|
||||||
<ColumnIndex>0</ColumnIndex>
|
|
||||||
<RowIndex>40</RowIndex>
|
|
||||||
<ParameterName>EnvioNoInt</ParameterName>
|
|
||||||
</CellDefinition>
|
|
||||||
<CellDefinition>
|
|
||||||
<ColumnIndex>1</ColumnIndex>
|
|
||||||
<RowIndex>40</RowIndex>
|
|
||||||
<ParameterName>EnvioContacto</ParameterName>
|
|
||||||
</CellDefinition>
|
|
||||||
<CellDefinition>
|
|
||||||
<ColumnIndex>0</ColumnIndex>
|
|
||||||
<RowIndex>41</RowIndex>
|
|
||||||
<ParameterName>EnvioDepartamento</ParameterName>
|
|
||||||
</CellDefinition>
|
|
||||||
<CellDefinition>
|
|
||||||
<ColumnIndex>1</ColumnIndex>
|
|
||||||
<RowIndex>41</RowIndex>
|
|
||||||
<ParameterName>PedidoContrato</ParameterName>
|
|
||||||
</CellDefinition>
|
|
||||||
<CellDefinition>
|
|
||||||
<ColumnIndex>0</ColumnIndex>
|
|
||||||
<RowIndex>42</RowIndex>
|
|
||||||
<ParameterName>INETipoProceso</ParameterName>
|
|
||||||
</CellDefinition>
|
|
||||||
<CellDefinition>
|
|
||||||
<ColumnIndex>1</ColumnIndex>
|
|
||||||
<RowIndex>42</RowIndex>
|
|
||||||
<ParameterName>INETipoComite</ParameterName>
|
|
||||||
</CellDefinition>
|
|
||||||
<CellDefinition>
|
|
||||||
<ColumnIndex>0</ColumnIndex>
|
|
||||||
<RowIndex>43</RowIndex>
|
|
||||||
<ParameterName>INEIdContabilidad</ParameterName>
|
|
||||||
</CellDefinition>
|
|
||||||
<CellDefinition>
|
|
||||||
<ColumnIndex>1</ColumnIndex>
|
|
||||||
<RowIndex>43</RowIndex>
|
|
||||||
<ParameterName>Referencia</ParameterName>
|
|
||||||
</CellDefinition>
|
|
||||||
<CellDefinition>
|
|
||||||
<ColumnIndex>0</ColumnIndex>
|
|
||||||
<RowIndex>44</RowIndex>
|
|
||||||
<ParameterName>DescripcionContrato</ParameterName>
|
|
||||||
</CellDefinition>
|
|
||||||
<CellDefinition>
|
|
||||||
<ColumnIndex>1</ColumnIndex>
|
|
||||||
<RowIndex>44</RowIndex>
|
|
||||||
<ParameterName>TipoRelacion</ParameterName>
|
|
||||||
</CellDefinition>
|
|
||||||
<CellDefinition>
|
|
||||||
<ColumnIndex>0</ColumnIndex>
|
|
||||||
<RowIndex>45</RowIndex>
|
|
||||||
<ParameterName>FolioFiscalPadre</ParameterName>
|
|
||||||
</CellDefinition>
|
|
||||||
<CellDefinition>
|
|
||||||
<ColumnIndex>1</ColumnIndex>
|
|
||||||
<RowIndex>45</RowIndex>
|
|
||||||
<ParameterName>UsoCFDI</ParameterName>
|
|
||||||
</CellDefinition>
|
|
||||||
<CellDefinition>
|
|
||||||
<ColumnIndex>0</ColumnIndex>
|
|
||||||
<RowIndex>46</RowIndex>
|
|
||||||
<ParameterName>FolioFiscalRelacionado</ParameterName>
|
|
||||||
</CellDefinition>
|
|
||||||
<CellDefinition>
|
|
||||||
<ColumnIndex>1</ColumnIndex>
|
|
||||||
<RowIndex>46</RowIndex>
|
|
||||||
<ParameterName>TipoRelacionTexto</ParameterName>
|
|
||||||
</CellDefinition>
|
|
||||||
<CellDefinition>
|
|
||||||
<ColumnIndex>0</ColumnIndex>
|
|
||||||
<RowIndex>47</RowIndex>
|
|
||||||
<ParameterName>OrdenCompra</ParameterName>
|
|
||||||
</CellDefinition>
|
|
||||||
<CellDefinition>
|
|
||||||
<ColumnIndex>1</ColumnIndex>
|
|
||||||
<RowIndex>47</RowIndex>
|
|
||||||
<ParameterName>ClienteDatoExtra1</ParameterName>
|
|
||||||
</CellDefinition>
|
|
||||||
<CellDefinition>
|
|
||||||
<ColumnIndex>0</ColumnIndex>
|
|
||||||
<RowIndex>48</RowIndex>
|
|
||||||
<ParameterName>Contrato</ParameterName>
|
|
||||||
</CellDefinition>
|
|
||||||
<CellDefinition>
|
|
||||||
<ColumnIndex>1</ColumnIndex>
|
|
||||||
<RowIndex>48</RowIndex>
|
|
||||||
<ParameterName>EnvioTel</ParameterName>
|
|
||||||
</CellDefinition>
|
|
||||||
<CellDefinition>
|
|
||||||
<ColumnIndex>0</ColumnIndex>
|
|
||||||
<RowIndex>49</RowIndex>
|
|
||||||
<ParameterName>Kilometraje</ParameterName>
|
|
||||||
</CellDefinition>
|
|
||||||
</CellDefinitions>
|
|
||||||
</GridLayoutDefinition>
|
|
||||||
</ReportParametersLayout>
|
|
||||||
<EmbeddedImages>
|
<EmbeddedImages>
|
||||||
<EmbeddedImage Name="ID2">
|
<EmbeddedImage Name="ID2">
|
||||||
<MIMEType>image/png</MIMEType>
|
<MIMEType>image/png</MIMEType>
|
||||||
|
|||||||
6015
Empresas/158/Formatos/Factura.rdlc
Normal file
6015
Empresas/158/Formatos/Factura.rdlc
Normal file
File diff suppressed because it is too large
Load Diff
@@ -2091,6 +2091,8 @@ Partial Class GPS_Rastreo
|
|||||||
DtDatos.Columns.Add("Evento", GetType(String))
|
DtDatos.Columns.Add("Evento", GetType(String))
|
||||||
DtDatos.Columns.Add("LatLng", GetType(String))
|
DtDatos.Columns.Add("LatLng", GetType(String))
|
||||||
|
|
||||||
|
Dim KMRecorridos = DtPosiciones.SUM("KMRecorridos").ToString
|
||||||
|
|
||||||
Try
|
Try
|
||||||
Dim Direcciones As JArray = ConsultarDirecciones(DtPosiciones)
|
Dim Direcciones As JArray = ConsultarDirecciones(DtPosiciones)
|
||||||
For Each row As DataRow In DtPosiciones.Rows
|
For Each row As DataRow In DtPosiciones.Rows
|
||||||
@@ -2107,6 +2109,12 @@ Partial Class GPS_Rastreo
|
|||||||
For Each Dir As JObject In Direcciones
|
For Each Dir As JObject In Direcciones
|
||||||
DtDatos.Rows(Dir("Indice").ToEntero())("Direccion") = Dir("Direccion").ToString()
|
DtDatos.Rows(Dir("Indice").ToEntero())("Direccion") = Dir("Direccion").ToString()
|
||||||
Next
|
Next
|
||||||
|
|
||||||
|
|
||||||
|
DtDatos.Columns("Vehiculo").ColumnName = "Vehículo"
|
||||||
|
DtDatos.Columns("TiempoDetenido").ColumnName = "Tiempo Detenido"
|
||||||
|
DtDatos.Columns("Direccion").ColumnName = "Dirección"
|
||||||
|
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
GuardaLog(String.Format("Ocurrio un error al generar el reporte RLDC {0}", ex))
|
GuardaLog(String.Format("Ocurrio un error al generar el reporte RLDC {0}", ex))
|
||||||
End Try
|
End Try
|
||||||
@@ -2159,15 +2167,17 @@ Partial Class GPS_Rastreo
|
|||||||
|
|
||||||
|
|
||||||
If FechaI.Length > 0 And FechaF.Length > 0 Then
|
If FechaI.Length > 0 And FechaF.Length > 0 Then
|
||||||
Dim RangoFechas = worksheet.Cells.GetSubrangeAbsolute(4, celdasConTexto.FirstColumnIndex, 4, celdasConTexto.LastColumnIndex)
|
|
||||||
RangoFechas.Merged = True
|
|
||||||
RangoFechas.Value = $"Fechas: {FechaI} a {FechaF}"
|
|
||||||
RangoFechas.Style.Font.Size = 15 * 20
|
|
||||||
RangoFechas.Style.Font.Name = "Calibri Light"
|
|
||||||
RangoFechas.Style.HorizontalAlignment = GemBox.Spreadsheet.HorizontalAlignmentStyle.Center
|
|
||||||
RangoFechas.Style.VerticalAlignment = GemBox.Spreadsheet.VerticalAlignmentStyle.Center
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
Dim RangoFechas = worksheet.Cells.GetSubrangeAbsolute(4, celdasConTexto.FirstColumnIndex, 4, celdasConTexto.LastColumnIndex)
|
||||||
|
RangoFechas.Merged = True
|
||||||
|
RangoFechas.Value = $"Distancia: {KMRecorridos:N2} KM {If(FechaI.Length > 0 And FechaF.Length > 0, $"Fechas: {FechaI} a {FechaF}", "")}"
|
||||||
|
RangoFechas.Style.Font.Size = 15 * 20
|
||||||
|
RangoFechas.Style.Font.Name = "Calibri Light"
|
||||||
|
RangoFechas.Style.HorizontalAlignment = GemBox.Spreadsheet.HorizontalAlignmentStyle.Center
|
||||||
|
RangoFechas.Style.VerticalAlignment = GemBox.Spreadsheet.VerticalAlignmentStyle.Center
|
||||||
|
|
||||||
|
|
||||||
For i = celdasConTexto.FirstColumnIndex To celdasConTexto.LastColumnIndex
|
For i = celdasConTexto.FirstColumnIndex To celdasConTexto.LastColumnIndex
|
||||||
|
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ public partial class General_CATIEPSxEntidadFed : ClsPaginas
|
|||||||
DdlEstado.DataBind();
|
DdlEstado.DataBind();
|
||||||
|
|
||||||
|
|
||||||
DdlEstado.Items.Insert(0, new ListItem("Seleccione", "-1"));
|
DdlEstado.Items.Insert(0, new ListItem("Todos", "-1"));
|
||||||
RcveEstado = Request["cveEstado"] == null ? -1 : Request["cveEstado"].ToString().ToEntero();
|
RcveEstado = Request["cveEstado"] == null ? -1 : Request["cveEstado"].ToString().ToEntero();
|
||||||
RtasaIEPS = Request["tasaIEPS"] == null ? -1 : Request["tasaIEPS"].ToString().ToDecimal();
|
RtasaIEPS = Request["tasaIEPS"] == null ? -1 : Request["tasaIEPS"].ToString().ToDecimal();
|
||||||
RfechaInicio = Request["fechaInicio"] == null ? string.Format("01/{0:MM/yyyy}", DateTime.Now.AddMonths(-1)) : Request["fechaInicio"].ToString();
|
RfechaInicio = Request["fechaInicio"] == null ? string.Format("01/{0:MM/yyyy}", DateTime.Now.AddMonths(-1)) : Request["fechaInicio"].ToString();
|
||||||
|
|||||||
@@ -1046,7 +1046,7 @@
|
|||||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvIncons.ClientID) %>" style="margin-top: -3px; margin-left: -13px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvIncons.ClientID) %>" style="margin-top: -3px; margin-left: -13px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<asp:GridView ID="GvIncons" runat="server" CssClass="table table-striped table-advance table-hover Widthall ScrollAD mysmallbtn" GridLines="None">
|
<asp:GridView ID="GvIncons" runat="server" CssClass="table table-striped table-advance table-hover Widthall ScrollAD mysmallbtn" GridLines="None" EmptyDataText="Felicidades, lo lograste, no tienes inconsistencias">
|
||||||
</asp:GridView>
|
</asp:GridView>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<asp:UpdatePanel runat="server">
|
<asp:UpdatePanel runat="server">
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ Partial Class Inventarios_AjustesSeccionAlmacen
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub CargaCombos()
|
Private Sub CargaCombos()
|
||||||
Dim DtAlmacenes As DataTable = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveTipoAlmacen:=-1).FiltraParametros("CveTipoAlmacen in (1,12,14,16)")
|
Dim DtAlmacenes As DataTable = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveTipoAlmacen:=-1).FiltraParametros("CveTipoAlmacen in (1,12,14,16, 26)")
|
||||||
|
|
||||||
DdlAlmacen.DataSource = DtAlmacenes
|
DdlAlmacen.DataSource = DtAlmacenes
|
||||||
DdlAlmacen.DataBind()
|
DdlAlmacen.DataBind()
|
||||||
|
|||||||
@@ -335,6 +335,45 @@
|
|||||||
</asp:GridView>
|
</asp:GridView>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div id="DivRecepcionApartado" runat="server" visible="false" class="portlet light xspadding bordered">
|
||||||
|
<div class="portlet-title">
|
||||||
|
<div class="caption font-green">
|
||||||
|
<i class="icon-pin font-green"></i>
|
||||||
|
<span class="caption-subject bold uppercase">Apartado Usado</span>
|
||||||
|
</div>
|
||||||
|
<div class="actions">
|
||||||
|
<div class="btn-group">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="tools">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="portlet-body">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-8">
|
||||||
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
|
<asp:DropDownList ID="DdlMarcaRem" CssClass="form-control input-sm select2me" runat="server" DataTextField="Marca" DataValueField="CveMarca" Width="100%">
|
||||||
|
<asp:ListItem Selected="True" Text="Seleccione la Marca" Value="-1"></asp:ListItem>
|
||||||
|
</asp:DropDownList>
|
||||||
|
<label for="<%= DdlMarcaRem.ClientID.ToString()%>">Marca:</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-4">
|
||||||
|
<label for="<%= TxtFechaAjuste.ClientID.ToString()%>">Fecha Vigencia:</label>
|
||||||
|
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 120px !important; padding: 0px;">
|
||||||
|
<asp:TextBox ID="TxtFechaVigencia" CssClass="form-control input-sm ADSMaskDate" Width="100%" runat="server"></asp:TextBox>
|
||||||
|
<span class="input-group-btn ">
|
||||||
|
<asp:LinkButton ID="LnkFechaVigencia" class="btn default " Text=" <i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||||
|
</span>
|
||||||
|
<ajax:MaskedEditExtender ID="MEEFechaVigencia" runat="server" TargetControlID="TxtFechaVigencia" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||||
|
<ajax:CalendarExtender runat="server" ID="CEFechaVigencia" TargetControlID="TxtFechaVigencia" PopupButtonID="LnkFechaVigencia" PopupPosition="BottomRight" Enabled="True" Format="dd/MM/yyyy"></ajax:CalendarExtender>
|
||||||
|
<asp:RequiredFieldValidator ID="RFVFechaVigencia" runat="server" ControlToValidate="TxtFechaVigencia" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha Vigencia''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||||
|
<ajax:ValidatorCalloutExtender ID="VCEFechaVigencia" runat="server" HighlightCssClass="vco" TargetControlID="RFVFechaVigencia"></ajax:ValidatorCalloutExtender>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="DivAjuste" runat="server" visible="false" class="col-md-6">
|
<div id="DivAjuste" runat="server" visible="false" class="col-md-6">
|
||||||
<asp:UpdatePanel ID="UpAjuste" runat="server" class="portlet light xspadding bordered" UpdateMode="Conditional">
|
<asp:UpdatePanel ID="UpAjuste" runat="server" class="portlet light xspadding bordered" UpdateMode="Conditional">
|
||||||
|
|||||||
@@ -317,6 +317,15 @@ Partial Class Inventarios_RecepcionUsados
|
|||||||
ViewState("DtPorcentajeMarcas") = value
|
ViewState("DtPorcentajeMarcas") = value
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
Private Property TmpDTPolizaVirtual As DataTable
|
||||||
|
Get
|
||||||
|
Return If(IsNothing(ViewState("TmpDTPolizaVirtual")), Nothing, CType(ViewState("TmpDTPolizaVirtual"), DataTable))
|
||||||
|
End Get
|
||||||
|
Set(value As DataTable)
|
||||||
|
ViewState("TmpDTPolizaVirtual") = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||||
@@ -1125,57 +1134,76 @@ Partial Class Inventarios_RecepcionUsados
|
|||||||
Recibio:=TxtResponsable.Text.Trim, CveCliente:=CveCliente, CveClienteSucursal:=CveClienteSucursal, DepartamentoEntrega:=TxtDepartamentoEntrega.Text,
|
Recibio:=TxtResponsable.Text.Trim, CveCliente:=CveCliente, CveClienteSucursal:=CveClienteSucursal, DepartamentoEntrega:=TxtDepartamentoEntrega.Text,
|
||||||
PedidoContrato:=TxtPedidoContrato.Text, CveProveedor:=tCveProveedor, Modulo:="RU/G")
|
PedidoContrato:=TxtPedidoContrato.Text, CveProveedor:=tCveProveedor, Modulo:="RU/G")
|
||||||
If CveMovimiento <= 0 Then
|
If CveMovimiento <= 0 Then
|
||||||
Mensaje = "Error al guardar los movimientos"
|
Mensaje = "Error al guardar los movimientos"
|
||||||
ErrorMovInv = True
|
ErrorMovInv = True
|
||||||
Else
|
Else
|
||||||
FolioInv = ObjInventario.Folio.ToString()
|
FolioInv = ObjInventario.Folio.ToString()
|
||||||
|
|
||||||
For Each Dr As DataRow In DtMovimientos.Rows
|
For Each Dr As DataRow In DtMovimientos.Rows
|
||||||
|
|
||||||
If CveConcepto = 42 AndAlso DdlMoneda.SelectedValue.ToEntero = 2 Then
|
If CveConcepto = 42 AndAlso DdlMoneda.SelectedValue.ToEntero = 2 Then
|
||||||
ImporteConcepto = Dr("PU").ToString.ToDecimal * GlobalTipoCambio(TxtFecha.Text.ToDate).ToDecimal
|
ImporteConcepto = Dr("PU").ToString.ToDecimal * GlobalTipoCambio(TxtFecha.Text.ToDate).ToDecimal
|
||||||
Else
|
Else
|
||||||
ImporteConcepto = Dr("PU").ToString.ToDecimal
|
ImporteConcepto = Dr("PU").ToString.ToDecimal
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimiento, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, ImporteConcepto, CveAF:=Dr("CveAF").ToString.ToEntero, Serie:=Dr("Serie").ToString, Lote:=Dr("Lote").ToString, FechaCaducidad:=Dr("FechaCaducidad").ToString.ToDate, Observaciones:=Dr("Observaciones").ToString, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
|
If Not ObjInventario.AddMovimientoDetalle(CveMovimiento, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, ImporteConcepto, CveAF:=Dr("CveAF").ToString.ToEntero, Serie:=Dr("Serie").ToString, Lote:=Dr("Lote").ToString, FechaCaducidad:=Dr("FechaCaducidad").ToString.ToDate, Observaciones:=Dr("Observaciones").ToString, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
|
||||||
Mensaje = "Error al guardar los movimientos"
|
Mensaje = "Error al guardar los movimientos"
|
||||||
|
ErrorMovInv = True
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
|
||||||
|
If CveVenta > 0 AndAlso Not ObjVentas.UpdateVentaUsadoRecibido(CveVenta, Dr("CvePS").ToString.ToEntero, True, CveMovimiento) Then
|
||||||
|
Mensaje = "Error al actualizar el recibo de los usados"
|
||||||
|
ErrorMovInv = True
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
|
||||||
|
'si es selectedvalue = 42, es entrada ,3 -salida
|
||||||
|
Dim CveConceptoUsados As Integer = If(RBLOpcion.SelectedValue.ToEntero = 42, 1, 2)
|
||||||
|
|
||||||
|
If EsDistribuidor AndAlso RBLOpcion.SelectedValue.ToEntero = 42 AndAlso Dr("CveTamaño").ToString.ToEntero > 0 Then
|
||||||
|
|
||||||
|
If Not ObjAcum.DistribuidorMovtosAdd(DdlClientes.SelectedValue.ToEntero, Dr("Cantidad").ToString.ToEntero(), Dr("CveTamaño").ToString.ToEntero, CveConceptoUsados, CveVenta, UsuarioActual.CveUsuario,
|
||||||
|
UsuarioActual.CveEmpresa, 0, Dr("Observaciones").ToString, CveMovimiento:=CveMovimiento) Then
|
||||||
|
Mensaje = "Error al guardar Movimientos de distribuidor"
|
||||||
ErrorMovInv = True
|
ErrorMovInv = True
|
||||||
Exit For
|
Exit For
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If CveVenta > 0 AndAlso Not ObjVentas.UpdateVentaUsadoRecibido(CveVenta, Dr("CvePS").ToString.ToEntero, True, CveMovimiento) Then
|
End If
|
||||||
Mensaje = "Error al actualizar el recibo de los usados"
|
Next
|
||||||
ErrorMovInv = True
|
|
||||||
Exit For
|
|
||||||
End If
|
|
||||||
|
|
||||||
'si es selectedvalue = 42, es entrada ,3 -salida
|
'ACTUALIZA LA POLIZA VIRTUAL DEL LA REMISION
|
||||||
Dim CveConceptoUsados As Integer = If(RBLOpcion.SelectedValue.ToEntero = 42, 1, 2)
|
'If Not ErrorMovInv AndAlso ObjFactura.TipoDocto = "Rem" Then
|
||||||
|
' If ObjAcum.GetPolizasVirtuales(ObjFactura.CveVenta) Then
|
||||||
|
' Dim DtPoliza As DataTable = ObjAcum.DtResultados.Copy()
|
||||||
|
' For Each RowPoliza As DataRow In DtPoliza.Rows
|
||||||
|
' If Not ObjAcum.UpdatePolizaVirtual(RowPoliza("CvePolizaVirtual").ToString().ToEntero, DdlMarcaRem.SelectedValue.ToEntero(), TxtFechaVigencia.Text.ToDateTime()) Then
|
||||||
|
' Mensaje = "Error al guardar la póliza virtual"
|
||||||
|
' ErrorMovInv = True
|
||||||
|
' Exit For
|
||||||
|
' End If
|
||||||
|
' Next
|
||||||
|
|
||||||
If EsDistribuidor AndAlso RBLOpcion.SelectedValue.ToEntero = 42 AndAlso Dr("CveTamaño").ToString.ToEntero > 0 Then
|
' DtPoliza.Dispose()
|
||||||
|
' Else
|
||||||
|
' Mensaje = "Error al obtener la póliza virtual"
|
||||||
|
' ErrorMovInv = True
|
||||||
|
' End If
|
||||||
|
'End If
|
||||||
|
|
||||||
If Not ObjAcum.DistribuidorMovtosAdd(DdlClientes.SelectedValue.ToEntero, Dr("Cantidad").ToString.ToEntero(), Dr("CveTamaño").ToString.ToEntero, CveConceptoUsados, CveVenta, UsuarioActual.CveUsuario,
|
'GENERA LA PREPOLIZA DE ALMACEN VS EL CONCEPTO DE RNC
|
||||||
UsuarioActual.CveEmpresa, 0, Dr("Observaciones").ToString, CveMovimiento:=CveMovimiento) Then
|
'If Not ErrorMovInv Then
|
||||||
Mensaje = "Error al guardar Movimientos de distribuidor"
|
' ErrorMovInv = Not GeneraPrePoliza(CveMovimiento, ObjInventario, ObjConta, True)
|
||||||
ErrorMovInv = True
|
'End If
|
||||||
Exit For
|
|
||||||
End If
|
|
||||||
|
|
||||||
End If
|
|
||||||
Next
|
|
||||||
|
|
||||||
'GENERA LA PREPOLIZA DE ALMACEN VS EL CONCEPTO DE RNC
|
|
||||||
'If Not ErrorMovInv Then
|
|
||||||
' ErrorMovInv = Not GeneraPrePoliza(CveMovimiento, ObjInventario, ObjConta, True)
|
|
||||||
'End If
|
|
||||||
|
|
||||||
End If
|
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
If Not ErrorMovInv Then
|
|
||||||
|
If Not ErrorMovInv Then
|
||||||
If Resp IsNot Nothing Then
|
If Resp IsNot Nothing Then
|
||||||
For Each mensaje2 As String In Resp.Mensajes
|
For Each mensaje2 As String In Resp.Mensajes
|
||||||
Msg.AppendFormat("<br>{0}", mensaje2)
|
Msg.AppendFormat("<br>{0}", mensaje2)
|
||||||
@@ -1473,6 +1501,13 @@ Partial Class Inventarios_RecepcionUsados
|
|||||||
GvM.DataSource = DtTemp
|
GvM.DataSource = DtTemp
|
||||||
GvM.DataBind()
|
GvM.DataBind()
|
||||||
|
|
||||||
|
'If TmpDTPolizaVirtual IsNot Nothing AndAlso RblUsadosAjuste.SelectedValue = "2" Then
|
||||||
|
' TmpDTPolizaVirtual.Clear()
|
||||||
|
' For Each Row As DataRow In DtTemp.Rows
|
||||||
|
' AddPolizaVirtual(Row("CvePS").ToString().ToEntero())
|
||||||
|
' Next
|
||||||
|
'End If
|
||||||
|
|
||||||
EscondeColumnasGVM(DtTemp)
|
EscondeColumnasGVM(DtTemp)
|
||||||
End Sub
|
End Sub
|
||||||
Private Sub EscondeColumnasGVM(DtTemp As DataTable)
|
Private Sub EscondeColumnasGVM(DtTemp As DataTable)
|
||||||
@@ -2076,6 +2111,14 @@ Partial Class Inventarios_RecepcionUsados
|
|||||||
DdlClientes.SelectedValueExist(CveCliente)
|
DdlClientes.SelectedValueExist(CveCliente)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If Me.ObjFactura IsNot Nothing Then
|
||||||
|
Me.ObjFactura.Dispose()
|
||||||
|
Me.ObjFactura = Nothing
|
||||||
|
End If
|
||||||
|
|
||||||
|
Me.ObjFactura = New Modelos.Factura(UsuarioActual, CveRemisionRecibida, UsuarioActual.CveEmpresa, DirectorioServidor:=ModExtensiones.DirectorioBaseEmpresas)
|
||||||
|
|
||||||
|
|
||||||
'SI ES DISTRIBUIDOR VAMOS A GENERAR LA REMISION DE NOTA DE CREDITO
|
'SI ES DISTRIBUIDOR VAMOS A GENERAR LA REMISION DE NOTA DE CREDITO
|
||||||
If EsDistribuidor Then
|
If EsDistribuidor Then
|
||||||
DivCliente.Visible = True
|
DivCliente.Visible = True
|
||||||
@@ -2087,13 +2130,6 @@ Partial Class Inventarios_RecepcionUsados
|
|||||||
Me.ObjRemisionNC = Nothing
|
Me.ObjRemisionNC = Nothing
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If Me.ObjFactura IsNot Nothing Then
|
|
||||||
Me.ObjFactura.Dispose()
|
|
||||||
Me.ObjFactura = Nothing
|
|
||||||
End If
|
|
||||||
|
|
||||||
Me.ObjFactura = New Modelos.Factura(UsuarioActual, CveRemisionRecibida, UsuarioActual.CveEmpresa, DirectorioServidor:=ModExtensiones.DirectorioBaseEmpresas)
|
|
||||||
|
|
||||||
If Me.ObjFactura IsNot Nothing Then
|
If Me.ObjFactura IsNot Nothing Then
|
||||||
'CreaRemisionNC(ObjFactura.CveCliente, ObjFactura.CveSubProyecto, ObjFactura.CveMoneda)
|
'CreaRemisionNC(ObjFactura.CveCliente, ObjFactura.CveSubProyecto, ObjFactura.CveMoneda)
|
||||||
DivTotal.Visible = True
|
DivTotal.Visible = True
|
||||||
@@ -2102,12 +2138,17 @@ Partial Class Inventarios_RecepcionUsados
|
|||||||
'DivCliente.Visible = False
|
'DivCliente.Visible = False
|
||||||
'DivFactura.Visible = False
|
'DivFactura.Visible = False
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If ObjVentas.GetVentasUsadosDetalle(CveRemisionRecibida) Then
|
If ObjVentas.GetVentasUsadosDetalle(CveRemisionRecibida) Then
|
||||||
DtUsados = ObjVentas.DtResultados.Copy()
|
DtUsados = ObjVentas.DtResultados.Copy()
|
||||||
End If
|
End If
|
||||||
|
|
||||||
ObjVentas.Dispose()
|
ObjVentas.Dispose()
|
||||||
|
|
||||||
If DtUsados IsNot Nothing Then
|
If DtUsados IsNot Nothing Then
|
||||||
|
|
||||||
|
'DivRecepcionApartado.Visible = True
|
||||||
|
|
||||||
For Each RowUsado As DataRow In DtUsados.Rows
|
For Each RowUsado As DataRow In DtUsados.Rows
|
||||||
Dim CvePS = RowUsado("CvePS").ToString().ToEntero()
|
Dim CvePS = RowUsado("CvePS").ToString().ToEntero()
|
||||||
|
|
||||||
@@ -2271,6 +2312,10 @@ Partial Class Inventarios_RecepcionUsados
|
|||||||
Me.ObjRemisionNC.PedidoContrato = ""
|
Me.ObjRemisionNC.PedidoContrato = ""
|
||||||
Me.ObjRemisionNC.ObservacionesAlmacen = ""
|
Me.ObjRemisionNC.ObservacionesAlmacen = ""
|
||||||
|
|
||||||
|
'If TmpDTPolizaVirtual IsNot Nothing Then
|
||||||
|
' Me.ObjRemisionNC.DtPolizasVirtuales = TmpDTPolizaVirtual
|
||||||
|
'End If
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Function AddPSRNC(ByRef TmpDT As DataTable, Cantidad As Decimal, CveUM As Integer, UM As String, CveClasificacion As Integer, Clasificacion As String, CvePS As Integer, PS As String, Obs As String,
|
Private Function AddPSRNC(ByRef TmpDT As DataTable, Cantidad As Decimal, CveUM As Integer, UM As String, CveClasificacion As Integer, Clasificacion As String, CvePS As Integer, PS As String, Obs As String,
|
||||||
@@ -3087,6 +3132,10 @@ Partial Class Inventarios_RecepcionUsados
|
|||||||
ObjPS.Dispose()
|
ObjPS.Dispose()
|
||||||
|
|
||||||
GuardaAjuste()
|
GuardaAjuste()
|
||||||
|
|
||||||
|
'If TmpDTPolizaVirtual Is Nothing Then
|
||||||
|
' CreaDTmpDTPolizaVirtual()
|
||||||
|
'End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Protected Sub CargarDescuento()
|
Protected Sub CargarDescuento()
|
||||||
@@ -3251,15 +3300,126 @@ Partial Class Inventarios_RecepcionUsados
|
|||||||
Using ObjMarcas As New ClsProductosServicios
|
Using ObjMarcas As New ClsProductosServicios
|
||||||
If ObjMarcas.GetMarcas(UsuarioActual.CveEmpresa) Then
|
If ObjMarcas.GetMarcas(UsuarioActual.CveEmpresa) Then
|
||||||
DdlMarcaPSAjuste.DataSource = ObjMarcas.DtResultados
|
DdlMarcaPSAjuste.DataSource = ObjMarcas.DtResultados
|
||||||
|
DdlMarcaRem.DataSource = ObjMarcas.DtResultados
|
||||||
End If
|
End If
|
||||||
End Using
|
End Using
|
||||||
|
|
||||||
DdlMarcaPSAjuste.DataBind()
|
DdlMarcaPSAjuste.DataBind()
|
||||||
|
DdlMarcaRem.DataBind()
|
||||||
|
|
||||||
DdlMarcaPSAjuste.Items.Insert(0, New ListItem("Todas", "-1"))
|
DdlMarcaPSAjuste.Items.Insert(0, New ListItem("Todas", "-1"))
|
||||||
|
DdlMarcaRem.Items.Insert(0, New ListItem("Todas", "-1"))
|
||||||
|
|
||||||
UpAjuste.Update()
|
UpAjuste.Update()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
#Region "P O L I Z A - V I R T U A L"
|
||||||
|
Private Sub CreaDTmpDTPolizaVirtual()
|
||||||
|
TmpDTPolizaVirtual = New DataTable
|
||||||
|
TmpDTPolizaVirtual.Columns.Add("CvePS", GetType(Integer))
|
||||||
|
TmpDTPolizaVirtual.Columns.Add("Cantidad", GetType(Decimal))
|
||||||
|
TmpDTPolizaVirtual.Columns.Add("PU", GetType(Decimal))
|
||||||
|
TmpDTPolizaVirtual.Columns.Add("Descuento", GetType(Decimal))
|
||||||
|
TmpDTPolizaVirtual.Columns.Add("Total", GetType(Decimal))
|
||||||
|
TmpDTPolizaVirtual.Columns.Add("CveVentaDetalle", GetType(Integer))
|
||||||
|
TmpDTPolizaVirtual.Columns.Add("TipoServicio", GetType(Integer))
|
||||||
|
TmpDTPolizaVirtual.Columns.Add("TipoPoliza", GetType(Integer))
|
||||||
|
TmpDTPolizaVirtual.Columns.Add("CveModeloAuto", GetType(Integer))
|
||||||
|
TmpDTPolizaVirtual.Columns.Add("AnioVehiculo", GetType(Integer))
|
||||||
|
TmpDTPolizaVirtual.Columns.Add("TieneUsado", GetType(Boolean))
|
||||||
|
TmpDTPolizaVirtual.Columns.Add("FechaUsado", GetType(DateTime))
|
||||||
|
TmpDTPolizaVirtual.Columns.Add("CvePSUsado", GetType(Integer))
|
||||||
|
TmpDTPolizaVirtual.Columns.Add("CveBCIUsado", GetType(Integer))
|
||||||
|
End Sub
|
||||||
|
Private Function AddPolizaVirtual(CvePS As Integer) As Boolean
|
||||||
|
|
||||||
|
Dim Retorno As Boolean = True
|
||||||
|
|
||||||
|
'If Modalidad = "U" Then
|
||||||
|
' If TmpDTPolizaVirtual.Rows.Count > 0 Then
|
||||||
|
' Dim Elimino As Boolean = False
|
||||||
|
' For Each RowPoliza As DataRow In TmpDTPolizaVirtual.Rows
|
||||||
|
' If RowPoliza("CvePS").ToString().ToEntero() = CvePS Then
|
||||||
|
' RowPoliza.Delete()
|
||||||
|
' Elimino = True
|
||||||
|
' Exit For
|
||||||
|
' End If
|
||||||
|
' Next
|
||||||
|
' If Elimino Then
|
||||||
|
' TmpDTRecepcionUsados.AcceptChanges()
|
||||||
|
' End If
|
||||||
|
' End If
|
||||||
|
'End If
|
||||||
|
|
||||||
|
Dim DrPS As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePS).FiltroPrimero("")
|
||||||
|
|
||||||
|
If DrPS IsNot Nothing Then
|
||||||
|
'SOLO DEBE AGREGAR POLIZA VIRTUAL SI ES ACUMULADOR
|
||||||
|
If Not DrPS("CveClasificacion").ToString().ToEntero().Contiene(20520, 20522, 20513, 20511, 20521, 20512, 20514, 20229) Then
|
||||||
|
Return Retorno
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
Retorno = False
|
||||||
|
Return Retorno
|
||||||
|
End If
|
||||||
|
|
||||||
|
Dim Cantidad As Decimal = 1
|
||||||
|
Dim PU As Decimal = txtPrecio.Text.ToDecimal()
|
||||||
|
Dim Descuento As Decimal = 0
|
||||||
|
Dim ImporteAjuste As Decimal = TxtImporteAjuste.Text.ToDecimal().RoundSQL(2)
|
||||||
|
|
||||||
|
Dim Total As Decimal = ((Cantidad * PU) - Descuento).RoundSQL(2)
|
||||||
|
Dim TipoServicio As Integer = -1
|
||||||
|
Dim FechaUsado As DateTime = If(TxtFechaAjuste.Text.ToDateTime() < MinFecha, Now, TxtFechaAjuste.Text.ToDateTime())
|
||||||
|
Dim CveModeloAuto As Integer = -1
|
||||||
|
Dim AnioVehiculo As Integer = 0
|
||||||
|
Dim TipoPoliza As Integer = 1 'VENTA
|
||||||
|
|
||||||
|
If Total = ImporteAjuste Then
|
||||||
|
TipoPoliza = 3 'GARANTIA
|
||||||
|
Else
|
||||||
|
TipoPoliza = 2 'AJUSTE
|
||||||
|
End If
|
||||||
|
|
||||||
|
'Dim TieneUsado As Boolean = GvRecepcionUsados.Rows.Cast(Of GridViewRow).Any(Function(GvRow) GvRow.RowType = DataControlRowType.DataRow AndAlso GvRow.FCTextBox("TxtCantidad").Text.ToDecimal() > 0)
|
||||||
|
Dim CvePSUsado As Integer = -1
|
||||||
|
Dim CveBCIUsado As Integer = -1
|
||||||
|
|
||||||
|
'If TieneUsado Then
|
||||||
|
' For Each GvRow As GridViewRow In GvRecepcionUsados.Rows
|
||||||
|
' If GvRow.RowType = DataControlRowType.DataRow Then
|
||||||
|
' If GvRow.FCTextBox("TxtCantidad").Text.ToDecimal() > 0 Then
|
||||||
|
' CvePSUsado = GvRow.DataKey("CvePSCargo").ToEntero()
|
||||||
|
' CveBCIUsado = GvRow.FCDropDownList("DdlBCIUsado").SelectedValue.ToEntero()
|
||||||
|
|
||||||
|
' Exit For
|
||||||
|
' End If
|
||||||
|
' End If
|
||||||
|
' Next
|
||||||
|
'End If
|
||||||
|
|
||||||
|
Dim Row As DataRow = TmpDTPolizaVirtual.NewRow()
|
||||||
|
Row("CvePS") = CvePS
|
||||||
|
Row("Cantidad") = Cantidad
|
||||||
|
Row("PU") = PU
|
||||||
|
Row("Descuento") = Descuento
|
||||||
|
Row("Total") = Total
|
||||||
|
Row("CveVentaDetalle") = -1
|
||||||
|
Row("TipoServicio") = TipoServicio
|
||||||
|
Row("TipoPoliza") = TipoPoliza
|
||||||
|
Row("CveModeloAuto") = CveModeloAuto
|
||||||
|
Row("AnioVehiculo") = AnioVehiculo
|
||||||
|
Row("TieneUsado") = 1
|
||||||
|
Row("FechaUsado") = FechaUsado
|
||||||
|
Row("CvePSUsado") = CvePSUsado
|
||||||
|
Row("CveBCIUsado") = CveBCIUsado
|
||||||
|
|
||||||
|
TmpDTPolizaVirtual.Rows.Add(Row)
|
||||||
|
|
||||||
|
Return Retorno
|
||||||
|
End Function
|
||||||
|
#End Region
|
||||||
|
|
||||||
|
|
||||||
Partial Class MFolioGarantiaMensaje
|
Partial Class MFolioGarantiaMensaje
|
||||||
Public Property CvePS As Integer
|
Public Property CvePS As Integer
|
||||||
|
|||||||
@@ -206,12 +206,11 @@
|
|||||||
CssClass="table table-striped table-advance table-hover Widthall ScrollAD"
|
CssClass="table table-striped table-advance table-hover Widthall ScrollAD"
|
||||||
data-sort="true" GridLines="None">
|
data-sort="true" GridLines="None">
|
||||||
<Columns>
|
<Columns>
|
||||||
<asp:BoundField HeaderText="Folio" DataField="Folio" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="5%" />
|
<asp:HyperlinkField DataTextField="Folio" HeaderText="Folio" DataNavigateUrlFormatString="/Inventarios/EntradasSalidas.aspx?CveMovimiento={0}" DataNavigateUrlFields="CveMovimiento" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="5%" />
|
||||||
|
<asp:BoundField HeaderText="Fecha" DataField="FechaMovto" DataFormatString="{0:d}" ItemStyle-Width="5%" />
|
||||||
<asp:BoundField HeaderText="Disponible" DataField="Cantidad" DataFormatString="{0:#,##0.00####}" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="5%" />
|
<asp:BoundField HeaderText="Disponible" DataField="Cantidad" DataFormatString="{0:#,##0.00####}" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="5%" />
|
||||||
<asp:BoundField HeaderText="Unidad" DataField="UnidadMedida" ItemStyle-Width="5%" />
|
<asp:BoundField HeaderText="Unidad" DataField="UnidadMedida" ItemStyle-Width="5%" />
|
||||||
<asp:BoundField HeaderText="Código" DataField="Codigo" ItemStyle-Width="5%" />
|
<asp:BoundField HeaderText="Código" DataField="Codigo" ItemStyle-Width="5%" />
|
||||||
|
|
||||||
|
|
||||||
<asp:BoundField HeaderText="Producto" DataField="PS" ItemStyle-HorizontalAlign="Left"/>
|
<asp:BoundField HeaderText="Producto" DataField="PS" ItemStyle-HorizontalAlign="Left"/>
|
||||||
<asp:BoundField HeaderText="Serie" DataField="Serie" ItemStyle-Width="5%" ItemStyle-HorizontalAlign="Left"/>
|
<asp:BoundField HeaderText="Serie" DataField="Serie" ItemStyle-Width="5%" ItemStyle-HorizontalAlign="Left"/>
|
||||||
<asp:BoundField HeaderText="Valor" DataField="Valor" ItemStyle-Width="5%" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:n}" />
|
<asp:BoundField HeaderText="Valor" DataField="Valor" ItemStyle-Width="5%" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:n}" />
|
||||||
|
|||||||
@@ -100,6 +100,13 @@ Partial Class RepTraspasoAlmacen
|
|||||||
Protected Sub GvDatos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvDatos.RowDataBound
|
Protected Sub GvDatos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvDatos.RowDataBound
|
||||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||||
|
|
||||||
|
If e.Row.DBCampo("Folio") = "" Then
|
||||||
|
e.Row.CssClass = "Totales"
|
||||||
|
Else
|
||||||
|
If e.Row.DBCampo("PS") = "" Then
|
||||||
|
e.Row.CssClass = "SubTotales"
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|||||||
@@ -399,7 +399,7 @@
|
|||||||
<ajax:FilteredTextBoxExtender ID="ftbeCant" runat="server" TargetControlID="txtCantidad" FilterType="Custom, Numbers" ValidChars="." />
|
<ajax:FilteredTextBoxExtender ID="ftbeCant" runat="server" TargetControlID="txtCantidad" FilterType="Custom, Numbers" ValidChars="." />
|
||||||
<asp:RequiredFieldValidator runat="server" ID="RFVCantidad" ControlToValidate="txtCantidad" ValidationGroup="GrpAgregar" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cantidad''</b> es necesario por favor introdúzcalo." Display="Dynamic" Text="*"></asp:RequiredFieldValidator>
|
<asp:RequiredFieldValidator runat="server" ID="RFVCantidad" ControlToValidate="txtCantidad" ValidationGroup="GrpAgregar" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cantidad''</b> es necesario por favor introdúzcalo." Display="Dynamic" Text="*"></asp:RequiredFieldValidator>
|
||||||
<ajax:ValidatorCalloutExtender ID="VCOCantidad" runat="server" HighlightCssClass="vco" TargetControlID="RFVCantidad" Width="300px"></ajax:ValidatorCalloutExtender>
|
<ajax:ValidatorCalloutExtender ID="VCOCantidad" runat="server" HighlightCssClass="vco" TargetControlID="RFVCantidad" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||||
<asp:RangeValidator ID="RVCantidad" runat="server" ControlToValidate="txtCantidad" Display="None" Type="Double" MinimumValue="0.1" MaximumValue="2147483647" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cantidad''</b> es necesario, por favor introdúzcalo." ValidationGroup="GrpAgregar"></asp:RangeValidator>
|
<asp:RangeValidator ID="RVCantidad" runat="server" ControlToValidate="txtCantidad" Display="None" Type="Double" MinimumValue="0.001" MaximumValue="2147483647" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cantidad''</b> es necesario, por favor introdúzcalo." ValidationGroup="GrpAgregar"></asp:RangeValidator>
|
||||||
<ajax:ValidatorCalloutExtender ID="VCECantidad" runat="server" HighlightCssClass="vco" TargetControlID="RVCantidad" Width="300px"></ajax:ValidatorCalloutExtender>
|
<ajax:ValidatorCalloutExtender ID="VCECantidad" runat="server" HighlightCssClass="vco" TargetControlID="RVCantidad" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
|
|||||||
@@ -3071,7 +3071,7 @@ Partial Class Inventarios_TraspasoAlmacen
|
|||||||
|
|
||||||
ElseIf DrAlmO("CveTipoAlmacen").ToString.ToEntero = 22 Then 'Recepcion de Usados
|
ElseIf DrAlmO("CveTipoAlmacen").ToString.ToEntero = 22 Then 'Recepcion de Usados
|
||||||
|
|
||||||
DdlAlmacenDestino.DataSource = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltraParametros("CveTipoAlmacen IN (22) AND Estatus = 'Activo'")
|
DdlAlmacenDestino.DataSource = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltraParametros("CveTipoAlmacen IN (21,22) AND Estatus = 'Activo'")
|
||||||
DdlAlmacenDestino.DataBind()
|
DdlAlmacenDestino.DataBind()
|
||||||
DdlAlmacenDestino.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
DdlAlmacenDestino.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||||
Else
|
Else
|
||||||
|
|||||||
@@ -264,7 +264,7 @@
|
|||||||
<asp:Literal ID="LtlFechaInicio" runat="server" Text='<%# Eval("FechaInicio", "{0:dd/MM/yyyy}") %>'></asp:Literal>
|
<asp:Literal ID="LtlFechaInicio" runat="server" Text='<%# Eval("FechaInicio", "{0:dd/MM/yyyy}") %>'></asp:Literal>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
<EditItemTemplate>
|
<EditItemTemplate>
|
||||||
<asp:TextBox ID="TxtFechaInicio" CssClass="form-control" runat="server" CausesValidation="true" Text='<%# Eval("FechaInicio") %>' ValidationGroup="GrpGV" MaxLength="10" Width="70px"></asp:TextBox>
|
<asp:TextBox ID="TxtFechaInicio" CssClass="form-control" runat="server" CausesValidation="true" Text='<%# Eval("FechaInicio", "{0:dd/MM/yyyy}") %>' ValidationGroup="GrpGV" MaxLength="10" Width="70px"></asp:TextBox>
|
||||||
<asp:RequiredFieldValidator ID="RFVFechaInicio" runat="server" ControlToValidate="TxtFechaInicio" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Días de Período''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGV"></asp:RequiredFieldValidator>
|
<asp:RequiredFieldValidator ID="RFVFechaInicio" runat="server" ControlToValidate="TxtFechaInicio" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Días de Período''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGV"></asp:RequiredFieldValidator>
|
||||||
<ajax:ValidatorCalloutExtender ID="VCFechaInicio" runat="server" HighlightCssClass="vco" TargetControlID="RFVFechaInicio" Width="300px"></ajax:ValidatorCalloutExtender>
|
<ajax:ValidatorCalloutExtender ID="VCFechaInicio" runat="server" HighlightCssClass="vco" TargetControlID="RFVFechaInicio" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||||
</EditItemTemplate>
|
</EditItemTemplate>
|
||||||
@@ -274,7 +274,7 @@
|
|||||||
<asp:Literal ID="LtlFechaFin" runat="server" Text='<%# Eval("FechaFin", "{0:d}") %>'></asp:Literal>
|
<asp:Literal ID="LtlFechaFin" runat="server" Text='<%# Eval("FechaFin", "{0:d}") %>'></asp:Literal>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
<EditItemTemplate>
|
<EditItemTemplate>
|
||||||
<asp:TextBox ID="TxtFechaFin" CssClass="form-control" runat="server" CausesValidation="true" Text='<%# Eval("FechaFin") %>' ValidationGroup="GrpGV" MaxLength="10" Width="70px"></asp:TextBox>
|
<asp:TextBox ID="TxtFechaFin" CssClass="form-control" runat="server" CausesValidation="true" Text='<%# Eval("FechaFin", "{0:dd/MM/yyyy}") %>' ValidationGroup="GrpGV" MaxLength="10" Width="70px"></asp:TextBox>
|
||||||
<asp:RequiredFieldValidator ID="RFVFechaFin" runat="server" ControlToValidate="TxtFechaFin" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Días de Período''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGV"></asp:RequiredFieldValidator>
|
<asp:RequiredFieldValidator ID="RFVFechaFin" runat="server" ControlToValidate="TxtFechaFin" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Días de Período''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGV"></asp:RequiredFieldValidator>
|
||||||
<ajax:ValidatorCalloutExtender ID="VCFechaFin" runat="server" HighlightCssClass="vco" TargetControlID="RFVFechaFin" Width="300px"></ajax:ValidatorCalloutExtender>
|
<ajax:ValidatorCalloutExtender ID="VCFechaFin" runat="server" HighlightCssClass="vco" TargetControlID="RFVFechaFin" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||||
</EditItemTemplate>
|
</EditItemTemplate>
|
||||||
|
|||||||
@@ -321,7 +321,7 @@ public partial class Nomina_CatConcepto : ClsPaginas
|
|||||||
|
|
||||||
if (EsEditar)
|
if (EsEditar)
|
||||||
{
|
{
|
||||||
TieneError = !ObjNomina.UpdateConcepto(codigo, concepto, tipo, formula, sistema, estado, CveConceptoPadre, CveConcepto, retencion, CveClasificacion, IdCtaContable, CveTipoGasto, tipoCalculo, CveConceptoContable, AplicaFiniquito, AutomaticoGlobal, Especie, Imprimir, CveSATConcepto);
|
TieneError = !ObjNomina.UpdateConcepto(codigo, concepto, tipo, formula, sistema, estado, CveConceptoPadre, CveConcepto, retencion, CveClasificacion, IdCtaContable, CveTipoGasto, tipoCalculo, CveConceptoContable, AplicaFiniquito, AutomaticoGlobal, Especie, Imprimir, CveSATConcepto,UsuarioActual.CveEmpresa);
|
||||||
|
|
||||||
if (TieneError)
|
if (TieneError)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -229,7 +229,7 @@ Partial Class Nomina_Nomina
|
|||||||
|
|
||||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||||
If Not IsPostBack Then
|
If Not IsPostBack Then
|
||||||
If UsuarioActual.CveEmpresa.Contiene(1, 80, 72, 119, 153, 158) Then
|
If UsuarioActual.CveEmpresa.Contiene(1, 48, 80, 72, 119, 153, 154, 158) Then
|
||||||
Response.Redirect("/Nomina/Nomina2.aspx")
|
Response.Redirect("/Nomina/Nomina2.aspx")
|
||||||
End If
|
End If
|
||||||
CargaTiposPeriodo()
|
CargaTiposPeriodo()
|
||||||
|
|||||||
@@ -4,7 +4,17 @@
|
|||||||
</asp:Content>
|
</asp:Content>
|
||||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||||
<style>
|
<style>
|
||||||
.dnone {display:none !important;}
|
.lblforchk {
|
||||||
|
font-size: 13px;
|
||||||
|
color: #888888;
|
||||||
|
opacity: 1;
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dnone {
|
||||||
|
display: none !important;
|
||||||
|
}
|
||||||
|
|
||||||
.GvConceptos tr td a {
|
.GvConceptos tr td a {
|
||||||
color: #5b9bd1;
|
color: #5b9bd1;
|
||||||
}
|
}
|
||||||
@@ -127,9 +137,10 @@
|
|||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
font-size: 15px;
|
font-size: 15px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.form-group.form-md-line-input .form-control.input-sm ~ label {
|
.form-group.form-md-line-input .form-control.input-sm ~ label {
|
||||||
padding-bottom: 20px;
|
padding-bottom: 20px;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
|
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
|
||||||
@@ -535,7 +546,7 @@
|
|||||||
|
|
||||||
|
|
||||||
<div id="DModalModAsistencia" class="modal ADS fade" role="dialog">
|
<div id="DModalModAsistencia" class="modal ADS fade" role="dialog">
|
||||||
<asp:UpdatePanel ID="UpdatePanel1" class="modal-dialog" tabindex="-1" runat="server" UpdateMode="Conditional">
|
<asp:UpdatePanel ID="UpModalAsistencia" class="modal-dialog" tabindex="-1" runat="server" UpdateMode="Conditional">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
<div class="modal-content rowpadding">
|
<div class="modal-content rowpadding">
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
@@ -726,7 +737,7 @@
|
|||||||
|
|
||||||
<div class="actions">
|
<div class="actions">
|
||||||
<div class="btn-group">
|
<div class="btn-group">
|
||||||
<a onclick="$('#C_BtnImprimirsobrerecibo').click()" class="btn btn-primary">Imprimir</a>
|
<a onclick="$('#C_BtnImprimirsobrerecibo').click()" class="btn yellow-gold">Imprimir</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -753,6 +764,7 @@
|
|||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Label ID="LtlImporte" runat="server" Text='<%# Eval("ImporteP", "${0:N}") %>' Style="word-break: break-all;"></asp:Label>
|
<asp:Label ID="LtlImporte" runat="server" Text='<%# Eval("ImporteP", "${0:N}") %>' Style="word-break: break-all;"></asp:Label>
|
||||||
<asp:LinkButton ID="LnkImporte" OnClick="LnkConcepto_Click" runat="server"></asp:LinkButton>
|
<asp:LinkButton ID="LnkImporte" OnClick="LnkConcepto_Click" runat="server"></asp:LinkButton>
|
||||||
|
<asp:LinkButton ID="LnkImportexCalculo" OnClick="LnkImportexCalculo_Click" runat="server" CssClass="btn btn-circle btn-sm btn-xs red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="¿Está seguro que desea eliminar el importe fijo?" data-btn-ok-label="si"></asp:LinkButton>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
<ItemStyle HorizontalAlign="Right" Width="13%" />
|
<ItemStyle HorizontalAlign="Right" Width="13%" />
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
@@ -773,6 +785,7 @@
|
|||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Label ID="LtlImporteD" runat="server" Text='<%# Eval("ImporteD", "${0:N}") %>' Style="word-break: break-all;"></asp:Label>
|
<asp:Label ID="LtlImporteD" runat="server" Text='<%# Eval("ImporteD", "${0:N}") %>' Style="word-break: break-all;"></asp:Label>
|
||||||
<asp:LinkButton ID="LnkImporteD" OnClick="LnkConcepto_Click" runat="server"></asp:LinkButton>
|
<asp:LinkButton ID="LnkImporteD" OnClick="LnkConcepto_Click" runat="server"></asp:LinkButton>
|
||||||
|
<asp:LinkButton ID="LnkImporteDxCalculo" OnClick="LnkImportexCalculo_Click" runat="server" CssClass="btn btn-circle btn-sm btn-xs red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="¿Está seguro que desea eliminar el importe fijo?" data-btn-ok-label="si"></asp:LinkButton>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
<ItemStyle HorizontalAlign="Right" Width="13%" />
|
<ItemStyle HorizontalAlign="Right" Width="13%" />
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
@@ -797,7 +810,6 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="actions">
|
<div class="actions">
|
||||||
<div class="btn-group">
|
<div class="btn-group">
|
||||||
<asp:Button ID="BtnGuardarInfornavit" OnClick="BtnGuardarInfornavit_Click" runat="server" Text="Guardar" class="btn btn-primary" />
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -861,6 +873,9 @@
|
|||||||
<asp:CheckBox ID="ChkInfo" CssClass="chksino" runat="server" Text=" " />
|
<asp:CheckBox ID="ChkInfo" CssClass="chksino" runat="server" Text=" " />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="text-right">
|
||||||
|
<asp:Button ID="BtnGuardarInfornavit" OnClick="BtnGuardarInfornavit_Click" runat="server" Text="Guardar" class="btn btn-primary" />
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
@@ -879,7 +894,6 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="actions">
|
<div class="actions">
|
||||||
<div class="btn-group">
|
<div class="btn-group">
|
||||||
<asp:LinkButton ID="LnkGuardarFonacot" OnClick="LnkGuardarFonacot_Click" runat="server" Text="Guardar" class="btn btn-primary" />
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -941,6 +955,9 @@
|
|||||||
<asp:CheckBox ID="ChkFonacot" CssClass="chksino" runat="server" Text=" " />
|
<asp:CheckBox ID="ChkFonacot" CssClass="chksino" runat="server" Text=" " />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="text-right">
|
||||||
|
<asp:LinkButton ID="LnkGuardarFonacot" OnClick="LnkGuardarFonacot_Click" runat="server" Text="Guardar" class="btn btn-primary" />
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
@@ -998,7 +1015,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="portlet-body ">
|
<div class="portlet-body ">
|
||||||
|
|
||||||
<div class="form-group form-md-line-input input-iconright">
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
<asp:TextBox ID="TxtDescripcion" CssClass="form-control" runat="server"></asp:TextBox>
|
<asp:TextBox ID="TxtDescripcion" CssClass="form-control" runat="server"></asp:TextBox>
|
||||||
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="TxtDescripcion" CssClass="help-block errorimput"
|
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="TxtDescripcion" CssClass="help-block errorimput"
|
||||||
@@ -1079,7 +1095,6 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
@@ -1096,9 +1111,8 @@
|
|||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="text-right">
|
<div class="text-right">
|
||||||
<asp:LinkButton ID="LnkAddMovto" OnClick="LnkAddMovto_Click" ValidationGroup="GrpGuardarMovyoPerma" CssClass="btn btn-primary" runat="server">Agregar</asp:LinkButton>
|
<asp:LinkButton ID="LnkAddMovto" OnClick="LnkAddMovto_Click" ValidationGroup="GrpGuardarMovyoPerma" CssClass="btn btn-primary" runat="server">Guardar</asp:LinkButton>
|
||||||
<asp:LinkButton ID="LnkUpMovto" OnClick="LnkUpMovto_Click" ValidationGroup="GrpGuardarMovyoPerma" CssClass="btn btn-success" runat="server">Actualizar</asp:LinkButton>
|
<asp:LinkButton ID="LnkUpMovto" OnClick="LnkUpMovto_Click" ValidationGroup="GrpGuardarMovyoPerma" CssClass="btn btn-success" runat="server">Actualizar</asp:LinkButton>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -1227,12 +1241,13 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="text-right">
|
||||||
|
<asp:LinkButton ID="LnkSRVacacionesUP" OnClick="LnkSRVacacionesUP_Click" Visible="false" CssClass="btn btn-success" ValidationGroup="VG_Vacaciones" runat="server">Actualizar</asp:LinkButton>
|
||||||
|
<asp:LinkButton ID="LnkSRVacacionesADD" OnClick="LnkSRVacacionesADD_Click" Visible="true" CssClass="btn btn-primary" ValidationGroup="VG_Vacaciones" runat="server">Guardar</asp:LinkButton>
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="text-right">
|
|
||||||
<asp:LinkButton ID="LnkSRVacacionesUP" OnClick="LnkSRVacacionesUP_Click" Visible="false" CssClass="btn btn-primary" ValidationGroup="VG_Vacaciones" runat="server">Actualizar</asp:LinkButton>
|
|
||||||
<asp:LinkButton ID="LnkSRVacacionesADD" OnClick="LnkSRVacacionesADD_Click" Visible="true" CssClass="btn btn-success" ValidationGroup="VG_Vacaciones" runat="server">Agregar</asp:LinkButton>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
@@ -1257,6 +1272,11 @@
|
|||||||
<div class="tools">
|
<div class="tools">
|
||||||
<a href="javascript:;" class="collapse" data-original-title="" title=""></a>
|
<a href="javascript:;" class="collapse" data-original-title="" title=""></a>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="actions">
|
||||||
|
<div class="btn-group">
|
||||||
|
<asp:LinkButton ID="LnkshowaaddIncapacidad" OnClick="LnkshowaaddIncapacidad_Click" CssClass="btn yellow-gold" runat="server">Agregar</asp:LinkButton>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="portlet-body">
|
<div class="portlet-body">
|
||||||
<asp:GridView ID="GVNom_PersonalIncapacidad" runat="server" GridLines="None" CssClass="table table-hover table-striped ScrollAD Widthall" AutoGenerateColumns="False"
|
<asp:GridView ID="GVNom_PersonalIncapacidad" runat="server" GridLines="None" CssClass="table table-hover table-striped ScrollAD Widthall" AutoGenerateColumns="False"
|
||||||
@@ -1294,11 +1314,6 @@
|
|||||||
<a href="javascript:;" class="collapse" data-original-title="" title=""></a>
|
<a href="javascript:;" class="collapse" data-original-title="" title=""></a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="actions">
|
|
||||||
<div class="btn-group">
|
|
||||||
<asp:LinkButton ID="LnkshowaaddIncapacidad" OnClick="LnkshowaaddIncapacidad_Click" CssClass="btn yellow-gold" runat="server">Agregar</asp:LinkButton>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="portlet-body">
|
<div class="portlet-body">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
@@ -1395,12 +1410,13 @@
|
|||||||
<ajax:ValidatorCalloutExtender ID="VcoNom_descripcion" runat="server" HighlightCssClass="vco" TargetControlID="RfvNom_descripcion"></ajax:ValidatorCalloutExtender>
|
<ajax:ValidatorCalloutExtender ID="VcoNom_descripcion" runat="server" HighlightCssClass="vco" TargetControlID="RfvNom_descripcion"></ajax:ValidatorCalloutExtender>
|
||||||
<asp:Label runat="server" AssociatedControlID="TxtSRINCdescripcion">Descripción</asp:Label>
|
<asp:Label runat="server" AssociatedControlID="TxtSRINCdescripcion">Descripción</asp:Label>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="text-right">
|
||||||
|
<asp:LinkButton ID="LnkActualizarIncapacidad" OnClick="LnkActualizarIncapacidad_Click" CssClass="btn btn-success " ValidationGroup="VGMNom_" runat="server">Actualizar</asp:LinkButton>
|
||||||
|
<asp:LinkButton ID="LnkAgregarIncapacidad" OnClick="LnkAgregarIncapacidad_Click" CssClass="btn btn-primary" ValidationGroup="VGMNom_" runat="server">Guardar</asp:LinkButton>
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="text-right">
|
|
||||||
<asp:LinkButton ID="LnkActualizarIncapacidad" OnClick="LnkActualizarIncapacidad_Click" CssClass="btn btn-primary" ValidationGroup="VGMNom_" runat="server">Actualizar</asp:LinkButton>
|
|
||||||
<asp:LinkButton ID="LnkAgregarIncapacidad" OnClick="LnkAgregarIncapacidad_Click" CssClass="btn btn-success" ValidationGroup="VGMNom_" runat="server">Agregar</asp:LinkButton>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
@@ -1429,7 +1445,7 @@
|
|||||||
<asp:Label ID="LblConceptoMod" runat="server" Text=""></asp:Label></h4>
|
<asp:Label ID="LblConceptoMod" runat="server" Text=""></asp:Label></h4>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<div runat="server" visible="<%# (SRCvePersonal <=0) %>" class="form-group form-md-line-input input-iconright">
|
<div runat="server" id="PnlConceptoPersonal" class="form-group form-md-line-input input-iconright">
|
||||||
<asp:Label runat="server" AssociatedControlID="DdlmcPersonal" Enabled="false" Text="Empleado"></asp:Label>
|
<asp:Label runat="server" AssociatedControlID="DdlmcPersonal" Enabled="false" Text="Empleado"></asp:Label>
|
||||||
<asp:DropDownList ID="DdlmcPersonal" DataTextField="Nombre" DataValueField="CvePersonal" runat="server" Width="100%" AppendDataBoundItems="true" CssClass="form-control select2me">
|
<asp:DropDownList ID="DdlmcPersonal" DataTextField="Nombre" DataValueField="CvePersonal" runat="server" Width="100%" AppendDataBoundItems="true" CssClass="form-control select2me">
|
||||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||||
@@ -1601,7 +1617,49 @@
|
|||||||
</ajax:TabPanel>
|
</ajax:TabPanel>
|
||||||
<ajax:TabPanel ID="TTUma" runat="server" HeaderText="UMA">
|
<ajax:TabPanel ID="TTUma" runat="server" HeaderText="UMA">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
<asp:GridView ID="GVUma" runat="server" CssClass="table table-striped table-hover mysmallbtn Widthall GvNominas" GridLines="None"></asp:GridView>
|
<div class="row">
|
||||||
|
|
||||||
|
<div class="col-md-4">
|
||||||
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
|
<asp:TextBox ID="TxtFechaUma" CssClass="form-control input-sm ADSMaskDate" runat="server"></asp:TextBox>
|
||||||
|
<asp:Label runat="server" AssociatedControlID="TxtFechaUma">Fecha Inicio</asp:Label>
|
||||||
|
<ajax:MaskedEditExtender ID="MEEFechaUma" runat="server" TargetControlID="TxtFechaUma" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||||
|
<ajax:CalendarExtender runat="server" ID="CEFechaUma" TargetControlID="TxtFechaUma" PopupPosition="BottomRight" Enabled="True" Format="dd/MM/yyyy"></ajax:CalendarExtender>
|
||||||
|
<asp:RequiredFieldValidator ID="rfvFechaUma" runat="server" ControlToValidate="TxtFechaUma" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha Inicio''</b> es necesario, por favor ingréselo." ValidationGroup="VGAddUma"></asp:RequiredFieldValidator>
|
||||||
|
<ajax:ValidatorCalloutExtender ID="VcoFechaUma" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaUma"></ajax:ValidatorCalloutExtender>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-4">
|
||||||
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
|
<asp:TextBox ID="TxtValorUma" CssClass="form-control input-sm " runat="server"></asp:TextBox>
|
||||||
|
<asp:RequiredFieldValidator ID="RfvValorUma" runat="server" ControlToValidate="TxtValorUma" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha Inicio''</b> es necesario, por favor ingréselo." ValidationGroup="VGAddUma"></asp:RequiredFieldValidator>
|
||||||
|
<ajax:ValidatorCalloutExtender ID="VcoValorUma" runat="server" HighlightCssClass="vco" TargetControlID="RfvValorUma"></ajax:ValidatorCalloutExtender>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-4">
|
||||||
|
<asp:LinkButton ID="LnkAddUMA" OnClick="LnkAddUMA_Click" CssClass="btn btn-primary" runat="server">Guardar</asp:LinkButton>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<asp:GridView ID="GVUma" runat="server" CssClass="table table-striped table-hover mysmallbtn Widthall GVUma" GridLines="None" AutoGenerateColumns="false"
|
||||||
|
DataKeyNames="CveEmpresa,Fecha,Tipo,Valor">
|
||||||
|
<Columns>
|
||||||
|
<asp:TemplateField HeaderText="Fecha">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:Label ID="lblfecha" runat="server" Text='<%# Eval("Fecha","{0:dd/MM/yyyy}")%>'> </asp:Label>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
<asp:TemplateField HeaderText="UMA" ItemStyle-HorizontalAlign="Right">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:Label ID="lblvalor" runat="server" Text='<%# Eval("Valor","{0:N2}")%>'> </asp:Label>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
<asp:TemplateField ItemStyle-Width="20px">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:LinkButton ID="LnkEliminarUma" runat="server" OnClick="LnkEliminarUma_Click" CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="¿Está seguro que desea eliminar el registro de uma?" data-btn-ok-label="si" />
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
</Columns>
|
||||||
|
</asp:GridView>
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
</ajax:TabPanel>
|
</ajax:TabPanel>
|
||||||
</ajax:TabContainer>
|
</ajax:TabContainer>
|
||||||
@@ -2259,7 +2317,7 @@
|
|||||||
<div style="width: 140px; display: inline-block;">
|
<div style="width: 140px; display: inline-block;">
|
||||||
<div class="form-group form-md-line-input">
|
<div class="form-group form-md-line-input">
|
||||||
<asp:TextBox ID="TXTFechaFin" CssClass="form-control" runat="server"></asp:TextBox>
|
<asp:TextBox ID="TXTFechaFin" CssClass="form-control" runat="server"></asp:TextBox>
|
||||||
<asp:Label runat="server" AssociatedControlID="TXTFechaFin">Fecha Inicio:</asp:Label>
|
<asp:Label runat="server" AssociatedControlID="TXTFechaFin">Fecha Fin:</asp:Label>
|
||||||
<ajax:MaskedEditExtender ID="MEEFechaFin" runat="server" TargetControlID="TXTFechaFin" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
<ajax:MaskedEditExtender ID="MEEFechaFin" runat="server" TargetControlID="TXTFechaFin" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||||
<ajax:CalendarExtender runat="server" ID="CEEFechaFin" TargetControlID="TXTFechaFin" PopupButtonID="LnkFechaFin" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
<ajax:CalendarExtender runat="server" ID="CEEFechaFin" TargetControlID="TXTFechaFin" PopupButtonID="LnkFechaFin" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||||
<asp:RequiredFieldValidator ID="RFVFechaFin" runat="server" ControlToValidate="TXTFechaFin" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''FechaNacimiento''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGetTxts"></asp:RequiredFieldValidator>
|
<asp:RequiredFieldValidator ID="RFVFechaFin" runat="server" ControlToValidate="TXTFechaFin" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''FechaNacimiento''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGetTxts"></asp:RequiredFieldValidator>
|
||||||
@@ -2276,6 +2334,18 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group form-md-line-input">
|
||||||
|
<asp:Label CssClass="lblforchk" runat="server" Text="Altas:"></asp:Label>
|
||||||
|
<asp:CheckBox ID="ChkSuaAltas" Text=" " CssClass="chksino" runat="server" />
|
||||||
|
</div>
|
||||||
|
<div class="form-group form-md-line-input">
|
||||||
|
<asp:Label CssClass="lblforchk" runat="server" Text="Bajas:"></asp:Label>
|
||||||
|
<asp:CheckBox ID="ChkSuaBajas" Text=" " CssClass="chksino" runat="server" />
|
||||||
|
</div>
|
||||||
|
<%--<div class="form-group form-md-line-input">
|
||||||
|
<asp:Label CssClass="lblforchk" runat="server" Text="Label"></asp:Label><br />
|
||||||
|
<asp:CheckBox ID="CheckBox3" CssClass="chksino" runat="server" />
|
||||||
|
</div>--%>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
|
|||||||
@@ -181,7 +181,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
|||||||
{
|
{
|
||||||
if (!IsPostBack)
|
if (!IsPostBack)
|
||||||
{
|
{
|
||||||
TxtPeriodo.Text = $"{DateTime.Now :yyyyMM}";
|
TxtPeriodo.Text = $"{DateTime.Now:yyyyMM}";
|
||||||
CargarCentrosDeCosto(DdlProyecto, null, LblProyecto, LblSubProyeccto);
|
CargarCentrosDeCosto(DdlProyecto, null, LblProyecto, LblSubProyeccto);
|
||||||
cargaEjercicios();
|
cargaEjercicios();
|
||||||
CargaTiposPeriodo();
|
CargaTiposPeriodo();
|
||||||
@@ -392,7 +392,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
|||||||
}
|
}
|
||||||
LnkListaRaya.Visible = true;
|
LnkListaRaya.Visible = true;
|
||||||
LnkAsistenciaIncidencias.Visible = true;
|
LnkAsistenciaIncidencias.Visible = true;
|
||||||
|
|
||||||
LnkFormatoTabular.Visible = true;
|
LnkFormatoTabular.Visible = true;
|
||||||
HypPDFSTimbrados.Visible = true;
|
HypPDFSTimbrados.Visible = true;
|
||||||
if (objnom.GetNominaEmpleado(FiltCveProyecto, FiltCveSubProyecto, FiltCveTurno, FiltCvePeriodo, CveEmpresa, FiltAgrupador, DdlRegimenContratacion.SelectedValue.ToEntero()) && objnom.DTSetResultados.Tables.Count > 1)
|
if (objnom.GetNominaEmpleado(FiltCveProyecto, FiltCveSubProyecto, FiltCveTurno, FiltCvePeriodo, CveEmpresa, FiltAgrupador, DdlRegimenContratacion.SelectedValue.ToEntero()) && objnom.DTSetResultados.Tables.Count > 1)
|
||||||
@@ -1439,6 +1439,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
|||||||
|
|
||||||
|
|
||||||
#region SobreRecibo
|
#region SobreRecibo
|
||||||
|
#region SobreRecibo propiedades
|
||||||
|
|
||||||
protected int SRCvePersonal
|
protected int SRCvePersonal
|
||||||
{
|
{
|
||||||
@@ -1481,6 +1482,8 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
|||||||
|
|
||||||
set { ViewState["SRTipoConcepto"] = value; }
|
set { ViewState["SRTipoConcepto"] = value; }
|
||||||
}
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
protected void LnkSobreRecibo_Click(object sender, EventArgs e)
|
protected void LnkSobreRecibo_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
GridViewRow gvrow = (GridViewRow)(((LinkButton)sender).NamingContainer);
|
GridViewRow gvrow = (GridViewRow)(((LinkButton)sender).NamingContainer);
|
||||||
@@ -1490,7 +1493,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
|||||||
using (ClsContPAQi ObjConta = new ClsContPAQi(UsuarioActual.Empresa))
|
using (ClsContPAQi ObjConta = new ClsContPAQi(UsuarioActual.Empresa))
|
||||||
{
|
{
|
||||||
|
|
||||||
if (ObjConta.GetCuentas(-1, "-1", 1))
|
if (ObjConta.Conectado && ObjConta.GetCuentas(-1, "-1", 1))
|
||||||
{
|
{
|
||||||
DdlCtaContable.DataSource = ObjConta.DtResultados;
|
DdlCtaContable.DataSource = ObjConta.DtResultados;
|
||||||
DdlCtaContable.DataBind();
|
DdlCtaContable.DataBind();
|
||||||
@@ -1530,6 +1533,23 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
|||||||
UpGvVacaciones.Update();
|
UpGvVacaciones.Update();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected void LnkImportexCalculo_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
|
||||||
|
SRCveConcepto = ((LinkButton)sender).CommandArgument.ToEntero();
|
||||||
|
//CvePeriodoSeleccionado
|
||||||
|
//SRCvePersonal
|
||||||
|
if (SRCveConcepto > 0)
|
||||||
|
{
|
||||||
|
using (ClsNominas onom =new ClsNominas())
|
||||||
|
{
|
||||||
|
if(onom.DeleteNom_NominasDetalles(SRCveConcepto, SRCvePersonal, CvePeriodoSeleccionado))
|
||||||
|
{
|
||||||
|
Alert("el importe sera tomado del calculo y no del valor fijo");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
protected void LnkConcepto_Click(object sender, EventArgs e)
|
protected void LnkConcepto_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
SRCveConcepto = ((LinkButton)sender).CommandArgument.ToEntero();
|
SRCveConcepto = ((LinkButton)sender).CommandArgument.ToEntero();
|
||||||
@@ -1553,7 +1573,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
|||||||
|
|
||||||
if (SRTipoConcepto == "P")
|
if (SRTipoConcepto == "P")
|
||||||
{
|
{
|
||||||
dtCon = dtConceptos.FiltraParametros("Tipo ='P' AND EsPadre = 1 ").Copy();
|
dtCon = dtConceptos.FiltraParametros("Tipo ='P' AND EsPadre = 1 ").Copy(); //AND CveSistema <>12'
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -1578,6 +1598,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
|||||||
DdlmcConceptos.SelectedValueExist(SRCveConcepto);
|
DdlmcConceptos.SelectedValueExist(SRCveConcepto);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
PnlConceptoPersonal.Visible = false;
|
||||||
DdlmcConceptos_SelectedIndexChanged(DdlmcConceptos, null);
|
DdlmcConceptos_SelectedIndexChanged(DdlmcConceptos, null);
|
||||||
RegistraScript(string.Format("$('#ModalUpConcepto').on('shown.bs.modal', function () {{$('#{0}').trigger('focus')}});$('#ModalUpConcepto').modal();", TxtmcImporte.ClientID));
|
RegistraScript(string.Format("$('#ModalUpConcepto').on('shown.bs.modal', function () {{$('#{0}').trigger('focus')}});$('#ModalUpConcepto').modal();", TxtmcImporte.ClientID));
|
||||||
UPpanelModalUpConcepto.Update();
|
UPpanelModalUpConcepto.Update();
|
||||||
@@ -1615,7 +1636,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
|||||||
{
|
{
|
||||||
DdlmcConceptos.SelectedValueExist(SRCveConcepto);
|
DdlmcConceptos.SelectedValueExist(SRCveConcepto);
|
||||||
}
|
}
|
||||||
|
PnlConceptoPersonal.Visible = true;
|
||||||
DdlmcConceptos_SelectedIndexChanged(DdlmcConceptos, null);
|
DdlmcConceptos_SelectedIndexChanged(DdlmcConceptos, null);
|
||||||
RegistraScript(string.Format("$('#ModalUpConcepto').on('shown.bs.modal', function () {{$('#{0}').trigger('focus')}});$('#ModalUpConcepto').modal();", TxtmcImporte.ClientID));
|
RegistraScript(string.Format("$('#ModalUpConcepto').on('shown.bs.modal', function () {{$('#{0}').trigger('focus')}});$('#ModalUpConcepto').modal();", TxtmcImporte.ClientID));
|
||||||
UPpanelModalUpConcepto.Update();
|
UPpanelModalUpConcepto.Update();
|
||||||
@@ -1875,7 +1896,9 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
|||||||
{
|
{
|
||||||
int BorradoLogico = 0;
|
int BorradoLogico = 0;
|
||||||
int CveConcepto = row["CveConcepto"].ToString().ToEntero();
|
int CveConcepto = row["CveConcepto"].ToString().ToEntero();
|
||||||
if (!(dtempleados.SUM(string.Format("[V_{0}]", CveConcepto), string.Format("CvePersonal = {0}", SRCvePersonal)) != 0))
|
if (!(dtempleados.SUM(string.Format("[V_{0}]", CveConcepto), string.Format("CvePersonal = {0}", SRCvePersonal)) != 0)
|
||||||
|
&& (dtempleadosConceptos.COUNT("CveConcepto", string.Format("CveConcepto={0} AND CvePersonal ={1} AND Estatus =2", CveConcepto, SRCvePersonal)) == 0)
|
||||||
|
)
|
||||||
{
|
{
|
||||||
BorradoLogico = 1;
|
BorradoLogico = 1;
|
||||||
}
|
}
|
||||||
@@ -1886,7 +1909,9 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
|||||||
{
|
{
|
||||||
int BorradoLogico = 0;
|
int BorradoLogico = 0;
|
||||||
int CveConcepto = row["CveConcepto"].ToString().ToEntero();
|
int CveConcepto = row["CveConcepto"].ToString().ToEntero();
|
||||||
if (!(dtempleados.SUM(string.Format("[V_{0}]", CveConcepto), string.Format("CvePersonal = {0}", SRCvePersonal)) != 0))
|
if (!(dtempleados.SUM(string.Format("[V_{0}]", CveConcepto), string.Format("CvePersonal = {0}", SRCvePersonal)) != 0)
|
||||||
|
&& (dtempleadosConceptos.COUNT("CveConcepto", string.Format("CveConcepto={0} AND CvePersonal ={1} AND Estatus =2", CveConcepto, SRCvePersonal)) == 0)
|
||||||
|
)
|
||||||
{
|
{
|
||||||
BorradoLogico = 1;
|
BorradoLogico = 1;
|
||||||
}
|
}
|
||||||
@@ -2281,6 +2306,9 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
|||||||
Label LtlImporteD = e.Row.FCLabel("LtlImporteD");
|
Label LtlImporteD = e.Row.FCLabel("LtlImporteD");
|
||||||
LinkButton LnkImporteD = e.Row.FCLinkButton("LnkImporteD");
|
LinkButton LnkImporteD = e.Row.FCLinkButton("LnkImporteD");
|
||||||
|
|
||||||
|
LinkButton LnkImportexCalculo = e.Row.FCLinkButton("LnkImportexCalculo");
|
||||||
|
LinkButton LnkImporteDxCalculo = e.Row.FCLinkButton("LnkImporteDxCalculo");
|
||||||
|
|
||||||
//isEditedD
|
//isEditedD
|
||||||
if (isOnlyBisibleP == 1)
|
if (isOnlyBisibleP == 1)
|
||||||
{
|
{
|
||||||
@@ -2315,6 +2343,10 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
|||||||
}
|
}
|
||||||
LnkImporte.CommandArgument = (CveConcepto > 0 ? CveConcepto.ToString() : "P");
|
LnkImporte.CommandArgument = (CveConcepto > 0 ? CveConcepto.ToString() : "P");
|
||||||
LnkImporteD.CommandArgument = (CveConceptoD > 0 ? CveConceptoD.ToString() : "D");
|
LnkImporteD.CommandArgument = (CveConceptoD > 0 ? CveConceptoD.ToString() : "D");
|
||||||
|
LnkImportexCalculo.CommandArgument = LnkImporte.CommandArgument;
|
||||||
|
LnkImporteDxCalculo.CommandArgument = LnkImporteD.CommandArgument;
|
||||||
|
LnkImportexCalculo.Visible = isEditedP;
|
||||||
|
LnkImporteDxCalculo.Visible =isEditedD;
|
||||||
|
|
||||||
LnkImporte.Text = (CveConcepto > 0 ? string.Format("${0:N2}", e.Row.DataKey("ImporteP").ToDecimal()) : (CveConceptoPolgvc > 0 ? "<i class=\"fa fa-plus\"></i>" : ""));
|
LnkImporte.Text = (CveConcepto > 0 ? string.Format("${0:N2}", e.Row.DataKey("ImporteP").ToDecimal()) : (CveConceptoPolgvc > 0 ? "<i class=\"fa fa-plus\"></i>" : ""));
|
||||||
LnkImporteD.Text = (CveConceptoD > 0 ? string.Format("${0:N2}", e.Row.DataKey("ImporteD").ToDecimal()) : (CveConceptoDolgvc > 0 ? "<i class=\"fa fa-plus\"></i>" : ""));
|
LnkImporteD.Text = (CveConceptoD > 0 ? string.Format("${0:N2}", e.Row.DataKey("ImporteD").ToDecimal()) : (CveConceptoDolgvc > 0 ? "<i class=\"fa fa-plus\"></i>" : ""));
|
||||||
@@ -2619,7 +2651,10 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
|||||||
GVInfonavitSegViv.DataSource = objnom.DTSetResultados.Tables[3];
|
GVInfonavitSegViv.DataSource = objnom.DTSetResultados.Tables[3];
|
||||||
GVVigISRMensual.DataSource = objnom.DTSetResultados.Tables[4];
|
GVVigISRMensual.DataSource = objnom.DTSetResultados.Tables[4];
|
||||||
GVVigSubEmpMensual.DataSource = objnom.DTSetResultados.Tables[5];
|
GVVigSubEmpMensual.DataSource = objnom.DTSetResultados.Tables[5];
|
||||||
GVUma.DataSource = objnom.DTSetResultados.Tables[6];
|
}
|
||||||
|
if (objnom.RH_TablasValoresGet(UsuarioActual.CveEmpresa, 1))
|
||||||
|
{
|
||||||
|
GVUma.DataSource = objnom.DtResultados;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -2633,6 +2668,43 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
|||||||
GVUma.DataBind();
|
GVUma.DataBind();
|
||||||
UpModalTablas.Update();
|
UpModalTablas.Update();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected void LnkAddUMA_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
using (ClsNominas objnom = new ClsNominas())
|
||||||
|
{
|
||||||
|
if (objnom.RH_TablasValoresAdd(UsuarioActual.CveEmpresa, TxtFechaUma.Text.ToDateTime(), 1, TxtValorUma.Text.ToDecimal()))
|
||||||
|
{
|
||||||
|
if (objnom.RH_TablasValoresGet(UsuarioActual.CveEmpresa, 1))
|
||||||
|
{
|
||||||
|
GVUma.DataSource = objnom.DtResultados;
|
||||||
|
GVUma.DataBind();
|
||||||
|
}
|
||||||
|
Alert("La UMA se ha actualizado.");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
protected void LnkEliminarUma_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
GridViewRow gvrow = (GridViewRow)((LinkButton)sender).NamingContainer;
|
||||||
|
DateTime fecha = gvrow.DataKey("Fecha").ToDateTime();
|
||||||
|
//DateTime tipo = gvrow.DataKey("Tipo").ToDateTime();
|
||||||
|
|
||||||
|
using (ClsNominas objnom = new ClsNominas())
|
||||||
|
{
|
||||||
|
|
||||||
|
if (objnom.RH_TablasValoresRemove(UsuarioActual.CveEmpresa, TxtFechaUma.Text.ToDateTime(), 1))
|
||||||
|
{
|
||||||
|
if (objnom.RH_TablasValoresGet(UsuarioActual.CveEmpresa, 1))
|
||||||
|
{
|
||||||
|
GVUma.DataSource = objnom.DtResultados;
|
||||||
|
GVUma.DataBind();
|
||||||
|
}
|
||||||
|
Alert("La UMA se ha eliminado.");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
protected void LnkVerTablas_Click(object sender, EventArgs e)
|
protected void LnkVerTablas_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
loadtablas();
|
loadtablas();
|
||||||
@@ -4211,134 +4283,127 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
|||||||
DataTable dtr = dtempleados.FiltraParametros(string.Format("(CvePersonal={0} OR {0}=-1) AND CvePersonal > 0 AND NomAutorizado =0", FiltroCvePersonal), "", getcolumnas);
|
DataTable dtr = dtempleados.FiltraParametros(string.Format("(CvePersonal={0} OR {0}=-1) AND CvePersonal > 0 AND NomAutorizado =0", FiltroCvePersonal), "", getcolumnas);
|
||||||
DataTable dtconp = null;
|
DataTable dtconp = null;
|
||||||
int CvePeriodoSeleccionado = DdlPeriodo.SelectedValue.ToEntero();//cambiar reparar
|
int CvePeriodoSeleccionado = DdlPeriodo.SelectedValue.ToEntero();//cambiar reparar
|
||||||
if (FiltCveSubProyecto == -1 && DdlRegimenContratacion.SelectedValue == "-1")
|
|
||||||
|
#region PropNomina
|
||||||
|
int CvePersonal = 0;
|
||||||
|
int CveNomina = 0;
|
||||||
|
int CveMetodoPago = 0;
|
||||||
|
double SubTotal = 0;
|
||||||
|
double Total = 0;
|
||||||
|
int CveMoneda = 1;
|
||||||
|
#endregion
|
||||||
|
#region PropNominaDetalle
|
||||||
|
int CveConcepto = 0;
|
||||||
|
decimal ImporteConcepto = 0, ImporteGravadoConcepto = 0, ImporteExentoConcepto = 0, ImporteValor = 0;
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
|
using (ClsNominas objNomina = new ClsNominas())
|
||||||
{
|
{
|
||||||
#region PropNomina
|
objNomina.IniciaTransacSQL();
|
||||||
int CvePersonal = 0;
|
foreach (DataRow rtemp in dtr.Rows)
|
||||||
int CveNomina = 0;
|
|
||||||
int CveMetodoPago = 0;
|
|
||||||
double SubTotal = 0;
|
|
||||||
double Total = 0;
|
|
||||||
int CveMoneda = 1;
|
|
||||||
#endregion
|
|
||||||
#region PropNominaDetalle
|
|
||||||
int CveConcepto = 0;
|
|
||||||
decimal ImporteConcepto = 0, ImporteGravadoConcepto = 0, ImporteExentoConcepto = 0, ImporteValor = 0;
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
|
|
||||||
using (ClsNominas objNomina = new ClsNominas())
|
|
||||||
{
|
{
|
||||||
objNomina.IniciaTransacSQL();
|
CveNomina = 0;
|
||||||
foreach (DataRow rtemp in dtr.Rows)
|
CvePersonal = rtemp["CvePersonal"].ToString().ToEntero();
|
||||||
|
CveMetodoPago = rtemp["CveMetodoPago"].ToString().ToEntero();
|
||||||
|
SubTotal = rtemp["SumaPercepciones"].ToString().ToDouble();
|
||||||
|
Total = rtemp["Total"].ToString().ToDouble();
|
||||||
|
if (CvePersonal > 0)
|
||||||
{
|
{
|
||||||
CveNomina = 0;
|
if (continuar)
|
||||||
CvePersonal = rtemp["CvePersonal"].ToString().ToEntero();
|
|
||||||
CveMetodoPago = rtemp["CveMetodoPago"].ToString().ToEntero();
|
|
||||||
SubTotal = rtemp["SumaPercepciones"].ToString().ToDouble();
|
|
||||||
Total = rtemp["Total"].ToString().ToDouble();
|
|
||||||
if (CvePersonal > 0)
|
|
||||||
{
|
{
|
||||||
if (continuar)
|
if (objNomina.GetNom_Nominas(-1, CvePersonal, CvePeriodoSeleccionado, -1, UsuarioActual.CveEmpresa))
|
||||||
{
|
{
|
||||||
if (objNomina.GetNom_Nominas(-1, CvePersonal, CvePeriodoSeleccionado, -1, UsuarioActual.CveEmpresa))
|
|
||||||
{
|
|
||||||
|
|
||||||
if (objNomina.DtResultados.Rows.Count > 0)
|
if (objNomina.DtResultados.Rows.Count > 0)
|
||||||
|
{
|
||||||
|
CveNomina = objNomina.CveNomina;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (objNomina.AddNom_Nominas(-1, 1, CvePersonal, CvePeriodoSeleccionado, SubTotal, 0, 0, Total, CveMoneda, 1, CveMetodoPago, DateTime.Now, "Deducciones nómina",
|
||||||
|
"", "", "", "", 0, 0, 0, new DateTime(), new DateTime(), new DateTime(), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa))
|
||||||
{
|
{
|
||||||
CveNomina = objNomina.CveNomina;
|
CveNomina = objNomina.CveNomina;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (objNomina.AddNom_Nominas(-1, 1, CvePersonal, CvePeriodoSeleccionado, SubTotal, 0, 0, Total, CveMoneda, 1, CveMetodoPago, DateTime.Now, "Deducciones nómina",
|
continuar = false;
|
||||||
"", "", "", "", 0, 0, 0, new DateTime(), new DateTime(), new DateTime(), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa))
|
|
||||||
{
|
|
||||||
CveNomina = objNomina.CveNomina;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
continuar = false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (CveNomina == 0)
|
}
|
||||||
{
|
if (CveNomina == 0)
|
||||||
continuar = false;
|
{
|
||||||
}
|
continuar = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if (continuar)
|
if (continuar)
|
||||||
|
{
|
||||||
|
dtconp = dtempleadosConceptos.FiltraParametros(string.Format("CvePersonal={0} AND Importe<>0", CvePersonal));
|
||||||
|
foreach (DataRow rcon in dtconp.Rows)
|
||||||
{
|
{
|
||||||
dtconp = dtempleadosConceptos.FiltraParametros(string.Format("CvePersonal={0} AND Importe<>0", CvePersonal));
|
|
||||||
foreach (DataRow rcon in dtconp.Rows)
|
CveConcepto = rcon["CveConcepto"].ToString().ToEntero();
|
||||||
|
ImporteConcepto = rcon["Importe"].ToString().ToDecimal();
|
||||||
|
ImporteGravadoConcepto = rcon["ImporteGravado"].ToString().ToDecimal();
|
||||||
|
ImporteExentoConcepto = ImporteConcepto - ImporteGravadoConcepto;
|
||||||
|
ImporteValor = rcon["Valor"].ToString().ToDecimal();
|
||||||
|
if (continuar)
|
||||||
{
|
{
|
||||||
|
|
||||||
CveConcepto = rcon["CveConcepto"].ToString().ToEntero();
|
if (!objNomina.AddUPNom_NominasDetalles(CveNomina, CvePeriodoSeleccionado, CvePersonal, CveConcepto, ImporteConcepto, ImporteGravadoConcepto, ImporteExentoConcepto, ImporteValor, UsuarioActual.CveUsuario))
|
||||||
ImporteConcepto = rcon["Importe"].ToString().ToDecimal();
|
|
||||||
ImporteGravadoConcepto = rcon["ImporteGravado"].ToString().ToDecimal();
|
|
||||||
ImporteExentoConcepto = ImporteConcepto - ImporteGravadoConcepto;
|
|
||||||
ImporteValor = rcon["Valor"].ToString().ToDecimal();
|
|
||||||
if (continuar)
|
|
||||||
{
|
{
|
||||||
|
continuar = false;
|
||||||
if (!objNomina.AddUPNom_NominasDetalles(CveNomina, CvePeriodoSeleccionado, CvePersonal, CveConcepto, ImporteConcepto, ImporteGravadoConcepto, ImporteExentoConcepto, ImporteValor, UsuarioActual.CveUsuario))
|
|
||||||
{
|
|
||||||
continuar = false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
if (continuar)
|
|
||||||
{
|
|
||||||
decimal SalarioDiario = rtemp["SalarioDiario"].ToString().ToEntero();
|
|
||||||
decimal SalarioDiarioIMSS = rtemp["SalarioDiarioIMSS"].ToString().ToEntero();
|
|
||||||
decimal SalarioDiarioIntegrado = rtemp["SalarioDiarioIntegrado"].ToString().ToEntero();
|
|
||||||
int DiasLaborados = rtemp["DiasLaborados"].ToString().ToEntero();
|
|
||||||
int DiasFaltados = rtemp["DiasFaltados"].ToString().ToEntero();
|
|
||||||
int DiasVacaciones = rtemp["DiasVacaciones"].ToString().ToEntero();
|
|
||||||
int DiasIncapacidad = rtemp["DiasIncapacidad"].ToString().ToEntero();
|
|
||||||
continuar = objNomina.PA_Nom_NominasAutorizarUP(CvePersonal, CvePeriodoSeleccionado, SalarioDiario, SalarioDiarioIMSS, SalarioDiarioIntegrado, 0, 0, Total, SubTotal, DiasLaborados, DiasFaltados, DiasVacaciones, DiasIncapacidad);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
if (continuar)
|
||||||
|
{
|
||||||
|
decimal SalarioDiario = rtemp["SalarioDiario"].ToString().ToDecimal();
|
||||||
|
decimal SalarioDiarioIMSS = rtemp["SalarioDiarioIMSS"].ToString().ToDecimal();
|
||||||
|
decimal SalarioDiarioIntegrado = rtemp["SalarioDiarioIntegrado"].ToString().ToDecimal();
|
||||||
|
int DiasLaborados = rtemp["DiasLaborados"].ToString().ToEntero();
|
||||||
|
int DiasFaltados = rtemp["DiasFaltados"].ToString().ToEntero();
|
||||||
|
int DiasVacaciones = rtemp["DiasVacaciones"].ToString().ToEntero();
|
||||||
|
int DiasIncapacidad = rtemp["DiasIncapacidad"].ToString().ToEntero();
|
||||||
|
continuar = objNomina.PA_Nom_NominasAutorizarUP(CvePersonal, CvePeriodoSeleccionado, SalarioDiario, SalarioDiarioIMSS, SalarioDiarioIntegrado, 0, 0, Total, SubTotal, DiasLaborados, DiasFaltados, DiasVacaciones, DiasIncapacidad);
|
||||||
|
|
||||||
|
continuar = objNomina.AutorizaNom_Nominas(CvePersonal, CvePeriodoSeleccionado, true);
|
||||||
|
}
|
||||||
if (continuar)
|
|
||||||
{
|
|
||||||
continuar = objNomina.AutorizaNom_Nominas(-1, CvePeriodoSeleccionado, true);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (continuar)
|
|
||||||
{
|
|
||||||
objNomina.Commit();
|
|
||||||
Alert("La nomina se autorizó correctamente.");
|
|
||||||
cargaDatos();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
objNomina.RollBack();
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (dtr != null)
|
|
||||||
{
|
|
||||||
dtr.Dispose();
|
|
||||||
|
|
||||||
}
|
|
||||||
if (dtconp != null)
|
|
||||||
|
|
||||||
|
if (continuar)
|
||||||
{
|
{
|
||||||
dtconp.Dispose();
|
objNomina.Commit();
|
||||||
|
Alert("La nomina se autorizó correctamente.");
|
||||||
|
cargaDatos();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
objNomina.RollBack();
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
if (dtr != null)
|
||||||
{
|
{
|
||||||
Alert("para poder autorizar debe seleccionar a todos en el centro de costo y en Régimen de contratación.", TipoMensaje.MsgAdvertencia);
|
dtr.Dispose();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
if (dtconp != null)
|
||||||
|
{
|
||||||
|
dtconp.Dispose();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void LnkCargaAsistenciaMasiva_Click(object sender, EventArgs e)
|
protected void LnkCargaAsistenciaMasiva_Click(object sender, EventArgs e)
|
||||||
@@ -4449,7 +4514,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
|||||||
TxtHorasDobles.Text = dr["HorasDobles"].ToString();
|
TxtHorasDobles.Text = dr["HorasDobles"].ToString();
|
||||||
TxtHorasTriples.Text = dr["HorasTriples"].ToString();
|
TxtHorasTriples.Text = dr["HorasTriples"].ToString();
|
||||||
DdlMotivoHoraExtra.SelectedValueExist(dr["CveMotivoHoraExtra"].ToString());
|
DdlMotivoHoraExtra.SelectedValueExist(dr["CveMotivoHoraExtra"].ToString());
|
||||||
TxtPorPago.Text = dr["Observacion"].ToString();
|
TxtObservaciones.Text = dr["Observacion"].ToString();
|
||||||
// CveAsistenciasInasistencias
|
// CveAsistenciasInasistencias
|
||||||
// PorcentajePago
|
// PorcentajePago
|
||||||
// HorasDobles
|
// HorasDobles
|
||||||
@@ -4461,6 +4526,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
UpModalAsistencia.Update();
|
||||||
RegistraScript("$('#DModalModAsistencia').modal();");
|
RegistraScript("$('#DModalModAsistencia').modal();");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -4734,7 +4800,17 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
RegistraScript(string.Format("SaveCsv(\"MovtosAfil.txt\", '{0}');SaveCsv(\"MovtosmodSalario.txt\", '{1}');SaveCsv(\"movtosBajas.txt\", '{2}');", MovtosAfil.Replace("'", "\\'"), MovtosmodSalario.Replace("'", "\\'"), movtosBajas.Replace("'", "\\'")));
|
string script = "";// string.Format("SaveCsv(\"MovtosAfil.txt\", '{0}');SaveCsv(\"MovtosmodSalario.txt\", '{1}');SaveCsv(\"movtosBajas.txt\", '{2}');", MovtosAfil.Replace("'", "\\'"), MovtosmodSalario.Replace("'", "\\'"), movtosBajas.Replace("'", "\\'"));
|
||||||
|
if (ChkSuaAltas.Checked)
|
||||||
|
{
|
||||||
|
script= string.Format("{1}SaveCsv(\"MovtosAfil.txt\", '{0}');", MovtosAfil.Replace("'", "\\'"), script);
|
||||||
|
}
|
||||||
|
if (ChkSuaBajas.Checked)
|
||||||
|
{
|
||||||
|
script = string.Format("{1}SaveCsv(\"movtosBajas.txt\", '{0}');", movtosBajas.Replace("'", "\\'"), script);
|
||||||
|
}
|
||||||
|
|
||||||
|
RegistraScript(script);
|
||||||
RegistraScript("$('#DmodalGetSua').modal('hide');");
|
RegistraScript("$('#DmodalGetSua').modal('hide');");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -5049,7 +5125,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
|||||||
DdlSRINCcveControlIncapacidad.SelectedValueExist(cveControlIncapacidad.ToString());
|
DdlSRINCcveControlIncapacidad.SelectedValueExist(cveControlIncapacidad.ToString());
|
||||||
TxtSRINCdescripcion.Text = descripcion.ToString();
|
TxtSRINCdescripcion.Text = descripcion.ToString();
|
||||||
LnkAgregarIncapacidad.Visible = false;
|
LnkAgregarIncapacidad.Visible = false;
|
||||||
LnkActualizarIncapacidad.Visible = true;
|
//LnkActualizarIncapacidad.Visible = true;
|
||||||
}
|
}
|
||||||
protected void LnkshowaaddIncapacidad_Click(object sender, EventArgs e)
|
protected void LnkshowaaddIncapacidad_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
@@ -5550,15 +5626,16 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
|||||||
|
|
||||||
protected void LnkRegistrarProvision_Click(object sender, EventArgs e)
|
protected void LnkRegistrarProvision_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
using(ClsNominas objnom = new ClsNominas() )
|
using (ClsNominas objnom = new ClsNominas())
|
||||||
{
|
{
|
||||||
int CvePrePolizaProvision = 0; int CvePrePolizaasmilidos=0;
|
int CvePrePolizaProvision = 0; int CvePrePolizaasmilidos = 0;
|
||||||
if(objnom.DtResultados.Rows.Count > 0)
|
if (objnom.DtResultados.Rows.Count > 0)
|
||||||
{
|
{
|
||||||
CvePrePolizaProvision= objnom.DtResultados.Rows[0]["CvePrePoliza"].ToString().ToEntero();
|
CvePrePolizaProvision = objnom.DtResultados.Rows[0]["CvePrePoliza"].ToString().ToEntero();
|
||||||
CvePrePolizaasmilidos = objnom.DtResultados.Rows[0]["CvePrePolizaAsimilables"].ToString().ToEntero();
|
CvePrePolizaasmilidos = objnom.DtResultados.Rows[0]["CvePrePolizaAsimilables"].ToString().ToEntero();
|
||||||
}
|
}
|
||||||
if (objnom.Autorizaperiodoconta(CvePeriodoSeleccionado, UsuarioActual.CveEmpresa)){
|
if (objnom.Autorizaperiodoconta(CvePeriodoSeleccionado, UsuarioActual.CveEmpresa))
|
||||||
|
{
|
||||||
string mensaje = string.Format("La provision a sido autorizada.<br/><a href=\"../Contabilidad/RegPrePoliza.aspx?CvePrePoliza={0}&Tipo=NOMPROV\">Provision </a><br/><a href=\"../Contabilidad/RegPrePoliza.aspx?CvePrePoliza={0}&Tipo=NOMPROV\"> Asimilados</a>", CvePrePolizaProvision, CvePrePolizaasmilidos);
|
string mensaje = string.Format("La provision a sido autorizada.<br/><a href=\"../Contabilidad/RegPrePoliza.aspx?CvePrePoliza={0}&Tipo=NOMPROV\">Provision </a><br/><a href=\"../Contabilidad/RegPrePoliza.aspx?CvePrePoliza={0}&Tipo=NOMPROV\"> Asimilados</a>", CvePrePolizaProvision, CvePrePolizaasmilidos);
|
||||||
Alert(mensaje);
|
Alert(mensaje);
|
||||||
}
|
}
|
||||||
@@ -5679,7 +5756,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
|||||||
CrearLayout(objnom.DtResultados);
|
CrearLayout(objnom.DtResultados);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void LnkAsistenciaIncidencias_Click(object sender, EventArgs e)
|
protected void LnkAsistenciaIncidencias_Click(object sender, EventArgs e)
|
||||||
@@ -5701,14 +5778,14 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
|||||||
var libro = wb.AddWorksheet(nom.DTSetResultados.Tables[2], "Incidencias");
|
var libro = wb.AddWorksheet(nom.DTSetResultados.Tables[2], "Incidencias");
|
||||||
libro.ColumnsUsed().AdjustToContents();
|
libro.ColumnsUsed().AdjustToContents();
|
||||||
var libroin = wb.AddWorksheet(nom.DTSetResultados.Tables[1], "Descripción incidencias");
|
var libroin = wb.AddWorksheet(nom.DTSetResultados.Tables[1], "Descripción incidencias");
|
||||||
libro.ColumnsUsed().AdjustToContents();
|
libroin.ColumnsUsed().AdjustToContents();
|
||||||
libro.Row(1).InsertRowsAbove(4);
|
libro.Row(1).InsertRowsAbove(4);
|
||||||
libro.Range(1, 2, 1, 6).Merge().Value = UsuarioActual.Empresa.Empresa;
|
libro.Range(1, 2, 1, 6).Merge().Value = UsuarioActual.Empresa.Empresa;
|
||||||
libro.Range(2, 2, 2, 6).Merge().Value = "Reporte de incidencias";
|
libro.Range(2, 2, 2, 6).Merge().Value = "Reporte de incidencias";
|
||||||
libro.Range(3, 2, 3, 6).Merge().Value = $"del {fechai:dd/MM/yyyy} al {fechaf:dd/MM/yyyy}";
|
libro.Range(3, 2, 3, 6).Merge().Value = $"del {fechai:dd/MM/yyyy} al {fechaf:dd/MM/yyyy}";
|
||||||
libro.Range(2, 7, 2, 9).Merge().Value = $"Fecha:{DateTime.Now:dd/MM/yyyy}";
|
libro.Range(2, 7, 2, 9).Merge().Value = $"Fecha:{DateTime.Now:dd/MM/yyyy}";
|
||||||
libro.Range(3, 7, 3, 9).Merge().Value = $"Hora:{DateTime.Now:HH:mm}";
|
libro.Range(3, 7, 3, 9).Merge().Value = $"Hora:{DateTime.Now:HH:mm}";
|
||||||
|
|
||||||
//ws.Row(1).InsertRowsAbove(1);
|
//ws.Row(1).InsertRowsAbove(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -5737,8 +5814,8 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
|||||||
protected void LnkProcesarReporteAcumulados_Click(object sender, EventArgs e)
|
protected void LnkProcesarReporteAcumulados_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
|
|
||||||
DateTime fechai = TxtRIFechaInicio.Text.ToDateTime();
|
//DateTime fechai = TxtRIFechaInicio.Text.ToDateTime();
|
||||||
DateTime fechaf = TxtRIFechaFin.Text.ToDateTime();
|
//DateTime fechaf = TxtRIFechaFin.Text.ToDateTime();
|
||||||
ClosedXML.Excel.XLWorkbook wb = new ClosedXML.Excel.XLWorkbook();
|
ClosedXML.Excel.XLWorkbook wb = new ClosedXML.Excel.XLWorkbook();
|
||||||
using (ClsNominas nom = new ClsNominas())
|
using (ClsNominas nom = new ClsNominas())
|
||||||
{
|
{
|
||||||
@@ -5747,6 +5824,12 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
|||||||
|
|
||||||
var libro = wb.AddWorksheet(nom.DTSetResultados.Tables[0], "Acumulados");
|
var libro = wb.AddWorksheet(nom.DTSetResultados.Tables[0], "Acumulados");
|
||||||
libro.ColumnsUsed().AdjustToContents();
|
libro.ColumnsUsed().AdjustToContents();
|
||||||
|
libro.Row(1).InsertRowsAbove(4);
|
||||||
|
libro.Range(1, 2, 1, 6).Merge().Value = UsuarioActual.Empresa.Empresa;
|
||||||
|
libro.Range(2, 2, 2, 6).Merge().Value = "Reporte de Acumulados";
|
||||||
|
//libro.Range(3, 2, 3, 6).Merge().Value = $"del {fechai:dd/MM/yyyy} al {fechaf:dd/MM/yyyy}";
|
||||||
|
libro.Range(2, 7, 2, 9).Merge().Value = $"Fecha:{DateTime.Now:dd/MM/yyyy}";
|
||||||
|
libro.Range(3, 7, 3, 9).Merge().Value = $"Hora:{DateTime.Now:HH:mm}";
|
||||||
|
|
||||||
//ws.Row(1).InsertRowsAbove(1);
|
//ws.Row(1).InsertRowsAbove(1);
|
||||||
}
|
}
|
||||||
@@ -5778,5 +5861,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
|||||||
RegistraScript("$('#DmodalReporteAcumulados').modal()");
|
RegistraScript("$('#DmodalReporteAcumulados').modal()");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -5352,13 +5352,29 @@ Partial Class OC
|
|||||||
|
|
||||||
Dim Cantidad As Decimal = Row("Cantidad").ToString.ToDecimal
|
Dim Cantidad As Decimal = Row("Cantidad").ToString.ToDecimal
|
||||||
Dim PU As Decimal = Row("Importe").ToString.ToDecimal() + (Row("Importe").ToString.ToDecimal() * PorcentajeGanancia)
|
Dim PU As Decimal = Row("Importe").ToString.ToDecimal() + (Row("Importe").ToString.ToDecimal() * PorcentajeGanancia)
|
||||||
Dim IEPSPS As Decimal = DrPS("IEPSPorcentaje").ToString.ToDecimal
|
|
||||||
Dim ImporteIEPS As Decimal = ((Cantidad * PU) * IEPSPS).RoundSQL(2)
|
|
||||||
|
|
||||||
If Not ObjVentas.UpdateVentaDetalleRemision(Row("CveVentaDetalleCotizacion").ToString.ToEntero, CvePS, Cantidad, PU, ImporteIEPS, "", UsuarioActual.CveUsuario) Then
|
|
||||||
|
Dim TotalCalculableImpuestos = (Cantidad * (PU))
|
||||||
|
Dim TotalCalculableImpuestosIVA = TotalCalculableImpuestos * (1 + DrPS("IEPSPorcentaje").ToString().ToDecimal)
|
||||||
|
|
||||||
|
Dim PorcentajeIEPS As Decimal = DrPS("IEPSPorcentaje").ToString.ToDecimal
|
||||||
|
|
||||||
|
Dim PorcentajeIVA As Decimal = 0D
|
||||||
|
|
||||||
|
If DrPS("IVA").ToString().Contiene("-1", "") Then
|
||||||
|
PorcentajeIVA = Row("IVAPorcentaje")
|
||||||
|
Else
|
||||||
|
PorcentajeIVA = DrPS("IVA")
|
||||||
|
End If
|
||||||
|
|
||||||
|
Dim ImporteIEPS As Decimal = (TotalCalculableImpuestos * PorcentajeIEPS).RoundSQL(2)
|
||||||
|
Dim ImporteIVA As Decimal = (TotalCalculableImpuestosIVA * PorcentajeIVA).RoundSQL(2)
|
||||||
|
|
||||||
|
If Not ObjVentas.UpdateVentaDetalleRemision(Row("CveVentaDetalleCotizacion").ToString.ToEntero, CvePS, Cantidad, PU, ImporteIEPS, PorcentajeIEPS, ImporteIVA, PorcentajeIVA, "", UsuarioActual.CveUsuario) Then
|
||||||
OcurrioError = True
|
OcurrioError = True
|
||||||
Exit For
|
Exit For
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Next
|
Next
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
OcurrioError = True
|
OcurrioError = True
|
||||||
|
|||||||
@@ -286,7 +286,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group form-md-line-input input-iconright">
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
<asp:TextBox ID="TxtTelefono" runat="server" CssClass="form-control" MaxLength="10"></asp:TextBox>
|
<asp:TextBox ID="TxtTelefono" runat="server" CssClass="form-control" MaxLength="15"></asp:TextBox>
|
||||||
<label for="<%= TxtTelefono.ClientID.ToString()%>">Telefono:</label>
|
<label for="<%= TxtTelefono.ClientID.ToString()%>">Telefono:</label>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -51,6 +51,13 @@
|
|||||||
<div class="portlet-title portlet-filterT smalltitle">
|
<div class="portlet-title portlet-filterT smalltitle">
|
||||||
<div class="titlefiltros caption">
|
<div class="titlefiltros caption">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
<asp:Label ID="Label1" runat="server" CssClass="col-md-1 ">Tipo :</asp:Label>
|
||||||
|
<div class="col-md-3" id="Div1" runat="server">
|
||||||
|
<asp:DropDownList ID="DdlTipo" runat="server">
|
||||||
|
<asp:ListItem Value="1" Text="Cambio en salario variable" Selected="True"></asp:ListItem>
|
||||||
|
<asp:ListItem Value="2" Text="modificación de salario"></asp:ListItem>
|
||||||
|
</asp:DropDownList>
|
||||||
|
</div>
|
||||||
|
|
||||||
<asp:Label ID="LblFechaPago" runat="server" CssClass="col-md-1 ">Fecha :</asp:Label>
|
<asp:Label ID="LblFechaPago" runat="server" CssClass="col-md-1 ">Fecha :</asp:Label>
|
||||||
<div class="col-md-3" id="DivFechaPago" runat="server">
|
<div class="col-md-3" id="DivFechaPago" runat="server">
|
||||||
@@ -379,6 +386,7 @@
|
|||||||
</ajax:TabPanel>
|
</ajax:TabPanel>
|
||||||
<ajax:TabPanel ID="TabDetalleParteVariable" runat="server" HeaderText="Detalle parte variable">
|
<ajax:TabPanel ID="TabDetalleParteVariable" runat="server" HeaderText="Detalle parte variable">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
|
<asp:GridView ID="GVDetalleParteVariable" runat="server" GridLines="None" CssClass="table table-hover table-striped ScrollAD Widthall" ></asp:GridView>
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
</ajax:TabPanel>
|
</ajax:TabPanel>
|
||||||
</ajax:TabContainer>
|
</ajax:TabContainer>
|
||||||
|
|||||||
@@ -27,11 +27,16 @@ public partial class RH_CalculoSBC : ClsPaginas
|
|||||||
{
|
{
|
||||||
using (ClsNominas objnom = new ClsNominas())
|
using (ClsNominas objnom = new ClsNominas())
|
||||||
{
|
{
|
||||||
if (objnom.GetCalculoSBC(UsuarioActual.CveEmpresa, TxtFechaPago.Text))
|
if (objnom.GetCalculoSBC(UsuarioActual.CveEmpresa,DdlTipo.SelectedValue.ToEntero(), TxtFechaPago.Text))
|
||||||
{
|
{
|
||||||
GVCalculosSBC.DataSource = objnom.DTSetResultados.Tables[0];
|
GVCalculosSBC.DataSource = objnom.DTSetResultados.Tables[0];
|
||||||
GVCFija.DataSource = objnom.DTSetResultados.Tables[0];
|
GVCFija.DataSource = objnom.DTSetResultados.Tables[0];
|
||||||
GVPV.DataSource = objnom.DTSetResultados.Tables[0];
|
GVPV.DataSource = objnom.DTSetResultados.Tables[0];
|
||||||
|
if(objnom.DTSetResultados.Tables.Count > 0)
|
||||||
|
{
|
||||||
|
GVDetalleParteVariable.DataSource = objnom.DTSetResultados.Tables[1];
|
||||||
|
GVDetalleParteVariable.DataBind();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
GVCalculosSBC.DataBind();
|
GVCalculosSBC.DataBind();
|
||||||
@@ -61,13 +66,13 @@ public partial class RH_CalculoSBC : ClsPaginas
|
|||||||
//02: MovtosmodSalario GVCalculosSBC
|
//02: MovtosmodSalario GVCalculosSBC
|
||||||
concater = "";
|
concater = "";
|
||||||
int contador = 0;
|
int contador = 0;
|
||||||
foreach (var item in ObjPersonal.DtResultados.Select("Tipo=2"))
|
//foreach (var item in ObjPersonal.DtResultados.Select("Tipo=2"))
|
||||||
{
|
//{
|
||||||
|
|
||||||
MovtosmodSalario = string.Format("{0}{1}{2}", MovtosmodSalario, concater, item["Movtotxt"]);
|
// MovtosmodSalario = string.Format("{0}{1}{2}", MovtosmodSalario, concater, item["Movtotxt"]);
|
||||||
concater = "\\r\\n";
|
// concater = "\\r\\n";
|
||||||
contador++;
|
// contador++;
|
||||||
}
|
//}
|
||||||
foreach (GridViewRow item in GVCalculosSBC.Rows)
|
foreach (GridViewRow item in GVCalculosSBC.Rows)
|
||||||
{
|
{
|
||||||
double SalarioDiarioSSNuevo =Math.Round( item.DataKey("SalarioDiarioSSNuevo").ToDouble(),2);
|
double SalarioDiarioSSNuevo =Math.Round( item.DataKey("SalarioDiarioSSNuevo").ToDouble(),2);
|
||||||
|
|||||||
643
RH/Personal.aspx
643
RH/Personal.aspx
File diff suppressed because it is too large
Load Diff
@@ -809,9 +809,6 @@ Partial Class RH_Personal
|
|||||||
ViewState("Archivo") = ""
|
ViewState("Archivo") = ""
|
||||||
DTConsumos = Nothing
|
DTConsumos = Nothing
|
||||||
|
|
||||||
If UsuarioActual.CveRol = 1 Or UsuarioActual.CveEmpresa = 74 Then
|
|
||||||
TabGES.Visible = True
|
|
||||||
End If
|
|
||||||
|
|
||||||
SetValues()
|
SetValues()
|
||||||
'SetPermisos()
|
'SetPermisos()
|
||||||
@@ -1399,6 +1396,7 @@ Partial Class RH_Personal
|
|||||||
Dim drow As DataRow = ObjPersonal.DtResultados.Rows(0)
|
Dim drow As DataRow = ObjPersonal.DtResultados.Rows(0)
|
||||||
ChkEstemporal.Checked = drow("esTemporal").ToString() = "1"
|
ChkEstemporal.Checked = drow("esTemporal").ToString() = "1"
|
||||||
CHKRFCValidado.Checked = drow("RFCValidado").ToString() = "1"
|
CHKRFCValidado.Checked = drow("RFCValidado").ToString() = "1"
|
||||||
|
ChkSindicalizado.Checked = drow("Sindicalizado").ToString().ToUpper().Contiene("1", "TRUE")
|
||||||
TxtMailrecibonomina.Text = drow("MaiReciboNomina").ToString()
|
TxtMailrecibonomina.Text = drow("MaiReciboNomina").ToString()
|
||||||
'Carga Datos Personales
|
'Carga Datos Personales
|
||||||
LtlPersonal.Text = ObjPersonal.NombreCompleto
|
LtlPersonal.Text = ObjPersonal.NombreCompleto
|
||||||
@@ -1721,7 +1719,7 @@ Partial Class RH_Personal
|
|||||||
DdlClienteAsignado.SelectedValue.ToEntero, DdlSubProyectoAsignado.SelectedValue.ToEntero, URL,
|
DdlClienteAsignado.SelectedValue.ToEntero, DdlSubProyectoAsignado.SelectedValue.ToEntero, URL,
|
||||||
DdlSupervisor.SelectedValue.ToEntero, TxtCLABE.Text.Trim, TxtBancoNumCuenta.Text.Trim, DdlJornada.SelectedValue.ToEntero, DdlViaticos.SelectedValue.ToEntero, DdlViaticos.SelectedItem.Text,
|
DdlSupervisor.SelectedValue.ToEntero, TxtCLABE.Text.Trim, TxtBancoNumCuenta.Text.Trim, DdlJornada.SelectedValue.ToEntero, DdlViaticos.SelectedValue.ToEntero, DdlViaticos.SelectedItem.Text,
|
||||||
DdlPrestamos.SelectedValue.ToEntero, DdlPrestamos.SelectedItem.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, DDLUsuarioNomina.SelectedValue.ToEntero, DdlSubproyectoZona.SelectedValue.ToEntero, CveUniforme:=DdlUniforme.SelectedValue.ToEntero,
|
DdlPrestamos.SelectedValue.ToEntero, DdlPrestamos.SelectedItem.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, DDLUsuarioNomina.SelectedValue.ToEntero, DdlSubproyectoZona.SelectedValue.ToEntero, CveUniforme:=DdlUniforme.SelectedValue.ToEntero,
|
||||||
TelefonoExtension:=TxtTelefonoExtension.Text, CelularPersonal:=TxtCelularPersonal.Text, TelefonoMarcadoRapido:=TxtTelefonoMarcadoRapido.Text, ContactoAlterno:="", CveTipodeSalario:=DDlTipoSalario.SelectedValue.ToEntero()) Then
|
TelefonoExtension:=TxtTelefonoExtension.Text, CelularPersonal:=TxtCelularPersonal.Text, TelefonoMarcadoRapido:=TxtTelefonoMarcadoRapido.Text, ContactoAlterno:="", CveTipodeSalario:=DDlTipoSalario.SelectedValue.ToEntero(), Sindicalizado:=ChkSindicalizado.Checked) Then
|
||||||
|
|
||||||
If Archivo.Exists Then
|
If Archivo.Exists Then
|
||||||
|
|
||||||
@@ -1794,7 +1792,7 @@ Partial Class RH_Personal
|
|||||||
URL, DdlSupervisor.SelectedValue.ToEntero, TxtCLABE.Text.Trim, TxtBancoNumCuenta.Text.Trim, DdlJornada.SelectedValue.ToEntero, DdlViaticos.SelectedValue.ToEntero, DdlViaticos.SelectedItem.Text,
|
URL, DdlSupervisor.SelectedValue.ToEntero, TxtCLABE.Text.Trim, TxtBancoNumCuenta.Text.Trim, DdlJornada.SelectedValue.ToEntero, DdlViaticos.SelectedValue.ToEntero, DdlViaticos.SelectedItem.Text,
|
||||||
DdlPrestamos.SelectedValue.ToEntero, DdlPrestamos.SelectedItem.Text, UsuarioActual.CveEmpresa, DDLUsuarioNomina.SelectedValue.ToEntero, DdlSubproyectoZona.SelectedValue.ToEntero, CveUniforme:=DdlUniforme.SelectedValue.ToEntero,
|
DdlPrestamos.SelectedValue.ToEntero, DdlPrestamos.SelectedItem.Text, UsuarioActual.CveEmpresa, DDLUsuarioNomina.SelectedValue.ToEntero, DdlSubproyectoZona.SelectedValue.ToEntero, CveUniforme:=DdlUniforme.SelectedValue.ToEntero,
|
||||||
TelefonoExtension:=TxtTelefonoExtension.Text, CelularPersonal:=TxtCelularPersonal.Text, TelefonoMarcadoRapido:=TxtTelefonoMarcadoRapido.Text, ContactoAlterno:="", CveUsuarioModifico:=UsuarioActual.CveUsuario,
|
TelefonoExtension:=TxtTelefonoExtension.Text, CelularPersonal:=TxtCelularPersonal.Text, TelefonoMarcadoRapido:=TxtTelefonoMarcadoRapido.Text, ContactoAlterno:="", CveUsuarioModifico:=UsuarioActual.CveUsuario,
|
||||||
FechaActivo:=FechaActivo, FechaReingreso:=FechaReingreso, CveTipodeSalario:=DDlTipoSalario.SelectedValue.ToEntero()) Then
|
FechaActivo:=FechaActivo, FechaReingreso:=FechaReingreso, CveTipodeSalario:=DDlTipoSalario.SelectedValue.ToEntero(), Sindicalizado:=If(ChkSindicalizado.Checked, 1, 0)) Then
|
||||||
|
|
||||||
'Funsion usa RH Familiares
|
'Funsion usa RH Familiares
|
||||||
If UsuarioActual.Empresa.Funcionalidad(568) = "1" Then
|
If UsuarioActual.Empresa.Funcionalidad(568) = "1" Then
|
||||||
@@ -3087,8 +3085,10 @@ Partial Class RH_Personal
|
|||||||
|
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
Protected Sub GvBancosCuentas_RowEditing(sender As Object, e As System.Web.UI.WebControls.GridViewEditEventArgs) Handles GvBancosCuentas.RowEditing
|
|
||||||
Dim gvrow As GridViewRow = GvBancosCuentas.Rows(e.NewEditIndex) 'DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
|
||||||
|
Protected Sub LnkshowEditcuentasbancarias_Click(sender As Object, e As EventArgs)
|
||||||
|
Dim gvrow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||||
BtnActualizarCuentaBanco.Visible = True
|
BtnActualizarCuentaBanco.Visible = True
|
||||||
BtnAgregarCuentaBanco.Visible = False
|
BtnAgregarCuentaBanco.Visible = False
|
||||||
'CveCuentaDeposito,CveSATBanco,Cuenta,CLABE,EstatusPagoElectronico,CveMoneda
|
'CveCuentaDeposito,CveSATBanco,Cuenta,CLABE,EstatusPagoElectronico,CveMoneda
|
||||||
@@ -3101,9 +3101,12 @@ Partial Class RH_Personal
|
|||||||
ChkEstatuscuenta.Checked = gvrow.DataKey("EstatusTexto").ToUpper().Contiene("TRUE", "1", "ACTIVO")
|
ChkEstatuscuenta.Checked = gvrow.DataKey("EstatusTexto").ToUpper().Contiene("TRUE", "1", "ACTIVO")
|
||||||
UpCuentasVancarias.Update()
|
UpCuentasVancarias.Update()
|
||||||
RegistraScript("$('#DivCuentasVancarias').modal();")
|
RegistraScript("$('#DivCuentasVancarias').modal();")
|
||||||
|
End Sub
|
||||||
|
Protected Sub GvBancosCuentas_RowEditing(sender As Object, e As System.Web.UI.WebControls.GridViewEditEventArgs) Handles GvBancosCuentas.RowEditing
|
||||||
|
|
||||||
'GvBancosCuentas.EditIndex = e.NewEditIndex
|
|
||||||
'CargaGridCuentasBancos(ViewState("OrdenCuentasBancos").ToString())
|
GvBancosCuentas.EditIndex = e.NewEditIndex
|
||||||
|
CargaGridCuentasBancos(ViewState("OrdenCuentasBancos").ToString())
|
||||||
End Sub
|
End Sub
|
||||||
Protected Sub GvBancosCuentas_RowCancelingEdit(sender As Object, e As System.Web.UI.WebControls.GridViewCancelEditEventArgs) Handles GvBancosCuentas.RowCancelingEdit
|
Protected Sub GvBancosCuentas_RowCancelingEdit(sender As Object, e As System.Web.UI.WebControls.GridViewCancelEditEventArgs) Handles GvBancosCuentas.RowCancelingEdit
|
||||||
GvBancosCuentas.EditIndex = -1
|
GvBancosCuentas.EditIndex = -1
|
||||||
@@ -6481,4 +6484,6 @@ Partial Class RH_Personal
|
|||||||
End If
|
End If
|
||||||
ObjBancos.Dispose()
|
ObjBancos.Dispose()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@@ -1641,7 +1641,7 @@ function loadsortadscroll() {
|
|||||||
} else {
|
} else {
|
||||||
var splited = texto.split("/")
|
var splited = texto.split("/")
|
||||||
if (splited.length == 3) {
|
if (splited.length == 3) {
|
||||||
var d = new Date(splited[2] + "-" + splited[1] + "-" + splited[0])
|
var d = new Date(splited[2] + "/" + splited[1] + "/" + splited[0])
|
||||||
if (!(d.toString == "Invalid Date")) {
|
if (!(d.toString == "Invalid Date")) {
|
||||||
textod = d;
|
textod = d;
|
||||||
tipodate = 1;
|
tipodate = 1;
|
||||||
@@ -1736,7 +1736,7 @@ function loadsortadscroll() {
|
|||||||
} else {
|
} else {
|
||||||
var splited = texto.split("/")
|
var splited = texto.split("/")
|
||||||
if (splited.length == 3) {
|
if (splited.length == 3) {
|
||||||
var d = new Date(splited[2] + "-" + splited[1] + "-" + splited[0])
|
var d = new Date(splited[2] + "/" + splited[1] + "/" + splited[0])
|
||||||
if (!(d.toString == "Invalid Date")) {
|
if (!(d.toString == "Invalid Date")) {
|
||||||
textod = d;
|
textod = d;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -316,7 +316,26 @@ Partial Class Ventas_ActualizarPrecios
|
|||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
|
|
||||||
DtExcel.TableName = DdlPrecioLista.SelectedItem.Text
|
|
||||||
|
If DdlPrecioLista.SelectedItem IsNot Nothing Then
|
||||||
|
Dim worksheetName As String = DdlPrecioLista.SelectedItem.Text
|
||||||
|
|
||||||
|
Const invalidCharsRegex As String = "[/\\*'?[\]:]+"
|
||||||
|
Const maxLength As Integer = 31
|
||||||
|
Dim safeName As String = Regex.Replace(worksheetName, invalidCharsRegex, " ").Replace(" ", " ").Trim()
|
||||||
|
|
||||||
|
If String.IsNullOrEmpty(safeName) Then
|
||||||
|
safeName = "Precios" ' cannot be empty
|
||||||
|
ElseIf safeName.Length > maxLength Then
|
||||||
|
safeName = safeName.Substring(0, maxLength)
|
||||||
|
End If
|
||||||
|
|
||||||
|
DtExcel.TableName = safeName
|
||||||
|
Else
|
||||||
|
DtExcel.TableName = "Precios"
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
DtExcel.Columns("Codigo").ColumnName = "Código"
|
DtExcel.Columns("Codigo").ColumnName = "Código"
|
||||||
DtExcel.Columns("PS").ColumnName = "Producto / Servicio"
|
DtExcel.Columns("PS").ColumnName = "Producto / Servicio"
|
||||||
SpreadsheetInfo.SetLicense(ModExtensiones.SerialGemBoxSpreadsheet)
|
SpreadsheetInfo.SetLicense(ModExtensiones.SerialGemBoxSpreadsheet)
|
||||||
|
|||||||
@@ -203,7 +203,8 @@
|
|||||||
<br />
|
<br />
|
||||||
<asp:UpdatePanel ID="UPDatos" runat="server" UpdateMode="Conditional">
|
<asp:UpdatePanel ID="UPDatos" runat="server" UpdateMode="Conditional">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
<asp:GridView ID="GvDatos" runat="server" ClientIDMode="Static" AutoGenerateColumns="False" EmptyDataText="No se encontraron Productos o Servicios registrados" ToolTip="Listado de Productos o Servicios" CssClass="table table-striped table-hover Widthall" UseAccessibleHeader="true" GridLines="None">
|
<asp:GridView ID="GvDatos" runat="server" ClientIDMode="Static" AutoGenerateColumns="False" EmptyDataText="No se encontraron Productos o Servicios registrados"
|
||||||
|
ToolTip="Listado de Productos o Servicios" CssClass="table table-striped table-hover Widthall" UseAccessibleHeader="true" GridLines="None">
|
||||||
<Columns>
|
<Columns>
|
||||||
<asp:BoundField DataField="Clasificacion" HeaderText="Clasificación" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="10%" SortExpression="OrdenarGV" />
|
<asp:BoundField DataField="Clasificacion" HeaderText="Clasificación" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="10%" SortExpression="OrdenarGV" />
|
||||||
<asp:BoundField DataField="TipoPS" HeaderText="Tipo" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="5%" />
|
<asp:BoundField DataField="TipoPS" HeaderText="Tipo" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="5%" />
|
||||||
@@ -373,7 +374,23 @@
|
|||||||
<script src="/Metronic/assets/global/scripts/datatable.js"></script>
|
<script src="/Metronic/assets/global/scripts/datatable.js"></script>
|
||||||
<script src="/Metronic/assets/global/plugins/datatables/all.min.js"></script>
|
<script src="/Metronic/assets/global/plugins/datatables/all.min.js"></script>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
|
jQuery.extend(jQuery.fn.dataTableExt.oSort, {
|
||||||
|
"date-esMX-pre": function (a) {
|
||||||
|
if (a == null || a == "") {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
var ukDatea = a.split('/');
|
||||||
|
return (ukDatea[2] + ukDatea[1] + ukDatea[0]) * 1;
|
||||||
|
},
|
||||||
|
|
||||||
|
"date-esMX-asc": function (a, b) {
|
||||||
|
return ((a < b) ? -1 : ((a > b) ? 1 : 0));
|
||||||
|
},
|
||||||
|
|
||||||
|
"date-esMX-desc": function (a, b) {
|
||||||
|
return ((a < b) ? 1 : ((a > b) ? -1 : 0));
|
||||||
|
}
|
||||||
|
});
|
||||||
var OrdenarGV = function () {
|
var OrdenarGV = function () {
|
||||||
var Tam = TamañoVentana();
|
var Tam = TamañoVentana();
|
||||||
var Alto = Tam.height - 270;
|
var Alto = Tam.height - 270;
|
||||||
@@ -385,7 +402,11 @@
|
|||||||
scrollCollapse: true,
|
scrollCollapse: true,
|
||||||
paging: false,
|
paging: false,
|
||||||
searching: false,
|
searching: false,
|
||||||
info: false
|
info: false,
|
||||||
|
|
||||||
|
columnDefs: [
|
||||||
|
{ "type": "date-esMX", targets: 7 }
|
||||||
|
]
|
||||||
});
|
});
|
||||||
$('#GvDatos').parent().parent().children().first().css("position", "static");
|
$('#GvDatos').parent().parent().children().first().css("position", "static");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -59,7 +59,7 @@
|
|||||||
|
|
||||||
<asp:GridView ID="GvDatos" CssClass="table table-striped table-hover Widthall" runat="server" AutoGenerateColumns="False" GridLines="None">
|
<asp:GridView ID="GvDatos" CssClass="table table-striped table-hover Widthall" runat="server" AutoGenerateColumns="False" GridLines="None">
|
||||||
<Columns>
|
<Columns>
|
||||||
<asp:TemplateField HeaderText="Promoción" ItemStyle-Width="300px" ItemStyle-HorizontalAlign="Left">
|
<asp:TemplateField HeaderText="Promoción" ItemStyle-HorizontalAlign="Left">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:HyperLink runat="server" ID="HLPromocion" Text='<%# Eval("Promocion").ToString %>' CssClass="Texto"></asp:HyperLink>
|
<asp:HyperLink runat="server" ID="HLPromocion" Text='<%# Eval("Promocion").ToString %>' CssClass="Texto"></asp:HyperLink>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
|
|||||||
@@ -5037,6 +5037,9 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
|
<Triggers>
|
||||||
|
<asp:PostBackTrigger ControlID="BtnDescargar" />
|
||||||
|
</Triggers>
|
||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1763,7 +1763,7 @@ Partial Class Clientes
|
|||||||
DivPortletSucursales.Visible = False
|
DivPortletSucursales.Visible = False
|
||||||
DivPortletDireccionEnvio.Visible = False
|
DivPortletDireccionEnvio.Visible = False
|
||||||
DivPortletAsignaciones.Visible = False
|
DivPortletAsignaciones.Visible = False
|
||||||
DivPortletBitacora.Visible = False
|
'DivPortletBitacora.Visible = False
|
||||||
BtnEliminar.Visible = False
|
BtnEliminar.Visible = False
|
||||||
|
|
||||||
DivProtletRegistrar.Visible = True
|
DivProtletRegistrar.Visible = True
|
||||||
|
|||||||
@@ -1867,7 +1867,7 @@ Partial Class PV
|
|||||||
For Each Row As DataRow In TmpDT.FiltraParametros("EliminarDB = False").Rows
|
For Each Row As DataRow In TmpDT.FiltraParametros("EliminarDB = False").Rows
|
||||||
Dim CveVentaDetalle As Integer = Row("CveVentaDetalle").ToString.ToEntero()
|
Dim CveVentaDetalle As Integer = Row("CveVentaDetalle").ToString.ToEntero()
|
||||||
If CveVentaDetalle > 0 Then
|
If CveVentaDetalle > 0 Then
|
||||||
If Not ObjVentas.UpdateVentaDetalleRemision(Row("CveVentaDetalle").ToString.ToEntero, Row("CvePS").ToString.ToEntero, Row("Cantidad").ToString.ToDecimal, Row("PU").ToString.ToDecimal(), Row("ImporteIEPS").ToString.ToDecimal(), Row("PorcentajeIEPS").ToString().ToDecimal(), Row("Obs").ToString, UsuarioActual.CveUsuario) Then
|
If Not ObjVentas.UpdateVentaDetalleRemision(Row("CveVentaDetalle").ToString.ToEntero, Row("CvePS").ToString.ToEntero, Row("Cantidad").ToString.ToDecimal, Row("PU").ToString.ToDecimal(), Row("ImporteIEPS").ToString.ToDecimal(), Row("PorcentajeIEPS").ToString().ToDecimal(), Row("ImporteIVA").ToString.ToDecimal(), Row("PorcentajeIVA").ToString().ToDecimal(), Row("Obs").ToString, UsuarioActual.CveUsuario) Then
|
||||||
OcurrioError = True
|
OcurrioError = True
|
||||||
Exit For
|
Exit For
|
||||||
End If
|
End If
|
||||||
|
|||||||
@@ -1427,7 +1427,7 @@
|
|||||||
<td>
|
<td>
|
||||||
<asp:TextBox ID="TxtSubTotal2" ClientIDMode="Static" runat="server" BorderStyle="None" Style="text-align: right;" Text="0.00" Width="78px"></asp:TextBox></td>
|
<asp:TextBox ID="TxtSubTotal2" ClientIDMode="Static" runat="server" BorderStyle="None" Style="text-align: right;" Text="0.00" Width="78px"></asp:TextBox></td>
|
||||||
<td>
|
<td>
|
||||||
<%-- <asp:LinkButton ID="LkbAgregarComplementos" runat="server" CssClass="btn btn-circle btn-xs gray" Text="<i class='fa fa-bell '></i>"></asp:LinkButton>--%>
|
<%-- <asp:LinkButton ID="LkbAgregarComplementos" runat="server" CssClass="btn btn-circle btn-xs gray" Text="<i class='fa fa-bell '></i>"></asp:LinkButton>--%>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
@@ -2723,7 +2723,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
<td rowspan="1" colspan="1">
|
<td rowspan="1" colspan="1">
|
||||||
<div class="portlet light xspadding bordered whitoutcol" style="width: 450px;">
|
<div class="portlet light xspadding bordered whitoutcol" style="width: 450px;">
|
||||||
<div class="portlet-title">
|
<div class="portlet-title">
|
||||||
@@ -3631,6 +3631,19 @@
|
|||||||
<tr align="left" id="trPaqueteriaDirectaLabel" runat="server" visible="false">
|
<tr align="left" id="trPaqueteriaDirectaLabel" runat="server" visible="false">
|
||||||
<td id="Td4" runat="server">Tipo de Entrega: <b>Entrega Directa</b></td>
|
<td id="Td4" runat="server">Tipo de Entrega: <b>Entrega Directa</b></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr align="left" id="trRotacion" runat="server" visible="false">
|
||||||
|
<td id="Td3" runat="server">Próxima Rotación y Balanceo: </td>
|
||||||
|
</tr>
|
||||||
|
<tr align="left" id="trRotacionlbl" runat="server" visible="false">
|
||||||
|
<td><asp:Label runat="server" id="LblRotacion" Text=""></asp:Label></td>
|
||||||
|
</tr>
|
||||||
|
<tr align="left" id="trAlineacion" runat="server" visible="false">
|
||||||
|
<td id="Td7" runat="server">Próxima Alineación: </td>
|
||||||
|
</tr>
|
||||||
|
<tr align="left" id="trAlineacionlbl" runat="server" visible="false">
|
||||||
|
<td><asp:Label runat="server" id="LblAlineacion" Text=""></asp:Label></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
@@ -7097,6 +7110,7 @@
|
|||||||
<asp:TemplateField>
|
<asp:TemplateField>
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:CheckBox ID="ChkAplicar" runat="server" />
|
<asp:CheckBox ID="ChkAplicar" runat="server" />
|
||||||
|
<asp:HiddenField ID="HdnPorcentajeIVA" ClientIDMode="Static" runat="server" Value='<%# Eval("PorcentajeIVA").ToString %>' />
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField HeaderText="Cantidad">
|
<asp:TemplateField HeaderText="Cantidad">
|
||||||
@@ -7111,6 +7125,7 @@
|
|||||||
<asp:BoundField HeaderText="Fecha" DataField="Fecha" DataFormatString="{0:d}" ItemStyle-HorizontalAlign="Center" />
|
<asp:BoundField HeaderText="Fecha" DataField="Fecha" DataFormatString="{0:d}" ItemStyle-HorizontalAlign="Center" />
|
||||||
<asp:TemplateField HeaderText="Total" ItemStyle-HorizontalAlign="Right">
|
<asp:TemplateField HeaderText="Total" ItemStyle-HorizontalAlign="Right">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
|
<asp:HiddenField ID="HdnPU" ClientIDMode="Static" runat="server" Value='<%# Eval("PU").ToString %>' />
|
||||||
<asp:Literal ID="TtlTotal" runat="server" Text='<%# Eval("Total", "{0:N2}") %>'></asp:Literal>
|
<asp:Literal ID="TtlTotal" runat="server" Text='<%# Eval("Total", "{0:N2}") %>'></asp:Literal>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
@@ -7427,6 +7442,66 @@
|
|||||||
TxtImporte.value = "";
|
TxtImporte.value = "";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
function CalculaSaldoRNCChkDetalle(TxtCantidad, CantidadPendiente, ImporteTotal, Chk) {
|
||||||
|
//ImportesRNCCargo
|
||||||
|
let Importe = 0;
|
||||||
|
if (Chk.checked) {
|
||||||
|
let SaldoMaximoUtilizable = ToDouble(HdnSaldoMaximoUsados.value)
|
||||||
|
let ImportesAsignados = 0;
|
||||||
|
|
||||||
|
$('.ImportesRNCDetalle').each(function () {
|
||||||
|
|
||||||
|
if (Chk.id != $(this).find("td").eq(0).find(":checkbox").attr('id')) {
|
||||||
|
let seleccionado = $(this).find("td").eq(0).find(":checkbox").is(':checked');
|
||||||
|
|
||||||
|
if (seleccionado) {
|
||||||
|
let cantidad = ToDouble($(this).find("td").eq(1).find(":text").val());
|
||||||
|
let porcentajeIVA = ToDouble($(this).find("td").eq(0).find(":hidden").val());
|
||||||
|
let precio = ToDouble($(this).find("td").eq(5).find(":hidden").val());
|
||||||
|
|
||||||
|
let totalcalculableImpuestos = (cantidad * precio);
|
||||||
|
let iva = ToDouble((totalcalculableImpuestos * porcentajeIVA).toFixed(2));
|
||||||
|
|
||||||
|
ImportesAsignados += totalcalculableImpuestos + iva;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
Importe = SaldoMaximoUtilizable - ImportesAsignados;
|
||||||
|
|
||||||
|
if (Importe > 0) {
|
||||||
|
|
||||||
|
} else {
|
||||||
|
if (SaldoMaximoUtilizable > 0) {
|
||||||
|
Importe = 0;
|
||||||
|
Chk.checked = false;
|
||||||
|
} else {
|
||||||
|
Importe = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
} else {
|
||||||
|
Importe = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
Importe = ToDouble(Importe.toFixed(2));
|
||||||
|
|
||||||
|
if (Importe > 0) {
|
||||||
|
let pu = (ImporteTotal / CantidadPendiente);
|
||||||
|
|
||||||
|
if (pu > 0) {
|
||||||
|
TxtCantidad.value = (Importe / pu).toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}else {
|
||||||
|
TxtCantidad.value = "0";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
function LimitaSaldoRNCChk(TxtImporte, Saldo) {
|
function LimitaSaldoRNCChk(TxtImporte, Saldo) {
|
||||||
//var Importe = 0;
|
//var Importe = 0;
|
||||||
|
|
||||||
@@ -8716,21 +8791,21 @@
|
|||||||
|
|
||||||
if (TotalRem == TotalNC) {
|
if (TotalRem == TotalNC) {
|
||||||
document.getElementById('<%= TxtImportesRemisionesNC.ClientID %>').style.border = "2px solid #04B431";
|
document.getElementById('<%= TxtImportesRemisionesNC.ClientID %>').style.border = "2px solid #04B431";
|
||||||
document.getElementById('<%= TxtNCImporte.ClientID %>').style.border = "2px solid #04B431";
|
document.getElementById('<%= TxtNCImporte.ClientID %>').style.border = "2px solid #04B431";
|
||||||
document.getElementById('<%= TxtImportesRemisionesNC.ClientID %>').style.color = "";
|
document.getElementById('<%= TxtImportesRemisionesNC.ClientID %>').style.color = "";
|
||||||
document.getElementById('<%= TxtNCImporte.ClientID %>').style.color = "";
|
document.getElementById('<%= TxtNCImporte.ClientID %>').style.color = "";
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
document.getElementById('<%= TxtImportesRemisionesNC.ClientID %>').style.border = "2px solid #ff0000";
|
document.getElementById('<%= TxtImportesRemisionesNC.ClientID %>').style.border = "2px solid #ff0000";
|
||||||
document.getElementById('<%= TxtNCImporte.ClientID %>').style.border = "2px solid #ff0000";
|
document.getElementById('<%= TxtNCImporte.ClientID %>').style.border = "2px solid #ff0000";
|
||||||
document.getElementById('<%= TxtImportesRemisionesNC.ClientID %>').style.color = "#ff0000";
|
document.getElementById('<%= TxtImportesRemisionesNC.ClientID %>').style.color = "#ff0000";
|
||||||
document.getElementById('<%= TxtNCImporte.ClientID %>').style.color = "#ff0000";
|
document.getElementById('<%= TxtNCImporte.ClientID %>').style.color = "#ff0000";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
function CerrarModalRemNC() {
|
function CerrarModalRemNC() {
|
||||||
if ('<%= UsuarioActual.Empresa.Funcionalidad(344) %>' == '1') {
|
if ('<%= UsuarioActual.Empresa.Funcionalidad(344) %>' == '1') {
|
||||||
AplicarValidarRNC(true);
|
AplicarValidarRNC(true);
|
||||||
CompararNC();
|
CompararNC();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2907,8 +2907,30 @@ Partial Class Ventas
|
|||||||
End If
|
End If
|
||||||
MostrarOpcionesPaqueteria()
|
MostrarOpcionesPaqueteria()
|
||||||
|
|
||||||
|
'If ViewState("CveCotizacion").ToString().ToEntero() > 0 Then
|
||||||
|
|
||||||
|
'If Not AjustarTotalCotizacionFacturada(ViewState("CveCotizacion").ToString().ToEntero(), TxtTotal.Text.ToDecimal) Then
|
||||||
|
' BtnEmitirImprimir.Visible = True
|
||||||
|
' Alert("Ocurrió un error al ajustar el importe", TipoMensaje.MsgError)
|
||||||
|
'End If
|
||||||
|
|
||||||
|
'End If
|
||||||
|
|
||||||
'UNA VEZ CARGADA LAS CONDICIONES DE PAGO INICIALMENTE, NO VUELVE A SOBREESCRIBIR EL VALOR
|
'UNA VEZ CARGADA LAS CONDICIONES DE PAGO INICIALMENTE, NO VUELVE A SOBREESCRIBIR EL VALOR
|
||||||
CveFormaPago33Cliente = -1
|
CveFormaPago33Cliente = -1
|
||||||
|
|
||||||
|
If UsuarioActual.CveEmpresa.Contiene(141, 152, 159, 160, 161, 162, 163) Then
|
||||||
|
trRotacion.Visible = True
|
||||||
|
trRotacionlbl.Visible = True
|
||||||
|
trAlineacion.Visible = True
|
||||||
|
trAlineacionlbl.Visible = True
|
||||||
|
|
||||||
|
Dim FechaRotaAlinea As Date = TxtFecha.Text.ToDate
|
||||||
|
LblRotacion.Text = FechaRotaAlinea.AddMonths(6).ToShortDateString
|
||||||
|
LblAlineacion.Text = FechaRotaAlinea.AddMonths(6).ToShortDateString
|
||||||
|
|
||||||
|
UPObservaciones.Update()
|
||||||
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
Private Sub BloqueaClasificaciones()
|
Private Sub BloqueaClasificaciones()
|
||||||
If UsuarioActual.Empresa.Funcionalidad(558) = "1" AndAlso DdlTipoComprobante.SelectedValue = "Cot" Then
|
If UsuarioActual.Empresa.Funcionalidad(558) = "1" AndAlso DdlTipoComprobante.SelectedValue = "Cot" Then
|
||||||
@@ -7006,17 +7028,15 @@ Partial Class Ventas
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
Else
|
Else
|
||||||
|
Dim DrPS As DataRow = Nothing
|
||||||
|
|
||||||
|
DrPS = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=TmpDT.Rows(e.RowIndex)("CvePS").ToString().ToEntero()).FiltroPrimero("")
|
||||||
|
|
||||||
If Not ClienteDesglosaIEPS Then
|
If Not ClienteDesglosaIEPS Then
|
||||||
Dim DrPS As DataRow = Nothing
|
|
||||||
|
|
||||||
'DrPS = GlobalDTProductosServicios(UsuarioActual.CveEmpresa, CvePS:=TmpDT.Rows(e.RowIndex)("CvePS").ToString().ToEntero(), Estatus:=-1).FiltroPrimero("")
|
|
||||||
|
|
||||||
DrPS = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=TmpDT.Rows(e.RowIndex)("CvePS").ToString().ToEntero()).FiltroPrimero("")
|
|
||||||
|
|
||||||
PU = PU * (1 + DrPS("IEPSPorcentaje").ToString().ToDecimal)
|
PU = PU * (1 + DrPS("IEPSPorcentaje").ToString().ToDecimal)
|
||||||
|
|
||||||
TmpDT.Rows(e.RowIndex)("PorcentajeIEPS") = 0
|
TmpDT.Rows(e.RowIndex)("PorcentajeIEPS") = 0
|
||||||
DrPS = Nothing
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Dim TotalCalculableImpuestos As Decimal = ((Cantidad * PU) - (ObjDescuento.ImporteDescuento))
|
Dim TotalCalculableImpuestos As Decimal = ((Cantidad * PU) - (ObjDescuento.ImporteDescuento))
|
||||||
@@ -7039,7 +7059,11 @@ Partial Class Ventas
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If DrPS("IVA").ToString().Contiene("-1", "") Then
|
||||||
|
TmpDT.Rows(e.RowIndex)("PorcentajeIVA") = PorcentajeIVA
|
||||||
|
Else
|
||||||
|
TmpDT.Rows(e.RowIndex)("PorcentajeIVA") = DrPS("IVA")
|
||||||
|
End If
|
||||||
|
|
||||||
TmpDT.Rows(e.RowIndex)("CveUM") = GvPS.Rows(e.RowIndex).FCDropDownList("DdlUnidadMedida").SelectedValue.ToEntero()
|
TmpDT.Rows(e.RowIndex)("CveUM") = GvPS.Rows(e.RowIndex).FCDropDownList("DdlUnidadMedida").SelectedValue.ToEntero()
|
||||||
TmpDT.Rows(e.RowIndex)("UM") = GvPS.Rows(e.RowIndex).FCDropDownList("DdlUnidadMedida").SelectedItem.Text
|
TmpDT.Rows(e.RowIndex)("UM") = GvPS.Rows(e.RowIndex).FCDropDownList("DdlUnidadMedida").SelectedItem.Text
|
||||||
@@ -7073,6 +7097,8 @@ Partial Class Ventas
|
|||||||
TmpDT.Rows(e.RowIndex)("CveSubProyecto") = GvPS.Rows(e.RowIndex).FCDropDownList("DdlSubProyecto").SelectedValue
|
TmpDT.Rows(e.RowIndex)("CveSubProyecto") = GvPS.Rows(e.RowIndex).FCDropDownList("DdlSubProyecto").SelectedValue
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
DrPS = Nothing
|
||||||
|
|
||||||
GvPS.EditIndex = -1
|
GvPS.EditIndex = -1
|
||||||
GvPS.DataSource = TmpDT
|
GvPS.DataSource = TmpDT
|
||||||
DtInv = TmpDT.Copy.FiltraParametros("CveTipoPS = 2")
|
DtInv = TmpDT.Copy.FiltraParametros("CveTipoPS = 2")
|
||||||
@@ -9714,7 +9740,7 @@ Partial Class Ventas
|
|||||||
ObjFactura.SetSubProyectoMatriz(Me)
|
ObjFactura.SetSubProyectoMatriz(Me)
|
||||||
ObjFactura.SetSubProyecto(Me)
|
ObjFactura.SetSubProyecto(Me)
|
||||||
ObjFactura.ClienteSucursal = New Modelos.SucursalModel()
|
ObjFactura.ClienteSucursal = New Modelos.SucursalModel()
|
||||||
If Not CveEmpresaCRM > 0 Then
|
If CveCliente > 0 Then
|
||||||
If Me.ClienteSucursal IsNot Nothing Then
|
If Me.ClienteSucursal IsNot Nothing Then
|
||||||
ObjFactura.ClienteSucursal.RFC = Me.ClienteSucursal.RFC
|
ObjFactura.ClienteSucursal.RFC = Me.ClienteSucursal.RFC
|
||||||
ObjFactura.ClienteSucursal.Nombre = Me.ClienteSucursal.Nombre
|
ObjFactura.ClienteSucursal.Nombre = Me.ClienteSucursal.Nombre
|
||||||
@@ -9815,7 +9841,7 @@ Partial Class Ventas
|
|||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If Not CveEmpresaCRM > 0 Then ObjFactura.Timbre = PreParaTimbre(ObjFactura)
|
If CveCliente > 0 Then ObjFactura.Timbre = PreParaTimbre(ObjFactura)
|
||||||
|
|
||||||
'SI SE ESTA EDITANDO ACTUALIZA LOS IMPORTES DEL DT
|
'SI SE ESTA EDITANDO ACTUALIZA LOS IMPORTES DEL DT
|
||||||
If GvImpuestosLocales2.Visible AndAlso GvImpuestosLocales2.Enabled Then
|
If GvImpuestosLocales2.Visible AndAlso GvImpuestosLocales2.Enabled Then
|
||||||
@@ -16151,7 +16177,7 @@ Partial Class Ventas
|
|||||||
'End If
|
'End If
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
Private Sub CargaFormatoSucursal()
|
Private Sub CargaFormatoSucursal(Optional RecalcularIVA As Boolean = True)
|
||||||
Dim dr = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimero(String.Format("CveSubProyecto = {0}", If(DdlSubProyectoDatos.SelectedValue = "", "-1", DdlSubProyectoDatos.SelectedValue)))
|
Dim dr = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimero(String.Format("CveSubProyecto = {0}", If(DdlSubProyectoDatos.SelectedValue = "", "-1", DdlSubProyectoDatos.SelectedValue)))
|
||||||
If dr IsNot Nothing Then
|
If dr IsNot Nothing Then
|
||||||
ViewState("SucCalle") = dr("Calle")
|
ViewState("SucCalle") = dr("Calle")
|
||||||
@@ -16182,7 +16208,7 @@ Partial Class Ventas
|
|||||||
If CveVenta <= 0 AndAlso DdlTipoComprobante.SelectedValue = "Cot" Then
|
If CveVenta <= 0 AndAlso DdlTipoComprobante.SelectedValue = "Cot" Then
|
||||||
DdlIVA.Visible = True
|
DdlIVA.Visible = True
|
||||||
End If
|
End If
|
||||||
If TmpDT IsNot Nothing AndAlso TmpDT.Rows.Count > 0 AndAlso (Not CveVenta > 0 Or EsCreaApartirDe Or CveDevolucion > 0) Then RecalculaIVA()
|
If RecalcularIVA AndAlso TmpDT IsNot Nothing AndAlso TmpDT.Rows.Count > 0 AndAlso (Not CveVenta > 0 Or EsCreaApartirDe Or CveDevolucion > 0) Then RecalculaIVA()
|
||||||
'ViewState("SubProyectoPorcentajeIVA") = dr("IVA")
|
'ViewState("SubProyectoPorcentajeIVA") = dr("IVA")
|
||||||
ViewState("TipoFormato") = dr("TipoFormato")
|
ViewState("TipoFormato") = dr("TipoFormato")
|
||||||
'ViewState("Serie") = dr("Serie")
|
'ViewState("Serie") = dr("Serie")
|
||||||
@@ -16534,7 +16560,7 @@ Partial Class Ventas
|
|||||||
If TipoAplicacion = 2 Then
|
If TipoAplicacion = 2 Then
|
||||||
Descuento = 0
|
Descuento = 0
|
||||||
SeAjustoPU = True
|
SeAjustoPU = True
|
||||||
PUModificado = PUPromocion
|
PUModificado = Math.Round(PUPromocion / (1 + If(IncluyeImpuestos, PorcentajeIVA, 0)), 6)
|
||||||
Else
|
Else
|
||||||
Descuento = Descuento + PU - TotalPromocion
|
Descuento = Descuento + PU - TotalPromocion
|
||||||
End If
|
End If
|
||||||
@@ -17050,11 +17076,17 @@ Partial Class Ventas
|
|||||||
DrPoliza("CveTipoPS") = DrPSAdicional("CveTipoPS")
|
DrPoliza("CveTipoPS") = DrPSAdicional("CveTipoPS")
|
||||||
DrPoliza("CveTipoInvPS") = DrPSAdicional("Inv_CveMetodoInventario")
|
DrPoliza("CveTipoInvPS") = DrPSAdicional("Inv_CveMetodoInventario")
|
||||||
DrPoliza("NoIdentificacion") = DrPSAdicional("Codigo")
|
DrPoliza("NoIdentificacion") = DrPSAdicional("Codigo")
|
||||||
|
|
||||||
If Modalidad = "U" Then
|
If Modalidad = "U" Then
|
||||||
DrPoliza("Consec") = Index
|
DrPoliza("Consec") = Index
|
||||||
Else
|
Else
|
||||||
DrPoliza("Consec") = TmpDT.Rows.Count + 1
|
Dim ConsecutivoActual As Integer = TmpDT.MAX("Consec").ToEntero()
|
||||||
|
If ConsecutivoActual < 0 Then
|
||||||
|
ConsecutivoActual = 0
|
||||||
|
End If
|
||||||
|
DrPoliza("Consec") = ConsecutivoActual + 1
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Row("Orden") = TmpDT.Rows.Count + 1
|
Row("Orden") = TmpDT.Rows.Count + 1
|
||||||
DrPoliza("Cantidad") = If(Dr("Cantidad").ToString().ToDecimal > 0, Dr("Cantidad").ToString().ToDecimal, Cantidad)
|
DrPoliza("Cantidad") = If(Dr("Cantidad").ToString().ToDecimal > 0, Dr("Cantidad").ToString().ToDecimal, Cantidad)
|
||||||
PU = 0
|
PU = 0
|
||||||
@@ -17128,6 +17160,249 @@ Partial Class Ventas
|
|||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
'Private Function AgregarProductoServicioCotizacion(Cantidad As Decimal, CveUM As Integer, UM As String, CveClasificacion As Integer, Clasificacion As String, CvePS As Integer, PS As String, Obs As String,
|
||||||
|
' PU As Decimal, Descuento As Decimal, PorcentajeIVA As Decimal, ImporteIVA As Decimal, CveProyecto As Integer, Proyecto As String, CveSubProyecto As Integer, SubProyecto As String, Optional Serie As String = "", Optional TiempoEntrega As String = "",
|
||||||
|
' Optional EntregaDirecta As Integer = 0, Optional CveContratoDetalle As Integer = 0, Optional CveVentaDetalle As Integer = 0, Optional CveMovimientoDetallePedido As Integer = 0,
|
||||||
|
' Optional CveOrdenCompraDetalle As Integer = 0, Optional CveVentaDetalleRemision As Integer = 0, Optional CveVentaDetalleCotizacion As Integer = 0, Optional CuentaPredial As String = "",
|
||||||
|
' Optional RegeneraIEPS As Boolean = True, Optional CveVentaDetallePedido2 As Integer = 0, Optional SeActualiza As Boolean = False, Optional CvePromocionDetalle As Integer = -1, Optional EsCargo As Boolean = False,
|
||||||
|
' Optional ImporteProntoPago As Decimal = 0) As Boolean
|
||||||
|
|
||||||
|
' Dim Retorno As Boolean = False
|
||||||
|
' Try
|
||||||
|
' If Not CvePS > 0 Then
|
||||||
|
' Alert("Ocurrió un error al cargar la información del producto a agregar. Por favor verifique y vuelva a intentar.", TipoMensaje.MsgError)
|
||||||
|
' Return False
|
||||||
|
' End If
|
||||||
|
|
||||||
|
' Dim Row As DataRow = Nothing
|
||||||
|
' Dim TotalCalculableImpuestos As Decimal = 0
|
||||||
|
' PU = PU.RoundSQL(6) ' el precio unitario puede llevar hasta 6 decimales permitidos
|
||||||
|
' Descuento = Descuento.RoundSQL(NumeroDecimales)
|
||||||
|
|
||||||
|
' If Not TmpDT.Columns.Contains("RetIVA") Then
|
||||||
|
' TmpDT.Columns.Add("RetIVA", GetType(Decimal))
|
||||||
|
' End If
|
||||||
|
|
||||||
|
' Row = TmpDT.NewRow()
|
||||||
|
' Row("CveProyecto") = CveProyecto
|
||||||
|
' Row("Proyecto") = Proyecto
|
||||||
|
' Row("CveSubProyecto") = CveSubProyecto
|
||||||
|
' Row("SubProyecto") = SubProyecto
|
||||||
|
' Row("Serie") = Serie
|
||||||
|
' Row("TiempoEntrega") = TiempoEntrega
|
||||||
|
' If Modalidad = "U" Then
|
||||||
|
' Row("Orden") = Index
|
||||||
|
' Else
|
||||||
|
' Dim ConsecutivoActual As Integer = TmpDT.MAX("Consec").ToEntero()
|
||||||
|
' If ConsecutivoActual < 0 Then
|
||||||
|
' ConsecutivoActual = 0
|
||||||
|
' End If
|
||||||
|
' Row("Orden") = ConsecutivoActual + 1
|
||||||
|
' End If
|
||||||
|
|
||||||
|
' Row("Cantidad") = Cantidad
|
||||||
|
' Row("CveUM") = CveUM
|
||||||
|
' Row("UM") = UM
|
||||||
|
' Row("CveClasificacion") = CveClasificacion
|
||||||
|
' Row("Clasificacion") = Clasificacion
|
||||||
|
' Row("CvePS") = CvePS
|
||||||
|
' Row("Obs") = Obs
|
||||||
|
|
||||||
|
|
||||||
|
' Dim DrPS As DataRow = Nothing
|
||||||
|
|
||||||
|
' DrPS = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePS).FiltroPrimero("") ' Estado = -1
|
||||||
|
|
||||||
|
' If DrPS Is Nothing Then
|
||||||
|
' Alert("Ocurrió un error al cargar la información del Producto. Por favor vuelva a intentar.", TipoMensaje.MsgError)
|
||||||
|
' Return False
|
||||||
|
' End If
|
||||||
|
|
||||||
|
' If (DrPS("SATClaveUnidadMedida").ToString() = "" Or DrPS("SATClavePS").ToString() = "") Then
|
||||||
|
' 'VALIDA CLAVESAT
|
||||||
|
' If Not DdlTipoComprobante.SelectedValue.Contiene("Ped", "PeC") Then 'DOCUMENTOS DONDE NO SE VALIDA
|
||||||
|
' If DrPS("SATClavePS").ToString() = "" Then
|
||||||
|
' MensajeCveSAT.AppendFormat("<b>{0}-{1}</b>: Sin producto SAT<br/>", DrPS("Codigo").ToString(), DrPS("PS").ToString())
|
||||||
|
' Return False
|
||||||
|
' ElseIf DrPS("SATClaveUnidadMedida").ToString() = "" Then
|
||||||
|
' MensajeCveSAT.AppendFormat("<b>{0}-{1}</b>: Sin Unidad Medida SAT<br/>", DrPS("Codigo").ToString(), DrPS("PS").ToString())
|
||||||
|
' Return False
|
||||||
|
' End If
|
||||||
|
|
||||||
|
' 'If UsuarioActual.CveEmpresa.Contiene(72, 80, 146) AndAlso DrPS("SATClavePS").ToString() = "01010101" Then
|
||||||
|
' ' MensajeCveSAT.AppendFormat("<b>{0}-{1}</b>: El producto/servicio no existe en el catálogo del SAT<br/>", DrPS("Codigo").ToString(), DrPS("PS").ToString())
|
||||||
|
' ' Return False
|
||||||
|
' 'End If
|
||||||
|
' End If
|
||||||
|
' Else
|
||||||
|
' If UsuarioActual.CveEmpresa.Contiene(72, 80, 146) AndAlso DrPS("SATClavePS").ToString() = "01010101" Then
|
||||||
|
' MensajeCveSAT.AppendFormat("<b>{0}-{1}</b>: El producto/servicio no existe en el catálogo del SAT<br/>", DrPS("Codigo").ToString(), DrPS("PS").ToString())
|
||||||
|
' Return False
|
||||||
|
' End If
|
||||||
|
' End If
|
||||||
|
|
||||||
|
' 'verifica si tiene ventaminima
|
||||||
|
' If Cantidad > 0 AndAlso DrPS("VentaMinima").ToString().ToDecimal > 0 Then
|
||||||
|
' 'verifico que la cantidad sea multiplo de venta minima, es decir ventaminima =5, solo puede vender 5,10,15...
|
||||||
|
' If Cantidad Mod DrPS("VentaMinima").ToString().ToDecimal <> 0 Then
|
||||||
|
' Alert(String.Format("El producto se vende solo en cantidades de {0}", DrPS("VentaMinima").ToString()))
|
||||||
|
' Return False
|
||||||
|
' End If
|
||||||
|
' End If
|
||||||
|
|
||||||
|
' 'VERIFICA SI EN LA FACTURA PADRE SE DESGLOSO EL IEPS
|
||||||
|
' Dim FacturaDesglosoIEPS As Boolean = ((CveDevolucion > 0 AndAlso NuevaFactura = 1) AndAlso (Me.ObjFacturaNC IsNot Nothing AndAlso Not Me.ObjFacturaNC.VentaDesglosaIEPS))
|
||||||
|
|
||||||
|
' If Not ClienteDesglosaIEPS Then
|
||||||
|
' If Not RegeneraIEPS AndAlso Not FacturaDesglosoIEPS Then
|
||||||
|
' PU = PU * (1 + DrPS("IEPSPorcentaje").ToString().ToDecimal)
|
||||||
|
' VentaDesglosaIEPS = True
|
||||||
|
' End If
|
||||||
|
' DrPS("IEPSPorcentaje") = 0
|
||||||
|
' End If
|
||||||
|
' 'SI YA SE DESGLOSO EL IEPS SE GUARDA LA BANDERA EN ESTA FACTURA
|
||||||
|
' If FacturaDesglosoIEPS Then
|
||||||
|
' VentaDesglosaIEPS = True
|
||||||
|
' End If
|
||||||
|
|
||||||
|
|
||||||
|
' TotalCalculableImpuestos = (Cantidad * (PU)) - Descuento
|
||||||
|
|
||||||
|
' Row("PU") = PU
|
||||||
|
' Row("Codigo") = DrPS("Codigo")
|
||||||
|
' Row("NoIdentificacion") = DrPS("Codigo")
|
||||||
|
' Row("ClaveSATFraccionArancelaria") = DrPS("ClaveSATFraccionArancelaria")
|
||||||
|
' Row("ClaveSATUnidadAduana") = DrPS("ClaveSATUnidadAduana")
|
||||||
|
' Row("ClaveSATFraccionArancelariaDescripcion") = DrPS("ClaveSATFraccionArancelariaDescripcion")
|
||||||
|
' Row("ClaveSATUnidadAduanaDescripcion") = DrPS("ClaveSATUnidadAduanaDescripcion")
|
||||||
|
' If Modalidad = "U" Then
|
||||||
|
' Row("Consec") = Index
|
||||||
|
' Else
|
||||||
|
' Dim ConsecutivoActual As Integer = TmpDT.MAX("Consec").ToEntero()
|
||||||
|
' If ConsecutivoActual < 0 Then
|
||||||
|
' ConsecutivoActual = 0
|
||||||
|
' End If
|
||||||
|
' Row("Consec") = ConsecutivoActual + 1
|
||||||
|
' End If
|
||||||
|
|
||||||
|
' Row("PS") = DrPS("PS")
|
||||||
|
' Row("CodigoPS") = DrPS("PSCodigo").ToString()
|
||||||
|
' Row("CveTipoPS") = DrPS("CveTipoPS")
|
||||||
|
' Row("CveTipoInvPS") = DrPS("Inv_CveMetodoInventario")
|
||||||
|
' Row("CveTamaño") = DrPS("CveTamaño")
|
||||||
|
|
||||||
|
' If CveClasificacion <= 0 Then Row("CveClasificacion") = DrPS("CveClasificacion")
|
||||||
|
' If Clasificacion = "" Then Row("Clasificacion") = DrPS("Clasificacion")
|
||||||
|
|
||||||
|
' Row("PorcentajeIVA") = PorcentajeIVA
|
||||||
|
|
||||||
|
' Dim ClienteRetIVA = Me.ClienteRetIVA
|
||||||
|
|
||||||
|
' If ClienteRetIVA <= 0 Then
|
||||||
|
' If CBool(DrPS("EsOutSourcing").ToString()) Then
|
||||||
|
' ClienteRetIVA = 0.06D
|
||||||
|
' DdlTipoRetencion.SelectedValueExist("4")
|
||||||
|
' ElseIf DdlTipoRetencion.SelectedValue.Contiene("1", "2") Then
|
||||||
|
' ClienteRetIVA = 0.106667D
|
||||||
|
' ElseIf DdlTipoRetencion.SelectedValue.Contiene("3") Then
|
||||||
|
' ClienteRetIVA = 0.04D
|
||||||
|
' End If
|
||||||
|
' End If
|
||||||
|
|
||||||
|
' LblRetIVA.Text = (ClienteRetIVA * 100).FormatoNumero
|
||||||
|
' TrRetIVA.Style.Add("display", "")
|
||||||
|
' DdlTipoRetencion.Visible = True
|
||||||
|
|
||||||
|
|
||||||
|
' Row("IVA") = PorcentajeIVA
|
||||||
|
' Row("ImporteIVA") = (ImporteIVA).RoundSQL(NumeroDecimales)
|
||||||
|
' Row("ImporteRetIVA") = (ClienteRetIVA * TotalCalculableImpuestos).RoundSQL(NumeroDecimales)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
' Row("RetIVA") = (ClienteRetIVA * TotalCalculableImpuestos).RoundSQL(NumeroDecimales)
|
||||||
|
|
||||||
|
' Row("ImporteRetISR") = (ClienteRetISR * TotalCalculableImpuestos).RoundSQL(NumeroDecimales)
|
||||||
|
' Row("PorcentajeRetIVA") = ClienteRetIVA
|
||||||
|
' Row("PorcentajeRetISR") = ClienteRetISR
|
||||||
|
' Row("PorcentajeIEPS") = DrPS("IEPSPorcentaje")
|
||||||
|
' Row("ImporteIEPS") = (DrPS("IEPSPorcentaje").ToString().ToDecimal * TotalCalculableImpuestos).RoundSQL(NumeroDecimales)
|
||||||
|
' Row("IEPS") = Row("ImporteIEPS")
|
||||||
|
' Row("Descuento") = (Descuento).RoundSQL(NumeroDecimales)
|
||||||
|
' Row("TipoDescuento") = HdnTipoDescuento.Value
|
||||||
|
' Row("CvePromocionDetalle") = CvePromocionDetalle
|
||||||
|
' Row("Total") = (Cantidad * PU)
|
||||||
|
' Row("TotalImporte") = (Cantidad * PU).RoundSQL(NumeroDecimales)
|
||||||
|
|
||||||
|
' 'Row("AsientoContableVentas") = DrPS("AsientoContableVentas")
|
||||||
|
' ' Row("IdCtaContVentas") = IdCtaContable
|
||||||
|
' ' Row("AplicaParaConcepto") = AplicaParaConcepto
|
||||||
|
|
||||||
|
' Row("SATClaveProdServ") = DrPS("SATClavePS")
|
||||||
|
' Row("SATClaveUM") = DrPS("SATClaveUnidadMedida")
|
||||||
|
|
||||||
|
' If UsuarioActual.Empresa.UsaAC Then
|
||||||
|
' Row("CvePresupuestoIngreso") = Me.DdlFuenteRecaudacion.SelectedValue
|
||||||
|
' End If
|
||||||
|
|
||||||
|
' Row("EntregaDirecta") = EntregaDirecta
|
||||||
|
' 'Contratos
|
||||||
|
' Row("CveContratoDetalle") = CveContratoDetalle
|
||||||
|
' Row("CveVentaDetalle") = CveVentaDetalle
|
||||||
|
' Row("CveMovimientoDetallePedido") = CveMovimientoDetallePedido
|
||||||
|
' Row("CveOrdenCompraDetalle") = CveOrdenCompraDetalle
|
||||||
|
' Row("CveVentaDetalleRemision") = CveVentaDetalleRemision
|
||||||
|
' Row("CveVentaDetalleCotizacion") = CveVentaDetalleCotizacion
|
||||||
|
' Row("CveVentaDetallePedido2") = CveVentaDetallePedido2
|
||||||
|
' Row("CuentaPredial") = CuentaPredial
|
||||||
|
' Row("EsOutSourcing") = DrPS("EsOutSourcing")
|
||||||
|
' Row("EsCargo") = EsCargo
|
||||||
|
|
||||||
|
' If ImporteProntoPago > 0 Then
|
||||||
|
' Row("ImporteProntoPago") = ImporteProntoPago
|
||||||
|
' Row("TieneProntoPago") = "Si"
|
||||||
|
' 'SOLO DEBE MOSTRASE SI EL PAGO ES DE CONTADO
|
||||||
|
' If RBLPago.SelectedValue = "2" Then
|
||||||
|
' GvPS.Columns(22).Visible = True
|
||||||
|
' thProntoPago.Visible = True
|
||||||
|
' thProntoPago2.Visible = True
|
||||||
|
' End If
|
||||||
|
|
||||||
|
' End If
|
||||||
|
|
||||||
|
' If UsuarioActual.CveEmpresa = 119 Then
|
||||||
|
' If Not RemisionesLista.Count > 0 Then 'SI VIENE DE REMISION NO SE CONSIDERA
|
||||||
|
|
||||||
|
' 'MONEDA DIFERENTE DEL PS AL PRIMER PS AGREGADO
|
||||||
|
' If DdlMoneda.Enabled = False And CveVenta < 0 And TmpDT.Rows.Count > 0 Then
|
||||||
|
' If DdlMoneda.SelectedValue <> DrPS("CveMoneda").ToString() Then
|
||||||
|
' Alert($"La moneda base del producto: <b>{DrPS("PSCodigo").ToString()}</b> es diferente a la moneda del documento.", TipoMensaje.MsgAdvertencia)
|
||||||
|
' Return False
|
||||||
|
' End If
|
||||||
|
' End If
|
||||||
|
|
||||||
|
' 'ACTIVA PRODUCTOS DE LA MISMA MONEDA
|
||||||
|
' If TmpDT.Rows.Count = 0 And CveVenta < 0 Then
|
||||||
|
' DdlMoneda.SelectedValueExist(DrPS("CveMoneda").ToString())
|
||||||
|
' CambiaMoneda()
|
||||||
|
' DdlMoneda.Enabled = False
|
||||||
|
' End If
|
||||||
|
' End If
|
||||||
|
' End If
|
||||||
|
|
||||||
|
' 'RECARGAR GV
|
||||||
|
' TmpDT.Rows.Add(Row)
|
||||||
|
|
||||||
|
' Retorno = True
|
||||||
|
' Catch ex As Exception
|
||||||
|
' Retorno = False
|
||||||
|
' OnError("Ocurrió un error al agregar el producto/servicio", ex)
|
||||||
|
' End Try
|
||||||
|
|
||||||
|
|
||||||
|
' Return Retorno
|
||||||
|
'End Function
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "D A T A - T A B L E S"
|
#Region "D A T A - T A B L E S"
|
||||||
@@ -17718,6 +17993,9 @@ Partial Class Ventas
|
|||||||
|
|
||||||
If TbDescuentosRNC.Visible AndAlso ListaNCDesc IsNot Nothing Then
|
If TbDescuentosRNC.Visible AndAlso ListaNCDesc IsNot Nothing Then
|
||||||
TotalRemNCAplicado = ListaNCDesc.Sum(Function(RNC) RNC.TotalRemNCAplicado)
|
TotalRemNCAplicado = ListaNCDesc.Sum(Function(RNC) RNC.TotalRemNCAplicado)
|
||||||
|
If ListaNCBonificacion IsNot Nothing AndAlso ListaNCBonificacion.Count > 0 Then
|
||||||
|
TotalRemNCAplicado += ListaNCBonificacion.Sum(Function(RNC) RNC.TotalRemNCAplicado)
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Total = (TotalSubTotal - TotalDescuentos - TotalAmortizacion + TotalIVA + TotalIEPS - TotalRetIVA - TotalRetISR - TotalImpuestosLocales)
|
Total = (TotalSubTotal - TotalDescuentos - TotalAmortizacion + TotalIVA + TotalIEPS - TotalRetIVA - TotalRetISR - TotalImpuestosLocales)
|
||||||
@@ -19692,7 +19970,7 @@ Partial Class Ventas
|
|||||||
For Each Row As DataRow In TmpDT.Rows
|
For Each Row As DataRow In TmpDT.Rows
|
||||||
Dim CveVentaDetalle As Integer = Row("CveVentaDetalle").ToString().ToEntero()
|
Dim CveVentaDetalle As Integer = Row("CveVentaDetalle").ToString().ToEntero()
|
||||||
If CveVentaDetalle > 0 Then
|
If CveVentaDetalle > 0 Then
|
||||||
If Not ObjVentas.UpdateVentaDetalleRemision(Row("CveVentaDetalle").ToString().ToEntero(), Row("CvePS").ToString().ToEntero(), Row("Cantidad").ToString().ToDecimal, Row("PU").ToString().ToDecimal(), Row("ImporteIEPS").ToString().ToDecimal(), Row("PorcentajeIEPS").ToString().ToDecimal(), Row("Obs").ToString(), UsuarioActual.CveUsuario) Then
|
If Not ObjVentas.UpdateVentaDetalleRemision(Row("CveVentaDetalle").ToString().ToEntero(), Row("CvePS").ToString().ToEntero(), Row("Cantidad").ToString().ToDecimal, Row("PU").ToString().ToDecimal(), Row("ImporteIEPS").ToString().ToDecimal(), Row("PorcentajeIEPS").ToString().ToDecimal(), Row("ImporteIVA").ToString().ToDecimal(), Row("PorcentajeIVA").ToString().ToDecimal(), Row("Obs").ToString(), UsuarioActual.CveUsuario) Then
|
||||||
OcurrioError = True
|
OcurrioError = True
|
||||||
Exit For
|
Exit For
|
||||||
End If
|
End If
|
||||||
@@ -19753,6 +20031,12 @@ Partial Class Ventas
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If Not OcurrioError Then
|
||||||
|
If RegeneracionPolizas(ObjVentas, ObjAC, ObjConta, ObjBancos) Then
|
||||||
|
OcurrioError = True
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
If ObjConta.ValidacionPrePolizaCuadre(-1, 2, CveVenta) Then
|
If ObjConta.ValidacionPrePolizaCuadre(-1, 2, CveVenta) Then
|
||||||
If ObjConta.ValorPolizaDescuadre > 0 Then
|
If ObjConta.ValorPolizaDescuadre > 0 Then
|
||||||
If ObjConta.ValorPolizaDescuadre = 2 Then
|
If ObjConta.ValorPolizaDescuadre = 2 Then
|
||||||
@@ -19762,12 +20046,6 @@ Partial Class Ventas
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If Not OcurrioError Then
|
|
||||||
If RegeneracionPolizas(ObjVentas, ObjAC, ObjConta, ObjBancos) Then
|
|
||||||
OcurrioError = True
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
|
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
OcurrioError = True
|
OcurrioError = True
|
||||||
OnError("Ocurrió un error al actualizar la remisión", ex)
|
OnError("Ocurrió un error al actualizar la remisión", ex)
|
||||||
@@ -25054,6 +25332,23 @@ Partial Class Ventas
|
|||||||
e.Row.FCTextBox("TxtImporte").Attributes.Add("onkeyup", $"LimitaSaldoRNCChk({e.Row.FCTextBox("TxtImporte").ClientID},{e.Row.DBCampo("Saldo").ToDouble});")
|
e.Row.FCTextBox("TxtImporte").Attributes.Add("onkeyup", $"LimitaSaldoRNCChk({e.Row.FCTextBox("TxtImporte").ClientID},{e.Row.DBCampo("Saldo").ToDouble});")
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Protected Sub GvDescNCCargosDetalle_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvDescNCCargosDetalle.RowDataBound
|
||||||
|
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||||
|
|
||||||
|
If e.Row.DBCampo("CveVentaDetalleRNC").ToEntero() = 0 Then
|
||||||
|
e.Row.CssClass = "Totales"
|
||||||
|
e.Row.FCCheckBox("ChkAplicar").Visible = False
|
||||||
|
e.Row.FCTextBox("TxtCantidadRNC").Visible = False
|
||||||
|
Else
|
||||||
|
e.Row.CssClass = "ImportesRNCDetalle"
|
||||||
|
e.Row.FCCheckBox("ChkAplicar").Attributes.Add("onclick", $"CalculaSaldoRNCChkDetalle({e.Row.FCTextBox("TxtCantidadRNC").ClientID},{e.Row.DBCampo("CantidadPendiente").ToDouble},{e.Row.DBCampo("Total").ToDouble}, this);")
|
||||||
|
'e.Row.FCTextBox("TxtImporte").Attributes.Add("onkeyup", $"LimitaSaldoRNCChk({e.Row.FCTextBox("TxtImporte").ClientID},{e.Row.DBCampo("Saldo").ToDouble});")
|
||||||
|
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
Protected Sub GvDescNCBonificaciones_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvDescNCBonificaciones.RowDataBound
|
Protected Sub GvDescNCBonificaciones_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvDescNCBonificaciones.RowDataBound
|
||||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||||
e.Row.FCCheckBox("ChkAplicar").Attributes.Add("onclick", $"CalculaSaldoRNCBonChk({e.Row.FCTextBox("TxtImporte").ClientID},{e.Row.DBCampo("Saldo").ToDouble}, this);")
|
e.Row.FCCheckBox("ChkAplicar").Attributes.Add("onclick", $"CalculaSaldoRNCBonChk({e.Row.FCTextBox("TxtImporte").ClientID},{e.Row.DBCampo("Saldo").ToDouble}, this);")
|
||||||
@@ -25083,15 +25378,6 @@ Partial Class Ventas
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
Protected Sub GvDescNCCargosDetalle_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvDescNCCargosDetalle.RowDataBound
|
|
||||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
|
||||||
If e.Row.DBCampo("CveVentaDetalleRNC").ToEntero() = 0 Then
|
|
||||||
e.Row.CssClass = "Totales"
|
|
||||||
e.Row.FCCheckBox("ChkAplicar").Visible = False
|
|
||||||
e.Row.FCTextBox("TxtCantidadRNC").Visible = False
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Protected Sub GvRemisionesNCBon_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvRemisionesNCBon.RowDataBound
|
Protected Sub GvRemisionesNCBon_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvRemisionesNCBon.RowDataBound
|
||||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||||
@@ -27034,65 +27320,145 @@ Partial Class Ventas
|
|||||||
Dim OcurrioError = False
|
Dim OcurrioError = False
|
||||||
Dim MensajeError = ""
|
Dim MensajeError = ""
|
||||||
|
|
||||||
|
Try
|
||||||
|
'CONVERTIR REMISION - TIPO MONEDA -DOLARES A PESOS
|
||||||
|
If DdlMoneda.SelectedValue.ToEntero() <> 2 AndAlso ChkConvertirDolares.Checked Then
|
||||||
|
|
||||||
'ACTUALIZA VENTA
|
For Each Row As DataRow In TmpDT.Rows
|
||||||
If Not ObjVentas.UpdateVentas(TxtSubTotal.Text.ToDouble(If(ChkConvertirDoctoPesos.Checked, TxtTipoCambio.Text.ToDecimal, 1)), LblDescuentos.Text.ToDouble(If(ChkConvertirDoctoPesos.Checked, TxtTipoCambio.Text.ToDecimal, 1)), TxtIVA.Text.ToDouble(If(ChkConvertirDoctoPesos.Checked, TxtTipoCambio.Text.ToDecimal, 1)), TxtIEPS.Text.ToDouble(If(ChkConvertirDoctoPesos.Checked, TxtTipoCambio.Text.ToDecimal, 1)), TxtTotal.Text.ToDouble(If(ChkConvertirDoctoPesos.Checked, TxtTipoCambio.Text.ToDecimal, 1)),
|
Row("PU") = Math.Round(Row("PU").ToString().ToDecimal / TxtTipoCambioDlls.Text.Trim.ToDecimal, 6)
|
||||||
|
Row("Total") = Math.Round(Row("Cantidad").ToString().ToDecimal * Row("PU").ToString().ToDecimal, NumeroDecimales)
|
||||||
|
Row("TotalImporte") = Math.Round(Row("Cantidad").ToString().ToDecimal * Row("PU").ToString().ToDecimal, NumeroDecimales)
|
||||||
|
Row("Descuento") = Math.Round(Row("Descuento").ToString().ToDecimal / TxtTipoCambioDlls.Text.Trim.ToDecimal, NumeroDecimales)
|
||||||
|
Row("ImporteIEPS") = Math.Round(Row("ImporteIEPS").ToString().ToDecimal / TxtTipoCambioDlls.Text.Trim.ToDecimal, NumeroDecimales)
|
||||||
|
Row("ImporteIVA") = Math.Round(Row("ImporteIVA").ToString().ToDecimal / TxtTipoCambioDlls.Text.Trim.ToDecimal, NumeroDecimales)
|
||||||
|
Row("ImporteRetIVA") = Math.Round(Row("ImporteRetIVA").ToString().ToDecimal / TxtTipoCambioDlls.Text.Trim.ToDecimal, NumeroDecimales)
|
||||||
|
Row("ImporteRetISR") = Math.Round(Row("ImporteRetISR").ToString().ToDecimal / TxtTipoCambioDlls.Text.Trim.ToDecimal, NumeroDecimales)
|
||||||
|
Next
|
||||||
|
|
||||||
|
Dim ImpuestosLocales As Double = 0
|
||||||
|
For Each gvr As GridViewRow In GvImpuestosLocales2.Rows
|
||||||
|
If gvr.RowType = DataControlRowType.DataRow Then
|
||||||
|
gvr.FCTextBox("TxtImpuestoLocalPS").Text = (gvr.FCTextBox("TxtImpuestoLocalPS").Text.ToDouble / TxtTipoCambioDlls.Text.Trim.ToDecimal).FormatoNumero
|
||||||
|
ImpuestosLocales += Math.Round(gvr.FCTextBox("TxtImpuestoLocalPS").Text.ToDouble / TxtTipoCambioDlls.Text.Trim.ToDecimal, NumeroDecimales)
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
|
||||||
|
TxtSubTotal.Text = TmpDT.SUM("Total").ToDecimal.FormatoNumero
|
||||||
|
LblDescuentos.Text = TmpDT.SUM("Descuento").ToDecimal.FormatoNumero
|
||||||
|
LblAmortizacion.Text = Math.Round(LblAmortizacion.Text.Trim.ToDecimal / TxtTipoCambioDlls.Text.Trim.ToDecimal, NumeroDecimales).FormatoNumero
|
||||||
|
TxtIVA.Text = TmpDT.SUM("ImporteIVA").ToDecimal.FormatoNumero
|
||||||
|
TxtRetIVA.Text = TmpDT.SUM("ImporteRetIVA").ToDecimal.FormatoNumero
|
||||||
|
TxtRetISR.Text = TmpDT.SUM("ImporteRetISR").ToDecimal.FormatoNumero
|
||||||
|
TxtIEPS.Text = TmpDT.SUM("ImporteIEPS").ToDecimal.FormatoNumero
|
||||||
|
TxtTotal.Text = (TxtSubTotal.Text.ToDecimal - LblDescuentos.Text.ToDecimal - LblAmortizacion.Text.ToDecimal + TxtIVA.Text.ToDecimal + TxtIEPS.Text.ToDecimal - TxtRetIVA.Text.ToDecimal - TxtRetISR.Text.ToDecimal - ImpuestosLocales).ToDecimal.FormatoNumero
|
||||||
|
|
||||||
|
TipoCambio = TxtTipoCambioDlls.Text.Trim.ToDecimal
|
||||||
|
Moneda = 2
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
'CONVERTIR REMISION - TIPO MONEDA -PESO A DOLARES
|
||||||
|
If DdlMoneda.SelectedValue.ToEntero() <> 1 AndAlso ChkConvertirDoctoPesos.Checked Then
|
||||||
|
Dim Importe As Decimal
|
||||||
|
Dim TCC As Decimal = TxtTipoCambio.Text.Trim.ToDecimal
|
||||||
|
For Each Row As DataRow In TmpDT.Rows
|
||||||
|
Row("PU") = Math.Round(Row("PU").ToString().ToDecimal * TCC, 6)
|
||||||
|
Row("Total") = Math.Round(Row("Cantidad").ToString().ToDecimal * Row("PU").ToString().ToDecimal, NumeroDecimales)
|
||||||
|
Row("TotalImporte") = Math.Round(Row("Cantidad").ToString().ToDecimal * Row("PU").ToString().ToDecimal, NumeroDecimales)
|
||||||
|
Row("Descuento") = Math.Round(Row("Descuento").ToString().ToDecimal * TCC, NumeroDecimales)
|
||||||
|
Importe = Row("Total").ToString().ToDecimal - Row("Descuento").ToString().ToDecimal
|
||||||
|
Row("ImporteIEPS") = Math.Round(Importe * Row("PorcentajeIEPS").ToString().ToDecimal, NumeroDecimales)
|
||||||
|
Row("ImporteIVA") = Math.Round(Importe * Row("PorcentajeIVA").ToString().ToDecimal, NumeroDecimales)
|
||||||
|
Row("ImporteRetIVA") = Math.Round(Importe * Row("PorcentajeRetIVA").ToString().ToDecimal, NumeroDecimales)
|
||||||
|
Row("ImporteRetISR") = Math.Round(Importe * Row("PorcentajeRetISR").ToString().ToDecimal, NumeroDecimales)
|
||||||
|
Next
|
||||||
|
|
||||||
|
Dim ImpuestosLocales As Double = 0
|
||||||
|
For Each gvr As GridViewRow In GvImpuestosLocales2.Rows
|
||||||
|
If gvr.RowType = DataControlRowType.DataRow Then
|
||||||
|
gvr.FCTextBox("TxtImpuestoLocalPS").Text = (gvr.FCTextBox("TxtImpuestoLocalPS").Text.ToDouble * TxtTipoCambio.Text.Trim.ToDecimal).FormatoNumero
|
||||||
|
ImpuestosLocales += Math.Round(gvr.FCTextBox("TxtImpuestoLocalPS").Text.ToDouble * TxtTipoCambio.Text.Trim.ToDecimal, NumeroDecimales)
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
|
||||||
|
TxtSubTotal.Text = TmpDT.SUM("Total").ToDecimal.FormatoNumero
|
||||||
|
LblDescuentos.Text = TmpDT.SUM("Descuento").ToDecimal.FormatoNumero
|
||||||
|
LblAmortizacion.Text = Math.Round(LblAmortizacion.Text.Trim.ToDecimal * TxtTipoCambio.Text.Trim.ToDecimal, NumeroDecimales).FormatoNumero
|
||||||
|
TxtIVA.Text = TmpDT.SUM("ImporteIVA").ToDecimal.FormatoNumero
|
||||||
|
TxtRetIVA.Text = TmpDT.SUM("ImporteRetIVA").ToDecimal.FormatoNumero
|
||||||
|
TxtRetISR.Text = TmpDT.SUM("ImporteRetISR").ToDecimal.FormatoNumero
|
||||||
|
TxtIEPS.Text = TmpDT.SUM("ImporteIEPS").ToDecimal.FormatoNumero
|
||||||
|
TxtTotal.Text = (TxtSubTotal.Text.ToDecimal - LblDescuentos.Text.ToDecimal - LblAmortizacion.Text.ToDecimal + TxtIVA.Text.ToDecimal + TxtIEPS.Text.ToDecimal - TxtRetIVA.Text.ToDecimal - TxtRetISR.Text.ToDecimal - ImpuestosLocales).ToDecimal.FormatoNumero
|
||||||
|
|
||||||
|
|
||||||
|
TipoCambio = 1
|
||||||
|
Moneda = 1
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
'ACTUALIZA VENTA
|
||||||
|
If Not ObjVentas.UpdateVentas(TxtSubTotal.Text.ToDouble(), LblDescuentos.Text.ToDouble(), TxtIVA.Text.ToDouble(), TxtIEPS.Text.ToDouble(), TxtTotal.Text.ToDouble(),
|
||||||
Moneda, TipoCambio, TxtFecha.Text.Trim.ToDate, TxtObsFact.Text.Trim,
|
Moneda, TipoCambio, TxtFecha.Text.Trim.ToDate, TxtObsFact.Text.Trim,
|
||||||
UsuarioActual.CveEmpresa, CveVenta, 0, 0,
|
UsuarioActual.CveEmpresa, CveVenta, 0, 0,
|
||||||
Vigencia:=TxtFechaVencimientoCotizacion.Text.Trim.ToDate, CondicionesPago:=If(RBLPago.SelectedValue = "2", 0, 1),
|
Vigencia:=TxtFechaVencimientoCotizacion.Text.Trim.ToDate, CondicionesPago:=If(RBLPago.SelectedValue = "2", 0, 1),
|
||||||
PedidoContrato:=TxtPedidoContrato.Text, AtencionA:=TxtAtencionA.Text.Trim, CveMetodoPago33:=DdlMetodoPago33.SelectedValue.ToEntero(), CveFormaPago33:=DdlFormaPago33.SelectedValue.ToEntero(),
|
PedidoContrato:=TxtPedidoContrato.Text, AtencionA:=TxtAtencionA.Text.Trim, CveMetodoPago33:=DdlMetodoPago33.SelectedValue.ToEntero(), CveFormaPago33:=DdlFormaPago33.SelectedValue.ToEntero(),
|
||||||
CveCliente:=CveCliente, CveClienteSucursal:=CveClienteSucursal, OrdenCompra:=TxtOrdenCompra.Text, RetIVA:=TxtRetIVA.Text.ToDecimal, RetISR:=TxtRetISR.Text.ToDecimal,
|
CveCliente:=CveCliente, CveClienteSucursal:=CveClienteSucursal, OrdenCompra:=TxtOrdenCompra.Text, RetIVA:=TxtRetIVA.Text.ToDecimal, RetISR:=TxtRetISR.Text.ToDecimal,
|
||||||
TipoDocto:=DdlTipoComprobante.SelectedValue, Kilometraje:=TxtKilometraje.Text.ToDouble, CveUsoCFDi:=DdlUsoCFDI.SelectedValue.ToEntero()) Then
|
TipoDocto:=DdlTipoComprobante.SelectedValue, Kilometraje:=TxtKilometraje.Text.ToDouble, CveUsoCFDi:=DdlUsoCFDI.SelectedValue.ToEntero()) Then
|
||||||
MensajeError = "Ocurrió un error al actualizar la información de la cotización"
|
MensajeError = "Ocurrió un error al actualizar la información de la cotización"
|
||||||
OcurrioError = True
|
|
||||||
End If
|
|
||||||
|
|
||||||
'ELIMINA DETALLES
|
|
||||||
If Not ObjVentas.RemoveVentasDetalle(CveVenta) Then
|
|
||||||
MensajeError = "Ocurrió un error al actualizar las partidas de la cotización"
|
|
||||||
OcurrioError = True
|
|
||||||
End If
|
|
||||||
|
|
||||||
'RE-INSERTA DETALLES
|
|
||||||
For Each Row As DataRow In TmpDT.Rows
|
|
||||||
If Not ObjVentas.AddVentaDetalle(CveVenta, Row("CvePS").ToString().ToEntero(), Row("Cantidad").ToString().ToDouble, Row("CveUM").ToString().ToEntero(),
|
|
||||||
Row("PU").ToString().ToDouble(If(ChkConvertirDoctoPesos.Checked, TxtTipoCambio.Text.ToDecimal, 1)), Row("ImporteIVA").ToString().ToDouble, Math.Round((Row("Total").ToString().ToDouble(If(ChkConvertirDoctoPesos.Checked, TxtTipoCambio.Text.ToDecimal, 1)) * (1 + Row("PorcentajeIVA").ToString().ToDouble(If(ChkConvertirDoctoPesos.Checked, TxtTipoCambio.Text.ToDecimal, 1)))), 6),
|
|
||||||
Row("Obs").ToString(), Row("Descuento").ToString().ToDouble(If(ChkConvertirDoctoPesos.Checked, TxtTipoCambio.Text.ToDecimal, 1)), Row("TipoDescuento").ToString().ToEntero(), Row("CveSubProyecto").ToString().ToEntero(), Row("CvePresupuestoIngreso").ToString().ToEntero(),
|
|
||||||
PorcentajeIVA:=Row("PorcentajeIVA").ToString().ToDecimal, IEPS:=Row("ImporteIEPS").ToString().ToDouble(If(ChkConvertirDoctoPesos.Checked, TxtTipoCambio.Text.ToDecimal, 1)), PorcentajeIEPS:=Row("PorcentajeIEPS").ToString().ToDouble, TiempoEntrega:=Row("TiempoEntrega").ToString(),
|
|
||||||
PorcentajeRetIVA:=Row("PorcentajeRetIVA").ToString().ToDecimal, ImporteRetIVA:=Row("ImporteRetIVA").ToString().ToDecimal) Then
|
|
||||||
MensajeError = "Ocurrió un error al guardar las partidas de la cotización"
|
|
||||||
OcurrioError = True
|
OcurrioError = True
|
||||||
Exit For
|
|
||||||
End If
|
End If
|
||||||
Next
|
|
||||||
|
|
||||||
For Each gvr As GridViewRow In GvImpuestosLocales2.Rows
|
'ELIMINA DETALLES
|
||||||
If gvr.RowType = DataControlRowType.DataRow Then
|
If Not ObjVentas.RemoveVentasDetalle(CveVenta) Then
|
||||||
If Not ObjVentas.UpdateVentaImpuestoLocales(CveVenta, gvr.DataKey("CveImpuestoLocal").ToString().ToEntero(), gvr.FCTextBox("TxtImpuestoLocalPS").Text.ToDouble) Then
|
MensajeError = "Ocurrió un error al actualizar las partidas de la cotización"
|
||||||
MensajeError = "Ocurrió un error al actualizar los impuestos locales"
|
OcurrioError = True
|
||||||
|
End If
|
||||||
|
|
||||||
|
'RE-INSERTA DETALLES
|
||||||
|
For Each Row As DataRow In TmpDT.Rows
|
||||||
|
If Not ObjVentas.AddVentaDetalle(CveVenta, Row("CvePS").ToString().ToEntero(), Row("Cantidad").ToString().ToDouble, Row("CveUM").ToString().ToEntero(),
|
||||||
|
Row("PU").ToString().ToDouble(), Row("ImporteIVA").ToString().ToDouble, Math.Round((Row("Total").ToString().ToDouble() * (1 + Row("PorcentajeIVA").ToString().ToDouble())), 6),
|
||||||
|
Row("Obs").ToString(), Row("Descuento").ToString().ToDouble(), Row("TipoDescuento").ToString().ToEntero(), Row("CveSubProyecto").ToString().ToEntero(), Row("CvePresupuestoIngreso").ToString().ToEntero(),
|
||||||
|
PorcentajeIVA:=Row("PorcentajeIVA").ToString().ToDecimal, IEPS:=Row("ImporteIEPS").ToString().ToDouble(), PorcentajeIEPS:=Row("PorcentajeIEPS").ToString().ToDouble, TiempoEntrega:=Row("TiempoEntrega").ToString(),
|
||||||
|
PorcentajeRetIVA:=Row("PorcentajeRetIVA").ToString().ToDecimal, ImporteRetIVA:=Row("ImporteRetIVA").ToString().ToDecimal) Then
|
||||||
|
MensajeError = "Ocurrió un error al guardar las partidas de la cotización"
|
||||||
OcurrioError = True
|
OcurrioError = True
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
|
||||||
|
For Each gvr As GridViewRow In GvImpuestosLocales2.Rows
|
||||||
|
If gvr.RowType = DataControlRowType.DataRow Then
|
||||||
|
If Not ObjVentas.UpdateVentaImpuestoLocales(CveVenta, gvr.DataKey("CveImpuestoLocal").ToString().ToEntero(), gvr.FCTextBox("TxtImpuestoLocalPS").Text.ToDouble) Then
|
||||||
|
MensajeError = "Ocurrió un error al actualizar los impuestos locales"
|
||||||
|
OcurrioError = True
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
|
||||||
|
'ORDEN PRODUCCION
|
||||||
|
If UsuarioActual.CveEmpresa.Contiene(126) Then
|
||||||
|
If CveVenta > 0 And DdlOrdenProduccion.SelectedValue.ToEntero() > 0 Then
|
||||||
|
If Not ObjCGame.UpdateOrdenProduccionVenta(DdlOrdenProduccion.SelectedValue.ToEntero(), CveVenta) Then
|
||||||
|
MensajeError = "Ocurrió un error al actualizar la orden de producción"
|
||||||
|
OcurrioError = True
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
Next
|
|
||||||
|
|
||||||
'ORDEN PRODUCCION
|
'If ObjConta.ValidacionPrePolizaCuadre(-1, 2, CveVenta) Then
|
||||||
If UsuarioActual.CveEmpresa.Contiene(126) Then
|
' If ObjConta.ValorPolizaDescuadre > 0 Then
|
||||||
If CveVenta > 0 And DdlOrdenProduccion.SelectedValue.ToEntero() > 0 Then
|
' If ObjConta.ValorPolizaDescuadre = 2 Then
|
||||||
If Not ObjCGame.UpdateOrdenProduccionVenta(DdlOrdenProduccion.SelectedValue.ToEntero(), CveVenta) Then
|
' OcurrioError = True
|
||||||
MensajeError = "Ocurrió un error al actualizar la orden de producción"
|
' MensajeError = ObjConta.MensajePolizaDescuadre
|
||||||
OcurrioError = True
|
' End If
|
||||||
End If
|
' End If
|
||||||
End If
|
'End If
|
||||||
End If
|
Catch ex As Exception
|
||||||
|
OcurrioError = True
|
||||||
|
OnError("Ocurrió un error al guardar la cotización", ex)
|
||||||
|
End Try
|
||||||
|
|
||||||
'If ObjConta.ValidacionPrePolizaCuadre(-1, 2, CveVenta) Then
|
|
||||||
' If ObjConta.ValorPolizaDescuadre > 0 Then
|
|
||||||
' If ObjConta.ValorPolizaDescuadre = 2 Then
|
|
||||||
' OcurrioError = True
|
|
||||||
' MensajeError = ObjConta.MensajePolizaDescuadre
|
|
||||||
' End If
|
|
||||||
' End If
|
|
||||||
'End If
|
|
||||||
|
|
||||||
If OcurrioError Then
|
If OcurrioError Then
|
||||||
ObjVentas.RollBack()
|
ObjVentas.RollBack()
|
||||||
@@ -27322,6 +27688,61 @@ Partial Class Ventas
|
|||||||
UpPS.Update()
|
UpPS.Update()
|
||||||
UpParametros.Update()
|
UpParametros.Update()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Private Function AjustarTotalCotizacionFacturada(CveCotizacion As Integer, TotalAjustar As Decimal) As Boolean
|
||||||
|
Dim ErrorAjuste As Boolean = False
|
||||||
|
|
||||||
|
Dim ObjCotizacion As New Modelos.Factura(UsuarioActual, CveCotizacion, UsuarioActual.CveEmpresa)
|
||||||
|
|
||||||
|
If ObjCotizacion.CveMoneda = 1 Then
|
||||||
|
Dim TotalNuevoDocumento As Decimal = TotalAjustar
|
||||||
|
|
||||||
|
Dim Diferencia As Decimal = (ObjCotizacion.Total - TotalNuevoDocumento)
|
||||||
|
|
||||||
|
If Diferencia <> 0 Then
|
||||||
|
'AJUSTAR EN EL IVA
|
||||||
|
For Each RowNuevoDocumento As DataRow In TmpDT.Rows
|
||||||
|
Dim CveVentaDetalleCotizacion As Integer = RowNuevoDocumento("CveVentaDetalleCotizacion").ToString().ToEntero()
|
||||||
|
|
||||||
|
Dim ImporteIVANuevoDocumento As Decimal = RowNuevoDocumento("ImporteIVA").ToString().ToDecimal()
|
||||||
|
Dim ImporteIEPSNuevoDocumento As Decimal = RowNuevoDocumento("ImporteIEPS").ToString().ToDecimal()
|
||||||
|
|
||||||
|
If CveVentaDetalleCotizacion > 0 Then
|
||||||
|
'AJUSTAR IVA
|
||||||
|
If ImporteIVANuevoDocumento > 0 Then
|
||||||
|
Dim ImporteIVACotizacion As Decimal = ObjCotizacion.DtDetalle.FiltroPrimeroValor("ImporteIVA", $"CveVentaDetalle={CveVentaDetalleCotizacion}").ToDecimal
|
||||||
|
|
||||||
|
If ImporteIVANuevoDocumento <> ImporteIVACotizacion Then
|
||||||
|
RowNuevoDocumento("ImporteIVA") = ImporteIVACotizacion
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
'AJUSTAR IEPS
|
||||||
|
If ImporteIEPSNuevoDocumento > 0 Then
|
||||||
|
Dim ImporteIEPSCotizacion As Decimal = ObjCotizacion.DtDetalle.FiltroPrimeroValor("ImporteIEPS", $"CveVentaDetalle={CveVentaDetalleCotizacion}").ToDecimal
|
||||||
|
|
||||||
|
If ImporteIEPSNuevoDocumento <> ImporteIEPSCotizacion Then
|
||||||
|
RowNuevoDocumento("ImporteIEPS") = ImporteIEPSCotizacion
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
End If
|
||||||
|
|
||||||
|
CalculaTotalesVenta(RecalculaImpuestosLocales:=False)
|
||||||
|
|
||||||
|
If Math.Abs(ObjCotizacion.Total - TotalAjustar) > 0 OrElse Math.Abs(TxtTotal.Text.ToDecimal - TotalAjustar) > 0 Then
|
||||||
|
ErrorAjuste = True
|
||||||
|
End If
|
||||||
|
|
||||||
|
End If
|
||||||
|
ObjCotizacion.Dispose()
|
||||||
|
|
||||||
|
Return Not ErrorAjuste
|
||||||
|
End Function
|
||||||
|
|
||||||
Private Class MVentaDetalleCotizacion
|
Private Class MVentaDetalleCotizacion
|
||||||
Public Property CveVentaDetalle As Integer
|
Public Property CveVentaDetalle As Integer
|
||||||
Public Property Cantidad As Decimal
|
Public Property Cantidad As Decimal
|
||||||
@@ -27455,6 +27876,11 @@ Partial Class Ventas
|
|||||||
tCantidad = If(ChkCotProductos.Checked, GvCotPS.Rows(IndiceGVCotDataKey(GvCotPS, Dr("CveVentaDetalle").ToString())).FCTextBox("TxtCantidadCot").Text.ToDecimal, Dr("Cantidad")).ToString().ToDecimal
|
tCantidad = If(ChkCotProductos.Checked, GvCotPS.Rows(IndiceGVCotDataKey(GvCotPS, Dr("CveVentaDetalle").ToString())).FCTextBox("TxtCantidadCot").Text.ToDecimal, Dr("Cantidad")).ToString().ToDecimal
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
'AgregarProductoServicioCotizacion(tCantidad, Dr("CveUM").ToString().ToEntero(), Dr("UM").ToString(), Dr("CveClasificacion").ToString().ToEntero(), Dr("Clasificacion").ToString(),
|
||||||
|
' Dr("CvePS").ToString().ToEntero(), Dr("PS").ToString(), Dr("Obs").ToString(), Dr("PU").ToString().ToDecimal, Dr("Descuento").ToString().ToDecimal,
|
||||||
|
' Dr("PorcentajeIVA").ToString().ToDecimal, Dr("IVA").ToString().ToDecimal,
|
||||||
|
' Dr("CveProyecto").ToString().ToEntero(), Dr("Proyecto").ToString(), Dr("CveSubProyecto").ToString().ToEntero(), Dr("SubProyecto").ToString(),
|
||||||
|
' CveContratoDetalle:=Dr("CveContratoDetalle").ToString().ToEntero(), CveVentaDetalleCotizacion:=Dr("CveVentaDetalle").ToString().ToEntero(), SeActualiza:=True)
|
||||||
AgregarProductoServicio(tCantidad, Dr("CveUM").ToString().ToEntero(), Dr("UM").ToString(), Dr("CveClasificacion").ToString().ToEntero(), Dr("Clasificacion").ToString(),
|
AgregarProductoServicio(tCantidad, Dr("CveUM").ToString().ToEntero(), Dr("UM").ToString(), Dr("CveClasificacion").ToString().ToEntero(), Dr("Clasificacion").ToString(),
|
||||||
Dr("CvePS").ToString().ToEntero(), Dr("PS").ToString(), Dr("Obs").ToString(), Dr("PU").ToString().ToDecimal, Dr("Descuento").ToString().ToDecimal,
|
Dr("CvePS").ToString().ToEntero(), Dr("PS").ToString(), Dr("Obs").ToString(), Dr("PU").ToString().ToDecimal, Dr("Descuento").ToString().ToDecimal,
|
||||||
Dr("CveProyecto").ToString().ToEntero(), Dr("Proyecto").ToString(), Dr("CveSubProyecto").ToString().ToEntero(), Dr("SubProyecto").ToString(),
|
Dr("CveProyecto").ToString().ToEntero(), Dr("Proyecto").ToString(), Dr("CveSubProyecto").ToString().ToEntero(), Dr("SubProyecto").ToString(),
|
||||||
@@ -28722,6 +29148,11 @@ Partial Class Ventas
|
|||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
'If Not AjustarTotalCotizacionFacturada(Me.CveVenta) Then
|
||||||
|
' Alert("Ocurrió un error al ajustar el importe", TipoMensaje.MsgError)
|
||||||
|
' Exit Sub
|
||||||
|
'End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'CARGA LO PENDIENTE POR FACTURAR DE REMISION
|
'CARGA LO PENDIENTE POR FACTURAR DE REMISION
|
||||||
|
|||||||
@@ -224,6 +224,12 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user