This commit is contained in:
Antonio Gonzalez
2020-03-11 15:38:36 -07:00
16 changed files with 473 additions and 369 deletions

View File

@@ -1472,7 +1472,7 @@ Public Class ClsInventarios
Return Retorno
End Function
Public Function GetKardexAlmacenHorizontal(CvePS As Integer, FechaFin As Date, CveAlmacen As Integer, CveUnidadMedida As Integer, CveProveedor As Integer, CveTipoAlmacen As Integer, IncluyeTransitorios As Integer, CveClasificacion As Integer, CveUsuario As Integer, CveEmpresa As Integer, Optional CondicionExistencias As Integer = 0, Optional Orden As Integer = -1, Optional CveMarca As Integer = -1) As Boolean
Public Function GetKardexAlmacenHorizontal(CvePS As Integer, FechaFin As Date, CveAlmacen As Integer, CveUnidadMedida As Integer, CveProveedor As Integer, CveTipoAlmacen As Integer, IncluyeTransitorios As Integer, CveClasificacion As Integer, CveUsuario As Integer, CveEmpresa As Integer, Optional CondicionExistencias As Integer = 0, Optional Orden As Integer = -1, Optional Marcas As String = "-1") As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Inv_KardexAlmacenHorizontalGet")
@@ -1491,7 +1491,7 @@ Public Class ClsInventarios
.Add("@CveTipoAlmacen", SqlDbType.Int).Value = CveTipoAlmacen
.Add("@ExistenciasCondicion", SqlDbType.Int).Value = CondicionExistencias
.Add("@Orden", SqlDbType.Int).Value = Orden
.Add("@CveMarca", SqlDbType.Int).Value = CveMarca
.Add("@Marcas", SqlDbType.VarChar).Value = Marcas
End With
Try

View File

@@ -3963,7 +3963,7 @@ Public Class ClsVentas
#End Region
Public Function RepIngresos(CveEmpresa As Integer, FechaInicio As Date, FechaFin As Date, TipoDocto As String, Cves_Subprotectos As String) As Boolean
Public Function RepIngresos(CveEmpresa As Integer, FechaInicio As Date, FechaFin As Date, TipoDocto As String, Cves_Subprotectos As String, Optional TipoCambio As Integer = 1, Optional TCEspecifico As Decimal = -1) As Boolean
Dim retorno As Boolean = False
DataAdapter("PA_Ventas_RepIngresos", CommandType.StoredProcedure)
With SqlAdapter.SelectCommand.Parameters
@@ -3972,6 +3972,8 @@ Public Class ClsVentas
.Add("@TipoDoc", SqlDbType.VarChar).Value = TipoDocto
.Add("@Cves_Subprotectos", SqlDbType.VarChar).Value = Cves_Subprotectos
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@TipoCambio", SqlDbType.Int).Value = TipoCambio
.Add("@TCEspecifico", SqlDbType.Float).Value = TCEspecifico
End With
Try
SqlAdapter.Fill(Data)

View File

@@ -3295,6 +3295,7 @@ Partial Class Bancos_IE
Else
ObjIE.RollBack()
Alert(MsgError, TipoMensaje.MsgAdvertencia)
End If
If Msg.ToString <> "" Then
@@ -3331,6 +3332,7 @@ Partial Class Bancos_IE
End If
End If
Msg.Clear()
RecargaGlobalCuentasBancarias()
ObjIE.Dispose()
ObjMov.Dispose()
@@ -4905,6 +4907,16 @@ Partial Class Bancos_IE
CveEventoPrincipal = ObjOI.CveEvento
End If
If CveEvento = 0 Then
ObjOI.Dispose()
Return "Ocurrió un error al obtener el evento relacionado"
End If
If CveEventoPrincipal = 0 Then
ObjOI.Dispose()
Return "Ocurrió un error al obtener el evento relacionado ppal."
End If
If Not ObjOI.UpdateEstatusEvento(3, -1, CveEvento, UsuarioActual.CveUsuario) Then
ObjOI.Dispose()
Return "Ocurrió un error al actualizar el estatus de anticipo de la OC/REQ. Por favor actualice y vuelva a intentar."

View File

