Merge branch 'master' of http://192.168.10.111:8383/SIG
This commit is contained in:
@@ -2611,6 +2611,27 @@ Public Class ClsVentas
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function UpdatePromocionEstatus(CvePromocion As Integer, Estatus As Boolean, CveUsuario As Integer, CveEmpresa As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Vta_PromocionEstatusUpdate")
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CvePromocion", SqlDbType.Float).Value = CvePromocion
|
||||
.Add("@Estatus", SqlDbType.Bit).Value = Estatus
|
||||
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
End With
|
||||
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al actualizar el estatus la Promoción.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function RemovePromociones(CvePromocion As Integer, CveEmpresa As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Vta_PromocionesRemove")
|
||||
@@ -3267,7 +3288,8 @@ Public Class ClsVentas
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
Public Function GetRepRemisionesSinFacturar(FechaI As String, FechaF As String, FechaV As String, CveSubProyecto As String, CveCliente As Integer, CveContrato As Integer, CveVendedor As String, CveEmpresa As Integer, Optional CveUsuarioConsulta As Integer = -1, Optional ConsultaInventario As Boolean = False) As Boolean
|
||||
Public Function GetRepRemisionesSinFacturar(FechaI As String, FechaF As String, FechaV As String, CveSubProyecto As String, CveCliente As Integer, CveContrato As Integer, CveVendedor As String, CveEmpresa As Integer,
|
||||
Optional CveUsuarioConsulta As Integer = -1, Optional ConsultaInventario As Boolean = False, Optional PrimerProducto As Boolean = False) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Vta_RepRemisionesGet")
|
||||
|
||||
@@ -3282,6 +3304,7 @@ Public Class ClsVentas
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
.Add("@CveUsuarioConsulta", SqlDbType.Int).Value = CveUsuarioConsulta
|
||||
.Add("@ConsultaInventario", SqlDbType.Bit).Value = ConsultaInventario
|
||||
.Add("@PrimerProducto", SqlDbType.Bit).Value = PrimerProducto
|
||||
End With
|
||||
|
||||
Try
|
||||
|
||||
@@ -858,6 +858,7 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
Pago.CveMonedaPago = CveMoneda
|
||||
|
||||
'inserto las compras que voy a pagar
|
||||
Dim nRow As Integer = 1
|
||||
For Each gvr As GridViewRow In GvCxP.Rows
|
||||
If gvr.FCCheckBox("Chk").Checked Then
|
||||
|
||||
@@ -963,7 +964,7 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
If serieFolioArray.Length = 2 Then
|
||||
SerieRNC = serieFolioArray(0)
|
||||
FolioRNC = serieFolioArray(1)
|
||||
SerieFolioRNC = $"{FolioRNC}-D-{SerieRNC = serieFolioArray(0)}"
|
||||
SerieFolioRNC = $"D-{SerieRNC}-{ FolioRNC}"
|
||||
|
||||
Else
|
||||
FolioRNC = serieFolioArray(0)
|
||||
@@ -992,9 +993,19 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
|
||||
End If
|
||||
|
||||
Dim ExisteRNC As Boolean = False
|
||||
If ObjComp.GetCompras(-1, $"D-{SerieRNC}", FolioRNC, CveProveedor, -1, UsuarioActual.CveEmpresa) Then
|
||||
Dim dtRNC As DataTable = ObjComp.DtResultados.FiltraParametros(" TipoDocto ='RNC' ")
|
||||
If dtRNC.Rows.Count > 0 Then
|
||||
ExisteRNC = True
|
||||
SerieFolioRNC = $"D{nRow}-{SerieRNC}-{ FolioRNC}"
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
Dim CveCompraRNC As Integer = GeneraRNC(Descuento, ObjComp.IniciaTransacSQL, gvr.DataKey("CveCompra").ToEntero, CompraActual, ObjMov, CvePrePoliza, CveProveedor, HplProveedor.Text, TxtFechaDocumento.Text.ToDate,
|
||||
$"Remisión Nota de Crédito pago {gvr.DataKey("SerieFolio").ToString}", gvr.DataKey("CveMoneda").ToEntero, TxtTC.Text.ToDecimal, SerieRNC, FolioRNC, PorcentajeIVA:=PorcentajeIVA,
|
||||
CveSubProyecto:=gvr.DataKey("CveSubProyecto").ToEntero)
|
||||
CveSubProyecto:=gvr.DataKey("CveSubProyecto").ToEntero, nRow:=nRow, ExisteRNC:=ExisteRNC)
|
||||
|
||||
If CveCompraRNC > 0 Then
|
||||
|
||||
@@ -1012,6 +1023,7 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
|
||||
|
||||
End If
|
||||
nRow = nRow + 1
|
||||
Next
|
||||
|
||||
Dim UsaComplementariaBancos As Boolean = Not UsuarioActual.CveEmpresa.Contiene(7, 11, 122, 145, 13, 83)
|
||||
@@ -1956,7 +1968,7 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
|
||||
Public Function GeneraRNC(ImporteRNC As Decimal, ByRef sqltransaccion As SqlTransaction, CveCompraAmortizada As Integer, ByRef CompraActual As Compra, ByRef ObjConta As ClsContabilidad, CvePrePoliza As Integer,
|
||||
CveProveedor As Integer, NombreProveedor As String, Fecha As Date, Descripcion As String, CveMoneda As Integer, TipoCambio As Decimal, Serie As String, Folio As String, Optional EsDRMN As Boolean = False,
|
||||
Optional TmpListadoPS As DataTable = Nothing, Optional PorcentajeIVA As Decimal = 0, Optional CveSubProyecto As Integer = -1) As Integer
|
||||
Optional TmpListadoPS As DataTable = Nothing, Optional PorcentajeIVA As Decimal = 0, Optional CveSubProyecto As Integer = -1, Optional nRow As Integer = -1, Optional ExisteRNC As Boolean = False) As Integer
|
||||
Dim CveCompraRNC As Integer = -1
|
||||
Dim respuesta As Boolean = True
|
||||
'Dim PorcentajeIVA As Decimal = TmpDT.MAX("IVAPorcentaje").ToDecimal
|
||||
@@ -1990,7 +2002,7 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
.Fecha = Fecha,
|
||||
.CveMoneda = CveMoneda,
|
||||
.TipoCambio = If(CveMoneda = 1, 1, TipoCambio),
|
||||
.Serie = $"D-{Serie}",
|
||||
.Serie = If(ExisteRNC, $"D{nRow}-{Serie}", $"D-{Serie}"),
|
||||
.Folio = Folio,
|
||||
.CveCompraAmortizacion = CveCompraAmortizada,
|
||||
.CveCompraRelacionada = CveCompraAmortizada
|
||||
|
||||
@@ -113,6 +113,13 @@
|
||||
font-weight: 600;
|
||||
color: #3e4f5e;
|
||||
}
|
||||
|
||||
.modal-dialog {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
min-height: 50vh;
|
||||
}
|
||||
</style>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
||||
@@ -418,7 +425,7 @@
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="col-md-8">
|
||||
<asp:UpdatePanel runat="server" UpdateMode="Conditional" ID="UpNumeroParte">
|
||||
<ContentTemplate>
|
||||
<asp:Label runat="server" ID="LblNumeroParte" Text="" Visible ="false"></asp:Label>
|
||||
@@ -426,7 +433,25 @@
|
||||
</asp:UpdatePanel>
|
||||
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="col-md-2" style="text-align:right!important">
|
||||
<asp:UpdatePanel runat="server" ID="UpOCS" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div id="DivIndicadorOC2" runat="server" visible="false" >
|
||||
<div style=" color: gray;font-size: 12px;font-weight: bold;">
|
||||
OC
|
||||
</div>
|
||||
<div style=" color: blue; font-size: 20px; font-weight: bold;">
|
||||
<asp:LinkButton ID="LnkIndicador_OC2" Text="" OnClick="LnkIndicador_OC_Click" runat="server" CssClass="Texto" />
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<div class="text-right" style="margin: 5px 0px;">
|
||||
<input type="text" id="TxtBusqueda2" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda2','{0}')", GvM.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda2','{0}')", GvM.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
|
||||
@@ -301,7 +301,7 @@ Partial Class Inventarios_Kardex
|
||||
|
||||
If NumeroParte.Trim.Length > 0 Then
|
||||
If UsuarioActual.TienePermisoPagina(13) Then
|
||||
LblNumeroParte.Text = $" Producto: <a href='../Ventas/ProductosServicios.aspx?CvePS={CvePS}' class='Texto' target='_blank' > {Codigo} -{NumeroParte} - {PS}</a>"
|
||||
LblNumeroParte.Text = $" Producto: <a href='../Ventas/ProductosServicios.aspx?CvePS={CvePS}' class='Texto' target='_blank' >{Codigo}</a> - <a href='../Ventas/ProductosServicios.aspx?CvePS={CvePS}' class='Texto' target='_blank' >{NumeroParte}</a> - <a href='../Ventas/ProductosServicios.aspx?CvePS={CvePS}' class='Texto' target='_blank' >{PS}</a>"
|
||||
Else
|
||||
LblNumeroParte.Text = $" Producto: {NumeroParte}"
|
||||
End If
|
||||
@@ -333,10 +333,12 @@ Partial Class Inventarios_Kardex
|
||||
If ObjOC.PendientesCompra(ddlProducto2.SelectedValue.ToEntero, tCveSubProyectos, UsuarioActual.CveEmpresa) Then
|
||||
GvOC.DataSource = ObjOC.DtResultados.Copy.FiltraParametros("", "Fecha Desc")
|
||||
LnkIndicador_OC.Text = ObjOC.DtResultados.Copy.SUM("CantidadPendienteVincular").ToString()
|
||||
LnkIndicador_OC2.Text = ObjOC.DtResultados.Copy.SUM("CantidadPendienteVincular").ToString()
|
||||
End If
|
||||
ObjOC.Dispose()
|
||||
GvOC.DataBind()
|
||||
UpModalOC.Update()
|
||||
UpOCS.Update()
|
||||
End Sub
|
||||
|
||||
Private Function CargarKardex(CvePS As Integer) As DataTable
|
||||
@@ -408,6 +410,8 @@ Partial Class Inventarios_Kardex
|
||||
If UsuarioActual.Empresa.Funcionalidad(382) = "1" Then
|
||||
CargarOCPendientesCompra()
|
||||
DivIndicadorOC.Visible = True
|
||||
DivIndicadorOC2.Visible = True
|
||||
UpOCS.Update()
|
||||
End If
|
||||
|
||||
UpIndicadores.Update()
|
||||
|
||||
@@ -8,6 +8,9 @@
|
||||
<li>
|
||||
<asp:LinkButton ID="ImgAddPromocion" PostBackUrl="/Ventas/Promociones.aspx" CommandArgument="-1" runat="server"><i class="fa fa-plus-circle"></i>Nueva Promoción</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkAccInactivar" runat="server" OnClick="LnkAccInactivar_Click" Visible="false"><i class="fa fa-times" aria-hidden="true"></i>Inactivar</asp:LinkButton>
|
||||
</li>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
@@ -90,16 +93,47 @@
|
||||
|
||||
|
||||
<div class="row" style="margin-right: 10px; margin-top: 18px;" align="right">
|
||||
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvDatos.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvDatos.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
|
||||
<div class="col-md-8">
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
|
||||
<asp:UpdatePanel runat="server" ID="UpInactivar" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:LinkButton runat="server" ID="LnkInactivar" CssClass="btn btn-primary" OnClick="LnkInactivar_Click" Visible="false"
|
||||
data-toggle="confirmation" data-popout="true" data-original-title="¿Inactivar selección?" data-btn-ok-label="si" ><i class="fa fa-times" aria-hidden="true"></i> Inactivar</asp:LinkButton>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvDatos.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvDatos.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:GridView ID="GvDatos" CssClass="table table-striped table-hover Widthall ScrollAD" data-sort="true" runat="server" AutoGenerateColumns="False" GridLines="None">
|
||||
<asp:GridView ID="GvDatos" CssClass="table table-striped table-hover Widthall ScrollAD" data-sort="true" runat="server" AutoGenerateColumns="False" GridLines="None"
|
||||
DataKeyNames="CvePromocion"
|
||||
>
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="" ItemStyle-HorizontalAlign="Left" Visible="false" >
|
||||
<HeaderTemplate>
|
||||
<input type="checkbox" id="chkSelectAll" onclick="checkAll()" />
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:CheckBox runat="server" ID="chk" CssClass="selChk" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Promoción" ItemStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink runat="server" ID="HLPromocion" Text='<%# Eval("Promocion").ToString %>' NavigateUrl ='<%# Eval("CvePromocion", "/Ventas/Promociones.aspx?CvePromocion={0}") %>' CssClass="Texto"></asp:HyperLink>
|
||||
@@ -128,5 +162,18 @@
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="JS" runat="Server">
|
||||
|
||||
<script>
|
||||
|
||||
function checkAll() {
|
||||
|
||||
var isChecked = $('#chkSelectAll').prop('checked');
|
||||
|
||||
$('#<%= GvDatos.ClientID %> input[type="checkbox"][id*=chk]').each(function () {
|
||||
$(this).prop('checked', isChecked);
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
</asp:Content>
|
||||
|
||||
@@ -22,18 +22,25 @@ Partial Class Ventas_CatPromociones
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
|
||||
If UsuarioActual.TienePermisoProceso(386) Then
|
||||
LnkAccInactivar.Visible = True
|
||||
End If
|
||||
|
||||
InicializaControles()
|
||||
OcultarMostrarInactivar(True)
|
||||
CargaDatos()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub InicializaControles()
|
||||
|
||||
|
||||
|
||||
CargarCentrosDeCosto(Nothing, Nothing, Nothing, LblSubProyecto)
|
||||
|
||||
GvDatos.Columns(6).HeaderText = LblSubProyecto.Text
|
||||
GvDatos.Columns(7).HeaderText = LblSubProyecto.Text
|
||||
|
||||
DdlSubProyecto.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa)
|
||||
DdlSubProyecto.DataBind()
|
||||
@@ -95,4 +102,50 @@ Partial Class Ventas_CatPromociones
|
||||
CargaDatos()
|
||||
End Sub
|
||||
|
||||
|
||||
Protected Sub LnkAccInactivar_Click(sender As Object, e As EventArgs)
|
||||
OcultarMostrarInactivar(True)
|
||||
End Sub
|
||||
|
||||
Private Sub OcultarMostrarInactivar(Mostrar As Boolean)
|
||||
|
||||
GvDatos.Columns(0).Visible = Mostrar
|
||||
LnkInactivar.Visible = Mostrar
|
||||
UpInactivar.Update()
|
||||
UpDatos.Update()
|
||||
End Sub
|
||||
Protected Sub LnkInactivar_Click(sender As Object, e As EventArgs)
|
||||
Dim ObjVentas As New ClsVentas
|
||||
ObjVentas.IniciaTransacSQL()
|
||||
Dim ErrorProceo As Boolean = False
|
||||
|
||||
Dim ContInactivadas As Integer = 0
|
||||
For Each GvRow As GridViewRow In GvDatos.Rows
|
||||
Dim Chk As CheckBox = GvRow.FCCheckBox("chk")
|
||||
Dim CvePromocion As Integer = GvRow.DataKey("CvePromocion").ToEntero
|
||||
|
||||
If Chk.Checked Then
|
||||
If ObjVentas.UpdatePromocionEstatus(CvePromocion, False, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
||||
ContInactivadas = ContInactivadas + 1
|
||||
Else
|
||||
ErrorProceo = True
|
||||
Exit Sub
|
||||
End If
|
||||
End If
|
||||
|
||||
Next
|
||||
|
||||
If ErrorProceo Then
|
||||
ObjVentas.RollBack()
|
||||
Else
|
||||
ObjVentas.Commit()
|
||||
Alert($"Se inactivaron {ContInactivadas} promociones.")
|
||||
OcultarMostrarInactivar(False)
|
||||
End If
|
||||
|
||||
|
||||
|
||||
ObjVentas.Dispose()
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
@@ -216,13 +216,13 @@
|
||||
</div>
|
||||
<asp:UpdatePanel ID="UPDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontró ninguna remisión pendiente por facturar" DataKeyNames="CveVenta"
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontró ninguna remisión pendiente por facturar" DataKeyNames="CveVenta,Fecha"
|
||||
ToolTip="Remisiones sin Facturar"
|
||||
CssClass="table table-striped table-advance table-hover Widthall ScrollAD"
|
||||
data-sort="true" GridLines="None">
|
||||
<Columns>
|
||||
<asp:HyperLinkField HeaderText="Folio" ItemStyle-Width="100px" DataTextField ="Folio" DataNavigateUrlFormatString="/Ventas/RepRemisionesDetalle.aspx?CveVenta={0}" DataNavigateUrlFields="CveVenta" Target="_blank" />
|
||||
<asp:HyperLinkField HeaderText="Fecha" ItemStyle-Width="100px" DataTextField ="Fecha" DataTextFormatString="{0:d}" DataNavigateUrlFormatString="/Ventas/Ventas.aspx?CveVenta={0}" DataNavigateUrlFields="CveVenta" />
|
||||
<asp:HyperLinkField HeaderText="Fecha" ItemStyle-Width="150px" DataTextField ="Fecha" DataTextFormatString="{0:d}" DataNavigateUrlFormatString="/Ventas/Ventas.aspx?CveVenta={0}" DataNavigateUrlFields="CveVenta" />
|
||||
<asp:BoundField HeaderText="Vencimiento" DataField="FechaVencimiento" DataFormatString="{0:d}" />
|
||||
<asp:BoundField HeaderText="Cliente" DataField="Cliente" />
|
||||
<asp:BoundField HeaderText="Contrato" DataField="TieneContrato" Visible="false" />
|
||||
@@ -230,6 +230,7 @@
|
||||
<asp:BoundField HeaderText="Procedimiento" DataField="Procedimiento" Visible="false" />
|
||||
<asp:BoundField HeaderText="Folio Rem" DataField="Alfa1" Visible="false" />
|
||||
<asp:BoundField HeaderText="Vendedor" DataField="Vendedor" />
|
||||
<asp:BoundField HeaderText="Producto" DataField="PrimerCodigoPS" Visible="false" />
|
||||
<asp:BoundField DataField="PorcentajeAvance" HeaderText="Facturado" DataFormatString="{0:F}%" HtmlEncode="false" />
|
||||
<asp:BoundField DataField="SubTotal" HeaderText="SubTotal" DataFormatString="{0:N2}" Visible="false" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataField="Descuento" HeaderText="Descuento" DataFormatString="{0:N2}" Visible="false" ItemStyle-HorizontalAlign="Right" />
|
||||
|
||||
@@ -67,7 +67,12 @@ Partial Class RepRemisiones
|
||||
|
||||
#End Region
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
If Not Page.IsPostBack Then
|
||||
|
||||
If UsuarioActual.CveEmpresa.Contiene(189) Then
|
||||
GvDatos.Columns(9).Visible = True
|
||||
End If
|
||||
|
||||
CargaSucursales()
|
||||
CargaCliente()
|
||||
CargaContrato()
|
||||
@@ -89,18 +94,19 @@ Partial Class RepRemisiones
|
||||
|
||||
Sucursales = IIf(DdlSubProyectos.GetSelectedValuesM = "", "-1", DdlSubProyectos.GetSelectedValuesM).ToString
|
||||
Dim Vendedores As String = IIf(DdlVendedor.GetSelectedValuesM = "", "-1", DdlVendedor.GetSelectedValuesM).ToString
|
||||
Dim PrimerProducto As Boolean = If(UsuarioActual.CveEmpresa.Contiene(189), True, False)
|
||||
|
||||
Dim ObjVentas As New ClsVentas
|
||||
If ObjVentas.GetRepRemisionesSinFacturar(FechaI, FechaF, FechaV, Sucursales, CveCliente, CveContrato, Vendedores, UsuarioActual.CveEmpresa, CveUsuarioConsulta:=UsuarioActual.CveUsuario, ConsultaInventario:=chkInv.Checked) Then
|
||||
If ObjVentas.GetRepRemisionesSinFacturar(FechaI, FechaF, FechaV, Sucursales, CveCliente, CveContrato, Vendedores, UsuarioActual.CveEmpresa, CveUsuarioConsulta:=UsuarioActual.CveUsuario, ConsultaInventario:=chkInv.Checked, PrimerProducto:=PrimerProducto) Then
|
||||
DtVentas = ObjVentas.DtResultados.Copy()
|
||||
GvDatos.DataSource = DtVentas
|
||||
End If
|
||||
|
||||
If DtVentas IsNot Nothing Then
|
||||
GvDatos.Columns(11).Visible = DtVentas.SUMD("Descuento") > 0
|
||||
GvDatos.Columns(12).Visible = DtVentas.SUMD("Descuento") > 0
|
||||
End If
|
||||
|
||||
GvDatos.Columns(14).Visible = chkInv.Checked 'solo se visualiza si está selccionada
|
||||
GvDatos.Columns(15).Visible = chkInv.Checked 'solo se visualiza si está selccionada
|
||||
ObjVentas.Dispose()
|
||||
|
||||
GvDatos.DataBind()
|
||||
@@ -124,7 +130,10 @@ Partial Class RepRemisiones
|
||||
e.Row.Cells(2).ForeColor = Drawing.Color.Red
|
||||
End If
|
||||
|
||||
e.Row.Cells(1).Text = $"<a href='./Ventas.aspx?CveVenta={e.Row.DataKey("CveVenta")}' targen='_blank'>{e.Row.DataKey("Fecha").ToDate().ToString("dd/MM/yyyy HH:mm:ss")}</a>"
|
||||
|
||||
End If
|
||||
|
||||
e.Row.FCLiteral("LtlTotal").Text = "<a class=""Texto"" target=""_blank"" href=""/Ventas/RepRemisionesDetalle.aspx?CveVenta=" & e.Row.DBCampo("CveVenta") & "&FechaI=" & FechaI & "&FechaF=" & FechaF & "&FechaV=" & FechaV & "&CveCliente=" & If(e.Row.DBCampo("CveCliente").ToString().ToEntero() > 0, e.Row.DBCampo("CveCliente").ToString(), DdlClientes.SelectedValue) & "&CveContrato=" & CveContrato & "&CveSubProyecto=" & Sucursales & "&CveMoneda=" & e.Row.DBCampo("CveMoneda") & """>" & e.Row.FCLiteral("LtlTotal").Text & "</a>"
|
||||
|
||||
End If
|
||||
|
||||
Reference in New Issue
Block a user