Ajustes AF

This commit is contained in:
rakcsle
2022-04-01 11:48:02 -07:00
parent 48ab0bfb2e
commit 2b6daa08cd
4 changed files with 392 additions and 30 deletions

View File

@@ -1182,7 +1182,7 @@
</ContentTemplate>
</ajax:TabPanel>
<ajax:TabPanel ID="TabServyMant" runat="server" HeaderText="Servicios y Mto">
<ajax:TabPanel ID="TabServyMant" runat="server" HeaderText="Servicios y Mto" Visible="false">
<ContentTemplate>
<asp:Literal ID="Literal2" runat="server"></asp:Literal>
@@ -2188,7 +2188,7 @@
<ajax:TabPanel ID="TabPlagaEnfermedad" runat="server" HeaderText="Plagas Enfermedades" Visible="true">
<ajax:TabPanel ID="TabPlagaEnfermedad" runat="server" HeaderText="Plagas Enfermedades" Visible="false">
<ContentTemplate>

View File

@@ -14,7 +14,11 @@ Partial Class AF_AF
'Configuración
#Region "PROPIEDADES"
Private Property CveActivoFijo As Integer
Get
Get
If ViewState("CveActivoFijo") Is Nothing Then
ViewState("CveActivoFijo") = -1
End If
Return ViewState("CveActivoFijo").ToString.ToEntero
End Get
Set(value As Integer)
@@ -22,7 +26,10 @@ Partial Class AF_AF
End Set
End Property
Private Property CodigoAF As String
Get
Get
If ViewState("CodigoAF") Is Nothing Then
ViewState("CodigoAF") = ""
End If
Return ViewState("CodigoAF").ToString
End Get
Set(value As String)
@@ -294,6 +301,8 @@ Partial Class AF_AF
CargaCuentasContables()
End If
CargaCombos()
If Request("CveActivoFijo") IsNot Nothing AndAlso IsNumeric(Request("CveActivoFijo")) AndAlso Request("CveActivoFijo").ToEntero > 0 Then
ViewState("CveActivoFijo") = Request("CveActivoFijo")
CargaDatos()
@@ -311,8 +320,8 @@ Partial Class AF_AF
HlEvento.Visible = True
HlEvento.NavigateUrl = String.Format("/OI/PopUpAgenda.aspx?CveTipoEvento=2&CveActivoFijo=" & CveActivoFijo & "&TB_iframe=true&height=370&width=600;")
Else
ViewState("CveActivoFijo") = -1
CargaCombos()
ViewState("CveActivoFijo") = -1
'Configuración de Modalidad Insert
ImgAddObs.Visible = False
@@ -422,18 +431,38 @@ Partial Class AF_AF
CveEmpresaActual = UsuarioActual.CveEmpresa
End Sub
Private Sub ModalidadesPaginaAF(Op As String)
Private Sub ModalidadesPaginaAF(Optional Op As String = "")
Select Case Op
Case "AR" 'Arbol Frutal etc
LblFechaCompra.Text = "Fecha de Nacimiento"
LblFechaBaja.Text = "Fecha de Muerte"
TabProduccion.Visible = True
Exit Select
Case Else
Exit Select
End Select
TabProduccion.Visible = False
TabPlagaEnfermedad.Visible = False
TabServyMant.Visible = False
LblFechaCompra.Text = "Fecha de Compra:"
LblFechaBaja.Text = "Fecha de Baja:"
'Arbol Frutal
If DdlTipoActivoFijo.SelectedValue.ToEntero = 150 And DdlSubTipoActivoFijo.SelectedValue.ToEntero = 1936 And CveActivoFijo > 0 Then
LblFechaCompra.Text = "Fecha de Nacimiento"
LblFechaBaja.Text = "Fecha de Muerte"
TabProduccion.Visible = True
End If
'Arbol Apicola
If DdlTipoActivoFijo.SelectedValue.ToEntero = 151 And DdlSubTipoActivoFijo.SelectedValue.ToEntero = 1937 And CveActivoFijo > 0 Then
TabPlagaEnfermedad.Visible = True
End If
'Pozos
If DdlTipoActivoFijo.SelectedValue.ToEntero = 152 And DdlSubTipoActivoFijo.SelectedValue.ToEntero = 1938 And CveActivoFijo > 0 Then
TabServyMant.Visible = True
End If
'Inmuebles
If DdlTipoActivoFijo.SelectedValue.ToEntero = 153 And DdlSubTipoActivoFijo.SelectedValue.ToEntero = 1939 And CveActivoFijo > 0 Then
End If
UpDatos.Update()
End Sub
@@ -467,13 +496,18 @@ Partial Class AF_AF
Private Sub CargaTipoActivoFijo()
DdlTipoActivoFijo.DataSource = GlobalDTTipoActivoFijo(CveEmpresaActual).FiltraParametros("", "TipoActivoFijo")
DdlTipoActivoFijo.DataBind()
CargaSubTipoActivoFijo()
End Sub
Private Sub CargaSubTipoActivoFijo()
DdlSubTipoActivoFijo.Items.Clear()
DdlSubTipoActivoFijo.DataSource = GlobalDTSubTipoActivoFijo(CveEmpresaActual).FiltraParametros(String.Format("CveTipoActivoFijo = {0}", DdlTipoActivoFijo.SelectedValue), "SubTipoActivoFijo")
DdlSubTipoActivoFijo.DataBind()
DdlSubTipoActivoFijo.Items.Insert(0, New ListItem("Seleccione", "-1"))
DdlSubTipoActivoFijo.SelectedIndex = 0
UpDatos.Update()
End Sub
Private Sub CargaDispositivos()
DivDispositivo.Visible = False
@@ -556,6 +590,7 @@ Partial Class AF_AF
Protected Sub DdlTipoActivoFijo_SelectedIndexChanged(sender As Object, e As System.EventArgs) Handles DdlTipoActivoFijo.SelectedIndexChanged
CargaFolios()
ModalidadesPaginaAF()
End Sub
Private Sub CargaFolios()
@@ -2744,6 +2779,7 @@ Partial Class AF_AF
Protected Sub DdlSubTipoActivoFijo_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlSubTipoActivoFijo.SelectedIndexChanged
CargaCaracteristicas()
CargaDispositivos()
ModalidadesPaginaAF()
End Sub
#Region "CARGAR CUENTA CONTABLE"