@@ -57,13 +57,6 @@
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
</asp:Content>
<asp:Content ID="Content8" ContentPlaceHolderID="HA" runat="Server">
<%-- <asp:UpdatePanel ID="UpdatePanel1" runat="server" RenderMode="Inline" UpdateMode="Conditional">
<ContentTemplate>
<div class="btn-group pull-right btn-separete">
</div>
</ContentTemplate>
</asp:UpdatePanel>--%>
</asp:Content>
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server" defaultbutton="BtnConsultar">
<asp:UpdatePanel ID="UPFiltros" runat="server" UpdateMode="Conditional">
@@ -74,7 +67,7 @@
<asp:Button ID="BtnConsultar" runat="server" Text="Consultar" class="btn btn-primary" />
<a href="javascript:;" data-idchekbox="<%= chkexpand.ClientID%>" class=" <%= IIf(chkexpand.Checked = True, "collapse", "expand")%>"></a>
<asp:CheckBox ID="chkexpand" CssClass="hidden" runat="server" />
<audio id="audio" src="http://www.soundjay.com/button/beep-07.wav" autostart="false"></audio>
<%-- <audio id="audio" src="http://www.soundjay.com/button/beep-07.wav" autostart="false"></audio>--%>
</div>
<br />
<div class="row">
@@ -121,14 +114,6 @@
</div>
</div>
</div>
<%-- <div class="portlet-body magindate" <%= IIf(chkexpand.Checked = True, "", "style=""display:none;""")%>>
<div class="row">
<div class="col-md-1">Moneda:</div>
<div class="col-md-2">
<asp:DropDownList ID="DdlMoneda" runat="server" CssClass="form-control input-sm select2me" AppendDataBoundItems="true" DataTextField="Moneda" DataValueField="CveMoneda" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 100% !important;" ValidationGroup="GrpGuardar"></asp:DropDownList></td>
</div>
</div>
</div>--%>
</div>
</ContentTemplate>
</asp:UpdatePanel>
@@ -164,8 +149,6 @@
<asp:Literal ID="LtlTotalVentas" runat="server" Text='<%# Eval("VentasCorte", "{0:N2}") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Right">
<HeaderTemplate>
<asp:Label Text="N.C." runat="server" CausesValidation="false"> </asp:Label>
@@ -175,9 +158,6 @@
<asp:Literal ID="LtlNotasCredito" runat="server" Text='<%# Eval("NotasCredito", "{0:N2}") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Right">
<HeaderTemplate>
<asp:Label Text="Ventas Credito" runat="server" CausesValidation="false"> </asp:Label>
@@ -392,10 +372,10 @@
return false;
}
function PlaySound() {
var sound = document.getElementById("audio");
sound.play()
}
//function PlaySound() {
// var sound = document.getElementById("audio");
// sound.play()
//}
function FechaGeneral(lnk, FechaDocumento) {
debugger;

View File

@@ -79,9 +79,9 @@ Partial Class Bancos_RepCortes
UPDatos.Update()
End If
ObjPuntoVenta.Dispose()
End Sub
End Sub
#End Region
#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
@@ -89,30 +89,48 @@ Partial Class Bancos_RepCortes
e.Row.CssClass = "SubTotales2"
End If
End If
End Sub
'Protected Sub GvD_RowCommand(sender As Object, e As GridViewCommandEventArgs) Handles GvD.RowCommand
' If e.CommandArgument.ToString.ToEntero > 0 Then
' End If
' Dim Vent As New ClsPuntoVenta
' If Vent.GetCortesDetalleVentas(16200, 61) Then
' Alert(Vent.DtResultados.Rows.Count.ToString)
' GvD.DataSource = Vent.DtResultados
' GvD.DataBind()
' 'RegistraScript("$get")
' divDetalle.Visible = True
' End If
' Vent.Dispose()
'End Sub
End Sub
Protected Sub GvP_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvP.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then
If e.Row.DBCampo("MetodoPago").ToString = "Total" Then
e.Row.CssClass = "SubTotales"
End If
End If
End Sub
Protected Sub GvD_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvD.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then
If e.Row.DBCampo("CveVenta").ToString = "" Then
e.Row.CssClass = "Totales"
End If
End If
End Sub
'Protected Sub GvD_RowCommand(sender As Object, e As GridViewCommandEventArgs) Handles GvD.RowCommand
' If e.CommandArgument.ToString.ToEntero > 0 Then
' End If
' Dim Vent As New ClsPuntoVenta
' If Vent.GetCortesDetalleVentas(16200, 61) Then
' Alert(Vent.DtResultados.Rows.Count.ToString)
' GvD.DataSource = Vent.DtResultados
' GvD.DataBind()
' 'RegistraScript("$get")
' divDetalle.Visible = True
' End If
' Vent.Dispose()
'End Sub
#End Region
#Region "BOTONES"
Protected Sub BtnConsultar_Click(sender As Object, e As System.EventArgs) Handles BtnConsultar.Click
CargaDatos()
End Sub

View File

@@ -75,9 +75,8 @@
<div class="row text-size-12">
<div class="col-md-1"><span>Proveedor:</span></div>
<div class="col-md-1">
<asp:DropDownList ID="DdlProveedores" runat="server" CssClass="select2me" AppendDataBoundItems="true" DataTextField="RazonSocial" DataValueField="CveProveedor" Width="100%">
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
</asp:DropDownList>
<ADS:Dropdownlost runat="server" ID="DdlProveedores" CssStyle="width: 100%;" Width="100%" CssClassDdl="select2me " DataTextField="RazonSocial" DataValueField="CveProveedor">
</ADS:Dropdownlost>
</div>
<div class="col-md-1"><span>Clasificaciones:</span></div>
<div class="col-md-1">
@@ -395,7 +394,7 @@
<td style="text-align: left;">
<asp:CheckBox ID="ChkFolio" runat="server" Text="Folio" Checked="true" /></td>
<td style="text-align: left;">
<asp:CheckBox ID="ChkSubTotal" runat="server" Text="SubTotal" Checked="true" /></td>
<asp:CheckBox ID="ChkSubTotal" runat="server" Text="SubTotal" Checked="false" /></td>
<td style="text-align: left;">
<asp:CheckBox ID="ChkProveedor" runat="server" Text="Proveedor" Checked="true" /></td>
</tr>
@@ -423,7 +422,7 @@
<td style="text-align: left;">
<asp:CheckBox ID="ChkFechaVencimiento" runat="server" Text="Fecha Venc." Checked="true" /></td>
<td style="text-align: left;">
<asp:CheckBox ID="ChkTotal" runat="server" Text="Total" Checked="false" /></td>
<asp:CheckBox ID="ChkTotal" runat="server" Text="Total" Checked="true" /></td>
</tr>
</table>
</td>

View File

@@ -234,12 +234,18 @@ Partial Class RepCxPDetalle
#Region "CARGAS"
Private Sub CargaCombos()
DdlProveedores.DataSource = GlobalDTCompProveedores(UsuarioActual.CveEmpresa)
DdlProveedores.DataBind()
Dim Proveedor As Integer = IfNull(Request("CveProveedor"), -1).ToString.ToEntero
CargaProveedores()
Dim CveProveedor As Integer = IfNull(Request("CveProveedor"), -1).ToString.ToEntero
DdlProveedores.SelectedValue = CveProveedor
Me.CveProveedor = CveProveedor
If DdlProveedores.SelectedValue.ToEntero > 0 Then
DdlProveedores.SelectedText = GlobalDTCompProveedores(UsuarioActual.CveEmpresa).FiltraParametros($"CveProveedor = {CveProveedor}").Rows(0)("RazonSocial").ToString
Else
DdlProveedores.SelectedText = "-"
End If
DdlProveedores.SelectedValueExist(Proveedor)
CveProveedor = Proveedor
CveProveedorClasificacion = IfNull(Request("CveProveedorClasificacion"), -1).ToString.ToEntero
Dim ProveedorClasificacion As Integer = IfNull(Request("CveProveedorClasificacion"), -1).ToString.ToEntero
@@ -447,12 +453,26 @@ Partial Class RepCxPDetalle
'End If
'End If
'ObjEmpresa.Dispose()
End Sub
End Sub
#End Region
Private Sub CargaProveedores()
If UsuarioActual.Empresa.Funcionalidad(105) = "1" Then
DdlProveedores.setEsWebService(True)
DdlProveedores.Attributes.Add("data-metodo", "getproveedores")
DdlProveedores.SelectedText = "Seleccione"
DdlProveedores.SelectedValue = "-1"
Else
DdlProveedores.DataSource = GlobalDTCompProveedores(UsuarioActual.CveEmpresa)
DdlProveedores.DataBind()
DdlProveedores.ddl.Items.Insert(0, New ListItem("Seleccione", "-1"))
End If
End Sub
#Region "GRIDVIEW"
Protected Sub GvDatos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvDatos.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then
@@ -659,7 +679,7 @@ Partial Class RepCxPDetalle
params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString))
'PARA REPORTE
Dim Sucursal = If(DdlSubProyecto.SelectedValue = "-1", "", $"&emsp;<b>Sucursal:</b> {DdlSubProyecto.SelectedItem.Text}")
Dim Proveedor = If(DdlProveedores.SelectedValue = "-1", "", $"&emsp;<b>Proveedor:</b> {DdlProveedores.SelectedItem.Text}")
Dim Proveedor = If(DdlProveedores.SelectedValue = "-1", "", $"&emsp;<b>Proveedor:</b> {DdlProveedores.SelectedText}")
Dim Grupo = If(DdlGrupo.SelectedValue = "-1", "", $"&emsp;<b>Grupo:</b> {DdlGrupo.SelectedItem.Text}")
Dim FechaIn As String = If(txtFechaI.Text = "", "", $"&emsp;<b>Fecha Inicio:</b> {txtFechaI.Text}")
Dim FechaFn As String = If(txtFechaF.Text = "", "", $"&emsp;<b>Fecha Fin:</b> {txtFechaF.Text}")

