This commit is contained in:
JORGE LUIS CAUDILLO ESPARZA
2020-01-03 12:04:07 -07:00
10 changed files with 45 additions and 43 deletions

View File

@@ -80,17 +80,17 @@
ShowHeader="True" EmptyDataText="No se encontraron resultados." ShowHeaderWhenEmpty="true" AutoGenerateColumns="False" AllowPaging="False"
ShowFooter="False" DataKeyNames="CvePSCargo,Codigo,Inicial,E_Almacen,E_Pub,E_Traspaso,E_Compra,E_Otros,S_Almacen,S_Traspaso,S_Otros,Exist_Actual">
<Columns>
<asp:BoundField DataField="Codigo" HeaderText="Grupo" ReadOnly="true" />
<asp:BoundField DataField="Inicial" HeaderText="Inicial" ReadOnly="true" />
<asp:BoundField DataField="E_Almacen" HeaderText="E.Alm" ReadOnly="true" />
<asp:BoundField DataField="E_Pub" HeaderText="E.Alm" ReadOnly="true" />
<asp:BoundField DataField="E_Traspaso" HeaderText="E.Tras" ReadOnly="true" />
<asp:BoundField DataField="E_Compra" HeaderText="E.Compra" ReadOnly="true" />
<asp:BoundField DataField="E_Otros" HeaderText="Otros" ReadOnly="true" />
<asp:BoundField DataField="S_Almacen" HeaderText="E.Alm" ReadOnly="true" />
<asp:BoundField DataField="S_Traspaso" HeaderText="S.Tras" ReadOnly="true" />
<asp:BoundField DataField="S_Otros" HeaderText="Otros" ReadOnly="true" />
<asp:BoundField DataField="Exist_Actual" HeaderText="Exist. Actual" ReadOnly="true" />
<asp:BoundField DataField="Codigo" HeaderText="Grupo" ReadOnly="true" ></asp:BoundField>
<asp:BoundField DataField="Inicial" HeaderText="Inicial" ReadOnly="true" DataFormatString="{0:N0}"><ItemStyle HorizontalAlign="Center"></ItemStyle></asp:BoundField>
<asp:BoundField DataField="E_Almacen" HeaderText="E.Alm" ReadOnly="true" DataFormatString="{0:N0}"><ItemStyle HorizontalAlign="Center"></ItemStyle></asp:BoundField>
<asp:BoundField DataField="E_Pub" HeaderText="E.Alm" ReadOnly="true" DataFormatString="{0:N0}"><ItemStyle HorizontalAlign="Center"></ItemStyle></asp:BoundField>
<asp:BoundField DataField="E_Traspaso" HeaderText="E.Tras" ReadOnly="true" DataFormatString="{0:N0}"><ItemStyle HorizontalAlign="Center"></ItemStyle></asp:BoundField>
<asp:BoundField DataField="E_Compra" HeaderText="E.Compra" ReadOnly="true" DataFormatString="{0:N0}"><ItemStyle HorizontalAlign="Center"></ItemStyle></asp:BoundField>
<asp:BoundField DataField="E_Otros" HeaderText="Otros" ReadOnly="true" DataFormatString="{0:N0}"><ItemStyle HorizontalAlign="Center"></ItemStyle></asp:BoundField>
<asp:BoundField DataField="S_Almacen" HeaderText="E.Alm" ReadOnly="true" DataFormatString="{0:N0}"><ItemStyle HorizontalAlign="Center"></ItemStyle></asp:BoundField>
<asp:BoundField DataField="S_Traspaso" HeaderText="S.Tras" ReadOnly="true" DataFormatString="{0:N0}"><ItemStyle HorizontalAlign="Center"></ItemStyle></asp:BoundField>
<asp:BoundField DataField="S_Otros" HeaderText="Otros" ReadOnly="true" DataFormatString="{0:N0}"><ItemStyle HorizontalAlign="Center"></ItemStyle></asp:BoundField>
<asp:BoundField DataField="Exist_Actual" HeaderText="Exist. Actual" ReadOnly="true" DataFormatString="{0:N0}"><ItemStyle HorizontalAlign="Center"></ItemStyle></asp:BoundField>
</Columns>
</asp:GridView>
</ContentTemplate>

View File

