se agregó otra tabla para juntar varios costos indirectos en un solo flete

This commit is contained in:
Antonio Gonzalez
2020-09-29 18:42:01 -07:00
parent ede6f99109
commit 1ebf415d92
4 changed files with 88 additions and 32 deletions

View File

@@ -40,7 +40,8 @@ Partial Class Compras_RepFletes
Private Sub CargaDatos()
Dim ObjInv As New ClsInventarios
If TxtFolio.Text <> "" Then TxtFechaI.Text = MinFecha.ToShortDateString : TxtFechaF.Text = MaxFecha.ToShortDateString
If ObjInv.GetFletes(UsuarioActual.CveEmpresa, -1, If(TxtFolio.Text = "", "-1", TxtFolio.Text), DdlProveedor.SelectedValue.ToString.ToEntero, -1, -1, TxtFechaI.Text.ToDate, TxtFechaF.Text.ToDate) Then
If ObjInv.GetFletesRep(UsuarioActual.CveEmpresa, -1, If(TxtFolio.Text = "", "-1", TxtFolio.Text), DdlProveedor.SelectedValue.ToString.ToEntero, -1, -1,
TxtFechaI.Text.ToDate, TxtFechaF.Text.ToDate, TipoGasto:=DdlTipoGasto.SelectedValue.ToEntero()) Then
DtFletes = ObjInv.DtResultados
End If
ObjInv.Dispose()
@@ -55,13 +56,19 @@ Partial Class Compras_RepFletes
Protected Sub GvDatos_RowDataBound(sender As Object, e As GridViewRowEventArgs)
If e.Row.RowType = DataControlRowType.DataRow Then
Dim Modalidad = e.Row.DBCampo("Modalidad").ToString.ToEntero
Dim Liga = If(Modalidad = 1, "/OC/OC.aspx?OC", "/Compras/Compras.aspx?CveCompra")
Dim TipoCon As Integer = e.Row.DBCampo("TipoCon").ToString.ToEntero
Dim CveFlete As Integer = e.Row.DBCampo("CveFlete").ToEntero()
Dim Url As String = If(TipoCon = -1, String.Format("/Compras/Compras.aspx?CveCompra={0}", CveFlete), String.Format("/Inventarios/Fletes.aspx?CveFlete={0}", CveFlete))
e.Row.FCHyperLink("HlkFolio").NavigateUrl = Url
e.Row.FCHyperLink("HlkFecha").NavigateUrl = Url
e.Row.FCHyperLink("HlkDescripcion").NavigateUrl = Url
'Dim Modalidad = e.Row.DBCampo("Modalidad").ToString.ToEntero
'Dim Liga = If(Modalidad = 1, "/OC/OC.aspx?OC", "/Compras/Compras.aspx?CveCompra")
e.Row.Cells(4).Text = $"<a target='_blank' href='{Liga}={e.Row.DBCampo("CveDocumento")}'>{If(Modalidad = 1, "OC: ", "Compra: ")}{e.Row.DBCampo("FolioDocumento")}</a>"
e.Row.Cells(5).Text = $"<a target='_blank' href='{Liga}={e.Row.DBCampo("CveDocumento")}'>{e.Row.DBCampo("FechaDocumento").ToDate.ToShortDateString}</a>"
e.Row.Cells(6).Text = $"<a target='_blank' href='{Liga}={e.Row.DBCampo("CveDocumento")}'>{e.Row.DBCampo("DescripcionDocumento")}</a>"
e.Row.Cells(7).Text = $"<a target='_blank' href='{Liga}={e.Row.DBCampo("CveDocumento")}'>{e.Row.DBCampo("TotalDocumento")}</a>"
'e.Row.Cells(4).Text = $"<a target='_blank' href='{Liga}={e.Row.DBCampo("CveDocumento")}'>{If(Modalidad = 1, "OC: ", "Compra: ")}{e.Row.DBCampo("FolioDocumento")}</a>"
'e.Row.Cells(5).Text = $"<a target='_blank' href='{Liga}={e.Row.DBCampo("CveDocumento")}'>{e.Row.DBCampo("FechaDocumento").ToDate.ToShortDateString}</a>"
'e.Row.Cells(6).Text = $"<a target='_blank' href='{Liga}={e.Row.DBCampo("CveDocumento")}'>{e.Row.DBCampo("DescripcionDocumento")}</a>"
'e.Row.Cells(7).Text = $"<a target='_blank' href='{Liga}={e.Row.DBCampo("CveDocumento")}'>{e.Row.DBCampo("TotalDocumento")}</a>"
End If
End Sub