View File

@@ -550,11 +550,9 @@
</table>
<hr style="border: 0; height: 1px; background-image: linear-gradient(to right, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0));" />
<asp:GridView ID="GVPDocumentosRelacionadosPagos" runat="server" GridLines="None" CssClass="table table-hover table-striped ScrollAD mysmallbtn"
DataKeyNames="CveFactura,CveCompra,CveIE"
DataKeyNames="CveFactura,CveCompra,CveIE,Fecha,FechaPago"
data-sort="true" Width="100%" EmptyDataText="No se encontró registros con la información del complemento de pago"
ShowHeaderWhenEmpty="true" AutoGenerateColumns="False">
<Columns>

View File

@@ -2838,24 +2838,21 @@ Partial Class Compras_eFacturas
BtnVincularPago.Visible = False
End If
For Each GvRowF As GridViewRow In GVPDocumentosRelacionadosPagos.Rows
For Each drow As DataRow In ObjCompras.DtResultados.FiltraParametros("CveIE > 0 AND FechaDocumento IS NOT NULL", "", {"FechaDocumento"}).Rows
Dim FechaDocumento As Date = drow("FechaDocumento").ToString.ToDate
Dim FechaDocumento As Date = GvRowF.DataKey("FechaPago").ToString.ToDate
Dim FechaDoRecibo As Date = GvRowF.DataKey("Fecha").ToString.ToDate
Dim FT1 As Date = FechaDocumento.AddDays(-6)
Dim FT2 As Date = FechaDocumento.AddDays(7)
If Not (FechaPago >= FT1 And FechaPago < FT2) Then
If Not (FechaDoRecibo >= FT1 And FechaDoRecibo < FT2) Then
BtnVincularPago.Visible = False
MSGComplemento = MSGComplemento & " Existen mas de 3 días de diferencia entre la fecha del documento y la fecha de complemento. "
Exit For
End If
Next
If MSGComplemento.Trim.Length > 0 Then

View File

@@ -213,7 +213,7 @@ Partial Class AC2_RepAnexoCatalogo
CargaGrid()
Else
DtDatos = Nothing
Alert("Ocurrio un error al cargar los datos del Anexo del Catálogo", TipoMensaje.MsgError)
Alert("Ocurrio un error al cargar los datos del Anexo del Catálogo.", TipoMensaje.MsgError)
End If
ObjConta.Dispose()

View File

@@ -629,7 +629,7 @@ Partial Class Inventarios_EntradasSalidas
End If
If (DdlAlmacen.Items.FindByValue(Mov.CveAlmacen.ToString()) Is Nothing) Then
Dim dr As DataRow = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimero(String.Format("CveAlmacen = {0}", Mov.CveAlmacen))
Dim dr As DataRow = GlobalDTAlmacen(UsuarioActual.CveEmpresa, CveEstatus:=-1).FiltroPrimero(String.Format("CveAlmacen = {0}", Mov.CveAlmacen))
If dr IsNot Nothing Then
DdlAlmacen.Items.Insert(0, New ListItem(dr("Almacen").ToString, dr("CveAlmacen").ToString)) ' lo genera Obj.SelectedValue = Valor.ToString
DdlAlmacen.Enabled = False

View File

