Merge branch 'master' of http://192.168.10.111:8383/SIG
This commit is contained in:
@@ -875,6 +875,23 @@ Public Class ClsAcumuladores
|
||||
End Try
|
||||
Return Retorno
|
||||
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
|
||||
Dim Retorno As Boolean = False
|
||||
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 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 CveContrato As Integer = -1) As Boolean
|
||||
Optional CveContrato As Integer = -1, Optional EsImportacion As Boolean = False) As Boolean
|
||||
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
@@ -248,6 +248,8 @@ Public Class ClsCompras
|
||||
.Add("@CveTipoConcepto", SqlDbType.Int).Value = CveTipoConcepto
|
||||
.Add("@CveFactura", SqlDbType.Int).Value = CveFactura
|
||||
.Add("@CveContrato", SqlDbType.Int).Value = CveContrato
|
||||
.Add("@EsImportacion", SqlDbType.Bit).Value = EsImportacion
|
||||
|
||||
End With
|
||||
|
||||
Try
|
||||
|
||||
@@ -514,6 +514,23 @@ Public Class ClsNominas
|
||||
Return Retorno
|
||||
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
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
@@ -2108,13 +2125,14 @@ Public Class ClsNominas
|
||||
Return retorno
|
||||
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
|
||||
Try
|
||||
DTSet = New DataSet()
|
||||
DataAdapter("PA_GetCalculoSBC", CommandType.StoredProcedure)
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
.Add("@Tipo", SqlDbType.Int).Value = Tipo
|
||||
.Add("@Fecha", SqlDbType.Date).Value = FechaCalculo
|
||||
End With
|
||||
|
||||
@@ -2514,6 +2532,97 @@ Public Class ClsNominas
|
||||
End Function
|
||||
#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"
|
||||
' IDisposable
|
||||
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 CiudadSucursal.Length > 0 Then SBDomicilioSucursal.AppendFormat(", {0}", CiudadSucursal)
|
||||
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
|
||||
|
||||
@@ -6718,7 +6718,7 @@ Public Class ClsPaginas
|
||||
params.Add(New ReportParameter("ClienteTelefono", Vta.ClienteSucursal.TelefonoSucursal))
|
||||
ElseIf Vta.CveCliente.ToEntero > 0 Then
|
||||
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
|
||||
|
||||
If UsuarioActual.CveEmpresa.Contiene(17) Then
|
||||
|
||||
@@ -1268,17 +1268,19 @@ Public Class ClsVentas
|
||||
|
||||
Return Retorno
|
||||
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
|
||||
DataAdapter("PA_VentasDetalleRemisionUpdate")
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveVentaDetalle", SqlDbType.Int).Value = CveVenta
|
||||
.Add("@CvePS", SqlDbType.Int).Value = CvePS
|
||||
.Add("@Cantidad", SqlDbType.Float).Value = Cantidad
|
||||
.Add("@PU", SqlDbType.Float).Value = PU
|
||||
.Add("@IEPS", SqlDbType.Float).Value = IEPS
|
||||
.Add("@PorcentajeIEPS", SqlDbType.Float).Value = PorcentajeIEPS
|
||||
.Add("@Cantidad", SqlDbType.Decimal).Value = Cantidad
|
||||
.Add("@PU", SqlDbType.Decimal).Value = PU
|
||||
.Add("@IEPS", SqlDbType.Decimal).Value = IEPS
|
||||
.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("@CveUsuarioModifico", SqlDbType.Int).Value = CveUsuarioModifico
|
||||
End With
|
||||
|
||||
@@ -392,22 +392,37 @@ Public Class E141 : Implements IHttpHandler
|
||||
Select Case Metodo
|
||||
Case "CrearActualizarProductos"
|
||||
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"
|
||||
respuesta = ActualizarPrecios(If(FiltrarTodos = "1", True, False))
|
||||
If respuesta Then
|
||||
retorno = "True"
|
||||
Else
|
||||
retorno = "False"
|
||||
End If
|
||||
Case "ActualizarExistencias"
|
||||
respuesta = ActualizarExistencias()
|
||||
If respuesta Then
|
||||
retorno = "True"
|
||||
Else
|
||||
retorno = "False"
|
||||
End If
|
||||
Case "ActualizarVendedores"
|
||||
respuesta = ActualizarVendedores(If(FiltrarTodos = "1", True, False))
|
||||
If respuesta Then
|
||||
retorno = "True"
|
||||
Else
|
||||
retorno = "False"
|
||||
End If
|
||||
End Select
|
||||
|
||||
If respuesta Then
|
||||
retorno = "True"
|
||||
Else
|
||||
retorno = "False"
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
End If
|
||||
|
||||
context.Response.Write(retorno)
|
||||
@@ -1962,6 +1977,25 @@ Public Class E141 : Implements IHttpHandler
|
||||
Return Retorno
|
||||
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
|
||||
Dim ArrayPS As New JArray
|
||||
For Each RowPS As DataRow In DtPS.Rows
|
||||
|
||||
@@ -163,7 +163,7 @@ Partial Class Bancos_DepositosCaja
|
||||
CveSubProyecto = DdlSubProyectoDeposito.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
|
||||
End If
|
||||
End If
|
||||
|
||||
@@ -718,79 +718,76 @@ Partial Class Bancos_PopIEVentas
|
||||
Validada = True
|
||||
End If
|
||||
|
||||
|
||||
If Validada Then
|
||||
|
||||
CveCliente = dr("CveCliente").ToString.ToEntero
|
||||
CveClienteOriginal = dr("CveCliente").ToString.ToEntero
|
||||
HdnCveCliente.Value = CveCliente.ToString
|
||||
CargaCliente(CveCliente, "-1")
|
||||
CveMoneda = dr("CveMoneda").ToString.ToEntero
|
||||
CveMonedaVenta = dr("CveMoneda").ToString.ToEntero
|
||||
CveMonedaFiltros = dr("CveMoneda").ToString.ToEntero
|
||||
NombreCliente = GlobalDTCliente(UsuarioActual.CveEmpresa, CveCliente:=CveCliente).FiltroPrimeroValor("Nombre", String.Format("CveCliente = {0}", CveCliente))
|
||||
SerieFolio = dr("SerieFolio").ToString
|
||||
TipoCambioOriginal = dr("TipoCambio").ToString.ToDecimal
|
||||
CveSubProyectoVenta = dr("CveSubProyecto").ToString.ToEntero
|
||||
|
||||
LblMetodoPAgo.Text = $"{dr("ClaveMetodoPagoSATStr").ToString() }"
|
||||
CveCliente = dr("CveCliente").ToString.ToEntero
|
||||
CveClienteOriginal = dr("CveCliente").ToString.ToEntero
|
||||
HdnCveCliente.Value = CveCliente.ToString
|
||||
CargaCliente(CveCliente, "-1")
|
||||
CveMoneda = dr("CveMoneda").ToString.ToEntero
|
||||
CveMonedaVenta = dr("CveMoneda").ToString.ToEntero
|
||||
CveMonedaFiltros = dr("CveMoneda").ToString.ToEntero
|
||||
NombreCliente = GlobalDTCliente(UsuarioActual.CveEmpresa, CveCliente:=CveCliente).FiltroPrimeroValor("Nombre", String.Format("CveCliente = {0}", CveCliente))
|
||||
SerieFolio = dr("SerieFolio").ToString
|
||||
TipoCambioOriginal = dr("TipoCambio").ToString.ToDecimal
|
||||
CveSubProyectoVenta = dr("CveSubProyecto").ToString.ToEntero
|
||||
|
||||
LblMetodoPAgo.Text = $"{dr("ClaveMetodoPagoSATStr").ToString() }"
|
||||
|
||||
'Configuración de Modalidad Update
|
||||
|
||||
'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
|
||||
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
|
||||
'Cortes de Caja
|
||||
If UsuarioActual.TienePermisoProceso(160) Then
|
||||
CargaCorteCaja()
|
||||
End If
|
||||
|
||||
|
||||
|
||||
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
|
||||
If Not Validada Then
|
||||
BtnGuardar.Visible = False
|
||||
End If
|
||||
|
||||
|
||||
@@ -1388,8 +1385,6 @@ Partial Class Bancos_PopIEVentas
|
||||
#Region "G U A R D A R"
|
||||
Private Sub BtnGuardar_Click(sender As Object, e As EventArgs) Handles BtnGuardar.Click
|
||||
|
||||
|
||||
|
||||
Dim FechaFactura As Date = FechaVenta
|
||||
Dim FechaDocumentoPago As Date = TxtFechaDocumento.Text.ToDate
|
||||
|
||||
|
||||
@@ -1068,10 +1068,10 @@ public partial class CRM_Acercamiento : ClsPaginas
|
||||
ClsOIEventos ObjEventos = new ClsOIEventos();
|
||||
DateTime FechaInicio = TxtFechaInicioAgenda.Text.ToDateTime();
|
||||
int CveContactoAgendar = DdlContactoAgenda.SelectedValue.ToEntero();
|
||||
|
||||
int CveEmpresaCRM = DdlEmpresaCRM.SelectedValue.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();
|
||||
RegistraScript("$('#ModalAgenda').modal('hide')");
|
||||
|
||||
@@ -514,6 +514,12 @@
|
||||
</asp:DropDownList>
|
||||
</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>
|
||||
</ContentTemplate>
|
||||
@@ -4427,7 +4433,7 @@
|
||||
<asp:UpdatePanel ID="UpIVA" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<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">
|
||||
<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>
|
||||
@@ -4439,6 +4445,15 @@
|
||||
<label for="<%= DdlIVA.ClientID.ToString()%>">% IVA:</label>
|
||||
</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="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>
|
||||
@@ -6613,9 +6628,19 @@
|
||||
$('#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) {
|
||||
|
||||
|
||||
@@ -1623,6 +1623,13 @@ Partial Class Compras_Compras
|
||||
'End If
|
||||
|
||||
'RegistraScript("ScrollVentanaAddProducto();")
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(558) = "1" Then
|
||||
divImportacion.Visible = True
|
||||
chkImportacion.Attributes.Add("onclick", "ChkImportacion(this);")
|
||||
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
#Region "C A R G A S"
|
||||
@@ -3009,10 +3016,18 @@ Partial Class Compras_Compras
|
||||
End If
|
||||
End If
|
||||
|
||||
'Tiene Importacion
|
||||
If UsuarioActual.Empresa.Funcionalidad(558) = "1" Then
|
||||
If dr("EsImportacion").ToString.ToEntero > 0 Then
|
||||
chkImportacion.Checked = True
|
||||
Else
|
||||
chkImportacion.Checked = False
|
||||
End If
|
||||
End If
|
||||
CargaComplementosPago()
|
||||
|
||||
Else
|
||||
Alert("La compra solicitada no se encontró. Por favor rectifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia)
|
||||
Else
|
||||
Alert("La compra solicitada no se encontró. Por favor rectifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
Else
|
||||
Alert("Ocurrió un error al cargar la compra. Por favor vuelta a intentar o comuniquese con Sistemas.", TipoMensaje.MsgError)
|
||||
@@ -4507,6 +4522,7 @@ Partial Class Compras_Compras
|
||||
Dim EntregaDirecta = False
|
||||
|
||||
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
|
||||
Dim TipoCambioGuardar As Decimal = 1
|
||||
@@ -4671,12 +4687,13 @@ Partial Class Compras_Compras
|
||||
|
||||
|
||||
'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,
|
||||
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,
|
||||
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,
|
||||
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
|
||||
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
|
||||
|
||||
Dim CveSubProyectoInsertar As Integer = -1
|
||||
|
||||
Dim ConceptoContable As Integer = Row("CveConcepto").ToString.ToEntero
|
||||
If chkImportacion.Checked And ConceptoContable = 14 Then
|
||||
ConceptoContable = 287
|
||||
|
||||
End If
|
||||
Dim TipoMovimiento As Boolean = If(Row("TipoMovto").ToString = "True", True, False)
|
||||
Dim importeMovimiento As Decimal = 0
|
||||
Dim IdCtaContable As Integer = 0
|
||||
@@ -6077,6 +6097,21 @@ Partial Class Compras_Compras
|
||||
CveCuenta = ObjConta.DtResultados.Rows(0)("IdCuentaIVAxAcreditarSIG").ToString.ToEntero
|
||||
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
|
||||
If Not DdlTipoComprobante.SelectedValue.Contiene("Ant") Then
|
||||
importeMovimiento = ImporteIEPSxAcreditar
|
||||
@@ -9167,6 +9202,32 @@ Partial Class Compras_Compras
|
||||
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
|
||||
If Not gvr.DataKey("TipoDocto").Contiene("NC", "DEV", "Ant") Then
|
||||
If UsuarioActual.Empresa.Funcionalidad(521) = "1" Then
|
||||
@@ -17757,6 +17818,15 @@ Partial Class Compras_Compras
|
||||
|
||||
UpPSS.Update()
|
||||
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
|
||||
Private Sub LimpiaAgregar()
|
||||
|
||||
@@ -18198,9 +18268,14 @@ Partial Class Compras_Compras
|
||||
If PSRow IsNot Nothing Then
|
||||
SATClavePS = PSRow("SATClavePS").ToString.ToEntero
|
||||
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,
|
||||
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,
|
||||
NoDeducible:=ChkEsNoDeduciblePS.Checked, CveSATPS:=SATClavePS)
|
||||
|
||||
|
||||
@@ -1340,12 +1340,26 @@
|
||||
<FontWeight>Bold</FontWeight>
|
||||
</Style>
|
||||
</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>
|
||||
<Style />
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox1</rd:DefaultName>
|
||||
<Top>9.6829cm</Top>
|
||||
<Top>9.66322cm</Top>
|
||||
<Left>1.10521cm</Left>
|
||||
<Height>0.62233cm</Height>
|
||||
<Width>9.17089cm</Width>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?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>
|
||||
<DataSources>
|
||||
<DataSource Name="DsOC">
|
||||
@@ -1340,6 +1340,20 @@
|
||||
<FontWeight>Bold</FontWeight>
|
||||
</Style>
|
||||
</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>
|
||||
<Style />
|
||||
</Paragraph>
|
||||
@@ -3567,509 +3581,7 @@
|
||||
<Prompt>ReportParameter1</Prompt>
|
||||
</ReportParameter>
|
||||
</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>
|
||||
<EmbeddedImage Name="ID2">
|
||||
<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("LatLng", GetType(String))
|
||||
|
||||
Dim KMRecorridos = DtPosiciones.SUM("KMRecorridos").ToString
|
||||
|
||||
Try
|
||||
Dim Direcciones As JArray = ConsultarDirecciones(DtPosiciones)
|
||||
For Each row As DataRow In DtPosiciones.Rows
|
||||
@@ -2107,6 +2109,12 @@ Partial Class GPS_Rastreo
|
||||
For Each Dir As JObject In Direcciones
|
||||
DtDatos.Rows(Dir("Indice").ToEntero())("Direccion") = Dir("Direccion").ToString()
|
||||
Next
|
||||
|
||||
|
||||
DtDatos.Columns("Vehiculo").ColumnName = "Vehículo"
|
||||
DtDatos.Columns("TiempoDetenido").ColumnName = "Tiempo Detenido"
|
||||
DtDatos.Columns("Direccion").ColumnName = "Dirección"
|
||||
|
||||
Catch ex As Exception
|
||||
GuardaLog(String.Format("Ocurrio un error al generar el reporte RLDC {0}", ex))
|
||||
End Try
|
||||
@@ -2159,15 +2167,17 @@ Partial Class GPS_Rastreo
|
||||
|
||||
|
||||
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
|
||||
|
||||
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
|
||||
|
||||
|
||||
@@ -335,6 +335,45 @@
|
||||
</asp:GridView>
|
||||
</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 id="DivAjuste" runat="server" visible="false" class="col-md-6">
|
||||
<asp:UpdatePanel ID="UpAjuste" runat="server" class="portlet light xspadding bordered" UpdateMode="Conditional">
|
||||
|
||||
@@ -317,6 +317,15 @@ Partial Class Inventarios_RecepcionUsados
|
||||
ViewState("DtPorcentajeMarcas") = value
|
||||
End Set
|
||||
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
|
||||
|
||||
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,
|
||||
PedidoContrato:=TxtPedidoContrato.Text, CveProveedor:=tCveProveedor, Modulo:="RU/G")
|
||||
If CveMovimiento <= 0 Then
|
||||
Mensaje = "Error al guardar los movimientos"
|
||||
ErrorMovInv = True
|
||||
Else
|
||||
FolioInv = ObjInventario.Folio.ToString()
|
||||
Mensaje = "Error al guardar los movimientos"
|
||||
ErrorMovInv = True
|
||||
Else
|
||||
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
|
||||
ImporteConcepto = Dr("PU").ToString.ToDecimal * GlobalTipoCambio(TxtFecha.Text.ToDate).ToDecimal
|
||||
Else
|
||||
ImporteConcepto = Dr("PU").ToString.ToDecimal
|
||||
End If
|
||||
If CveConcepto = 42 AndAlso DdlMoneda.SelectedValue.ToEntero = 2 Then
|
||||
ImporteConcepto = Dr("PU").ToString.ToDecimal * GlobalTipoCambio(TxtFecha.Text.ToDate).ToDecimal
|
||||
Else
|
||||
ImporteConcepto = Dr("PU").ToString.ToDecimal
|
||||
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
|
||||
Mensaje = "Error al guardar los movimientos"
|
||||
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"
|
||||
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
|
||||
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
|
||||
End If
|
||||
Next
|
||||
|
||||
'si es selectedvalue = 42, es entrada ,3 -salida
|
||||
Dim CveConceptoUsados As Integer = If(RBLOpcion.SelectedValue.ToEntero = 42, 1, 2)
|
||||
'ACTUALIZA LA POLIZA VIRTUAL DEL LA REMISION
|
||||
'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,
|
||||
UsuarioActual.CveEmpresa, 0, Dr("Observaciones").ToString, CveMovimiento:=CveMovimiento) Then
|
||||
Mensaje = "Error al guardar Movimientos de distribuidor"
|
||||
ErrorMovInv = True
|
||||
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
|
||||
'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
|
||||
|
||||
If Not ErrorMovInv Then
|
||||
|
||||
If Not ErrorMovInv Then
|
||||
If Resp IsNot Nothing Then
|
||||
For Each mensaje2 As String In Resp.Mensajes
|
||||
Msg.AppendFormat("<br>{0}", mensaje2)
|
||||
@@ -1473,6 +1501,13 @@ Partial Class Inventarios_RecepcionUsados
|
||||
GvM.DataSource = DtTemp
|
||||
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)
|
||||
End Sub
|
||||
Private Sub EscondeColumnasGVM(DtTemp As DataTable)
|
||||
@@ -2076,6 +2111,14 @@ Partial Class Inventarios_RecepcionUsados
|
||||
DdlClientes.SelectedValueExist(CveCliente)
|
||||
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
|
||||
If EsDistribuidor Then
|
||||
DivCliente.Visible = True
|
||||
@@ -2087,13 +2130,6 @@ Partial Class Inventarios_RecepcionUsados
|
||||
Me.ObjRemisionNC = Nothing
|
||||
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
|
||||
'CreaRemisionNC(ObjFactura.CveCliente, ObjFactura.CveSubProyecto, ObjFactura.CveMoneda)
|
||||
DivTotal.Visible = True
|
||||
@@ -2102,12 +2138,17 @@ Partial Class Inventarios_RecepcionUsados
|
||||
'DivCliente.Visible = False
|
||||
'DivFactura.Visible = False
|
||||
End If
|
||||
|
||||
If ObjVentas.GetVentasUsadosDetalle(CveRemisionRecibida) Then
|
||||
DtUsados = ObjVentas.DtResultados.Copy()
|
||||
End If
|
||||
|
||||
ObjVentas.Dispose()
|
||||
|
||||
If DtUsados IsNot Nothing Then
|
||||
|
||||
'DivRecepcionApartado.Visible = True
|
||||
|
||||
For Each RowUsado As DataRow In DtUsados.Rows
|
||||
Dim CvePS = RowUsado("CvePS").ToString().ToEntero()
|
||||
|
||||
@@ -2271,6 +2312,10 @@ Partial Class Inventarios_RecepcionUsados
|
||||
Me.ObjRemisionNC.PedidoContrato = ""
|
||||
Me.ObjRemisionNC.ObservacionesAlmacen = ""
|
||||
|
||||
'If TmpDTPolizaVirtual IsNot Nothing Then
|
||||
' Me.ObjRemisionNC.DtPolizasVirtuales = TmpDTPolizaVirtual
|
||||
'End If
|
||||
|
||||
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,
|
||||
@@ -3087,6 +3132,10 @@ Partial Class Inventarios_RecepcionUsados
|
||||
ObjPS.Dispose()
|
||||
|
||||
GuardaAjuste()
|
||||
|
||||
'If TmpDTPolizaVirtual Is Nothing Then
|
||||
' CreaDTmpDTPolizaVirtual()
|
||||
'End If
|
||||
End Sub
|
||||
|
||||
Protected Sub CargarDescuento()
|
||||
@@ -3251,15 +3300,126 @@ Partial Class Inventarios_RecepcionUsados
|
||||
Using ObjMarcas As New ClsProductosServicios
|
||||
If ObjMarcas.GetMarcas(UsuarioActual.CveEmpresa) Then
|
||||
DdlMarcaPSAjuste.DataSource = ObjMarcas.DtResultados
|
||||
DdlMarcaRem.DataSource = ObjMarcas.DtResultados
|
||||
End If
|
||||
End Using
|
||||
|
||||
DdlMarcaPSAjuste.DataBind()
|
||||
DdlMarcaRem.DataBind()
|
||||
|
||||
DdlMarcaPSAjuste.Items.Insert(0, New ListItem("Todas", "-1"))
|
||||
DdlMarcaRem.Items.Insert(0, New ListItem("Todas", "-1"))
|
||||
|
||||
UpAjuste.Update()
|
||||
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
|
||||
Public Property CvePS As Integer
|
||||
|
||||
@@ -3071,7 +3071,7 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
|
||||
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.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
Else
|
||||
|
||||
@@ -321,7 +321,7 @@ public partial class Nomina_CatConcepto : ClsPaginas
|
||||
|
||||
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)
|
||||
{
|
||||
|
||||
@@ -4,7 +4,10 @@
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
<style>
|
||||
.dnone {display:none !important;}
|
||||
.dnone {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.GvConceptos tr td a {
|
||||
color: #5b9bd1;
|
||||
}
|
||||
@@ -127,9 +130,10 @@
|
||||
font-weight: bold;
|
||||
font-size: 15px;
|
||||
}
|
||||
|
||||
.form-group.form-md-line-input .form-control.input-sm ~ label {
|
||||
padding-bottom: 20px;
|
||||
}
|
||||
padding-bottom: 20px;
|
||||
}
|
||||
</style>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
|
||||
@@ -726,7 +730,7 @@
|
||||
|
||||
<div class="actions">
|
||||
<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>
|
||||
@@ -753,6 +757,7 @@
|
||||
<ItemTemplate>
|
||||
<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="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>
|
||||
<ItemStyle HorizontalAlign="Right" Width="13%" />
|
||||
</asp:TemplateField>
|
||||
@@ -773,6 +778,7 @@
|
||||
<ItemTemplate>
|
||||
<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="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>
|
||||
<ItemStyle HorizontalAlign="Right" Width="13%" />
|
||||
</asp:TemplateField>
|
||||
@@ -797,7 +803,6 @@
|
||||
</div>
|
||||
<div class="actions">
|
||||
<div class="btn-group">
|
||||
<asp:Button ID="BtnGuardarInfornavit" OnClick="BtnGuardarInfornavit_Click" runat="server" Text="Guardar" class="btn btn-primary" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -861,6 +866,9 @@
|
||||
<asp:CheckBox ID="ChkInfo" CssClass="chksino" runat="server" Text=" " />
|
||||
</div>
|
||||
</div>
|
||||
<div class="text-right">
|
||||
<asp:Button ID="BtnGuardarInfornavit" OnClick="BtnGuardarInfornavit_Click" runat="server" Text="Guardar" class="btn btn-primary" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
@@ -879,7 +887,6 @@
|
||||
</div>
|
||||
<div class="actions">
|
||||
<div class="btn-group">
|
||||
<asp:LinkButton ID="LnkGuardarFonacot" OnClick="LnkGuardarFonacot_Click" runat="server" Text="Guardar" class="btn btn-primary" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -941,6 +948,9 @@
|
||||
<asp:CheckBox ID="ChkFonacot" CssClass="chksino" runat="server" Text=" " />
|
||||
</div>
|
||||
</div>
|
||||
<div class="text-right">
|
||||
<asp:LinkButton ID="LnkGuardarFonacot" OnClick="LnkGuardarFonacot_Click" runat="server" Text="Guardar" class="btn btn-primary" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
@@ -998,7 +1008,6 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body ">
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtDescripcion" CssClass="form-control" runat="server"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="TxtDescripcion" CssClass="help-block errorimput"
|
||||
@@ -1079,7 +1088,6 @@
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-6">
|
||||
@@ -1096,9 +1104,8 @@
|
||||
<div class="col-md-3">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<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>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1227,12 +1234,13 @@
|
||||
</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 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>
|
||||
</ContentTemplate>
|
||||
@@ -1257,6 +1265,11 @@
|
||||
<div class="tools">
|
||||
<a href="javascript:;" class="collapse" data-original-title="" title=""></a>
|
||||
</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 class="portlet-body">
|
||||
<asp:GridView ID="GVNom_PersonalIncapacidad" runat="server" GridLines="None" CssClass="table table-hover table-striped ScrollAD Widthall" AutoGenerateColumns="False"
|
||||
@@ -1294,11 +1307,6 @@
|
||||
<a href="javascript:;" class="collapse" data-original-title="" title=""></a>
|
||||
</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 class="portlet-body">
|
||||
<div class="row">
|
||||
@@ -1395,12 +1403,13 @@
|
||||
<ajax:ValidatorCalloutExtender ID="VcoNom_descripcion" runat="server" HighlightCssClass="vco" TargetControlID="RfvNom_descripcion"></ajax:ValidatorCalloutExtender>
|
||||
<asp:Label runat="server" AssociatedControlID="TxtSRINCdescripcion">Descripción</asp:Label>
|
||||
</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 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>
|
||||
</ContentTemplate>
|
||||
@@ -1429,7 +1438,7 @@
|
||||
<asp:Label ID="LblConceptoMod" runat="server" Text=""></asp:Label></h4>
|
||||
</div>
|
||||
<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: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>
|
||||
@@ -1601,7 +1610,49 @@
|
||||
</ajax:TabPanel>
|
||||
<ajax:TabPanel ID="TTUma" runat="server" HeaderText="UMA">
|
||||
<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>
|
||||
</ajax:TabPanel>
|
||||
</ajax:TabContainer>
|
||||
|
||||
@@ -181,7 +181,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
TxtPeriodo.Text = $"{DateTime.Now :yyyyMM}";
|
||||
TxtPeriodo.Text = $"{DateTime.Now:yyyyMM}";
|
||||
CargarCentrosDeCosto(DdlProyecto, null, LblProyecto, LblSubProyeccto);
|
||||
cargaEjercicios();
|
||||
CargaTiposPeriodo();
|
||||
@@ -392,7 +392,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
}
|
||||
LnkListaRaya.Visible = true;
|
||||
LnkAsistenciaIncidencias.Visible = true;
|
||||
|
||||
|
||||
LnkFormatoTabular.Visible = true;
|
||||
HypPDFSTimbrados.Visible = true;
|
||||
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 propiedades
|
||||
|
||||
protected int SRCvePersonal
|
||||
{
|
||||
@@ -1481,6 +1482,8 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
|
||||
set { ViewState["SRTipoConcepto"] = value; }
|
||||
}
|
||||
#endregion
|
||||
|
||||
protected void LnkSobreRecibo_Click(object sender, EventArgs e)
|
||||
{
|
||||
GridViewRow gvrow = (GridViewRow)(((LinkButton)sender).NamingContainer);
|
||||
@@ -1490,7 +1493,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
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.DataBind();
|
||||
@@ -1530,6 +1533,23 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
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)
|
||||
{
|
||||
SRCveConcepto = ((LinkButton)sender).CommandArgument.ToEntero();
|
||||
@@ -1553,7 +1573,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
|
||||
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
|
||||
{
|
||||
@@ -1578,6 +1598,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
DdlmcConceptos.SelectedValueExist(SRCveConcepto);
|
||||
}
|
||||
|
||||
PnlConceptoPersonal.Visible = false;
|
||||
DdlmcConceptos_SelectedIndexChanged(DdlmcConceptos, null);
|
||||
RegistraScript(string.Format("$('#ModalUpConcepto').on('shown.bs.modal', function () {{$('#{0}').trigger('focus')}});$('#ModalUpConcepto').modal();", TxtmcImporte.ClientID));
|
||||
UPpanelModalUpConcepto.Update();
|
||||
@@ -1615,7 +1636,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
{
|
||||
DdlmcConceptos.SelectedValueExist(SRCveConcepto);
|
||||
}
|
||||
|
||||
PnlConceptoPersonal.Visible = true;
|
||||
DdlmcConceptos_SelectedIndexChanged(DdlmcConceptos, null);
|
||||
RegistraScript(string.Format("$('#ModalUpConcepto').on('shown.bs.modal', function () {{$('#{0}').trigger('focus')}});$('#ModalUpConcepto').modal();", TxtmcImporte.ClientID));
|
||||
UPpanelModalUpConcepto.Update();
|
||||
@@ -1875,7 +1896,9 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
{
|
||||
int BorradoLogico = 0;
|
||||
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;
|
||||
}
|
||||
@@ -1886,7 +1909,9 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
{
|
||||
int BorradoLogico = 0;
|
||||
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;
|
||||
}
|
||||
@@ -2281,6 +2306,9 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
Label LtlImporteD = e.Row.FCLabel("LtlImporteD");
|
||||
LinkButton LnkImporteD = e.Row.FCLinkButton("LnkImporteD");
|
||||
|
||||
LinkButton LnkImportexCalculo = e.Row.FCLinkButton("LnkImportexCalculo");
|
||||
LinkButton LnkImporteDxCalculo = e.Row.FCLinkButton("LnkImporteDxCalculo");
|
||||
|
||||
//isEditedD
|
||||
if (isOnlyBisibleP == 1)
|
||||
{
|
||||
@@ -2315,6 +2343,10 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
}
|
||||
LnkImporte.CommandArgument = (CveConcepto > 0 ? CveConcepto.ToString() : "P");
|
||||
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>" : ""));
|
||||
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];
|
||||
GVVigISRMensual.DataSource = objnom.DTSetResultados.Tables[4];
|
||||
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();
|
||||
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)
|
||||
{
|
||||
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 dtconp = null;
|
||||
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
|
||||
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())
|
||||
objNomina.IniciaTransacSQL();
|
||||
foreach (DataRow rtemp in dtr.Rows)
|
||||
{
|
||||
objNomina.IniciaTransacSQL();
|
||||
foreach (DataRow rtemp in dtr.Rows)
|
||||
CveNomina = 0;
|
||||
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;
|
||||
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 (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;
|
||||
}
|
||||
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;
|
||||
}
|
||||
else
|
||||
{
|
||||
continuar = false;
|
||||
}
|
||||
continuar = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (CveNomina == 0)
|
||||
{
|
||||
continuar = false;
|
||||
}
|
||||
}
|
||||
if (CveNomina == 0)
|
||||
{
|
||||
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();
|
||||
ImporteConcepto = rcon["Importe"].ToString().ToDecimal();
|
||||
ImporteGravadoConcepto = rcon["ImporteGravado"].ToString().ToDecimal();
|
||||
ImporteExentoConcepto = ImporteConcepto - ImporteGravadoConcepto;
|
||||
ImporteValor = rcon["Valor"].ToString().ToDecimal();
|
||||
if (continuar)
|
||||
if (!objNomina.AddUPNom_NominasDetalles(CveNomina, CvePeriodoSeleccionado, CvePersonal, CveConcepto, ImporteConcepto, ImporteGravadoConcepto, ImporteExentoConcepto, ImporteValor, UsuarioActual.CveUsuario))
|
||||
{
|
||||
|
||||
if (!objNomina.AddUPNom_NominasDetalles(CveNomina, CvePeriodoSeleccionado, CvePersonal, CveConcepto, ImporteConcepto, ImporteGravadoConcepto, ImporteExentoConcepto, ImporteValor, UsuarioActual.CveUsuario))
|
||||
{
|
||||
continuar = false;
|
||||
}
|
||||
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);
|
||||
|
||||
|
||||
|
||||
if (continuar)
|
||||
{
|
||||
continuar = objNomina.AutorizaNom_Nominas(-1, CvePeriodoSeleccionado, true);
|
||||
}
|
||||
|
||||
if (continuar)
|
||||
{
|
||||
objNomina.Commit();
|
||||
Alert("La nomina se autorizó correctamente.");
|
||||
cargaDatos();
|
||||
}
|
||||
else
|
||||
{
|
||||
objNomina.RollBack();
|
||||
continuar = objNomina.AutorizaNom_Nominas(CvePersonal, CvePeriodoSeleccionado, true);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
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)
|
||||
@@ -5049,7 +5114,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
DdlSRINCcveControlIncapacidad.SelectedValueExist(cveControlIncapacidad.ToString());
|
||||
TxtSRINCdescripcion.Text = descripcion.ToString();
|
||||
LnkAgregarIncapacidad.Visible = false;
|
||||
LnkActualizarIncapacidad.Visible = true;
|
||||
//LnkActualizarIncapacidad.Visible = true;
|
||||
}
|
||||
protected void LnkshowaaddIncapacidad_Click(object sender, EventArgs e)
|
||||
{
|
||||
@@ -5550,15 +5615,16 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
|
||||
protected void LnkRegistrarProvision_Click(object sender, EventArgs e)
|
||||
{
|
||||
using(ClsNominas objnom = new ClsNominas() )
|
||||
using (ClsNominas objnom = new ClsNominas())
|
||||
{
|
||||
int CvePrePolizaProvision = 0; int CvePrePolizaasmilidos=0;
|
||||
if(objnom.DtResultados.Rows.Count > 0)
|
||||
int CvePrePolizaProvision = 0; int CvePrePolizaasmilidos = 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();
|
||||
}
|
||||
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);
|
||||
Alert(mensaje);
|
||||
}
|
||||
@@ -5679,7 +5745,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
CrearLayout(objnom.DtResultados);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected void LnkAsistenciaIncidencias_Click(object sender, EventArgs e)
|
||||
@@ -5701,14 +5767,14 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
var libro = wb.AddWorksheet(nom.DTSetResultados.Tables[2], "Incidencias");
|
||||
libro.ColumnsUsed().AdjustToContents();
|
||||
var libroin = wb.AddWorksheet(nom.DTSetResultados.Tables[1], "Descripción incidencias");
|
||||
libro.ColumnsUsed().AdjustToContents();
|
||||
libroin.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 incidencias";
|
||||
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);
|
||||
}
|
||||
}
|
||||
@@ -5737,8 +5803,8 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
protected void LnkProcesarReporteAcumulados_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
DateTime fechai = TxtRIFechaInicio.Text.ToDateTime();
|
||||
DateTime fechaf = TxtRIFechaFin.Text.ToDateTime();
|
||||
//DateTime fechai = TxtRIFechaInicio.Text.ToDateTime();
|
||||
//DateTime fechaf = TxtRIFechaFin.Text.ToDateTime();
|
||||
ClosedXML.Excel.XLWorkbook wb = new ClosedXML.Excel.XLWorkbook();
|
||||
using (ClsNominas nom = new ClsNominas())
|
||||
{
|
||||
@@ -5747,6 +5813,12 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
|
||||
var libro = wb.AddWorksheet(nom.DTSetResultados.Tables[0], "Acumulados");
|
||||
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);
|
||||
}
|
||||
@@ -5778,5 +5850,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
RegistraScript("$('#DmodalReporteAcumulados').modal()");
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -5352,13 +5352,29 @@ Partial Class OC
|
||||
|
||||
Dim Cantidad As Decimal = Row("Cantidad").ToString.ToDecimal
|
||||
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
|
||||
Exit For
|
||||
End If
|
||||
|
||||
Next
|
||||
Catch ex As Exception
|
||||
OcurrioError = True
|
||||
|
||||
@@ -51,6 +51,13 @@
|
||||
<div class="portlet-title portlet-filterT smalltitle">
|
||||
<div class="titlefiltros caption">
|
||||
<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>
|
||||
<div class="col-md-3" id="DivFechaPago" runat="server">
|
||||
|
||||
@@ -27,7 +27,7 @@ public partial class RH_CalculoSBC : ClsPaginas
|
||||
{
|
||||
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];
|
||||
GVCFija.DataSource = objnom.DTSetResultados.Tables[0];
|
||||
@@ -61,13 +61,13 @@ public partial class RH_CalculoSBC : ClsPaginas
|
||||
//02: MovtosmodSalario GVCalculosSBC
|
||||
concater = "";
|
||||
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"]);
|
||||
concater = "\\r\\n";
|
||||
contador++;
|
||||
}
|
||||
// MovtosmodSalario = string.Format("{0}{1}{2}", MovtosmodSalario, concater, item["Movtotxt"]);
|
||||
// concater = "\\r\\n";
|
||||
// contador++;
|
||||
//}
|
||||
foreach (GridViewRow item in GVCalculosSBC.Rows)
|
||||
{
|
||||
double SalarioDiarioSSNuevo =Math.Round( item.DataKey("SalarioDiarioSSNuevo").ToDouble(),2);
|
||||
|
||||
120
RH/Personal.aspx
120
RH/Personal.aspx
@@ -697,7 +697,7 @@
|
||||
|
||||
|
||||
<div>
|
||||
<asp:GridView ID="GvPersonalAltas" EnableViewState="False" runat="server" AutoGenerateColumns="False" CssClass="table table-striped table-advance table-hover Widthall" GridLines="None">
|
||||
<asp:GridView ID="GvPersonalAltas" runat="server" AutoGenerateColumns="False" CssClass="table table-striped table-advance table-hover Widthall" GridLines="None">
|
||||
<Columns>
|
||||
<asp:BoundField HeaderText="Fecha Inicio" DataField="FechaInicio" DataFormatString="{0:d}">
|
||||
<ItemStyle Width="150px" />
|
||||
@@ -1175,7 +1175,7 @@
|
||||
CssClass="btn btn-circle btn-sm red" Text="<i class='fa fa-times'></i>" />
|
||||
</EditItemTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="imgE" runat="server" AlternateText="Editar" CausesValidation="False" CommandName="Edit" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-pencil'></i>" />
|
||||
<asp:LinkButton ID="LnkshowEditcuentasbancarias" runat="server" OnClick="LnkshowEditcuentasbancarias_Click" AlternateText="Editar" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-pencil'></i>" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Elim." ItemStyle-Width="7%" ItemStyle-CssClass="Excede" ItemStyle-HorizontalAlign="Center">
|
||||
@@ -1200,7 +1200,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body">
|
||||
<asp:GridView ID="GvBancos" EnableViewState="False" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontró Historial de Cuentas X Pagar" CssClass="table table-striped table-advance table-hover" GridLines="None">
|
||||
<asp:GridView ID="GvBancos" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontró Historial de Cuentas X Pagar" CssClass="table table-striped table-advance table-hover" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Factura</HeaderTemplate>
|
||||
@@ -3291,120 +3291,6 @@
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
|
||||
<ajax:TabPanel ID="TabGES" Visible="false" runat="server" HeaderText="GES">
|
||||
<ContentTemplate>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-9">
|
||||
<div class="portlet light bordered xspadding">
|
||||
<div class="portlet-title">
|
||||
<div class="caption ">
|
||||
<i class="icon-user-following bold font-green"></i>
|
||||
<span class="caption-subject uppercase font-green">Datos GES</span>
|
||||
</div>
|
||||
<div class="tools"><a href="javascript;" class="collapse" data-original-title="" title=""></a></div>
|
||||
<div class="actions">
|
||||
<div class="btn-group">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body ">
|
||||
<table border="0" width="100%">
|
||||
<tr>
|
||||
<td width="25%"></td>
|
||||
<td width="25%"></td>
|
||||
<td width="25%"></td>
|
||||
<td width="25%"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>DEPENDENCIA:</td>
|
||||
<td colspan="3">
|
||||
<asp:TextBox ID="TxtGESDependencia" runat="server" Text="SECRETARIA DE HACIENDA" Width="100%"></asp:TextBox>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>ADSCRIPCION:</td>
|
||||
<td colspan="3">
|
||||
<asp:TextBox ID="TxtGESAdscripcion" runat="server" Text="1050001600 - DIRECCION GENERAL DE POLITICA Y CONTROL PRESUPUESTAL" Width="100%"></asp:TextBox>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>CLAVE PPTAL:</td>
|
||||
<td colspan="3">
|
||||
<asp:TextBox ID="TxtGESClavePPTAL" runat="server" Text="10500016001502E502M000HWA - 1 - # Plaza: 4986" Width="100%"></asp:TextBox>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>UBICACION:</td>
|
||||
<td colspan="3">
|
||||
<asp:TextBox ID="TxtGESUbicacion" runat="server" Text="9010 - SUBSECRETARIA DE EGRESOS - HERMOSILLO" Width="100%"></asp:TextBox>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td colspan="2">
|
||||
<asp:TextBox ID="TxtGESCampo" runat="server" Text="TABULADOR BUROCRATA" Width="100%"></asp:TextBox>
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>PUESTO:</td>
|
||||
<td colspan="3">
|
||||
<asp:TextBox ID="TxtGESPuesto" runat="server" Text="020512 - COORDINADOR DE AREA" Width="100%"></asp:TextBox>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>ESTATUS:</td>
|
||||
<td>
|
||||
<asp:DropDownList Width="100%" runat="server" ID="DdlGESEstatus">
|
||||
<asp:ListItem Text="SELECCIONE" Value="-1" />
|
||||
<asp:ListItem Selected="True" Text="ACTIVO" Value="1" />
|
||||
<asp:ListItem Text="INACTIVO" Value="0" />
|
||||
</asp:DropDownList>
|
||||
</td>
|
||||
<td colspan="2">
|
||||
<asp:Label runat="server" Text="Ultimo mov Qna 16 2015 - 16/08/2015"></asp:Label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>SINDICATO:</td>
|
||||
<td>
|
||||
<asp:TextBox ID="TxtGESSindicato" runat="server" Text="S.U.T.S.P.E.S" Width="100%"></asp:TextBox>
|
||||
</td>
|
||||
<td colspan="2">
|
||||
<asp:Label runat="server" Text="NIVEL SALARIAL 07 - B - $16210.38"></asp:Label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>TIPO PLAZA:</td>
|
||||
<td>
|
||||
<asp:TextBox ID="TxtGESTipoPlaza" runat="server" Text="BASE" Width="100%"></asp:TextBox>
|
||||
</td>
|
||||
<td>
|
||||
<asp:Label runat="server" Text="Sueldo - $19452.46"></asp:Label>
|
||||
</td>
|
||||
<td>
|
||||
<asp:Label runat="server" Text="Quinquenio - $3242.08"></asp:Label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>INDOLE:</td>
|
||||
<td>
|
||||
<asp:TextBox ID="TxtGESIndole" runat="server" Text="TITULAR" Width="100%"></asp:TextBox>
|
||||
</td>
|
||||
<td>ANTIGUEDAD:</td>
|
||||
<td>
|
||||
<asp:Label ID="LbGESAntiguedad" runat="server" Text="23 Año(s) 7 Mes(es) 7 Dia(s)" Width="100%"></asp:Label>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
|
||||
<ajax:TabPanel ID="TabSistema" runat="server" HeaderText="Sistema">
|
||||
<ContentTemplate>
|
||||
|
||||
@@ -809,9 +809,6 @@ Partial Class RH_Personal
|
||||
ViewState("Archivo") = ""
|
||||
DTConsumos = Nothing
|
||||
|
||||
If UsuarioActual.CveRol = 1 Or UsuarioActual.CveEmpresa = 74 Then
|
||||
TabGES.Visible = True
|
||||
End If
|
||||
|
||||
SetValues()
|
||||
'SetPermisos()
|
||||
@@ -3087,8 +3084,10 @@ Partial Class RH_Personal
|
||||
|
||||
End If
|
||||
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
|
||||
BtnAgregarCuentaBanco.Visible = False
|
||||
'CveCuentaDeposito,CveSATBanco,Cuenta,CLABE,EstatusPagoElectronico,CveMoneda
|
||||
@@ -3101,9 +3100,12 @@ Partial Class RH_Personal
|
||||
ChkEstatuscuenta.Checked = gvrow.DataKey("EstatusTexto").ToUpper().Contiene("TRUE", "1", "ACTIVO")
|
||||
UpCuentasVancarias.Update()
|
||||
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
|
||||
Protected Sub GvBancosCuentas_RowCancelingEdit(sender As Object, e As System.Web.UI.WebControls.GridViewCancelEditEventArgs) Handles GvBancosCuentas.RowCancelingEdit
|
||||
GvBancosCuentas.EditIndex = -1
|
||||
@@ -6481,4 +6483,6 @@ Partial Class RH_Personal
|
||||
End If
|
||||
ObjBancos.Dispose()
|
||||
End Sub
|
||||
|
||||
|
||||
End Class
|
||||
|
||||
@@ -1641,7 +1641,7 @@ function loadsortadscroll() {
|
||||
} else {
|
||||
var splited = texto.split("/")
|
||||
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")) {
|
||||
textod = d;
|
||||
tipodate = 1;
|
||||
@@ -1736,7 +1736,7 @@ function loadsortadscroll() {
|
||||
} else {
|
||||
var splited = texto.split("/")
|
||||
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")) {
|
||||
textod = d;
|
||||
}
|
||||
|
||||
@@ -316,7 +316,26 @@ Partial Class Ventas_ActualizarPrecios
|
||||
Exit Sub
|
||||
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("PS").ColumnName = "Producto / Servicio"
|
||||
SpreadsheetInfo.SetLicense(ModExtensiones.SerialGemBoxSpreadsheet)
|
||||
|
||||
@@ -203,7 +203,8 @@
|
||||
<br />
|
||||
<asp:UpdatePanel ID="UPDatos" runat="server" UpdateMode="Conditional">
|
||||
<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>
|
||||
<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%" />
|
||||
@@ -373,7 +374,23 @@
|
||||
<script src="/Metronic/assets/global/scripts/datatable.js"></script>
|
||||
<script src="/Metronic/assets/global/plugins/datatables/all.min.js"></script>
|
||||
<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 Tam = TamañoVentana();
|
||||
var Alto = Tam.height - 270;
|
||||
@@ -385,7 +402,11 @@
|
||||
scrollCollapse: true,
|
||||
paging: false,
|
||||
searching: false,
|
||||
info: false
|
||||
info: false,
|
||||
|
||||
columnDefs: [
|
||||
{ "type": "date-esMX", targets: 7 }
|
||||
]
|
||||
});
|
||||
$('#GvDatos').parent().parent().children().first().css("position", "static");
|
||||
}
|
||||
|
||||
@@ -5037,6 +5037,9 @@
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
<Triggers>
|
||||
<asp:PostBackTrigger ControlID="BtnDescargar" />
|
||||
</Triggers>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1763,7 +1763,7 @@ Partial Class Clientes
|
||||
DivPortletSucursales.Visible = False
|
||||
DivPortletDireccionEnvio.Visible = False
|
||||
DivPortletAsignaciones.Visible = False
|
||||
DivPortletBitacora.Visible = False
|
||||
'DivPortletBitacora.Visible = False
|
||||
BtnEliminar.Visible = False
|
||||
|
||||
DivProtletRegistrar.Visible = True
|
||||
|
||||
@@ -1867,7 +1867,7 @@ Partial Class PV
|
||||
For Each Row As DataRow In TmpDT.FiltraParametros("EliminarDB = False").Rows
|
||||
Dim CveVentaDetalle As Integer = Row("CveVentaDetalle").ToString.ToEntero()
|
||||
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
|
||||
Exit For
|
||||
End If
|
||||
|
||||
@@ -1427,7 +1427,7 @@
|
||||
<td>
|
||||
<asp:TextBox ID="TxtSubTotal2" ClientIDMode="Static" runat="server" BorderStyle="None" Style="text-align: right;" Text="0.00" Width="78px"></asp:TextBox></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>
|
||||
</tr>
|
||||
|
||||
@@ -2723,7 +2723,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</td>
|
||||
<td rowspan="1" colspan="1">
|
||||
<div class="portlet light xspadding bordered whitoutcol" style="width: 450px;">
|
||||
<div class="portlet-title">
|
||||
@@ -3631,6 +3631,19 @@
|
||||
<tr align="left" id="trPaqueteriaDirectaLabel" runat="server" visible="false">
|
||||
<td id="Td4" runat="server">Tipo de Entrega: <b>Entrega Directa</b></td>
|
||||
</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>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
@@ -7097,6 +7110,7 @@
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:CheckBox ID="ChkAplicar" runat="server" />
|
||||
<asp:HiddenField ID="HdnPorcentajeIVA" ClientIDMode="Static" runat="server" Value='<%# Eval("PorcentajeIVA").ToString %>' />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Cantidad">
|
||||
@@ -7111,6 +7125,7 @@
|
||||
<asp:BoundField HeaderText="Fecha" DataField="Fecha" DataFormatString="{0:d}" ItemStyle-HorizontalAlign="Center" />
|
||||
<asp:TemplateField HeaderText="Total" ItemStyle-HorizontalAlign="Right">
|
||||
<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>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
@@ -7427,6 +7442,66 @@
|
||||
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) {
|
||||
//var Importe = 0;
|
||||
|
||||
@@ -8716,21 +8791,21 @@
|
||||
|
||||
if (TotalRem == TotalNC) {
|
||||
document.getElementById('<%= TxtImportesRemisionesNC.ClientID %>').style.border = "2px solid #04B431";
|
||||
document.getElementById('<%= TxtNCImporte.ClientID %>').style.border = "2px solid #04B431";
|
||||
document.getElementById('<%= TxtImportesRemisionesNC.ClientID %>').style.color = "";
|
||||
document.getElementById('<%= TxtNCImporte.ClientID %>').style.color = "";
|
||||
document.getElementById('<%= TxtNCImporte.ClientID %>').style.border = "2px solid #04B431";
|
||||
document.getElementById('<%= TxtImportesRemisionesNC.ClientID %>').style.color = "";
|
||||
document.getElementById('<%= TxtNCImporte.ClientID %>').style.color = "";
|
||||
|
||||
} else {
|
||||
document.getElementById('<%= TxtImportesRemisionesNC.ClientID %>').style.border = "2px solid #ff0000";
|
||||
document.getElementById('<%= TxtNCImporte.ClientID %>').style.border = "2px solid #ff0000";
|
||||
document.getElementById('<%= TxtImportesRemisionesNC.ClientID %>').style.color = "#ff0000";
|
||||
document.getElementById('<%= TxtNCImporte.ClientID %>').style.color = "#ff0000";
|
||||
} else {
|
||||
document.getElementById('<%= TxtImportesRemisionesNC.ClientID %>').style.border = "2px solid #ff0000";
|
||||
document.getElementById('<%= TxtNCImporte.ClientID %>').style.border = "2px solid #ff0000";
|
||||
document.getElementById('<%= TxtImportesRemisionesNC.ClientID %>').style.color = "#ff0000";
|
||||
document.getElementById('<%= TxtNCImporte.ClientID %>').style.color = "#ff0000";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function CerrarModalRemNC() {
|
||||
if ('<%= UsuarioActual.Empresa.Funcionalidad(344) %>' == '1') {
|
||||
function CerrarModalRemNC() {
|
||||
if ('<%= UsuarioActual.Empresa.Funcionalidad(344) %>' == '1') {
|
||||
AplicarValidarRNC(true);
|
||||
CompararNC();
|
||||
}
|
||||
|
||||
@@ -2907,8 +2907,30 @@ Partial Class Ventas
|
||||
End If
|
||||
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
|
||||
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
|
||||
Private Sub BloqueaClasificaciones()
|
||||
If UsuarioActual.Empresa.Funcionalidad(558) = "1" AndAlso DdlTipoComprobante.SelectedValue = "Cot" Then
|
||||
@@ -7006,17 +7028,15 @@ Partial Class Ventas
|
||||
End If
|
||||
|
||||
Else
|
||||
Dim DrPS As DataRow = Nothing
|
||||
|
||||
DrPS = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=TmpDT.Rows(e.RowIndex)("CvePS").ToString().ToEntero()).FiltroPrimero("")
|
||||
|
||||
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)
|
||||
|
||||
TmpDT.Rows(e.RowIndex)("PorcentajeIEPS") = 0
|
||||
DrPS = Nothing
|
||||
|
||||
End If
|
||||
|
||||
Dim TotalCalculableImpuestos As Decimal = ((Cantidad * PU) - (ObjDescuento.ImporteDescuento))
|
||||
@@ -7039,7 +7059,11 @@ Partial Class Ventas
|
||||
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)("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
|
||||
End If
|
||||
|
||||
DrPS = Nothing
|
||||
|
||||
GvPS.EditIndex = -1
|
||||
GvPS.DataSource = TmpDT
|
||||
DtInv = TmpDT.Copy.FiltraParametros("CveTipoPS = 2")
|
||||
@@ -9714,7 +9740,7 @@ Partial Class Ventas
|
||||
ObjFactura.SetSubProyectoMatriz(Me)
|
||||
ObjFactura.SetSubProyecto(Me)
|
||||
ObjFactura.ClienteSucursal = New Modelos.SucursalModel()
|
||||
If Not CveEmpresaCRM > 0 Then
|
||||
If CveCliente > 0 Then
|
||||
If Me.ClienteSucursal IsNot Nothing Then
|
||||
ObjFactura.ClienteSucursal.RFC = Me.ClienteSucursal.RFC
|
||||
ObjFactura.ClienteSucursal.Nombre = Me.ClienteSucursal.Nombre
|
||||
@@ -9815,7 +9841,7 @@ Partial Class Ventas
|
||||
|
||||
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
|
||||
If GvImpuestosLocales2.Visible AndAlso GvImpuestosLocales2.Enabled Then
|
||||
@@ -16151,7 +16177,7 @@ Partial Class Ventas
|
||||
'End If
|
||||
|
||||
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)))
|
||||
If dr IsNot Nothing Then
|
||||
ViewState("SucCalle") = dr("Calle")
|
||||
@@ -16182,7 +16208,7 @@ Partial Class Ventas
|
||||
If CveVenta <= 0 AndAlso DdlTipoComprobante.SelectedValue = "Cot" Then
|
||||
DdlIVA.Visible = True
|
||||
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("TipoFormato") = dr("TipoFormato")
|
||||
'ViewState("Serie") = dr("Serie")
|
||||
@@ -16534,7 +16560,7 @@ Partial Class Ventas
|
||||
If TipoAplicacion = 2 Then
|
||||
Descuento = 0
|
||||
SeAjustoPU = True
|
||||
PUModificado = PUPromocion
|
||||
PUModificado = Math.Round(PUPromocion / (1 + If(IncluyeImpuestos, PorcentajeIVA, 0)), 6)
|
||||
Else
|
||||
Descuento = Descuento + PU - TotalPromocion
|
||||
End If
|
||||
@@ -17050,11 +17076,17 @@ Partial Class Ventas
|
||||
DrPoliza("CveTipoPS") = DrPSAdicional("CveTipoPS")
|
||||
DrPoliza("CveTipoInvPS") = DrPSAdicional("Inv_CveMetodoInventario")
|
||||
DrPoliza("NoIdentificacion") = DrPSAdicional("Codigo")
|
||||
|
||||
If Modalidad = "U" Then
|
||||
DrPoliza("Consec") = Index
|
||||
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
|
||||
|
||||
Row("Orden") = TmpDT.Rows.Count + 1
|
||||
DrPoliza("Cantidad") = If(Dr("Cantidad").ToString().ToDecimal > 0, Dr("Cantidad").ToString().ToDecimal, Cantidad)
|
||||
PU = 0
|
||||
@@ -17128,6 +17160,249 @@ Partial Class Ventas
|
||||
Return Retorno
|
||||
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
|
||||
|
||||
#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
|
||||
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
|
||||
|
||||
Total = (TotalSubTotal - TotalDescuentos - TotalAmortizacion + TotalIVA + TotalIEPS - TotalRetIVA - TotalRetISR - TotalImpuestosLocales)
|
||||
@@ -19692,7 +19970,7 @@ Partial Class Ventas
|
||||
For Each Row As DataRow In TmpDT.Rows
|
||||
Dim CveVentaDetalle As Integer = Row("CveVentaDetalle").ToString().ToEntero()
|
||||
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
|
||||
Exit For
|
||||
End If
|
||||
@@ -19753,6 +20031,12 @@ Partial Class Ventas
|
||||
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.ValorPolizaDescuadre > 0 Then
|
||||
If ObjConta.ValorPolizaDescuadre = 2 Then
|
||||
@@ -19762,12 +20046,6 @@ Partial Class Ventas
|
||||
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
|
||||
OcurrioError = True
|
||||
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});")
|
||||
End If
|
||||
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
|
||||
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);")
|
||||
@@ -25083,15 +25378,6 @@ Partial Class Ventas
|
||||
End If
|
||||
End If
|
||||
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
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
@@ -27034,65 +27320,145 @@ Partial Class Ventas
|
||||
Dim OcurrioError = False
|
||||
Dim MensajeError = ""
|
||||
|
||||
Try
|
||||
'CONVERTIR REMISION - TIPO MONEDA -DOLARES A PESOS
|
||||
If DdlMoneda.SelectedValue.ToEntero() <> 2 AndAlso ChkConvertirDolares.Checked Then
|
||||
|
||||
'ACTUALIZA VENTA
|
||||
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)),
|
||||
For Each Row As DataRow In TmpDT.Rows
|
||||
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,
|
||||
UsuarioActual.CveEmpresa, CveVenta, 0, 0,
|
||||
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(),
|
||||
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
|
||||
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"
|
||||
MensajeError = "Ocurrió un error al actualizar la información de la cotización"
|
||||
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"
|
||||
'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(), 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
|
||||
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
|
||||
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
|
||||
'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
|
||||
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
|
||||
ObjVentas.RollBack()
|
||||
@@ -27322,6 +27688,61 @@ Partial Class Ventas
|
||||
UpPS.Update()
|
||||
UpParametros.Update()
|
||||
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
|
||||
Public Property CveVentaDetalle As Integer
|
||||
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
|
||||
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(),
|
||||
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(),
|
||||
@@ -28722,6 +29148,11 @@ Partial Class Ventas
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
'If Not AjustarTotalCotizacionFacturada(Me.CveVenta) Then
|
||||
' Alert("Ocurrió un error al ajustar el importe", TipoMensaje.MsgError)
|
||||
' Exit Sub
|
||||
'End If
|
||||
|
||||
End If
|
||||
|
||||
'CARGA LO PENDIENTE POR FACTURAR DE REMISION
|
||||
|
||||
@@ -226,6 +226,10 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user