-- mejoras para vinculación de OC, se ocultó a la clasif en gvOC, solo se muestra para E119

This commit is contained in:
2024-12-22 09:15:36 -07:00
parent 9ff3f63164
commit caac344bcf
2 changed files with 37 additions and 38 deletions

View File

@@ -12,7 +12,7 @@
<ContentTemplate>
<li>
<asp:Button ID="btnpruebas" CssClass="hidden" OnClick="btnpruebas_Click" runat="server" Text="Button" />
</li>
</li>g
<li>
<asp:LinkButton ID="LnkAddPS" runat="server"><i class="fa fa-plus-circle"></i>Agregar Concepto</asp:LinkButton>
</li>
@@ -753,7 +753,7 @@
</asp:Panel>
<asp:GridView ID="GvPS" ShowHeader="false" runat="server" AutoGenerateColumns="False" DataKeyNames="CvePS,Cantidad,CveUM,UM,PU,Descuento,OtrosGastos,CvePresupuestoEgreso,PS,Clasificacion,CveClasificacion,CveOrdenCompraDetalle,IVA,IVAPorcentaje,RetIVAPorcentaje,RetISRPorcentaje,IEPSPSPorcentaje,Obs,Total,CveProyecto,CveSubProyecto,Proyecto,SubProyecto,Consec,CveTipoGasto,NoDeducible,DifPSSat,TipoAF,CveCultivoCuadroDetalle,CveTipoPS" GridLines="none" BorderWidth="0" EmptyDataText="Sin Productos o Servicios agregados" CssClass="table GvPS table-striped table-hover table-advance Widthall ScrollAD mysmallbtn" >
<asp:GridView ID="GvPS" ShowHeader="false" runat="server" AutoGenerateColumns="False" DataKeyNames="CvePS,Cantidad,CveUM,UM,PU,Descuento,OtrosGastos,CvePresupuestoEgreso,PS,Clasificacion,CveClasificacion,CveOrdenCompraDetalle,IVA,IVAPorcentaje,RetIVAPorcentaje,RetISRPorcentaje,IEPSPSPorcentaje,Obs,Total,CveProyecto,CveSubProyecto,Proyecto,SubProyecto,Consec,CveTipoGasto,NoDeducible,DifPSSat,TipoAF,CveCultivoCuadroDetalle,CveTipoPS" GridLines="none" BorderWidth="0" EmptyDataText="Sin Productos o Servicios agregados" CssClass="table GvPS table-striped table-hover table-advance Widthall mysmallbtn" >
<Columns>
<%-- 0 --%>
<asp:TemplateField ItemStyle-Width="15px">
@@ -1716,33 +1716,32 @@
<asp:GridView runat="server" ID="GvOC1" AutoGenerateColumns="false"
GridLines="None" UseAccessibleHeader="true" EmptyDataText="No se encontraron registros." CssClass="table table-striped table-hover Widthall Sortable" RowStyle-HorizontalAlign="Center"
DataKeyNames="CantidadF,FolioREQ,CveProveedorSucursal,CveTipoPS,PS,CantidadPendienteVincular,IEPSPS,IVA,RetIVA,RetISR,Descuento,IVAPorcentaje,RetIVAPorcentaje,RetISRPorcentaje,IEPSPSPorcentaje,IEPSPSIVAPorcentaje,Cantidad,CveProveedorOC,Importe,CveSATPS,NumeroParte">
DataKeyNames="CantidadF,FolioREQ,CveProveedorSucursal,CveTipoPS,PS,CantidadPendienteVincular,IEPSPS,IVA,RetIVA,RetISR,Descuento,IVAPorcentaje,RetIVAPorcentaje,RetISRPorcentaje,IEPSPSPorcentaje,IEPSPSIVAPorcentaje,Cantidad,CveProveedorOC,Importe,CveSATPS,NumeroParte,CvePS">
<Columns>
<asp:TemplateField HeaderText="Folio" ItemStyle-Width="10%" Visible="false">
<asp:TemplateField HeaderText="Folio" ItemStyle-Width="5%" Visible="false">
<ItemTemplate>
<asp:Label Text='<%# Eval("FolioOC") %>' ID="LblOC" runat="server" ItemStyle-Width="10%" />
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Alm." ItemStyle-Width="10%" Visible="false">
<asp:TemplateField HeaderText="Alm." ItemStyle-Width="40px" Visible="false">
<ItemTemplate>
<asp:Label Text='' ID="LbEstatusInv" runat="server" />
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Cantidad" ItemStyle-Width="10%">
<asp:TemplateField HeaderText="Cantidad" ItemStyle-Width="50px">
<ItemTemplate>
<asp:TextBox ID="TxtCantidad" Text='<%# Eval("CantidadPendienteVincular", "{0:#,##0.00####}")%>' runat="server" Width="50px" Style="text-align: right;" />
<ajax:FilteredTextBoxExtender ID="FTETxtCantidad" runat="server" TargetControlID="TxtCantidad" FilterType="Custom, Numbers" ValidChars="." />
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField HeaderText="UM" DataField="UM" ItemStyle-Width="10%" />
<asp:TemplateField HeaderText="Clasificación <br/> Producto/Servicio" ItemStyle-Width="50%" ItemStyle-HorizontalAlign="Left">
<asp:BoundField HeaderText="UM" DataField="UM" ItemStyle-Width="40px" />
<asp:TemplateField HeaderText="Producto/Servicio" ItemStyle-HorizontalAlign="Left">
<ItemTemplate>
<span style="width: 100%; border-bottom: 1px solid gray; text-align: left!important">
<asp:Label ID="LblClasificacion" runat="server" Text='<%# Eval("Clasificacion") %>'></asp:Label>
</span>
<br />
<span style="width: 100%; border-bottom: 1px solid gray; text-align: left!important" runat="server" id="spanclasif" visible="false">
<asp:Label ID="LblClasificacion" runat="server" Text='<%# Eval("Clasificacion", "{0} <br />") %>'></asp:Label>
</span>
<asp:Label ID="LbProductoServicio" runat="server" Text='<%# Eval("PS")%>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
@@ -1792,9 +1791,7 @@
<tr runat="server" id="trTitulosTotales" visible="true">
<td width="100px"></td>
<td width="200px" class="well" align="right"></td>
<td width="100px" class="well" align="right" style="font-weight: bold;">Importes Vinculados</td>
<td width="100px" class="well" align="right" style="font-weight: bold;">Importes</td>
<td width="100px"></td>
<td width="100px" class="well" align="right" style="font-weight: bold;">Calculados</td>
<%-- --%>
@@ -1960,19 +1957,16 @@
<asp:GridView AutoGenerateColumns="false" runat="server" ID="GvOC2" GridLines="None" EmptyDataText="No se encontraron registros." CssClass="table table-striped table-hover gridconheader Widthall" RowStyle-HorizontalAlign="Center" DataKeyNames="Cantidad,UM,PS,CvePS,CodigoPS,SATClaveProductoServicio,PU,Total,Descuento">
<Columns>
<asp:BoundField HeaderText="#" DataField="Consec" ItemStyle-Width="20px" ItemStyle-Font-Size="6pt" />
<asp:BoundField HeaderText="Cantidad" DataField="Cantidad" DataFormatString="{0:#,##0.######}" ItemStyle-Width="40px" />
<asp:BoundField HeaderText="Cantidad" DataField="Cantidad" DataFormatString="{0:#,##0.######}" ItemStyle-Width="50px" FooterStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="UM" DataField="UM" ItemStyle-Width="40px" />
<asp:TemplateField HeaderText="UM" ItemStyle-HorizontalAlign="Left">
<asp:TemplateField HeaderText="" ItemStyle-HorizontalAlign="Left">
<ItemTemplate>
<span style="width: 100%; border-bottom: 1px solid gray;">
<asp:Label ID="LblClasificacion" runat="server" Text='<%# Eval("Clasificacion") %>'></asp:Label>
</span>
<br />
<span style="width: 100%; border-bottom: 1px solid gray;" runat="server" id="spanclasif" visible="false">
<asp:Label ID="LblClasificacion" runat="server" Text='<%# Eval("Clasificacion", "{0}<br />") %>'></asp:Label>
</span>
<asp:Label ID="LbProductoServicio" runat="server" Text='<%# Eval("CodigoPS")%>'></asp:Label>
</ItemTemplate>
<HeaderTemplate>
Clasificación
<br />
Producto/Servicio
</HeaderTemplate>
</asp:TemplateField>