@@ -1,254 +1,256 @@
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="KardexAlmacenHorizontal.aspx.vb" Inherits="Inventarios_KardexAlmacen" %>
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
<style>
.dataTables_scrollHead {
background-color: #95A5A6;
color: white;
}
.dataTables_scrollBody table th {
padding: 0px !important;
padding-right: 4px !important;
padding-left: 4px !important;
}
.table-scrollable {
margin: 0px !important;
}
.dataTables_scrollFoot {
display: none;
}
.dataTables_scroll {
margin-bottom: 0px;
}
.table.dataTable {
margin-top: 0px !important;
}
.table table-striped table-hover dataTable no-footer {
margin-top: 0px !important;
}
.Excede {
overflow: hidden;
text-overflow: ellipsis;
}
.psagregar > div.comboxes {
display: inline-block;
width: 250px;
}
.psagregar > div.codigo input {
width: 79px;
}
.psagregar > div.codigo {
display: inline-block;
width: 80px;
}
.psagregar > div.codigo > input[type="submit"] {
display: none;
}
@media (min-width: 991px) {
.textfilter {
max-width: 80px;
}
.textfilter2 {
max-width: 70px;
}
.dateFilter {
min-width: 115px;
}
}
@media (min-width: 991px) and (max-width: 1400px) {
.titlefiltrosmedia .col-md-3 {
width: 22%;
}
}
</style>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
Kardex Almacén Horizontal
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
<li>
<asp:LinkButton ID="LnkExportar" runat="server"><i class="fa fa-ad-excel"></i> Generar Excel</asp:LinkButton>
</li>
</asp:Content>
<asp:Content ID="Content6" ContentPlaceHolderID="HA" runat="Server">
</asp:Content>
<asp:Content ID="Content7" ContentPlaceHolderID="C" runat="Server">
<asp:UpdatePanel ID="UPFiltros" runat="server" UpdateMode="Conditional" RenderMode="Inline">
<ContentTemplate>
<div class="portlet solid grey-cascade portlet-filter">
<div class="portlet-title portlet-filterT smalltitle" style="min-height: 49px; position: relative;">
<div class="tools">
<asp:Button ID="btConsultar" runat="server" Text="Consultar" class="btn btn-primary" />
<a href="javascript;" data-idchekbox="<%= chkexpand.ClientID%>" class=" <%= IIf(chkexpand.Checked = True, "collapse", "expand")%>"></a>
<asp:CheckBox ID="chkexpand" CssClass="hidden" runat="server" />
</div>
<div class="titlefiltros titlefiltrosmedia caption ">
<div class="row" style="padding-top: 10px; position: relative;">
<div class="col-md-1 truncate textfilter">Proveedor</div>
<div class="col-md-2">
<ADS:Dropdownlost ID="DdlProveedor" runat="server" DataValueField="CveProveedor" DataTextField="RazonSocial" Width="100%" CssClassDdl="select2me" CssStyle="width: 100%;"></ADS:Dropdownlost>
</div>
<label class="col-md-1 truncate textfilter2">Producto:</label>
<div class="col-md-2">
<ADS:Dropdownlost ID="ddlProducto2" runat="server" AutoPostBack="False" DataTextField="PSCodigo" DataValueField="CvePS" CssClassDdl="select2me" Width="100%" CssStyle="width: 100%; "></ADS:Dropdownlost>
</div>
<div class="col-md-2">
<div class="row">
<label class="col-md-2 truncate">Marca:</label>
<div class="col-md-10">
<asp:DropDownList ID="DdlMarca" runat="server" CssClass="select2me " Style="width: 100px !important;" DataTextField="Marca" DataValueField="CveMarca">
<asp:ListItem Text="Todas" Value="-1"></asp:ListItem>
</asp:DropDownList>
</div>
</div>
</div>
<label class="col-md-1 textfilter">Fecha Fin:</label>
<div class="col-md-1" style="min-width: 110px;">
<div style="display: inline-block; vertical-align: text-bottom;">
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 110px !important; padding: 0px;">
<asp:TextBox ID="TxtFechaF" runat="server" CssClass="form-control" CausesValidation="true" Style="width: 80px" MaxLength="10"></asp:TextBox>
<span class="input-group-btn ">
<asp:LinkButton ID="ImgFechaF" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
</span>
</div>
<ajax:MaskedEditExtender ID="MEEFechaF" runat="server" TargetControlID="TxtFechaF" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender runat="server" ID="CalendarExtender1" TargetControlID="TxtFechaF" PopupButtonID="ImgFechaF" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
</div>
</div>
<label class="col-md-1 truncate textfilter2">Producto:</label>
<div class="col-md-1">
<asp:DropDownList ID="DdlExistencia" runat="server" CssClass="select2me">
<asp:ListItem Text="Con existencia" Value="2" />
<asp:ListItem Text="Sin existencia" Value="3" />
</asp:DropDownList>
</div>
</div>
</div>
</div>
<div class="portlet-body" <%= IIf(chkexpand.Checked = True, "", "style=""display:none;""")%>>
<div class="row">
<label class="col-md-1 truncate">Clasificación:</label>
<div class="col-md-2">
<asp:DropDownList ID="DdlClasificacion" CssClass="select2me" runat="server" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="Clasificacion" DataValueField="CveClasificacion" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 150px !important;">
<asp:ListItem Selected="True" Text="Seleccione la Clasificación (Todas)" Value="-1"></asp:ListItem>
</asp:DropDownList>
</div>
<label class="col-md-1 truncate">Unidad Medida:</label>
<div class="col-md-1">
<asp:DropDownList ID="DdlUnidadMedida" runat="server" CssClass="select2me " Style="width: 100px !important;" DataTextField="UnidadMedida" DataValueField="CveUnidadMedida">
<asp:ListItem Text="Todos" Value="-1"></asp:ListItem>
</asp:DropDownList>
</div>
<label class="col-md-1 truncate">Almacén:</label>
<div class="col-md-2">
<asp:DropDownList ID="ddlAlmacen" runat="server" CssClass="select2me " Style="width: 200px !important;" DataTextField="Almacen" DataValueField="CveAlmacen"></asp:DropDownList>
</div>
<label class="col-md-1 truncate">Tipo Almacen:</label>
<div class="col-md-1">
<asp:DropDownList ID="DdlTipoAlmacen" CssClass="select2me" runat="server" AppendDataBoundItems="true" DataTextField="TipoAlmacen" DataValueField="CveTipoAlmacen" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 100px !important;">
<asp:ListItem Selected="True" Text="Seleccione el tipo de Almacen (Todos)" Value="-1"></asp:ListItem>
</asp:DropDownList>
</div>
<label class="col-md-1 truncate">Tránsito?:</label>
<div class="col-md-1">
<asp:DropDownList ID="DdlIncluyeTransitorios" CssClass="select2me" runat="server" AppendDataBoundItems="true" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 100px !important;">
<asp:ListItem Text="No" Value="0" Selected="True"></asp:ListItem>
<asp:ListItem Text="Si (Origen)" Value="1"></asp:ListItem>
<asp:ListItem Text="Si (Destino)" Value="2"></asp:ListItem>
</asp:DropDownList>
<%--<asp:CheckBox ID="ChkIncluyeTransitorios" runat="server" Checked="false" />--%>
</div>
</div>
<asp:Panel ID="pnlOrden" runat="server" CssClass="row">
<label class="col-md-1 truncate">Orden:</label>
<div class="col-md-2">
<asp:DropDownList ID="DdlOrden" runat="server" CssClass="select2me" Width="100%">
<asp:ListItem Text="Seleccione" Value="-1" Selected="True" />
<asp:ListItem Text="Marca,Modelo,Rin,Medida de Barrenación" Value="1" />
<asp:ListItem Text="Familia,Marca,Rin,Medida de Barrenación" Value="2" />
<asp:ListItem Text="Familia,Linea,Rin,Medida de Barrenación" Value="3" />
</asp:DropDownList>
</div>
</asp:Panel>
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
<div class="text-right">
<input type="text" id="TxtBusqueda2" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda2','{0}')", GvDatos.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda2','{0}')", GvDatos.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
</div>
<table class="Widthall ScrollAD">
<tr style="width: 100%">
<td style="padding: 0px;">
<table class="table Widthall">
<tr>
</tr>
</table>
</td>
</tr>
<tr>
<td style="padding: 0px">
<asp:UpdatePanel ID="UpDatos" runat="server">
<ContentTemplate>
<asp:GridView ID="GvDatos" runat="server" ShowHeader="true" EmptyDataText="No hay registros." AutoGenerateColumns="True"
ShowFooter="True" ShowHeaderWhenEmpty="True" HeaderStyle-CssClass="Texto" CssClass="table table-striped table-hover Widthall ScrollAD" data-sort="true" GridLines="None">
<Columns>
<asp:TemplateField ItemStyle-HorizontalAlign="Left">
<HeaderTemplate>
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="KardexAlmacenHorizontal.aspx.vb" Inherits="Inventarios_KardexAlmacen" %>
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
<style>
.dataTables_scrollHead {
background-color: #95A5A6;
color: white;
}
.dataTables_scrollBody table th {
padding: 0px !important;
padding-right: 4px !important;
padding-left: 4px !important;
}
.table-scrollable {
margin: 0px !important;
}
.dataTables_scrollFoot {
display: none;
}
.dataTables_scroll {
margin-bottom: 0px;
}
.table.dataTable {
margin-top: 0px !important;
}
.table table-striped table-hover dataTable no-footer {
margin-top: 0px !important;
}
.Excede {
overflow: hidden;
text-overflow: ellipsis;
}
.psagregar > div.comboxes {
display: inline-block;
width: 250px;
}
.psagregar > div.codigo input {
width: 79px;
}
.psagregar > div.codigo {
display: inline-block;
width: 80px;
}
.psagregar > div.codigo > input[type="submit"] {
display: none;
}
@media (min-width: 991px) {
.textfilter {
max-width: 80px;
}
.textfilter2 {
max-width: 70px;
}
.dateFilter {
min-width: 115px;
}
}
@media (min-width: 991px) and (max-width: 1400px) {
.titlefiltrosmedia .col-md-3 {
width: 22%;
}
}
</style>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
Kardex Almacén Horizontal
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
<li>
<asp:LinkButton ID="LnkExportar" runat="server"><i class="fa fa-ad-excel"></i> Generar Excel</asp:LinkButton>
</li>
</asp:Content>
<asp:Content ID="Content6" ContentPlaceHolderID="HA" runat="Server">
</asp:Content>
<asp:Content ID="Content7" ContentPlaceHolderID="C" runat="Server">
<asp:UpdatePanel ID="UPFiltros" runat="server" UpdateMode="Conditional" RenderMode="Inline">
<ContentTemplate>
<div class="portlet solid grey-cascade portlet-filter">
<div class="portlet-title portlet-filterT smalltitle" style="min-height: 49px; position: relative;">
<div class="tools">
<asp:Button ID="btConsultar" runat="server" Text="Consultar" class="btn btn-primary" />
<a href="javascript;" data-idchekbox="<%= chkexpand.ClientID%>" class=" <%= IIf(chkexpand.Checked = True, "collapse", "expand")%>"></a>
<asp:CheckBox ID="chkexpand" CssClass="hidden" runat="server" />
</div>
<div class="titlefiltros titlefiltrosmedia caption ">
<div class="row" style="padding-top: 10px; position: relative;">
<div class="col-md-1 truncate textfilter">Proveedor</div>
<div class="col-md-2">
<ADS:Dropdownlost ID="DdlProveedor" runat="server" DataValueField="CveProveedor" DataTextField="RazonSocial" Width="100%" CssClassDdl="select2me" CssStyle="width: 100%;"></ADS:Dropdownlost>
</div>
<label class="col-md-1 truncate textfilter2">Producto:</label>
<div class="col-md-2">
<ADS:Dropdownlost ID="ddlProducto2" runat="server" AutoPostBack="False" DataTextField="PSCodigo" DataValueField="CvePS" CssClassDdl="select2me" Width="100%" CssStyle="width: 100%; "></ADS:Dropdownlost>
</div>
<label class="col-md-1 textfilter">Fecha Fin:</label>
<div class="col-md-1" style="min-width: 110px;">
<div style="display: inline-block; vertical-align: text-bottom;">
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 110px !important; padding: 0px;">
<asp:TextBox ID="TxtFechaF" runat="server" CssClass="form-control" CausesValidation="true" Style="width: 80px" MaxLength="10"></asp:TextBox>
<span class="input-group-btn ">
<asp:LinkButton ID="ImgFechaF" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
</span>
</div>
<ajax:MaskedEditExtender ID="MEEFechaF" runat="server" TargetControlID="TxtFechaF" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender runat="server" ID="CalendarExtender1" TargetControlID="TxtFechaF" PopupButtonID="ImgFechaF" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
</div>
</div>
<label class="col-md-1 truncate">Producto:</label>
<div class="col-md-2">
<asp:DropDownList ID="DdlExistencia" runat="server" CssClass="select2me" Width="100%" CssStyle="width: 100%;">
<asp:ListItem Text="Con existencia" Value="2" />
<asp:ListItem Text="Sin existencia" Value="3" />
</asp:DropDownList>
</div>
</div>
</div>
</div>
<div class="portlet-body" <%= IIf(chkexpand.Checked = True, "", "style=""display:none;""")%>>
<div class="row">
<label class="col-md-1 truncate">Clasificación:</label>
<div class="col-md-2">
<asp:DropDownList ID="DdlClasificacion" CssClass="select2me" runat="server" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="Clasificacion" DataValueField="CveClasificacion" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 150px !important;">
<asp:ListItem Selected="True" Text="Seleccione la Clasificación (Todas)" Value="-1"></asp:ListItem>
</asp:DropDownList>
</div>
<label class="col-md-1 truncate">Unidad Medida:</label>
<div class="col-md-1">
<asp:DropDownList ID="DdlUnidadMedida" runat="server" CssClass="select2me " Style="width: 100px !important;" DataTextField="UnidadMedida" DataValueField="CveUnidadMedida">
<asp:ListItem Text="Todos" Value="-1"></asp:ListItem>
</asp:DropDownList>
</div>
<label class="col-md-1 truncate">Almacén:</label>
<div class="col-md-2">
<asp:DropDownList ID="ddlAlmacen" runat="server" CssClass="select2me " Style="width: 200px !important;" DataTextField="Almacen" DataValueField="CveAlmacen"></asp:DropDownList>
</div>
<label class="col-md-1 truncate">Tipo Almacen:</label>
<div class="col-md-1">
<asp:DropDownList ID="DdlTipoAlmacen" CssClass="select2me" runat="server" AppendDataBoundItems="true" DataTextField="TipoAlmacen" DataValueField="CveTipoAlmacen" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 100px !important;">
<asp:ListItem Selected="True" Text="Seleccione el tipo de Almacen (Todos)" Value="-1"></asp:ListItem>
</asp:DropDownList>
</div>
<label class="col-md-1 truncate">Tránsito?:</label>
<div class="col-md-1">
<asp:DropDownList ID="DdlIncluyeTransitorios" CssClass="select2me" runat="server" AppendDataBoundItems="true" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 100px !important;">
<asp:ListItem Text="No" Value="0" Selected="True"></asp:ListItem>
<asp:ListItem Text="Si (Origen)" Value="1"></asp:ListItem>
<asp:ListItem Text="Si (Destino)" Value="2"></asp:ListItem>
</asp:DropDownList>
<%--<asp:CheckBox ID="ChkIncluyeTransitorios" runat="server" Checked="false" />--%>
</div>
</div>
<asp:Panel ID="pnlOrden" runat="server" CssClass="row">
<label class="col-md-1 truncate">Orden:</label>
<div class="col-md-2">
<asp:DropDownList ID="DdlOrden" runat="server" CssClass="select2me" Width="100%">
<asp:ListItem Text="Seleccione" Value="-1" Selected="True" />
<asp:ListItem Text="Marca,Modelo,Rin,Medida de Barrenación" Value="1" />
<asp:ListItem Text="Familia,Marca,Rin,Medida de Barrenación" Value="2" />
<asp:ListItem Text="Familia,Linea,Rin,Medida de Barrenación" Value="3" />
</asp:DropDownList>
</div>
<div class="col-md-3">
<div class="row">
<label class="col-md-3 truncate">Marca:</label>
<div class="col-md-9">
<asp:ListBox ID="DdlMarca" runat="server" DataTextField="Marca" DataValueField="CveMarca" data-text="Todos" SelectionMode="Multiple" CssClass="form-control ddlFiltros input-sm select2me Widthall" Style="width: 100%; height:50px !important;">
<asp:ListItem Text="Todas" Value="-1"></asp:ListItem>
</asp:ListBox>
</div>
</div>
</div>
</asp:Panel>
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
<div class="text-right">
<input type="text" id="TxtBusqueda2" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda2','{0}')", GvDatos.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda2','{0}')", GvDatos.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
</div>
<table class="Widthall ScrollAD">
<tr style="width: 100%">
<td style="padding: 0px;">
<table class="table Widthall">
<tr>
</tr>
</table>
</td>
</tr>
<tr>
<td style="padding: 0px">
<asp:UpdatePanel ID="UpDatos" runat="server">
<ContentTemplate>
<asp:GridView ID="GvDatos" runat="server" ShowHeader="true" EmptyDataText="No hay registros." AutoGenerateColumns="True"
ShowFooter="True" ShowHeaderWhenEmpty="True" HeaderStyle-CssClass="Texto" CssClass="table table-striped table-hover Widthall ScrollAD" data-sort="true" GridLines="None">
<Columns>
<asp:TemplateField ItemStyle-HorizontalAlign="Left">
<HeaderTemplate>
Código
</HeaderTemplate>
<ItemTemplate>
<div class='truncate' style='width: 200px;'>
<asp:Label runat="server" Text='<%# Eval("Codigo") %>' Width="100px"></asp:Label>
</div>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Left">
<HeaderTemplate>
</HeaderTemplate>
<ItemTemplate>
<div class='truncate' style='width: 200px;'>
<asp:Label runat="server" Text='<%# Eval("Codigo") %>' Width="100px"></asp:Label>
</div>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Left">
<HeaderTemplate>
Producto
</HeaderTemplate>
<ItemTemplate>
<div class='truncate' style='width: 200px;'>
<asp:Label runat="server" Text='<%# Eval("PS") %>' Width="250px"></asp:Label>
</div>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
</ContentTemplate>
</asp:UpdatePanel>
</td>
</tr>
</table>
</asp:Content>
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
</asp:Content>
</HeaderTemplate>
<ItemTemplate>
<div class='truncate' style='width: 200px;'>
<asp:Label runat="server" Text='<%# Eval("PS") %>' Width="250px"></asp:Label>
</div>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
</ContentTemplate>
</asp:UpdatePanel>
</td>
</tr>
</table>
</asp:Content>
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
</asp:Content>

