This commit is contained in:
2019-11-25 20:34:23 -07:00
4 changed files with 15 additions and 6 deletions

View File

@@ -179,13 +179,14 @@ Public Class ClsGralFolios
Return Retorno Return Retorno
End Function End Function
Public Function UpdateFolios(CveSubProyecto As Integer, TipoDocto As String, FInicial As Integer, FActual As Integer, FFinal As Integer, CBB As String, Estado As Boolean, CveUsuario As Integer, CveFolio As Integer) As Boolean Public Function UpdateFolios(CveSubProyecto As Integer, TipoDocto As String, Serie As String, FInicial As Integer, FActual As Integer, FFinal As Integer, CBB As String, Estado As Boolean, CveUsuario As Integer, CveFolio As Integer) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
DataAdapter("PA_Gral_FoliosUpdate") DataAdapter("PA_Gral_FoliosUpdate")
With SqlAdapter.SelectCommand.Parameters With SqlAdapter.SelectCommand.Parameters
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto .Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
.Add("@TipoDocto", SqlDbType.VarChar).Value = TipoDocto .Add("@TipoDocto", SqlDbType.VarChar).Value = TipoDocto
.Add("@Serie", SqlDbType.VarChar).Value = Serie
.Add("@FInicial", SqlDbType.Int).Value = FInicial .Add("@FInicial", SqlDbType.Int).Value = FInicial
.Add("@FActual", SqlDbType.Int).Value = FActual .Add("@FActual", SqlDbType.Int).Value = FActual
.Add("@FFinal", SqlDbType.Int).Value = FFinal .Add("@FFinal", SqlDbType.Int).Value = FFinal

View File

@@ -2363,10 +2363,12 @@ Partial Class Bancos_PopIECompras
PorcentajeImpuesto = MovimientoPagar.PorcentajeIVA PorcentajeImpuesto = MovimientoPagar.PorcentajeIVA
Dim IdCtaIVAXAcreditar As Integer = 0 Dim IdCtaIVAXAcreditar As Integer = 0
Dim IdCtaIVAAcreditable As Integer = 0 Dim IdCtaIVAAcreditable As Integer = 0
Dim IdCtaContableNoIVA As Integer = 0
If GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeImpuesto).Rows.Count > 0 Then If GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeImpuesto).Rows.Count > 0 Then
IdCtaIVAXAcreditar = GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeImpuesto).Rows(0)("IdCtaIVAXAcreditar").ToString.ToEntero IdCtaIVAXAcreditar = GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeImpuesto).Rows(0)("IdCtaIVAXAcreditar").ToString.ToEntero
IdCtaIVAAcreditable = GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeImpuesto).Rows(0)("IdCtaIVAAcreditable").ToString.ToEntero IdCtaIVAAcreditable = GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeImpuesto).Rows(0)("IdCtaIVAAcreditable").ToString.ToEntero
IdCtaContableNoIVA = GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeImpuesto).Rows(0)("IdCtaIVANoAcreditable").ToString.ToEntero
End If End If
IdCtaContable = If(IdCtaIVAAcreditable > 0, IdCtaIVAAcreditable, 0) IdCtaContable = If(IdCtaIVAAcreditable > 0, IdCtaIVAAcreditable, 0)
@@ -2379,7 +2381,7 @@ Partial Class Bancos_PopIECompras
End If End If
If MovimientoPagar.IVANoDeducible > 0 Then If MovimientoPagar.IVANoDeducible > 0 Then
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, If(ConceptoContable = 30, TxtFolio.Text.Trim, TxtObservaciones.Text), 280, ConceptoMovimiento, Fecha, IdCtaContable, -1, CveIE, -1, CveCompra, -1, CveProveedor:=CveProveedor2, ImporteMX:=ImporteMXNoDeducible, CveCuenta:=CveCuenta, TipoCambio:=TimpocambioGeneral, CvePersonal:=CvePersonal, PorcentajeImpuesto:=PorcentajeImpuesto) Then If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, If(ConceptoContable = 30, TxtFolio.Text.Trim, TxtObservaciones.Text), 280, ConceptoMovimiento, Fecha, IdCtaContableNoIVA, -1, CveIE, -1, CveCompra, -1, CveProveedor:=CveProveedor2, ImporteMX:=ImporteMXNoDeducible, CveCuenta:=CveCuenta, TipoCambio:=TimpocambioGeneral, CvePersonal:=CvePersonal, PorcentajeImpuesto:=PorcentajeImpuesto) Then
MsgError = "No se pudo insertar la póliza" MsgError = "No se pudo insertar la póliza"
End If End If
End If End If

View File

