Pedidos 2 desde portal cliente
This commit is contained in:
@@ -525,7 +525,7 @@ Public Class ClsClientes
|
|||||||
'SqlAdapter.Dispose()
|
'SqlAdapter.Dispose()
|
||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
Public Function GetHistorialVentas(CveCliente As Integer, Optional SelectTop As Integer = -1, Optional CveClienteSucursal As Integer = -1, Optional TipoDocto As String = "-1") As Boolean
|
Public Function GetHistorialVentas(CveCliente As Integer, Optional SelectTop As Integer = -1, Optional CveClienteSucursal As Integer = -1, Optional TipoDocto As String = "-1", Optional CveEstatusFactura As Integer = -1, Optional FechaI As DateTime = ModExtensiones.MinFecha, Optional FechaF As DateTime = ModExtensiones.MaxFecha) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
|
|
||||||
DataAdapter("PA_ClienteHistorialVentas")
|
DataAdapter("PA_ClienteHistorialVentas")
|
||||||
@@ -533,6 +533,9 @@ Public Class ClsClientes
|
|||||||
SqlAdapter.SelectCommand.Parameters.Add("@SelectTop", SqlDbType.Int).Value = SelectTop
|
SqlAdapter.SelectCommand.Parameters.Add("@SelectTop", SqlDbType.Int).Value = SelectTop
|
||||||
SqlAdapter.SelectCommand.Parameters.Add("@CveClienteSucursal", SqlDbType.Int).Value = CveClienteSucursal
|
SqlAdapter.SelectCommand.Parameters.Add("@CveClienteSucursal", SqlDbType.Int).Value = CveClienteSucursal
|
||||||
SqlAdapter.SelectCommand.Parameters.Add("@TipoDocto", SqlDbType.VarChar).Value = TipoDocto
|
SqlAdapter.SelectCommand.Parameters.Add("@TipoDocto", SqlDbType.VarChar).Value = TipoDocto
|
||||||
|
SqlAdapter.SelectCommand.Parameters.Add("@CveEstatusFactura", SqlDbType.Int).Value = CveEstatusFactura
|
||||||
|
SqlAdapter.SelectCommand.Parameters.Add("@FechaI", SqlDbType.DateTime).Value = FechaI
|
||||||
|
SqlAdapter.SelectCommand.Parameters.Add("@FechaF", SqlDbType.DateTime).Value = FechaF
|
||||||
|
|
||||||
Try
|
Try
|
||||||
SqlAdapter.Fill(Data)
|
SqlAdapter.Fill(Data)
|
||||||
|
|||||||
@@ -4265,6 +4265,14 @@ Namespace Modelos
|
|||||||
Return Retorno
|
Return Retorno
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
'VALIDACION DE PEDIDOS: SI ESTA ENTEGADO NO SE PUEDA CANCELAR
|
||||||
|
If ObjFactura.TipoDocto = "Pd2" AndAlso TieneAlmacen AndAlso ObjFactura.SaldoAlmacen <> 0 Then
|
||||||
|
Retorno.Mensaje = "El pedido no se puede cancelar debido ha que ya fue entregado."
|
||||||
|
Retorno.TipoMensaje = TipoMensaje.MsgAdvertencia
|
||||||
|
|
||||||
|
Return Retorno
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
Dim CveEstatusRefacturacion As Integer = If(ObjFactura.CveEstatusRefacturacion <= 0, 0, ObjFactura.CveEstatusRefacturacion)
|
Dim CveEstatusRefacturacion As Integer = If(ObjFactura.CveEstatusRefacturacion <= 0, 0, ObjFactura.CveEstatusRefacturacion)
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<%@ Page Title="Portal Cliente" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="PortalCliente.aspx.vb" Inherits="Ventas_PortalCliente" %>
|
<%@ Page Title="Portal Cliente" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="PortalCliente.aspx.vb" EnableEventValidation="false" Inherits="Ventas_PortalCliente" %>
|
||||||
|
|
||||||
<%@ Register Assembly="eWorld.UI, Version=2.0.6.2393, Culture=neutral, PublicKeyToken=24d65337282035f2" Namespace="eWorld.UI" TagPrefix="ew" %>
|
<%@ Register Assembly="eWorld.UI, Version=2.0.6.2393, Culture=neutral, PublicKeyToken=24d65337282035f2" Namespace="eWorld.UI" TagPrefix="ew" %>
|
||||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||||
@@ -13,6 +13,55 @@
|
|||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.btnopaco {
|
||||||
|
background-color: rgba(0,0,0,0.2);
|
||||||
|
color: #FFF;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btnopaco:hover {
|
||||||
|
background-color: rgba(0,0,0,0.4);
|
||||||
|
color: #FFF;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.select2 .select2-selection__rendered {
|
||||||
|
line-height: 1;
|
||||||
|
color: #111;
|
||||||
|
}
|
||||||
|
|
||||||
|
.select2 .select2-selection--multiple {
|
||||||
|
box-sizing: border-box;
|
||||||
|
cursor: pointer;
|
||||||
|
display: block;
|
||||||
|
min-height: 20px;
|
||||||
|
user-select: none;
|
||||||
|
-webkit-user-select: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.select2-container--default .select2-selection--multiple .select2-selection__choice {
|
||||||
|
margin-top: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.select2-selection__rendered {
|
||||||
|
margin-top: 0px;
|
||||||
|
height: 25px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.select2-selection {
|
||||||
|
margin-top: 0px;
|
||||||
|
height: 31px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.select2-container--default.select2-container--focus .select2-selection--multiple {
|
||||||
|
border: none;
|
||||||
|
outline: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#chartdiv {
|
||||||
|
width: 100%;
|
||||||
|
height: 500px;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
||||||
@@ -22,13 +71,6 @@
|
|||||||
<li>
|
<li>
|
||||||
<asp:LinkButton ID="BtnDescargarXML" runat="server" Visible="false"> <i class="fa fa-file-o"></i> Descargar todos los XML</asp:LinkButton>
|
<asp:LinkButton ID="BtnDescargarXML" runat="server" Visible="false"> <i class="fa fa-file-o"></i> Descargar todos los XML</asp:LinkButton>
|
||||||
</li>
|
</li>
|
||||||
<asp:UpdatePanel ID="UpAcciones" runat="server" UpdateMode="Conditional">
|
|
||||||
<ContentTemplate>
|
|
||||||
<li>
|
|
||||||
<asp:LinkButton ID="LnkAddVenta" OnClick="LnkAddVenta_Click" runat="server"><i class="fa fa-plus"></i>Agregar Concepto</asp:LinkButton>
|
|
||||||
</li>
|
|
||||||
</ContentTemplate>
|
|
||||||
</asp:UpdatePanel>
|
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
||||||
<asp:Literal ID="LtlTitulo" runat="server" Text="Registro de Clientes"></asp:Literal> <b><asp:Literal ID="LtlCliente" runat="server"></asp:Literal></b>
|
<asp:Literal ID="LtlTitulo" runat="server" Text="Registro de Clientes"></asp:Literal> <b><asp:Literal ID="LtlCliente" runat="server"></asp:Literal></b>
|
||||||
@@ -292,36 +334,42 @@
|
|||||||
<HeaderTemplate>Días Vencidos</HeaderTemplate>
|
<HeaderTemplate>Días Vencidos</HeaderTemplate>
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Literal ID="LtlDiasVencido" runat="server" Text='<%# Eval("DiasVencidos", "{0}") %>'></asp:Literal>
|
<asp:Literal ID="LtlDiasVencido" runat="server" Text='<%# Eval("DiasVencidos", "{0}") %>'></asp:Literal>
|
||||||
|
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField>
|
<asp:TemplateField>
|
||||||
<HeaderTemplate>Monto Compra (Saldo Orig)</HeaderTemplate>
|
<HeaderTemplate>Monto Compra (Saldo Orig)</HeaderTemplate>
|
||||||
<ItemTemplate>
|
<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>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField>
|
<asp:TemplateField>
|
||||||
<HeaderTemplate>$ Abonado</HeaderTemplate>
|
<HeaderTemplate>$ Abonado</HeaderTemplate>
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Literal ID="LtlAbonado" runat="server" Text='<%# Eval("Abonado", "{0:N2}") %>'></asp:Literal>
|
<asp:Literal ID="LtlAbonado" runat="server" Text='<%# Eval("Abonado", "{0:N2}") %>'></asp:Literal>
|
||||||
|
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField>
|
<asp:TemplateField>
|
||||||
<HeaderTemplate>% Abonado</HeaderTemplate>
|
<HeaderTemplate>% Abonado</HeaderTemplate>
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Literal ID="LtlPorRecuperado" runat="server" Text='<%# Eval("PorRecuperado", "{0:N2}%") %>'></asp:Literal>
|
<asp:Literal ID="LtlPorRecuperado" runat="server" Text='<%# Eval("PorRecuperado", "{0:N2}%") %>'></asp:Literal>
|
||||||
|
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField>
|
<asp:TemplateField>
|
||||||
<HeaderTemplate>Saldo</HeaderTemplate>
|
<HeaderTemplate>Saldo</HeaderTemplate>
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Literal ID="LtlSaldo" runat="server" Text='<%# Eval("Saldo", "{0:N2}") %>'></asp:Literal>
|
<asp:Literal ID="LtlSaldo" runat="server" Text='<%# Eval("Saldo", "{0:N2}") %>'></asp:Literal>
|
||||||
|
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField>
|
<asp:TemplateField>
|
||||||
<HeaderTemplate>% A Pagar</HeaderTemplate>
|
<HeaderTemplate>% A Pagar</HeaderTemplate>
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Literal ID="LtlPorXRecuperar" runat="server" Text='<%# Eval("PorXRecuperar", "{0:N2}") %>'></asp:Literal>%
|
<asp:Literal ID="LtlPorXRecuperar" runat="server" Text='<%# Eval("PorXRecuperar", "{0:N2}") %>'></asp:Literal>%
|
||||||
|
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField>
|
<asp:TemplateField>
|
||||||
@@ -397,36 +445,42 @@
|
|||||||
<HeaderTemplate>Días Vencidos</HeaderTemplate>
|
<HeaderTemplate>Días Vencidos</HeaderTemplate>
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Literal ID="LtlDiasVencido" runat="server" Text='<%# Eval("DiasVencidos", "{0}") %>'></asp:Literal>
|
<asp:Literal ID="LtlDiasVencido" runat="server" Text='<%# Eval("DiasVencidos", "{0}") %>'></asp:Literal>
|
||||||
|
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField>
|
<asp:TemplateField>
|
||||||
<HeaderTemplate>Monto Compra (Saldo Orig)</HeaderTemplate>
|
<HeaderTemplate>Monto Compra (Saldo Orig)</HeaderTemplate>
|
||||||
<ItemTemplate>
|
<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>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField>
|
<asp:TemplateField>
|
||||||
<HeaderTemplate>$ Abonado</HeaderTemplate>
|
<HeaderTemplate>$ Abonado</HeaderTemplate>
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Literal ID="LtlAbonado" runat="server" Text='<%# Eval("Abonado", "{0:N2}") %>'></asp:Literal>
|
<asp:Literal ID="LtlAbonado" runat="server" Text='<%# Eval("Abonado", "{0:N2}") %>'></asp:Literal>
|
||||||
|
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField>
|
<asp:TemplateField>
|
||||||
<HeaderTemplate>% Abonado</HeaderTemplate>
|
<HeaderTemplate>% Abonado</HeaderTemplate>
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Literal ID="LtlPorRecuperado" runat="server" Text='<%# Eval("PorRecuperado", "{0:N2}%") %>'></asp:Literal>
|
<asp:Literal ID="LtlPorRecuperado" runat="server" Text='<%# Eval("PorRecuperado", "{0:N2}%") %>'></asp:Literal>
|
||||||
|
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField>
|
<asp:TemplateField>
|
||||||
<HeaderTemplate>Saldo</HeaderTemplate>
|
<HeaderTemplate>Saldo</HeaderTemplate>
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Literal ID="LtlSaldo" runat="server" Text='<%# Eval("Saldo", "{0:N2}") %>'></asp:Literal>
|
<asp:Literal ID="LtlSaldo" runat="server" Text='<%# Eval("Saldo", "{0:N2}") %>'></asp:Literal>
|
||||||
|
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField>
|
<asp:TemplateField>
|
||||||
<HeaderTemplate>% A Pagar</HeaderTemplate>
|
<HeaderTemplate>% A Pagar</HeaderTemplate>
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Literal ID="LtlPorXRecuperar" runat="server" Text='<%# Eval("PorXRecuperar", "{0:N2}%") %>'></asp:Literal>
|
<asp:Literal ID="LtlPorXRecuperar" runat="server" Text='<%# Eval("PorXRecuperar", "{0:N2}%") %>'></asp:Literal>
|
||||||
|
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
</Columns>
|
</Columns>
|
||||||
@@ -569,6 +623,7 @@
|
|||||||
<td>Fecha Cita:</td>
|
<td>Fecha Cita:</td>
|
||||||
<td>
|
<td>
|
||||||
<asp:TextBox ID="TxtFechaCita" runat="server" MaxLength="10" Width="94px"></asp:TextBox>
|
<asp:TextBox ID="TxtFechaCita" runat="server" MaxLength="10" Width="94px"></asp:TextBox>
|
||||||
|
|
||||||
<asp:ImageButton runat="server" ID="ImgFechaCita" ImageUrl="/Imagenes/calendar.png" ImageAlign="AbsMiddle" Width="16px" Height="16px" AlternateText="Click para ver el Calendario" />
|
<asp:ImageButton runat="server" ID="ImgFechaCita" ImageUrl="/Imagenes/calendar.png" ImageAlign="AbsMiddle" Width="16px" Height="16px" AlternateText="Click para ver el Calendario" />
|
||||||
<ajax:MaskedEditExtender ID="MEEFechaCita" runat="server" TargetControlID="TxtFechaCita" Mask="99/99/9999" MaskType="Date" UserDateFormat="DayMonthYear" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
<ajax:MaskedEditExtender ID="MEEFechaCita" runat="server" TargetControlID="TxtFechaCita" Mask="99/99/9999" MaskType="Date" UserDateFormat="DayMonthYear" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||||
<ajax:CalendarExtender runat="server" ID="CEFechaCita" TargetControlID="TxtFechaCita" PopupButtonID="ImgFechaCita" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
<ajax:CalendarExtender runat="server" ID="CEFechaCita" TargetControlID="TxtFechaCita" PopupButtonID="ImgFechaCita" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||||
@@ -576,9 +631,11 @@
|
|||||||
<asp:CompareValidator ID="CVFechaCita" runat="server" ControlToValidate="TxtFechaCita" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''FechaCita''</b> no tiene el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpGuardar"></asp:CompareValidator>
|
<asp:CompareValidator ID="CVFechaCita" runat="server" ControlToValidate="TxtFechaCita" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''FechaCita''</b> no tiene el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpGuardar"></asp:CompareValidator>
|
||||||
<ajax:ValidatorCalloutExtender ID="VCOFechaCita1" runat="server" HighlightCssClass="vco" TargetControlID="RFVFechaCita" Width="350px"></ajax:ValidatorCalloutExtender>
|
<ajax:ValidatorCalloutExtender ID="VCOFechaCita1" runat="server" HighlightCssClass="vco" TargetControlID="RFVFechaCita" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||||
|
|
||||||
|
|
||||||
<ajax:ValidatorCalloutExtender ID="VCOFechaCita2" runat="server" HighlightCssClass="vco" TargetControlID="CVFechaCita" Width="350px"></ajax:ValidatorCalloutExtender>
|
<ajax:ValidatorCalloutExtender ID="VCOFechaCita2" runat="server" HighlightCssClass="vco" TargetControlID="CVFechaCita" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||||
|
|
||||||
Hora:
|
Hora:
|
||||||
|
|
||||||
<ew:TimePicker ID="TxtHoraCita" runat="server" ControlDisplay="TextBoxImage" ImageUrl="/Imagenes/tool_timer.png" PopupWidth="100px" Width="70px" DisableTextBoxEntry="True" PopupHeight="150px" RoundUpMinutes="True" MilitaryTime="True" Culture="Spanish (Mexico)" LowerBoundTime="07:00" UpperBoundTime="20:30">
|
<ew:TimePicker ID="TxtHoraCita" runat="server" ControlDisplay="TextBoxImage" ImageUrl="/Imagenes/tool_timer.png" PopupWidth="100px" Width="70px" DisableTextBoxEntry="True" PopupHeight="150px" RoundUpMinutes="True" MilitaryTime="True" Culture="Spanish (Mexico)" LowerBoundTime="07:00" UpperBoundTime="20:30">
|
||||||
<TimeStyle CssClass="Texto" />
|
<TimeStyle CssClass="Texto" />
|
||||||
</ew:TimePicker>
|
</ew:TimePicker>
|
||||||
@@ -897,6 +954,7 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<asp:TextBox ID="TxtFechaQueja" runat="server" MaxLength="10" Width="94px"></asp:TextBox>
|
<asp:TextBox ID="TxtFechaQueja" runat="server" MaxLength="10" Width="94px"></asp:TextBox>
|
||||||
|
|
||||||
<asp:ImageButton runat="server" ID="ImgFechaQueja" ImageUrl="/Imagenes/calendar.png" ImageAlign="AbsMiddle" Width="16px" Height="16px" AlternateText="Click para ver el Calendario" />
|
<asp:ImageButton runat="server" ID="ImgFechaQueja" ImageUrl="/Imagenes/calendar.png" ImageAlign="AbsMiddle" Width="16px" Height="16px" AlternateText="Click para ver el Calendario" />
|
||||||
<ajax:MaskedEditExtender ID="MEEFechaQueja" runat="server" TargetControlID="TxtFechaQueja" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
<ajax:MaskedEditExtender ID="MEEFechaQueja" runat="server" TargetControlID="TxtFechaQueja" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||||
<ajax:CalendarExtender runat="server" ID="CEFechaQueja" TargetControlID="TxtFechaQueja" PopupButtonID="ImgFechaQueja" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
<ajax:CalendarExtender runat="server" ID="CEFechaQueja" TargetControlID="TxtFechaQueja" PopupButtonID="ImgFechaQueja" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||||
@@ -904,12 +962,14 @@
|
|||||||
<asp:CompareValidator ID="CVFechaQueja" runat="server" ControlToValidate="TxtFechaQueja" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''FechaQueja''</b> no tiene el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpGuardar"></asp:CompareValidator>
|
<asp:CompareValidator ID="CVFechaQueja" runat="server" ControlToValidate="TxtFechaQueja" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''FechaQueja''</b> no tiene el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpGuardar"></asp:CompareValidator>
|
||||||
<ajax:ValidatorCalloutExtender ID="VCOFechaQueja1" runat="server" HighlightCssClass="vco" TargetControlID="RFVFechaQueja" Width="350px"></ajax:ValidatorCalloutExtender>
|
<ajax:ValidatorCalloutExtender ID="VCOFechaQueja1" runat="server" HighlightCssClass="vco" TargetControlID="RFVFechaQueja" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||||
|
|
||||||
|
|
||||||
<ajax:ValidatorCalloutExtender ID="VCOFechaQueja2" runat="server" HighlightCssClass="vco" TargetControlID="CVFechaQueja" Width="350px"></ajax:ValidatorCalloutExtender>
|
<ajax:ValidatorCalloutExtender ID="VCOFechaQueja2" runat="server" HighlightCssClass="vco" TargetControlID="CVFechaQueja" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||||
|
|
||||||
Hora:
|
Hora:
|
||||||
<ew:TimePicker ID="TxtHora" runat="server" ControlDisplay="TextBoxImage" ImageUrl="/Imagenes/tool_timer.png" PopupWidth="100px" Width="70px" DisableTextBoxEntry="True" PopupHeight="150px" RoundUpMinutes="True" MilitaryTime="True" Culture="Spanish (Mexico)" LowerBoundTime="07:00" UpperBoundTime="20:30">
|
|
||||||
<TimeStyle CssClass="Texto" />
|
<ew:TimePicker ID="TxtHora" runat="server" ControlDisplay="TextBoxImage" ImageUrl="/Imagenes/tool_timer.png" PopupWidth="100px" Width="70px" DisableTextBoxEntry="True" PopupHeight="150px" RoundUpMinutes="True" MilitaryTime="True" Culture="Spanish (Mexico)" LowerBoundTime="07:00" UpperBoundTime="20:30">
|
||||||
</ew:TimePicker>
|
<TimeStyle CssClass="Texto" />
|
||||||
|
</ew:TimePicker>
|
||||||
<ew:CustomValidator ID="CVHora" runat="server" ClientValidationFunction="RevisaHora" ControlToValidate="TxtHora" Display="None" ErrorMessage="El campo <b>''Hora''</b> es necesario, por favor seleccione la hora correcta." ValidationGroup="Guardar" ValidateEmptyText="true"></ew:CustomValidator>
|
<ew:CustomValidator ID="CVHora" runat="server" ClientValidationFunction="RevisaHora" ControlToValidate="TxtHora" Display="None" ErrorMessage="El campo <b>''Hora''</b> es necesario, por favor seleccione la hora correcta." ValidationGroup="Guardar" ValidateEmptyText="true"></ew:CustomValidator>
|
||||||
<ajax:ValidatorCalloutExtender ID="VcoHora" runat="server" HighlightCssClass="vco" TargetControlID="CVHora" Width="300px"></ajax:ValidatorCalloutExtender>
|
<ajax:ValidatorCalloutExtender ID="VcoHora" runat="server" HighlightCssClass="vco" TargetControlID="CVHora" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||||
<asp:Button ID="BtnConsultarPersonal" runat="server" Text="Consultar" class="btn btn-primary" />
|
<asp:Button ID="BtnConsultarPersonal" runat="server" Text="Consultar" class="btn btn-primary" />
|
||||||
@@ -980,6 +1040,7 @@
|
|||||||
<th width="250px">
|
<th width="250px">
|
||||||
<asp:LinkButton ID="LbNombre" runat="server" CausesValidation="false" Text="" CommandArgument="Nombre0;0" OnClick="LbOrden_Click">
|
<asp:LinkButton ID="LbNombre" runat="server" CausesValidation="false" Text="" CommandArgument="Nombre0;0" OnClick="LbOrden_Click">
|
||||||
Nombre
|
Nombre
|
||||||
|
|
||||||
<asp:Literal ID="ImgNombre0" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
<asp:Literal ID="ImgNombre0" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||||
</asp:LinkButton></th>
|
</asp:LinkButton></th>
|
||||||
</tr>
|
</tr>
|
||||||
@@ -1028,11 +1089,6 @@
|
|||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
</ajax:TabPanel>
|
</ajax:TabPanel>
|
||||||
|
|
||||||
<%-- <ajax:TabPanel ID="TabCotizaciones" runat="server" HeaderText="<i class='fa fa-dollar'></i> Cotizaciones" Visible="False">
|
|
||||||
<ContentTemplate>
|
|
||||||
</ContentTemplate>
|
|
||||||
</ajax:TabPanel>--%>
|
|
||||||
|
|
||||||
<ajax:TabPanel ID="TabSistema" runat="server" HeaderText="<i class='fa fa-tasks'></i> Sistema" Visible="False">
|
<ajax:TabPanel ID="TabSistema" runat="server" HeaderText="<i class='fa fa-tasks'></i> Sistema" Visible="False">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
<asp:UpdatePanel ID="UPPUsuarios" runat="server" UpdateMode="Conditional">
|
<asp:UpdatePanel ID="UPPUsuarios" runat="server" UpdateMode="Conditional">
|
||||||
@@ -1052,11 +1108,13 @@
|
|||||||
<th width="130px">
|
<th width="130px">
|
||||||
<asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="false" Text="" CommandArgument="Nombre1;1" OnClick="LbOrden_Click">
|
<asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="false" Text="" CommandArgument="Nombre1;1" OnClick="LbOrden_Click">
|
||||||
Nombre
|
Nombre
|
||||||
|
|
||||||
<asp:Literal ID="ImgNombre1" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
<asp:Literal ID="ImgNombre1" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||||
</asp:LinkButton></th>
|
</asp:LinkButton></th>
|
||||||
<th width="130px">
|
<th width="130px">
|
||||||
<asp:LinkButton ID="LinkButton5" runat="server" CausesValidation="false" Text="" CommandArgument="Correo1;1" OnClick="LbOrden_Click">
|
<asp:LinkButton ID="LinkButton5" runat="server" CausesValidation="false" Text="" CommandArgument="Correo1;1" OnClick="LbOrden_Click">
|
||||||
Correo/Usuario
|
Correo/Usuario
|
||||||
|
|
||||||
<asp:Literal ID="ImgCorreo1" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
<asp:Literal ID="ImgCorreo1" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||||
</asp:LinkButton></th>
|
</asp:LinkButton></th>
|
||||||
<th width="50px" style="text-align: center;">
|
<th width="50px" style="text-align: center;">
|
||||||
@@ -1079,16 +1137,19 @@
|
|||||||
<th width="56px">
|
<th width="56px">
|
||||||
<asp:LinkButton ID="LbEstatus" runat="server" CausesValidation="false" Text="" CommandArgument="Estatus1;1" OnClick="LbOrden_Click">
|
<asp:LinkButton ID="LbEstatus" runat="server" CausesValidation="false" Text="" CommandArgument="Estatus1;1" OnClick="LbOrden_Click">
|
||||||
Est
|
Est
|
||||||
|
|
||||||
<asp:Literal ID="ImgEstatus1" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
<asp:Literal ID="ImgEstatus1" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||||
</asp:LinkButton></th>
|
</asp:LinkButton></th>
|
||||||
<th width="80px">
|
<th width="80px">
|
||||||
<asp:LinkButton ID="LinkButton2" runat="server" CausesValidation="false" Text="" CommandArgument="FechaIng1;1" OnClick="LbOrden_Click">
|
<asp:LinkButton ID="LinkButton2" runat="server" CausesValidation="false" Text="" CommandArgument="FechaIng1;1" OnClick="LbOrden_Click">
|
||||||
Fecha
|
Fecha
|
||||||
|
|
||||||
<asp:Literal ID="ImgFechaIng1" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
<asp:Literal ID="ImgFechaIng1" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||||
</asp:LinkButton></th>
|
</asp:LinkButton></th>
|
||||||
<th width="100px">
|
<th width="100px">
|
||||||
<asp:LinkButton ID="LinkButton3" runat="server" CausesValidation="false" Text="" CommandArgument="UsuarioCreo1;1" OnClick="LbOrden_Click">
|
<asp:LinkButton ID="LinkButton3" runat="server" CausesValidation="false" Text="" CommandArgument="UsuarioCreo1;1" OnClick="LbOrden_Click">
|
||||||
Usuario
|
Usuario
|
||||||
|
|
||||||
<asp:Literal ID="ImgUsuarioCreo1" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
<asp:Literal ID="ImgUsuarioCreo1" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||||
</asp:LinkButton></th>
|
</asp:LinkButton></th>
|
||||||
<th width="140px">Comandos</th>
|
<th width="140px">Comandos</th>
|
||||||
@@ -1287,6 +1348,166 @@
|
|||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
</ajax:TabPanel>
|
</ajax:TabPanel>
|
||||||
|
|
||||||
|
<ajax:TabPanel ID="TabPedidos" runat="server" HeaderText="<i class='fa fa-book'></i> Pedidos">
|
||||||
|
<ContentTemplate>
|
||||||
|
<asp:UpdatePanel ID="UpTabPedidos" runat="server" UpdateMode="Conditional">
|
||||||
|
<ContentTemplate>
|
||||||
|
<asp:UpdatePanel runat="server" ID="UpOpciones" class="portlet-body form" UpdateMode="Conditional">
|
||||||
|
<ContentTemplate>
|
||||||
|
<asp:UpdatePanel ID="UPFiltros" runat="server" UpdateMode="Conditional">
|
||||||
|
<ContentTemplate>
|
||||||
|
<div class="portlet solid grey-cascade portlet-filter" id="idnecesaria">
|
||||||
|
<div class="portlet-title portlet-filterT smalltitle">
|
||||||
|
<div class="tools">
|
||||||
|
<asp:Button ID="BtnConsultar" runat="server" Text="Consultar" class="btn btn-primary" OnClick="BtnConsultar_Click" />
|
||||||
|
<a href="javascript:;" class="expand"></a>
|
||||||
|
</div>
|
||||||
|
<div class="titlefiltros caption">
|
||||||
|
<div class="row" style="height: 32px;">
|
||||||
|
<label class="col-md-1">Estatus: </label>
|
||||||
|
<div class="col-md-2">
|
||||||
|
<asp:DropDownList ID="DdlEstatus" runat="server" AppendDataBoundItems="true" DataTextField="EstatusFactura" DataValueField="CveEstatusFactura" Class="table-group-action-input form-control input-inline input-small input-sm select2me">
|
||||||
|
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
|
||||||
|
</asp:DropDownList>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-1 truncate">
|
||||||
|
Fecha Inicio:
|
||||||
|
</div>
|
||||||
|
<div class="col-md-1" style="min-width: 115px">
|
||||||
|
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100px !important; padding: 0px;">
|
||||||
|
<asp:TextBox Width="80px" ID="txtFechaI" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||||
|
<span class="input-group-btn ">
|
||||||
|
<asp:LinkButton ID="imgCalendario" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<ajax:MaskedEditExtender ID="MEEFechaI" runat="server" TargetControlID="txtFechaI" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||||
|
<ajax:CalendarExtender runat="server" ID="Calendario" TargetControlID="txtFechaI" PopupButtonID="ImgCalendario" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||||
|
<asp:RequiredFieldValidator ID="rfvFechaI" runat="server" ControlToValidate="txtFechaI" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>
|
||||||
|
<asp:CompareValidator ID="cvFechaI" runat="server" ControlToValidate="txtFechaI" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida"></asp:CompareValidator>
|
||||||
|
<ajax:ValidatorCalloutExtender ID="vcoFfvFI" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||||
|
<ajax:ValidatorCalloutExtender ID="vcoCvFI" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-1 truncate">
|
||||||
|
Fecha Fin:
|
||||||
|
</div>
|
||||||
|
<div class="col-md-1" style="min-width: 115px">
|
||||||
|
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100px !important; padding: 0px;">
|
||||||
|
<asp:TextBox Width="80px" ID="txtFechaF" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||||
|
<span class="input-group-btn ">
|
||||||
|
<asp:LinkButton ID="imgCalendarioF" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<ajax:MaskedEditExtender ID="MEEFechaF" runat="server" TargetControlID="txtFechaF" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||||
|
<ajax:CalendarExtender runat="server" ID="Calendario2" TargetControlID="txtFechaF" PopupButtonID="imgCalendarioF" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||||
|
<asp:RequiredFieldValidator ID="rfvFechaF" runat="server" ControlToValidate="txtFechaF" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>
|
||||||
|
<asp:CompareValidator ID="cvFechaF" runat="server" ControlToValidate="txtFechaF" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida"></asp:CompareValidator>
|
||||||
|
<ajax:ValidatorCalloutExtender ID="vcoRfvFF" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||||
|
<ajax:ValidatorCalloutExtender ID="vcoCvFF" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="portlet-body" style="display: none">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-12">
|
||||||
|
<fieldset>
|
||||||
|
<legend><b>Historial de Pedidos</b>
|
||||||
|
<asp:LinkButton ID="LnkAddPedido" OnClick="LnkAddPedido_Click" runat="server" CssClass="btn btn-sm btn-circle btn-primary" Style="float: right;"><i class="fa fa-plus"></i>  Agregar Pedido</asp:LinkButton> 
|
||||||
|
<asp:LinkButton ID="BtnExcelHistorialPedidos" OnClick="BtnExcelHistorialPedidos_Click" runat="server" CssClass="btn btn-sm btn-circle btn-success" Style="float: right;"><i class="fa fa-download"></i>  Descarga Excel</asp:LinkButton> 
|
||||||
|
</legend>
|
||||||
|
<table border="0" id="Table1" runat="server" style="width: 100%">
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<asp:GridView ID="GvPedidos" runat="server" Width="100%" OnRowDataBound="GvPedidos_RowDataBound" DataKeyNames="CveVenta,Total,SerieFolio" AutoGenerateColumns="False" EmptyDataText="No se encontraron pedidos en el cliente" ToolTip="Listado de pedidos" CssClass="table table-striped table-advance table-hover " Style="margin-top: -10px; text-align: center;" GridLines="None">
|
||||||
|
<Columns>
|
||||||
|
<asp:TemplateField>
|
||||||
|
<HeaderTemplate>Pedido</HeaderTemplate>
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:Literal ID="LtlPedido" runat="server" Text='<%# Eval("SerieFolio") %>'></asp:Literal>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
<asp:TemplateField>
|
||||||
|
<HeaderTemplate>Fecha</HeaderTemplate>
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:Literal ID="LtlFecha" runat="server" Text='<%# Eval("Fecha", "{0:d}") %>'></asp:Literal>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
<asp:TemplateField>
|
||||||
|
<HeaderTemplate>Sub Total</HeaderTemplate>
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:Literal ID="LtlSubTotal" runat="server" Text='<%# If(CDbl(Eval("SubTotal")) = 0, "", Eval("SubTotal", "{0:N2}")) %>'></asp:Literal>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
<asp:TemplateField>
|
||||||
|
<HeaderTemplate>Descuento</HeaderTemplate>
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:Literal ID="LtlDescuento" runat="server" Text='<%# If(CDbl(Eval("Descuento")) = 0, "", Eval("Descuento", "{0:N2}")) %>'></asp:Literal>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
<asp:TemplateField>
|
||||||
|
<HeaderTemplate>Amortización</HeaderTemplate>
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:Literal ID="LtlAmort" runat="server" Text='<%# If(CDbl(Eval("Amortizacion")) = 0, "", Eval("Amortizacion", "{0:N2}")) %>'></asp:Literal>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
<asp:TemplateField>
|
||||||
|
<HeaderTemplate>Total</HeaderTemplate>
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:Literal ID="LtlTotal" runat="server" Text='<%# If(CDbl(Eval("Total")) = 0, "", Eval("Total", "{0:N2}")) %>'></asp:Literal>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
<asp:TemplateField>
|
||||||
|
<HeaderTemplate>Moneda</HeaderTemplate>
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:Literal ID="LtlMoneda" runat="server" Text='<%# Eval("Abreviatura") %>'></asp:Literal>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
<asp:TemplateField>
|
||||||
|
<HeaderTemplate>Estatus</HeaderTemplate>
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:Label ID="LtlEstatus" runat="server" Text='<%# Eval("EstatusFactura") %>'></asp:Label>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
<asp:TemplateField HeaderText="Abonar">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:LinkButton ID="ImgAbonar" runat="server" CausesValidation="False" OnClick="ImgAbonar_Click" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-usd'></i>" data-toggle="confirmation" data-popout="true" data-original-title="¿Esta seguro de registrar un pago?" data-btn-ok-label="si" />
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
<asp:TemplateField HeaderText="Cancelar">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:LinkButton ID="ImgCancelar" runat="server" CausesValidation="False" OnClick="ImgCancelar_Click" CssClass="btn btn-circle btn-sm red" Text="<i class='fa fa-close'></i>" data-toggle="confirmation" data-popout="true" data-original-title="¿Esta seguro de cancelar el pedido?" data-btn-ok-label="si" />
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
</Columns>
|
||||||
|
<RowStyle CssClass="Texto" />
|
||||||
|
<AlternatingRowStyle CssClass="TextoAlterno" />
|
||||||
|
<HeaderStyle CssClass="Titulos" />
|
||||||
|
</asp:GridView>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="text-align: right;">
|
||||||
|
<asp:LinkButton ID="LnkVerMasPedidos" runat="server" Text="Ver Más" CssClass="btn btn-primary" OnClick="BtnVerMasPedidos_Click" />
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</fieldset>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</ContentTemplate>
|
||||||
|
<Triggers>
|
||||||
|
<asp:PostBackTrigger ControlID="BtnExcelHistorialPedidos" />
|
||||||
|
</Triggers>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
</ContentTemplate>
|
||||||
|
</ajax:TabPanel>
|
||||||
|
|
||||||
<ajax:TabPanel ID="TabContraseña" runat="server" HeaderText="<i class='fa fa-lock'></i> Contraseña" Visible="False">
|
<ajax:TabPanel ID="TabContraseña" runat="server" HeaderText="<i class='fa fa-lock'></i> Contraseña" Visible="False">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
<asp:UpdatePanel ID="UPPContraseña" runat="server" UpdateMode="Conditional">
|
<asp:UpdatePanel ID="UPPContraseña" runat="server" UpdateMode="Conditional">
|
||||||
@@ -1352,132 +1573,139 @@
|
|||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
</ajax:TabPanel>
|
</ajax:TabPanel>
|
||||||
|
|
||||||
<ajax:TabPanel ID="TabPedidos" runat="server" HeaderText="Pedido">
|
|
||||||
<ContentTemplate>
|
|
||||||
<asp:UpdatePanel ID="UpTabPedidos" runat="server" UpdateMode="Conditional">
|
|
||||||
<ContentTemplate>
|
|
||||||
<div class="row">
|
|
||||||
<label class="col-md-2">Observaciones</label>
|
|
||||||
<div class="col-md-2">
|
|
||||||
<asp:TextBox ID="TxtObsFact" runat="server" Rows="3" TextMode="MultiLine" Width="100%" MaxLength="800" CssClass="form-control input-sm"></asp:TextBox>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<br />
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-md-12">
|
|
||||||
<asp:GridView ID="GvPS" GridLines="None" runat="server" AutoGenerateColumns="False"
|
|
||||||
DataKeyNames="Consec,CvePS,Total, IEPS, CveClasificacion,CveUM,CveProyecto,CveSubProyecto,TipoDocto,PS,Obs,Cantidad,PU,Descuento,IVA,
|
|
||||||
CantidadInventario,CantidadFacturadaRem"
|
|
||||||
CssClass="table table-striped table-advance table-hover Widthall Sortable mysmallbtn ScrollAD" ShowHeaderWhenEmpty="true"
|
|
||||||
Width="99%">
|
|
||||||
<Columns>
|
|
||||||
<%--0--%>
|
|
||||||
<asp:BoundField DataField="Consec" ItemStyle-Font-Size="6pt" DataFormatString="{0:N0}" ItemStyle-HorizontalAlign="Center" />
|
|
||||||
<%--1--%>
|
|
||||||
<asp:BoundField DataField="Cantidad" HeaderText="Cantidad" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
|
||||||
<%--2--%>
|
|
||||||
<asp:BoundField DataField="UM" HeaderText="UM" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
|
||||||
<%--3--%>
|
|
||||||
<asp:TemplateField HeaderText="Clasificación/Producto Servicio">
|
|
||||||
<ItemTemplate>
|
|
||||||
<span style="min-width: 220px; border-bottom: 1px solid gray;">
|
|
||||||
<asp:Label ID="LblClasificacion" runat="server" Text='<%# Eval("Clasificacion") %>'></asp:Label>
|
|
||||||
</span>
|
|
||||||
<br />
|
|
||||||
<asp:Label ID="LblPS" runat="server" Text='<%# Eval("CodigoPS") %>'></asp:Label>
|
|
||||||
</ItemTemplate>
|
|
||||||
</asp:TemplateField>
|
|
||||||
<%--4--%>
|
|
||||||
<asp:BoundField DataField="Obs" HeaderText="Observaciones" ItemStyle-HorizontalAlign="Left" />
|
|
||||||
<%--5--%>
|
|
||||||
<%-- <asp:TemplateField HeaderText="Proyecto/SubProyecto">
|
|
||||||
<ItemTemplate>
|
|
||||||
<asp:Label Style="border-bottom: 1px solid gray;" ID="LblProyecto" runat="server" Text='<%# Eval("Proyecto", "{0}<br />") %>'></asp:Label>
|
|
||||||
<asp:Label ID="LblSubProyecto" runat="server" Text='<%# Eval("SubProyecto") %>' Width="90px"></asp:Label>
|
|
||||||
</ItemTemplate>
|
|
||||||
</asp:TemplateField>--%>
|
|
||||||
<%--6--%>
|
|
||||||
<asp:BoundField DataField="PU" HeaderText="PU" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
|
||||||
<%--7--%>
|
|
||||||
<asp:BoundField DataField="ImporteIVA" HeaderText="IVA" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
|
||||||
<%--8--%>
|
|
||||||
<asp:BoundField DataField="TotalImporte" HeaderText="Total" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
|
||||||
<%--9--%>
|
|
||||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center" HeaderText="Editar">
|
|
||||||
<ItemTemplate>
|
|
||||||
<asp:LinkButton ID="LnkEditar" runat="server" AlternateText="Editar" CausesValidation="False"
|
|
||||||
CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-pencil'></i>" OnClick="LnkEditar_Click" />
|
|
||||||
</ItemTemplate>
|
|
||||||
</asp:TemplateField>
|
|
||||||
<%--10--%>
|
|
||||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center" HeaderText="Eliminar">
|
|
||||||
<ItemTemplate>
|
|
||||||
<asp:LinkButton ID="LnkEliminar" 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" OnClick="LnkEliminar_Click" />
|
|
||||||
</ItemTemplate>
|
|
||||||
</asp:TemplateField>
|
|
||||||
</Columns>
|
|
||||||
</asp:GridView>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-md-6"></div>
|
|
||||||
<div class="col-md-6">
|
|
||||||
<table border="0" rules="none" class="well TextTab" style="float: right;">
|
|
||||||
<tr align="right">
|
|
||||||
<td style="width: 150px;"><b>SubTotal:</b></td>
|
|
||||||
<td width="82px">
|
|
||||||
<asp:TextBox ID="TxtSubTotal" Enabled="false" runat="server" BorderStyle="None" Style="text-align: right;" Text="0.00" Width="78px"></asp:TextBox></td>
|
|
||||||
</tr>
|
|
||||||
<tr align="right">
|
|
||||||
<td style="border: 1px none white"><b>IVA:</b></td>
|
|
||||||
<td>
|
|
||||||
<asp:TextBox ID="TxtIVA" Enabled="false" runat="server" BorderStyle="None" Style="text-align: right;" Text="0.00" Width="78px"></asp:TextBox></td>
|
|
||||||
<td> </td>
|
|
||||||
</tr>
|
|
||||||
<tr align="right">
|
|
||||||
<td><b>Total:</b></td>
|
|
||||||
<td>
|
|
||||||
<asp:TextBox ID="TxtTotal" runat="server" BorderStyle="None" Style="text-align: right;" Text="0.00" Width="78px"></asp:TextBox>
|
|
||||||
</td>
|
|
||||||
<td><b>Moneda:</b></td>
|
|
||||||
<td>
|
|
||||||
<asp:DropDownList ID="DdlMoneda" OnSelectedIndexChanged="DdlMoneda_SelectedIndexChanged" ClientIDMode="Static" CssClass="form-control input-sm" runat="server" DataTextField="Moneda" AppendDataBoundItems="true" AutoPostBack="true" DataValueField="CveMoneda" Width="70px"></asp:DropDownList>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr id="TrConversionTipoCambio" runat="server" visible="false" align="right">
|
|
||||||
<td><b>T.C.:</b></td>
|
|
||||||
<td>
|
|
||||||
<asp:TextBox ID="TxtTipoCambio" runat="server" CssClass="form-control input-sm" MaxLength="7" Text="1" Enabled="true" Width="70px"></asp:TextBox>
|
|
||||||
<asp:CompareValidator ID="CVTipoCambio" runat="server" ControlToValidate="TxtTipoCambio" Display="None" ErrorMessage="El campo <b>''Tipo de Cambio''</b> no tiene el formato correcto, por favor corrija e intente de nuevo (Solo formato numérico)." Operator="DataTypeCheck" Type="Double" ValidationGroup="GrpVenta"></asp:CompareValidator>
|
|
||||||
<ajax:ValidatorCalloutExtender ID="VCOTipoCambio" runat="server" HighlightCssClass="vco" TargetControlID="CVTipoCambio" Width="300px"></ajax:ValidatorCalloutExtender>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<asp:UpdatePanel runat="server" ID="UpOpciones" class="portlet-body form" UpdateMode="Conditional">
|
|
||||||
<ContentTemplate>
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-md-12" align="center">
|
|
||||||
<asp:Button ID="BtnGuardar" CssClass="btn btn-primary" OnClick="BtnGuardar_Click" Style="margin-top: 5px;" runat="server" Text="Guardar" Width="170px" ValidationGroup="GrpVenta" />
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</ContentTemplate>
|
|
||||||
</asp:UpdatePanel>
|
|
||||||
</ContentTemplate>
|
|
||||||
</asp:UpdatePanel>
|
|
||||||
</ContentTemplate>
|
|
||||||
</ajax:TabPanel>
|
|
||||||
|
|
||||||
</ajax:TabContainer>
|
</ajax:TabContainer>
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
<div id="DivVenta" class="modal ADS fade" role="dialog">
|
||||||
|
<div class="modal-dialog">
|
||||||
|
<asp:UpdatePanel ID="UpAddPedido" style="width: 1200px;" class="modal-content rowpadding" tabindex="-1" runat="server" UpdateMode="Conditional">
|
||||||
|
<ContentTemplate>
|
||||||
|
<div class="modal-header">
|
||||||
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||||
|
<span aria-hidden="true">×</span>
|
||||||
|
</button>
|
||||||
|
<h4 class="modal-title">Registrar Pedido</h4>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body">
|
||||||
|
<div class="row">
|
||||||
|
<label class="col-md-2">Observaciones</label>
|
||||||
|
<div class="col-md-10">
|
||||||
|
<asp:TextBox ID="TxtObsFact" runat="server" Rows="3" TextMode="MultiLine" Width="100%" MaxLength="800" CssClass="form-control input-sm"></asp:TextBox>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<br />
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-12" style="text-align: right">
|
||||||
|
<asp:LinkButton ID="LnkAddPSVenta" OnClick="LnkAddPSVenta_Click" runat="server" CssClass="btn btn-sm btn-circle btn-success"><i class="fa fa-plus"></i>  Agregar Concepto</asp:LinkButton>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<br />
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-12">
|
||||||
|
<asp:GridView ID="GvPS" GridLines="None" runat="server" AutoGenerateColumns="False"
|
||||||
|
DataKeyNames="Consec,CvePS,Total, IEPS, CveClasificacion,CveUM,CveProyecto,CveSubProyecto,TipoDocto,PS,Obs,Cantidad,PU,Descuento,IVA,
|
||||||
|
CantidadInventario,CantidadFacturadaRem"
|
||||||
|
CssClass="table table-striped table-advance table-hover Widthall Sortable mysmallbtn ScrollAD" ShowHeaderWhenEmpty="true"
|
||||||
|
Width="100%">
|
||||||
|
<Columns>
|
||||||
|
<%--0--%>
|
||||||
|
<asp:BoundField DataField="Consec" ItemStyle-Font-Size="6pt" DataFormatString="{0:N0}" ItemStyle-HorizontalAlign="Center" />
|
||||||
|
<%--1--%>
|
||||||
|
<asp:BoundField DataField="Cantidad" HeaderText="Cantidad" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||||
|
<%--2--%>
|
||||||
|
<asp:BoundField DataField="UM" HeaderText="UM" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||||
|
<%--3--%>
|
||||||
|
<asp:TemplateField HeaderText="Clasificación/Producto Servicio">
|
||||||
|
<ItemTemplate>
|
||||||
|
<span style="min-width: 220px; border-bottom: 1px solid gray;">
|
||||||
|
<asp:Label ID="LblClasificacion" runat="server" Text='<%# Eval("Clasificacion") %>'></asp:Label>
|
||||||
|
</span>
|
||||||
|
<br />
|
||||||
|
<asp:Label ID="LblPS" runat="server" Text='<%# Eval("CodigoPS") %>'></asp:Label>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
<%--4--%>
|
||||||
|
<asp:BoundField DataField="Obs" HeaderText="Observaciones" ItemStyle-HorizontalAlign="Left" />
|
||||||
|
<%--5--%>
|
||||||
|
<%-- <asp:TemplateField HeaderText="Proyecto/SubProyecto">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:Label Style="border-bottom: 1px solid gray;" ID="LblProyecto" runat="server" Text='<%# Eval("Proyecto", "{0}<br />") %>'></asp:Label>
|
||||||
|
<asp:Label ID="LblSubProyecto" runat="server" Text='<%# Eval("SubProyecto") %>' Width="90px"></asp:Label>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>--%>
|
||||||
|
<%--6--%>
|
||||||
|
<asp:BoundField DataField="PU" HeaderText="PU" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||||
|
<%--7--%>
|
||||||
|
<asp:BoundField DataField="ImporteIVA" HeaderText="IVA" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||||
|
<%--8--%>
|
||||||
|
<asp:BoundField DataField="TotalImporte" HeaderText="Total" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||||
|
<%--9--%>
|
||||||
|
<asp:TemplateField ItemStyle-HorizontalAlign="Center" HeaderText="Editar">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:LinkButton ID="LnkEditar" runat="server" AlternateText="Editar" CausesValidation="True"
|
||||||
|
CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-pencil'></i>" OnClick="LnkEditar_Click" />
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
<%--10--%>
|
||||||
|
<asp:TemplateField ItemStyle-HorizontalAlign="Center" HeaderText="Eliminar">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:LinkButton ID="LnkEliminar" 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" OnClick="LnkEliminar_Click" />
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
</Columns>
|
||||||
|
</asp:GridView>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-6"></div>
|
||||||
|
<div class="col-md-6">
|
||||||
|
<table border="0" rules="none" class="well TextTab" style="float: right;">
|
||||||
|
<tr align="right">
|
||||||
|
<td style="width: 150px;"><b>SubTotal:</b></td>
|
||||||
|
<td width="82px">
|
||||||
|
<asp:TextBox ID="TxtSubTotal" Enabled="false" runat="server" BorderStyle="None" Style="text-align: right;" Text="0.00" Width="78px"></asp:TextBox></td>
|
||||||
|
</tr>
|
||||||
|
<tr align="right">
|
||||||
|
<td style="border: 1px none white"><b>IVA:</b></td>
|
||||||
|
<td>
|
||||||
|
<asp:TextBox ID="TxtIVA" Enabled="false" runat="server" BorderStyle="None" Style="text-align: right;" Text="0.00" Width="78px"></asp:TextBox></td>
|
||||||
|
<td> </td>
|
||||||
|
</tr>
|
||||||
|
<tr align="right">
|
||||||
|
<td><b>Total:</b></td>
|
||||||
|
<td>
|
||||||
|
<asp:TextBox ID="TxtTotal" runat="server" BorderStyle="None" Style="text-align: right;" Text="0.00" Width="78px"></asp:TextBox>
|
||||||
|
</td>
|
||||||
|
<td><b>Moneda:</b></td>
|
||||||
|
<td>
|
||||||
|
<asp:DropDownList ID="DdlMoneda" OnSelectedIndexChanged="DdlMoneda_SelectedIndexChanged" ClientIDMode="Static" CssClass="form-control input-sm" runat="server" DataTextField="Moneda" AppendDataBoundItems="true" AutoPostBack="true" DataValueField="CveMoneda" Width="70px"></asp:DropDownList>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr id="TrConversionTipoCambio" runat="server" visible="false" align="right">
|
||||||
|
<td><b>T.C.:</b></td>
|
||||||
|
<td>
|
||||||
|
<asp:TextBox ID="TxtTipoCambio" runat="server" CssClass="form-control input-sm" MaxLength="7" Text="1" Enabled="true" Width="70px"></asp:TextBox>
|
||||||
|
<asp:CompareValidator ID="CVTipoCambio" runat="server" ControlToValidate="TxtTipoCambio" Display="None" ErrorMessage="El campo <b>''Tipo de Cambio''</b> no tiene el formato correcto, por favor corrija e intente de nuevo (Solo formato numérico)." Operator="DataTypeCheck" Type="Double" ValidationGroup="GrpVenta"></asp:CompareValidator>
|
||||||
|
<ajax:ValidatorCalloutExtender ID="VCOTipoCambio" runat="server" HighlightCssClass="vco" TargetControlID="CVTipoCambio" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<asp:Button ID="BtnGuardar" CssClass="btn btn-primary" OnClick="BtnGuardar_Click" runat="server" Text="Guardar" ValidationGroup="GrpVenta" />
|
||||||
|
<button type="button" class="btn btn-default" data-dismiss="modal">Cancelar</button>
|
||||||
|
</div>
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div id="DivAddVenta" class="modal ADS fade" role="dialog">
|
<div id="DivAddVenta" class="modal ADS fade" role="dialog">
|
||||||
<div class="modal-dialog">
|
<div class="modal-dialog">
|
||||||
<asp:UpdatePanel ID="UpVenta" class="modal-content rowpadding" tabindex="-1" runat="server" UpdateMode="Conditional">
|
<asp:UpdatePanel ID="UpVenta" class="modal-content rowpadding" tabindex="-1" runat="server" UpdateMode="Conditional">
|
||||||
@@ -1486,7 +1714,7 @@
|
|||||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||||
<span aria-hidden="true">×</span>
|
<span aria-hidden="true">×</span>
|
||||||
</button>
|
</button>
|
||||||
<h4 class="modal-title" id="myModalLabelVenta">Registrar Venta</h4>
|
<h4 class="modal-title" id="myModalLabelVenta">Registrar Concepto</h4>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<div class="form-group form-md-line-input input-iconright">
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
@@ -1504,10 +1732,11 @@
|
|||||||
<label for="<%= DdlClasificacion.ClientID.ToString()%>">Clasificacion:</label>
|
<label for="<%= DdlClasificacion.ClientID.ToString()%>">Clasificacion:</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group form-md-line-input input-iconright">
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
<ADS:Dropdownlost runat="server" ID="DdlPS" CssStyle="width: 50%;" Onselectedindexchange="DdlPS_selectedindexchange" CssClass=" form-control input-sm DdlPS" CssClassDdl=" select2me " DataTextField="PSCodigo" DataValueField="CvePS" />
|
<ADS:Dropdownlost runat="server" ID="DdlPS" CssStyle="width: 50%;" Onselectedindexchange="DdlPS_selectedindexchange" CssClass=" form-control input-sm DdlPS" CssClassDdl=" select2me " DataTextField="PSCodigo" DataValueField="CvePS" />
|
||||||
<label for="<%= DdlPS.ClientID.ToString()%>">
|
<label for="<%= DdlPS.ClientID.ToString()%>">
|
||||||
Productos / Servicio:
|
Productos / Servicio:
|
||||||
<label>
|
|
||||||
|
<label>
|
||||||
</div>
|
</div>
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
@@ -1522,24 +1751,6 @@
|
|||||||
<br />
|
<br />
|
||||||
<asp:TextBox ID="TxtObs" runat="server" Height="50" Width="503px" TextMode="MultiLine" CausesValidation="true" MaxLength="500"></asp:TextBox>
|
<asp:TextBox ID="TxtObs" runat="server" Height="50" Width="503px" TextMode="MultiLine" CausesValidation="true" MaxLength="500"></asp:TextBox>
|
||||||
</div>
|
</div>
|
||||||
<%-- <div id="divproyectos" runat="server">
|
|
||||||
<asp:UpdatePanel ID="UPPProyecto" runat="server" UpdateMode="Conditional">
|
|
||||||
<ContentTemplate>
|
|
||||||
<div class="form-group form-md-line-input input-iconright" id="divProyecto" runat="server">
|
|
||||||
<asp:DropDownList ID="DdlProyecto" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="Proyecto" DataValueField="CveProyecto" Width="50%">
|
|
||||||
<asp:ListItem Selected="true" Text="Seleccione" Value="-1"></asp:ListItem>
|
|
||||||
</asp:DropDownList>
|
|
||||||
<label id="LblProyecto" runat="server" for="<%= DdlProyecto.ClientID.ToString()%>">Proyecto:</label>
|
|
||||||
</div>
|
|
||||||
<div class="form-group form-md-line-input input-iconright">
|
|
||||||
<asp:DropDownList ID="DdlSubProyecto" CssClass="form-control input-sm select2me" runat="server" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Width="50%">
|
|
||||||
<asp:ListItem Selected="true" Text="Seleccione" Value="-1"></asp:ListItem>
|
|
||||||
</asp:DropDownList>
|
|
||||||
<label id="LblSubProyecto" runat="server" for="<%= DdlSubProyecto.ClientID.ToString()%>">SubProyecto:</label>
|
|
||||||
</div>
|
|
||||||
</ContentTemplate>
|
|
||||||
</asp:UpdatePanel>
|
|
||||||
</div>--%>
|
|
||||||
<div class="form-group form-md-line-input input-iconright">
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
<asp:TextBox ID="TxtPrecio" runat="server" CausesValidation="true" lang="nb" ClientIDMode="Static" MaxLength="12" ValidationGroup="GrpAddVenta" CssClass="form-control"></asp:TextBox>
|
<asp:TextBox ID="TxtPrecio" runat="server" CausesValidation="true" lang="nb" ClientIDMode="Static" MaxLength="12" ValidationGroup="GrpAddVenta" CssClass="form-control"></asp:TextBox>
|
||||||
<ajax:FilteredTextBoxExtender ID="FTBEPrecio" runat="server" TargetControlID="TxtPrecio" FilterType="Custom, Numbers" ValidChars="." />
|
<ajax:FilteredTextBoxExtender ID="FTBEPrecio" runat="server" TargetControlID="TxtPrecio" FilterType="Custom, Numbers" ValidChars="." />
|
||||||
@@ -1562,7 +1773,7 @@
|
|||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<asp:UpdatePanel ID="UpFooter" runat="server" UpdateMode="Conditional">
|
<asp:UpdatePanel ID="UpFooter" runat="server" UpdateMode="Conditional">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
<asp:Button ClientIDMode="Static" ID="LnkAgregar" runat="server" OnClick="LnkAgregar_Click" CssClass="btn btn-primary" Text="Agregar" ValidationGroup="GrpAddVenta" />
|
<asp:Button ClientIDMode="Static" ID="LnkAgregar" runat="server" OnClick="LnkAgregar_Click" CssClass="btn btn-primary" Text="Agregar" ValidationGroup="GrpAddVenta" />
|
||||||
<button type="button" class="btn btn-default" data-dismiss="modal">Cancelar</button>
|
<button type="button" class="btn btn-default" data-dismiss="modal">Cancelar</button>
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
@@ -1693,7 +1904,8 @@
|
|||||||
<div class="col-sm-12 text-right">
|
<div class="col-sm-12 text-right">
|
||||||
<p>
|
<p>
|
||||||
*El pago incluye facturas en dolares. Las cuales se calcularon con el TC del día <b>$
|
*El pago incluye facturas en dolares. Las cuales se calcularon con el TC del día <b>$
|
||||||
<asp:Literal ID="LtTC" Text="" runat="server" />
|
|
||||||
|
<asp:Literal ID="LtTC" Text="" runat="server" />
|
||||||
</b>
|
</b>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
@@ -1709,6 +1921,60 @@
|
|||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
</div>
|
</div>
|
||||||
|
<%-- IxC --%>
|
||||||
|
<div id="DivIxC" class="modal ADS fade" role="dialog">
|
||||||
|
<asp:UpdatePanel ID="UpIxC" class="modal-dialog rowpadding" tabindex="-1" runat="server" UpdateMode="Conditional">
|
||||||
|
<ContentTemplate>
|
||||||
|
<div class="modal-content">
|
||||||
|
<div class="modal-header">
|
||||||
|
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||||
|
<h4 class="modal-title">Confirmación de Pago</h4>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body">
|
||||||
|
<div class="form-horizontal">
|
||||||
|
<div class="row" id="trCuentaDeposito" runat="server">
|
||||||
|
<label class="control-label col-sm-2 label-titulo">Cuenta:</label>
|
||||||
|
<div class="col-md-10">
|
||||||
|
<asp:DropDownList ID="DdlCuenta" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="NumCuentaMoneda" DataValueField="CveCuenta" ValidationGroup="GrpModalPedido">
|
||||||
|
</asp:DropDownList>
|
||||||
|
<asp:RequiredFieldValidator ID="RFVCuentaDeposito" runat="server" ControlToValidate="DdlCuenta" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cuenta de Depósito''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpModalPedido"></asp:RequiredFieldValidator>
|
||||||
|
<ajax:ValidatorCalloutExtender ID="VCECuentaDeposito" runat="server" HighlightCssClass="vco" TargetControlID="RFVCuentaDeposito" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<label class="control-label col-sm-2 label-titulo">Numero:</label>
|
||||||
|
<div class="col-md-2">
|
||||||
|
<asp:TextBox ID="TxtFolio" runat="server" MaxLength="14" class="form-control input-sm"></asp:TextBox>
|
||||||
|
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="TxtFolio" Display="None" ErrorMessage="El campo <b>''Folio''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="GrpModalPedido"></asp:RequiredFieldValidator>
|
||||||
|
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender2" runat="server" HighlightCssClass="vco" TargetControlID="RequiredFieldValidator1" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<label class="control-label col-sm-2 label-titulo">Pedido:</label>
|
||||||
|
<div class="col-sm-10">
|
||||||
|
<asp:Label ID="LblPedido" Text="" CssClass="form-control-static" runat="server" />
|
||||||
|
</div>
|
||||||
|
<label class="control-label col-sm-2 label-titulo">Pago:</label>
|
||||||
|
<div class="col-sm-4">
|
||||||
|
<div class="input-group">
|
||||||
|
<span class="input-group-addon">$</span>
|
||||||
|
<asp:TextBox ID="TxtTotalPedido" ClientIDMode="Static" Text="" CssClass="form-control input-sm" runat="server" />
|
||||||
|
</div>
|
||||||
|
<ajax:FilteredTextBoxExtender ID="FTBEPedido" runat="server" TargetControlID="TxtTotalPedido" FilterType="Custom, Numbers" ValidChars=".," />
|
||||||
|
<asp:RangeValidator ID="RVPedido" runat="server" Type="currency" MinimumValue="0.01" MaximumValue="100" ErrorMessage="El campo <b>''Importe''</b> debe estar entre 1 y el importe máximo del pedido." ControlToValidate="TxtTotalPedido" Display="None" ValidationGroup="GrpModalPedido"></asp:RangeValidator>
|
||||||
|
<ajax:ValidatorCalloutExtender ID="VCEPedido" runat="server" HighlightCssClass="vco" TargetControlID="RVPedido" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<asp:Button Text="Pagar" ID="BtnPagarPedido" OnClick="BtnPagarPedido_Click" CssClass="btn btn-primary" ValidationGroup="GrpModalPedido" runat="server" />
|
||||||
|
<button type="button" class="btn btn-default" data-dismiss="modal">Cerrar</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
</div>
|
||||||
|
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ Imports System.Xml
|
|||||||
Imports System.IO.Compression
|
Imports System.IO.Compression
|
||||||
Imports System.Net
|
Imports System.Net
|
||||||
Imports Microsoft.Reporting.WebForms
|
Imports Microsoft.Reporting.WebForms
|
||||||
|
Imports System.Net.Http
|
||||||
|
|
||||||
Partial Class Ventas_PortalCliente
|
Partial Class Ventas_PortalCliente
|
||||||
Inherits ClsPaginas
|
Inherits ClsPaginas
|
||||||
@@ -223,6 +224,9 @@ Partial Class Ventas_PortalCliente
|
|||||||
CargarClienteSucursal()
|
CargarClienteSucursal()
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
CargaPedidos()
|
||||||
|
CargaCuentasDepositos()
|
||||||
|
|
||||||
'??ESTE TAB VA DESAPARECER - PARA QUE SOLO LA EMPRESA GESTIONE A LOS USUARIOS POR CLIENTE??
|
'??ESTE TAB VA DESAPARECER - PARA QUE SOLO LA EMPRESA GESTIONE A LOS USUARIOS POR CLIENTE??
|
||||||
If UsuarioActual.TienePermisoProceso(234) Then ' CARGA TAB SISTEMA
|
If UsuarioActual.TienePermisoProceso(234) Then ' CARGA TAB SISTEMA
|
||||||
TabSistema.Visible = False
|
TabSistema.Visible = False
|
||||||
@@ -1705,6 +1709,456 @@ Partial Class Ventas_PortalCliente
|
|||||||
End Sub
|
End Sub
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
|
#Region "TAB PEDIDOS"
|
||||||
|
|
||||||
|
Private Sub CargaCuentasDepositos()
|
||||||
|
|
||||||
|
'CargaEstatus
|
||||||
|
DdlEstatus.DataSource = GlobalDTEstatusFactura.FiltraParametros(" CveEstatusFactura IN (2, 5, 21) ")
|
||||||
|
DdlEstatus.DataBind()
|
||||||
|
|
||||||
|
DdlCuenta.Items.Clear()
|
||||||
|
|
||||||
|
'Dim ObjGral As New ClsGenerales
|
||||||
|
'If ObjGral.GetCuentasDepositos(CveProveedor:=-1, CveCliente:=CveCliente, CvePersonal:=-1) Then
|
||||||
|
' DdlCuentaDeposito.DataSource = ObjGral.DtResultados.FiltraParametros("Estatus ='True'")
|
||||||
|
' If ObjGral.DtResultados.Rows.Count > 0 Then
|
||||||
|
' DdlCuentaDeposito.Items.Insert(0, New ListItem("Seleccione una cuenta", "-1"))
|
||||||
|
' End If
|
||||||
|
'End If
|
||||||
|
'ObjGral.Dispose()
|
||||||
|
|
||||||
|
'DdlCuentaDeposito.DataBind()
|
||||||
|
|
||||||
|
|
||||||
|
Dim dt As DataTable
|
||||||
|
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(127) = "1" Then
|
||||||
|
dt = GlobalDTBancosCuentas(-1)
|
||||||
|
Else
|
||||||
|
dt = GlobalDTBancosCuentas(-1).FiltraParametros("CveTipoCuenta <> 1") ' quito las cajas chicas
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
DdlCuenta.DataSource = dt
|
||||||
|
DdlCuenta.DataBind()
|
||||||
|
|
||||||
|
UpIxC.Update()
|
||||||
|
End Sub
|
||||||
|
Private Sub CargaPedidos(Optional TopPedidos As Integer = 21)
|
||||||
|
Dim FechaI = If(IsDate(txtFechaI.Text.Trim()), txtFechaI.Text.Trim.ToDate, MinFecha)
|
||||||
|
Dim FechaF = If(IsDate(txtFechaF.Text.Trim()), txtFechaF.Text.Trim.ToDate, MaxFecha)
|
||||||
|
Dim ObjClientes As New ClsClientes
|
||||||
|
If ObjClientes.GetHistorialVentas(CveCliente, TopPedidos, CveClienteSucursal:=-1, TipoDocto:="Pd2", CveEstatusFactura:=DdlEstatus.SelectedValue.ToEntero(), FechaI:=FechaI, FechaF:=FechaF) Then
|
||||||
|
GvPedidos.DataSource = ObjClientes.DtResultados
|
||||||
|
If ObjClientes.DtResultados.Rows.Count < 21 Then
|
||||||
|
LnkVerMasPedidos.Visible = False
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
ObjClientes.Dispose()
|
||||||
|
GvPedidos.DataBind()
|
||||||
|
|
||||||
|
UpTabPedidos.Update()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs)
|
||||||
|
CargaPedidos()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Protected Sub BtnVerMasPedidos_Click(sender As Object, e As EventArgs)
|
||||||
|
If BtnVerMasVentas.Text = "Ver Más" Then
|
||||||
|
CargaPedidos(-1)
|
||||||
|
BtnVerMasVentas.Text = "Ver Menos"
|
||||||
|
Else
|
||||||
|
CargaPedidos(21)
|
||||||
|
BtnVerMasVentas.Text = "Ver Más"
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Protected Sub GvPedidos_RowDataBound(sender As Object, e As GridViewRowEventArgs)
|
||||||
|
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||||
|
If e.Row.DBCampo("CveVenta") <> "" Then
|
||||||
|
'e.Row.FCHyperLink("ImgAbonar").NavigateUrl = String.Format("/Bancos/PopIEVentas.aspx?CveVenta={0}&TB_iframe=true&height=550&width=700", e.Row.DBCampo("CveVenta"))
|
||||||
|
If e.Row.DBCampo("CveEstatusFactura").ToEntero().Contiene(4, 5) Then
|
||||||
|
e.Row.FCLinkButton("ImgAbonar").Visible = False
|
||||||
|
e.Row.FCLinkButton("ImgCancelar").Visible = False
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
e.Row.FCLinkButton("ImgAbonar").Visible = False
|
||||||
|
e.Row.FCLinkButton("ImgCancelar").Visible = False
|
||||||
|
e.Row.CssClass = "Totales"
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Protected Sub ImgCancelar_Click(sender As Object, e As EventArgs)
|
||||||
|
Dim GvRow As GridViewRow = (DirectCast((DirectCast(sender, LinkButton)).NamingContainer, GridViewRow))
|
||||||
|
If GvRow.DataKey("CveVenta").ToEntero() > 0 Then
|
||||||
|
Dim ObjFactura As New Modelos.Factura(UsuarioActual, GvRow.DataKey("CveVenta").ToEntero(), UsuarioActual.CveEmpresa)
|
||||||
|
If ObjFactura IsNot Nothing Then
|
||||||
|
Dim Resp = ObjFactura.CancelarFactura(RealizarDevolucionAlmacen:=False, ListaRemisionesCancelar:=New List(Of Integer))
|
||||||
|
Alert(Resp.Mensaje, If(Resp.HuboError, TipoMensaje.MsgError, TipoMensaje.MsgInformacion))
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
Alert("No se encontro pedido para cancelar", TipoMensaje.MsgAdvertencia)
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Protected Sub ImgAbonar_Click(sender As Object, e As EventArgs)
|
||||||
|
|
||||||
|
TxtTotalPedido.Text = ""
|
||||||
|
TxtFolio.Text = ""
|
||||||
|
|
||||||
|
Me.CveVenta = -1
|
||||||
|
Dim GvRow As GridViewRow = (DirectCast((DirectCast(sender, LinkButton)).NamingContainer, GridViewRow))
|
||||||
|
If GvRow.DataKey("CveVenta").ToEntero() > 0 Then
|
||||||
|
|
||||||
|
LblPedido.Text = GvRow.DataKey("SerieFolio")
|
||||||
|
TxtTotalPedido.Text = GvRow.DataKey("Total").ToDecimal().FormatoNumero(2)
|
||||||
|
RVPedido.MaximumValue = GvRow.DataKey("Total").ToDecimal().FormatoNumero(2)
|
||||||
|
Me.CveVenta = GvRow.DataKey("CveVenta").ToEntero()
|
||||||
|
|
||||||
|
RegistraScript("$('#DivIxC').modal({backdrop: 'static',keyboard: false});")
|
||||||
|
End If
|
||||||
|
UpIxC.Update()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Protected Sub BtnPagarPedido_Click(sender As Object, e As EventArgs)
|
||||||
|
GuargarIxC(CveCliente, TxtTotalPedido.Text.ToDecimal(), New Modelos.Factura(UsuarioActual, Me.CveVenta, UsuarioActual.CveEmpresa))
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub GuargarIxC(CveCliente As Integer, ImportePagado As Decimal, ObjFactura As Modelos.Factura)
|
||||||
|
|
||||||
|
Dim MsgError As String = ""
|
||||||
|
Dim CveConceptoContable As Integer = 30
|
||||||
|
Dim CveConceptoCompra As Integer = 10
|
||||||
|
Dim CveCreditoDetalle As Integer = -1
|
||||||
|
Dim CIF As Decimal = 0
|
||||||
|
Dim CvePlantillaPoliza As Integer = 3
|
||||||
|
Dim CvePrePoliza As Integer = 0
|
||||||
|
Dim ComprobanteIE As String = ""
|
||||||
|
Dim CveIE As Integer = -1
|
||||||
|
Dim CveTipoTransaccion As Integer = 11
|
||||||
|
Dim FechaDoc As DateTime = Now
|
||||||
|
|
||||||
|
Dim ConceptoContable As Integer
|
||||||
|
Dim TipoMovimiento As Boolean
|
||||||
|
Dim importeMovimiento As Decimal
|
||||||
|
Dim FechaMovimiento As Date = Now
|
||||||
|
Dim Concepto As String = ""
|
||||||
|
|
||||||
|
Dim Importe As Decimal = ImportePagado
|
||||||
|
|
||||||
|
Dim Msg As New StringBuilder
|
||||||
|
|
||||||
|
Dim ObjIE As New ClsBancos()
|
||||||
|
Dim ObjMov As New ClsContabilidad(ObjIE.IniciaTransacSQL)
|
||||||
|
Dim ObjComp As New ClsCompras(ObjIE.IniciaTransacSQL)
|
||||||
|
|
||||||
|
Try
|
||||||
|
Dim CveCuentaDeposito As Integer = 0
|
||||||
|
'If DdlCuentaDeposito.Items.Count > 0 Then
|
||||||
|
' CveCuentaDeposito = DdlCuentaDeposito.SelectedValue.ToEntero
|
||||||
|
'End If
|
||||||
|
|
||||||
|
'*****-_- INICIA: CONFIGURACION REGISTRO -_-*****
|
||||||
|
Dim AgregaPolizaSaldoInicial As Boolean = False
|
||||||
|
|
||||||
|
'INGPC
|
||||||
|
CvePlantillaPoliza = 6
|
||||||
|
If CveCliente > 0 Then
|
||||||
|
CveConceptoCompra = 66 'Anticipo doc por pagar
|
||||||
|
CveConceptoContable = 30 'Bancos
|
||||||
|
End If
|
||||||
|
|
||||||
|
Dim FolioFijo As Integer = 0
|
||||||
|
Dim tCveMoneda As Integer = ObjFactura.CveMoneda
|
||||||
|
Dim tImporteMonedaExtranjera As Decimal = 0
|
||||||
|
If tCveMoneda <> 1 Then tImporteMonedaExtranjera = TxtImporte.Text.ToDecimal * GlobalTipoCambio(Now).ToString.ToDecimal
|
||||||
|
Dim PagueseA = ObjFactura.Cliente.Nombre
|
||||||
|
|
||||||
|
If MsgError = "" Then
|
||||||
|
|
||||||
|
CveIE = ObjIE.AddBancos_IE(DdlCuenta.SelectedValue.ToEntero, CveTipoTransaccion, FechaDoc, TxtFolio.Text.Trim, PagueseA, Importe, ObjFactura.CveMoneda,
|
||||||
|
TxtTipoCambio.Text.Trim.ToDouble, TxtObservaciones.Text.Trim, "", False, False, -1, CvePrePoliza, ComprobanteIE, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa,
|
||||||
|
CveCuentaDeposito:=CveCuentaDeposito, CveEstatusIE:=1, Referencia:="-1", CveCuentaTarjeta:=-1, ConceptoCIE:="-1")
|
||||||
|
|
||||||
|
If CveIE > 0 Then
|
||||||
|
|
||||||
|
If CveTipoTransaccion = 1 AndAlso UsuarioActual.CveEmpresa <> 119 Then FolioFijo = ObjIE.Folio.ToEntero 'cheque
|
||||||
|
CvePrePoliza = ObjMov.AddPrePolizas("PortalCliente/IE " + "INGPC", CvePlantillaPoliza, Importe, Importe, tCveMoneda, FechaDoc, PagueseA, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, FolioFijo:=FolioFijo, ReglaFolioPoliza:=ObjComp.ObtenerReglaFolio(CveTipoTransaccion.ToString(), Nothing, UsuarioActual.CveEmpresa), CveTipoPoliza:=ObjMov.ObtenerTipoPoliza(CveTipoTransaccion.ToString(), "-1", UsuarioActual.CveEmpresa))
|
||||||
|
|
||||||
|
'valida prepoliza
|
||||||
|
If CvePrePoliza > 0 Then
|
||||||
|
|
||||||
|
If Not ObjIE.UpdateIEPrePoliza(MinFecha, "", -1, CvePrePoliza, CveIE, -1) Then
|
||||||
|
MsgError = "Ocurrio un error al agregar la prepoliza al IE."
|
||||||
|
End If
|
||||||
|
|
||||||
|
Dim Conc As String = ObjIE.Folio
|
||||||
|
Dim Ref As String = ObjIE.Folio
|
||||||
|
|
||||||
|
ComprobanteIE = $"{CveIE}"
|
||||||
|
|
||||||
|
'GUARDA PREPOLIZAS DETALLE [PRIMERO SON LOS CASOS ESPECIALES, AL FINAL (ELSE) LOS CASOS NORMALES] --REEMPLAZA IFs
|
||||||
|
|
||||||
|
Dim importeMX As Decimal
|
||||||
|
Dim Multiplicador As Integer
|
||||||
|
|
||||||
|
If ObjMov.GetPlantillaConceptos(UsuarioActual.CveEmpresa, CvePlantillaPoliza) Then
|
||||||
|
|
||||||
|
For Each Row As DataRow In ObjMov.DtResultados.Rows
|
||||||
|
|
||||||
|
ConceptoContable = Row("CveConcepto").ToString.ToEntero
|
||||||
|
TipoMovimiento = If(Row("TipoMovto").ToString = "True", True, False)
|
||||||
|
importeMovimiento = 0
|
||||||
|
Multiplicador = (Row("Multiplicador").ToString.ToEntero)
|
||||||
|
Concepto = ObjMov.ObtenerConceptoEmpresa(UsuarioActual.CveEmpresa, ConceptoContable, PagueseA, "", ObjIE.Folio)
|
||||||
|
|
||||||
|
Select Case ConceptoContable
|
||||||
|
Case 66
|
||||||
|
importeMovimiento = Importe '- TxtIvaIxC.Text.ToDecimal
|
||||||
|
importeMX = importeMovimiento
|
||||||
|
Case 30
|
||||||
|
importeMovimiento = Importe
|
||||||
|
importeMX = importeMovimiento
|
||||||
|
End Select
|
||||||
|
|
||||||
|
If importeMovimiento <> 0 Then
|
||||||
|
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, Concepto, ConceptoContable, Concepto, FechaMovimiento, If(ConceptoContable = 30, ObjFactura.Cliente.IdCtaContClientes, ObjFactura.Cliente.IdCtaContAnticipos), -1, CveIE:=CveIE, CveCompra:=-1, CveProveedor:=-1, CvePersonal:=-1, CveCreditoDetalle:=CveCreditoDetalle, CveCliente:=CveCliente, ImporteMX:=importeMovimiento, ImporteME:=tImporteMonedaExtranjera, TipoCambio:=TxtTipoCambio.Text.ToDecimal, CveCuenta:=If(ConceptoContable = 30, ObjFactura.Cliente.CveCuentaClientes, ObjFactura.Cliente.CveCuentaAnticipos)) Then
|
||||||
|
MsgError = "Ocurrió un error al registrar el asiento del ingreso."
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
Next
|
||||||
|
End If
|
||||||
|
|
||||||
|
If MsgError = "" Then
|
||||||
|
If ObjMov.ValidacionPrePolizaCuadre(CvePrePoliza, -1) Then
|
||||||
|
If ObjMov.ValorPolizaDescuadre > 0 Then
|
||||||
|
GuardaLogAD($"Bancos/IE | Error:{ObjMov.MensajePolizaDescuadre} Diferencia:{ObjMov.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas")
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
MsgError = "No se pudo validar la prepoliza de cuadre."
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
'El movimiento 1 es el de Venta
|
||||||
|
|
||||||
|
'Conta ContPAQ
|
||||||
|
'If UsuarioActual.Empresa.Funcionalidad(200) = "1" AndAlso MsgError = "" Then
|
||||||
|
' If IDCtaBeneficiario > 0 And IDCtaContable > 0 Then
|
||||||
|
' If ObjMov.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa) Then
|
||||||
|
' IDPoliza = ObjMov.ContaIdPoliza
|
||||||
|
' 'Alert(alertaContabilizacion & ObjMov.AlertaMensaje, ModExtensiones.TipoMensaje.MsgInformacion)
|
||||||
|
' Else
|
||||||
|
' Alert("Ocurrio un error al contabilizar, pongase en contacto con Soporte Técnico", TipoMensaje.MsgError)
|
||||||
|
' End If
|
||||||
|
' Else
|
||||||
|
' If IDCtaContable < 1 Then
|
||||||
|
' Alert("No se puede contabilizar la Prepoliza debido a que la cuenta de Bancos es invalida", TipoMensaje.MsgAdvertencia)
|
||||||
|
' End If
|
||||||
|
' If IDCtaBeneficiario < 1 Then
|
||||||
|
' Alert("No se puede contabilizar la Prepoliza debido a que las cuenta del Beneficiario es invalida", TipoMensaje.MsgAdvertencia)
|
||||||
|
' End If
|
||||||
|
' End If
|
||||||
|
'End If
|
||||||
|
|
||||||
|
'If UsuarioActual.Empresa.UsaAC Then
|
||||||
|
' Dim ConceptoRenglon, Referencia As String
|
||||||
|
' Dim FolioPoliza As Integer
|
||||||
|
' Dim Fecha As Date = FechaDoc
|
||||||
|
' Dim TipoChq As String = ""
|
||||||
|
' Dim Total As Double = TxtImporte.Text.ToDouble
|
||||||
|
|
||||||
|
' Dim Conta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||||
|
' Conta.IniciaTransacSQL()
|
||||||
|
|
||||||
|
' If CveTipoTransaccion = 1 Then TipoChq = "CHQ"
|
||||||
|
' ConceptoRenglon = String.Format("Anticipo {0}", PagueseA)
|
||||||
|
|
||||||
|
' Dim IDPoliza = Conta.AddPoliza(2, ConceptoRenglon, Total, Total, UsuarioActual.CveUsuario, Fecha, ObjIE.Folio, TipoChq)
|
||||||
|
|
||||||
|
' If IDPoliza > 0 Then
|
||||||
|
' FolioPoliza = Conta.Folio
|
||||||
|
' Referencia = ObjIE.Folio
|
||||||
|
' ConceptoRenglon = String.Format("Anticipo {0} {1}", PagueseA, TxtObservaciones.Text)
|
||||||
|
|
||||||
|
' Total = TxtImporte.Text.ToDouble
|
||||||
|
|
||||||
|
' If Not Conta.AddMovimiento(IDPoliza, IDCtaContable, True, Total, Referencia, ConceptoRenglon, 0, Fecha, "") Then MsgError = "No se insertó el movimiento"
|
||||||
|
|
||||||
|
' If Not Conta.AddMovimiento(IDPoliza, IDCtaBeneficiario, False, Total, Referencia, ConceptoRenglon, 0, Fecha, "") Then MsgError = "No se insertó el movimiento"
|
||||||
|
|
||||||
|
' Else
|
||||||
|
' MsgError = "No se insertó el encabezado"
|
||||||
|
' End If
|
||||||
|
|
||||||
|
' If MsgError = "" Then
|
||||||
|
' Conta.Commit()
|
||||||
|
|
||||||
|
' Conta.AjustaPoliza(IDPoliza)
|
||||||
|
' 'actualizar la conta del IE
|
||||||
|
' ObjIE.UpdateIEPrePoliza(Fecha, FolioPoliza.ToString, IDPoliza, CvePrePoliza, CveIE, 0)
|
||||||
|
' Else
|
||||||
|
' Conta.RollBack()
|
||||||
|
' IDPoliza = 0
|
||||||
|
' End If
|
||||||
|
|
||||||
|
' Conta.Dispose()
|
||||||
|
'End If
|
||||||
|
|
||||||
|
'Notificación de Pago
|
||||||
|
'If TxtNotificarA.Text.Trim <> "" And MsgError = "" Then
|
||||||
|
' 'NotificacionPago(CveIE, TxtNotificarA.Text.Trim)
|
||||||
|
' EnviarCorreoNotificacion(CveIE, TxtNotificarA.Text.Trim, "", UsuarioActual, False)
|
||||||
|
'End If
|
||||||
|
Else
|
||||||
|
MsgError = "No se pudo insertar la póliza"
|
||||||
|
End If
|
||||||
|
|
||||||
|
Else
|
||||||
|
MsgError = "No se insertó el encabezado"
|
||||||
|
End If
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
Catch ex As Exception
|
||||||
|
MsgError = ex.ToString()
|
||||||
|
End Try
|
||||||
|
|
||||||
|
If MsgError = "" Then
|
||||||
|
'IMPRIME CHEQUE
|
||||||
|
'GeneraChequePDF(CveIE, UsuarioActual.Empresa, IDPoliza)
|
||||||
|
If Msg.ToString = "" Then
|
||||||
|
ObjIE.Commit()
|
||||||
|
Msg.Append("El Documento se guardo correctamente: Folio:" + ObjIE.Folio)
|
||||||
|
Alert(Msg.ToString(), TipoMensaje.MsgInformacion)
|
||||||
|
End If
|
||||||
|
'Dim Archivo As System.IO.FileInfo = Nothing
|
||||||
|
''VERIFICA SI EXISTE EL FORMATO
|
||||||
|
''If DdlTipoTransaccion.SelectedValue.ToEntero.Contiene(2, 8, 9) Then
|
||||||
|
'' Archivo = New System.IO.FileInfo(String.Format("{0}Formatos/Transferencia.rdlc", UsuarioActual.Empresa.Ruta))
|
||||||
|
''ElseIf DdlTipoTransaccion.SelectedValue.ToEntero.Contiene(1) Then
|
||||||
|
'' Archivo = New System.IO.FileInfo(String.Format("{0}Formatos/CHQ-{1}.rdlc", UsuarioActual.Empresa.Ruta, DdlCuenta.SelectedValue.ToEntero))
|
||||||
|
'' If Not Archivo.Exists Then
|
||||||
|
'' Archivo = New System.IO.FileInfo(String.Format("{0}\Empresas\Grales\Formatos\CHQ.rdlc", ModExtensiones.DirectorioBaseEmpresas))
|
||||||
|
'' End If
|
||||||
|
''ElseIf DdlTipoTransaccion.SelectedValue.ToEntero.Contiene(6) And UsuarioActual.CveEmpresa = 72 Then
|
||||||
|
'' Archivo = New System.IO.FileInfo(String.Format("{0}Formatos/ComprobanteEgreso.rdlc", UsuarioActual.Empresa.Ruta, DdlCuenta.SelectedValue.ToEntero))
|
||||||
|
''End If
|
||||||
|
|
||||||
|
'If Archivo IsNot Nothing Then
|
||||||
|
' If Archivo.Exists Then
|
||||||
|
' Msg.AppendFormat("<br/><br/> <a class=""Texto"" target='_blank' href=""/Compras/PopUpVerFactura.aspx?P={0}"">{1}</a> ", Encripta(String.Format("OP=IECHEQUE&CVEIE={0}", CveIE)), "Imprimir Ingre")
|
||||||
|
' End If
|
||||||
|
'End If
|
||||||
|
|
||||||
|
Else
|
||||||
|
ObjIE.RollBack()
|
||||||
|
Alert(MsgError, TipoMensaje.MsgAdvertencia)
|
||||||
|
End If
|
||||||
|
|
||||||
|
ObjIE.Dispose()
|
||||||
|
ObjMov.Dispose()
|
||||||
|
ObjComp.Dispose()
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Function DescargarFactura(CveVenta As Integer, CveEmpresa As Integer) As Byte()
|
||||||
|
Dim Url = New Uri(String.Format("{0}Compras/PopUpVerFactura.aspx?P={1}", "http://localhost:85/", Encripta(String.Format("OP=VTA&CVEVENTA={0}&PAG=1&GUARDAR=1", CveVenta))))
|
||||||
|
Dim File As Byte() = Nothing
|
||||||
|
Try
|
||||||
|
Using httpClient = New HttpClient()
|
||||||
|
httpClient.Timeout = New TimeSpan(0, 15, 0)
|
||||||
|
Using request = New HttpRequestMessage(HttpMethod.Get, Url)
|
||||||
|
request.Headers.Add("ADSToken", Encripta(String.Format("CVEEMPRESA={0}&TICKS={1}&CVEUSUARIO=100", CveEmpresa, DateTime.UtcNow.Ticks)))
|
||||||
|
Dim response = httpClient.SendAsync(request).Result
|
||||||
|
If response.StatusCode = Net.HttpStatusCode.OK Then
|
||||||
|
File = response.Content.ReadAsByteArrayAsync().Result
|
||||||
|
End If
|
||||||
|
End Using
|
||||||
|
End Using
|
||||||
|
Catch ex As Exception
|
||||||
|
File = Nothing
|
||||||
|
OnError("Ocurrió un error al descargar la factura", ex)
|
||||||
|
End Try
|
||||||
|
|
||||||
|
Return File
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Private Sub MandaMails(UsuarioActual As Usuario, CveVenta As Integer, EnviarFactura As Boolean, ObjFactura As Modelos.Factura)
|
||||||
|
|
||||||
|
Dim ObjMail As New ClsSisMail()
|
||||||
|
Dim ObjVentas As New ClsVentas
|
||||||
|
|
||||||
|
Dim ArchivoPDF As String = ""
|
||||||
|
Dim ArchivoPDFBytes As Byte() = Nothing
|
||||||
|
Dim ExistePDF As Boolean = False
|
||||||
|
|
||||||
|
Try
|
||||||
|
|
||||||
|
Dim Asunto As String = String.Empty
|
||||||
|
Dim Cuerpo As String = String.Empty
|
||||||
|
Dim ResultadoMail As Integer = 0
|
||||||
|
|
||||||
|
Dim TipoComprobante = "Pedido"
|
||||||
|
|
||||||
|
If UsuarioActual.Empresa.PlantillaMailVenta.Trim.Length > 0 Then
|
||||||
|
Cuerpo = UsuarioActual.Empresa.PlantillaMailVenta
|
||||||
|
Cuerpo = Cuerpo.Replace("{""NombreEmpresa""}", UsuarioActual.Empresa.Empresa)
|
||||||
|
Cuerpo = Cuerpo.Replace("{""NombreCliente""}", ObjFactura.Cliente.Nombre)
|
||||||
|
Cuerpo = Cuerpo.Replace("{""TipoDocumento""}", TipoComprobante)
|
||||||
|
Cuerpo = Cuerpo.Replace("{""Fecha""}", ObjFactura.Fecha.ToString("dd/MM/yyyy"))
|
||||||
|
Cuerpo = Cuerpo.Replace("{""Total""}", ObjFactura.Total.FormatoNumero(2))
|
||||||
|
Cuerpo = Cuerpo.Replace("{""FechaVencimiento""}", ObjFactura.FechaVencimiento.ToString("dd/MM/yyyy"))
|
||||||
|
Cuerpo = Cuerpo.Replace("{""SerieFolio""}", ObjFactura.SerieFolio)
|
||||||
|
End If
|
||||||
|
|
||||||
|
If UsuarioActual.Empresa.AsuntoPlantillaMailVenta.Trim.Length > 0 Then
|
||||||
|
Asunto = UsuarioActual.Empresa.AsuntoPlantillaMailVenta
|
||||||
|
Asunto = Asunto.Replace("{""TipoDocumento""}", TipoComprobante)
|
||||||
|
Asunto = Asunto.Replace("{""Sucursal""}", ObjFactura.SubProyecto.SubProyecto)
|
||||||
|
Asunto = Asunto.Replace("{""SerieFolio""}", ObjFactura.SerieFolio)
|
||||||
|
End If
|
||||||
|
|
||||||
|
If Not EnviarFactura Then
|
||||||
|
ObjVentas.UpdateVentaMail(0, CveVenta)
|
||||||
|
End If
|
||||||
|
|
||||||
|
Dim LSRutasMail As New List(Of ClsSisMail.ArchivoMail)
|
||||||
|
|
||||||
|
ArchivoPDF = String.Format("{0}PDF\{1}\{2}.pdf", UsuarioActual.Empresa.Ruta, ObjFactura.TipoDocto, ObjFactura.SerieFolio)
|
||||||
|
|
||||||
|
If Not File.Exists(ArchivoPDF) Then
|
||||||
|
ArchivoPDFBytes = DescargarFactura(ObjFactura.CveVenta, ObjFactura.CveEmpresa)
|
||||||
|
Else
|
||||||
|
ExistePDF = True
|
||||||
|
End If
|
||||||
|
|
||||||
|
If ExistePDF Then
|
||||||
|
LSRutasMail.Add(New ClsSisMail.ArchivoMail With {.Ruta = ArchivoPDF})
|
||||||
|
Else
|
||||||
|
LSRutasMail.Add(New ClsSisMail.ArchivoMail With {.ArchivoBinario = ArchivoPDFBytes, .NombreArchivo = String.Format("{0}.pdf", ObjFactura.SerieFolio)})
|
||||||
|
End If
|
||||||
|
|
||||||
|
If ObjMail.SendMail(UsuarioActual.Empresa, ObjFactura.Cliente.Mail, Asunto, Cuerpo, "japmx95@gmail.com", LSRutasMail, Displayname:="") Then
|
||||||
|
ResultadoMail = 1
|
||||||
|
Else
|
||||||
|
ResultadoMail = 3
|
||||||
|
End If
|
||||||
|
ObjVentas.UpdateVentaMail(ResultadoMail, CveVenta)
|
||||||
|
|
||||||
|
Catch ex As Exception
|
||||||
|
OnError("Ocurrió error al mandar el Mail", ex)
|
||||||
|
ObjVentas.UpdateVentaMail(3, CveVenta)
|
||||||
|
Finally
|
||||||
|
ObjVentas.Dispose()
|
||||||
|
End Try
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
#End Region
|
||||||
|
|
||||||
#Region "O R D E N A M I E N T O"
|
#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)
|
Protected Sub LbOrden_Click(ByVal sender As Object, ByVal e As EventArgs)
|
||||||
Dim Orden As String = ""
|
Dim Orden As String = ""
|
||||||
@@ -1870,6 +2324,10 @@ Partial Class Ventas_PortalCliente
|
|||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Protected Sub BtnExcelHistorialPedidos_Click(sender As Object, e As EventArgs)
|
||||||
|
GvPedidos.ExportToExcel("Pedidos")
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
Protected Sub BtnPDFHistorial_Click(sender As Object, e As EventArgs)
|
Protected Sub BtnPDFHistorial_Click(sender As Object, e As EventArgs)
|
||||||
Dim retorno As Byte() = ImprimirReporteHistorial()
|
Dim retorno As Byte() = ImprimirReporteHistorial()
|
||||||
@@ -2369,8 +2827,10 @@ Partial Class Ventas_PortalCliente
|
|||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "AGREGAR/EDITAR/ELIMINAR"
|
#Region "AGREGAR/EDITAR/ELIMINAR"
|
||||||
Protected Sub LnkAddVenta_Click(sender As Object, e As EventArgs)
|
Protected Sub LnkAddPedido_Click(sender As Object, e As EventArgs)
|
||||||
|
RegistraScript("$('#DivVenta').modal({backdrop: 'static',keyboard: false});")
|
||||||
|
End Sub
|
||||||
|
Protected Sub LnkAddPSVenta_Click(sender As Object, e As EventArgs)
|
||||||
Modalidad = "A"
|
Modalidad = "A"
|
||||||
LnkAgregar.Text = "Agregar"
|
LnkAgregar.Text = "Agregar"
|
||||||
TxtCantidad.Text = ""
|
TxtCantidad.Text = ""
|
||||||
@@ -2386,9 +2846,9 @@ Partial Class Ventas_PortalCliente
|
|||||||
DdlClasificacion.SelectedIndex = -1
|
DdlClasificacion.SelectedIndex = -1
|
||||||
DdlUM.Items.Clear()
|
DdlUM.Items.Clear()
|
||||||
ChkAgregar.Checked = True
|
ChkAgregar.Checked = True
|
||||||
UpVenta.Update()
|
UpAddPedido.Update()
|
||||||
RegistraScript(String.Format("$('#{0}').modal('show');", "DivAddVenta"))
|
|
||||||
|
|
||||||
|
RegistraScript("$('#DivAddVenta').modal({backdrop: 'static',keyboard: false});")
|
||||||
End Sub
|
End Sub
|
||||||
Protected Sub LnkEditar_Click(sender As Object, e As EventArgs)
|
Protected Sub LnkEditar_Click(sender As Object, e As EventArgs)
|
||||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||||
@@ -2411,17 +2871,22 @@ Partial Class Ventas_PortalCliente
|
|||||||
TxtPrecio.Text = GvRow.DataKey("PU")
|
TxtPrecio.Text = GvRow.DataKey("PU")
|
||||||
LblTotal.Text = GvRow.DataKey("Total")
|
LblTotal.Text = GvRow.DataKey("Total")
|
||||||
ChkAgregar.Checked = False
|
ChkAgregar.Checked = False
|
||||||
UpVenta.Update()
|
UpAddPedido.Update()
|
||||||
RegistraScript(String.Format("$('#{0}').modal('show');", "DivAddVenta"), "EdicionVenta")
|
|
||||||
|
RegistraScript("$('#DivAddVenta').modal('show');", "EdicionVenta")
|
||||||
End Sub
|
End Sub
|
||||||
Protected Sub LnkEliminar_Click(sender As Object, e As EventArgs)
|
Protected Sub LnkEliminar_Click(sender As Object, e As EventArgs)
|
||||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||||
Dim DbRow As DataRow = Nothing
|
Dim DbRow As DataRow = Nothing
|
||||||
|
|
||||||
DbRow = TmpDT.Rows(GvRow.RowIndex)
|
DbRow = TmpDT.Rows(GvRow.RowIndex)
|
||||||
TmpDT.Rows.Remove(DbRow)
|
TmpDT.Rows.Remove(DbRow)
|
||||||
|
|
||||||
GvPS.DataSource = TmpDT
|
GvPS.DataSource = TmpDT
|
||||||
GvPS.DataBind()
|
GvPS.DataBind()
|
||||||
|
|
||||||
CalculaTotalesVenta()
|
CalculaTotalesVenta()
|
||||||
|
|
||||||
Alert("Eliminado Correctamente.", TipoMensaje.MsgInformacion)
|
Alert("Eliminado Correctamente.", TipoMensaje.MsgInformacion)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -2442,22 +2907,15 @@ Partial Class Ventas_PortalCliente
|
|||||||
End If
|
End If
|
||||||
DdlClasificacion.SelectedIndex = -1
|
DdlClasificacion.SelectedIndex = -1
|
||||||
DdlUM.Items.Clear()
|
DdlUM.Items.Clear()
|
||||||
UpVenta.Update()
|
|
||||||
Else
|
Else
|
||||||
RegistraScript("ClosePopup();", "AddUpdatePS")
|
RegistraScript("ClosePopup();", "AddUpdatePS")
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
UpAddPedido.Update()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub AgregarPS()
|
Private Sub AgregarPS()
|
||||||
If Modalidad = "A" Then
|
If Modalidad = "U" Then
|
||||||
AgregarProductoServicio(TxtCantidad.Text.ToDecimal, DdlUM.SelectedValue.ToEntero, DdlUM.SelectedItem.Text, DdlClasificacion.SelectedValue.ToEntero, DdlClasificacion.SelectedItem.Text,
|
|
||||||
DdlPS.SelectedValue.ToEntero, DdlPS.SelectedText, TxtObs.Text, TxtPrecio.Text.ToDecimal, 0, -1, "", CveSubProyecto, "")
|
|
||||||
|
|
||||||
CalculaTotalesVenta()
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
ElseIf Modalidad = "U" Then
|
|
||||||
|
|
||||||
Dim ErrorEdit As Boolean = True
|
Dim ErrorEdit As Boolean = True
|
||||||
Dim Contador As Integer = 0
|
Dim Contador As Integer = 0
|
||||||
@@ -2477,6 +2935,11 @@ Partial Class Ventas_PortalCliente
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
AgregarProductoServicio(TxtCantidad.Text.ToDecimal, DdlUM.SelectedValue.ToEntero, DdlUM.SelectedItem.Text, DdlClasificacion.SelectedValue.ToEntero, DdlClasificacion.SelectedItem.Text,
|
||||||
|
DdlPS.SelectedValue.ToEntero, DdlPS.SelectedText, TxtObs.Text, TxtPrecio.Text.ToDecimal, 0, -1, "", CveSubProyecto, "")
|
||||||
|
|
||||||
|
CalculaTotalesVenta()
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Function AgregarProductoServicio(Cantidad As Decimal, CveUM As Integer, UM As String, CveClasificacion As Integer, Clasificacion As String, CvePS As Integer, PS As String, Obs As String,
|
Private Function AgregarProductoServicio(Cantidad As Decimal, CveUM As Integer, UM As String, CveClasificacion As Integer, Clasificacion As String, CvePS As Integer, PS As String, Obs As String,
|
||||||
@@ -2616,7 +3079,7 @@ Partial Class Ventas_PortalCliente
|
|||||||
GvPS.DataSource = view
|
GvPS.DataSource = view
|
||||||
GvPS.DataBind()
|
GvPS.DataBind()
|
||||||
|
|
||||||
UpTabPedidos.Update()
|
UpAddPedido.Update()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
@@ -2911,6 +3374,10 @@ Partial Class Ventas_PortalCliente
|
|||||||
|
|
||||||
ViewState("CveVenta") = ObjFactura.CveVenta
|
ViewState("CveVenta") = ObjFactura.CveVenta
|
||||||
|
|
||||||
|
If ObjFactura.CveVenta > 0 Then
|
||||||
|
EnviarCorreoPedido(ObjFactura)
|
||||||
|
End If
|
||||||
|
|
||||||
'MENSAJE PRINCIPAL
|
'MENSAJE PRINCIPAL
|
||||||
MensajeAlert.AppendFormat(String.Format("<br/>El {0}: <b>{1}</b> se generó correctamente.<br/><br/>", ObjFactura.TipoDocumento, ObjFactura.SerieFolio))
|
MensajeAlert.AppendFormat(String.Format("<br/>El {0}: <b>{1}</b> se generó correctamente.<br/><br/>", ObjFactura.TipoDocumento, ObjFactura.SerieFolio))
|
||||||
|
|
||||||
@@ -2970,6 +3437,10 @@ Partial Class Ventas_PortalCliente
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
Private Sub EnviarCorreoPedido(ObjFactura As Modelos.Factura)
|
||||||
|
Dim Hilo As New System.Threading.Thread(Sub() MandaMails(UsuarioActual, ObjFactura.CveVenta, True, ObjFactura, ""))
|
||||||
|
Hilo.Start()
|
||||||
|
End Sub
|
||||||
|
|
||||||
Private Sub GuardarVenta(ByRef ObjVentas As ClsVentas, ByRef ObjConta As ClsContabilidad, ByRef ObjInventario As ClsInventarios, ByRef ObjContr As ClsContratos, factura As Modelos.Factura, TmpDTDetalle As DataTable, CveNCaVincular As Integer, ByRef objContPaqi As ClsContPAQi, Optional ByRef ObjBancos As ClsBancos = Nothing, Optional ByRef ObjOS As ClsOS = Nothing, ByRef Optional ObjEventos As ClsOIEventos = Nothing, ByRef Optional ObjCGame As ClsCGame = Nothing, ByRef Optional ObjCliente As ClsClientes = Nothing)
|
Private Sub GuardarVenta(ByRef ObjVentas As ClsVentas, ByRef ObjConta As ClsContabilidad, ByRef ObjInventario As ClsInventarios, ByRef ObjContr As ClsContratos, factura As Modelos.Factura, TmpDTDetalle As DataTable, CveNCaVincular As Integer, ByRef objContPaqi As ClsContPAQi, Optional ByRef ObjBancos As ClsBancos = Nothing, Optional ByRef ObjOS As ClsOS = Nothing, ByRef Optional ObjEventos As ClsOIEventos = Nothing, ByRef Optional ObjCGame As ClsCGame = Nothing, ByRef Optional ObjCliente As ClsClientes = Nothing)
|
||||||
|
|
||||||
@@ -3075,3 +3546,4 @@ Partial Class Ventas_PortalCliente
|
|||||||
|
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user