Merge branch 'master' of http://jperez@adsistemasof.sytes.net:8383/SIG.git
This commit is contained in:
@@ -189,14 +189,6 @@ Partial Class Ventas_ClientesAbonar
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private Property EmpresaPrueba As Boolean
|
||||
Get
|
||||
Return CBool(ViewState("EmpresaPrueba"))
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
ViewState("EmpresaPrueba") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property Mail As String
|
||||
Get
|
||||
@@ -313,14 +305,8 @@ Partial Class Ventas_ClientesAbonar
|
||||
|
||||
TxtOtrosImportes.Attributes.Add("onKeyUp", String.Format("FnSuma(this,{0},{1});", "TxtTotal", 0))
|
||||
|
||||
|
||||
If Not UsuarioActual.Empresa.UsaAC Then
|
||||
EmpresaPrueba = True
|
||||
End If
|
||||
|
||||
If CveMoneda > 0 Then LbTipoMoneda.Text = String.Format("Pago en {0}", GlobalDTMonedas.FiltraParametros(String.Format("CveMoneda = {0}", CveMoneda)).Rows(0)("Moneda"))
|
||||
|
||||
|
||||
If CveMoneda = 2 Then
|
||||
ChkPagarPesos.Visible = True
|
||||
TxtTC.Text = GlobalTipoCambio(Fecha).FormatoNumero(4)
|
||||
@@ -814,8 +800,12 @@ Partial Class Ventas_ClientesAbonar
|
||||
'inserto las ventas que voy a pagar
|
||||
For Each gvr As GridViewRow In GvCxC.Rows
|
||||
If gvr.FCCheckBox("Chk").Checked Then
|
||||
Dim ObjFactura As Modelos.Factura
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
|
||||
ObjFactura = New Modelos.Factura(UsuarioActual, gvr.DataKey("CveVenta").ToEntero(), UsuarioActual.CveEmpresa)
|
||||
End If
|
||||
|
||||
Dim ObjFactura As New Modelos.Factura(UsuarioActual, gvr.DataKey("CveVenta").ToEntero(), UsuarioActual.CveEmpresa)
|
||||
|
||||
If CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then 'Si la venta viene en Pesos y se va a pagar en Pesos
|
||||
tipoCambioPago = 1
|
||||
@@ -915,7 +905,7 @@ Partial Class Ventas_ClientesAbonar
|
||||
|
||||
Case 8 'Ret IVA x Trasladar
|
||||
If EsAnticipoEspecial Then Exit Select
|
||||
If ObjFactura.CveTipoRetencion = 4 Then
|
||||
If ObjFactura IsNot Nothing AndAlso ObjFactura.CveTipoRetencion = 4 Then
|
||||
Exit Select
|
||||
End If
|
||||
If CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
|
||||
@@ -964,7 +954,7 @@ Partial Class Ventas_ClientesAbonar
|
||||
|
||||
Case 313 'Ret Iva Servicios
|
||||
If EsAnticipoEspecial Then Exit Select
|
||||
If ObjFactura.CveTipoRetencion = 4 Then
|
||||
If ObjFactura IsNot Nothing AndAlso ObjFactura.CveTipoRetencion = 4 Then
|
||||
If CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
|
||||
ImporteMovimiento = gvr.DataKey("RetIVA").ToDecimal * PorcentajePago
|
||||
importeMX = ImporteMovimiento
|
||||
@@ -1079,7 +1069,7 @@ Partial Class Ventas_ClientesAbonar
|
||||
If tipoCambioVenta > 1 Then ConceptoMovimiento += $" TC:{tipoCambioVenta} ${ImporteMovimiento.FormatoNumero(2)}"
|
||||
Case 62 'Ret IVA Trasladado
|
||||
If EsAnticipoEspecial Then Exit Select
|
||||
If ObjFactura.CveTipoRetencion = 4 Then
|
||||
If ObjFactura IsNot Nothing AndAlso ObjFactura.CveTipoRetencion = 4 Then
|
||||
Exit Select
|
||||
End If
|
||||
If CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
|
||||
@@ -1129,7 +1119,7 @@ Partial Class Ventas_ClientesAbonar
|
||||
|
||||
Case 314 'Ret Iva Servicios Traslado
|
||||
If EsAnticipoEspecial Then Exit Select
|
||||
If ObjFactura.CveTipoRetencion = 4 Then
|
||||
If ObjFactura IsNot Nothing AndAlso ObjFactura.CveTipoRetencion = 4 Then
|
||||
If CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
|
||||
ImporteMovimiento = gvr.DataKey("RetIVA").ToDecimal * PorcentajePago
|
||||
importeMX = ImporteMovimiento
|
||||
@@ -1482,7 +1472,7 @@ Partial Class Ventas_ClientesAbonar
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
If gvr.FCCheckBox("ChkGenerarNC").Checked Then
|
||||
If gvr.FCCheckBox("ChkGenerarNC").Checked AndAlso ObjFactura IsNot Nothing Then
|
||||
ObjFactura.DescuentoProntoPago = gvr.DataKey("DescuentoProntoPago").ToDecimal()
|
||||
ListaFacturasGenerarNC.Add(ObjFactura)
|
||||
End If
|
||||
@@ -1571,42 +1561,34 @@ Partial Class Ventas_ClientesAbonar
|
||||
End If
|
||||
End If
|
||||
|
||||
If MsgError = "" AndAlso UsuarioActual.Empresa.Funcionalidad(220) <> "" Then
|
||||
If Not ObjMov.PrePolizaSimplificacion(CvePrePoliza, UsuarioActual.CveEmpresa) Then
|
||||
MsgError = "No se pudo simplificar los movimientos"
|
||||
Alert("No se pudo simplificar los movimientos", TipoMensaje.MsgError)
|
||||
End If
|
||||
End If
|
||||
|
||||
If ObjMov.ValidacionPrePolizaCuadre(CvePrePoliza, 3) Then
|
||||
If ObjMov.ValorPolizaDescuadre > 0 Then
|
||||
MsgError = ObjMov.MensajePolizaDescuadre + " La diferencia es de: " + ObjMov.ValorDiferencia
|
||||
End If
|
||||
End If
|
||||
|
||||
If EmpresaPrueba Then 'Empresa Prueba
|
||||
'El movimiento 2 es el de Pago
|
||||
'Conta SIG
|
||||
If UsuarioActual.Empresa.Funcionalidad(200) = "1" And MsgError = "" AndAlso UsuarioActual.Empresa.UsaContabilidadSIG Then
|
||||
If CveCuentaContabilizacion > 0 Then
|
||||
If ObjMov.ContabilizarPrePolizaSIG(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa) Then
|
||||
IDPoliza = ObjMov.ContaIdPoliza
|
||||
FolioPoliza = ObjMov.ContaFolio
|
||||
Else
|
||||
Alert("Ocurrio un error al contabilizar, pongase en contacto con Soporte Técnico")
|
||||
End If
|
||||
'Conta ContPAQ
|
||||
If UsuarioActual.Empresa.Funcionalidad(200) = "1" AndAlso MsgError = "" Then
|
||||
If idCuentaContabilizacion > 0 Then
|
||||
If ObjMov.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa) Then
|
||||
IDPoliza = ObjMov.ContaIdPoliza
|
||||
FolioPoliza = ObjMov.ContaFolio
|
||||
Else
|
||||
Alert(String.Format("No se puede contabilizar la Prepoliza debido a que las siguientes cuentas son invalidas: {0}", CuentasContablesInvalidasSIG))
|
||||
Alert("Ocurrio un error al contabilizar, pongase en contacto con Soporte Técnico")
|
||||
MsgError = "Ocurrio un error al contabilizar, pongase en contacto con Soporte Técnico"
|
||||
End If
|
||||
Else
|
||||
Alert(String.Format("No se puede contabilizar la Prepoliza debido a que las siguientes cuentas son invalidas: {0}", CuentasContablesInvalidas))
|
||||
End If
|
||||
End If
|
||||
|
||||
'Conta ContPAQ
|
||||
If UsuarioActual.Empresa.Funcionalidad(200) = "1" AndAlso MsgError = "" Then
|
||||
If idCuentaContabilizacion > 0 Then
|
||||
If ObjMov.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa) Then
|
||||
IDPoliza = ObjMov.ContaIdPoliza
|
||||
FolioPoliza = ObjMov.ContaFolio
|
||||
Else
|
||||
Alert("Ocurrio un error al contabilizar, pongase en contacto con Soporte Técnico")
|
||||
End If
|
||||
Else
|
||||
Alert(String.Format("No se puede contabilizar la Prepoliza debido a que las siguientes cuentas son invalidas: {0}", CuentasContablesInvalidas))
|
||||
End If
|
||||
End If
|
||||
End If 'Empresa Prueba
|
||||
Else
|
||||
MsgError = "No se pudo insertar la póliza"
|
||||
End If
|
||||
|
||||
72
Ventas/RepTopClientesVentas.aspx
Normal file
72
Ventas/RepTopClientesVentas.aspx
Normal file
@@ -0,0 +1,72 @@
|
||||
<%@ Page Title="Reporte de Top de Ventas por Cliente" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepTopClientesVentas.aspx.vb" Inherits="Ventas_RepTopClientesVentas" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
<link rel="stylesheet" href="https://www.amcharts.com/lib/3/plugins/export/export.css" type="text/css" media="all" />
|
||||
<style>
|
||||
</style>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content8" ContentPlaceHolderID="HA" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
||||
<li>
|
||||
<asp:LinkButton ID="ImgImprimir" runat="server"> <i class="fa fa-file-pdf-o" style="font-weight:bold;"></i> PDF</asp:LinkButton>
|
||||
</li>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
||||
Reporte de Top de Ventas por Cliente
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
<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" />
|
||||
<a href="javascript:;" class="expand"></a>
|
||||
</div>
|
||||
<div class="titlefiltros caption">
|
||||
<div class="row" style="height: 32px;">
|
||||
<label class="col-md-1">Mes: </label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList CssClass="table-group-action-input form-control input-inline input-small input-sm select2me" ID="DdlMes" runat="server" AutoPostBack="false">
|
||||
<asp:ListItem Selected="True" Text="Enero" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Febrero" Value="2"></asp:ListItem>
|
||||
<asp:ListItem Text="Marzo" Value="3"></asp:ListItem>
|
||||
<asp:ListItem Text="Abril" Value="4"></asp:ListItem>
|
||||
<asp:ListItem Text="Mayo" Value="5"></asp:ListItem>
|
||||
<asp:ListItem Text="Junio" Value="6"></asp:ListItem>
|
||||
<asp:ListItem Text="Julio" Value="7"></asp:ListItem>
|
||||
<asp:ListItem Text="Agosto" Value="8"></asp:ListItem>
|
||||
<asp:ListItem Text="Septiembre" Value="9"></asp:ListItem>
|
||||
<asp:ListItem Text="Octubre" Value="10"></asp:ListItem>
|
||||
<asp:ListItem Text="Noviembre" Value="11"></asp:ListItem>
|
||||
<asp:ListItem Text="Diciembre" Value="12"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<label class="col-md-1">Mes: </label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList CssClass="table-group-action-input form-control input-inline input-small input-sm select2me" ID="DdlAño" DataValueField="IdAño" DataTextField="Año" runat="server" AutoPostBack="false">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
|
||||
<label class="col-md-1 ">Grupo:</label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlGrupo" runat="server" AppendDataBoundItems="true" Class="table-group-action-input form-control input-inline input-small input-sm select2me">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
<script>
|
||||
</script>
|
||||
</asp:Content>
|
||||
42
Ventas/RepTopClientesVentas.aspx.vb
Normal file
42
Ventas/RepTopClientesVentas.aspx.vb
Normal file
@@ -0,0 +1,42 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
|
||||
Imports System.Data
|
||||
Imports System.Web.Compilation
|
||||
Imports Extensiones
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
|
||||
Partial Class Ventas_RepTopClientesVentas
|
||||
Inherits ClsPaginas
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
If Not IsPostBack Then
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub CargarFiltros()
|
||||
Dim tablaAños As New DataTable
|
||||
|
||||
Dim idAño As New DataColumn
|
||||
idAño.ColumnName = "idAño"
|
||||
idAño.Caption = "idAño"
|
||||
idAño.DataType = System.Type.GetType("System.Int32")
|
||||
|
||||
Dim Año As New DataColumn
|
||||
Año.ColumnName = "Año"
|
||||
Año.Caption = "Año"
|
||||
Año.DataType = System.Type.GetType("System.Int32")
|
||||
|
||||
tablaAños.Columns.Add(idAño)
|
||||
tablaAños.Columns.Add(Año)
|
||||
|
||||
Dim añoActual As Integer = DateTime.Now.Year
|
||||
|
||||
For AñoIndex As Integer = añoActual To (añoActual - 10) Step -1
|
||||
Dim row As DataRow = tablaAños.NewRow()
|
||||
'row["idAño"] =
|
||||
Next
|
||||
|
||||
End Sub
|
||||
End Class
|
||||
Reference in New Issue
Block a user