@@ -104,7 +104,7 @@
</table--%> </table--%>
<div style=""> <div style="">
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CveFolio,FInicial,FActual,FFinal,Estado,TipoDocto,CveSubProyecto" EmptyDataText="No se encontraron Folios registrados" TShowHeader="true" CssClass="table table-striped table-advance table-hover Widthall ScrollAD" data-sort="true" BorderWidth="1" BorderColor="#D3D3D3" GridLines="None"> <asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CveFolio,FInicial,FActual,FFinal,Estado,TipoDocto,CveSubProyecto,Serie" EmptyDataText="No se encontraron Folios registrados" TShowHeader="true" CssClass="table table-striped table-advance table-hover Widthall ScrollAD" data-sort="true" BorderWidth="1" BorderColor="#D3D3D3" GridLines="None">
<Columns> <Columns>
<%-- <asp:BoundField DataField="Sucursal" HeaderText="Sucursal" />--%> <%-- <asp:BoundField DataField="Sucursal" HeaderText="Sucursal" />--%>
<asp:BoundField DataField="SubProyecto" HeaderText="Centro Costo" ItemStyle-HorizontalAlign="Left"/> <asp:BoundField DataField="SubProyecto" HeaderText="Centro Costo" ItemStyle-HorizontalAlign="Left"/>
@@ -182,7 +182,12 @@
<asp:RequiredFieldValidator ID="RFVTipoDocto" runat="server" CssClass="help-block errorimput" ControlToValidate="DdlTipoDocto" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo Docto''</b> es necesario, por favor ingréselo." ValidationGroup="GrpObligatorio"></asp:RequiredFieldValidator> <asp:RequiredFieldValidator ID="RFVTipoDocto" runat="server" CssClass="help-block errorimput" ControlToValidate="DdlTipoDocto" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo Docto''</b> es necesario, por favor ingréselo." ValidationGroup="GrpObligatorio"></asp:RequiredFieldValidator>
<label for="<%= DdlTipoDocto.ClientID.ToString()%>">Tipo Docto:</label> <label for="<%= DdlTipoDocto.ClientID.ToString()%>">Tipo Docto:</label>
</div> </div>
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtSerie" runat="server" CausesValidation="true" MaxLength="10" CssClass="form-control"></asp:TextBox>
<asp:RequiredFieldValidator ID="RFVSerie" runat="server" CssClass="help-block errorimput miclase" ControlToValidate="TxtSerie" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Serie''</b> es necesario, por favor ingréselo." ValidationGroup="GrpObligatorio"></asp:RequiredFieldValidator>
<label for="<%= TxtSerie.ClientID.ToString()%>">Serie:</label>
</div>
<%-- <div class="form-group form-md-line-input input-iconright"> <%-- <div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtAprobacion" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="50"></asp:TextBox> <asp:TextBox ID="TxtAprobacion" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="50"></asp:TextBox>
<asp:RequiredFieldValidator ID="RFVAprobacion" runat="server" CssClass="help-block errorimput" ControlToValidate="TxtAprobacion" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Aprobación''</b> es necesario, por favor ingréselo." ValidationGroup="GrpObligatorio"></asp:RequiredFieldValidator> <asp:RequiredFieldValidator ID="RFVAprobacion" runat="server" CssClass="help-block errorimput" ControlToValidate="TxtAprobacion" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Aprobación''</b> es necesario, por favor ingréselo." ValidationGroup="GrpObligatorio"></asp:RequiredFieldValidator>

View File

@@ -124,6 +124,7 @@ Partial Class CatFolios
HdnModalidad.Value = "U" HdnModalidad.Value = "U"
DdlSubProyecto.SelectedValueExist(GvRow.DataKey("CveSubProyecto")) DdlSubProyecto.SelectedValueExist(GvRow.DataKey("CveSubProyecto"))
DdlTipoDocto.SelectedValueExist(GvRow.DataKey("TipoDocto")) DdlTipoDocto.SelectedValueExist(GvRow.DataKey("TipoDocto"))
TxtSerie.Text = (GvRow.DataKey("Serie"))
ChkEstatus.Checked = If(GvRow.DataKey("Estado").ToString = "Activo", True, False) ChkEstatus.Checked = If(GvRow.DataKey("Estado").ToString = "Activo", True, False)
TxtFolioInicial.Text = (GvRow.DataKey("FInicial")) TxtFolioInicial.Text = (GvRow.DataKey("FInicial"))
TxtFolioFinal.Text = (GvRow.DataKey("FFinal")) TxtFolioFinal.Text = (GvRow.DataKey("FFinal"))
@@ -168,12 +169,12 @@ Partial Class CatFolios
If HdnModalidad.Value = "I" Then If HdnModalidad.Value = "I" Then
If Not ObjFolios.AddFolios(DdlSubProyecto.SelectedValue.ToEntero, DdlTipoDocto.SelectedValue, TxtFolioInicial.Text.Trim.ToEntero, TxtFolioInicial.Text.Trim.ToEntero, If Not ObjFolios.AddFolios(DdlSubProyecto.SelectedValue.ToEntero, DdlTipoDocto.SelectedValue, TxtSerie.Text, TxtFolioInicial.Text.Trim.ToEntero, TxtFolioInicial.Text.Trim.ToEntero,
TxtFolioFinal.Text.Trim.Trim.ToEntero, Session("FileUpload").ToString, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then TxtFolioFinal.Text.Trim.Trim.ToEntero, Session("FileUpload").ToString, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
TieneError = True TieneError = True
End If End If
Else Else
If Not ObjFolios.UpdateFolios(DdlSubProyecto.SelectedValue.ToEntero, DdlTipoDocto.SelectedValue, TxtFolioInicial.Text.Trim.ToEntero, TxtFolioActual.Text.Trim.ToEntero, TxtFolioFinal.Text.Trim.ToEntero, If Not ObjFolios.UpdateFolios(DdlSubProyecto.SelectedValue.ToEntero, DdlTipoDocto.SelectedValue, TxtSerie.Text, TxtFolioInicial.Text.Trim.ToEntero, TxtFolioActual.Text.Trim.ToEntero, TxtFolioFinal.Text.Trim.ToEntero,
"", If(ChkEstatus.Checked, True, False), UsuarioActual.CveUsuario, CveFolio) Then "", If(ChkEstatus.Checked, True, False), UsuarioActual.CveUsuario, CveFolio) Then
TieneError = True TieneError = True
End If End If