@@ -53,14 +53,15 @@ Partial Class Acumuladores_RepEntradasUsados
Dim params As New List(Of ReportParameter)
params.Add(New ReportParameter("Direccion", "asdfasdfasdf"))
params.Add(New ReportParameter("Direccion", "dirección"))
params.Add(New ReportParameter("FechaConFormato", FechaConFormato))
params.Add(New ReportParameter("FechaInicial", txtFechaI.Text))
params.Add(New ReportParameter("FechaFinal", txtFechaF.Text))
params.Add(New ReportParameter("Sucursal", "Sucursal"))
Dim rds As New ReportDataSource With {.Name = "DataSet1", .Value = DatosEntradasUsados}
ImprimirPDF(String.Format("Empresas/{0}/Formatos/RepEntradasUsados2.rdlc", UsuarioActual.CveEmpresa), DatosEntradasUsados, params, "prueba", "PDF")
ImprimirPDF(String.Format("Empresas/{0}/Formatos/RepEntradasUsados.rdlc", UsuarioActual.CveEmpresa), DatosEntradasUsados, params, "Reporte entrada usados", "PDF")
End Sub
End Class

View File

@@ -5,6 +5,7 @@
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
Reporte Entradas Usados Clientes
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
<asp:UpdatePanel ID="UpAcciones" runat="server" UpdateMode="Conditional">
@@ -75,7 +76,7 @@
<Columns>
<asp:BoundField HeaderText="Tipo" DataField="Codigo"/>
<asp:BoundField HeaderText="Clientes/Grupos" DataField="Codigo_Clientes"/>
<asp:BoundField HeaderText="Cantidad" DataField="Total"/>
<asp:BoundField HeaderText="Cantidad" DataField="Total" DataFormatString="{0:N0}"/>
</Columns>
</asp:GridView>
</ContentTemplate>

View File

@@ -49,7 +49,7 @@ Partial Class Acumuladores_RepEntradasUsadosClientes
Dim Acum As New ClsAcumuladores
If Acum.EntradasUsadosClientesRep(CveAlmacen, FechaI, FechaF, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
GvDatos.DataSource = Acum.DtResultados
GvDatos.DataSource = Acum.DtResultados.FiltraParametros("Codigo_Clientes <> 'Total:'") 'los renglones generados con esta caracteriztica son con un grouping set en la consulta, se pueden quitar
DatosEntradasUsadosClientes = Acum.DtResultados.FiltraParametros("Codigo_Clientes <> 'Total:'")
End If
@@ -61,7 +61,7 @@ Partial Class Acumuladores_RepEntradasUsadosClientes
Protected Sub GvDatos_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvDatos.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then
If e.Row.DBCampo("EsHeader").ToString = "-1" Then
If e.Row.DBCampo("EsHeader").ToString = "-1" Or e.Row.DBCampo("Codigo").ToString = "" Then
e.Row.CssClass = "SubTotales2"
End If

View File

@@ -243,13 +243,14 @@ Public Class ClsPuntoVenta
Return Retorno
End Function
Public Function GetVta_ReporteCortes(CveEmpresa As Integer, FechaI As Date, FechaF As Date) As Boolean
Public Function GetVta_ReporteCortes(CveEmpresa As Integer, FechaI As Date, FechaF As Date, Optional CveSubProyecto As Integer = -1) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Vta_ReporteCortesGet")
SqlAdapter.SelectCommand.Parameters.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
SqlAdapter.SelectCommand.Parameters.Add("@FechaInicio", SqlDbType.Date).Value = FechaI
SqlAdapter.SelectCommand.Parameters.Add("@FechaFin", SqlDbType.Date).Value = FechaF
SqlAdapter.SelectCommand.Parameters.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
Try
SqlAdapter.Fill(Data)

View File

@@ -78,6 +78,13 @@
</div>
<br />
<div class="row">
<div class="col-md-1">
SubProyecto
</div>
<div class="col-md-2">
<asp:DropDownList runat="server" ID="DdlSubProyectos" CssClass="form-control input-sm select2me" DataValueField="CveSubProyecto" DataTextField="SubProyecto" Class="table-group-action-input form-control input-inline input-small input-sm">
</asp:DropDownList>
</div>
<div class="col-md-1">
F.I.:
</div>

View File

@@ -61,6 +61,9 @@ Partial Class Bancos_RepCortes
txtFechaVI.Text = Now.ToShortDateString
txtFechaVF.Text = Now.ToShortDateString
Me.Form.DefaultButton = BtnConsultar.UniqueID
DdlSubProyectos.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa)
DdlSubProyectos.DataBind()
DdlSubProyectos.Items.Insert(0, New ListItem("Todos", "-1"))
End If
End Sub
@@ -70,7 +73,7 @@ Partial Class Bancos_RepCortes
Dim ObjPuntoVenta As New ClsPuntoVenta
Dim FechaI As Date = If(txtFechaVI.Text <> "", txtFechaVI.Text.ToDate, MinFecha)
Dim FechaF As Date = If(txtFechaVF.Text <> "", txtFechaVF.Text.ToDate, MaxFecha)
If ObjPuntoVenta.GetVta_ReporteCortes(UsuarioActual.CveEmpresa, FechaI, FechaF) Then
If ObjPuntoVenta.GetVta_ReporteCortes(UsuarioActual.CveEmpresa, FechaI, FechaF, DdlSubProyectos.SelectedValue.ToEntero) Then
GvDatos.DataSource = ObjPuntoVenta.DtResultados
GvDatos.DataBind()
UPDatos.Update()
@@ -82,7 +85,9 @@ Partial Class Bancos_RepCortes
#Region "G V - D A T O S "
Protected Sub GvDatos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvDatos.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then
If e.Row.DBCampo("CveCorte").ToString = "" Then
e.Row.CssClass = "SubTotales2"
End If
End If
End Sub