View File

@@ -1,4 +1,4 @@
'{Option Explicit On
Option Explicit On
Option Strict On
Imports System.Data
@@ -12,7 +12,6 @@ Imports Extensiones
Imports MoreLinq
Imports System.Data.SqlClient
Imports ClsPaginas
Imports Microsoft.Owin.Security.Provider
Imports Microsoft.Reporting.WebForms
Partial Class Compras_Compras
@@ -1612,7 +1611,6 @@ Partial Class Compras_Compras
CargarCentrosDeCosto(DdlProyecto, Nothing, Nothing, Nothing)
divproyecto.Visible = DdlProyecto.Visible
CargaGvPersonal()
CargaDdlPersonal()
InicializaDevolucionAlmacen()
@@ -12040,7 +12038,6 @@ Partial Class Compras_Compras
'Afecta GVINV
CargaGvInv()
CargaGvPersonal()
End Sub
Protected Sub BtnVinculaAFEdit_Click(sender As Object, e As EventArgs)
@@ -15188,7 +15185,7 @@ Partial Class Compras_Compras
CargaTipoCentroCostoOC()
GvOC1.DataSource = DTOCGV
GvOC1.DataSource = DTOCGV.FiltraParametros("", "CodigoPS")
GvOC1.DataBind()
@@ -15212,7 +15209,7 @@ Partial Class Compras_Compras
For Each Gvr As GridViewRow In GvOC1.Rows
Dim Change As Boolean = False
For Each Dr2 As DataRow In TmpDT.Rows
If Gvr.DataKey("NumeroParte").ToString = Dr2("NoIdentificacion").ToString() Then
If Gvr.DataKey("NumeroParte") = Dr2("NoIdentificacion").ToString() OrElse Gvr.DataKey("CvePS") = Dr2("CvePS").ToString() Then
Gvr.FCTextBox("TxtCantidad").Text = Dr2("Cantidad").ToString
Change = True
End If
@@ -15234,9 +15231,11 @@ Partial Class Compras_Compras
If strMsg.Length > 0 Then Alert("Los siguientes productos facturados no están en la Orden de compra<br/>" & strMsg.ToString, TipoMensaje.MsgAdvertencia)
'condicion temporal rmf
GvOC1.Columns(6).Visible = False
GvOC1.Columns(5).Visible = False 'proyecto
GvOC1.Columns(6).Visible = False 'codigoSAT
GvOC2.Columns(4).Visible = False
GvOC2.DataSource = TmpDT.FiltraParametros("", "CodigoPS")
Else
GvOC2.DataSource = TmpDT
End If
@@ -15281,6 +15280,10 @@ Partial Class Compras_Compras
e.Row.FCLabel("LbEstatusInv").Text = "NA"
End If
If UsuarioActual.CveEmpresa = 119 Then 'visualizar clasificación en vinculación OC
e.Row.FindControl("spanclasif").Visible = False
End If
If Version = "3.3" Or Version = "4.0" Then
CargaPSSAT(e.Row.FCDropDownLost("DdlSATPS"))
If e.Row.DBCampo("CveSATPS").ToEntero > 0 Then
@@ -15292,6 +15295,14 @@ Partial Class Compras_Compras
End If
End Sub
Protected Sub GvOC2_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvOC2.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then
If UsuarioActual.CveEmpresa = 119 Then 'visualizar clasificación en vinculación OC
e.Row.FindControl("spanclasif").Visible = True
End If
End If
End Sub
Private Sub CargaPSSAT(Objeto As ADServerControl.Dropdownlost)
Objeto.setEsWebService(True)
Objeto.ddlWS.Attributes.Add("data-metodo", "getpssat")
@@ -15735,7 +15746,7 @@ Partial Class Compras_Compras
CargaGVsAF()
CargaTipoCentroCostoOC()
GvOC1.DataSource = DTOCGV
GvOC1.DataSource = DTOCGV.FiltraParametros("", "CodigoPS")
GvOC1.DataBind()
Dim DTCVEOCS As DataTable = DTOCGV.FiltraParametros("", "", {"CveOrdenCompra"})
@@ -15775,10 +15786,7 @@ Partial Class Compras_Compras
If UsuarioActual.Empresa.UsaAC Then
CompruebaAgregar()
End If
CargaGvPersonal()
'ANTICIPO OC
If DivOCSolicitudAnticipo.Visible Then
@@ -15858,7 +15866,7 @@ Partial Class Compras_Compras
CargaGVsAF()
CargaTipoCentroCostoOC()
GvOC1.DataSource = DTOCGV
GvOC1.DataSource = DTOCGV.FiltraParametros("", "CodigoPS")
GvOC1.DataBind()
Dim DTCVEOCS As DataTable = DTOCGV.FiltraParametros("", "", {"CveOrdenCompra"})
@@ -15897,9 +15905,7 @@ Partial Class Compras_Compras
If UsuarioActual.Empresa.UsaAC Then
CompruebaAgregar()
End If
CargaGvPersonal()
'ANTICIPO OC
If DivOCSolicitudAnticipo.Visible Then
RegistraScript("MuestraAnticipos();", "MuestaAnticiposOC")
@@ -19746,7 +19752,6 @@ Partial Class Compras_Compras
TxtOtrosImpuestos.Text = 0.ToString.FormatoNumero
TrOtrosImpuestos.Visible = False
End If
CargaGvPersonal()
UpPS.Update()
RegistraScript("$('#ModalIEPS').modal('hide');")