Mostrar IxC
This commit is contained in:
@@ -386,12 +386,19 @@
|
||||
|
||||
<asp:UpdatePanel ID="UPDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" Width="100%" EmptyDataText="No se encontraron Ventas con los filtros especificados" data-sort="true" ToolTip="Listado de Ventas" CssClass="ScrollAD table table-striped table-hover Widthall" data-heighterror="320" data-freezecols="0" data-freezerows="0" GridLines="None"
|
||||
DataKeyNames="CveVenta">
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" Width="100%"
|
||||
EmptyDataText="No se encontraron Ventas con los filtros especificados" data-sort="true" ToolTip="Listado de Ventas"
|
||||
CssClass="ScrollAD table table-striped table-hover Widthall" data-heighterror="320" data-freezecols="0" data-freezerows="0" GridLines="None"
|
||||
DataKeyNames="CveVenta,TipoDocto">
|
||||
<Columns>
|
||||
<asp:BoundField HeaderText="TipoDocto" DataField="TipoDocto" ItemStyle-HorizontalAlign="Center" />
|
||||
<asp:BoundField HeaderText="Fecha" DataField="Fecha" DataFormatString="{0:d}" ItemStyle-HorizontalAlign="Center" />
|
||||
<asp:HyperLinkField HeaderText="Folio" DataNavigateUrlFields="CveVenta" DataNavigateUrlFormatString="/Ventas/Ventas.aspx?CveVenta={0}" ControlStyle-Width ="85px" DataTextField="SerieFolio" />
|
||||
<asp:TemplateField HeaderText="Folio">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HlFolio" runat="server" ControlStyle-Width="85px"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%--<asp:HyperLinkField HeaderText="Folio" DataNavigateUrlFields="CveVenta" DataNavigateUrlFormatString="/Ventas/Ventas.aspx?CveVenta={0}" ControlStyle-Width ="85px" DataTextField="SerieFolio" />--%>
|
||||
<asp:BoundField HeaderText="Total" DataField="Total" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="SubTotal" DataField="SubTotal" DataFormatString="{0:N2}" Visible="false" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="IVA" DataField="IVA" DataFormatString="{0:N2}" Visible="false" ItemStyle-HorizontalAlign="Right" />
|
||||
|
||||
@@ -432,6 +432,15 @@ Partial Class RepCxCDetalle
|
||||
If e.Row.RowIndex = 0 Then
|
||||
e.Row.Cells(1).Width = Unit.Pixel(70)
|
||||
e.Row.Cells(2).Width = Unit.Pixel(75)
|
||||
End If
|
||||
e.Row.FCHyperLink("HlFolio").Text = e.Row.DBCampo("SerieFolio")
|
||||
|
||||
If e.Row.DBCampo("CveVenta").ToEntero() > 0 Then
|
||||
If e.Row.DBCampo("TipoDocto") = "IxC" Then
|
||||
e.Row.FCHyperLink("HlFolio").NavigateUrl = String.Format("/Bancos/IE.aspx?CveIE={0}", e.Row.DBCampo("CveVenta"))
|
||||
Else
|
||||
e.Row.FCHyperLink("HlFolio").NavigateUrl = String.Format("/Ventas/Ventas.aspx?CveVenta={0}", e.Row.DBCampo("CveVenta"))
|
||||
End If
|
||||
End If
|
||||
|
||||
If e.Row.DBCampo("SubProyecto") = "" And e.Row.DBCampo("CveMoneda") = "1" Then
|
||||
@@ -927,22 +936,27 @@ Partial Class RepCxCDetalle
|
||||
UPPersonalizar.Update()
|
||||
UpCobranza.Update()
|
||||
End Sub
|
||||
Private Sub BtnAsignaCobranza_Click(sender As Object, e As EventArgs) Handles BtnAsignaCobranza.Click
|
||||
Dim ObjVentas As New ClsVentas
|
||||
Private Sub BtnAsignaCobranza_Click(sender As Object, e As EventArgs) Handles BtnAsignaCobranza.Click
|
||||
Dim time As DateTime
|
||||
Dim TieneError = False
|
||||
|
||||
Dim ObjVentas As New ClsVentas
|
||||
ObjVentas.IniciaTransacSQL()
|
||||
|
||||
For Each row As GridViewRow In GvDatos.Rows
|
||||
If row.FCCheckBox("ChkCobranza").Checked Then
|
||||
time = DateTime.Parse(String.Format("{0} {1}:{2} {3}", TxtFechaCobranza.Text, TimeSelector.Hour, TimeSelector.Minute, TimeSelector.AmPm))
|
||||
If Not ObjVentas.UpdateAsignaVentaCobranza(row.DataKey("CveVenta").ToEntero, DdlCobranzaEstatus.SelectedValue.ToEntero, DdlUsuarioCobranza.SelectedValue.ToEntero, DdlTurnoCobranza.SelectedValue.ToEntero, TxtObservacionCobranza.Text.Trim, time) Then
|
||||
TieneError = True
|
||||
End If
|
||||
End If
|
||||
|
||||
Next
|
||||
Try
|
||||
For Each row As GridViewRow In GvDatos.Rows
|
||||
Dim TipoDocto As String = row.DataKey("TipoDocto")
|
||||
If row.FCCheckBox("ChkCobranza").Checked AndAlso TipoDocto <> "IxC" Then
|
||||
time = DateTime.Parse(String.Format("{0} {1}:{2} {3}", TxtFechaCobranza.Text, TimeSelector.Hour, TimeSelector.Minute, TimeSelector.AmPm))
|
||||
If Not ObjVentas.UpdateAsignaVentaCobranza(row.DataKey("CveVenta").ToEntero, DdlCobranzaEstatus.SelectedValue.ToEntero, DdlUsuarioCobranza.SelectedValue.ToEntero, DdlTurnoCobranza.SelectedValue.ToEntero, TxtObservacionCobranza.Text.Trim, time) Then
|
||||
TieneError = True
|
||||
End If
|
||||
End If
|
||||
|
||||
Next
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al actualizar", ex)
|
||||
TieneError = True
|
||||
End Try
|
||||
|
||||
If Not TieneError Then
|
||||
ObjVentas.Commit()
|
||||
@@ -955,11 +969,11 @@ Partial Class RepCxCDetalle
|
||||
|
||||
ObjVentas.Dispose()
|
||||
CargaDatos()
|
||||
End Sub
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "SELECTED INDEX CHANGE"
|
||||
|
||||
|
||||
Protected Sub DdlClienteClasificacion_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
CargaClientes()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user