@@ -117,6 +117,7 @@
+
diff --git a/Compras/ReembolsosComprobaciones.aspx.vb b/Compras/ReembolsosComprobaciones.aspx.vb
index b578e2ee8..ce8b4b94f 100644
--- a/Compras/ReembolsosComprobaciones.aspx.vb
+++ b/Compras/ReembolsosComprobaciones.aspx.vb
@@ -122,20 +122,17 @@ Partial Class Compras_ReembolsosComprobaciones
DdlCajaChica.DataSource = dt
DdlCajaChica.DataBind()
- Dim ObjPersonal As New ClsRH
- ObjPersonal.GetPersonal(-1, UsuarioActual.CveEmpresa)
-
If UsuarioActual.CveEmpresa.Contiene(119, 158) Then
- DdlPersonal.DataSource = ObjPersonal.DtResultados
+ DdlPersonal.DataSource = GlobalDTRHPersonal(UsuarioActual.CveEmpresa)
Else
- DdlPersonal.DataSource = ObjPersonal.DtResultados.FiltraParametros("CveEstatusPersonal = 1")
+ DdlPersonal.DataSource = GlobalDTRHPersonal(UsuarioActual.CveEmpresa).FiltraParametros("CveEstatusPersonal = 1")
End If
-
-
- ObjPersonal.Dispose()
DdlPersonal.DataBind()
CargaTipoTransaccion()
+ If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then 'acumuladores
+ ChkMesSiguiente.Visible = True
+ End If
If UsuarioActual.Empresa.Funcionalidad(506) = "1" Then
CbPermitirExcedente.Visible = True
@@ -143,19 +140,10 @@ Partial Class Compras_ReembolsosComprobaciones
CbPermitirExcedente.Visible = False
End If
- ' If UsuarioActual.CveEmpresa.Contiene(1, 4, 7, 11, 12, 72, 80, 119) Then
- 'rowComisiones.Visible = True
- ' End If
-
- If UsuarioActual.CveEmpresa = 119 Then
- ChkReembolsarSinBancos.Visible = True
- End If
+ If UsuarioActual.CveEmpresa = 119 Then ChkReembolsarSinBancos.Visible = True
TxtFechaPrePoliza.Text = Date.Now.ToShortDateString
- 'CargaCuentasDiferencia()
-
- 'TableDiferencia.Visible = False
End If
End Sub
@@ -176,7 +164,7 @@ Partial Class Compras_ReembolsosComprobaciones
DdlPersonal.Visible = True
DdlPersonal.SelectedValue = "-2"
If UsuarioActual.CveRol = 1 Then ChkAplicaViatico.Visible = True
- LtTituloPago.Text = "Viaticos - Personal:"
+ LtTituloPago.Text = "Viáticos:"
'Valida Proceso 120 para ROL Administrador de obra - para FyE solo puede ver los del UsuarioActual
If UsuarioActual.TienePermisoProceso(120) Then
@@ -413,49 +401,38 @@ Partial Class Compras_ReembolsosComprobaciones
#Region " BTN GUARDAR "
Protected Sub BtnIEGuardar_Click(sender As Object, e As EventArgs) Handles BtnIEGuardar.Click
-
Dim ValFechaDocumento As Boolean = False
Dim FoliosFechasValFechaDocumento As New StringBuilder
-
FoliosFechasValFechaDocumento.AppendLine("Se seleccionaron facturas con fecha de mes superior al mes del pago: ")
For Each gvRowVal As GridViewRow In GvCxP.Rows
If gvRowVal.FCCheckBox("Chk").Checked Then
-
Dim FechaFactura As Date = gvRowVal.DataKey("FechaCompra").ToDate
-
-
Dim FechaDocumento As Date
-
-
If DDlCheques.SelectedValue.ToEntero = -1 Then
FechaDocumento = TxtFechaDocumento.Text.ToDate
Else
FechaDocumento = TxtFechaPrePoliza.Text.ToDate
End If
-
Dim AnioFactura As Integer = FechaFactura.Year
Dim MesFactura As Integer = FechaFactura.Month
Dim AnioDocumento As Integer = FechaDocumento.Year
Dim MesDocumento As Integer = FechaDocumento.Month
If AnioFactura > AnioDocumento Then
-
FoliosFechasValFechaDocumento.AppendLine($"Folio: { gvRowVal.DataKey("SerieFolio") } fecha: {gvRowVal.DataKey("FechaCompra").ToDate.ToString("dd/MM/yyyy") } ")
ValFechaDocumento = True
ElseIf AnioFactura = AnioDocumento And MesFactura > MesDocumento Then
FoliosFechasValFechaDocumento.AppendLine($"Folio: { gvRowVal.DataKey("SerieFolio") } fecha: {gvRowVal.DataKey("FechaCompra").ToDate.ToString("dd/MM/yyyy") } ")
ValFechaDocumento = True
End If
-
End If
-
Next
'rmf. codigo temporal
- If UsuarioActual.CveEmpresa.Contiene(13, 83) Then
+ If UsuarioActual.CveEmpresa.Contiene(13, 83) OrElse ChkMesSiguiente.Checked Then
ValFechaDocumento = False
End If
@@ -535,8 +512,7 @@ Partial Class Compras_ReembolsosComprobaciones
If HdnCheque.Value.ToEntero > 0 AndAlso Not ChkReembolsarSinBancos.Checked Then
CveIERegistrado = DDlCheques.SelectedValue.ToEntero
-
- If UsuarioActual.CveEmpresa.Contiene(119, 158) Then
+ If UsuarioActual.CveEmpresa.Contiene(119, 158) OrElse ChkMesSiguiente.Checked Then
CvePrePolizaIERegistrado = ObjMov.AddPrePolizas("Compras/Comprobaciones1", 9, TxtImporteVinculado.Text.ToDecimal, TxtImporteVinculado.Text.ToDecimal, CveMoneda, TxtFechaPrePoliza.Text.ToDate, If(TxtObservaciones.Text.Trim = "", concepto, TxtObservaciones.Text.Trim), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
If CveCajaChica > 0 Then
@@ -592,8 +568,6 @@ Partial Class Compras_ReembolsosComprobaciones
End If
End If
-
-
End If
ElseIf Not ChkReembolsarSinBancos.Checked Then
CvePrePolizaIERegistrado = ObjMov.AddPrePolizas("Compras/Comprobaciones4", 9, TxtImporte.Text.ToDecimal, TxtImporte.Text.ToDecimal, CveMoneda, TxtFechaDocumento.Text.ToDate, If(TxtObservaciones.Text.Trim = "", concepto, TxtObservaciones.Text.Trim), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
@@ -747,8 +721,8 @@ Partial Class Compras_ReembolsosComprobaciones
CvePrePolizaPago = CvePrePolizaIERegistrado
- 'SE USARA PARA PODER ELIMINAR UNA COMPROBACION
- CvePrePolizaPagoOriginal = ObjMov.AddPrePolizas("Compras/Comprobaciones6", 9, ImporteMovto, ImporteMovto, CveMoneda, TxtFechaPrePoliza.Text.ToDate, If(TxtObservaciones.Text.Trim = "", $"Compra: { gvr.DataKey("SerieFolio").ToString }", TxtObservaciones.Text.Trim), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
+ ''SE USARA PARA PODER ELIMINAR UNA COMPROBACION
+ CvePrePolizaPagoOriginal = -1 'ObjMov.AddPrePolizas("Compras/Comprobaciones6", 9, ImporteMovto, ImporteMovto, CveMoneda, TxtFechaPrePoliza.Text.ToDate, If(TxtObservaciones.Text.Trim = "", $"Compra: { gvr.DataKey("SerieFolio").ToString }", TxtObservaciones.Text.Trim), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
'registramos el nuevo IE
If CveCajaChica > 0 Then
@@ -779,7 +753,7 @@ Partial Class Compras_ReembolsosComprobaciones
MsgError = "Detalle"
End If
- If Not ChkReembolsarSinBancos.Checked AndAlso (Not HdnCheque.Value.ToEntero > 0 Or Not UsuarioActual.CveEmpresa.Contiene(119, 158)) Then
+ If Not ChkReembolsarSinBancos.Checked AndAlso (Not HdnCheque.Value.ToEntero > 0 Or Not UsuarioActual.CveEmpresa.Contiene(119, 158) AndAlso Not ChkMesSiguiente.Checked) Then
'Si es caja chica metemos el concepto 30, si es funcionario metemos 29
ImporteMovto += Pago.OtroGastoIngreso ' si ajuste, sedebe de aplicar en su contraparte
If Not ObjMov.AddPrePolizasDetalle(CvePrePolizaPago, True, ImporteMovto, Referencia, If(CveCajaChica > 0, 30, 29), ConceptoMovimiento, gvr.FCLiteral("LtlFecha").Text.ToDate, If(CveCajaChica > 0, IdCuentaBancaria, IdCtaPersonal), -1, CveIE:=CveIEPago, CveIEDevolucion:=If(CveCajaChica > 0, If(DDlCheques.SelectedValue.ToEntero = -1, CveIECajaChica, DDlCheques.SelectedValue.ToEntero), -1), CvePersonal:=CvePersonal, CveCompra:=gvr.FCHyperLink("HplF2").Text.ToEntero, CveProveedor:=gvr.FCHyperLink("HLProv").Text.ToEntero, ImporteME:=If(tipoCambio = 1, 0, ImporteMovto), ImporteMX:=ImporteMovto * tipoCambio, CvePrePolizaOriginal:=CvePrePolizaPagoOriginal, Contabilizable:=If(CveCajaChica > 0 Or CvePersonal > 0, Not UsaSimplificacionCajaChica, True)) Then
@@ -1178,16 +1152,16 @@ Partial Class Compras_ReembolsosComprobaciones
End If
If e.Row.RowIndex = 1 Then
e.Row.Cells(0).Width = Unit.Pixel(20)
- e.Row.Cells(1).Width = Unit.Pixel(70)
- e.Row.Cells(2).Width = Unit.Pixel(250)
- e.Row.Cells(3).Width = Unit.Pixel(70)
- e.Row.Cells(4).Width = Unit.Pixel(80)
- e.Row.Cells(5).Width = Unit.Pixel(40)
- e.Row.Cells(6).Width = Unit.Pixel(80)
- e.Row.Cells(7).Width = Unit.Pixel(70)
- e.Row.Cells(8).Width = Unit.Pixel(70)
- e.Row.Cells(9).Width = Unit.Pixel(80)
- e.Row.Cells(15).Width = Unit.Pixel(80)
+ 'e.Row.Cells(1).Width = Unit.Pixel(70)
+ 'e.Row.Cells(2).Width = Unit.Pixel(250)
+ 'e.Row.Cells(3).Width = Unit.Pixel(70)
+ 'e.Row.Cells(4).Width = Unit.Pixel(80)
+ 'e.Row.Cells(5).Width = Unit.Pixel(40)
+ 'e.Row.Cells(6).Width = Unit.Pixel(80)
+ 'e.Row.Cells(7).Width = Unit.Pixel(70)
+ 'e.Row.Cells(8).Width = Unit.Pixel(70)
+ 'e.Row.Cells(9).Width = Unit.Pixel(80)
+ 'e.Row.Cells(15).Width = Unit.Pixel(80)
End If
e.Row.Cells(6).HorizontalAlign = HorizontalAlign.Right