View File

@@ -22,9 +22,6 @@ Partial Class Inventarios_KardexAlmacen
ddlProducto2.SelectedValue = If(Request("CvePS") IsNot Nothing, Request("CvePS").ToString, "-1")
End If
End Sub
Private Function isWithFamily() As Boolean
Return (UsuarioActual.CveEmpresa = 66)
End Function
Private Sub CargaCombos()
CargaFuncionalidad105()
@@ -55,25 +52,21 @@ Partial Class Inventarios_KardexAlmacen
End Sub
Private Sub CargaClasificaciones()
Dim CveClasificacion = If(Request("CveClasificacion") IsNot Nothing, Request("CveClasificacion").ToString, "-1")
If isWithFamily() Then
DdlClasificacion.DataSource = GlobalDTSubFamilias(UsuarioActual.CveEmpresa).FiltraParametros("", Orderby:="Clasificacion")
Else
Dim ObjClasificaciones As New ClsClasificaciones
If UsuarioActual.Empresa.UsaAC Then
If ObjClasificaciones.GetClasificacionesExistencias(UsuarioActual.CveEmpresa) Then
DdlClasificacion.DataSource = ObjClasificaciones.DtResultados
DdlClasificacion.DataBind()
End If
Else
If ObjClasificaciones.GetClasificacionesExistencias(UsuarioActual.CveEmpresa) Then
DdlClasificacion.DataSource = ObjClasificaciones.DtResultados
DdlClasificacion.DataBind()
End If
End If
ObjClasificaciones.Dispose()
End If
Dim CveClasificacion = If(Request("CveClasificacion") IsNot Nothing, Request("CveClasificacion").ToString, "-1")
Dim ObjClasificaciones As New ClsClasificaciones
If UsuarioActual.Empresa.UsaAC Then
If ObjClasificaciones.GetClasificacionesExistencias(UsuarioActual.CveEmpresa) Then
DdlClasificacion.DataSource = ObjClasificaciones.DtResultados
DdlClasificacion.DataBind()
End If
Else
If ObjClasificaciones.GetClasificacionesExistencias(UsuarioActual.CveEmpresa) Then
DdlClasificacion.DataSource = ObjClasificaciones.DtResultados
DdlClasificacion.DataBind()
End If
End If
ObjClasificaciones.Dispose()
DdlClasificacion.DataBind()
DdlClasificacion.SelectedValueExist(CveClasificacion)
@@ -139,8 +132,9 @@ Partial Class Inventarios_KardexAlmacen
Dim FechaF As Date = TxtFechaF.Text.ToDate
Dim CveAlmacen As Integer = ddlAlmacen.SelectedValue.ToEntero
Dim CveProveedorCompra As Integer = If(DdlProveedor.SelectedValue.ToEntero > 0, DdlProveedor.SelectedValue.ToEntero, -1)
Dim Marcas As String = If(DdlMarca.GetSelectedValuesM = "", "-1", DdlMarca.GetSelectedValuesM)
If ObjMovimientos.GetKardexAlmacenHorizontal(CvePS, FechaF, CveAlmacen, DdlUnidadMedida.SelectedValue.ToEntero, CveProveedorCompra, DdlTipoAlmacen.SelectedValue.ToEntero(), DdlIncluyeTransitorios.SelectedValue.ToEntero(), DdlClasificacion.SelectedValue.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CondicionExistencias:=DdlExistencia.SelectedValue, Orden:=DdlOrden.SelectedValue.ToEntero(), CveMarca:=DdlMarca.SelectedValue.ToEntero()) Then
If ObjMovimientos.GetKardexAlmacenHorizontal(CvePS, FechaF, CveAlmacen, DdlUnidadMedida.SelectedValue.ToEntero, CveProveedorCompra, DdlTipoAlmacen.SelectedValue.ToEntero(), DdlIncluyeTransitorios.SelectedValue.ToEntero(), DdlClasificacion.SelectedValue.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CondicionExistencias:=DdlExistencia.SelectedValue, Orden:=DdlOrden.SelectedValue.ToEntero(), Marcas:=Marcas) Then
If ObjMovimientos.DtResultados IsNot Nothing AndAlso ObjMovimientos.DtResultados.Rows.Count > 0 Then
dt = ObjMovimientos.DtResultados
Dim ListaBorrar As New List(Of DataColumn)

