Merge branch 'master' of http://192.168.10.111:8383/SIG
This commit is contained in:
@@ -247,7 +247,7 @@ Partial Class Ventas_CatAutorizacionLimites
|
||||
Dim DiasVencidosAutorizacion As Integer = gvRow.DataKey("DiasVencidosAutorizacion").ToEntero()
|
||||
|
||||
If DiasVencidos > DiasVencidosAutorizacion Then
|
||||
Alert($"No se puede autorizar, los días vencidos del cliente son mayores a la autorización. Dias Vencidos: {DiasVencidos:N0} . Dias autorizados. {DiasVencidosAutorizacion:N0}", TipoMensaje.MsgAdvertencia)
|
||||
Alert($"No se puede autorizar, los días vencidos del cliente son mayores a la autorización. <br/> Dias Vencidos: {DiasVencidos:N0} . Dias autorizados. {DiasVencidosAutorizacion:N0}", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
|
||||
@@ -57,16 +57,16 @@
|
||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:GridView ID="GvDatos" CssClass="table table-striped table-hover" runat="server" AutoGenerateColumns="False" GridLines="None">
|
||||
<asp:GridView ID="GvDatos" CssClass="table table-striped table-hover Widthall ScrollAD" data-sort="true" runat="server" AutoGenerateColumns="False" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Promoción" ItemStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink runat="server" ID="HLPromocion" Text='<%# Eval("Promocion").ToString %>' CssClass="Texto"></asp:HyperLink>
|
||||
<asp:HyperLink runat="server" ID="HLPromocion" Text='<%# Eval("Promocion").ToString %>' NavigateUrl ='<%# Eval("CvePromocion", "/Ventas/Promociones.aspx?CvePromocion={0}") %>' CssClass="Texto"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField DataField="FechaInicio" DataFormatString="{0:d}" HeaderText="F. Inicio" ItemStyle-Width="70px" />
|
||||
<asp:BoundField DataField="FechaFin" DataFormatString="{0:d}" HeaderText="F. Fin" ItemStyle-Width="70px" />
|
||||
<asp:BoundField DataField="SubProyecto" HeaderText="SubProyecto" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataField="FechaInicio" DataFormatString="{0:d}" HeaderText="F. Inicio" ItemStyle-Width="80px" />
|
||||
<asp:BoundField DataField="FechaFin" DataFormatString="{0:d}" HeaderText="F. Fin" ItemStyle-Width="80px" />
|
||||
<asp:BoundField DataField="SubProyecto" HeaderText="Sucursal" ItemStyle-Width="125px" />
|
||||
<asp:TemplateField HeaderText="Estatus" ItemStyle-Width="70px">
|
||||
<ItemTemplate>
|
||||
<asp:Label runat="server" ID="LbEstatus" Text='<%#If(Eval("Estatus").ToString = "True", "Activo", "Inactivo") %>' />
|
||||
@@ -82,25 +82,6 @@
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="JS" runat="Server">
|
||||
|
||||
<script type="text/javascript">
|
||||
function pageLoad() {
|
||||
$(document).ready(function () {
|
||||
gridviewScroll();
|
||||
});
|
||||
|
||||
function gridviewScroll() {
|
||||
var Tam = TamañoVentana();
|
||||
var Alto = Tam.height - 210;
|
||||
|
||||
$('#<%=GvDatos.ClientID%>').gridviewScroll({
|
||||
width: 995,
|
||||
height: Alto,
|
||||
freezesize: 1,
|
||||
headerrowcount: 1
|
||||
});
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
</asp:Content>
|
||||
|
||||
@@ -36,7 +36,7 @@ Partial Class Ventas_CatPromociones
|
||||
Private Sub CargaDatos()
|
||||
|
||||
Dim ObjVentas As New ClsVentas
|
||||
If ObjVentas.GetPromociones(-1, "-1", -1, -1, DdlEstatus.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, DdlSubProyecto.SelectedValue.ToEntero) Then
|
||||
If ObjVentas.GetPromociones(-1, MinFecha, -1, -1, DdlEstatus.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, DdlSubProyecto.SelectedValue.ToEntero, CveUsuario:=UsuarioActual.CveUsuario) Then
|
||||
DtDatos = ObjVentas.DtResultados
|
||||
Else
|
||||
DtDatos = Nothing
|
||||
@@ -58,12 +58,5 @@ Partial Class Ventas_CatPromociones
|
||||
Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs)
|
||||
CargaDatos()
|
||||
End Sub
|
||||
Protected Sub GvDatos_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvDatos.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
e.Row.FCHyperLink("HLPromocion").NavigateUrl = String.Format("/Ventas/Promociones.aspx?CvePromocion={0}", e.Row.DBCampo("CvePromocion"))
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
@@ -1108,7 +1108,7 @@
|
||||
<div id="DivAnticipos" class="modal ADS fade" role="dialog">
|
||||
<asp:UpdatePanel runat="server" ID="UpAnticipos" UpdateMode="Conditional" RenderMode="Inline">
|
||||
<ContentTemplate>
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-dialog" style ="width: 700px;">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header ">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
@@ -1189,7 +1189,7 @@
|
||||
</div>
|
||||
<br />
|
||||
<asp:GridView ID="GVAnticipos" runat="server" AutoGenerateColumns="False" ClientIDMode="Static" EmptyDataText="No se encontraron Anticipos del Cliente"
|
||||
ToolTip="Listado de Anticipos" CssClass="GVAnticipos table table-striped table-hover Widthall mysmallbtn" data-height="300" Style="text-align: center;" GridLines="None"
|
||||
ToolTip="Listado de Anticipos" CssClass="GVAnticipos table table-striped table-hover Widthall mysmallbtn" data-height="300" GridLines="None"
|
||||
DataKeyNames="ISTotal,Saldo,CveIE,Folio,Tipo,CveVenta,CveConceptoContable,CveConceptoContableAmor, TotalAnticipo, SubTotalAnticipo, IVAAnticipo,IEPS, ImpuestosLocalesAnticipo, SubTotalAmortizacion, SubTotal, Original, IVA, RetIVA, RetISR, FolioFiscal, CveClasificacionNC, TipoCambio,TipoCambioPago,TipoCambioHoy, CveMoneda,Fecha,SaldoSubTotal,SaldoConImpuestos,RegresarImpuesto,DevolucionImportePagado,CveCliente,Descuentos">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
|
||||
@@ -300,8 +300,8 @@ Partial Class Ventas_PVCobranza
|
||||
|
||||
Dim dtt As DataTable = ObjMovtos.DtResultados.FiltraParametros($"CveVenta > 0 AND (CveUsuarioCobranza IS NULL OR CveUsuarioCobranza = {UsuarioActual.CveUsuario})")
|
||||
'si hay ya asignado, solo la mostrará
|
||||
Dim Dtta As DataTable = dtt.FiltraParametros($"CveUsuarioCobranza = {UsuarioActual.CveUsuario}")
|
||||
If Dtta IsNot Nothing AndAlso Dtta.Rows.Count > 0 Then dtt = Dtta
|
||||
'Dim Dtta As DataTable = dtt.FiltraParametros($"CveUsuarioCobranza = {UsuarioActual.CveUsuario}")
|
||||
'If Dtta IsNot Nothing AndAlso Dtta.Rows.Count > 0 Then dtt = Dtta
|
||||
GvDatos.DataSource = dtt
|
||||
End If
|
||||
|
||||
@@ -1740,19 +1740,19 @@ Partial Class Ventas_PVCobranza
|
||||
Me.TmpDTAnticiposNCIxCCliente = ObjMovtos.DtResultados.Copy()
|
||||
End If
|
||||
|
||||
'AGREGAR LOS ANTICIPOS, DEV, IxC QUE ESTEN EN PUBLICO GENERAL
|
||||
If Me.TmpDTAnticiposNCIxCCliente IsNot Nothing AndAlso UsuarioActual.CveEmpresa.Contiene(189, 190, 192, 195, 197) Then
|
||||
Dim CveClientePublicoGeneral = UsuarioActual.Empresa.Funcionalidad(714).ToEntero()
|
||||
If CveClientePublicoGeneral > 0 Then
|
||||
If CveCliente <> CveClientePublicoGeneral Then
|
||||
If ObjMovtos.GetAnticiposNCIxCCliente(CveClientePublicoGeneral) Then
|
||||
For Each DrGeneral As DataRow In ObjMovtos.DtResultados.Rows
|
||||
Me.TmpDTAnticiposNCIxCCliente.Rows.Add(DrGeneral.ItemArray)
|
||||
Next
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
''AGREGAR LOS ANTICIPOS, DEV, IxC QUE ESTEN EN PUBLICO GENERAL
|
||||
'If Me.TmpDTAnticiposNCIxCCliente IsNot Nothing AndAlso UsuarioActual.CveEmpresa.Contiene(189, 190, 192, 195, 197) Then
|
||||
' Dim CveClientePublicoGeneral = UsuarioActual.Empresa.Funcionalidad(714).ToEntero()
|
||||
' If CveClientePublicoGeneral > 0 Then
|
||||
' If CveCliente <> CveClientePublicoGeneral Then
|
||||
' If ObjMovtos.GetAnticiposNCIxCCliente(CveClientePublicoGeneral) Then
|
||||
' For Each DrGeneral As DataRow In ObjMovtos.DtResultados.Rows
|
||||
' Me.TmpDTAnticiposNCIxCCliente.Rows.Add(DrGeneral.ItemArray)
|
||||
' Next
|
||||
' End If
|
||||
' End If
|
||||
' End If
|
||||
'End If
|
||||
ObjMovtos.Dispose()
|
||||
|
||||
If Me.TmpDTAnticiposNCIxCCliente IsNot Nothing Then
|
||||
@@ -1850,11 +1850,11 @@ Partial Class Ventas_PVCobranza
|
||||
If dtt IsNot Nothing AndAlso dtt.Rows.Count > 0 Then
|
||||
For Each dr As DataRow In dtt.Rows
|
||||
Dim NumeroTelefono = "526621143532"
|
||||
'If EsProduccion Then
|
||||
' NumeroTelefono = String.Format("52{0}", dr("Celular").ToString())
|
||||
'End If
|
||||
If EsProduccion Then
|
||||
NumeroTelefono = String.Format("52{0}", dr("Celular").ToString())
|
||||
End If
|
||||
EnvioMsg = ModExtensiones.EnviarNotificacionWhatsApp2(NumeroTelefono, "", $"Solicitud de activación de anticipo.\\nFolio: {Folio}.\\nCliente: {NombreCliente}.")
|
||||
'ClsSisNotificaciones.EnviarAlerta("Solicitud de Anticipo", $"Solicitud de activación de anticipo Folio: {Folio} <br/><a href='/Ventas/Clientes.aspx?CveCliente={CveCliente}&op=ant'>Ir Activar</a>", dr("CveUsuario").ToString, Tipo:=TipoNotificacion.ToastInformacionB)
|
||||
ClsSisNotificaciones.EnviarAlerta("Solicitud de Anticipo", $"Solicitud de activación de anticipo Folio: {Folio} <br/><a href='/Ventas/Clientes.aspx?CveCliente={CveCliente}&op=ant'>Ir Activar</a>", dr("CveUsuario").ToString, Tipo:=TipoNotificacion.ToastInformacionB)
|
||||
Next
|
||||
End If
|
||||
|
||||
|
||||
@@ -164,6 +164,18 @@
|
||||
<asp:TextBox ID="TxtOrdenCompra" runat="server" CssClass="form-control" Width="230px" Height="30px" style="padding: 0px"></asp:TextBox>
|
||||
</td>
|
||||
</tr>
|
||||
<tr align="left" runat="server" id="TRVendedores" >
|
||||
<td class="text-right"><b>Vendedor:</b></td>
|
||||
<td>
|
||||
<asp:DropDownList ID="DdlVendedor" runat="server" CssClass="form-control input-sm select2me" AppendDataBoundItems="true" DataTextField="Vendedor" DataValueField="CveVendedor" Width="228px" >
|
||||
<asp:ListItem Selected="true" Text="Todos" Value="-1" ></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</td>
|
||||
|
||||
<td class="text-right"></td>
|
||||
<td>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td style="text-align: center;" colspan="4">
|
||||
|
||||
@@ -30,6 +30,9 @@ Partial Class PopUpBuscarFolio
|
||||
CargaPS(-1)
|
||||
'CargaCodigoCliente()
|
||||
|
||||
DdlVendedor.DataSource = GlobalDTVendedores(UsuarioActual.CveEmpresa).FiltraParametros("VendedorTipo = 1")
|
||||
DdlVendedor.DataBind()
|
||||
|
||||
RegistraScript($"$('#{TxtFolio.ClientID}').focus();", "A1")
|
||||
End If
|
||||
End Sub
|
||||
@@ -138,7 +141,7 @@ Partial Class PopUpBuscarFolio
|
||||
Dim ObjVentas As New ClsVentas()
|
||||
If ObjVentas.GetVentas(UsuarioActual.CveEmpresa, DdlTipoDocto.SelectedValue, Serie, Folio, Codigo, Cliente.ToEntero, DdlSubProyecto.SelectedValue.ToEntero,
|
||||
DdlEstatusFactura.SelectedValue.ToEntero, DdlUsuario.SelectedValue.ToEntero, FechaI, FechaF, FolioFiscal, If(DdlSucursalCliente.Visible, DdlSucursalCliente.SelectedValue.ToEntero, -1),
|
||||
DdlPS.SelectedValue.ToEntero, PedidoContrato:=PeidoContrato, OrdenCompra:=OrdenCompra, CveUsuarioConsulta:=UsuarioActual.CveUsuario, TopSelect:=100) Then
|
||||
DdlPS.SelectedValue.ToEntero, PedidoContrato:=PeidoContrato, OrdenCompra:=OrdenCompra, CveUsuarioConsulta:=UsuarioActual.CveUsuario, TopSelect:=100, CveVendedor:=DdlVendedor.SelectedValue.ToEntero) Then
|
||||
If ObjVentas.DtResultados.Rows.Count > 0 Then
|
||||
LtlTotalRegistros.Text = ObjVentas.DtResultados.Rows.Count.ToString.FormatoNumero(0)
|
||||
GV.DataSource = ObjVentas.DtResultados
|
||||
|
||||
@@ -3345,12 +3345,10 @@ Partial Class ProductosyServicios
|
||||
|
||||
End If
|
||||
Else
|
||||
|
||||
If ObjPS.GetPS(-1, -1, CveEmpresaFranquicia, Codigo:=TxtCodigo.Text.Trim.ToUpper) Then
|
||||
|
||||
If ObjPS.DtResultados IsNot Nothing AndAlso ObjPS.DtResultados.Rows.Count = 1 Then
|
||||
Dim CvePS As Integer = ObjPS.DtResultados.FiltroPrimeroValor("CvePS", String.Format(" Codigo = '{0}'", TxtCodigo.Text.Trim.ToUpper)).ToEntero()
|
||||
If Not ObjPS.UpdatePS(CveClasificacion, -1, CveUnidadMedida, TxtCodigo.Text.Trim, TxtNumeroParte.Text.Trim, TxtCodigoBarras.Text.Trim, PSS, TxtPrecio.Text.Trim.ToDouble, DdlIVA.SelectedValue.ToDouble,
|
||||
Dim CvePS As Integer = GlobalDTPSSimplificado(CveEmpresaFranquicia, Codigo:=TxtCodigo.Text.Trim.ToUpper).FiltroPrimeroValor("CvePS").ToEntero
|
||||
If CvePS > 0 Then
|
||||
'Dim CvePS As Integer = ObjPS.DtResultados.FiltroPrimeroValor("CvePS", String.Format(" Codigo = '{0}'", TxtCodigo.Text.Trim.ToUpper)).ToEntero()
|
||||
If Not ObjPS.UpdatePS(CveClasificacion, -1, CveUnidadMedida, TxtCodigo.Text.Trim, TxtNumeroParte.Text.Trim, TxtCodigoBarras.Text.Trim, PSS, TxtPrecio.Text.Trim.ToDouble, DdlIVA.SelectedValue.ToDouble,
|
||||
(TxtRetIVA.Text.Trim.ToDouble / 100), ChkInventariable.Checked, -1, True, ChkAplicaParaVenta.Checked, ChkEstado.Checked, UsuarioActual.CveUsuario, CvePS, CveMetodoInv,
|
||||
EsPaquete, DdlSATPS.SelectedValue.ToEntero, CveEmpresaFranquicia, CveTipoPS:=DdlTipoPS.SelectedValue.ToEntero, TipoServicio:=-1, CveClasificacion2:=CveClasificacion2, CveMarca:=CveMarcaFranquicia,
|
||||
AlmacenSeccion:=TxtAlmacenSeccion.Text.Trim, AplicaIEPS:=ChkAplicaIeps.Checked, IEPSPorcentaje:=DdlIEPSPorcentaje.SelectedValue.ToDecimal,
|
||||
@@ -3363,15 +3361,8 @@ Partial Class ProductosyServicios
|
||||
ClaveImpuestoUM:=DdlImpUM.SelectedValue.ToString, ClaveCategoriaToxicidad:=DdlCategoriaToxicidad.SelectedValue.ToString, ClaveImpuestoTipoProducto:=DdlImpTipoProducto.SelectedValue.ToString,
|
||||
AplicaSerie:=ChkSerie.Checked, AplicaLote:=ChkLote.Checked, AplicaCaducidad:=ChkCaducidad.Checked, AplicaSeccion:=ChkSeccion.Checked,
|
||||
TiempoCaducidad:=TxtTiempoCaducidad.Text.ToEntero()) Then
|
||||
Return True
|
||||
|
||||
End If
|
||||
|
||||
Else
|
||||
Alert(String.Format("El producto no existe en la franquicia: '{0}'", GlobalDTEmpresas(CveEmpresaFranquicia).FiltroPrimeroValor("Empresa")), TipoMensaje.MsgAdvertencia)
|
||||
Return True
|
||||
End If
|
||||
|
||||
Else
|
||||
Alert(String.Format("Se presento un error al consultar la existencia en la franquicia: '{0}'", GlobalDTEmpresas(CveEmpresaFranquicia).FiltroPrimeroValor("Empresa")), TipoMensaje.MsgAdvertencia)
|
||||
Return True
|
||||
|
||||
@@ -217,23 +217,23 @@
|
||||
<asp:BoundField HeaderText="Promoción" DataField="Promocion" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:#,###.00##}" ItemStyle-Width="10%" />
|
||||
<%--5--%>
|
||||
<asp:BoundField HeaderText="P.U. Promoción" DataField="PUPromocion" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:#,###.00##}" ItemStyle-Width="10%" />
|
||||
|
||||
<asp:BoundField HeaderText="Ultimo Costo" DataField="UltimoCosto" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:#,###.00##}" ItemStyle-Width="10%" Visible="false" />
|
||||
<asp:BoundField HeaderText="% Utilidad" DataField="UtilidadPorcentaje" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:#,###.00}" ItemStyle-Width="10%" Visible="false" />
|
||||
|
||||
<%--6--%>
|
||||
<asp:BoundField HeaderText="Condiciones" ItemStyle-HorizontalAlign="Center" DataField="AplicaRestriccionTexto" ItemStyle-Width="15%" />
|
||||
<asp:BoundField HeaderText="Ultimo Costo" DataField="UltimoCosto" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:#,###.00##}" ItemStyle-Width="10%" Visible="false" />
|
||||
<%--7--%>
|
||||
<asp:BoundField HeaderText="Clasificacion" ItemStyle-HorizontalAlign="Left" DataField="Clasificacion"/>
|
||||
<asp:BoundField HeaderText="% Utilidad" DataField="UtilidadPorcentaje" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:#,###.00}" ItemStyle-Width="10%" Visible="false" />
|
||||
<%--8--%>
|
||||
<asp:BoundField HeaderText="Rin" ItemStyle-HorizontalAlign="Left" DataField="RinTamaño" Visible="false"/>
|
||||
<asp:BoundField HeaderText="Condiciones" ItemStyle-HorizontalAlign="Center" DataField="AplicaRestriccionTexto" ItemStyle-Width="15%" />
|
||||
<%--9--%>
|
||||
<asp:BoundField HeaderText="Clasificacion" ItemStyle-HorizontalAlign="Left" DataField="Clasificacion"/>
|
||||
<%--10--%>
|
||||
<asp:BoundField HeaderText="Rin" ItemStyle-HorizontalAlign="Left" DataField="RinTamaño" Visible="false"/>
|
||||
<%--11--%>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center" ItemStyle-Width="5%">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LnkGvDetalleEditar" runat="server" AlternateText="Editar" CausesValidation="False" CommandArgument='<%# Container.DataItemIndex%>' CommandName="Editar" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-pencil'></i>" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%--10--%>
|
||||
<%--12--%>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center" ItemStyle-Width="5%">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LnkGvDetalleEliminar" 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" />
|
||||
@@ -333,7 +333,7 @@
|
||||
<asp:Label Text="" ID="LbPUActual" runat="server" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="row" runat="server" visible ="true" id="DVUltimoCostoCostoPromedio">
|
||||
<label class="col-md-3 truncate">Ultimo Costo:</label>
|
||||
<div class="col-md-3">
|
||||
<asp:Label Text="" ID="LblUltimoCosto" runat="server" />
|
||||
|
||||
@@ -20,12 +20,12 @@ Partial Class Ventas_Promociones
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property TempDTOrigial As DataTable
|
||||
Private Property TempDTOriginal As DataTable
|
||||
Get
|
||||
Return CType(ViewState("TempDTOrigial"), DataTable)
|
||||
Return CType(ViewState("TempDTOriginal"), DataTable)
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
ViewState("TempDTOrigial") = value
|
||||
ViewState("TempDTOriginal") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
@@ -146,8 +146,6 @@ Partial Class Ventas_Promociones
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
@@ -176,8 +174,7 @@ Partial Class Ventas_Promociones
|
||||
CargaDatos()
|
||||
LnkAgrgarPlantillaPS.Visible = False
|
||||
|
||||
|
||||
ValidaPromosiones(False)
|
||||
'ValidaPromociones(False)
|
||||
If EmpresaGrupoDiaz Then
|
||||
|
||||
If ChkEstatus.Checked = False AndAlso BloqueadoPromocionPorcentaje AndAlso Not PermisoAutorizPromocionPorcentaje Then
|
||||
@@ -187,7 +184,6 @@ Partial Class Ventas_Promociones
|
||||
If ChkEstatus.Checked = True And Not PermisoAutorizPromocionPorcentaje Then
|
||||
BtnGuardar.Visible = False
|
||||
ButBtnEliminar.Visible = False
|
||||
'UpBotones.Update()
|
||||
End If
|
||||
|
||||
End If
|
||||
@@ -198,6 +194,12 @@ Partial Class Ventas_Promociones
|
||||
CreaDT()
|
||||
End If
|
||||
|
||||
If EmpresaGrupoDiaz AndAlso Not PermisoAutorizPromocionPorcentaje Then
|
||||
DVUltimoCostoCostoPromedio.Visible = False
|
||||
GvDatos.Columns(6).Visible = False
|
||||
GvDatos.Columns(7).Visible = False
|
||||
End If
|
||||
|
||||
CargaGvBitacora()
|
||||
|
||||
|
||||
@@ -346,7 +348,7 @@ Partial Class Ventas_Promociones
|
||||
TempDT.Columns.Add("UtilidadPorcentaje", GetType(Decimal))
|
||||
|
||||
|
||||
TempDTOrigial = TempDT.Copy
|
||||
TempDTOriginal = TempDT.Copy
|
||||
|
||||
'366 Estatus
|
||||
'367 CvePS
|
||||
@@ -419,7 +421,7 @@ Partial Class Ventas_Promociones
|
||||
Private Sub CargaDatos()
|
||||
Dim ObjVentas As New ClsVentas
|
||||
|
||||
If ObjVentas.GetPromociones(CvePromocion, "-1", -1, -1, -1, UsuarioActual.CveEmpresa, -1) AndAlso ObjVentas.DtResultados.Rows.Count = 1 Then
|
||||
If ObjVentas.GetPromociones(CvePromocion, MinFecha, -1, -1, -1, UsuarioActual.CveEmpresa, -1) AndAlso ObjVentas.DtResultados.Rows.Count = 1 Then
|
||||
Dim Dr As DataRow = ObjVentas.DtResultados.Rows(0)
|
||||
TxtPromocion.Text = Dr("Promocion").ToString
|
||||
TxtFechaI.Text = Dr("FechaInicio").ToString.ToDate.ToShortDateString
|
||||
@@ -438,11 +440,6 @@ Partial Class Ventas_Promociones
|
||||
Else
|
||||
DdlClientes.SelectedValue = Dr("CveCliente").ToString
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
End If
|
||||
|
||||
ChkEstatus.Checked = If(Dr("Estatus").ToString = "True", True, False)
|
||||
@@ -455,12 +452,12 @@ Partial Class Ventas_Promociones
|
||||
|
||||
If ObjVentas.GetPromocionesDetalle(CvePromocion, UsuarioActual.CveEmpresa) Then
|
||||
TempDT = ObjVentas.DtResultados.Copy
|
||||
TempDTOrigial = ObjVentas.DtResultados.Copy
|
||||
TempDTOriginal = ObjVentas.DtResultados.Copy
|
||||
CargaGrid()
|
||||
Else
|
||||
Alert("Ocurrió un error al consultar los detalles de la promoción. Por favor vuelva a intentar.", TipoMensaje.MsgError)
|
||||
End If
|
||||
|
||||
CargaGvBitacora()
|
||||
Else
|
||||
Alert("Ocurrió un error al consultar la promoción. Por favor vuelva a intentar.", TipoMensaje.MsgError)
|
||||
End If
|
||||
@@ -480,7 +477,6 @@ Partial Class Ventas_Promociones
|
||||
UpDatos.Update()
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub CargaMonedas()
|
||||
DdlMoneda.DataSource = GlobalDTMonedas
|
||||
DdlMoneda.DataBind()
|
||||
@@ -633,8 +629,6 @@ Partial Class Ventas_Promociones
|
||||
Dr("UltimoCosto") = UltimoCosto
|
||||
Dr("CostoPromedio") = CostoPromedio
|
||||
|
||||
|
||||
|
||||
If UltimoCosto > 0 Then
|
||||
|
||||
Dim Promocion As Decimal = TxtPromocionConcepto.Text.ToDecimal
|
||||
@@ -654,12 +648,6 @@ Partial Class Ventas_Promociones
|
||||
Dr("UtilidadPorcentaje") = 0.0D
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
If CveConsecutivo >= 0 Then
|
||||
Dr.AcceptChanges()
|
||||
Else
|
||||
@@ -669,20 +657,18 @@ Partial Class Ventas_Promociones
|
||||
CargaGrid()
|
||||
RegistraScript("$('#DivAgregar').modal('hide')")
|
||||
|
||||
ValidaPromosiones(True)
|
||||
ValidaPromociones(True)
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub ValidaPromosiones(Bloquear As Boolean)
|
||||
|
||||
Private Sub ValidaPromociones(Bloquear As Boolean)
|
||||
|
||||
If Not EmpresaGrupoDiaz Then
|
||||
BloqueadoPromocionPorcentaje = False
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
|
||||
Dim DTPSUltimoCosto = New DataTable
|
||||
|
||||
Dim ObjInv As New ClsInventarios
|
||||
@@ -691,8 +677,6 @@ Partial Class Ventas_Promociones
|
||||
End If
|
||||
ObjInv.Dispose()
|
||||
|
||||
|
||||
|
||||
If PorMinMasCostoVentaFnc129 > 0 Then
|
||||
|
||||
For Each dRow As DataRow In TempDT.Rows
|
||||
@@ -724,11 +708,9 @@ Partial Class Ventas_Promociones
|
||||
Exit For
|
||||
End If
|
||||
End If
|
||||
|
||||
Else
|
||||
BloqueadoPromocionPorcentaje = True
|
||||
End If
|
||||
|
||||
Next
|
||||
End If
|
||||
|
||||
@@ -736,7 +718,6 @@ Partial Class Ventas_Promociones
|
||||
ChkEstatus.Checked = False
|
||||
ChkEstatus.Enabled = False
|
||||
End If
|
||||
|
||||
UpGenerales.Update()
|
||||
|
||||
End Sub
|
||||
@@ -751,7 +732,6 @@ Partial Class Ventas_Promociones
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
#Region " GV PS "
|
||||
Private Sub GvDatos_RowCommand(sender As Object, e As GridViewCommandEventArgs) Handles GvDatos.RowCommand
|
||||
|
||||
@@ -835,7 +815,7 @@ Partial Class Ventas_Promociones
|
||||
|
||||
End If
|
||||
|
||||
ValidaPromosiones(True)
|
||||
ValidaPromociones(True)
|
||||
|
||||
Dim CveCliente As Integer = If(DdlClientes.SelectedValue = "", -1, DdlClientes.SelectedValue.ToEntero)
|
||||
Dim ObjVentas As New ClsVentas
|
||||
@@ -950,7 +930,7 @@ Partial Class Ventas_Promociones
|
||||
|
||||
|
||||
|
||||
Dim Dr2 As DataRow = TempDTOrigial.FiltraParametros($"CvePromocionDetalle = {Dr("CvePromocionDetalle").ToString}").Rows(0)
|
||||
Dim Dr2 As DataRow = TempDTOriginal.FiltraParametros($"CvePromocionDetalle = {Dr("CvePromocionDetalle").ToString}").Rows(0)
|
||||
|
||||
If Not TieneError And Dr("CvePS").ToString <> Dr2("CvePS").ToString Then
|
||||
If Not ObjGral.AddHistorialBitacora(367, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Dr("CodigoPS").ToString, Dr2("CodigoPS").ToString, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 1, "Se elimino " & Dr("CodigoPS").ToString, "PS", "", CvePromocion:=CvePromocion) Then
|
||||
@@ -1271,14 +1251,12 @@ Partial Class Ventas_Promociones
|
||||
Dim contenido As Byte() = System.IO.File.ReadAllBytes(rutaArchivoPlantilla)
|
||||
Response.BinaryWrite(contenido)
|
||||
|
||||
|
||||
Response.Flush()
|
||||
Response.End()
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
Protected Sub BrnAgregarPlantilla_Click(sender As Object, e As EventArgs)
|
||||
|
||||
If TxtExcel.getfiles().Archivos.Count > 0 Then
|
||||
@@ -1374,15 +1352,13 @@ Partial Class Ventas_Promociones
|
||||
CargaGrid()
|
||||
RegistraScript("$('#DivAgregarPlantilla').modal('hide')")
|
||||
|
||||
ValidaPromosiones(True)
|
||||
ValidaPromociones(True)
|
||||
|
||||
End Sub
|
||||
|
||||
Private Function ValidaDTPlantilla(ByRef DTPlantilla As DataTable) As Boolean
|
||||
|
||||
Dim Errores As New StringBuilder
|
||||
|
||||
|
||||
DTPlantilla.Columns.Add("CveClasificacion", GetType(Integer))
|
||||
DTPlantilla.Columns.Add("CvePS", GetType(Integer))
|
||||
DTPlantilla.Columns.Add("CveTipoPromosicion", GetType(Integer))
|
||||
@@ -1396,13 +1372,13 @@ Partial Class Ventas_Promociones
|
||||
|
||||
Dim DTPS As DataTable = New DataTable
|
||||
Dim DTRines As DataTable = New DataTable
|
||||
Dim ObjPS As New ClsProductosServicios
|
||||
If ObjPS.GetPS(-1, -1, UsuarioActual.CveEmpresa) Then
|
||||
DTPS = ObjPS.DtResultados
|
||||
End If
|
||||
ObjPS.Dispose()
|
||||
|
||||
'Dim ObjPS As New ClsProductosServicios
|
||||
'If ObjPS.GetPS(-1, -1, UsuarioActual.CveEmpresa) Then
|
||||
' DTPS = ObjPS.DtResultados
|
||||
'End If
|
||||
'ObjPS.Dispose()
|
||||
|
||||
DTPS = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa)
|
||||
DTRines = GlobalDTPSRinTamaños(UsuarioActual.CveEmpresa)
|
||||
|
||||
Dim RegistroActual As Integer = 1
|
||||
@@ -1436,7 +1412,6 @@ Partial Class Ventas_Promociones
|
||||
If ClasificacionStr.Length > 0 And CodigoStr.Length > 0 Then
|
||||
SBErrorRegistro.Append($"No se puede agregar Clasificación y codigo en un mismo registro. ")
|
||||
Else
|
||||
|
||||
If ClasificacionStr.Length > 0 Then
|
||||
SBErrorRegistro.Append(If(CveClasificacion > 0, "", $"No se encontro Clasificación '{ClasificacionStr}'. </br>"))
|
||||
Else
|
||||
@@ -1513,9 +1488,7 @@ Partial Class Ventas_Promociones
|
||||
LblCostoPromedio.Text = DTPSUltimoCosto.FiltroPrimeroValor("CostoPromedio", "").FormatoNumero(4)
|
||||
LbPUActual.Text = DTPSUltimoCosto.FiltroPrimeroValor("Importe", "").FormatoNumero(4)
|
||||
|
||||
|
||||
UpAgregar.Update()
|
||||
End Sub
|
||||
|
||||
|
||||
End Class
|
||||
Reference in New Issue
Block a user