Merge branch 'master' of http://192.168.10.111:8383/SIG
This commit is contained in:
@@ -178,7 +178,9 @@
|
||||
</table>
|
||||
|
||||
<div style="">
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron Clientes registrados" ShowHeader="true" CssClass="table table-striped table-advance table-hover Widthall ScrollAD" data-sort="true" BorderWidth="1" BorderColor="#D3D3D3" GridLines="None">
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron Clientes registrados" ShowHeader="true"
|
||||
DataKeyNames="FechaLimiteCredito"
|
||||
CssClass="table table-striped table-advance table-hover Widthall ScrollAD" data-sort="true" BorderWidth="1" BorderColor="#D3D3D3" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField Visible="true" ItemStyle-Width="100" HeaderText="Código">
|
||||
<ItemTemplate>
|
||||
@@ -348,6 +350,14 @@
|
||||
<asp:Literal ID="LtlOtroTelefono" runat="server" Text='<%# Eval("TelefonoOtros") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField Visible="true" ItemStyle-HorizontalAlign="center" ItemStyle-Width="100px">
|
||||
<HeaderTemplate>F Limite Crédito</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlFechaLimiteCredito" runat="server" ></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
|
||||
</Columns>
|
||||
<RowStyle CssClass="Texto" />
|
||||
<AlternatingRowStyle CssClass="TextoAlterno" />
|
||||
@@ -374,8 +384,6 @@
|
||||
<asp:CheckBox ID="ChkNombre" runat="server" Text="Nombre" Checked="true" /></td>
|
||||
<td style="text-align: left">
|
||||
<asp:CheckBox ID="ChkRFC" runat="server" Text="RFC" Checked="true" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align: left">
|
||||
<asp:CheckBox ID="ChkSucursal" runat="server" Text="Sucursal" Checked="true" /></td>
|
||||
<td style="text-align: left">
|
||||
@@ -386,8 +394,6 @@
|
||||
<asp:CheckBox ID="ChkEstadoSis" runat="server" Text="Estado (Sis)" Checked="true" /></td>
|
||||
<td style="text-align: left">
|
||||
<asp:CheckBox ID="ChkFechaIng" runat="server" Text="Fecha Captura (Sis)" Checked="true" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align: left">
|
||||
<asp:CheckBox ID="ChkUsuario" runat="server" Text="Usuario Capturó (Sis)" Checked="true" /></td>
|
||||
<td style="text-align: left">
|
||||
@@ -398,8 +404,7 @@
|
||||
<asp:CheckBox ID="ChkNombreCorto" runat="server" Text="Nombre Corto" /></td>
|
||||
<td style="text-align: left">
|
||||
<asp:CheckBox ID="ChkVendedor" runat="server" Text="Vendedor" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
<td style="text-align: left">
|
||||
<asp:CheckBox ID="ChkNoExt" runat="server" Text="No Ext" /></td>
|
||||
<td style="text-align: left">
|
||||
@@ -410,8 +415,7 @@
|
||||
<asp:CheckBox ID="ChkColonia" runat="server" Text="Colonia" /></td>
|
||||
<td style="text-align: left">
|
||||
<asp:CheckBox ID="ChkCiudad" runat="server" Text="Ciudad" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
<td style="text-align: left">
|
||||
<asp:CheckBox ID="ChkEstado" runat="server" Text="Estado" /></td>
|
||||
<td style="text-align: left">
|
||||
@@ -422,8 +426,7 @@
|
||||
<asp:CheckBox ID="ChkCP" runat="server" Text="C.P." /></td>
|
||||
<td style="text-align: left">
|
||||
<asp:CheckBox ID="ChkContacto" runat="server" Text="Contacto" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
<td style="text-align: left">
|
||||
<asp:CheckBox ID="ChkMail" runat="server" Text="Correo Envió Facturación" /></td>
|
||||
<td style="text-align: left">
|
||||
@@ -434,33 +437,33 @@
|
||||
<asp:CheckBox ID="ChkRetIVA" runat="server" Text="Ret. IVA" /></td>
|
||||
<td style="text-align: left">
|
||||
<asp:CheckBox ID="ChkRetISR" runat="server" Text="Ret. ISR" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
<td style="text-align: left">
|
||||
<asp:CheckBox ID="ChkPlazoCobranza" runat="server" Text="Plazo Cobranza" /></td>
|
||||
<td style="text-align: left">
|
||||
<asp:CheckBox ID="ChkLimiteCredito" runat="server" Text="Límite Crédito" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align: left">
|
||||
<%--<asp:CheckBox ID="ChkCIE" runat="server" Text="CIE" /></td>--%>
|
||||
<td style="text-align: left">
|
||||
<asp:CheckBox ID="ChkCalle" runat="server" Text="Calle" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align: left">
|
||||
<asp:CheckBox ID="ChkCelular" runat="server" Text="Celular" /></td>
|
||||
<td style="text-align: left">
|
||||
<asp:CheckBox ID="ChkCorreoCotizacion" runat="server" Text="Correo Envió Cotización" /></td>
|
||||
<td style="text-align: left">
|
||||
<asp:CheckBox ID="ChkOtroTelefono" runat="server" Text="Otro Telefono" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align: left">
|
||||
<asp:CheckBox ID="ChkOtroTelefono" runat="server" Text="Otro Telefono" /></td>
|
||||
|
||||
<asp:CheckBox ID="chkFechaLimiteCredito" runat="server" Checked="true" Text="Fecha Limite Crédito" /></td>
|
||||
<td style="text-align: left">
|
||||
</td>
|
||||
<td style="text-align: left">
|
||||
</td>
|
||||
<td style="text-align: left">
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</thead>
|
||||
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
||||
@@ -44,32 +44,37 @@ Partial Class CatClientes
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Public Sub CargaDatos(Optional Nombre As String = "-1", Optional RFC As String = "-1")
|
||||
Public Sub CargaDatos()
|
||||
|
||||
Dim ObjClientes As New ClsClientes
|
||||
Dim Nombre, RFC As String
|
||||
Nombre = "-1"
|
||||
RFC = "-1"
|
||||
|
||||
If ObjClientes.GetClientes(-1, Nombre, "-1", "-1", RFC, "-1", "-1", -1, UsuarioActual.CveEmpresa, -1, TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero, CveVendedor:=DdlVendedor.SelectedValue.ToEntero, PermiteCreditoFiltro:=If(ChkPermiteCredito.Checked, 1, -1)) Then
|
||||
If TxtNombre.Text.Trim <> String.Empty Then Nombre = TxtNombre.Text.Trim
|
||||
|
||||
DTDatos = ObjClientes.DtResultados
|
||||
ObjClientes.Dispose()
|
||||
If TxtRFC.Text.Trim <> String.Empty Then RFC = TxtRFC.Text.Trim
|
||||
|
||||
'ViewState("DTCliente") = DTDatos
|
||||
If UsuarioActual.CveEmpresa = 2 AndAlso UsuarioActual.CveUsuario = 77 Then
|
||||
DTDatos = DTDatos.FiltraParametros("CveCliente IN (10450, 10460, 10458)")
|
||||
ElseIf UsuarioActual.CveEmpresa = 2 AndAlso UsuarioActual.CveUsuario = 21 Then
|
||||
DTDatos = DTDatos.FiltraParametros("CveCliente IN (27448)")
|
||||
If ObjClientes.GetClientes(-1, Nombre, "-1", "-1", RFC, "-1", "-1", DdlSubProyecto.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, Estatus:=DdlEstatus.SelectedValue.ToEntero, CveClienteClasificacion:=DdlClasificaciones.SelectedValue.ToEntero, TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero, CveVendedor:=DdlVendedor.SelectedValue.ToEntero, PermiteCreditoFiltro:=If(ChkPermiteCredito.Checked, 1, -1)) Then
|
||||
If ObjClientes.DtResultados.Rows.Count > 0 Then
|
||||
DTDatos = ObjClientes.DtResultados
|
||||
Else
|
||||
DTDatos = Nothing
|
||||
Alert("No se encontraron registros con los parametros solicitados.", Extensiones.TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
Else
|
||||
Me.GvDatos.DataSource = Nothing
|
||||
End If
|
||||
|
||||
|
||||
ObjClientes.Dispose()
|
||||
|
||||
If ViewState("Orden").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGrid("")
|
||||
End If
|
||||
|
||||
UPDatos.Update()
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
@@ -113,34 +118,7 @@ Partial Class CatClientes
|
||||
|
||||
Protected Sub LbFiltrar_Click(sender As Object, e As EventArgs) Handles LbFiltrar.Click
|
||||
|
||||
Dim ObjClientes As New ClsClientes
|
||||
Dim Nombre, RFC As String
|
||||
Nombre = "-1"
|
||||
RFC = "-1"
|
||||
|
||||
If TxtNombre.Text.Trim <> String.Empty Then Nombre = TxtNombre.Text.Trim
|
||||
|
||||
If TxtRFC.Text.Trim <> String.Empty Then RFC = TxtRFC.Text.Trim
|
||||
|
||||
If ObjClientes.GetClientes(-1, Nombre, "-1", "-1", RFC, "-1", "-1", DdlSubProyecto.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, Estatus:=DdlEstatus.SelectedValue.ToEntero, CveClienteClasificacion:=DdlClasificaciones.SelectedValue.ToEntero, TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero, CveVendedor:=DdlVendedor.SelectedValue.ToEntero, PermiteCreditoFiltro:=If(ChkPermiteCredito.Checked, 1, -1)) Then
|
||||
If ObjClientes.DtResultados.Rows.Count > 0 Then
|
||||
DTDatos = ObjClientes.DtResultados
|
||||
Else
|
||||
DTDatos = Nothing
|
||||
Alert("No se encontraron registros con los parametros solicitados.", Extensiones.TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
ObjClientes.Dispose()
|
||||
|
||||
If ViewState("Orden").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGrid("")
|
||||
End If
|
||||
|
||||
UPDatos.Update()
|
||||
CargaDatos()
|
||||
|
||||
|
||||
End Sub
|
||||
@@ -179,6 +157,10 @@ Partial Class CatClientes
|
||||
GvDatos.Columns(25).Visible = ChkCelular.Checked
|
||||
GvDatos.Columns(26).Visible = ChkCorreoCotizacion.Checked
|
||||
GvDatos.Columns(27).Visible = ChkOtroTelefono.Checked
|
||||
GvDatos.Columns(28).Visible = chkFechaLimiteCredito.Checked
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
CargaDatos()
|
||||
@@ -256,6 +238,13 @@ Partial Class CatClientes
|
||||
e.Row.FCLiteral("LtlSucursal").Text = "<a class=""Texto"" href=""/Ventas/Clientes.aspx?CveCliente=" & e.Row.DBCampo("CveCliente") & """>" & e.Row.FCLiteral("LtlSucursal").Text & "</a>"
|
||||
e.Row.FCLiteral("LtlTelefono").Text = "<a class=""Texto"" href=""/Ventas/Clientes.aspx?CveCliente=" & e.Row.DBCampo("CveCliente") & """>" & e.Row.FCLiteral("LtlTelefono").Text & "</a>"
|
||||
|
||||
If e.Row.DataKey("FechaLimiteCredito").ToString.ToDate = MinFecha Then
|
||||
e.Row.FCLiteral("LtlFechaLimiteCredito").Text = ""
|
||||
Else
|
||||
e.Row.FCLiteral("LtlFechaLimiteCredito").Text = e.Row.DataKey("FechaLimiteCredito").ToString.ToDate.ToString("dd/MM/yyyy")
|
||||
End If
|
||||
|
||||
|
||||
End If
|
||||
End Sub
|
||||
#End Region
|
||||
@@ -317,39 +306,6 @@ Partial Class CatClientes
|
||||
|
||||
|
||||
|
||||
'Protected Sub BtnCorporativo_Click(sender As Object, e As EventArgs)
|
||||
|
||||
' Dim ObjClientes As New ClsClientes
|
||||
|
||||
' If ObjClientes.AddCorporativo(-1, Nombre, "-1", "-1", RFC, "-1", "-1", DdlSubProyecto.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, Estatus:=DdlEstatus.SelectedValue.ToEntero, CveClienteClasificacion:=DdlClasificaciones.SelectedValue.ToEntero, TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero, CveVendedor:=DdlVendedor.SelectedValue.ToEntero) Then
|
||||
' If ObjClientes.DtResultados.Rows.Count > 0 Then
|
||||
' DTDatos = ObjClientes.DtResultados
|
||||
' Else
|
||||
' DTDatos = Nothing
|
||||
' Alert("No se encontraron registros con los parametros solicitados.", Extensiones.TipoMensaje.MsgAdvertencia)
|
||||
' End If
|
||||
' End If
|
||||
|
||||
|
||||
' ObjClientes.Dispose()
|
||||
|
||||
' If ViewState("Orden").ToString() <> String.Empty Then
|
||||
' CargaGrid(ViewState("Orden").ToString())
|
||||
' Else
|
||||
' CargaGrid("")
|
||||
' End If
|
||||
|
||||
' UPDatos.Update()
|
||||
|
||||
'End Sub
|
||||
|
||||
'Private Sub CargaCorporativo()
|
||||
|
||||
' DdlCorporativo.DataSource = GlobalDTCorporativo(UsuarioActual.CveEmpresa)
|
||||
' DdlCorporativo.DataBind()
|
||||
' DdlCorporativo.Items.Insert(0, New ListItem("Selecione", "-1"))
|
||||
|
||||
'End Sub
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,148 +0,0 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="CatMesas.aspx.vb" Inherits="Ventas_CatMesas" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
||||
Catálogo de Mesas
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
|
||||
<div class="portlet box blue-hoki" style="min-width:895px;">
|
||||
<div class="portlet-title">
|
||||
<div class="caption">
|
||||
<i class="icon-grid"></i>Catalogo
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body">
|
||||
<asp:UpdatePanel ID="UpTitulos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<table class="table table-striped table-advance table-hover" style="min-width:880px; width:100%;">
|
||||
<thead>
|
||||
<tr class="Titulos">
|
||||
<th width="155px">
|
||||
<asp:LinkButton ID="LbSucursal" runat="server" CausesValidation="false" Text="" CommandArgument="Sucursal" OnClick="LbOrden_Click">
|
||||
Sucursal
|
||||
<asp:Literal ID="ImgSucursal" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="255px">
|
||||
<asp:LinkButton ID="LbMesa" runat="server" CausesValidation="false" Text="" CommandArgument="Mesa" OnClick="LbOrden_Click">
|
||||
Mesa
|
||||
<asp:Literal ID="ImgMesa" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="101px">
|
||||
<asp:LinkButton ID="LbEstatus" runat="server" CausesValidation="false" Text="" CommandArgument="Estatus" OnClick="LbOrden_Click">
|
||||
Estatus
|
||||
<asp:Literal ID="ImgEstatus" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="102px">
|
||||
<asp:LinkButton ID="LbFechaIng" runat="server" CausesValidation="false" Text="" CommandArgument="FechaIng" OnClick="LbOrden_Click">
|
||||
Fecha
|
||||
<asp:Literal ID="ImgFechaIng" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="100px">
|
||||
<asp:LinkButton ID="LbUsuario" runat="server" CausesValidation="false" Text="" CommandArgument="Usuario" OnClick="LbOrden_Click">
|
||||
Usuario
|
||||
<asp:Literal ID="ImgUsuario" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="165px">Comandos</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tr>
|
||||
<td style="text-align: center">
|
||||
<asp:DropDownList ID="ddlSucursal" runat="server" DataValueField="CveSubProyecto" DataTextField="SubProyecto" Width="134px" AutoPostBack="true"></asp:DropDownList>
|
||||
<asp:RangeValidator ID="RVSucursal" runat="server" ControlToValidate="ddlSucursal" Display="None" Type="Integer" MinimumValue="1" MaximumValue="2147483647" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Sucursal''</b> es necesario, por favor seleccione uno." ValidationGroup="GrpGuardar"></asp:RangeValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCESucursal" runat="server" HighlightCssClass="vco" TargetControlID="RVSucursal" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
<td style="text-align: center">
|
||||
<asp:TextBox ID="TxtMesa" runat="server" CausesValidation="true" MaxLength="50" ValidationGroup="GrpGuardar" Width="234px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVMesa" runat="server" ControlToValidate="TxtMesa" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Mesa''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCMesa" runat="server" HighlightCssClass="vco" TargetControlID="RFVMesa" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td style="text-align: center">
|
||||
<asp:LinkButton ID="LbAgregar" runat="server" CausesValidation="true" CssClass="Texto" Text="Agregar" ValidationGroup="GrpGuardar"></asp:LinkButton></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CveMesa" EmptyDataText="No se encontraron Mesas Registrados" ToolTip="Listado de Mesas" CssClass="table table-striped table-advance table-hover" Style="margin-top: -10px; text-align: center; min-width:880px; width:100%;" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlSucursal" runat="server" Text='<%# Eval("Sucursal", " {0}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:DropDownList ID="ddlSucursal" runat="server" Width="134" DataValueField="CveSubProyecto" DataTextField="SubProyecto"></asp:DropDownList>
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlMesa" runat="server" Text='<%# Eval("Mesa", " {0}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:TextBox ID="TxtMesa" runat="server" CausesValidation="true" MaxLength="50" Text='<%# Eval("Mesa") %>' ValidationGroup="GrpGV" Width="234px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVMesa" runat="server" ControlToValidate="TxtMesa" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Mesa''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGV"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCMesa" runat="server" HighlightCssClass="vco" TargetControlID="RFVMesa" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlEstatus" runat="server" Text='<%# Eval("Estatus") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:CheckBox ID="ChkEstatus" runat="server" Checked='<%# If (Eval("Estatus").ToString = "Activo", True, False) %>' />
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlFecha" runat="server" Text='<%# Eval("FechaIng", "{0:d}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlUsuario" runat="server" Text='<%# Eval("Usuario") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Editar">
|
||||
<EditItemTemplate>
|
||||
<center>
|
||||
<asp:LinkButton ID="imgU" runat="server" AlternateText="Actualizar" CausesValidation="True" CommandName="Update" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-check'></i>" ValidationGroup="GrpGV" />
|
||||
<asp:LinkButton ID="imgC" runat="server" AlternateText="Cancelar" CausesValidation="False" CommandName="Cancel" CssClass="btn btn-circle btn-sm red" Text="<i class='fa fa-times'></i>" />
|
||||
</center>
|
||||
</EditItemTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="imgE" runat="server" AlternateText="Editar" CausesValidation="False" CommandName="Edit" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-pencil'></i>" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Eliminar">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="imgD" runat="server" AlternateText="Eliminar" CausesValidation="False" CommandName="Delete" CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="Confirmar" data-btn-ok-label="si" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<RowStyle CssClass="Texto" />
|
||||
<AlternatingRowStyle CssClass="TextoAlterno" />
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
</asp:Content>
|
||||
@@ -1,213 +0,0 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
|
||||
Imports System.Data
|
||||
Imports System.Linq
|
||||
Imports Extensiones
|
||||
|
||||
Partial Class Ventas_CatMesas
|
||||
Inherits ClsPaginas
|
||||
|
||||
Public Property PuedeEditar As Boolean
|
||||
Get
|
||||
Return CBool(ViewState("PuedeEditar"))
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
ViewState("PuedeEditar") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property PuedeEliminar As Boolean
|
||||
Get
|
||||
Return CBool(ViewState("PuedeEditar"))
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
ViewState("PuedeEditar") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
ViewState("Orden") = ""
|
||||
CargaSucursales()
|
||||
CargaDatos()
|
||||
|
||||
''Permiso Registro
|
||||
'If PermisoRegistro Then
|
||||
' LbAgregar.Enabled = True
|
||||
'Else
|
||||
' LbAgregar.Enabled = False
|
||||
'End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Public Sub CargaSucursales()
|
||||
ddlSucursal.DataSource = GlobalDTSubProyectos(UsuarioActual.CveEmpresa)
|
||||
ddlSucursal.DataBind()
|
||||
ddlSucursal.Items.Insert(0, New ListItem("Todas", "-1"))
|
||||
End Sub
|
||||
|
||||
Public Sub CargaDatos()
|
||||
Dim ObjMesas As New ClsVentas
|
||||
If ObjMesas.GetMesas() Then
|
||||
ViewState("DTMesas") = ObjMesas.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||
GlobalDTMesas = ObjMesas.DtResultados
|
||||
Else
|
||||
Me.GvDatos.DataSource = Nothing
|
||||
End If
|
||||
|
||||
ObjMesas.Dispose()
|
||||
|
||||
If ViewState("Orden").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGrid("")
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub ddlSucursal_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ddlSucursal.SelectedIndexChanged
|
||||
If ViewState("Orden").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGrid("")
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub LbAgregar_Click(sender As Object, e As System.EventArgs) Handles LbAgregar.Click
|
||||
Dim ObjMesas As New ClsVentas
|
||||
If ObjMesas.AddMesa(TxtMesa.Text.Trim, UsuarioActual.CveUsuario, ddlSucursal.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then
|
||||
TxtMesa.Text = ""
|
||||
Alert("La nueva Mesa se guardó correctamente.", TipoMensaje.MsgInformacion)
|
||||
UpTitulos.Update()
|
||||
ViewState("DTMesas") = ObjMesas.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||
GlobalDTMesas = ObjMesas.DtResultados
|
||||
|
||||
If ViewState("Orden").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGrid("")
|
||||
End If
|
||||
End If
|
||||
ObjMesas.Dispose()
|
||||
End Sub
|
||||
|
||||
#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.RowIndex = 0 Then
|
||||
e.Row.Cells(0).Width = Unit.Pixel(150)
|
||||
e.Row.Cells(1).Width = Unit.Pixel(250)
|
||||
e.Row.Cells(2).Width = Unit.Pixel(100)
|
||||
e.Row.Cells(3).Width = Unit.Pixel(100)
|
||||
e.Row.Cells(4).Width = Unit.Pixel(100)
|
||||
e.Row.Cells(5).Width = Unit.Pixel(100)
|
||||
e.Row.Cells(6).Width = Unit.Pixel(61)
|
||||
End If
|
||||
e.Row.Cells(0).HorizontalAlign = HorizontalAlign.Left
|
||||
|
||||
If e.Row.RowState = DataControlRowState.Edit OrElse e.Row.RowState = 5 Then
|
||||
e.Row.FCDropDownList("ddlSucursal").DataSource = GlobalDTSubProyectos(UsuarioActual.CveEmpresa)
|
||||
e.Row.FCDropDownList("ddlSucursal").DataBind()
|
||||
e.Row.FCDropDownList("ddlSucursal").SelectedValue = e.Row.DBCampo("CveSucursal")
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub GvDatos_RowDeleting(sender As Object, e As System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles GvDatos.RowDeleting
|
||||
Dim ObjMesas As New ClsVentas
|
||||
If ObjMesas.RemoveMesa(GvDatos.DataKeys(e.RowIndex).Value.ToString.ToEntero) Then
|
||||
GvDatos.EditIndex = -1
|
||||
ViewState("DTMesas") = ObjMesas.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||
GlobalDTMesas = ObjMesas.DtResultados
|
||||
Alert("La Mesa se eliminó correctamente.", TipoMensaje.MsgInformacion)
|
||||
End If
|
||||
|
||||
ObjMesas.Dispose()
|
||||
|
||||
If ViewState("Orden").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGrid("")
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub GvDatos_RowCancelingEdit(sender As Object, e As System.Web.UI.WebControls.GridViewCancelEditEventArgs) Handles GvDatos.RowCancelingEdit
|
||||
GvDatos.EditIndex = -1
|
||||
If ViewState("Orden").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGrid("")
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub GvDatos_RowUpdating(sender As Object, e As System.Web.UI.WebControls.GridViewUpdateEventArgs) Handles GvDatos.RowUpdating
|
||||
Dim ObjMesas As New ClsVentas
|
||||
Dim CveSucursal As Integer = GvDatos.Rows(e.RowIndex).FCDropDownList("ddlSucursal").SelectedValue.ToEntero
|
||||
Dim Mesa As String = DirectCast(GvDatos.Rows(e.RowIndex).FindControl("TxtMesa"), TextBox).Text.Trim
|
||||
Dim Estatus As Boolean = GvDatos.Rows(e.RowIndex).FCCheckBox("ChkEstatus").Checked
|
||||
Dim CveMesa As Integer = GvDatos.DataKeys(e.RowIndex).Value.ToString.ToEntero
|
||||
|
||||
If ObjMesas.UpdateMesa(Mesa, Estatus, CveSucursal, CveMesa) Then
|
||||
GvDatos.EditIndex = -1
|
||||
ViewState("DTMesas") = ObjMesas.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||
GlobalDTMesas = ObjMesas.DtResultados
|
||||
Alert("Los cambios se guardaron correctamente.", TipoMensaje.MsgInformacion)
|
||||
End If
|
||||
|
||||
ObjMesas.Dispose()
|
||||
|
||||
If ViewState("Orden").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGrid("")
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub GvDatos_RowEditing(sender As Object, e As System.Web.UI.WebControls.GridViewEditEventArgs) Handles GvDatos.RowEditing
|
||||
GvDatos.EditIndex = e.NewEditIndex
|
||||
If ViewState("Orden").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGrid("")
|
||||
End If
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
#Region "O R D E N A M I E N T O"
|
||||
Protected Sub LbOrden_Click(ByVal sender As Object, ByVal e As EventArgs)
|
||||
Dim Orden As String = ""
|
||||
Dim Campo As String = ""
|
||||
Dim Literal As Literal = Nothing
|
||||
Const OrdenInicial As String = ""
|
||||
Dim Arg(2) As String
|
||||
|
||||
Arg = CType(sender, LinkButton).CommandArgument().ToString.Split(";"c)
|
||||
Campo = Arg(0)
|
||||
Literal = CType(CType(sender, LinkButton).NamingContainer.FindControl("Img" & Campo.Replace(",", "_")), Literal)
|
||||
|
||||
If ViewState(String.Format("O{0}", Campo)) IsNot Nothing AndAlso ViewState(String.Format("O{0}", Campo)).ToString = String.Format("{0} DESC", Campo) Then
|
||||
ViewState(String.Format("O{0}", Campo)) = String.Format("{0} ASC", Campo)
|
||||
Literal.Text = String.Format("<i class='fa fa-sort-asc' style='color:#999' ></i>")
|
||||
Else
|
||||
ViewState(String.Format("O{0}", Campo)) = String.Format("{0} DESC", Campo)
|
||||
Literal.Text = String.Format("<i class='fa fa-sort-desc' style='color:#999' ></i>")
|
||||
End If
|
||||
Orden = OrdenInicial & ViewState(String.Format("O{0}", Campo)).ToString
|
||||
ViewState("Orden") = Orden
|
||||
CargaGrid(Orden)
|
||||
End Sub
|
||||
|
||||
Private Sub CargaGrid(Orden As String)
|
||||
If Orden <> String.Empty Then
|
||||
Dim DV As New DataView(CType(ViewState("DTMesas"), DataTable), "", Orden, DataViewRowState.CurrentRows)
|
||||
GvDatos.DataSource = DV.ToTable().FiltraParametros(String.Format("CveSucursal = {0} OR {0} = -1", ddlSucursal.SelectedValue))
|
||||
DV.Dispose()
|
||||
Else
|
||||
GvDatos.DataSource = CType(ViewState("DTMesas"), DataTable).FiltraParametros(String.Format("CveSucursal = {0} OR {0} = -1", ddlSucursal.SelectedValue))
|
||||
End If
|
||||
GvDatos.DataBind()
|
||||
UpDatos.Update()
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
@@ -2032,11 +2032,10 @@
|
||||
<asp:BoundField HeaderText="Fecha Venta" DataField="Fecha" DataFormatString="{0:d}" ItemStyle-HorizontalAlign="Center" />
|
||||
<asp:BoundField HeaderText="Fecha Vencimiento" DataField="FechaVencimiento" DataFormatString="{0:d}" ItemStyle-HorizontalAlign="Center" />
|
||||
<asp:BoundField HeaderText="Días Vencidos" DataField="DiasVencidos" DataFormatString="{0}" ItemStyle-HorizontalAlign="Center" />
|
||||
<asp:BoundField HeaderText="Linea Adicional" DataField="LineaAdicional" DataFormatString="{0}" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="Linea Adicional" DataField="LineaAdicional" ItemStyle-HorizontalAlign="Left" Visible="false" />
|
||||
<asp:TemplateField HeaderText="Monto Venta" ItemStyle-HorizontalAlign="Right">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlSaldoOriginal" runat="server" Text='<%# Eval("Original", "{0:N2}") %>'></asp:Literal>
|
||||
|
||||
<asp:Literal ID="LtlSaldoOriginal" runat="server" Text='<%# Eval("Original", "{0:N2}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Abonado" ItemStyle-HorizontalAlign="Right">
|
||||
@@ -4502,7 +4501,7 @@
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:GridView ID="GvLineasAdicionales" Width="100%" runat="server" GridLines="None"
|
||||
DataKeyNames="CveLineaAdicional,LineaAdicional,CveCliente,CveProveedor,TipoLinea,Importe,CveMoneda,FechaVencimiento,CveUsuario,CveCategoria,FechaIng,CveLineaAdicionalEstatus,Proveedor,DiasVencimiento"
|
||||
DataKeyNames="CveLineaAdicional,LineaAdicional,CveCliente,CveProveedor,TipoLinea,Importe,CveMoneda,FechaVencimiento,CveUsuario,CveCategoria,FechaIng,Proveedor,DiasVencimiento"
|
||||
CssClass="table table-striped table-advance table-hover ScrollAD " ShowHeader="True" EmptyDataText="No se encontraron resultados." ShowHeaderWhenEmpty="true"
|
||||
AutoGenerateColumns="False" AllowPaging="False" ShowFooter="False">
|
||||
<Columns>
|
||||
@@ -4513,7 +4512,7 @@
|
||||
<asp:BoundField DataField="Importe" HeaderText="Importe" DataFormatString="{0:n}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataField="Abreviatura" HeaderText="Moneda" DataFormatString="{0:n}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataField="FechaVencimiento" HeaderText="F. Vencimiento" ItemStyle-HorizontalAlign="Center" DataFormatString="{0:d}" />
|
||||
<asp:BoundField DataField="Estatus" HeaderText="Estatus" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField DataField="Estatus" HeaderText="Estatus" ItemStyle-HorizontalAlign="Left" Visible="false" />
|
||||
<asp:BoundField DataField="TipoLineaSTR" HeaderText="Tipo Linea" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField DataField="Usuario" HeaderText="Usuario" ItemStyle-HorizontalAlign="Left" />
|
||||
|
||||
|
||||
@@ -1960,6 +1960,10 @@ Partial Class Clientes
|
||||
DtCxCActivas = ObjMovtos.DtResultados.FiltraParametros("Tipo = 'Act'", "Moneda, OrdenVencimiento, FechaVencimiento")
|
||||
GvCxC.DataSource = DtCxCActivas
|
||||
'solo tomo los 10 ultimos mas el totalizador general
|
||||
|
||||
|
||||
GvCxC.Columns(6).Visible = If(DtCxCActivas.FiltroPrimeroValor("LineaAdicional", "LEN(TRIM(LineaAdicional)) > 0", "LineaAdicional DESC").Trim.Length > 0, True, False)
|
||||
|
||||
Dim dt As DataTable = ObjMovtos.DtResultados.FiltraParametros("Tipo = 'Hist'")
|
||||
DtHistorialCxC = dt
|
||||
If dt IsNot Nothing AndAlso dt.Rows.Count > 0 Then
|
||||
@@ -2988,8 +2992,8 @@ Partial Class Clientes
|
||||
End If
|
||||
|
||||
e.Row.Cells(5).HorizontalAlign = HorizontalAlign.Right
|
||||
e.Row.Cells(6).HorizontalAlign = HorizontalAlign.Right
|
||||
e.Row.Cells(7).HorizontalAlign = HorizontalAlign.Right
|
||||
e.Row.Cells(8).HorizontalAlign = HorizontalAlign.Right
|
||||
|
||||
If e.Row.DBCampo("Saldo").ToDouble < 0 Then e.Row.Cells(6).ForeColor = Drawing.Color.Red
|
||||
If e.Row.DBCampo("DiasVencidos").ToDouble > 0 AndAlso CType(sender, GridView).ID = "GvCxC" Then e.Row.Cells(4).ForeColor = Drawing.Color.Red
|
||||
|
||||
@@ -1890,7 +1890,7 @@ Partial Class Ventas_ClientesAbonar
|
||||
ObjFacturaDevolucion.FechaPago = Now
|
||||
|
||||
ObjFacturaDevolucion.CveCorte = -1
|
||||
ObjFacturaDevolucion.CveMesa = -1
|
||||
'ObjFacturaDevolucion.CveMesa = -1
|
||||
ObjFacturaDevolucion.NumeroPersonas = 0
|
||||
ObjFacturaDevolucion.CveContrato = -1
|
||||
ObjFacturaDevolucion.DescripcionContrato = ""
|
||||
|
||||
@@ -3707,7 +3707,7 @@ Partial Class PV
|
||||
ObjFactura.FechaPago = TxtFechaPago.Text.ToDate
|
||||
|
||||
ObjFactura.CveCorte = CveCorte
|
||||
ObjFactura.CveMesa = -1
|
||||
'ObjFactura.CveMesa = -1
|
||||
ObjFactura.NumeroPersonas = 0
|
||||
ObjFactura.CveContrato = If(CveContrato > 0, CveContrato, CvePresupuesto)
|
||||
ObjFactura.CveClienteSucursal = DdlSucursalCliente.SelectedValue.ToEntero
|
||||
|
||||
@@ -50,13 +50,21 @@
|
||||
</div>
|
||||
|
||||
<div class="col-md-1 truncate" >Estatus:</div>
|
||||
<div class="col-md-2 ">
|
||||
<div class="col-md-1 ">
|
||||
<asp:DropDownList runat="server" ID="DdlEstatus" CssClass="select2me" Width="100%">
|
||||
<asp:ListItem Text="Todos" Value="-1"></asp:ListItem>
|
||||
<asp:ListItem Text="Registrado" Value="0" Selected="True"></asp:ListItem>
|
||||
<%--<asp:ListItem Text="Registrado" Value="0" ></asp:ListItem> --%>
|
||||
<asp:ListItem Text="Vinculado" Value="1" Selected="True"></asp:ListItem>
|
||||
<asp:ListItem Text="Enviado" Value="2"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<div class="col-md-1 truncate" runat="server" id="DVAgrupador1" visible="false">Agrupador:</div>
|
||||
<div class="col-md-1 " runat="server" id="DVAgrupador2" visible="false">
|
||||
<asp:DropDownList runat="server" ID="DdlAgrupador" CssClass="select2me" Width="100%">
|
||||
<asp:ListItem Text="Comercializador" Value="1" Selected="True"></asp:ListItem>
|
||||
<asp:ListItem Text="Cliente" Value="2"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -72,63 +80,102 @@
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
<div class="row ">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
|
||||
<div class="row ">
|
||||
<div class=" col-md-12" style="text-align: right!important">
|
||||
<input type="text" id="TxtBuscarLineaAdicional" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBuscarLineaAdicional','{0}')", GvLineasAdicionales.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBuscarLineaAdicional','{0}')", GvLineasAdicionales.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
<asp:UpdatePanel ID="UpLineasAdicionales" runat="server" RenderMode="Inline" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
<div class="row ">
|
||||
<div class="col-md-12">
|
||||
<div class="row " runat="server" visible ="false" id="DvLinea">
|
||||
<div class=" col-md-12" style="text-align: right!important">
|
||||
<input type="text" id="TxtBuscarLineaAdicional" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBuscarLineaAdicional','{0}')", GvLineasAdicionales.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBuscarLineaAdicional','{0}')", GvLineasAdicionales.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<asp:UpdatePanel ID="UpLineasAdicionales" runat="server" RenderMode="Inline" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="row " runat="server" visible ="false" id="DvLineaPO">
|
||||
<div class=" col-md-12" style="text-align: right!important">
|
||||
<input type="text" id="TxtBuscarLineaAdicionalpo" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBuscarLineaAdicional','{0}')", GvLineasAdicionalesPO.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBuscarLineaAdicional','{0}')", GvLineasAdicionalesPO.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<asp:GridView ID="GvLineasAdicionales" Width="100%" runat="server" GridLines="None"
|
||||
|
||||
<div class="row ">
|
||||
<div class="col-md-12">
|
||||
|
||||
<asp:GridView ID="GvLineasAdicionales" Width="100%" runat="server" GridLines="None" Visible="false"
|
||||
DataKeyNames="CveLineaAdicional,LineaAdicional,CveCliente,CveProveedor,TipoLinea,Importe,CveMoneda,FechaVencimiento,CveUsuario,CveCategoria,FechaIng,CveLineaAdicionalEstatus,Proveedor,LineaAdicionalComprobante,DiasVencimiento,CveVenta"
|
||||
CssClass="table table-striped table-advance table-hover ScrollAD input-sm " ShowHeader="True" EmptyDataText="No se encontraron resultados." ShowHeaderWhenEmpty="true"
|
||||
AutoGenerateColumns="False" AllowPaging="False" ShowFooter="False"
|
||||
OnRowCommand ="GvLineasAdicionales_RowCommand"
|
||||
OnRowDataBound="GvLineasAdicionales_RowDataBound">
|
||||
AutoGenerateColumns="False" AllowPaging="False" ShowFooter="False">
|
||||
<Columns>
|
||||
<asp:BoundField DataField="LineaAdicional" HeaderText="Linea Adicional" />
|
||||
<asp:BoundField DataField="NombreCliente" HeaderText="Cliente" />
|
||||
<asp:BoundField DataField="Proveedor" HeaderText="Comercializador" />
|
||||
<asp:BoundField DataField="LineaAdicional" HeaderText="Linea Adicional" />
|
||||
<asp:BoundField DataField="NombreCliente" HeaderText="Cliente" />
|
||||
<asp:BoundField DataField="Proveedor" HeaderText="Comercializador" />
|
||||
<asp:BoundField DataField="Importe" HeaderText="Importe" DataFormatString="{0:n}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataField="Abreviatura" HeaderText="Moneda" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:HyperLinkField DataTextField="SerieFolio" DataNavigateUrlFields="CveVenta" DataNavigateUrlFormatString="/Ventas/Ventas.aspx?CveVenta={0}" HeaderText="Serie Folio" />
|
||||
<asp:BoundField DataField="Saldo" HeaderText="Saldo" DataFormatString="{0:n}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataField="DiasVencimiento" HeaderText="Dias de Venc." />
|
||||
<asp:BoundField DataField="Estatus" HeaderText="Estatus" />
|
||||
<asp:BoundField DataField="Usuario" HeaderText="Usuario" />
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
|
||||
<asp:GridView ID="GvLineasAdicionalesPO" Width="100%" runat="server" GridLines="None" Visible="false"
|
||||
DataKeyNames="Agrupador,CveLineaAdicional,LineaAdicional,TipoLinea,Importe,CveMoneda,FechaVencimiento,CveUsuario,CveCategoria,FechaIng,CveLineaAdicionalEstatus,LineaAdicionalComprobante,DiasVencimiento,CveVenta"
|
||||
CssClass="table table-striped table-advance table-hover ScrollAD input-sm mysmallbtn" ShowHeader="True" EmptyDataText="No se encontraron resultados." ShowHeaderWhenEmpty="true"
|
||||
AutoGenerateColumns="False" AllowPaging="False" ShowFooter="False"
|
||||
OnRowCommand="GvLineasAdicionalesPO_RowCommand"
|
||||
OnRowDataBound="GvLineasAdicionalesPO_RowDataBound">
|
||||
<Columns>
|
||||
<asp:BoundField DataField="Agrupador" HeaderText="Agrupador" />
|
||||
<asp:BoundField DataField="LineaAdicional" HeaderText="Linea Adicional" />
|
||||
<asp:BoundField DataField="Importe" HeaderText="Importe" DataFormatString="{0:n}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataField="Abreviatura" HeaderText="Moneda" ItemStyle-HorizontalAlign="Right" />
|
||||
<%--<asp:BoundField DataField="FechaVencimiento" HeaderText="F. Vencimiento" ItemStyle-HorizontalAlign="Center" DataFormatString="{0:d}" Visible="false" />--%>
|
||||
<asp:HyperLinkField DataTextField="SerieFolio" DataNavigateUrlFields="CveVenta" DataNavigateUrlFormatString ="/Ventas/Ventas.aspx?CveVenta={0}" HeaderText="Serie Folio" />
|
||||
|
||||
<asp:HyperLinkField DataTextField="SerieFolio" DataNavigateUrlFields="CveVenta" DataNavigateUrlFormatString="/Ventas/Ventas.aspx?CveVenta={0}" HeaderText="Serie Folio" />
|
||||
<asp:BoundField DataField="Saldo" HeaderText="Saldo" DataFormatString="{0:n}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataField="DiasVencimiento" HeaderText="Dias de Venc." />
|
||||
<asp:BoundField DataField="Estatus" HeaderText="Estatus" />
|
||||
<asp:BoundField DataField="Usuario" HeaderText="Usuario" />
|
||||
<asp:BoundField DataField="DiasVencimiento" HeaderText="Dias de Venc." ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataField="Estatus" HeaderText="Estatus" />
|
||||
<asp:BoundField DataField="Usuario" HeaderText="Usuario" />
|
||||
|
||||
<asp:TemplateField HeaderText="Opciones" Visible="false" ItemStyle-Width="120px">
|
||||
<asp:TemplateField HeaderText="Opciones" ItemStyle-Width="100px" HeaderStyle-Width="100px">
|
||||
<ItemTemplate>
|
||||
<div class="row" style="width:118px" >
|
||||
<asp:LinkButton ID="LnkCargarComprobante" runat="server" AlternateText="Editar" CausesValidation="False" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-upload'></i>" OnClick="LnkCargarComprobante_Click" />
|
||||
|
||||
<asp:LinkButton ID="LnkDescargaComprobante" runat="server" AlternateText="Descarga" CausesValidation="False" CssClass="btn btn-circle btn-sm yellow" Text="<i class='fa fa-download'></i>" OnClick="LnkDescargaComprobante_Click" Visible="false" />
|
||||
|
||||
<asp:LinkButton ID="LnkCambiarEstatus" runat="server" AlternateText="CambiarEstatus" CommandName="Estatus" CommandArgument='<%# Eval("CveLineaAdicionalEstatus") %>' CausesValidation="False" CssClass="btn btn-circle btn-sm blue" Text="<i class='fa fa-arrow-right'></i>"
|
||||
data-toggle="confirmation" data-popout="true" data-original-title="¿Cambiar Estado?" data-btn-ok-label="si" Visible="false" />
|
||||
|
||||
</div>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="10%" />
|
||||
<div class="row" >
|
||||
<div class="col-md-4" style="max-width:26px!important">
|
||||
<asp:LinkButton ID="LnkCargarComprobante" Visible="false" runat="server" AlternateText="Editar" CausesValidation="False"
|
||||
CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-upload'></i>" OnClick="LnkCargarComprobante_Click"
|
||||
ToolTip="Cargar Comprobante" />
|
||||
</div>
|
||||
<div class="col-md-4" style="max-width:26px!important">
|
||||
<asp:LinkButton ID="LnkDescargaComprobante" Visible="false" runat="server" AlternateText="Descarga" CausesValidation="False"
|
||||
CssClass="btn btn-circle btn-sm yellow" Text="<i class='fa fa-download'></i>" OnClick="LnkDescargaComprobante_Click"
|
||||
ToolTip="Descargar Comprobante" />
|
||||
</div>
|
||||
<div class="col-md-4" style="max-width:26px!important" title="Cambiar esatatus a Enviado">
|
||||
<asp:LinkButton ID="LnkCambiarEstatus" runat="server" Visible="false" AlternateText="CambiarEstatus"
|
||||
CommandName="Estatus" CommandArgument='<%# Eval("CveLineaAdicionalEstatus") %>' CausesValidation="False"
|
||||
CssClass="btn btn-circle btn-sm blue" Text="<i class='fa fa-arrow-right'></i>"
|
||||
data-toggle="confirmation" data-popout="true" data-original-title="¿Cambiar Estado?" data-btn-ok-label="si"
|
||||
ToolTip="Cambiar esatatus a Enviado" />
|
||||
</div>
|
||||
</div>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -70,10 +70,19 @@ public partial class Ventas_RepLineasAdicionales : ClsPaginas
|
||||
|
||||
private void InicializaValores()
|
||||
{
|
||||
|
||||
if (Request["OP"] != null && Request["OP"].ToString() == "PO")
|
||||
|
||||
if (Request["OP"] != null && Request["OP"].ToString() == "PO")
|
||||
{
|
||||
DVProveedor1.Visible = true;
|
||||
DVProveedor2.Visible = true;
|
||||
TipoLinea = 2;
|
||||
LtlEncabezado.Text = "Reporte PO";
|
||||
GvLineasAdicionalesPO.Visible = true;
|
||||
DvLineaPO.Visible = true;
|
||||
DVAgrupador1.Visible = true;
|
||||
DVAgrupador2.Visible = true;
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
DvLinea.Visible = true;
|
||||
@@ -97,8 +106,7 @@ public partial class Ventas_RepLineasAdicionales : ClsPaginas
|
||||
}
|
||||
|
||||
DdlClientes.setEsWebService(true);
|
||||
DdlClientes.Attributes.Add("data-metodo", "getcliente");
|
||||
DdlClientes.SelectedText = "Todos";
|
||||
DdlClientes.Attributes.Add("data-metodo", "getcliente");
|
||||
DdlClientes.SelectedText = "Todos";
|
||||
DdlClientes.SelectedValue = "-1";
|
||||
|
||||
@@ -117,24 +125,61 @@ public partial class Ventas_RepLineasAdicionales : ClsPaginas
|
||||
DTDatosGvLineasAdicionales = new DataTable();
|
||||
LnkDescargaExcel.Visible = false;
|
||||
|
||||
ClsVentas objVentas = new ClsVentas();
|
||||
|
||||
int CveProveedor = DdlProveedor.SelectedValue.ToEntero() > 0 ? DdlProveedor.SelectedValue.ToEntero() : -1;
|
||||
|
||||
ClsVentas objVentas = new ClsVentas();
|
||||
|
||||
int CveProveedor = DdlProveedor.SelectedValue.ToEntero() > 0 ? DdlProveedor.SelectedValue.ToEntero() : -1;
|
||||
|
||||
GvLineasAdicionales.DataSource = objVentas.DtResultados;
|
||||
|
||||
if( objVentas.DtResultados.Rows.Count > 0)
|
||||
if(TipoLinea == 1)
|
||||
{
|
||||
if (objVentas.RepLineasAdicionales(-1,-1, DdlClientes.SelectedValue.ToEntero(), CveProveedor, 1, -1, MinFecha, MaxFecha, DdlEstatus.SelectedValue.ToEntero(), UsuarioActual.CveEmpresa))
|
||||
{
|
||||
GvLineasAdicionales.DataSource = objVentas.DtResultados;
|
||||
|
||||
if (objVentas.DtResultados.Rows.Count > 0)
|
||||
{
|
||||
DTDatosGvLineasAdicionales = objVentas.DtResultados;
|
||||
LnkDescargaExcel.Visible = true;
|
||||
UpAcciones.Update();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
GvLineasAdicionales.DataSource = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
if (DdlAgrupador.SelectedValue.ToEntero()== 1){
|
||||
GvLineasAdicionalesPO.Columns[0].HeaderText = "Comercializador";
|
||||
}
|
||||
else
|
||||
{
|
||||
GvLineasAdicionalesPO.Columns[0].HeaderText = "Cliente";
|
||||
}
|
||||
|
||||
if (objVentas.RepLineasAdicionales(DdlAgrupador.SelectedValue.ToEntero(), -1, DdlClientes.SelectedValue.ToEntero(), CveProveedor, 2, -1, MinFecha, MaxFecha, DdlEstatus.SelectedValue.ToEntero(), UsuarioActual.CveEmpresa))
|
||||
{
|
||||
GvLineasAdicionalesPO.DataSource = objVentas.DtResultados;
|
||||
|
||||
if (objVentas.DtResultados.Rows.Count > 0)
|
||||
{
|
||||
DTDatosGvLineasAdicionales = objVentas.DtResultados;
|
||||
LnkDescargaExcel.Visible = true;
|
||||
UpAcciones.Update();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
GvLineasAdicionalesPO.DataSource = null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
objVentas.Dispose();
|
||||
|
||||
GvLineasAdicionales.DataBind();
|
||||
GvLineasAdicionalesPO.DataBind();
|
||||
@@ -276,36 +321,60 @@ public partial class Ventas_RepLineasAdicionales : ClsPaginas
|
||||
}
|
||||
objVentas.Dispose();
|
||||
}
|
||||
|
||||
|
||||
protected void LnkDescargaExcel_Click(object sender, EventArgs e)
|
||||
|
||||
|
||||
protected void LnkDescargaExcel_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
if(TipoLinea == 1)
|
||||
{
|
||||
GridView gvTemp = GvLineasAdicionales;
|
||||
gvTemp.ExportToExcelx("RepLienasAdicionales");
|
||||
}
|
||||
else if(TipoLinea == 2)
|
||||
{
|
||||
GridView gvTemp = GvLineasAdicionalesPO;
|
||||
gvTemp.Columns[9].Visible = false;
|
||||
gvTemp.ExportToExcelx( "RepPO");
|
||||
}
|
||||
gvTemp.Columns[8].Visible = false;
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
protected void GvLineasAdicionales_RowDataBound(object sender, GridViewRowEventArgs e)
|
||||
protected void GvLineasAdicionalesPO_RowDataBound(object sender, GridViewRowEventArgs e)
|
||||
{
|
||||
if (e.Row.RowType == DataControlRowType.DataRow)
|
||||
{
|
||||
|
||||
LinkButton LnkCambiarEstatus = e.Row.FCLinkButton("LnkCambiarEstatus");
|
||||
LinkButton LnkCargarComprobante = e.Row.FCLinkButton("LnkCargarComprobante");
|
||||
LinkButton LnkDescargaComprobante = e.Row.FCLinkButton("LnkDescargaComprobante");
|
||||
if(e.Row.RowType == DataControlRowType.DataRow)
|
||||
|
||||
|
||||
if (e.Row.DataKey("CveLineaAdicional").ToEntero() == 0)
|
||||
{
|
||||
e.Row.CssClass = "SubTotales";
|
||||
if(e.Row.DataKey("CveVenta").ToEntero() > 0)
|
||||
{
|
||||
LnkCambiarEstatus.Visible = false;
|
||||
LnkCargarComprobante.Visible = false;
|
||||
}
|
||||
|
||||
if (e.Row.DataKey("CveLineaAdicionalEstatus").ToEntero() == 2)
|
||||
{
|
||||
e.Row.FCLinkButton("LnkCargarComprobante").Visible = false;
|
||||
}
|
||||
|
||||
if (e.Row.DataKey("LineaAdicionalComprobante").Length > 0 && e.Row.DataKey("CveVenta").ToEntero() > 0 )
|
||||
{
|
||||
LnkDescargaComprobante.Visible = false;
|
||||
}
|
||||
LinkButton LnkDescargaComprobante = e.Row.FCLinkButton("LnkDescargaComprobante");
|
||||
|
||||
if (fi.Exists)
|
||||
{
|
||||
else
|
||||
{
|
||||
if (e.Row.DataKey("CveVenta").ToEntero() > 0 && e.Row.DataKey("CveLineaAdicionalEstatus").ToEntero() == 1)
|
||||
{
|
||||
LnkCambiarEstatus.Visible = true;
|
||||
LnkCargarComprobante.Visible = true;
|
||||
}
|
||||
|
||||
if (e.Row.DataKey("LineaAdicionalComprobante").Length > 0 && e.Row.DataKey("CveVenta").ToEntero() > 0)
|
||||
{
|
||||
FileInfo fi = new FileInfo($@"{UsuarioActual.Empresa.Ruta}\LineasAdicionales\{e.Row.DataKey("LineaAdicionalComprobante")}");
|
||||
|
||||
if (fi.Exists)
|
||||
{
|
||||
LnkDescargaComprobante.Visible = true;
|
||||
ScriptManager.GetCurrent(this).RegisterPostBackControl(LnkDescargaComprobante);
|
||||
}
|
||||
}
|
||||
@@ -327,30 +396,28 @@ public partial class Ventas_RepLineasAdicionales : ClsPaginas
|
||||
Response.ContentType = "text/octet-stream";
|
||||
Response.Flush();
|
||||
Response.TransmitFile(fi.FullName);
|
||||
Response.End();
|
||||
Response.End();
|
||||
}
|
||||
}
|
||||
|
||||
protected void GvLineasAdicionales_RowCommand(object sender, GridViewCommandEventArgs e)
|
||||
{
|
||||
|
||||
GridViewRow GvRow = (GridViewRow)((LinkButton)e.CommandSource).NamingContainer;
|
||||
int CveLineaAdicionalActualzarEstatus = GvRow.DataKey("CveLineaAdicional").ToString().ToEntero();
|
||||
int CveVenta = GvRow.DataKey("CveVenta").ToString().ToEntero();
|
||||
|
||||
bool errorCambioEstatus = false;
|
||||
int cveestatus = e.CommandArgument.ToEntero() + 2; //pasar al siguiente estatus
|
||||
}
|
||||
|
||||
ClsVentas objVentas = new ClsVentas();
|
||||
protected void GvLineasAdicionalesPO_RowCommand(object sender, GridViewCommandEventArgs e)
|
||||
{
|
||||
if (e.CommandName == "Estatus")
|
||||
{
|
||||
GridViewRow GvRow = (GridViewRow)((LinkButton)e.CommandSource).NamingContainer;
|
||||
int CveLineaAdicionalActualzarEstatus = GvRow.DataKey("CveLineaAdicional").ToString().ToEntero();
|
||||
int CveVenta = GvRow.DataKey("CveVenta").ToString().ToEntero();
|
||||
|
||||
bool errorCambioEstatus = false;
|
||||
//int cveestatus = e.CommandArgument.ToEntero() + 2; //pasar al siguiente estatus
|
||||
|
||||
ClsVentas objVentas = new ClsVentas();
|
||||
|
||||
if (!objVentas.UpdateLineasAdicionales(CveLineaAdicionalActualzarEstatus, "-1", -1, -1, -1, -1, -1, MinFecha, 100, -1, UsuarioActual.CveEmpresa, CveVenta: CveVenta, CveLineaAdicionalEstatus: 2))
|
||||
{
|
||||
errorCambioEstatus = true;
|
||||
}
|
||||
objVentas.Dispose();
|
||||
if (!errorCambioEstatus)
|
||||
if (!objVentas.UpdateLineasAdicionales(CveLineaAdicionalActualzarEstatus, "-1", -1, -1, -1, -1, -1, MinFecha, 100, -1, UsuarioActual.CveEmpresa, CveVenta: CveVenta, CveLineaAdicionalEstatus: cveestatus))
|
||||
{
|
||||
errorCambioEstatus = true;
|
||||
}
|
||||
|
||||
|
||||
objVentas.Dispose();
|
||||
if (!errorCambioEstatus)
|
||||
{
|
||||
{
|
||||
CargaDatos();
|
||||
@@ -5773,7 +5773,7 @@ Partial Class Ventas
|
||||
ObjVentas = New ClsVentas()
|
||||
End If
|
||||
|
||||
If ObjVentas.GetVenta(CveVenta, UsuarioActual.CveEmpresa) Then
|
||||
If ObjVentas.GetVenta(CveVenta, UsuarioActual.CveEmpresa, VerificaAlmacen:=False) Then
|
||||
If ObjVentas.DtResultados IsNot Nothing AndAlso ObjVentas.DtResultados.Rows.Count > 0 Then
|
||||
Dim drv As DataRow = ObjVentas.DtResultados.Rows(0)
|
||||
|
||||
@@ -5915,7 +5915,7 @@ Partial Class Ventas
|
||||
'cuando es refacturacion, la fecha de pago debe de ser la misma
|
||||
If UsuarioActual.Empresa.Funcionalidad(526) = "1" Then
|
||||
' Dim ObjVenta As New ClsVentas
|
||||
If ObjVentas.GetVenta(CveVenta, UsuarioActual.CveEmpresa) Then
|
||||
If ObjVentas.GetVenta(CveVenta, UsuarioActual.CveEmpresa, VerificaAlmacen:=False) Then
|
||||
If ObjVentas.DtResultados.Rows.Count > 0 Then
|
||||
TxtFechaPago.Text = ObjVentas.DtResultados(0)("FechaVencimiento").ToString().ToDate.ToShortDateString
|
||||
End If
|
||||
@@ -6784,7 +6784,7 @@ Partial Class Ventas
|
||||
Row("CveVenta") = DdlFacturaARelacionar.SelectedValue.ToEntero()
|
||||
|
||||
Using ObjVentas As New ClsVentas
|
||||
If ObjVentas.GetVenta(DdlFacturaARelacionar.SelectedValue.ToEntero(), UsuarioActual.CveEmpresa) AndAlso ObjVentas.DtResultados.Rows.Count > 0 Then
|
||||
If ObjVentas.GetVenta(DdlFacturaARelacionar.SelectedValue.ToEntero(), UsuarioActual.CveEmpresa, VerificaAlmacen:=False) AndAlso ObjVentas.DtResultados.Rows.Count > 0 Then
|
||||
Row("SerieFolio") = ObjVentas.DtResultados(0)("SerieFolio").ToString()
|
||||
Row("FolioFiscal") = ObjVentas.DtResultados(0)("FolioFiscal").ToString()
|
||||
End If
|
||||
@@ -7547,7 +7547,7 @@ Partial Class Ventas
|
||||
If DdlNCFactura.Items.Count = 0 Then
|
||||
Dim ObjClientes As New ClsVentas()
|
||||
|
||||
If ObjClientes.GetVenta(pCveVenta, UsuarioActual.CveEmpresa) AndAlso ObjClientes.DtResultados.Rows.Count > 0 Then
|
||||
If ObjClientes.GetVenta(pCveVenta, UsuarioActual.CveEmpresa, VerificaAlmacen:=False) AndAlso ObjClientes.DtResultados.Rows.Count > 0 Then
|
||||
DTFacNC = ObjClientes.DtResultados
|
||||
Dim drvv As DataRow = DTFacNC.FiltroPrimero("")
|
||||
DTFacNC.Columns.Add("Factura", GetType(String), " Folio + ' - ' +' $' + Total + ' - ' + Fecha ")
|
||||
@@ -9703,6 +9703,18 @@ Partial Class Ventas
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al actualizar el embarque", ex)
|
||||
End Try
|
||||
Try
|
||||
ViewState("CveVenta") = ObjFactura.CveVenta
|
||||
|
||||
If Request("CveOrdenProduccion") IsNot Nothing AndAlso IsNumeric(Request("CveOrdenProduccion")) AndAlso Request("CveOrdenProduccion").ToEntero() > 0 Then
|
||||
|
||||
If ObjVentas.AgroOrdenProduccionUpvta(ObjFactura.CveVenta, UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario, Request("CveOrdenProduccion").ToEntero()) Then
|
||||
|
||||
End If
|
||||
End If
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al actualizar el embarque", ex)
|
||||
End Try
|
||||
|
||||
Try
|
||||
Dim DirectoriArchivoXML As String = String.Format("{0}{1}", UsuarioActual.Empresa.Ruta, ObjFactura.TipoDocto) ' System.IO.Path.Combine()
|
||||
@@ -10217,7 +10229,7 @@ Partial Class Ventas
|
||||
ObjFacturaDevolucion.FechaPago = TxtFechaPago.Text.ToDate
|
||||
|
||||
ObjFacturaDevolucion.CveCorte = CveCorte
|
||||
ObjFacturaDevolucion.CveMesa = -1
|
||||
'ObjFacturaDevolucion.CveMesa = -1
|
||||
ObjFacturaDevolucion.NumeroPersonas = 0
|
||||
ObjFacturaDevolucion.CveContrato = If(CveContrato > 0, CveContrato, CvePresupuesto)
|
||||
ObjFacturaDevolucion.DescripcionContrato = If(DdlContratosModal.SelectedItem IsNot Nothing, DdlContratosModal.SelectedItem.Text, "")
|
||||
@@ -10507,7 +10519,7 @@ Partial Class Ventas
|
||||
ObjFacturaBonificacion.FechaPago = TxtFechaPago.Text.ToDate
|
||||
|
||||
ObjFacturaBonificacion.CveCorte = CveCorte
|
||||
ObjFacturaBonificacion.CveMesa = -1
|
||||
'ObjFacturaBonificacion.CveMesa = -1
|
||||
ObjFacturaBonificacion.NumeroPersonas = 0
|
||||
ObjFacturaBonificacion.CveContrato = If(CveContrato > 0, CveContrato, CvePresupuesto)
|
||||
ObjFacturaBonificacion.DescripcionContrato = If(DdlContratosModal.SelectedItem IsNot Nothing, DdlContratosModal.SelectedItem.Text, "")
|
||||
@@ -10999,7 +11011,7 @@ Partial Class Ventas
|
||||
ObjFactura.EsDiasCreditoFijo = EsDiasCreditoFijo
|
||||
|
||||
ObjFactura.CveCorte = CveCorte
|
||||
ObjFactura.CveMesa = -1
|
||||
'ObjFactura.CveMesa = -1
|
||||
ObjFactura.NumeroPersonas = 0
|
||||
|
||||
|
||||
@@ -11705,7 +11717,7 @@ Partial Class Ventas
|
||||
ObjFacturaDevolucion.FechaPago = TxtFechaPago.Text.ToDate
|
||||
|
||||
ObjFacturaDevolucion.CveCorte = CveCorte
|
||||
ObjFacturaDevolucion.CveMesa = -1
|
||||
'ObjFacturaDevolucion.CveMesa = -1
|
||||
ObjFacturaDevolucion.NumeroPersonas = 0
|
||||
ObjFacturaDevolucion.CveContrato = If(CveContrato > 0, CveContrato, CvePresupuesto)
|
||||
ObjFacturaDevolucion.DescripcionContrato = If(DdlContratosModal.SelectedItem IsNot Nothing, DdlContratosModal.SelectedItem.Text, "")
|
||||
@@ -12657,7 +12669,7 @@ Partial Class Ventas
|
||||
factura.TotalTC, factura.CveMoneda, factura.TipoCambio, factura.CveMetodoPago, factura.CondicionesPago, factura.FormaPago, factura.FechaPago, factura.Fecha, factura.MotivoDescuento,
|
||||
factura.Observaciones, factura.FechaEjecucion, factura.CveVendedor,
|
||||
factura.Alfa1, factura.Alfa2, factura.Alfa3, factura.Num1, factura.Num2, factura.Num3,
|
||||
factura.Fech1, factura.Fech2, factura.Fech3, factura.CveCorte, factura.CveMesa, factura.NumeroPersonas, factura.CvePrePoliza, factura.CveUsuario, factura.CveEmpresa,
|
||||
factura.Fech1, factura.Fech2, factura.Fech3, factura.CveCorte, factura.NumeroPersonas, factura.CvePrePoliza, factura.CveUsuario, factura.CveEmpresa,
|
||||
AtencionA:=factura.AtencionA, TelefonoGenerico:=TxtTelefonoGenerico.Text.Trim, CveContrato:=factura.CveContrato, CveVentaPadre:=If(AplicaDevolucion, CveVentaDevolucion, factura.CveVentaPadre), Det_FechaOrdenCompra:=factura.Det_FechaOrdenCompra, Det_OrdenCompra:=factura.Det_OrdenCompra, otros:=factura.Otros,
|
||||
Entrega:=TxtEntrega.Text, Vigencia:=If(DdlTipoComprobante.SelectedValue = "Cot", TxtFechaVencimientoCotizacion.Text.ToDate, MinFecha),
|
||||
CveAlmacenTraspasoDestino:=CveAlmacenTraspasoDestino, CveAlmacenTraspasoOrigen:=CveAlmacenTraspasoOrigen, CveDireccionEnvio:=If(DdlDireccionEnvio.Visible, DdlDireccionEnvio.SelectedValue.ToEntero(), -1), CveOC:=CveOC, IEPS:=factura.IEPSTC, Serie:=factura.Serie, CveCondicionEntrega:=DdlFormaEntrega.SelectedValue.ToEntero(),
|
||||
@@ -22499,7 +22511,7 @@ Partial Class Ventas
|
||||
Private Sub InventarioMov(Optional CveVentaPadre As Integer = -1)
|
||||
If CveVentaPadre > 0 Then
|
||||
Dim ObjVentas As New ClsVentas()
|
||||
If ObjVentas.GetVenta(CveVentaPadre, UsuarioActual.CveEmpresa) Then
|
||||
If ObjVentas.GetVenta(CveVentaPadre, UsuarioActual.CveEmpresa, VerificaAlmacen:=False) Then
|
||||
If ObjVentas.DtResultados.Rows.Count > 0 AndAlso ObjVentas.DtResultados.Rows(0)("TipoDocto").ToString() = "Ing" AndAlso DdlTipoComprobante.SelectedValue = "Ing" Then
|
||||
' Dim CveEstatusRefacturacion As Integer = ObjVentas.DtResultados.Rows(0)("CveEstatusRefacturacion").ToString().ToEntero()
|
||||
|
||||
@@ -22641,7 +22653,7 @@ Partial Class Ventas
|
||||
End Sub
|
||||
Protected Sub LBDevolucionAlmacen_Click(sender As Object, e As EventArgs)
|
||||
Dim ObjVentas As New ClsVentas
|
||||
If ObjVentas.GetVenta(CveVenta, UsuarioActual.CveEmpresa) Then
|
||||
If ObjVentas.GetVenta(CveVenta, UsuarioActual.CveEmpresa, VerificaAlmacen:=False) Then
|
||||
If ObjVentas.DtResultados.Rows.Count > 0 Then
|
||||
Dim DbRowVenta As DataRow = ObjVentas.DtResultados.Rows(0)
|
||||
Me.DevolucionAlmacen = DbRowVenta("EsDevolucionVenta").ToString().ToEntero()
|
||||
@@ -24606,7 +24618,7 @@ Partial Class Ventas
|
||||
Dim ObjVentas As New ClsVentas()
|
||||
Dim ObjInventarios As New ClsInventarios
|
||||
|
||||
If ObjVentas.GetVenta(CveVenta, UsuarioActual.CveEmpresa) Then
|
||||
If ObjVentas.GetVenta(CveVenta, UsuarioActual.CveEmpresa, VerificaAlmacen:=False) Then
|
||||
If ObjVentas.DtResultados IsNot Nothing AndAlso ObjVentas.DtResultados.Rows.Count > 0 Then
|
||||
Dim DbRowVenta As DataRow = ObjVentas.DtResultados.Rows(0)
|
||||
|
||||
@@ -26035,7 +26047,7 @@ Partial Class Ventas
|
||||
ViewState("CveVenta") = IfNull(Request("CveVenta"), 0).ToString.ToEntero
|
||||
|
||||
Dim Obj As New ClsVentas
|
||||
If Obj.GetVenta(CveVenta, UsuarioActual.CveEmpresa) Then
|
||||
If Obj.GetVenta(CveVenta, UsuarioActual.CveEmpresa, VerificaAlmacen:=False) Then
|
||||
Dim DbRowVenta As DataRow = Obj.DtResultados.FiltroPrimero("")
|
||||
ViewState("SaldoVenta") = DbRowVenta("Saldo").ToString()
|
||||
Total = DbRowVenta("Total").ToString.ToDecimal
|
||||
@@ -28068,7 +28080,7 @@ Partial Class Ventas
|
||||
DrPS("CveUM").ToString().ToEntero(), DrPS("UnidadMedida").ToString(), DrPS("CveClasificacion").ToString().ToEntero(), DrPS("Clasificacion").ToString(), CveProyecto, Proyecto, CveSubProyecto, SubProyecto,
|
||||
TxtNCObservaciones.Text.Trim, 1, Dr("ImportePU").ToString.ToDecimal, Dr("PorcentajeIVA").ToString.ToDecimal, Dr("ImporteIVA").ToString.ToDecimal, Dr("PorcentajeRetIVA").ToString().ToDecimal, Dr("ImporteRetIVA").ToString().ToDecimal,
|
||||
Dr("PorcentajeRetISR").ToString().ToDecimal, Dr("ImporteRetISR").ToString().ToDecimal, Dr("PorcentajeIEPS").ToString().ToDecimal, Dr("ImporteIEPS").ToString().ToDecimal, -1, 0, Dr("ImporteTotal").ToString().ToDecimal, "", "", -1, -1,
|
||||
DrPS("SATClavePS").ToString(), DrPS("SATClaveUnidadMedida").ToString(), -1, -1, -1, -1, -1, -1)
|
||||
DrPS("SATClavePS").ToString(), DrPS("SATClaveUnidadMedida").ToString(), -1, -1, -1, -1, -1, -1, CodigoObjetoImpuesto:=DrPS("CodigoObjetoImpuesto").ToString())
|
||||
Next
|
||||
End If
|
||||
|
||||
@@ -28139,7 +28151,7 @@ Partial Class Ventas
|
||||
DrPS("CveUM").ToString().ToEntero(), DrPS("UnidadMedida").ToString(), DrPS("CveClasificacion").ToString().ToEntero(), DrPS("Clasificacion").ToString(), CveProyecto, Proyecto, CveSubProyecto, SubProyecto,
|
||||
TxtNCObservaciones.Text.Trim, 1, Dr("ImportePU").ToString().ToDecimal + Ajuste, Dr("PorcentajeIVA").ToString().ToDecimal, Dr("ImporteIVA").ToString().ToDecimal, Dr("PorcentajeRetIVA").ToString().ToDecimal, Dr("ImporteRetIVA").ToString().ToDecimal,
|
||||
Dr("PorcentajeRetISR").ToString().ToDecimal, Dr("ImporteRetISR").ToString().ToDecimal, Dr("PorcentajeIEPS").ToString().ToDecimal, Dr("ImporteIEPS").ToString().ToDecimal, -1, 0, Dr("ImporteTotal").ToString().ToDecimal(), "", "", -1, -1,
|
||||
DrPS("SATClavePS").ToString(), DrPS("SATClaveUnidadMedida").ToString(), -1, -1, -1, -1, -1, -1)
|
||||
DrPS("SATClavePS").ToString(), DrPS("SATClaveUnidadMedida").ToString(), -1, -1, -1, -1, -1, -1, CodigoObjetoImpuesto:=DrPS("CodigoObjetoImpuesto").ToString())
|
||||
|
||||
Next
|
||||
End If
|
||||
@@ -28271,7 +28283,7 @@ Partial Class Ventas
|
||||
DrPS("CveUM").ToString().ToEntero(), DrPS("UnidadMedida").ToString(), DrPS("CveClasificacion").ToString().ToEntero(), DrPS("Clasificacion").ToString(), CveProyecto, Proyecto, CveSubProyecto, SubProyecto,
|
||||
Obs, Cantidad, ImportePU, RowUsado("PorcentajeIVA").ToString().ToDecimal, ImporteIVA, RowUsado("PorcentajeRetIVA").ToString().ToDecimal, ImporteRetIVA,
|
||||
RowUsado("PorcentajeRetISR").ToString().ToDecimal, ImporteRetISR, RowUsado("PorcentajeIEPS").ToString().ToDecimal, ImporteIEPS, -1, 0, ImporteTotal, "", "", -1, -1,
|
||||
DrPS("SATClavePS").ToString(), DrPS("SATClaveUnidadMedida").ToString(), -1, -1, -1, -1, -1, -1, CveVentaDetalleRNC:=RowUsado("CveVentaDetalle").ToString().ToEntero())
|
||||
DrPS("SATClavePS").ToString(), DrPS("SATClaveUnidadMedida").ToString(), -1, -1, -1, -1, -1, -1, CveVentaDetalleRNC:=RowUsado("CveVentaDetalle").ToString().ToEntero(), CodigoObjetoImpuesto:=DrPS("CodigoObjetoImpuesto").ToString())
|
||||
|
||||
End If
|
||||
|
||||
@@ -28364,7 +28376,7 @@ Partial Class Ventas
|
||||
DrPS("CveUM").ToString().ToEntero(), DrPS("UnidadMedida").ToString(), DrPS("CveClasificacion").ToString().ToEntero(), DrPS("Clasificacion").ToString(), CveProyecto, Proyecto, CveSubProyecto, SubProyecto,
|
||||
Obs, Cantidad, ImportePU, RowUsado("PorcentajeIVA").ToString().ToDecimal, ImporteIVA, 0, ImporteRetIVA,
|
||||
0, ImporteRetISR, 0, ImporteIEPS, -1, 0, ImporteTotal, "", "", -1, -1,
|
||||
DrPS("SATClavePS").ToString(), DrPS("SATClaveUnidadMedida").ToString(), -1, -1, -1, -1, -1, -1, CveVentaDetalleRNC:=RowUsado("CveVentaDetalleRNC").ToString().ToEntero())
|
||||
DrPS("SATClavePS").ToString(), DrPS("SATClaveUnidadMedida").ToString(), -1, -1, -1, -1, -1, -1, CveVentaDetalleRNC:=RowUsado("CveVentaDetalleRNC").ToString().ToEntero(), CodigoObjetoImpuesto:=DrPS("CodigoObjetoImpuesto").ToString())
|
||||
|
||||
End If
|
||||
|
||||
@@ -28456,7 +28468,7 @@ Partial Class Ventas
|
||||
DrPS("CveUM").ToString().ToEntero(), DrPS("UnidadMedida").ToString(), DrPS("CveClasificacion").ToString().ToEntero(), DrPS("Clasificacion").ToString(), CveProyecto, Proyecto, CveSubProyecto, SubProyecto,
|
||||
Obs, Cantidad, ImportePU, RowCargo("PorcentajeIVA").ToString().ToDecimal, ImporteIVA, RowCargo("PorcentajeRetIVA").ToString().ToDecimal, ImporteRetIVA,
|
||||
RowCargo("PorcentajeRetISR").ToString().ToDecimal, ImporteRetISR, RowCargo("PorcentajeIEPS").ToString().ToDecimal, ImporteIEPS, -1, 0, ImporteTotal, "", "", -1, -1,
|
||||
DrPS("SATClavePS").ToString(), DrPS("SATClaveUnidadMedida").ToString(), -1, -1, -1, -1, -1, -1)
|
||||
DrPS("SATClavePS").ToString(), DrPS("SATClaveUnidadMedida").ToString(), -1, -1, -1, -1, -1, -1, CodigoObjetoImpuesto:=DrPS("CodigoObjetoImpuesto").ToString())
|
||||
End If
|
||||
|
||||
Next
|
||||
@@ -28550,7 +28562,7 @@ Partial Class Ventas
|
||||
DrPS("CveUM").ToString().ToEntero(), DrPS("UnidadMedida").ToString(), DrPS("CveClasificacion").ToString().ToEntero(), DrPS("Clasificacion").ToString(), CveProyecto, Proyecto, CveSubProyecto, SubProyecto,
|
||||
Obs, Cantidad, ImportePU, RowCargo("PorcentajeIVA").ToString().ToDecimal, ImporteIVA, RowCargo("PorcentajeRetIVA").ToString().ToDecimal, ImporteRetIVA,
|
||||
RowCargo("PorcentajeRetISR").ToString().ToDecimal, ImporteRetISR, RowCargo("PorcentajeIEPS").ToString().ToDecimal, ImporteIEPS, -1, 0, ImporteTotal, "", "", -1, -1,
|
||||
DrPS("SATClavePS").ToString(), DrPS("SATClaveUnidadMedida").ToString(), -1, -1, -1, -1, -1, -1)
|
||||
DrPS("SATClavePS").ToString(), DrPS("SATClaveUnidadMedida").ToString(), -1, -1, -1, -1, -1, -1, CodigoObjetoImpuesto:=DrPS("CodigoObjetoImpuesto").ToString())
|
||||
End If
|
||||
|
||||
Next
|
||||
@@ -28638,7 +28650,7 @@ Partial Class Ventas
|
||||
DrPS("CveUM").ToString().ToEntero(), DrPS("UnidadMedida").ToString(), DrPS("CveClasificacion").ToString().ToEntero(), DrPS("Clasificacion").ToString(), CveProyecto, Proyecto, CveSubProyecto, SubProyecto,
|
||||
Obs, Cantidad, ImportePU, RowUsado("PorcentajeIVA").ToString().ToDecimal, ImporteIVA, 0, ImporteRetIVA,
|
||||
0, ImporteRetISR, 0, ImporteIEPS, -1, 0, ImporteTotal, "", "", -1, -1,
|
||||
DrPS("SATClavePS").ToString(), DrPS("SATClaveUnidadMedida").ToString(), -1, -1, -1, -1, -1, -1, CveVentaDetalleRNC:=RowUsado("CveVentaDetalleRNC").ToString().ToEntero())
|
||||
DrPS("SATClavePS").ToString(), DrPS("SATClaveUnidadMedida").ToString(), -1, -1, -1, -1, -1, -1, CveVentaDetalleRNC:=RowUsado("CveVentaDetalleRNC").ToString().ToEntero(), CodigoObjetoImpuesto:=DrPS("CodigoObjetoImpuesto").ToString())
|
||||
End If
|
||||
|
||||
|
||||
@@ -28725,7 +28737,7 @@ Partial Class Ventas
|
||||
DrPS("CveUM").ToString().ToEntero(), DrPS("UnidadMedida").ToString(), DrPS("CveClasificacion").ToString().ToEntero(), DrPS("Clasificacion").ToString(), CveProyecto, Proyecto, CveSubProyecto, SubProyecto,
|
||||
Obs, Cantidad, ImportePU, RowRNC("PorcentajeIVA").ToString().ToDecimal, ImporteIVA, RowRNC("PorcentajeRetIVA").ToString().ToDecimal, ImporteRetIVA,
|
||||
RowRNC("PorcentajeRetISR").ToString().ToDecimal, ImporteRetISR, RowRNC("PorcentajeIEPS").ToString().ToDecimal, ImporteIEPS, -1, 0, ImporteTotal, "", "", -1, -1,
|
||||
DrPS("SATClavePS").ToString(), DrPS("SATClaveUnidadMedida").ToString(), -1, -1, -1, -1, -1, -1, CveVentaDetalleRNC:=RowRNC("CveVentaDetalle").ToString().ToEntero())
|
||||
DrPS("SATClavePS").ToString(), DrPS("SATClaveUnidadMedida").ToString(), -1, -1, -1, -1, -1, -1, CveVentaDetalleRNC:=RowRNC("CveVentaDetalle").ToString().ToEntero(), CodigoObjetoImpuesto:=DrPS("CodigoObjetoImpuesto").ToString())
|
||||
End If
|
||||
|
||||
|
||||
@@ -28761,7 +28773,7 @@ Partial Class Ventas
|
||||
Dim FechaFactura As DateTime = Now
|
||||
|
||||
If AplicaNCMasiva OrElse AplicaNCUsado Then
|
||||
If ObjVentas.GetVenta(CveVentaNC, UsuarioActual.CveEmpresa) Then
|
||||
If ObjVentas.GetVenta(CveVentaNC, UsuarioActual.CveEmpresa, VerificaAlmacen:=False) Then
|
||||
If ObjVentas.DtResultados.Rows.Count > 0 Then
|
||||
Total = ObjVentas.DtResultados()(0)("Total").ToString().ToDecimal
|
||||
SubTotal = ObjVentas.DtResultados()(0)("SubTotal").ToString().ToDecimal
|
||||
@@ -28867,7 +28879,8 @@ Partial Class Ventas
|
||||
PorcentajeRetISR As Decimal, ImporteRetISR As Decimal, PorcentajeIEPS As Decimal, ImporteIEPS As Decimal, TipoDescuento As Integer, Descuento As Decimal,
|
||||
Total As Decimal, Serie As String, TiempoEntrega As String, CvePresupuestoIngreso As Integer, EntregaDirecta As Integer, SATClaveProdServ As String,
|
||||
SATClaveUM As String, CveContratoDetalle As Integer, CveVentaDetalle As Integer, CveMovimientoDetallePedido As Integer, CveOrdenCompraDetalle As Integer,
|
||||
CveVentaDetalleRemision As Integer, CveVentaDetalleCotizacion As Integer, Optional CveTamaño As Integer = -1, Optional CveVentaDetalleRNC As Integer = -1)
|
||||
CveVentaDetalleRemision As Integer, CveVentaDetalleCotizacion As Integer, Optional CveTamaño As Integer = -1, Optional CveVentaDetalleRNC As Integer = -1,
|
||||
Optional CodigoObjetoImpuesto As String = "")
|
||||
|
||||
Dim Row As DataRow = Nothing
|
||||
Row = TmpDT.NewRow()
|
||||
@@ -28929,6 +28942,8 @@ Partial Class Ventas
|
||||
Row("CveTamaño") = CveTamaño
|
||||
Row("CveVentaDetalleRNC") = CveVentaDetalleRNC
|
||||
|
||||
Row("CodigoObjetoImpuesto") = CodigoObjetoImpuesto
|
||||
|
||||
TmpDT.Rows.Add(Row)
|
||||
End Sub
|
||||
|
||||
@@ -29045,7 +29060,7 @@ Partial Class Ventas
|
||||
Else
|
||||
ObjVentasAplicar = New ClsVentas
|
||||
End If
|
||||
If ObjVentasAplicar.GetVenta(pCveVenta, UsuarioActual.CveEmpresa) AndAlso ObjVentasAplicar.DtResultados.Rows.Count > 0 Then
|
||||
If ObjVentasAplicar.GetVenta(pCveVenta, UsuarioActual.CveEmpresa, VerificaAlmacen:=False) AndAlso ObjVentasAplicar.DtResultados.Rows.Count > 0 Then
|
||||
Folio = ObjVentasAplicar.DtResultados.FiltroPrimeroValor("SerieFolio").ToString()
|
||||
FolioFiscal = ObjVentasAplicar.DtResultados.FiltroPrimeroValor("FolioFiscal").ToString()
|
||||
TC = ObjVentasAplicar.DtResultados.FiltroPrimeroValor("TipoCambio").ToString().ToDecimal()
|
||||
@@ -29613,7 +29628,7 @@ Partial Class Ventas
|
||||
Guia = ObjInventario.DtResultados.Rows(0)("Guia").ToString()
|
||||
End If
|
||||
End If
|
||||
If ObjVentas.GetVenta(CveVenta, UsuarioActual.CveEmpresa) Then
|
||||
If ObjVentas.GetVenta(CveVenta, UsuarioActual.CveEmpresa, VerificaAlmacen:=False) Then
|
||||
If ObjVentas.DtResultados.Rows.Count > 0 Then
|
||||
SerieFolio = ObjVentas.DtResultados.Rows(0)("SerieFolio").ToString()
|
||||
PedidoContrato = ObjVentas.DtResultados.Rows(0)("PedidoContrato").ToString()
|
||||
@@ -29664,7 +29679,7 @@ Partial Class Ventas
|
||||
Guia = ObjInventario.DtResultados.Rows(0)("Guia").ToString()
|
||||
End If
|
||||
End If
|
||||
If ObjVentas.GetVenta(CveVenta, UsuarioActual.CveEmpresa) Then
|
||||
If ObjVentas.GetVenta(CveVenta, UsuarioActual.CveEmpresa, VerificaAlmacen:=False) Then
|
||||
If ObjVentas.DtResultados.Rows.Count > 0 Then
|
||||
SerieFolio = ObjVentas.DtResultados.Rows(0)("SerieFolio").ToString()
|
||||
PedidoContrato = ObjVentas.DtResultados.Rows(0)("PedidoContrato").ToString()
|
||||
@@ -31930,7 +31945,7 @@ Partial Class Ventas
|
||||
If TipoDoctoViejo = "PA" Then
|
||||
Dim RowVenta As DataRow = Nothing
|
||||
Dim ObjVentas As New ClsVentas
|
||||
If ObjVentas.GetVenta(CveVenta, UsuarioActual.CveEmpresa) Then
|
||||
If ObjVentas.GetVenta(CveVenta, UsuarioActual.CveEmpresa, VerificaAlmacen:=False) Then
|
||||
RowVenta = ObjVentas.DtResultados.Rows(0)
|
||||
End If
|
||||
ObjVentas.Dispose()
|
||||
@@ -31965,7 +31980,7 @@ Partial Class Ventas
|
||||
Dim ErrorTrans As Boolean = False
|
||||
Dim FechaVencimientoAnterior As String = ""
|
||||
|
||||
If ObjVentas.GetVenta(CveVenta, UsuarioActual.CveEmpresa) Then
|
||||
If ObjVentas.GetVenta(CveVenta, UsuarioActual.CveEmpresa, VerificaAlmacen:=False) Then
|
||||
If ObjVentas.DtResultados.Rows.Count > 0 Then
|
||||
FechaVencimientoAnterior = ObjVentas.DtResultados.Rows(0)("FechaVencimiento").ToString().ToDate.ToShortDateString
|
||||
Else
|
||||
@@ -33684,7 +33699,7 @@ Partial Class Ventas
|
||||
ObjFacturaProntoPago.FechaPago = Now
|
||||
|
||||
ObjFacturaProntoPago.CveCorte = -1
|
||||
ObjFacturaProntoPago.CveMesa = -1
|
||||
'ObjFacturaProntoPago.CveMesa = -1
|
||||
ObjFacturaProntoPago.NumeroPersonas = 0
|
||||
ObjFacturaProntoPago.CveContrato = -1
|
||||
ObjFacturaProntoPago.DescripcionContrato = ""
|
||||
@@ -33871,7 +33886,7 @@ Partial Class Ventas
|
||||
TmpDT.Columns.Add("CveMovimientoDetallePedido", GetType(Integer))
|
||||
End If
|
||||
|
||||
If ObjVentas.GetVenta(CveVentaNC, UsuarioActual.CveEmpresa) Then
|
||||
If ObjVentas.GetVenta(CveVentaNC, UsuarioActual.CveEmpresa, VerificaAlmacen:=False) Then
|
||||
If ObjVentas.DtResultados.Rows.Count > 0 Then
|
||||
Total = ObjVentas.DtResultados()(0)("Total").ToString.ToDecimal
|
||||
SubTotal = ObjVentas.DtResultados()(0)("SubTotal").ToString.ToDecimal
|
||||
@@ -35224,16 +35239,26 @@ Partial Class Ventas
|
||||
Using ObjVentas As New ClsVentas
|
||||
If ObjVentas.GetLineasAdicionalesSaldo(DdlLineaAdicional.SelectedValue.ToEntero(), CveCliente, -1, DdlMoneda.SelectedValue.ToEntero(), UsuarioActual.CveEmpresa, FechaVencimientoConsulta:=MinFecha) Then
|
||||
If ObjVentas.DtResultados.Rows.Count > 0 Then
|
||||
TxtFechaPago.Text = ObjVentas.DtResultados.Rows(0)("FechaVencimiento").ToString().ToDateTime().ToString("dd/MM/yyyy")
|
||||
Me.SaldoLineaAdicional = ObjVentas.DtResultados.Rows(0)("Saldo").ToString().ToDecimal()
|
||||
Me.CveCategoriaLineaAdicional = ObjVentas.DtResultados.Rows(0)("CveCategoria").ToString().ToEntero()
|
||||
Me.CveMonedaLineaAdicional = ObjVentas.DtResultados.Rows(0)("CveMoneda").ToString().ToEntero()
|
||||
Dim RowLinea As DataRow = ObjVentas.DtResultados.Rows(0)
|
||||
If RowLinea IsNot Nothing Then
|
||||
TxtFechaPago.Text = RowLinea("FechaVencimiento").ToString().ToDateTime().ToString("dd/MM/yyyy")
|
||||
|
||||
'AL FACTURAR CON LINEA ADICIONAL TIPO PO, SE SUMARÁN LOS DIAS DE VENCIMIENTO A LA FECHA ACTUAL
|
||||
If RowLinea("TipoLinea").ToString() = "2" Then
|
||||
TxtFechaPago.Text = Now.AddDays(RowLinea("DiasVencimiento").ToString().ToEntero()).ToString("dd/MM/yyyy")
|
||||
End If
|
||||
|
||||
Me.CveCategoriaLineaAdicional = RowLinea("CveCategoria").ToString().ToEntero()
|
||||
Me.CveMonedaLineaAdicional = RowLinea("CveMoneda").ToString().ToEntero()
|
||||
End If
|
||||
|
||||
End If
|
||||
End If
|
||||
End Using
|
||||
Else
|
||||
Me.SaldoLineaAdicional = 0
|
||||
Me.CveCategoriaLineaAdicional = 0
|
||||
TxtFechaPago.Text = Now.ToString("dd/MM/yyyy")
|
||||
End If
|
||||
|
||||
UpParametros.Update()
|
||||
|
||||
Reference in New Issue
Block a user