View File

@@ -68,6 +68,9 @@
<li>
<asp:LinkButton ID="LnkExcel" OnClick="LnkExcel_Click" runat="server"><i class="fa fa-file-excel-o" style="font-weight:bold;"></i> Excel</asp:LinkButton>
</li>
<li>
<asp:HyperLink NavigateUrl="javascript:;" data-toggle="modal" data-target="#DivTipoCambio" ID="ImgTipoCambio" runat="server"> <i class="fa fa-money"></i> Ver Dlls en pesos</asp:HyperLink>
</li>
</ContentTemplate>
<Triggers>
<asp:PostBackTrigger ControlID="LnkPDF" />
@@ -122,11 +125,11 @@
<asp:Label runat="server" Text="Tipo" AssociatedControlID="DdlTipoDocto"></asp:Label>
</div>
<div class="col-md-2">
<div class="col-md-2">
<asp:ListBox ID="DdlTipoDocto" data-text="Todos" SelectionMode="Multiple" CssClass="form-control ddlFiltros input-sm select2me Widthall" Style="width: 100%;" runat="server">
<asp:ListItem Text="Todos" Value="-1"></asp:ListItem>
<asp:ListItem Text="Todos" Value="-1"></asp:ListItem>
<asp:ListItem Value="Ant" Text="Anticipos"></asp:ListItem>
<asp:ListItem Value="Dev" Text="Devolución"></asp:ListItem>
<asp:ListItem Value="Egs" Text="Egresos"></asp:ListItem>
@@ -134,14 +137,13 @@
</asp:ListBox>
<%-- <asp:DropDownList ID="DdlTipoDocto" runat="server" AppendDataBoundItems="true" CssClass="form-control input-small input-sm select2me" Width="100%">
<%-- <asp:DropDownList ID="DdlTipoDocto" runat="server" AppendDataBoundItems="true" CssClass="form-control input-small input-sm select2me" Width="100%">
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
<asp:ListItem Value="Ant" Text="Anticipos"></asp:ListItem>
<asp:ListItem Value="Dev" Text="Devolución"></asp:ListItem>
<asp:ListItem Value="Egs" Text="Egresos"></asp:ListItem>
<asp:ListItem Value="Ing" Text="Ingresos"></asp:ListItem>
</asp:DropDownList>--%>
</div>
<div class="col-md-1 lbltitle ">
<asp:Label runat="server" Text="Sub Proyecto" AssociatedControlID="DdlSubProyecto"></asp:Label>
@@ -162,7 +164,7 @@
<asp:GridView ID="GVRepIngresos" runat="server" GridLines="None" CssClass="table table-hover table-striped GVRepIngresos ScrollAD Widthall" AutoGenerateColumns="False"
DataKeyNames="Importe,Descuento,Amortizacion,IVA,IEPS,ImpuestoLocal,Total" OnRowDataBound="GVRepIngresos_RowDataBound" >
DataKeyNames="Importe,Descuento,Amortizacion,IVA,IEPS,ImpuestoLocal,Total" OnRowDataBound="GVRepIngresos_RowDataBound">
<Columns>
<asp:TemplateField HeaderText="Titulo">
<ItemTemplate>
@@ -208,6 +210,42 @@
</asp:GridView>
</ContentTemplate>
</asp:UpdatePanel>
<asp:UpdatePanel runat="server" ID="UpTipoCambio" UpdateMode="Conditional">
<ContentTemplate>
<div id="DivTipoCambio" class="modal fade" role="dialog">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">&times;</button>
<h4 class="modal-title">
<asp:Label ID="Label2" runat="server" ClientIDMode="Static" Text="Cambiar Tipo Cambio de Dólares"></asp:Label>
</h4>
</div>
<div class="modal-body">
<asp:UpdatePanel runat="server" ID="UpBodyTipoCambio" UpdateMode="Conditional">
<ContentTemplate>
<asp:RadioButtonList runat="server" ID="RblTipoCambio" AutoPostBack="true">
<asp:ListItem Selected="true" Text="Moneda Original" Value="1"></asp:ListItem>
<asp:ListItem Text="Dólares en Tipo Cambio de la Fecha Venta" Value="2"></asp:ListItem>
<%--<asp:ListItem Text="Tipo Cambio Especifico" Value="3"></asp:ListItem>--%>
</asp:RadioButtonList>
<div class="row" style="margin-left: 10px;" runat="server" id="LiEspecifico" visible="false">
Especifico:
<asp:TextBox ID="TxtEspecifico" runat="server" Width="55px" />
</div>
</ContentTemplate>
</asp:UpdatePanel>
</div>
<div class="modal-footer">
<asp:Button ID="BtnTipoCambio" runat="server" Text="Aceptar" class="btn btn-primary" />
<button type="button" class="btn btn-default" data-dismiss="modal">Cancelar</button>
</div>
</div>
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</asp:Content>
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
</asp:Content>