View File

@@ -76,7 +76,7 @@ Partial Class Acumuladores_RepEntradasUsadosClientes
e.Row.Cells(2).Text = ""
e.Row.Cells(3).Text = ""
e.Row.Cells(4).Text = ""
e.Row.Cells(6).Text = ""
'e.Row.Cells(6).Text = ""
End If
If e.Row.DataKey("EsDistribuidor") <> "" Then

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Report xmlns="http://schemas.microsoft.com/sqlserver/reporting/2010/01/reportdefinition" xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner">
<Report xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner" xmlns:cl="http://schemas.microsoft.com/sqlserver/reporting/2010/01/componentdefinition" xmlns="http://schemas.microsoft.com/sqlserver/reporting/2010/01/reportdefinition">
<AutoRefresh>0</AutoRefresh>
<DataSources>
<DataSource Name="DataSet">
@@ -25,10 +25,34 @@
<DataField>Codigo_Clientes</DataField>
<rd:TypeName>System.String</rd:TypeName>
</Field>
<Field Name="SerieFolio">
<DataField>SerieFolio</DataField>
<rd:TypeName>System.String</rd:TypeName>
</Field>
<Field Name="CveVenta">
<DataField>CveVenta</DataField>
<rd:TypeName>System.Int</rd:TypeName>
</Field>
<Field Name="Folio">
<DataField>Folio</DataField>
<rd:TypeName>System.String</rd:TypeName>
</Field>
<Field Name="Fecha">
<DataField>Fecha</DataField>
<rd:TypeName>System.Date</rd:TypeName>
</Field>
<Field Name="SubProyecto">
<DataField>SubProyecto</DataField>
<rd:TypeName>System.String</rd:TypeName>
</Field>
<Field Name="Total">
<DataField>Total</DataField>
<rd:TypeName>System.String</rd:TypeName>
</Field>
<Field Name="TotalImporte">
<DataField>TotalImporte</DataField>
<rd:TypeName>System.String</rd:TypeName>
</Field>
<Field Name="EsHeader">
<DataField>EsHeader</DataField>
<rd:TypeName>System.String</rd:TypeName>
@@ -55,15 +79,27 @@
<Width>1.60534cm</Width>
</TablixColumn>
<TablixColumn>
<Width>15.36419cm</Width>
<Width>5.44232cm</Width>
</TablixColumn>
<TablixColumn>
<Width>3.08282cm</Width>
<Width>2.5cm</Width>
</TablixColumn>
<TablixColumn>
<Width>2.5cm</Width>
</TablixColumn>
<TablixColumn>
<Width>2.5cm</Width>
</TablixColumn>
<TablixColumn>
<Width>2.5cm</Width>
</TablixColumn>
<TablixColumn>
<Width>2.5cm</Width>
</TablixColumn>
</TablixColumns>
<TablixRows>
<TablixRow>
<Height>0.58521cm</Height>
<Height>0.37354cm</Height>
<TablixCells>
<TablixCell>
<CellContents>
@@ -110,7 +146,7 @@
<Paragraph>
<TextRuns>
<TextRun>
<Value>=Fields!Codigo_Clientes.Value</Value>
<Value>=IIF( Fields!CveVenta.Value &gt; 0, Fields!SerieFolio.Value,Fields!Codigo_Clientes.Value)</Value>
<Style>
<FontSize>7pt</FontSize>
<FontWeight>=IIF(Fields!EsHeader.Value = "-1" or Fields!Codigo.Value = "","Bold","Normal")</FontWeight>
@@ -137,6 +173,115 @@
</Textbox>
</CellContents>
</TablixCell>
<TablixCell>
<CellContents>
<Textbox Name="Folio">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>=Fields!Folio.Value</Value>
<Style>
<FontSize>7pt</FontSize>
<FontWeight>=IIF(Fields!EsHeader.Value = "-1" or Fields!Codigo.Value = "","Bold","Normal")</FontWeight>
</Style>
</TextRun>
</TextRuns>
<Style>
<TextAlign>Left</TextAlign>
</Style>
</Paragraph>
</Paragraphs>
<rd:DefaultName>Folio</rd:DefaultName>
<Style>
<Border>
<Color>White</Color>
<Style>Solid</Style>
</Border>
<BackgroundColor>=IIF(Fields!EsHeader.Value = "-1" or Fields!Codigo.Value = "","LightGrey","Transparent")</BackgroundColor>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
</CellContents>
</TablixCell>
<TablixCell>
<CellContents>
<Textbox Name="Fecha">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>=Fields!Fecha.Value</Value>
<Style>
<FontSize>7pt</FontSize>
<FontWeight>=IIF(Fields!EsHeader.Value = "-1" or Fields!Codigo.Value = "","Bold","Normal")</FontWeight>
<Format>d</Format>
</Style>
</TextRun>
</TextRuns>
<Style>
<TextAlign>Left</TextAlign>
</Style>
</Paragraph>
</Paragraphs>
<rd:DefaultName>Fecha</rd:DefaultName>
<Style>
<Border>
<Color>White</Color>
<Style>Solid</Style>
</Border>
<BackgroundColor>=IIF(Fields!EsHeader.Value = "-1" or Fields!Codigo.Value = "","LightGrey","Transparent")</BackgroundColor>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
</CellContents>
</TablixCell>
<TablixCell>
<CellContents>
<Textbox Name="SubProyecto">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>=Fields!SubProyecto.Value</Value>
<Style>
<FontSize>7pt</FontSize>
<FontWeight>=IIF(Fields!EsHeader.Value = "-1" or Fields!Codigo.Value = "","Bold","Normal")</FontWeight>
</Style>
</TextRun>
</TextRuns>
<Style>
<TextAlign>Left</TextAlign>
</Style>
</Paragraph>
</Paragraphs>
<rd:DefaultName>SubProyecto</rd:DefaultName>
<Style>
<Border>
<Color>White</Color>
<Style>Solid</Style>
</Border>
<BackgroundColor>=IIF(Fields!EsHeader.Value = "-1" or Fields!Codigo.Value = "","LightGrey","Transparent")</BackgroundColor>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
</CellContents>
</TablixCell>
<TablixCell>
<CellContents>
<Textbox Name="Cantidad">
@@ -150,12 +295,12 @@
<Style>
<FontSize>7pt</FontSize>
<FontWeight>=IIF(Fields!EsHeader.Value = "-1" or Fields!Codigo.Value = "","Bold","Normal")</FontWeight>
<Format>#,0;(#,0)</Format>
<Format>#,0</Format>
</Style>
</TextRun>
</TextRuns>
<Style>
<TextAlign>Left</TextAlign>
<TextAlign>Right</TextAlign>
</Style>
</Paragraph>
</Paragraphs>
@@ -174,6 +319,43 @@
</Textbox>
</CellContents>
</TablixCell>
<TablixCell>
<CellContents>
<Textbox Name="TotalImporte">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>=Fields!TotalImporte.Value</Value>
<Style>
<FontSize>7pt</FontSize>
<FontWeight>=IIF(Fields!EsHeader.Value = "-1" or Fields!Codigo.Value = "","Bold","Normal")</FontWeight>
<Format>#,0.00</Format>
</Style>
</TextRun>
</TextRuns>
<Style>
<TextAlign>Right</TextAlign>
</Style>
</Paragraph>
</Paragraphs>
<rd:DefaultName>TotalImporte</rd:DefaultName>
<Style>
<Border>
<Color>White</Color>
<Style>Solid</Style>
</Border>
<BackgroundColor>=IIF(Fields!EsHeader.Value = "-1" or Fields!Codigo.Value = "","LightGrey","Transparent")</BackgroundColor>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
</CellContents>
</TablixCell>
</TablixCells>
</TablixRow>
</TablixRows>
@@ -183,6 +365,10 @@
<TablixMember />
<TablixMember />
<TablixMember />
<TablixMember />
<TablixMember />
<TablixMember />
<TablixMember />
</TablixMembers>
</TablixColumnHierarchy>
<TablixRowHierarchy>
@@ -195,8 +381,8 @@
<DataSetName>DataSet1</DataSetName>
<Top>0.17639cm</Top>
<Left>0.08377cm</Left>
<Height>0.58521cm</Height>
<Width>20.05235cm</Width>
<Height>0.37354cm</Height>
<Width>19.54766cm</Width>
<Style>
<Border>
<Style>None</Style>
@@ -423,7 +609,7 @@
<Top>3.27766cm</Top>
<Left>1.68911cm</Left>
<Height>0.6cm</Height>
<Width>15.36419cm</Width>
<Width>5.44232cm</Width>
<ZIndex>5</ZIndex>
<Style>
<Border>
@@ -443,7 +629,7 @@
<Paragraph>
<TextRuns>
<TextRun>
<Value>Cantidad</Value>
<Value>Total</Value>
<Style>
<FontWeight>Bold</FontWeight>
</Style>
@@ -456,9 +642,9 @@
</Paragraphs>
<rd:DefaultName>Textbox1</rd:DefaultName>
<Top>3.27766cm</Top>
<Left>17.0533cm</Left>
<Left>17.13143cm</Left>
<Height>0.6cm</Height>
<Width>3.08282cm</Width>
<Width>2.5cm</Width>
<ZIndex>6</ZIndex>
<Style>
<Border>
@@ -471,6 +657,146 @@
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
<Textbox Name="Textbox6">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>Mov. Amacen</Value>
<Style>
<FontWeight>Bold</FontWeight>
</Style>
</TextRun>
</TextRuns>
<Style>
<TextAlign>Center</TextAlign>
</Style>
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox3</rd:DefaultName>
<Top>3.27766cm</Top>
<Left>7.13143cm</Left>
<Height>0.6cm</Height>
<Width>2.5cm</Width>
<ZIndex>7</ZIndex>
<Style>
<Border>
<Style>None</Style>
</Border>
<BackgroundColor>LightGrey</BackgroundColor>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
<Textbox Name="Textbox7">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>Fecha</Value>
<Style>
<FontWeight>Bold</FontWeight>
</Style>
</TextRun>
</TextRuns>
<Style>
<TextAlign>Center</TextAlign>
</Style>
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox3</rd:DefaultName>
<Top>3.27766cm</Top>
<Left>9.63143cm</Left>
<Height>0.6cm</Height>
<Width>2.5cm</Width>
<ZIndex>8</ZIndex>
<Style>
<Border>
<Style>None</Style>
</Border>
<BackgroundColor>LightGrey</BackgroundColor>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
<Textbox Name="Textbox8">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>Sub Proyecto</Value>
<Style>
<FontWeight>Bold</FontWeight>
</Style>
</TextRun>
</TextRuns>
<Style>
<TextAlign>Center</TextAlign>
</Style>
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox3</rd:DefaultName>
<Top>3.27766cm</Top>
<Left>12.13143cm</Left>
<Height>0.6cm</Height>
<Width>2.5cm</Width>
<ZIndex>9</ZIndex>
<Style>
<Border>
<Style>None</Style>
</Border>
<BackgroundColor>LightGrey</BackgroundColor>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
<Textbox Name="Textbox9">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>Cantidad</Value>
<Style>
<FontWeight>Bold</FontWeight>
</Style>
</TextRun>
</TextRuns>
<Style>
<TextAlign>Center</TextAlign>
</Style>
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox3</rd:DefaultName>
<Top>3.27766cm</Top>
<Left>14.63143cm</Left>
<Height>0.6cm</Height>
<Width>2.5cm</Width>
<ZIndex>10</ZIndex>
<Style>
<Border>
<Style>None</Style>
</Border>
<BackgroundColor>LightGrey</BackgroundColor>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
</ReportItems>
<Style>
<Border>