View File

@@ -2235,25 +2235,19 @@ Partial Class Compras_Compras
'ASIGNA VALORES ORIGINALES PARA GUARDAR
AsignaValoresOriginales(SubtotalTemp, Subtotal2Temp, IVATemp, RetIVATemp, RetISRTemp, Total)
If UsuarioActual.Empresa.Funcionalidad(577).ToString = "1" Then
If RetencionIVA = 0 And IVAOriginal > 0 Then
For Each dRow As DataRow In TmpDT.Rows
If dRow("CveTipoPS").ToString.ToEntero = 1 Then
tdIVA6.Visible = True
Exit For
End If
Next
If RetencionIVA = 0 And IVAOriginal > 0 Then
For Each dRow As DataRow In TmpDT.Rows
If dRow("CveTipoPS").ToString.ToEntero = 1 Then
tdIVA6.Visible = True
Exit For
End If
Next
End If
End If
End Sub
''' <summary>
@@ -19232,12 +19226,6 @@ Partial Class Compras_Compras
TotalOriginal = TxtTotal.Text.ToDecimal
'For Each dRow As DataRow In TmpDT.Rows
' If dRow("CveTipoPS").ToString.ToEntero = 1 Then
' tdIVA6.Visible = True
' Exit For
' End If
'Next
For Each dRow As DataRow In TmpDT.Rows

View File

@@ -277,9 +277,7 @@
Observaciones:
</label>
<div class="col-md-5">
<asp:TextBox ID="TxtObservaciones" TextMode="MultiLine" Rows="2" CssClass="form-control input-sm" runat="server" MaxLength="232"></asp:TextBox>
<asp:RequiredFieldValidator ID="RFVObs" Display="None" ValidationGroup="GrpGuardar" runat="server" ControlToValidate="TxtObservaciones" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Observaciones''</b> es necesario, por favor seleccione uno."></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCEObs" runat="server" HighlightCssClass="vco" TargetControlID="RFVObs" Width="350px"></ajax:ValidatorCalloutExtender>
<asp:TextBox ID="TxtObservaciones" TextMode="MultiLine" Rows="2" CssClass="form-control input-sm" runat="server" MaxLength="232"></asp:TextBox>
</div>
</div>
<div class="row" id="TrPersonal" runat="server" visible="false">

View File

@@ -6277,6 +6277,7 @@
<div class="form-group form-md-line-input input-iconright col-xs-6">
<asp:TextBox ID="TxtTelefonoCliente" CssClass="form-control " runat="server" MaxLength="10" CausesValidation="true"></asp:TextBox>
<asp:RequiredFieldValidator ID="RFVTelefonoCliente" runat="server" ControlToValidate="TxtTelefonoCliente" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Teléfono''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarCliente"></asp:RequiredFieldValidator>
<asp:RegularExpressionValidator ID="RevTelefonoCliente" runat="server" CssClass="help-block errorimput" ValidationExpression="\d{10}" ControlToValidate="TxtTelefonoCliente" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Teléfono''</b> no es válido, por favor ingrése uno correcto." ValidationGroup="GrpGuardarCliente"></asp:RegularExpressionValidator>
<label for="<%= TxtTelefonoCliente.ClientID.ToString()%>">Teléfono:</label>
</div>
</div>