-- ajuste para pago de meses posteriores
This commit is contained in:
@@ -45,26 +45,26 @@
|
||||
<label class="col-md-1 truncate" style="margin-top: 10px; margin-left: 5px;">Tipo de Pago:</label>
|
||||
<div class="col-md-2" style="margin-top: 5px;">
|
||||
<asp:DropDownList ID="DdlTipoPago" CssClass="form-control input-sm select2me" runat="server" AutoPostBack="true" AppendDataBoundItems="true" DataTextField="NombreComercial" DataValueField="CveCliente" OnSelectedIndexChanged="DdlTipoPago_SelectedIndexChanged">
|
||||
<asp:ListItem Selected="True" Text="Seleccione un Tipo de Pago" Value="-1"></asp:ListItem>
|
||||
<asp:ListItem Text="Viaticos - Personal" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
<asp:ListItem Text="Viáticos - Personal" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Caja Chica" Value="2"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVTipoPago" runat="server" ControlToValidate="DdlTipoPago" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />Debe seleccionar un <b>Tipo de Pago</b>." InitialValue="-1" ValidationGroup="GrpConsultar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCETipoPago" runat="server" HighlightCssClass="vco" TargetControlID="RFVTipoPago" Width="300px" BehaviorID="VCETipoPago"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
<div class="col-md-5">
|
||||
<div class="col-md-4">
|
||||
<ul class="list-inline">
|
||||
<li>
|
||||
<asp:Literal ID="LtTituloPago" runat="server" />
|
||||
</li>
|
||||
<li>
|
||||
<asp:DropDownList ID="DdlPersonal" CssClass="form-control select2me" Width="100%" Visible="false" runat="server" AppendDataBoundItems="true" DataTextField="NombreCompletoNombre" DataValueField="CvePersonal">
|
||||
<asp:DropDownList ID="DdlPersonal" CssClass="form-control select2me" Width="275px" Visible="false" runat="server" AppendDataBoundItems="true" DataTextField="NombreCompletoNombre" DataValueField="CvePersonal">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-2"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVPersonal" runat="server" ControlToValidate="DdlPersonal" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />Debe seleccionar un <b>Personal</b>." InitialValue="-2" ValidationGroup="GrpConsultar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEPersonal" runat="server" HighlightCssClass="vco" TargetControlID="RFVPersonal" Width="300px" BehaviorID="VCEPersonal"></ajax:ValidatorCalloutExtender>
|
||||
|
||||
<asp:DropDownList ID="DdlCajaChica" CssClass="form-control select2me" Width="100%" Visible="false" runat="server" AppendDataBoundItems="true" DataTextField="NumCuentaMoneda" DataValueField="CveCuenta">
|
||||
<asp:DropDownList ID="DdlCajaChica" CssClass="form-control select2me" Width="275px" Visible="false" runat="server" AppendDataBoundItems="true" DataTextField="NumCuentaMoneda" DataValueField="CveCuenta">
|
||||
<asp:ListItem Selected="True" Text="Seleccione una Cuenta" Value="-2"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVCajaChica" runat="server" ControlToValidate="DdlCajaChica" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />Debe seleccionar una <b>Cuenta</b>." InitialValue="-2" ValidationGroup="GrpConsultar"></asp:RequiredFieldValidator>
|
||||
@@ -74,7 +74,7 @@
|
||||
</div>
|
||||
<label class="col-md-1 truncate" style="margin-top: 10px; width: 110px;">No. Reembolso:</label>
|
||||
<div class="col-md-2">
|
||||
<asp:TextBox ID="TxtNumeroReembolso" ClientIDMode="Static" CssClass="form-control input-sm" Width="90px" runat="server" Style="margin-top: 5px;" />
|
||||
<asp:TextBox ID="TxtNumeroReembolso" ClientIDMode="Static" CssClass="form-control input-sm" Width="110px" runat="server" Style="margin-top: 5px;" />
|
||||
<%--<ajax:FilteredTextBoxExtender ID="SoloNumeros" runat="server" TargetControlID="TxtNumeroReembolso" FilterType="Numbers" />--%>
|
||||
</div>
|
||||
</div>
|
||||
@@ -117,6 +117,7 @@
|
||||
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender2" runat="server" HighlightCssClass="vco" TargetControlID="CompareValidator1" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
|
||||
<asp:CheckBox runat="server" ID="ChkReembolsarSinBancos" OnCheckedChanged="ChkReembolsarSinBancos_CheckedChanged" AutoPostBack="true" Text="Comprobación sin bancos" Visible="false" Checked="false" />
|
||||
<asp:CheckBox runat="server" ID="ChkMesSiguiente" AutoPostBack="true" Text="Comprobación en mes siguiente" Visible="false" Checked="false" />
|
||||
|
||||
<asp:CheckBox ID="ChkOtrosIngresosCheque" runat="server" Text="Otros Ingresos" AutoPostBack="true" OnCheckedChanged="ChkOtrosIngresosCheque_CheckedChanged" />
|
||||
</div>
|
||||
|
||||
@@ -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: <br/>")
|
||||
|
||||
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") } <br/>")
|
||||
ValFechaDocumento = True
|
||||
ElseIf AnioFactura = AnioDocumento And MesFactura > MesDocumento Then
|
||||
FoliosFechasValFechaDocumento.AppendLine($"Folio: { gvRowVal.DataKey("SerieFolio") } fecha: {gvRowVal.DataKey("FechaCompra").ToDate.ToString("dd/MM/yyyy") } <br/>")
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user