Consumo Interno activo fijo, RepCompras Activo Fijo integrar Consumo interno en reporte padre y detalle.
This commit is contained in:
@@ -111,18 +111,22 @@ Partial Class Compras_RepComprasAF
|
|||||||
|
|
||||||
If UsuarioActual.Empresa.Tipo_CentroCosto = 1 Then
|
If UsuarioActual.Empresa.Tipo_CentroCosto = 1 Then
|
||||||
DdlProyecto.Visible = False
|
DdlProyecto.Visible = False
|
||||||
LblSubProyecto.Text = "Sucursal"
|
'LblSubProyecto.Text = "Sucursal"
|
||||||
LblProyecto.Visible = False
|
LblProyecto.Visible = False
|
||||||
DdlSubProyecto.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1)
|
' DdlSubProyecto.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1)
|
||||||
DdlSubProyecto.DataBind()
|
CargarCentrosDeCosto(Nothing, DdlSubProyecto, Nothing, LblSubProyecto)
|
||||||
DdlSubProyecto.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
'DdlSubProyecto.DataBind()
|
||||||
|
'DdlSubProyecto.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||||
ElseIf UsuarioActual.Empresa.Tipo_CentroCosto = 2 Then
|
ElseIf UsuarioActual.Empresa.Tipo_CentroCosto = 2 Then
|
||||||
DdlProyecto.Visible = False
|
DdlProyecto.Visible = False
|
||||||
LblSubProyecto.Text = "Proyecto"
|
'LblSubProyecto.Text = "Proyecto"
|
||||||
LblProyecto.Visible = False
|
LblProyecto.Visible = False
|
||||||
DdlSubProyecto.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1)
|
|
||||||
DdlSubProyecto.DataBind()
|
'DdlSubProyecto.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1)
|
||||||
DdlSubProyecto.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
'DdlSubProyecto.DataBind()
|
||||||
|
CargarCentrosDeCosto(Nothing, DdlSubProyecto, Nothing, LblSubProyecto)
|
||||||
|
|
||||||
|
'DdlSubProyecto.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||||
ElseIf UsuarioActual.Empresa.Tipo_CentroCosto = 3 Or UsuarioActual.Empresa.Tipo_CentroCosto = 0 Then
|
ElseIf UsuarioActual.Empresa.Tipo_CentroCosto = 3 Or UsuarioActual.Empresa.Tipo_CentroCosto = 0 Then
|
||||||
LblProyecto.Text = "Proyecto"
|
LblProyecto.Text = "Proyecto"
|
||||||
|
|
||||||
@@ -149,10 +153,14 @@ Partial Class Compras_RepComprasAF
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub CargaSubProyecto()
|
Private Sub CargaSubProyecto()
|
||||||
DdlSubProyecto.Items.Clear()
|
|
||||||
DdlSubProyecto.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1)
|
|
||||||
DdlSubProyecto.DataBind()
|
CargarCentrosDeCosto(Nothing, DdlSubProyecto, Nothing, LblSubProyecto)
|
||||||
DdlSubProyecto.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
|
||||||
|
'DdlSubProyecto.Items.Clear()
|
||||||
|
'DdlSubProyecto.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1)
|
||||||
|
'DdlSubProyecto.DataBind()
|
||||||
|
'DdlSubProyecto.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||||
End Sub
|
End Sub
|
||||||
Protected Sub BtnConsultar_Click(sender As Object, e As System.EventArgs) Handles BtnConsultar.Click
|
Protected Sub BtnConsultar_Click(sender As Object, e As System.EventArgs) Handles BtnConsultar.Click
|
||||||
CargaDatos()
|
CargaDatos()
|
||||||
|
|||||||
@@ -174,6 +174,11 @@ Partial Class Compras_RepComprasAFDetalle
|
|||||||
DdlProveedores.DataSource = GlobalDTCompProveedores(UsuarioActual.CveEmpresa)
|
DdlProveedores.DataSource = GlobalDTCompProveedores(UsuarioActual.CveEmpresa)
|
||||||
DdlProveedores.DataBind()
|
DdlProveedores.DataBind()
|
||||||
|
|
||||||
|
If Request.QueryString("CveProveedor") IsNot Nothing AndAlso Request.QueryString("CveProveedor").ToEntero = -3 Then
|
||||||
|
DdlProveedores.Items.Add(New ListItem("Consumo Interno", "-3"))
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
DdlMonedas.DataSource = GlobalDTMonedas()
|
DdlMonedas.DataSource = GlobalDTMonedas()
|
||||||
DdlMonedas.DataBind()
|
DdlMonedas.DataBind()
|
||||||
|
|
||||||
@@ -325,11 +330,18 @@ Partial Class Compras_RepComprasAFDetalle
|
|||||||
FechaF = If(IsDate(txtFechaF.Text.Trim()), txtFechaF.Text.Trim(), "-1")
|
FechaF = If(IsDate(txtFechaF.Text.Trim()), txtFechaF.Text.Trim(), "-1")
|
||||||
|
|
||||||
|
|
||||||
Dim Liga As String = $"/Compras/Compras.aspx?CveCompra={e.Row.DBCampo("CveCompra")}"
|
Dim Liga As String = ""
|
||||||
|
|
||||||
|
|
||||||
|
If e.Row.DBCampo("CveCompra").ToEntero > 0 Then
|
||||||
|
Liga = $"/Compras/Compras.aspx?CveCompra={e.Row.DBCampo("CveCompra")}"
|
||||||
|
Else
|
||||||
|
Liga = $"/Inventarios/EntradasSalidas.aspx?CveMovimiento={e.Row.DBCampo("CveMovimiento")}"
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
If e.Row.DBCampo("Orden") = "1" Then
|
If e.Row.DBCampo("Orden") = "1" Then
|
||||||
e.Row.Cells(0).Text = String.Format("<a class='{0}' target='_blank' href='{1}'>{2}</a>", "Texto", Liga, e.Row.DBCampo("SerieFolio").ToString)
|
e.Row.Cells(0).Text = String.Format("<a Class='{0}' target='_blank' href='{1}'>{2}</a>", "Texto", Liga, e.Row.DBCampo("SerieFolio").ToString)
|
||||||
Else
|
Else
|
||||||
e.Row.BackColor = Drawing.Color.LightGray
|
e.Row.BackColor = Drawing.Color.LightGray
|
||||||
e.Row.Font.Bold = True
|
e.Row.Font.Bold = True
|
||||||
|
|||||||
@@ -202,6 +202,9 @@ Partial Class Compras_RepProductosServicios
|
|||||||
DdlGrupo.SelectedValueExist("8")
|
DdlGrupo.SelectedValueExist("8")
|
||||||
End Sub
|
End Sub
|
||||||
Private Sub CargaTipoCentroCosto()
|
Private Sub CargaTipoCentroCosto()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
If UsuarioActual.Empresa.Tipo_CentroCosto = 1 Then
|
If UsuarioActual.Empresa.Tipo_CentroCosto = 1 Then
|
||||||
DdlSubProyecto.Items.Clear()
|
DdlSubProyecto.Items.Clear()
|
||||||
DivProyecto.Visible = False
|
DivProyecto.Visible = False
|
||||||
|
|||||||
@@ -49,7 +49,7 @@
|
|||||||
<Paragraph>
|
<Paragraph>
|
||||||
<TextRuns>
|
<TextRuns>
|
||||||
<TextRun>
|
<TextRun>
|
||||||
<Value>Productos que faltan</Value>
|
<Value> Productos que sobran </Value>
|
||||||
<Style>
|
<Style>
|
||||||
<FontWeight>Bold</FontWeight>
|
<FontWeight>Bold</FontWeight>
|
||||||
</Style>
|
</Style>
|
||||||
@@ -1349,7 +1349,7 @@
|
|||||||
<Paragraph>
|
<Paragraph>
|
||||||
<TextRuns>
|
<TextRuns>
|
||||||
<TextRun>
|
<TextRun>
|
||||||
<Value> Productos que sobran</Value>
|
<Value> Productos que faltan</Value>
|
||||||
<Style>
|
<Style>
|
||||||
<FontWeight>Bold</FontWeight>
|
<FontWeight>Bold</FontWeight>
|
||||||
</Style>
|
</Style>
|
||||||
@@ -3033,8 +3033,8 @@
|
|||||||
<Value>=Parameters!LogoPath.Value</Value>
|
<Value>=Parameters!LogoPath.Value</Value>
|
||||||
<Sizing>FitProportional</Sizing>
|
<Sizing>FitProportional</Sizing>
|
||||||
<Left>0.12943cm</Left>
|
<Left>0.12943cm</Left>
|
||||||
<Height>2.25453cm</Height>
|
<Height>2.25804cm</Height>
|
||||||
<Width>4.18606cm</Width>
|
<Width>3.29186cm</Width>
|
||||||
<ZIndex>4</ZIndex>
|
<ZIndex>4</ZIndex>
|
||||||
<Style>
|
<Style>
|
||||||
<Border>
|
<Border>
|
||||||
@@ -3048,28 +3048,23 @@
|
|||||||
<Paragraphs>
|
<Paragraphs>
|
||||||
<Paragraph>
|
<Paragraph>
|
||||||
<TextRuns>
|
<TextRuns>
|
||||||
<TextRun>
|
|
||||||
<Value xml:space="preserve"> </Value>
|
|
||||||
<Style>
|
|
||||||
<FontSize>14pt</FontSize>
|
|
||||||
<FontWeight>Bold</FontWeight>
|
|
||||||
</Style>
|
|
||||||
</TextRun>
|
|
||||||
<TextRun>
|
<TextRun>
|
||||||
<Value>=Parameters!NombreEmpresa.Value</Value>
|
<Value>=Parameters!NombreEmpresa.Value</Value>
|
||||||
<Style>
|
<Style>
|
||||||
<FontSize>14pt</FontSize>
|
<FontSize>12pt</FontSize>
|
||||||
<FontWeight>Bold</FontWeight>
|
<FontWeight>Bold</FontWeight>
|
||||||
</Style>
|
</Style>
|
||||||
</TextRun>
|
</TextRun>
|
||||||
</TextRuns>
|
</TextRuns>
|
||||||
<Style />
|
<Style>
|
||||||
|
<TextAlign>Center</TextAlign>
|
||||||
|
</Style>
|
||||||
</Paragraph>
|
</Paragraph>
|
||||||
</Paragraphs>
|
</Paragraphs>
|
||||||
<rd:DefaultName>Textbox1</rd:DefaultName>
|
<rd:DefaultName>Textbox1</rd:DefaultName>
|
||||||
<Left>4.49188cm</Left>
|
<Left>3.53938cm</Left>
|
||||||
<Height>0.6cm</Height>
|
<Height>0.6cm</Height>
|
||||||
<Width>13.51378cm</Width>
|
<Width>17.07793cm</Width>
|
||||||
<ZIndex>5</ZIndex>
|
<ZIndex>5</ZIndex>
|
||||||
<Style>
|
<Style>
|
||||||
<Border>
|
<Border>
|
||||||
@@ -3090,7 +3085,7 @@
|
|||||||
<TextRun>
|
<TextRun>
|
||||||
<Value>REPORTE DE INVENTARIO FISICO</Value>
|
<Value>REPORTE DE INVENTARIO FISICO</Value>
|
||||||
<Style>
|
<Style>
|
||||||
<FontSize>10.5pt</FontSize>
|
<FontSize>9.5pt</FontSize>
|
||||||
<FontWeight>Bold</FontWeight>
|
<FontWeight>Bold</FontWeight>
|
||||||
</Style>
|
</Style>
|
||||||
</TextRun>
|
</TextRun>
|
||||||
@@ -3104,7 +3099,7 @@
|
|||||||
<TextRun>
|
<TextRun>
|
||||||
<Value />
|
<Value />
|
||||||
<Style>
|
<Style>
|
||||||
<FontSize>9pt</FontSize>
|
<FontSize>9.5pt</FontSize>
|
||||||
<FontWeight>Bold</FontWeight>
|
<FontWeight>Bold</FontWeight>
|
||||||
</Style>
|
</Style>
|
||||||
</TextRun>
|
</TextRun>
|
||||||
@@ -3116,9 +3111,9 @@
|
|||||||
</Paragraphs>
|
</Paragraphs>
|
||||||
<rd:DefaultName>Textbox2</rd:DefaultName>
|
<rd:DefaultName>Textbox2</rd:DefaultName>
|
||||||
<Top>0.90456cm</Top>
|
<Top>0.90456cm</Top>
|
||||||
<Left>4.55144cm</Left>
|
<Left>3.59894cm</Left>
|
||||||
<Height>0.66174cm</Height>
|
<Height>0.66174cm</Height>
|
||||||
<Width>11.39711cm</Width>
|
<Width>17.01837cm</Width>
|
||||||
<ZIndex>6</ZIndex>
|
<ZIndex>6</ZIndex>
|
||||||
<Style>
|
<Style>
|
||||||
<Border>
|
<Border>
|
||||||
|
|||||||
@@ -331,12 +331,22 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="row" runat="server" id="TrSubProyectoActivoFijo" visible="false">
|
<div class="row" runat="server" id="TrSubProyectoActivoFijo" visible="false">
|
||||||
<asp:Label runat="server" ID="LblSubProyecto" class="col-md-1 truncate">Proyecto:</asp:Label>
|
<asp:Label runat="server" ID="LblSubProyecto" class="col-md-1 truncate">Proyecto:</asp:Label>
|
||||||
<div class="col-md-2">
|
<div class="col-md-5">
|
||||||
<asp:DropDownList ID="DdlSubProyecto" CssClass=" form-control input-sm select2me" runat="server" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Style="max-width: 250px"></asp:DropDownList>
|
<asp:DropDownList ID="DdlSubProyecto" CssClass=" form-control input-sm select2me" runat="server" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Style="max-width: 100%"></asp:DropDownList>
|
||||||
<asp:RangeValidator ID="RVSubProyecto" runat="server" ControlToValidate="DdlSubProyecto" MinimumValue="0" MaximumValue="9999999" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Sub Proyecto''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RangeValidator>
|
<asp:RangeValidator ID="RVSubProyecto" runat="server" ControlToValidate="DdlSubProyecto" MinimumValue="0" MaximumValue="9999999" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Sub Proyecto''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RangeValidator>
|
||||||
<ajax:ValidatorCalloutExtender ID="VCOSubProyecto" runat="server" HighlightCssClass="vco" TargetControlID="RVSubProyecto" Width="350px"></ajax:ValidatorCalloutExtender>
|
<ajax:ValidatorCalloutExtender ID="VCOSubProyecto" runat="server" HighlightCssClass="vco" TargetControlID="RVSubProyecto" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="row" runat="server" id="TrActivoFijo" visible="false">
|
||||||
|
|
||||||
|
<asp:Label runat="server" ID="Label1" class="col-md-1 truncate">Activo Fijo:</asp:Label>
|
||||||
|
<div class="col-md-5">
|
||||||
|
<asp:DropDownList ID="DdlActivoFijo" runat="server" CssClass=" form-control input-sm select2me" AppendDataBoundItems="true" DataTextField="Descripcion" DataValueField="CveActivoFijo" Width="95%">
|
||||||
|
<asp:ListItem Selected="True" Text="Seleccione Uno" Value="-1"></asp:ListItem>
|
||||||
|
</asp:DropDownList>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
<div class="row" runat="server" id="DivRemision" visible="false">
|
<div class="row" runat="server" id="DivRemision" visible="false">
|
||||||
<label class="col-md-1 truncate" style="width: 110px">Remision:</label>
|
<label class="col-md-1 truncate" style="width: 110px">Remision:</label>
|
||||||
<div class="col-md-2">
|
<div class="col-md-2">
|
||||||
|
|||||||
@@ -1508,6 +1508,11 @@ Partial Class Inventarios_EntradasSalidas
|
|||||||
ActivoFijo = -2
|
ActivoFijo = -2
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
'Esto es parte de consumo interno
|
||||||
|
If DdlActivoFijo.SelectedValue.ToEntero > 0 Then
|
||||||
|
ActivoFijo = DdlActivoFijo.SelectedValue.ToEntero
|
||||||
|
End If
|
||||||
|
|
||||||
'ACTUALIZAR
|
'ACTUALIZAR
|
||||||
If CveMovimiento > 0 Then
|
If CveMovimiento > 0 Then
|
||||||
Dim Mensaje As String = ""
|
Dim Mensaje As String = ""
|
||||||
@@ -3353,15 +3358,22 @@ Partial Class Inventarios_EntradasSalidas
|
|||||||
|
|
||||||
DVCultivosCuadro.Visible = True
|
DVCultivosCuadro.Visible = True
|
||||||
CargaCultivos()
|
CargaCultivos()
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
TrActivoFijo.Visible = True
|
||||||
|
DdlActivoFijo.Items.Clear()
|
||||||
|
DdlActivoFijo.DataSource = GlobalDTActivoFijos(UsuarioActual.CveEmpresa).FiltraParametros(" CveEstadoActivoFijo IN(1,3,4,9) ")
|
||||||
|
DdlActivoFijo.DataBind()
|
||||||
|
DdlActivoFijo.Items.Insert(0, New ListItem("Seleccione uno", "-1"))
|
||||||
|
DdlActivoFijo.SelectedValueExist(-1)
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
Private Sub CargaCultivos()
|
Private Sub CargaCultivos()
|
||||||
DdlModalCultivosCuadro.Items.Clear()
|
DdlModalCultivosCuadro.Items.Clear()
|
||||||
DdlModalCultivosCuadro.DataSource = GlobalDTCultivosCuadro(UsuarioActual.CveEmpresa).FiltraParametros($"CveSubProyecto = {DdlSubProyecto.SelectedValue}")
|
DdlModalCultivosCuadro.DataSource = GlobalDTCultivosCuadro(UsuarioActual.CveEmpresa).FiltraParametros($"CveSubProyecto = {DdlSubProyecto.SelectedValue} AND Estatus = 1 ")
|
||||||
DdlModalCultivosCuadro.DataBind()
|
DdlModalCultivosCuadro.DataBind()
|
||||||
DdlModalCultivosCuadro.Items.Insert(0, New ListItem("Seleccione uno", "-1"))
|
DdlModalCultivosCuadro.Items.Insert(0, New ListItem("Seleccione uno", "-1"))
|
||||||
End Sub
|
End Sub
|
||||||
|
|||||||
@@ -459,10 +459,10 @@ Partial Class Inventarios_RepAnomalias
|
|||||||
params.Add(New ReportParameter("FechaInicio", Inventario.FechaI))
|
params.Add(New ReportParameter("FechaInicio", Inventario.FechaI))
|
||||||
params.Add(New ReportParameter("FechaFin", Inventario.FechaF))
|
params.Add(New ReportParameter("FechaFin", Inventario.FechaF))
|
||||||
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
|
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
|
||||||
params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToString))
|
params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToString))
|
||||||
Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
|
||||||
If Imagen.Exists Then
|
If Imagen.Exists Then
|
||||||
params.Add(New ReportParameter("LogoPath", logouri))
|
params.Add(New ReportParameter("LogoPath", $"file://{Imagen.FullName}"))
|
||||||
Else
|
Else
|
||||||
params.Add(New ReportParameter("LogoPath", ""))
|
params.Add(New ReportParameter("LogoPath", ""))
|
||||||
End If
|
End If
|
||||||
|
|||||||
Reference in New Issue
Block a user