View File

@@ -70,10 +70,31 @@ Partial Class Ventas_RepIngresos
ViewState("DtDatos") = value
End Set
End Property
Private Property TipoCambio As Integer
Get
Return ViewState("TipoCambio").ToString.ToEntero
End Get
Set(value As Integer)
ViewState("TipoCambio") = value
End Set
End Property
Private Property TCEspecifico As Decimal
Get
Return ViewState("TCEspecifico").ToString.ToDecimal
End Get
Set(value As Decimal)
ViewState("TCEspecifico") = value
End Set
End Property
#End Region
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
If Not IsPostBack Then
TCEspecifico = -1
TipoCambio = 1
CveSubProyecto = -1
TxtFechaInicio.Text = String.Format("01/01/{0}", Now.Year)
DdlSubProyecto.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1)
@@ -82,17 +103,21 @@ Partial Class Ventas_RepIngresos
End If
End Sub
Protected Sub CargaRepIngresos(Optional tipoReporte As Integer = -1)
Dim ObjRepI As New ClsVentas()
Protected Sub CargaRepIngresos(Optional tipoReporte As Integer = -1)
Dim Cves_Subprotectos As String = If(DdlSubProyecto.GetSelectedValuesM = "", "-1", DdlSubProyecto.GetSelectedValuesM)
Dim TiposDoc As String = If(DdlTipoDocto.GetSelectedValuesM = "", "-1", DdlTipoDocto.GetSelectedValuesM)
ObjRepI.RepIngresos(UsuarioActual.CveEmpresa, If(RsFechaI = "-1", MinFecha, RsFechaI.ToDate), If(RsFechaF = "-1", MaxFecha, RsFechaF.ToDate), TiposDoc, Cves_Subprotectos)
GVRepIngresos.DataSource = ObjRepI.DtResultados
DtDatos = ObjRepI.DtResultados
Dim TiposDoc As String = If(DdlTipoDocto.GetSelectedValuesM = "", "-1", DdlTipoDocto.GetSelectedValuesM)
If RblTipoCambio.SelectedValue.ToEntero = 3 And TxtEspecifico.Text <> "" Then
TCEspecifico = TxtEspecifico.Text.ToDecimal
Else
TCEspecifico = -1
End If
Dim ObjRepI As New ClsVentas()
If ObjRepI.RepIngresos(UsuarioActual.CveEmpresa, If(RsFechaI = "-1", MinFecha, RsFechaI.ToDate), If(RsFechaF = "-1", MaxFecha, RsFechaF.ToDate), TiposDoc, Cves_Subprotectos, TipoCambio:=TipoCambio, TCEspecifico:=TCEspecifico) Then
GVRepIngresos.DataSource = ObjRepI.DtResultados
DtDatos = ObjRepI.DtResultados
End If
ObjRepI.Dispose()
GVRepIngresos.DataBind()
upDatosRepI.Update()
@@ -147,9 +172,26 @@ Partial Class Ventas_RepIngresos
#End Region
Protected Sub GVRepIngresos_RowDataBound(sender As Object, e As GridViewRowEventArgs)
If e.Row.RowType = DataControlRowType.DataRow Then
If e.Row.DBCampo("ConceptoContable").Contiene("INGRESOS", "ANTICIPOS") Then
If e.Row.DBCampo("TipoAmortizacion") = "" Then
e.Row.CssClass = "Totales"
ElseIf e.Row.DBCampo("TipoAmortizacion") <> "" AndAlso e.Row.DBCampo("CveConceptoContable") = "-1" Then
e.Row.CssClass = "SubTotales"
End If
End If
End Sub
Private Sub RblTipoCambio_SelectedIndexChanged(sender As Object, e As EventArgs) Handles RblTipoCambio.SelectedIndexChanged
TipoCambio = RblTipoCambio.SelectedValue.ToEntero
If TipoCambio = 3 Then
LiEspecifico.Visible = True
TCEspecifico = GlobalTipoCambio(Now).ToDecimal
TxtEspecifico.Text = TCEspecifico.ToString
Else
LiEspecifico.Visible = False
End If
UpBodyTipoCambio.Update()
End Sub
Private Sub BtnTipoCambio_Click(sender As Object, e As EventArgs) Handles BtnTipoCambio.Click
RegistraScript(String.Format("$('#{0}').modal('hide');", "DivTipoCambio"))
LnkFiltrar_Click(LnkFiltrar, EventArgs.Empty)
End Sub
End Class

View File

@@ -23,6 +23,8 @@
<Service ID="{C0C07587-41A7-46C8-8FBD-3F9C8EBE2DDC}"/>
</StartupServices>
</VisualWebDeveloper>