Merge branch 'master' of http://192.168.10.111:8383/SIG
282
.gitignore
vendored
@@ -1,270 +1,12 @@
|
||||
## Ignore Visual Studio temporary files, build results, and
|
||||
## files generated by popular Visual Studio add-ons.
|
||||
web.config
|
||||
Log.txt
|
||||
LogMail.txt
|
||||
LogPenske.txt
|
||||
LogTimbrado.txt
|
||||
[Mm]enu/
|
||||
[Tt]emp/
|
||||
[Ee]mpresas/
|
||||
# User-specific files
|
||||
*.suo
|
||||
*.user
|
||||
*.userosscache
|
||||
*.sln.docstates
|
||||
|
||||
# User-specific files (MonoDevelop/Xamarin Studio)
|
||||
*.userprefs
|
||||
|
||||
# Build results
|
||||
[Dd]ebug/
|
||||
[Dd]ebugPublic/
|
||||
[Rr]elease/
|
||||
[Rr]eleases/
|
||||
x64/
|
||||
x86/
|
||||
bld/
|
||||
[Bb]in/
|
||||
[Oo]bj/
|
||||
[Ll]og/
|
||||
|
||||
# Visual Studio 2015 cache/options directory
|
||||
.vs/
|
||||
# Uncomment if you have tasks that create the project's static files in wwwroot
|
||||
#wwwroot/
|
||||
|
||||
# MSTest test Results
|
||||
[Tt]est[Rr]esult*/
|
||||
[Bb]uild[Ll]og.*
|
||||
|
||||
# NUNIT
|
||||
*.VisualState.xml
|
||||
TestResult.xml
|
||||
|
||||
# Build Results of an ATL Project
|
||||
[Dd]ebugPS/
|
||||
[Rr]eleasePS/
|
||||
dlldata.c
|
||||
|
||||
# DNX
|
||||
project.lock.json
|
||||
project.fragment.lock.json
|
||||
artifacts/
|
||||
|
||||
*_i.c
|
||||
*_p.c
|
||||
*_i.h
|
||||
*.ilk
|
||||
*.meta
|
||||
*.obj
|
||||
*.pch
|
||||
*.pdb
|
||||
*.pgc
|
||||
*.pgd
|
||||
*.rsp
|
||||
*.sbr
|
||||
*.tlb
|
||||
*.tli
|
||||
*.tlh
|
||||
*.tmp
|
||||
*.tmp_proj
|
||||
*.log
|
||||
*.vspscc
|
||||
*.vssscc
|
||||
.builds
|
||||
*.pidb
|
||||
*.svclog
|
||||
*.scc
|
||||
|
||||
# Chutzpah Test files
|
||||
_Chutzpah*
|
||||
|
||||
# Visual C++ cache files
|
||||
ipch/
|
||||
*.aps
|
||||
*.ncb
|
||||
*.opendb
|
||||
*.opensdf
|
||||
*.sdf
|
||||
*.cachefile
|
||||
*.VC.db
|
||||
*.VC.VC.opendb
|
||||
|
||||
# Visual Studio profiler
|
||||
*.psess
|
||||
*.vsp
|
||||
*.vspx
|
||||
*.sap
|
||||
|
||||
# TFS 2012 Local Workspace
|
||||
$tf/
|
||||
|
||||
# Guidance Automation Toolkit
|
||||
*.gpState
|
||||
|
||||
# ReSharper is a .NET coding add-in
|
||||
_ReSharper*/
|
||||
*.[Rr]e[Ss]harper
|
||||
*.DotSettings.user
|
||||
|
||||
# JustCode is a .NET coding add-in
|
||||
.JustCode
|
||||
|
||||
# TeamCity is a build add-in
|
||||
_TeamCity*
|
||||
|
||||
# DotCover is a Code Coverage Tool
|
||||
*.dotCover
|
||||
|
||||
# NCrunch
|
||||
_NCrunch_*
|
||||
.*crunch*.local.xml
|
||||
nCrunchTemp_*
|
||||
|
||||
# MightyMoose
|
||||
*.mm.*
|
||||
AutoTest.Net/
|
||||
|
||||
# Web workbench (sass)
|
||||
.sass-cache/
|
||||
|
||||
# Installshield output folder
|
||||
[Ee]xpress/
|
||||
|
||||
# DocProject is a documentation generator add-in
|
||||
DocProject/buildhelp/
|
||||
DocProject/Help/*.HxT
|
||||
DocProject/Help/*.HxC
|
||||
DocProject/Help/*.hhc
|
||||
DocProject/Help/*.hhk
|
||||
DocProject/Help/*.hhp
|
||||
DocProject/Help/Html2
|
||||
DocProject/Help/html
|
||||
|
||||
# Click-Once directory
|
||||
publish/
|
||||
|
||||
# Publish Web Output
|
||||
*.[Pp]ublish.xml
|
||||
*.azurePubxml
|
||||
# TODO: Comment the next line if you want to checkin your web deploy settings
|
||||
# but database connection strings (with potential passwords) will be unencrypted
|
||||
#*.pubxml
|
||||
*.publishproj
|
||||
|
||||
# Microsoft Azure Web App publish settings. Comment the next line if you want to
|
||||
# checkin your Azure Web App publish settings, but sensitive information contained
|
||||
# in these scripts will be unencrypted
|
||||
PublishScripts/
|
||||
|
||||
# NuGet Packages
|
||||
*.nupkg
|
||||
# The packages folder can be ignored because of Package Restore
|
||||
**/packages/*
|
||||
# except build/, which is used as an MSBuild target.
|
||||
!**/packages/build/
|
||||
# Uncomment if necessary however generally it will be regenerated when needed
|
||||
#!**/packages/repositories.config
|
||||
# NuGet v3's project.json files produces more ignoreable files
|
||||
*.nuget.props
|
||||
*.nuget.targets
|
||||
|
||||
# Microsoft Azure Build Output
|
||||
csx/
|
||||
*.build.csdef
|
||||
|
||||
# Microsoft Azure Emulator
|
||||
ecf/
|
||||
rcf/
|
||||
|
||||
# Windows Store app package directories and files
|
||||
AppPackages/
|
||||
BundleArtifacts/
|
||||
Package.StoreAssociation.xml
|
||||
_pkginfo.txt
|
||||
|
||||
# Visual Studio cache files
|
||||
# files ending in .cache can be ignored
|
||||
*.[Cc]ache
|
||||
# but keep track of directories ending in .cache
|
||||
!*.[Cc]ache/
|
||||
|
||||
# Others
|
||||
ClientBin/
|
||||
~$*
|
||||
*~
|
||||
*.dbmdl
|
||||
*.dbproj.schemaview
|
||||
*.jfm
|
||||
*.pfx
|
||||
*.publishsettings
|
||||
node_modules/
|
||||
orleans.codegen.cs
|
||||
|
||||
# Since there are multiple workflows, uncomment next line to ignore bower_components
|
||||
# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
|
||||
#bower_components/
|
||||
|
||||
# RIA/Silverlight projects
|
||||
Generated_Code/
|
||||
|
||||
# Backup & report files from converting an old project file
|
||||
# to a newer Visual Studio version. Backup files are not needed,
|
||||
# because we have git ;-)
|
||||
_UpgradeReport_Files/
|
||||
Backup*/
|
||||
UpgradeLog*.XML
|
||||
UpgradeLog*.htm
|
||||
|
||||
# SQL Server files
|
||||
*.mdf
|
||||
*.ldf
|
||||
|
||||
# Business Intelligence projects
|
||||
*.rdl.data
|
||||
*.bim.layout
|
||||
*.bim_*.settings
|
||||
|
||||
# Microsoft Fakes
|
||||
FakesAssemblies/
|
||||
|
||||
# GhostDoc plugin setting file
|
||||
*.GhostDoc.xml
|
||||
|
||||
# Node.js Tools for Visual Studio
|
||||
.ntvs_analysis.dat
|
||||
|
||||
# Visual Studio 6 build log
|
||||
*.plg
|
||||
|
||||
# Visual Studio 6 workspace options file
|
||||
*.opt
|
||||
|
||||
# Visual Studio LightSwitch build output
|
||||
**/*.HTMLClient/GeneratedArtifacts
|
||||
**/*.DesktopClient/GeneratedArtifacts
|
||||
**/*.DesktopClient/ModelManifest.xml
|
||||
**/*.Server/GeneratedArtifacts
|
||||
**/*.Server/ModelManifest.xml
|
||||
_Pvt_Extensions
|
||||
|
||||
# Paket dependency manager
|
||||
.paket/paket.exe
|
||||
paket-files/
|
||||
|
||||
# FAKE - F# Make
|
||||
.fake/
|
||||
|
||||
# JetBrains Rider
|
||||
.idea/
|
||||
*.sln.iml
|
||||
*.sln
|
||||
|
||||
# CodeRush
|
||||
.cr/
|
||||
|
||||
# Python Tools for Visual Studio (PTVS)
|
||||
__pycache__/
|
||||
*.pyc
|
||||
/Utilerias
|
||||
################################################################################
|
||||
# Este archivo .gitignore ha sido creado automáticamente por Microsoft(R) Visual Studio.
|
||||
################################################################################
|
||||
|
||||
/Empresas
|
||||
/Menu
|
||||
/Web.config
|
||||
/Log.txt
|
||||
/.vs/localhost/v14/.suo
|
||||
/LogMail.txt
|
||||
/.vs
|
||||
/packages
|
||||
|
||||
BIN
.vs/SIGGIT/v14/.suo
Normal file
@@ -2921,6 +2921,23 @@ Public Class ClsCompras
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function UpdateFechaVencimientoCompra(CveCompra As Integer, FechaVencimiento As Date, CveEmpresa As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Comp_ComprasFechaVencimientoUpdate")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveCompra", SqlDbType.Int).Value = CveCompra
|
||||
.Add("@FechaVencimiento", SqlDbType.Date).Value = FechaVencimiento
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al actualizar la fecha de vencimiento de la compra.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End Try
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
#Region "REPORTE PUE SIN PAGO"
|
||||
|
||||
Public Function GetPUESinPago(FI As DateTime, FF As DateTime, CveProveedor As Integer, CveSubProyecto As Integer, CveEmpresa As Integer, Optional CveUsuario As Integer = -1) As Boolean
|
||||
|
||||
@@ -4351,6 +4351,7 @@ Public Class ClsPaginas
|
||||
PaginaDict.Add("/Sistemas/PermisosPorUsuario.aspx".ToUpper(), 700)
|
||||
PaginaDict.Add("/Sistemas/Cierre.aspx".ToUpper(), 713)
|
||||
PaginaDict.Add("/Sistemas/CatTareasProgramadas.aspx".ToUpper(), -1)
|
||||
PaginaDict.Add("/Sistemas/ConfiguracionEmpresa.aspx".ToUpper(), 683)
|
||||
#End Region
|
||||
#Region "Ventas"
|
||||
'VENTAS
|
||||
|
||||
@@ -1796,6 +1796,87 @@ Public Class ClsProductosServicios
|
||||
End Function
|
||||
#End Region
|
||||
|
||||
#Region "Porcentaje Marcas de Productos"
|
||||
Public Function GetPorcentajeMarcas(CveCliente As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Vta_PorcentajeMarcasGet")
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
|
||||
.Add("@CveCliente", SqlDbType.Int).Value = CveCliente
|
||||
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al obtener los porcentajes de las Marcas.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function AddPorcentajeMarcas(CveCliente As Integer, CveMarca As Integer, PorcentajeProducto As Decimal, CveUsuario As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Vta_PorcentajeMarcasAdd")
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
|
||||
.Add("@CveCliente", SqlDbType.Int).Value = CveCliente
|
||||
.Add("@CveMarca", SqlDbType.Int).Value = CveMarca
|
||||
.Add("@PorcentajeProducto", SqlDbType.SmallMoney).Value = PorcentajeProducto
|
||||
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al agregar el porcentaje de la Marca.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
Public Function UpdatePorcentajeMarcas(CveCliente As Integer, CveMarca As Integer, PorcentajeProducto As Decimal) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Vta_PorcentajeMarcasUpdate")
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
|
||||
.Add("@CveCliente", SqlDbType.Int).Value = CveCliente
|
||||
.Add("@CveMarca", SqlDbType.Int).Value = CveMarca
|
||||
.Add("@PorcentajeProducto", SqlDbType.SmallMoney).Value = PorcentajeProducto
|
||||
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al actualizar el porcentaje de la Marca.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
Public Function RemovePorcentajeMarcas(CveCliente As Integer, CveMarca As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Vta_PorcentajeMarcasRemove")
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
|
||||
.Add("@CveCliente", SqlDbType.Int).Value = CveCliente
|
||||
.Add("@CveMarca", SqlDbType.Int).Value = CveMarca
|
||||
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al eliminar el porcentaje de la Marca.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
#End Region
|
||||
#Region "IDisposable Support"
|
||||
|
||||
|
||||
|
||||
@@ -568,6 +568,26 @@ Public Class ClsVentas
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
Public Function UpdateVentaRealizarDevolucion(CveVenta As Integer, RealizarDevolucion As Boolean, CveAlmacenDevolucion As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_VentasRealizarDevolucionUpdate")
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveVenta", SqlDbType.Int).Value = CveVenta
|
||||
.Add("@RealizarDevolucion", SqlDbType.Bit).Value = RealizarDevolucion
|
||||
.Add("@CveAlmacenDevolucion", SqlDbType.Int).Value = CveAlmacenDevolucion
|
||||
End With
|
||||
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al actualizar el estatus de devolución.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
Public Function UpdateEstatusRefacturacion(CveVenta As Integer, CveEstatusRefacturacion As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
@@ -835,6 +855,20 @@ Public Class ClsVentas
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
Public Function GetRemisionesXCancelar(CveVenta As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Vta_RemisionesXCancelarGet")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveVenta", SqlDbType.Int).Value = CveVenta
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al agregar las remisiones x cancelar.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End Try
|
||||
Return Retorno
|
||||
End Function
|
||||
Public Function AddRemisionesXCancelar(CveVenta As Integer, CveVentaRemision As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Vta_RemisionesXCancelarAdd")
|
||||
@@ -3596,6 +3630,23 @@ Public Class ClsVentas
|
||||
Return retorno
|
||||
End Function
|
||||
|
||||
Public Function TraspasaVentasAplicadasAnt(CveVentaNueva As Integer, CveVentaAnterior As Integer, CveEmpresa As Integer) As Boolean
|
||||
Dim retorno As Boolean = False
|
||||
DataAdapter("PA_Vta_TraspasaVentasAplicadasAnt", CommandType.StoredProcedure)
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveVentaNueva", SqlDbType.Int).Value = CveVentaNueva
|
||||
.Add("@CveVentaAnterior", SqlDbType.Int).Value = CveVentaAnterior
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al traspasar las ventas aplicadas al nuevo anticipo.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End Try
|
||||
Return retorno
|
||||
End Function
|
||||
|
||||
#Region " AUTORIZACION DESCUENTOS "
|
||||
|
||||
Public Function AutorizacionDescuentosGet(CveAutorizacionDescuento As Integer, CveEmpresa As Integer) As Boolean
|
||||
|
||||
3016
App_Code/Modelos.vb
@@ -36,8 +36,6 @@ Partial Class Bancos_CuentasBancariasDetalle
|
||||
DdlUsuarios.DataSource = GlobalDTUsuarios(CveEmpresa:=UsuarioActual.CveEmpresa).FiltraParametros("", "Nombre")
|
||||
DdlUsuarios.DataBind()
|
||||
|
||||
|
||||
|
||||
If Request("CveCuenta") IsNot Nothing AndAlso IsNumeric(Request("CveCuenta")) AndAlso Request("CveCuenta").ToEntero > 0 Then
|
||||
ViewState("CveCuenta") = Request("CveCuenta")
|
||||
|
||||
|
||||
@@ -656,23 +656,7 @@ Partial Class Bancos_IE
|
||||
RBL.Items.Add(New ListItem("Acreedores Diversos", "AC"))
|
||||
End If
|
||||
|
||||
'08/05/2018 - Se deshabilita opcion Eliminar IE si tiene un complemento de pago relacionado
|
||||
If CveIE = -1 Or (CveIE > 0 AndAlso VerificaComplementos(False)) Then
|
||||
LnkEliminar.Visible = False
|
||||
If CveIE > 0 Then
|
||||
LnkCancelar.Visible = False
|
||||
|
||||
If UsuarioActual.TienePermisoProceso(85) Then
|
||||
LnkCancelarComplemento.Visible = True
|
||||
LnkCancelarComplementoImporte.Visible = True
|
||||
End If
|
||||
'LnkEliminarComplemento.NavigateUrl = String.Format("/Ventas/ClientesAbonar.aspx?CveIESustitucion={0}&CveCliente={1}", CveIE, CveCliente)
|
||||
End If
|
||||
Else
|
||||
LnkEliminar.Visible = True
|
||||
LnkCancelarComplemento.Visible = False
|
||||
LnkCancelarComplementoImporte.Visible = False
|
||||
End If
|
||||
|
||||
If TabCancelacion.Visible Then
|
||||
LnkCancelar.Visible = False
|
||||
@@ -1101,33 +1085,52 @@ Partial Class Bancos_IE
|
||||
BtnGuardar.Enabled = False
|
||||
End If
|
||||
|
||||
'2019-08-28 unificados vista de controles complemento (Cancelado, conciliciado, Con complemento vigente, sin complemento vigente)
|
||||
Dim ExistenComplementosVigentes As Boolean = VerificaComplementos(True)
|
||||
Dim ExistenComplementos As Boolean = VerificaComplementos(False)
|
||||
|
||||
If Not ChkConciliado.Checked Then
|
||||
If Not ChkConciliado.Checked And ObjIE.CveEstatusIE <> 2 Then
|
||||
|
||||
If (Not VerificaComplementos(True)) And UsuarioActual.TienePermisoProceso(99) And ObjIE.CveEstatusIE <> 2 Then
|
||||
If (Not ExistenComplementosVigentes) Then
|
||||
|
||||
If UsuarioActual.TienePermisoProceso(99) Then ' Proceso 99 Editar IE
|
||||
BtnEditar.Visible = True
|
||||
PermisoComplementoVigente = True
|
||||
End If
|
||||
DVGenerarComplementoModal.Visible = True
|
||||
BtnEditar.Visible = True
|
||||
PermisoComplementoVigente = True
|
||||
|
||||
Else
|
||||
BtnEditar.Visible = True
|
||||
|
||||
If UsuarioActual.TienePermisoProceso(99) Then
|
||||
BtnEditar.Visible = True
|
||||
PermisoComplementoVigente = True
|
||||
Else
|
||||
BtnEditar.Visible = False
|
||||
End If
|
||||
|
||||
LnkEliminar.Visible = False
|
||||
LnkCancelar.Visible = False
|
||||
|
||||
LnkCancelarComplemento.Visible = True
|
||||
LnkCancelarComplementoImporte.Visible = True
|
||||
|
||||
End If
|
||||
|
||||
UpGuardar.Update()
|
||||
|
||||
Else
|
||||
BtnEditar.Visible = False
|
||||
LnkEliminar.Visible = False
|
||||
LnkCancelarComplemento.Visible = False
|
||||
LnkCancelarComplementoImporte.Visible = False
|
||||
DVGenerarComplementoModal.Visible = False
|
||||
End If
|
||||
|
||||
UpGuardar.Update()
|
||||
|
||||
End If
|
||||
|
||||
|
||||
End If
|
||||
|
||||
'If CveIE > 0 Then
|
||||
' DdlProveedores.Visible = False
|
||||
' LblBeneficiario.Visible = True
|
||||
' LblBeneficiario.Text = GlobalDTCompProveedores(UsuarioActual.CveEmpresa).FiltraParametros($"CveProveedor = {CveProveedor}")(0)("RazonSocial").ToString
|
||||
'End If
|
||||
|
||||
|
||||
|
||||
|
||||
RecargaGlobalCuentasBancarias()
|
||||
ObjIE.Dispose()
|
||||
ObjIE2.Dispose()
|
||||
@@ -1207,10 +1210,10 @@ Partial Class Bancos_IE
|
||||
|
||||
|
||||
If UsuarioActual.Empresa.UsaAC OrElse UsuarioActual.Empresa.Funcionalidad(200) = "1" Then
|
||||
If IDCtaBeneficiario = 0 And UsuarioActual.Empresa.UsaContabilidad Then
|
||||
If IDCtaBeneficiario = 0 AndAlso UsuarioActual.Empresa.Funcionalidad(200) = "1" Then
|
||||
Alert("El Beneficiario no tiene cuenta contable vinculada. Por favor rectifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia)
|
||||
BtnGuardar.Enabled = False
|
||||
ElseIf CveCuentaBeneficiario = 0 And UsuarioActual.Empresa.UsaContabilidadSIG Then
|
||||
ElseIf CveCuentaBeneficiario = 0 AndAlso UsuarioActual.Empresa.UsaContabilidadSIG Then
|
||||
Alert("El Beneficiario no tiene cuenta contable vinculada en SIG. Por favor rectifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia)
|
||||
BtnGuardar.Enabled = False
|
||||
Else
|
||||
@@ -1260,7 +1263,7 @@ Partial Class Bancos_IE
|
||||
End If
|
||||
|
||||
If UsuarioActual.Empresa.UsaAC OrElse UsuarioActual.Empresa.Funcionalidad(200) = "1" Then
|
||||
If IDCtaBeneficiario = 0 AndAlso UsuarioActual.Empresa.UsaContabilidad Then
|
||||
If IDCtaBeneficiario = 0 AndAlso UsuarioActual.Empresa.Funcionalidad(200).ToString = "1" Then
|
||||
Alert("El Beneficiario no tiene cuenta contable vinculada. Por favor rectifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia)
|
||||
BtnGuardar.Enabled = False
|
||||
ElseIf CveCuentaBeneficiario = 0 AndAlso UsuarioActual.Empresa.UsaContabilidadSIG Then
|
||||
@@ -1320,7 +1323,7 @@ Partial Class Bancos_IE
|
||||
CveCuentaBeneficiario = ObjPersonal.CveCuentaPersonal
|
||||
|
||||
If UsuarioActual.Empresa.UsaAC OrElse UsuarioActual.Empresa.Funcionalidad(200) = "1" Then
|
||||
If IDCtaBeneficiario = 0 AndAlso UsuarioActual.Empresa.UsaContabilidad Then
|
||||
If IDCtaBeneficiario = 0 AndAlso UsuarioActual.Empresa.Funcionalidad(200).ToString = "1" Then
|
||||
Alert("El Beneficiario no tiene cuenta contable vinculada. Por favor rectifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia)
|
||||
BtnGuardar.Enabled = False
|
||||
ElseIf CveCuentaBeneficiario = 0 AndAlso UsuarioActual.Empresa.UsaContabilidadSIG Then
|
||||
@@ -1419,7 +1422,7 @@ Partial Class Bancos_IE
|
||||
DivTarjeta.Visible = False
|
||||
End If
|
||||
|
||||
If Not IDCtaContable > 0 AndAlso UsuarioActual.Empresa.UsaContabilidad Then
|
||||
If Not IDCtaContable > 0 AndAlso UsuarioActual.Empresa.Funcionalidad(200).ToString = "1" Then
|
||||
Alert("La Cuenta Bancaria no tiene asignada una cuenta contable", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
|
||||
@@ -3768,10 +3771,10 @@ Partial Class Bancos_IE
|
||||
End If
|
||||
|
||||
Dim Banc As New ClsBancos
|
||||
Banc.IniciaTransacSQL()
|
||||
Dim ObjConta As New ClsContabilidad(Banc.IniciaTransacSQL())
|
||||
|
||||
Dim ObjAC As ClsContPAQi = Nothing
|
||||
If UsuarioActual.Empresa.UsaAC Or UsuarioActual.Empresa.UsaContabilidad Then
|
||||
If UsuarioActual.Empresa.UsaAC Or UsuarioActual.Empresa.Funcionalidad(200).ToString = "1" Then
|
||||
ObjAC = New ClsContPAQi(UsuarioActual.Empresa)
|
||||
ObjAC.IniciaTransacSQL()
|
||||
End If
|
||||
@@ -3782,7 +3785,7 @@ Partial Class Bancos_IE
|
||||
Dim IdPolizaNueva = -1
|
||||
Dim FolioPolizaNueva = -1
|
||||
|
||||
If (IDPoliza > 0 AndAlso (UsuarioActual.Empresa.UsaAC Or UsuarioActual.Empresa.UsaContabilidad)) Then
|
||||
If (IDPoliza > 0 AndAlso (UsuarioActual.Empresa.UsaAC Or UsuarioActual.Empresa.Funcionalidad(200).ToString = "1")) Then
|
||||
|
||||
If ObjAC Is Nothing Then
|
||||
ErrorCancelar = True
|
||||
@@ -3831,20 +3834,38 @@ Partial Class Bancos_IE
|
||||
|
||||
Else
|
||||
|
||||
'LIMPIA POLIZA PONIENDO IMPORTE EN CEROS
|
||||
For Each dr As DataRow In dt.Rows
|
||||
If Not ObjAC.UpdateMovimiento(dr("Id").ToString.ToEntero, dr("IdCuenta").ToString.ToEntero, dr("TipoMovto").ToString = "1", 0, dr("Referencia").ToString, dr("Concepto").ToString, dr("IdSegNeg").ToString.ToEntero, dr("Fecha").ToString.ToDate) Then
|
||||
ErrorCancelar = True
|
||||
MensajeError = "Error al actualizar Movimientos con importe 0"
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
'SE COMENTO PARA PODER DESBLOQUEAR LA PREPOLIZA Y CREAR UNA NUEVA POLIZA
|
||||
''LIMPIA POLIZA PONIENDO IMPORTE EN CEROS
|
||||
'For Each dr As DataRow In dt.Rows
|
||||
' If Not ObjAC.UpdateMovimiento(dr("Id").ToString.ToEntero, dr("IdCuenta").ToString.ToEntero, dr("TipoMovto").ToString = "1", 0, dr("Referencia").ToString, dr("Concepto").ToString, dr("IdSegNeg").ToString.ToEntero, dr("Fecha").ToString.ToDate) Then
|
||||
' ErrorCancelar = True
|
||||
' MensajeError = "Error al actualizar Movimientos con importe 0"
|
||||
' Exit For
|
||||
' End If
|
||||
'Next
|
||||
|
||||
'AJUSTA POLIZA
|
||||
If Not ErrorCancelar Then
|
||||
If Not ObjAC.AjustaPoliza(IDPoliza) Then
|
||||
''AJUSTA POLIZA
|
||||
'If Not ErrorCancelar Then
|
||||
' If Not ObjAC.AjustaPoliza(IDPoliza) Then
|
||||
' ErrorCancelar = True
|
||||
' MensajeError = "Error al ajustar poliza negativa"
|
||||
' End If
|
||||
'End If
|
||||
|
||||
If ObjAC.RemovePoliza(IDPoliza) Then
|
||||
If Not ObjConta.DesvincularPrePolizaContabilizada(IDPoliza, UsuarioActual.CveEmpresa) Then
|
||||
ErrorCancelar = True
|
||||
MensajeError = "Error al ajustar poliza negativa"
|
||||
MensajeError = "Error al desvincular poliza."
|
||||
End If
|
||||
Else
|
||||
ErrorCancelar = True
|
||||
MensajeError = "Error al eliminar poliza."
|
||||
End If
|
||||
|
||||
If Not ErrorCancelar Then
|
||||
If Not ObjConta.UpdatePrePolizasDetalleBloquear(CvePrePoliza, False) Then
|
||||
ErrorCancelar = True
|
||||
MensajeError = "Error al desbloquear prepoliza."
|
||||
End If
|
||||
End If
|
||||
|
||||
@@ -3856,6 +3877,11 @@ Partial Class Bancos_IE
|
||||
End If
|
||||
End If
|
||||
|
||||
If Not ObjConta.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa) Then
|
||||
ErrorCancelar = True
|
||||
MensajeError = "Error al contabilizar poliza"
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
@@ -3955,6 +3981,7 @@ Partial Class Bancos_IE
|
||||
|
||||
If ObjAC IsNot Nothing Then ObjAC.Dispose()
|
||||
Banc.Dispose()
|
||||
ObjConta.Dispose()
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnDevueltoIE_Click(sender As Object, e As EventArgs)
|
||||
@@ -3981,7 +4008,7 @@ Partial Class Bancos_IE
|
||||
Dim ObjConta As New ClsContabilidad(Banc.IniciaTransacSQL)
|
||||
|
||||
Dim ObjAC As ClsContPAQi = Nothing
|
||||
If UsuarioActual.Empresa.UsaAC Or UsuarioActual.Empresa.UsaContabilidad Then
|
||||
If UsuarioActual.Empresa.UsaAC Or UsuarioActual.Empresa.Funcionalidad(200).ToString = "1" Then
|
||||
ObjAC = New ClsContPAQi(UsuarioActual.Empresa)
|
||||
ObjAC.IniciaTransacSQL()
|
||||
End If
|
||||
@@ -3991,7 +4018,7 @@ Partial Class Bancos_IE
|
||||
Dim IdPolizaNueva = -1
|
||||
Dim FolioPolizaNueva = -1
|
||||
|
||||
If (IDPoliza > 0 AndAlso (UsuarioActual.Empresa.UsaAC Or UsuarioActual.Empresa.UsaContabilidad)) Then
|
||||
If (IDPoliza > 0 AndAlso (UsuarioActual.Empresa.UsaAC Or UsuarioActual.Empresa.Funcionalidad(200).ToString = "1")) Then
|
||||
|
||||
If ObjAC Is Nothing Then
|
||||
ErrorCancelar = True
|
||||
@@ -4311,7 +4338,7 @@ Partial Class Bancos_IE
|
||||
Dim ErrorCompra = False
|
||||
|
||||
'Elimina la poliza
|
||||
If (UsuarioActual.Empresa.UsaAC Or UsuarioActual.Empresa.UsaContabilidad) AndAlso IDPoliza > 0 Then
|
||||
If (UsuarioActual.Empresa.UsaAC Or UsuarioActual.Empresa.Funcionalidad(200).ToString = "1") AndAlso IDPoliza > 0 Then
|
||||
If Not ObjAC.RemovePoliza(IDPoliza) Then
|
||||
ErrorCompra = True
|
||||
End If
|
||||
@@ -4674,6 +4701,9 @@ Partial Class Bancos_IE
|
||||
End Sub
|
||||
|
||||
Private Sub BtnRemove_Click(sender As Object, e As EventArgs) Handles BtnRemove.Click
|
||||
|
||||
|
||||
|
||||
If Not TxtDescripcion.Text = "" Then
|
||||
If ChkConciliado.Checked Then
|
||||
Alert("El documento seleccionado no se puede eliminar porque se encuentra conciliado.", TipoMensaje.MsgError)
|
||||
@@ -4698,7 +4728,7 @@ Partial Class Bancos_IE
|
||||
End If
|
||||
End If
|
||||
|
||||
If (UsuarioActual.Empresa.UsaAC Or UsuarioActual.Empresa.UsaContabilidad) AndAlso IDPoliza > 0 Then
|
||||
If (UsuarioActual.Empresa.UsaAC Or UsuarioActual.Empresa.Funcionalidad(200).ToString = "1") AndAlso IDPoliza > 0 Then
|
||||
ObjAC = New ClsContPAQi(UsuarioActual.Empresa)
|
||||
ObjAC.IniciaTransacSQL()
|
||||
If Not ObjAC.RemovePoliza(IDPoliza) Then
|
||||
@@ -5624,15 +5654,24 @@ Partial Class Bancos_IE
|
||||
|
||||
Private Sub ControlesEdicion()
|
||||
|
||||
Dim ExistenComplementosVigentes As Boolean = VerificaComplementos(True)
|
||||
|
||||
If PermisoComplementoVigente Then
|
||||
|
||||
DdlTipoTransaccion.Enabled = True
|
||||
LblCuenta.Visible = False
|
||||
DdlCuenta.Enabled = True
|
||||
DdlCuenta.Visible = True
|
||||
TxtFolio.Enabled = True
|
||||
TxtObservaciones.Enabled = True
|
||||
If ExistenComplementosVigentes Then
|
||||
TxtFolio.Enabled = True
|
||||
TxtObservaciones.Enabled = True
|
||||
Else
|
||||
|
||||
DdlTipoTransaccion.Enabled = True
|
||||
LblCuenta.Visible = False
|
||||
DdlCuenta.Enabled = True
|
||||
DdlCuenta.Visible = True
|
||||
TxtFolio.Enabled = True
|
||||
TxtObservaciones.Enabled = True
|
||||
|
||||
End If
|
||||
|
||||
UpDatos.Update()
|
||||
|
||||
CargaCuentasDepositoClientes()
|
||||
|
||||
@@ -199,7 +199,7 @@
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<div class="row" runat="server" id="rowComisiones" visible="false">
|
||||
<div class="row" >
|
||||
<label class="col-md-2" runat="server" id="lblpagocomisiones">Comisiones:</label>
|
||||
<div class="col-md-3">
|
||||
<asp:DropDownList ID="DdlOtrosPagos" CssClass="form-control input-sm select2me" runat="server" AutoPostBack="true">
|
||||
|
||||
@@ -310,9 +310,6 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
ViewState("CveCuentaRetISR") = 0
|
||||
End If
|
||||
|
||||
'If UsuarioActual.CveEmpresa.Contiene(1, 4, 5, 7, 11, 12, 72, 80, 126, 119, 122,145) Then
|
||||
' rowComisiones.Visible = True
|
||||
'End If
|
||||
|
||||
IdCuenta = 0
|
||||
CveCuentaB = 0
|
||||
|
||||
@@ -654,23 +654,23 @@
|
||||
<asp:GridView ID="GvPS" ShowHeader="false" runat="server" AutoGenerateColumns="False" DataKeyNames="CvePS,Cantidad,CveUM,UM,PU,Descuento,OtrosGastos,CvePresupuestoEgreso,PS,Clasificacion,CveClasificacion,CveOrdenCompraDetalle,IVA,IVAPorcentaje,RetIVAPorcentaje,RetISRPorcentaje,IEPSPSPorcentaje,Obs,Total,CveProyecto,CveSubProyecto,Proyecto,SubProyecto,Consec,CveTipoGasto,NoDeducible" GridLines="none" BorderWidth="0" EmptyDataText="Sin Productos o Servicios agregados" CssClass="table GvPS table-striped table-hover table-advance Widthall ScrollAD mysmallbtn">
|
||||
<Columns>
|
||||
<%-- 0 --%>
|
||||
<asp:TemplateField>
|
||||
<asp:TemplateField ItemStyle-Width="15px" >
|
||||
<ItemTemplate>
|
||||
<label data-toogle="tooltip" class=' <%# IIf(Eval("CvePS").ToString() = "0", "label label-sm label-danger manita", "")%>'>
|
||||
<asp:Label ID="LtlConsecutivo" runat="server" Text='<%# Eval("Consec", "{0:N0}") %>' Font-Size="6pt"></asp:Label></label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%-- 1 --%>
|
||||
<asp:BoundField DataField="Cantidad" DataFormatString="{0:#,##0.00####}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataField="Cantidad" DataFormatString="{0:#,##0.00####}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="45px" />
|
||||
<%-- 2 --%>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center" ItemStyle-VerticalAlign="Middle">
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center" ItemStyle-VerticalAlign="Middle" ItemStyle-Width="70px">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LtlUnidadMedida" CssClass="centrarUM" runat="server" Text='<%# Eval("UM") %>'></asp:Label>
|
||||
<asp:LinkButton ID="LBAplicarEquivalencia" OnClick="LBAplicarEquivalencia_Click" data-toggle="tooltip" title="Aplicar conversión de equivalencia" Text="" runat="server" Visible="false"> <i class="fa fa-magic"></i></asp:LinkButton>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%-- 3 --%>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center" ItemStyle-VerticalAlign="Top">
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center" ItemStyle-VerticalAlign="Top" ItemStyle-Width="300px">
|
||||
<ItemTemplate>
|
||||
<div style="float: left; width: 100%;">
|
||||
<span style="width: 100%; border-bottom: 1px solid gray;">
|
||||
@@ -683,9 +683,9 @@
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%-- 4 --%>
|
||||
<asp:BoundField DataField="Obs" />
|
||||
<asp:BoundField DataField="Obs" ItemStyle-Width="350px" />
|
||||
<%-- 5 --%>
|
||||
<asp:TemplateField>
|
||||
<asp:TemplateField ItemStyle-Width="200px" ItemStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<span style="width: 145px; border-bottom: 1px solid gray;">
|
||||
<asp:Label ID="LblProyecto" runat="server" Text='<%# Eval("Proyecto", "{0}<br />") %>' Visible='<%# if(UsuarioActual.Empresa.Tipo_CentroCosto <> 1 And UsuarioActual.Empresa.Tipo_CentroCosto <> 2, True, False) %>'></asp:Label>
|
||||
@@ -694,11 +694,11 @@
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%-- 6 --%>
|
||||
<asp:BoundField DataField="TipoGasto" />
|
||||
<asp:BoundField DataField="TipoGasto" ItemStyle-Width="180px" />
|
||||
<%-- 7 --%>
|
||||
<asp:BoundField DataField="PU" DataFormatString="{0:#,##0.00####}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataField="PU" DataFormatString="{0:#,##0.00####}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="100px" />
|
||||
<%-- 8 --%>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Right">
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center" ItemStyle-Width="80px">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LblIVAPorcentaje" runat="server" Text='<%# String.Format("{0} {1}", (CDbl(Eval("IVAPorcentaje").ToString) * 100).ToString("#####"), If(CDbl(Eval("IVAPorcentaje").ToString) * 100 > 0, "%", "")) %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
@@ -2228,7 +2228,7 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left" style="width: 75px">Fecha Pago:</td>
|
||||
<td align="left">
|
||||
<td align="left" style="width: 100px">
|
||||
<div class="input-group input-sm input-small date date-picker" data-date-format="dd/mm/yyyy">
|
||||
<asp:TextBox ID="TxtFechaPago" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10" ClientIDMode="Static"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
@@ -2248,6 +2248,9 @@
|
||||
|
||||
</div>
|
||||
</td>
|
||||
<td align="left" >
|
||||
<asp:LinkButton runat="server" Visible="false" ID="LnkUpdateFechaPago" OnClick="LnkUpdateFechaPago_Click" data-toggle="confirmation" data-popout="true" data-original-title="¿Está seguro que desea actualizar la fecha de pago de la compra?" data-btn-ok-label="si" Text="<i class='fa fa-check' style='color:green'></i>" CssClass="btn btn-default btn-circle btn-xs" ToolTip="Actualizar Fecha de Pago" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left">
|
||||
|
||||
@@ -2634,6 +2634,7 @@ Partial Class Compras_Compras
|
||||
DdlPS.Enabled = True
|
||||
TxtObsPS.Enabled = True
|
||||
LbAgregar.Enabled = True
|
||||
LnkUpdateFechaPago.Visible = True
|
||||
End If
|
||||
|
||||
BtnGuardar.Visible = False
|
||||
@@ -9947,18 +9948,18 @@ Partial Class Compras_Compras
|
||||
If Not (e.Row.RowState = DataControlRowState.Edit OrElse e.Row.RowState = 5) Then
|
||||
|
||||
If e.Row.RowIndex = 0 Then
|
||||
e.Row.Cells(0).Width = Unit.Pixel(15)
|
||||
e.Row.Cells(1).Width = Unit.Pixel(45)
|
||||
e.Row.Cells(2).Width = Unit.Pixel(70)
|
||||
e.Row.Cells(3).Width = Unit.Pixel(230)
|
||||
e.Row.Cells(4).Width = Unit.Pixel(202)
|
||||
e.Row.Cells(5).Width = Unit.Pixel(155)
|
||||
e.Row.Cells(6).Width = Unit.Pixel(155)
|
||||
e.Row.Cells(7).Width = Unit.Pixel(50)
|
||||
e.Row.Cells(8).Width = Unit.Pixel(80)
|
||||
e.Row.Cells(9).Width = Unit.Pixel(80)
|
||||
e.Row.Cells(10).Width = Unit.Pixel(43)
|
||||
e.Row.Cells(11).Width = Unit.Pixel(43)
|
||||
'e.Row.Cells(0).Width = Unit.Pixel(15)
|
||||
'e.Row.Cells(1).Width = Unit.Pixel(45)
|
||||
'e.Row.Cells(2).Width = Unit.Pixel(70)
|
||||
'e.Row.Cells(3).Width = Unit.Pixel(230)
|
||||
'e.Row.Cells(4).Width = Unit.Pixel(202)
|
||||
'e.Row.Cells(5).Width = Unit.Pixel(155)
|
||||
'e.Row.Cells(6).Width = Unit.Pixel(155)
|
||||
'e.Row.Cells(7).Width = Unit.Pixel(50)
|
||||
'e.Row.Cells(8).Width = Unit.Pixel(80)
|
||||
'e.Row.Cells(9).Width = Unit.Pixel(80)
|
||||
'e.Row.Cells(10).Width = Unit.Pixel(43)
|
||||
'e.Row.Cells(11).Width = Unit.Pixel(43)
|
||||
|
||||
If UsuarioActual.Empresa.UsaAC Then 'AndAlso (CveFactura > 0 Or CveCompra > 0)
|
||||
e.Row.Cells(12).Width = Unit.Pixel(150)
|
||||
@@ -14521,7 +14522,7 @@ Partial Class Compras_Compras
|
||||
End If
|
||||
End If
|
||||
|
||||
If (HdnIEPSModificadoOC.Value.ToDecimal <> LbIEPSOC2.Text.ToDecimal) Then
|
||||
If Math.Abs(HdnIEPSModificadoOC.Value.ToDecimal - LbIEPSOC2.Text.ToDecimal) > 0.05 Then
|
||||
Alert($"Hay una diferencia de IEPS entre la factura y la OC. Dif: {HdnIEPSModificadoOC.Value.ToDecimal - LbIEPSOC2.Text.ToDecimal}", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
@@ -18816,4 +18817,26 @@ Partial Class Compras_Compras
|
||||
AddPS2(EsNoDeducible:=EsNoDeducible)
|
||||
|
||||
End Sub
|
||||
Protected Sub LnkUpdateFechaPago_Click(sender As Object, e As EventArgs)
|
||||
Dim ObjComp As New ClsCompras
|
||||
Dim FechaPagoAnterior As String = ""
|
||||
|
||||
If ObjComp.GetCompras(CveCompra, "-1", "-1", -1, -1, UsuarioActual.CveEmpresa) Then
|
||||
If ObjComp.DtResultados.Rows.Count > 0 Then
|
||||
FechaPagoAnterior = ObjComp.DtResultados.Rows(0)("FechaVencimiento").ToString.ToDate.ToShortDateString
|
||||
End If
|
||||
End If
|
||||
|
||||
If FechaPagoAnterior = TxtFechaPago.Text Then
|
||||
Alert("La fecha de pago seleccionada es igual que la anterior.", TipoMensaje.MsgAdvertencia)
|
||||
ObjComp.Dispose()
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
If ObjComp.UpdateFechaVencimientoCompra(CveCompra, TxtFechaPago.Text.ToDate, UsuarioActual.CveEmpresa) Then
|
||||
Alert("Fecha de pago actualizada correctamente.")
|
||||
End If
|
||||
|
||||
ObjComp.Dispose()
|
||||
End Sub
|
||||
End Class
|
||||
@@ -1561,6 +1561,7 @@ Partial Class General_SaldosIniciales
|
||||
End If
|
||||
Else
|
||||
mensajeError = $"No se encontró el producto o servicio con código ""{nuevaEntrada("CodigoPS")}"""
|
||||
Throw New Exception()
|
||||
End If
|
||||
Next
|
||||
Else
|
||||
|
||||
@@ -183,7 +183,7 @@
|
||||
'If ObjBancos.GetBancosCuentasUsuarios(-1) Then Application("GlobalDTBancosCuentas") = ObjBancos.DtResultados Else Application("GlobalDTBancosCuentas") = Nothing
|
||||
If ObjBancos.GetBancosCuentasUsuarios(-1) Then Application("GlobalDTBancosCuentas") = ObjBancos.DtResultados Else Application("GlobalDTBancosCuentas") = Nothing
|
||||
If ObjBancos.GetBancos_TiposTransaccion(-1) Then Application("GlobalDTTipoTransacciones") = ObjBancos.DtResultados Else Application("GlobalDTTipoTransacciones") = Nothing
|
||||
If ObjBancos.GetBancos_EstatusIE() Then Application("GlobalDTEstatusIE") = ObjBancos.DtResultados Else Application("GlobalDTEstatusIE") = Nothing
|
||||
If ObjBancos.GetBancos_EstatusIE() Then Application("GlobalDTBancosEstatusIE") = ObjBancos.DtResultados Else Application("GlobalDTBancosEstatusIE") = Nothing
|
||||
If ObjBancos.GetBancos() Then Application("GlobalDTBancos") = ObjBancos.DtResultados Else Application("GlobalDTBancos") = Nothing
|
||||
If ObjBancos.GetBancos_TiposCuenta() Then Application("GlobalDTTipoCuenta") = ObjBancos.DtResultados Else Application("GlobalDTTipoCuenta") = Nothing
|
||||
ObjBancos.Dispose()
|
||||
|
||||
@@ -1058,7 +1058,7 @@ Partial Class Inventarios_EntradasSalidas
|
||||
ObjConta.IniciaTransacSQL()
|
||||
End If
|
||||
|
||||
If ObjGral.AddHistorialBitacora(Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, "", "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 1, TxtDescripcion.Text, "Inventarios", TxtFolio.Text + " / " + DdlConcepto.SelectedItem.Text) Then
|
||||
If Not ObjGral.AddHistorialBitacora(Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, "", "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 1, TxtDescripcion.Text, "Inventarios", TxtFolio.Text + " / " + DdlConcepto.SelectedItem.Text) Then
|
||||
TieneError = True
|
||||
End If
|
||||
|
||||
|
||||
@@ -152,10 +152,14 @@ Partial Class Inventarios_KardexAlmacen
|
||||
dt = Nothing
|
||||
Return dt
|
||||
Exit Function
|
||||
End If
|
||||
End If
|
||||
|
||||
ObjMovimientos.Dispose()
|
||||
End If
|
||||
Else
|
||||
ObjMovimientos.Dispose()
|
||||
Alert("Ocurrió un error al consultar el Kardex.", TipoMensaje.MsgError)
|
||||
Exit Function
|
||||
End If
|
||||
|
||||
|
||||
GvDatos.DataBind()
|
||||
|
||||
For index = 3 To GvDatos.Rows(0).Cells.Count - 1
|
||||
|
||||
@@ -2346,16 +2346,18 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
End If
|
||||
|
||||
'CONTABILIZAR - UNIFICAR Y SIMPLIFICAR CON PP DE LA COMPRA
|
||||
If Not ErrorMovInv And CvePrePolizaCompra > 0 Then
|
||||
If Not ErrorMovInv Then
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(219) = "1" Then
|
||||
If Not ObjConta.PrePolizaUnificacion(CvePrePolizaCompra, CvePrePoliza) Then
|
||||
ErrorMovInv = True
|
||||
MensajeError = "Error al unificar los conceptos contables"
|
||||
If CvePrePolizaCompra > 0 Then
|
||||
If UsuarioActual.Empresa.Funcionalidad(219) = "1" Then
|
||||
If Not ObjConta.PrePolizaUnificacion(CvePrePoliza, CvePrePolizaCompra) Then
|
||||
ErrorMovInv = True
|
||||
MensajeError = "Error al unificar los conceptos contables"
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(220) <> "" Or UsuarioActual.CveEmpresa = 119 Then
|
||||
If UsuarioActual.Empresa.Funcionalidad(220) <> "" Then
|
||||
If Not ObjConta.PrePolizaSimplificacion(CvePrePoliza, UsuarioActual.CveEmpresa) Then
|
||||
ErrorMovInv = True
|
||||
MensajeError = "Error al simplificar los conceptos contables"
|
||||
@@ -2458,17 +2460,20 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
End If
|
||||
|
||||
'CONTABILIZAR - UNIFICAR Y SIMPLIFICAR CON PP DE LA COMPRA
|
||||
If Not ErrorMovInv And CvePrePolizaCompra > 0 Then
|
||||
If Not ErrorMovInv Then
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(219) = "1" Or UsuarioActual.CveEmpresa = 119 Then
|
||||
If Not ObjConta.PrePolizaUnificacion(CvePrePolizaCompra, CvePrePoliza) Then
|
||||
ErrorMovInv = True
|
||||
MensajeError = "Error al unificar los conceptos contables"
|
||||
If CvePrePolizaCompra > 0 Then
|
||||
If UsuarioActual.Empresa.Funcionalidad(219) = "1" Then
|
||||
If Not ObjConta.PrePolizaUnificacion(CvePrePoliza, CvePrePolizaCompra) Then
|
||||
ErrorMovInv = True
|
||||
MensajeError = "Error al unificar los conceptos contables"
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(220) <> "" Or UsuarioActual.CveEmpresa = 119 Then
|
||||
If Not ObjConta.PrePolizaSimplificacion(CvePrePolizaCompra, UsuarioActual.CveEmpresa) Then
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(220) <> "" Then
|
||||
If Not ObjConta.PrePolizaSimplificacion(CvePrePoliza, UsuarioActual.CveEmpresa) Then
|
||||
ErrorMovInv = True
|
||||
MensajeError = "Error al simplificar los conceptos contables"
|
||||
End If
|
||||
@@ -2743,6 +2748,17 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
End If
|
||||
End If
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(200) = "1" Then
|
||||
ObjContaAC = New ClsContPAQi(UsuarioActual.Empresa)
|
||||
ObjContaAC.IniciaTransacSQL()
|
||||
If ObjConta.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa, ObjConta:=ObjContaAC) Then
|
||||
MensajeError = $"<br>Movimiento contabilizado en el folio: <b><a class='Texto' href = '/Contabilidad/RegPoliza.aspx?IdPoliza={ObjConta.ContaIdPoliza}'>{ObjConta.ContaFolio}</a></b><br>"
|
||||
Else
|
||||
ErrorMovInv = True
|
||||
MensajeError = "Error al contabilizar los conceptos contables"
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
'FINAL
|
||||
If Not ErrorMovInv Then
|
||||
|
||||
1
LogMail.txt
Normal file
@@ -0,0 +1 @@
|
||||
|
||||
121
Sistemas/ConfiguracionEmpresa.aspx
Normal file
@@ -0,0 +1,121 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="ConfiguracionEmpresa.aspx.vb" Inherits="Sistemas_ConfiguracionEmpresa" %>
|
||||
|
||||
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="H" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="css" runat="Server">
|
||||
<style>
|
||||
</style>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="E" runat="Server">
|
||||
<asp:Literal ID="LtlTitulo" runat="server" Text="Registro de Empresas"></asp:Literal>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="C" runat="Server">
|
||||
|
||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<ajax:TabContainer ID="Tab" runat="server" Width="100%" ActiveTabIndex="0">
|
||||
<ajax:TabPanel HeaderText="Contabilidad" ID="TabPanel1" runat="server">
|
||||
<ContentTemplate>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<asp:RadioButtonList ID="RblTipo" runat="server" AutoPostBack="true" RepeatDirection="Horizontal" CssClass="input-group" CellSpacing="50">
|
||||
<asp:ListItem Value="SIG" Selected="True"><label><b>SIG</b></label></asp:ListItem>
|
||||
<asp:ListItem Value="CP"><label><b>Contpaq</b></label></asp:ListItem>
|
||||
</asp:RadioButtonList>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="portlet light smmallpadding bordered">
|
||||
<div class="portlet-title">
|
||||
<div class="caption font-green">
|
||||
<i class="icon-pin font-green"></i>
|
||||
<span class="caption-subject bold uppercase">Cuenta</span>
|
||||
</div>
|
||||
<div class="actions">
|
||||
<div class="btn-group">
|
||||
</div>
|
||||
</div>
|
||||
<div class="tools">
|
||||
<a href="javascript:;" class="collapse"></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body">
|
||||
<table border="0">
|
||||
<tr>
|
||||
<td>Clientes:</td>
|
||||
<td>
|
||||
<asp:RadioButtonList ID="RadioButtonList1" runat="server" AutoPostBack="true" RepeatDirection="Horizontal" CssClass="input-group" CellSpacing="50">
|
||||
<asp:ListItem Value="1" Selected="True"><label><b>Individual</b></label></asp:ListItem>
|
||||
<asp:ListItem Value="2"><label><b>Global</b></label></asp:ListItem>
|
||||
</asp:RadioButtonList>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Clave de Empresa:</td>
|
||||
<td>
|
||||
<asp:TextBox ID="TxtCveEmpresa" runat="server" MaxLength="50" Width="60px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVCveEmpresa" runat="server" ControlToValidate="TxtCveEmpresa" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''CveEmpresa de la Empresa''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCECveEmpresa" runat="server" HighlightCssClass="vco" TargetControlID="RFVCveEmpresa" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Razón Social:</td>
|
||||
<td>
|
||||
<asp:TextBox ID="TxtEmpresa" runat="server" MaxLength="50" Width="350px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVEmpresa" runat="server" ControlToValidate="TxtEmpresa" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Nombre de la Empresa''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEEmpresa" runat="server" HighlightCssClass="vco" TargetControlID="RFVEmpresa" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
</ajax:TabContainer>
|
||||
|
||||
</br>
|
||||
|
||||
<div align="center">
|
||||
<asp:UpdatePanel ID="UpGuardar" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:Button ID="BtnGuardar" runat="server" CssClass=" btn btn-primary " Text="Guardar" ValidationGroup="GrpGuardar" />
|
||||
<asp:Button ID="BtnEliminar" runat="server" CssClass=" btn btn-danger " Text="Eliminar" />
|
||||
<asp:ValidationSummary ID="VS" runat="server" DisplayMode="BulletList" ShowSummary="true" ValidationGroup="GrpGuardar" />
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="server">
|
||||
<script type="text/javascript">
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
</asp:Content>
|
||||
23
Sistemas/ConfiguracionEmpresa.aspx.vb
Normal file
@@ -0,0 +1,23 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
|
||||
Imports System.Data
|
||||
Imports Extensiones
|
||||
Imports System.Runtime.InteropServices
|
||||
Imports System.IO
|
||||
|
||||
Partial Class Sistemas_ConfiguracionEmpresa
|
||||
Inherits ClsPaginas
|
||||
|
||||
#Region " PROPIEDADES "
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
If Not IsPostBack Then
|
||||
|
||||
|
||||
End If
|
||||
End Sub
|
||||
End Class
|
||||
@@ -69,7 +69,6 @@
|
||||
<div style="margin-top: 3px;">
|
||||
<asp:CheckBox runat="server" ID="ChkEstatus" CssClass="make-switchsd" data-size="small" Checked="true"></asp:CheckBox>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="row" style="margin-left: 1px; margin-top: 10px;">
|
||||
<asp:Button runat="server" ID="BtnDefaultPWD" Text="Reestablecer Contraseña" CssClass="btn btn-primary" Visible="false" />
|
||||
|
||||
@@ -716,6 +716,7 @@ Partial Class Sistemas_PopUpAddUsuario
|
||||
GvModulosPermiso.DataSource = ObjProcesos.DtResultados.FiltraParametros($"CvePlataforma = 6")
|
||||
ElseIf UsuarioActual.Empresa.CvePlataforma = 1 And CveProveedor > 0 Then
|
||||
GvModulosPermiso.DataSource = ObjProcesos.DtResultados.FiltraParametros($"CvePlataforma = 7")
|
||||
BtnDefaultPWD.Visible = True
|
||||
ElseIf UsuarioActual.Empresa.CvePlataforma = 3 Then
|
||||
GvModulosPermiso.DataSource = ObjProcesos.DtResultados.FiltraParametros("CveModulo = 433")
|
||||
End If
|
||||
@@ -855,4 +856,5 @@ Partial Class Sistemas_PopUpAddUsuario
|
||||
CargaComandos()
|
||||
UpDatos.Update()
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
@@ -255,10 +255,18 @@
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<asp:UpdatePanel runat="server" ID="UpPorcentajeMarcas" RenderMode="Inline" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkPorcentajeMarcas" Visible="False" data-toggle="tooltip" data-placement="left" title="Modificar Precio de PS por Marca." runat="server" Text="<i class='fa fa-pencil'></i> Modificar Precio por Marca"></asp:LinkButton>
|
||||
</li>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<asp:UpdatePanel runat="server" ID="UpPorcentajePrecios" RenderMode="Inline" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkPorcentajePrecios" Visible="False" data-toggle="tooltip" data-placement="left" title="Modificar Precio de Productos." runat="server" Text="<i class='fa fa-pencil'></i> Modificar Precios"></asp:LinkButton>
|
||||
<asp:LinkButton ID="LnkPorcentajePrecios" Visible="False" data-toggle="tooltip" data-placement="left" title="Modificar Precio por PS." runat="server" Text="<i class='fa fa-pencil'></i> Modificar Precio por Producto"></asp:LinkButton>
|
||||
</li>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
@@ -266,7 +274,7 @@
|
||||
<asp:UpdatePanel runat="server" ID="UpReporteGpsButton" RenderMode="Inline" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<li>
|
||||
<asp:LinkButton ID="ReporteDispositivos" Visible="False" OnClick="GenerarReporte" data-toggle="tooltip" data-placement="left" runat="server" Text="<i class='fa fa-file-pdf-o'></i> Dispositivos GPS"></asp:LinkButton>
|
||||
<asp:LinkButton ID="ReporteDispositivos" Visible="False" OnClick="GenerarReporte" data-toggle="tooltip" data-placement="left" runat="server" Text="<i class='fa fa-file-pdf-o'></i> Dispositivos GPS"></asp:LinkButton>
|
||||
</li>
|
||||
</ContentTemplate>
|
||||
<Triggers>
|
||||
@@ -1129,9 +1137,9 @@
|
||||
<asp:GridView ID="GVHistorial" runat="server" DataKeyNames="CveVenta, Folio, TipoDocto" AutoGenerateColumns="False" EmptyDataText="No se encontraron Ventas en el Cliente" ToolTip="Listado de Historial de Ventas" CssClass="table table-striped table-advance table-hover" Style="text-align: center; min-width: 783px; width: 100%;" GridLines="None">
|
||||
<Columns>
|
||||
<asp:BoundField HeaderText="Tipo" DataField="TipoDocto" ItemStyle-HorizontalAlign="Center" />
|
||||
<asp:TemplateField >
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Factura</HeaderTemplate>
|
||||
<ItemTemplate >
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlFactura" runat="server"></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
@@ -1678,7 +1686,7 @@
|
||||
<asp:ListItem Selected="True" Value="Ing" Text="Ingresos"></asp:ListItem>
|
||||
<asp:ListItem Selected="True" Value="Rem" Text="Remisión"></asp:ListItem>
|
||||
<asp:ListItem Selected="True" Value="Ant" Text="Anticipos"></asp:ListItem>
|
||||
<asp:ListItem Selected="True" Value="Egs" Text="NC"></asp:ListItem>
|
||||
<asp:ListItem Selected="True" Value="NC" Text="NC"></asp:ListItem>
|
||||
<asp:ListItem Selected="True" Value="IxC" Text="Ingresos X Comp"></asp:ListItem>
|
||||
<asp:ListItem Selected="True" Value="Dev" Text="Devolución"></asp:ListItem>
|
||||
</asp:ListBox>
|
||||
@@ -5464,7 +5472,142 @@
|
||||
</div>
|
||||
<%-- END MODAL UNIFICAR EMPRESA CRM --%>
|
||||
|
||||
<%-- MODAL MODIFICAR PORCENTAJE PRECIOS --%>
|
||||
<%-- MODAL MODIFICAR PORCENTAJE MARCAS --%>
|
||||
<div id="DivPorcentajeMarcas" class="modal ADS fade" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content" style="width: 700px;">
|
||||
<div class="modal-header ">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">Modificar Precio de Productos por Marca</h4>
|
||||
</div>
|
||||
<asp:UpdatePanel ID="UpPorcentaje" UpdateMode="Conditional" runat="server">
|
||||
<ContentTemplate>
|
||||
<div class="modal-body">
|
||||
|
||||
|
||||
<div class="row" style="margin: 5px;">
|
||||
|
||||
<table border="0" cellpadding="0" class="Widthall grides" cellspacing="0">
|
||||
<tbody>
|
||||
<tr class="Titulos">
|
||||
<th style="width: 28px">#</th>
|
||||
<th style="width: 200px">Marca</th>
|
||||
<%-- <th width="73px">Precio<br />
|
||||
General </th>--%>
|
||||
<th width="73px">%</th>
|
||||
<%-- <th width="73px">Precio<br />
|
||||
Aplicado </th>--%>
|
||||
<th style="width: 73px;"></th>
|
||||
</tr>
|
||||
<tr align="center">
|
||||
<td></td>
|
||||
<td style="text-align: center;">
|
||||
<div class="psagregar">
|
||||
<div class="comboxes">
|
||||
<asp:DropDownList ID="DdlMarcaPS" CssClass="form-control input-sm select2me" runat="server" DataTextField="Marca" DataValueField="CveMarca" Width="100%" Height="22px"/>
|
||||
<%-- <asp:DropDownList ID="DdlClasificacion2" runat="server" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="Clasificacion" DataValueField="CveClasificacion" Width="100%" Class="form-control input-sm select2me">
|
||||
<asp:ListItem Selected="True" Text="Seleccione la Clasificación (Todas)" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<br />
|
||||
<ADS:Dropdownlost runat="server" ID="DdlProducto2" CssStyle="width: 100%;" CssClassDdl="select2me" DataTextField="PSCodigo" DataValueField="CvePS" />--%>
|
||||
<%-- <asp:RequiredFieldValidator ID="RFVProducto2" InitialValue="-1" runat="server" ControlToValidate="DdlProducto2" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Producto''</b> es necesario, por favor ingréselo." ValidationGroup="GprAgrega"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEProducto2" runat="server" HighlightCssClass="vco" TargetControlID="RFVProducto2" Width="300px"></ajax:ValidatorCalloutExtender>--%>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<%-- <td>
|
||||
<asp:Label ID="LbPrecioG" DataFormatString="{0:N2}" Width="55px" MaxLength="15" runat="server"></asp:Label>
|
||||
</td>--%>
|
||||
<td>
|
||||
<asp:TextBox ID="txtPorcentaje" CssClass="form-control input-sm" Width="55px" MaxLength="15" runat="server" ValidationGroup="GprAgrega" Style="text-align: right"></asp:TextBox>
|
||||
<ajax:FilteredTextBoxExtender ID="ftbe" runat="server" TargetControlID="txtPorcentaje" FilterType="Custom, Numbers" ValidChars=".," />
|
||||
<asp:RequiredFieldValidator ID="RFVPorcentaje" runat="server" ControlToValidate="txtPorcentaje" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''%'' Porcentaje</b> es necesario, por favor ingréselo." ValidationGroup="GprAgrega"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEPorcentaje" runat="server" HighlightCssClass="vco" TargetControlID="RFVPorcentaje" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
<%-- <td>
|
||||
<asp:Label ID="LbPrecioA" Width="55px" MaxLength="15" runat="server" ClientIDMode="Static"></asp:Label>
|
||||
</td>--%>
|
||||
<td align="center">
|
||||
<asp:LinkButton ID="LbAgregarMarca" runat="server" CssClass="btn btn-default" ValidationGroup="GprAgrega" Text="Agregar" />
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<%--<asp:Button ID="BtnCambiaPorcentaje" Text="" OnClick="BtnCambiaPorcentaje_Click" ClientIDMode="Static" Style="display: none;" runat="server" />--%>
|
||||
</div>
|
||||
|
||||
<br />
|
||||
<div class="row" style="margin: 5px;">
|
||||
<asp:UpdatePanel ID="UppGrid" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<%--table table-striped table-advance table-hover Widthall ScrollAD
|
||||
tabla_correcto grides Widthall mysmallbtn--%>
|
||||
<asp:GridView ID="GvM" runat="server" GridLines="none" CssClass="table table-striped table-advance table-hover Widthall ScrollAD mysmallbtn" DataKeyNames="No" EmptyDataText="Aún no hay registros." AutoGenerateColumns="False" AllowPaging="False" ShowHeaderWhenEmpty="True">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="" ItemStyle-Font-Size="6pt">
|
||||
<EditItemTemplate>
|
||||
<asp:Literal ID="lbNo" runat="server" Text='<%# Eval("No")%>'></asp:Literal>
|
||||
</EditItemTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="lbNo" runat="server" Text='<%# Eval("No")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="28px"></ItemStyle>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField HeaderText="" ReadOnly="true" DataField="Marca" ItemStyle-Width="200px" ItemStyle-HorizontalAlign="Left" />
|
||||
<%-- <asp:BoundField HeaderText="" ReadOnly="true" DataField="PrecioG" ItemStyle-Width="73px" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:N2}" />--%>
|
||||
|
||||
|
||||
<asp:TemplateField HeaderText="">
|
||||
<EditItemTemplate>
|
||||
<asp:TextBox ID="TxtPorcentajeP" CssClass="form-control input-sm" runat="server" Width="80px" Text='<%# Eval("PorcentajeProducto", "{0:N2}")%>' Style="text-align: right"></asp:TextBox>
|
||||
<ajax:FilteredTextBoxExtender ID="ftbe" runat="server" TargetControlID="txtPorcentajeP" FilterType="Custom, Numbers" ValidChars=".," />
|
||||
</EditItemTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="lblPorcentajeP" runat="server" Text='<%# Eval("PorcentajeProducto", "{0:N2}")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="73px" HorizontalAlign="Right"></ItemStyle>
|
||||
<FooterStyle HorizontalAlign="Right"></FooterStyle>
|
||||
</asp:TemplateField>
|
||||
|
||||
|
||||
<%-- <asp:BoundField HeaderText="" ReadOnly="true" DataField="PrecioA" ItemStyle-Width="73px" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:N2}" />--%>
|
||||
|
||||
<asp:TemplateField>
|
||||
<EditItemTemplate>
|
||||
<center>
|
||||
<asp:LinkButton ID="imgU" runat="server" AlternateText="Actualizar" CausesValidation="True" CommandName="Update" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-check'></i>" ValidationGroup="GrpGV" />
|
||||
<asp:LinkButton ID="imgC" runat="server" AlternateText="Cancelar" CausesValidation="False" CommandName="Cancel" CssClass="btn btn-circle btn-sm red" Text="<i class='fa fa-times'></i>" />
|
||||
</center>
|
||||
</EditItemTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="imgE" runat="server" AlternateText="Editar" CausesValidation="False" CommandName="Edit" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-pencil'></i>" />
|
||||
<asp:LinkButton ID="lnkRemove" runat="server" AlternateText="Eliminar" OnClick="DeleteRowMarca" CommandArgument='<%# Eval("No")%>' CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="¿Seguro que desea eliminar el porcentaje?" data-btn-ok-label="si" />
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="73px"></ItemStyle>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<RowStyle CssClass="Texto" />
|
||||
<AlternatingRowStyle CssClass="TextoAlterno" />
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<asp:Button ID="BtnGuardarPorcentajesMarca" runat="server" Text="Guardar" CssClass="btn btn-primary" />
|
||||
<button type="button" class="btn btn-danger" data-dismiss="modal">Cancelar</button>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<%-- FIN MODAL MODIFICAR PORCENTAJE MARCAS --%>
|
||||
|
||||
<%-- MODAL MODIFICAR PRECIOS PS --%>
|
||||
<div id="DivPorcentajePrecios" class="modal ADS fade" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content" style="width: 700px;">
|
||||
@@ -5472,7 +5615,7 @@
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">Modificar Precio de Productos</h4>
|
||||
</div>
|
||||
<asp:UpdatePanel ID="UpPorcentaje" UpdateMode="Conditional" runat="server">
|
||||
<asp:UpdatePanel ID="UpPorcentajeP" UpdateMode="Conditional" runat="server">
|
||||
<ContentTemplate>
|
||||
<div class="modal-body">
|
||||
|
||||
@@ -5502,8 +5645,6 @@
|
||||
</asp:DropDownList>
|
||||
<br />
|
||||
<ADS:Dropdownlost runat="server" ID="DdlProducto2" CssStyle="width: 100%;" CssClassDdl="select2me" DataTextField="PSCodigo" DataValueField="CvePS" />
|
||||
<%-- <asp:RequiredFieldValidator ID="RFVProducto2" InitialValue="-1" runat="server" ControlToValidate="DdlProducto2" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Producto''</b> es necesario, por favor ingréselo." ValidationGroup="GprAgregaPS"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEProducto2" runat="server" HighlightCssClass="vco" TargetControlID="RFVProducto2" Width="300px"></ajax:ValidatorCalloutExtender>--%>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
@@ -5511,10 +5652,10 @@
|
||||
<asp:Label ID="LbPrecioG" DataFormatString="{0:N2}" Width="55px" MaxLength="15" runat="server"></asp:Label>
|
||||
</td>
|
||||
<td>
|
||||
<asp:TextBox ID="txtPorcentaje" CssClass="form-control input-sm" Width="55px" MaxLength="15" runat="server" ValidationGroup="GprAgregaPS" Style="text-align: right"></asp:TextBox>
|
||||
<ajax:FilteredTextBoxExtender ID="ftbe" runat="server" TargetControlID="txtPorcentaje" FilterType="Custom, Numbers" ValidChars=".," />
|
||||
<asp:RequiredFieldValidator ID="RFVPorcentaje" runat="server" ControlToValidate="txtPorcentaje" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''%'' Porcentaje</b> es necesario, por favor ingréselo." ValidationGroup="GprAgregaPS"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEPorcentaje" runat="server" HighlightCssClass="vco" TargetControlID="RFVPorcentaje" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
<asp:TextBox ID="TxtPorcentajePS" CssClass="form-control input-sm" Width="55px" MaxLength="15" runat="server" ValidationGroup="GprAgregaPS" Style="text-align: right"></asp:TextBox>
|
||||
<ajax:FilteredTextBoxExtender ID="FilteredTextBoxExtender3" runat="server" TargetControlID="TxtPorcentajePS" FilterType="Custom, Numbers" ValidChars=".," />
|
||||
<asp:RequiredFieldValidator ID="RFVPorcentajeP" runat="server" ControlToValidate="TxtPorcentajePS" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''%'' Porcentaje</b> es necesario, por favor ingréselo." ValidationGroup="GprAgregaPS"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender4" runat="server" HighlightCssClass="vco" TargetControlID="RFVPorcentajeP" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
<td>
|
||||
<asp:Label ID="LbPrecioA" Width="55px" MaxLength="15" runat="server" ClientIDMode="Static"></asp:Label>
|
||||
@@ -5530,11 +5671,9 @@
|
||||
|
||||
<br />
|
||||
<div class="row" style="margin: 5px;">
|
||||
<asp:UpdatePanel ID="UppGrid" runat="server" UpdateMode="Conditional">
|
||||
<asp:UpdatePanel ID="UpPorcentajePS" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<%--table table-striped table-advance table-hover Widthall ScrollAD
|
||||
tabla_correcto grides Widthall mysmallbtn--%>
|
||||
<asp:GridView ID="GvM" runat="server" GridLines="none" CssClass="table table-striped table-advance table-hover Widthall ScrollAD mysmallbtn" DataKeyNames="No" EmptyDataText="Aún no hay registros." AutoGenerateColumns="False" AllowPaging="False" ShowHeaderWhenEmpty="True">
|
||||
<asp:GridView ID="GvP" runat="server" GridLines="none" CssClass="table table-striped table-advance table-hover Widthall ScrollAD mysmallbtn" DataKeyNames="No" EmptyDataText="Aún no hay registros." AutoGenerateColumns="False" AllowPaging="False" ShowHeaderWhenEmpty="True">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="" ItemStyle-Font-Size="6pt">
|
||||
<EditItemTemplate>
|
||||
@@ -5597,7 +5736,8 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<%-- FIN MODAL IMPORTAR SALDOS --%>
|
||||
<%-- FIN MODAL MODIFICAR PRECIOS PS --%>
|
||||
|
||||
</asp:Content>
|
||||
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
|
||||
@@ -1253,7 +1253,8 @@ Partial Class Clientes
|
||||
'CargaFormaPago33()
|
||||
'CargaComboCFDI()
|
||||
|
||||
'LnkPorcentajePrecios.Visible = True
|
||||
LnkPorcentajeMarcas.Visible = True
|
||||
LnkPorcentajePrecios.Visible = True
|
||||
|
||||
If UsuarioActual.TienePermisoProceso(261) Then LnkVerGrafica.Visible = True
|
||||
|
||||
@@ -3643,14 +3644,14 @@ Partial Class Clientes
|
||||
Dim FechaVencimientoF As String = If(TxtFechaVFCxP.Text = "", "-1", TxtFechaVFCxP.Text).ToString
|
||||
|
||||
Dim ObjMovtos As New ClsMovimientos()
|
||||
If ObjMovtos.GetCxCDetalle(FI, FF, CveCliente, -1, -1, -1, -1, -1, "-1", "-1", DdlSucursalCliente.SelectedValue.ToEntero(), "S", -1, "-1", 1, UsuarioActual.CveEmpresa, -1, 1, TipoDocto:=TipoDocto, FechaCorte:=FechaCorte, FechaVI:=FechaVencimientoI, FechaVF:=FechaVencimientoF, CveUsuarioConsulta:=UsuarioActual.CveUsuario) Then
|
||||
DtCxCFact = ObjMovtos.DtResultados '.FiltraParametros("Tipo = 'Act'").Copy ' If(DdlTipoCuentasCxC.SelectedValue = "-1", ObjMovtos.DtResultados.FiltraParametros("CveVentaAmortizacion IS NULL", "TipoDocto").Copy, ObjMovtos.DtResultados.FiltraParametros("Tipo = 'Act' AND CveVentaAmortizacion IS NULL", "TipoDocto"))
|
||||
If ObjMovtos.GetCxCClienteDetalle(CveCliente, "-1", "-1", -1, -1, UsuarioActual.CveEmpresa, DdlSucursalCliente.SelectedValue.ToEntero) Then
|
||||
DtCxCFact = If(DdlTipoCuentasCxC.SelectedValue = "-1", ObjMovtos.DtResultados.FiltraParametros("", "TipoDocto").Copy, ObjMovtos.DtResultados.FiltraParametros("Tipo = 'Act'", "TipoDocto"))
|
||||
'cargo los anticipos NC
|
||||
DtCxCFact.Columns.Add("SaldoAnticipo", GetType(Decimal))
|
||||
|
||||
Dim dtt As DataTable = Nothing
|
||||
If ObjMovtos.GetAnticiposNCIxCCliente(CveCliente, -1, -1) Then
|
||||
dtt = ObjMovtos.DtResultados.FiltraParametros("Saldo > 0 AND SaldoVentaAnticipo = 0 AND ((Tipo = 'IxC' AND CveIE > 0) OR (Tipo = 'Ant' AND CveVenta > 0) )") ' que tenga saldo de anticipo y no de cliente
|
||||
dtt = If(DdlTipoCuentasCxC.SelectedValue = "-1", ObjMovtos.DtResultados.FiltraParametros("SaldoVentaAnticipo = 0 AND ((Tipo = 'IxC' AND CveIE > 0) OR (Tipo = 'Ant' AND CveVenta > 0) OR (Tipo = 'NC' AND CveVenta > 0) OR (Tipo = 'Egs' AND CveVenta > 0) )"), ObjMovtos.DtResultados.FiltraParametros("Saldo > 0 AND SaldoVentaAnticipo = 0 AND ((Tipo = 'IxC' AND CveIE > 0) OR (Tipo = 'Ant' AND CveVenta > 0) OR (Tipo = 'NC' AND CveVenta > 0) OR (Tipo = 'Egs' AND CveVenta > 0) )")) ' que tenga saldo de anticipo y no de cliente
|
||||
If dtt IsNot Nothing AndAlso dtt.Rows.Count > 0 Then
|
||||
For Each drt As DataRow In dtt.Rows
|
||||
Dim drr As DataRow = DtCxCFact.NewRow
|
||||
@@ -3685,7 +3686,7 @@ Partial Class Clientes
|
||||
SaldoIngDolaresPesos = SaldoIngDolaresPesos + (Row("Saldo").ToString.ToDouble * Row("TipoCambio").ToString.ToDouble)
|
||||
End If
|
||||
|
||||
ElseIf (Row("TipoDocto").ToString = "Ant" And Row("Saldo").ToString.ToDouble = 0) Or Row("TipoDocto").ToString = "IxC" Or Row("TipoDocto").ToString = "Egs" Or Row("TipoDocto").ToString = "Dev" Then 'Anticipos, NC, IxC
|
||||
ElseIf (Row("TipoDocto").ToString = "Ant" And Row("Saldo").ToString.ToDouble = 0) Or Row("TipoDocto").ToString = "IxC" Or Row("TipoDocto").ToString = "NC" Or Row("TipoDocto").ToString = "Dev" Then 'Anticipos, NC, IxC
|
||||
ContaAnt = ContaAnt + 1
|
||||
If Row("CveMoneda").ToString.ToEntero = 1 Then
|
||||
If Row("TipoDocto").ToString = "Dev" Then
|
||||
@@ -8132,14 +8133,13 @@ Partial Class Clientes
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
#Region "PORCENTAJE PRECIO DE PRODUCTOS"
|
||||
Private Sub LnkPorcentajePrecios_Click(sender As Object, e As EventArgs) Handles LnkPorcentajePrecios.Click
|
||||
RegistraScript(String.Format("$('#{0}').modal();", "DivPorcentajePrecios"))
|
||||
#Region "PORCENTAJE PRECIO DE MARCAS"
|
||||
Private Sub LnkPorcentajeMarcas_Click(sender As Object, e As EventArgs) Handles LnkPorcentajeMarcas.Click
|
||||
RegistraScript(String.Format("$('#{0}').modal();", "DivPorcentajeMarcas"))
|
||||
|
||||
CreaDT()
|
||||
|
||||
txtPorcentaje.Attributes.Add("onchange", String.Format("FnCambiaPorcentaje({0});", "5"))
|
||||
CargaPorcentajesProductos()
|
||||
CargaMarcas()
|
||||
LimpiaModalPorcentaje()
|
||||
End Sub
|
||||
Private Sub CreaDT()
|
||||
@@ -8154,66 +8154,28 @@ Partial Class Clientes
|
||||
End With
|
||||
|
||||
DTPorcentajeTemp.Columns.Add(column)
|
||||
DTPorcentajeTemp.Columns.Add("CvePS", GetType(Integer))
|
||||
DTPorcentajeTemp.Columns.Add("Producto", GetType(String))
|
||||
DTPorcentajeTemp.Columns.Add("PrecioG", GetType(Decimal))
|
||||
DTPorcentajeTemp.Columns.Add("CveMarca", GetType(Integer))
|
||||
DTPorcentajeTemp.Columns.Add("Marca", GetType(String))
|
||||
DTPorcentajeTemp.Columns.Add("PorcentajeProducto", GetType(Decimal))
|
||||
DTPorcentajeTemp.Columns.Add("PrecioA", GetType(Decimal))
|
||||
DTPorcentajeTemp.Columns.Add("Estatus", GetType(String))
|
||||
DTPorcentajePrecios = DTPorcentajeTemp.Clone
|
||||
End Sub
|
||||
Private Sub CargaPorcentajesProductos()
|
||||
'Llenar el dropdownlist de Secciones
|
||||
If UsuarioActual.CveEmpresa = 66 Then
|
||||
DdlClasificacion2.DataSource = GlobalDTSubFamilias(UsuarioActual.CveEmpresa).FiltraParametros("", Orderby:="Clasificacion")
|
||||
Else
|
||||
Dim ObjClasificaciones As New ClsClasificaciones
|
||||
If ObjClasificaciones.GetClasificacionesExistencias(UsuarioActual.CveEmpresa) Then
|
||||
DdlClasificacion2.DataSource = ObjClasificaciones.DtResultados
|
||||
End If
|
||||
ObjClasificaciones.Dispose()
|
||||
End If
|
||||
DdlClasificacion2.DataBind()
|
||||
Private Sub CargaMarcas()
|
||||
Dim ObjMarcas As New ClsProductosServicios
|
||||
ObjMarcas.GetMarcas(UsuarioActual.CveEmpresa)
|
||||
DdlMarcaPS.DataSource = ObjMarcas.DtResultados
|
||||
ObjMarcas.Dispose()
|
||||
DdlMarcaPS.DataBind()
|
||||
DdlMarcaPS.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
|
||||
CargaPS()
|
||||
CargaGridPorcentajes()
|
||||
|
||||
UpPorcentaje.Update()
|
||||
End Sub
|
||||
Private Sub CargaPS()
|
||||
DdlProducto2.setEsWebService(UsuarioActual.Empresa.Funcionalidad(105) = "1")
|
||||
|
||||
If UsuarioActual.CveEmpresa = 66 Then
|
||||
DdlProducto2.ddlWS.Attributes.Add("data-pagina", "Inventarios")
|
||||
End If
|
||||
|
||||
If Not DdlProducto2.UsaWebService AndAlso CType(DdlProducto2.DataSource, DataTable) Is Nothing Then
|
||||
DdlProducto2.DataSource = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa).FiltraParametros("CveTipoPS = 2")
|
||||
|
||||
DdlProducto2.DataBind()
|
||||
|
||||
DdlProducto2.ddl.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub DdlProducto2_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles DdlProducto2.selectedindexchange
|
||||
DdlProducto2IndexChange(DdlProducto2.SelectedValue.ToEntero, DdlProducto2)
|
||||
End Sub
|
||||
Private Sub DdlProducto2IndexChange(CvePSParametro As Integer, Ddl As ADServerControl.Dropdownlost)
|
||||
Dim drPS As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePSParametro).FiltroPrimero("")
|
||||
|
||||
If drPS IsNot Nothing Then
|
||||
Dim Precio = drPS("Precio").ToString.ToDouble
|
||||
LbPrecioG.Text = Precio.FormatoNumero()
|
||||
LbPrecioA.Text = ((Precio * txtPorcentaje.Text.ToDecimal) / 100).FormatoNumero
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub CargaGridPorcentajes()
|
||||
Dim ObjPS As New ClsProductosServicios
|
||||
|
||||
If ObjPS.GetPorcentajeProductos(CveCliente) Then
|
||||
If ObjPS.GetPorcentajeMarcas(CveCliente) Then
|
||||
DTPorcentajePrecios = ObjPS.DtResultados
|
||||
GvM.DataSource = DTPorcentajePrecios
|
||||
End If
|
||||
@@ -8232,37 +8194,29 @@ Partial Class Clientes
|
||||
|
||||
Private Sub LimpiaModalPorcentaje()
|
||||
txtPorcentaje.Text = ""
|
||||
DdlClasificacion2.SelectedValue = "-1"
|
||||
DdlProducto2.SelectedText = ""
|
||||
DdlMarcaPS.SelectedValue = "-1"
|
||||
End Sub
|
||||
|
||||
Protected Sub LbAgregar_Click(sender As Object, e As EventArgs) Handles LbAgregar.Click
|
||||
Protected Sub LbAgregarMarca_Click(sender As Object, e As EventArgs) Handles LbAgregarMarca.Click
|
||||
If txtPorcentaje.Text.ToDecimal >= 0 And txtPorcentaje.Text.ToDecimal <= 100 Then
|
||||
|
||||
If DdlProducto2.SelectedText <> "" Then
|
||||
If txtPorcentaje.Text.ToDecimal >= 0 And txtPorcentaje.Text.ToDecimal <= 100 Then
|
||||
Dim registro As DataRow = DTPorcentajePrecios.NewRow
|
||||
|
||||
Dim registro As DataRow = DTPorcentajePrecios.NewRow
|
||||
|
||||
registro.Item("No") = DTPorcentajePrecios.Rows.Count + 1
|
||||
registro.Item("CvePS") = DdlProducto2.SelectedValue.ToEntero
|
||||
registro.Item("Producto") = DdlProducto2.SelectedText
|
||||
registro.Item("PrecioG") = 0
|
||||
registro.Item("PrecioA") = 0 * txtPorcentaje.Text.ToDecimal / 100
|
||||
registro.Item("PorcentajeProducto") = txtPorcentaje.Text.ToDecimal
|
||||
registro.Item("Estatus") = "I"
|
||||
DTPorcentajePrecios.Rows.Add(registro)
|
||||
CargaDTPorcentajePrecios(DTPorcentajePrecios.FiltraParametros("Estatus <> 'D' "))
|
||||
Else
|
||||
Alert("El Porcentaje debe estar en un rango entre 0 y 100", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
registro.Item("No") = DTPorcentajePrecios.Rows.Count + 1
|
||||
registro.Item("CveMarca") = DdlMarcaPS.SelectedValue.ToEntero
|
||||
registro.Item("Marca") = DdlMarcaPS.SelectedItem.Text
|
||||
registro.Item("PorcentajeProducto") = txtPorcentaje.Text.ToDecimal
|
||||
registro.Item("Estatus") = "I"
|
||||
DTPorcentajePrecios.Rows.Add(registro)
|
||||
CargaDTPorcentajePrecios(DTPorcentajePrecios.FiltraParametros("Estatus <> 'D' "))
|
||||
Else
|
||||
Alert("El campo <b>''Producto''</b> es necesario, por favor ingréselo.", TipoMensaje.MsgAdvertencia)
|
||||
Alert("El Porcentaje debe estar en un rango entre 0 y 100", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
|
||||
LimpiaModalPorcentaje()
|
||||
End Sub
|
||||
|
||||
Protected Sub DeleteRow(sender As Object, e As EventArgs)
|
||||
Protected Sub DeleteRowMarca(sender As Object, e As EventArgs)
|
||||
|
||||
Dim lnkRemove As LinkButton = DirectCast(sender, LinkButton)
|
||||
|
||||
@@ -8272,7 +8226,7 @@ Partial Class Clientes
|
||||
i = lnkRemove.CommandArgument.ToString.ToEntero
|
||||
Dim Drs As DataRow() = DTPorcentajePrecios.Select(String.Format("No = {0}", i))
|
||||
If Drs.Count > 0 Then
|
||||
If CveCliente > 0 AndAlso Drs(0)("CvePS").ToString.ToEntero > 0 Then
|
||||
If CveCliente > 0 AndAlso Drs(0)("CveMarca").ToString.ToEntero > 0 Then
|
||||
Drs(0)("Estatus") = "D"
|
||||
Else
|
||||
Drs(0).Delete()
|
||||
@@ -8309,7 +8263,6 @@ Partial Class Clientes
|
||||
|
||||
If Drs.Count > 0 Then
|
||||
Drs(0)("PorcentajeProducto") = PorcentajeProducto
|
||||
Drs(0)("PrecioA") = Drs(0)("PrecioG").ToString.ToDouble * PorcentajeProducto / 100
|
||||
Drs(0)("Estatus") = "U"
|
||||
End If
|
||||
|
||||
@@ -8323,6 +8276,238 @@ Partial Class Clientes
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnGuardarPorcentajesMarca_Click(sender As Object, e As EventArgs) Handles BtnGuardarPorcentajesMarca.Click
|
||||
|
||||
Dim TieneError As Boolean = False
|
||||
|
||||
Dim ObjPS As New ClsProductosServicios
|
||||
ObjPS.IniciaTransacSQL()
|
||||
|
||||
For Each Dr As DataRow In DTPorcentajePrecios.Rows
|
||||
|
||||
If Dr("Estatus").ToString <> "" Then
|
||||
|
||||
If Dr("Estatus").ToString = "I" Then
|
||||
If Not ObjPS.AddPorcentajeMarcas(CveCliente, Dr("CveMarca").ToString.ToEntero, Dr("PorcentajeProducto").ToString.ToDecimal, UsuarioActual.CveUsuario) Then
|
||||
TieneError = True
|
||||
End If
|
||||
ElseIf Dr("Estatus").ToString = "U" Then
|
||||
If Not ObjPS.UpdatePorcentajeMarcas(CveCliente, Dr("CveMarca").ToString.ToEntero, Dr("PorcentajeProducto").ToString.ToDecimal) Then
|
||||
TieneError = True
|
||||
End If
|
||||
ElseIf Dr("Estatus").ToString = "D" Then
|
||||
If Not ObjPS.RemovePorcentajeMarcas(CveCliente, Dr("CveMarca").ToString.ToEntero) Then
|
||||
TieneError = True
|
||||
End If
|
||||
End If
|
||||
|
||||
End If
|
||||
Next
|
||||
|
||||
If TieneError Then
|
||||
ObjPS.RollBack()
|
||||
Else
|
||||
ObjPS.Commit()
|
||||
Alert("Los Porcentajes se guardaron correctamente.", TipoMensaje.MsgInformacion)
|
||||
RegistraScript("$('#DivPorcentajeMarcas').modal('hide')", "hidemodal")
|
||||
End If
|
||||
|
||||
ObjPS.Dispose()
|
||||
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
#Region "PORCENTAJE PRECIO DE PRODUCTOS"
|
||||
Private Sub LnkPorcentajePrecios_Click(sender As Object, e As EventArgs) Handles LnkPorcentajePrecios.Click
|
||||
RegistraScript(String.Format("$('#{0}').modal();", "DivPorcentajePrecios"))
|
||||
|
||||
CreaDT2()
|
||||
|
||||
TxtPorcentajePS.Attributes.Add("onchange", String.Format("FnCambiaPorcentaje({0});", "5"))
|
||||
CargaPorcentajesProductos()
|
||||
LimpiaModalPorcentaje2()
|
||||
End Sub
|
||||
Private Sub CreaDT2()
|
||||
Dim DTPorcentajeTemp As New DataTable
|
||||
|
||||
Dim column As DataColumn = New DataColumn("No")
|
||||
column.DataType = Type.GetType("System.Int32")
|
||||
With column
|
||||
.AutoIncrement = True
|
||||
.AutoIncrementSeed = 1
|
||||
.AutoIncrementStep = 1
|
||||
End With
|
||||
|
||||
DTPorcentajeTemp.Columns.Add(column)
|
||||
DTPorcentajeTemp.Columns.Add("CvePS", GetType(Integer))
|
||||
DTPorcentajeTemp.Columns.Add("Producto", GetType(String))
|
||||
DTPorcentajeTemp.Columns.Add("PrecioG", GetType(Decimal))
|
||||
DTPorcentajeTemp.Columns.Add("PorcentajeProducto", GetType(Decimal))
|
||||
DTPorcentajeTemp.Columns.Add("PrecioA", GetType(Decimal))
|
||||
DTPorcentajeTemp.Columns.Add("Estatus", GetType(String))
|
||||
DTPorcentajePrecios = DTPorcentajeTemp.Clone
|
||||
End Sub
|
||||
Private Sub CargaPorcentajesProductos()
|
||||
'Llenar el dropdownlist de Secciones
|
||||
If UsuarioActual.CveEmpresa = 66 Then
|
||||
DdlClasificacion2.DataSource = GlobalDTSubFamilias(UsuarioActual.CveEmpresa).FiltraParametros("", Orderby:="Clasificacion")
|
||||
Else
|
||||
Dim ObjClasificaciones As New ClsClasificaciones
|
||||
If ObjClasificaciones.GetClasificacionesExistencias(UsuarioActual.CveEmpresa) Then
|
||||
DdlClasificacion2.DataSource = ObjClasificaciones.DtResultados
|
||||
End If
|
||||
ObjClasificaciones.Dispose()
|
||||
End If
|
||||
DdlClasificacion2.DataBind()
|
||||
|
||||
CargaPS()
|
||||
CargaGridPorcentajes2()
|
||||
|
||||
UpPorcentajeP.Update()
|
||||
End Sub
|
||||
Private Sub CargaPS()
|
||||
DdlProducto2.setEsWebService(UsuarioActual.Empresa.Funcionalidad(105) = "1")
|
||||
|
||||
If UsuarioActual.CveEmpresa = 66 Then
|
||||
DdlProducto2.ddlWS.Attributes.Add("data-pagina", "Inventarios")
|
||||
End If
|
||||
|
||||
If Not DdlProducto2.UsaWebService AndAlso CType(DdlProducto2.DataSource, DataTable) Is Nothing Then
|
||||
DdlProducto2.DataSource = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa).FiltraParametros("CveTipoPS = 2")
|
||||
|
||||
DdlProducto2.DataBind()
|
||||
|
||||
DdlProducto2.ddl.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub DdlProducto2_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles DdlProducto2.selectedindexchange
|
||||
DdlProducto2IndexChange(DdlProducto2.SelectedValue.ToEntero, DdlProducto2)
|
||||
End Sub
|
||||
Private Sub DdlProducto2IndexChange(CvePSParametro As Integer, Ddl As ADServerControl.Dropdownlost)
|
||||
Dim drPS As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePSParametro).FiltroPrimero("")
|
||||
|
||||
If drPS IsNot Nothing Then
|
||||
Dim Precio = drPS("Precio").ToString.ToDouble
|
||||
LbPrecioG.Text = Precio.FormatoNumero()
|
||||
LbPrecioA.Text = ((Precio * TxtPorcentajePS.Text.ToDecimal) / 100).FormatoNumero
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub CargaGridPorcentajes2()
|
||||
Dim ObjPS As New ClsProductosServicios
|
||||
|
||||
If ObjPS.GetPorcentajeProductos(CveCliente) Then
|
||||
DTPorcentajePrecios = ObjPS.DtResultados
|
||||
GvP.DataSource = DTPorcentajePrecios
|
||||
End If
|
||||
ObjPS.Dispose()
|
||||
|
||||
GvP.DataBind()
|
||||
UpPorcentajePS.Update()
|
||||
|
||||
End Sub
|
||||
Private Sub CargaDTPorcentajePrecios2(DtTemp As DataTable)
|
||||
GvP.DataSource = DtTemp
|
||||
GvP.DataBind()
|
||||
|
||||
UpPorcentajePS.Update()
|
||||
End Sub
|
||||
|
||||
Private Sub LimpiaModalPorcentaje2()
|
||||
TxtPorcentajePS.Text = ""
|
||||
DdlClasificacion2.SelectedValue = "-1"
|
||||
DdlProducto2.SelectedText = ""
|
||||
End Sub
|
||||
|
||||
Protected Sub LbAgregar_Click(sender As Object, e As EventArgs) Handles LbAgregar.Click
|
||||
|
||||
If DdlProducto2.SelectedText <> "" Then
|
||||
If TxtPorcentajePS.Text.ToDecimal >= 0 And TxtPorcentajePS.Text.ToDecimal <= 100 Then
|
||||
|
||||
Dim registro As DataRow = DTPorcentajePrecios.NewRow
|
||||
|
||||
registro.Item("No") = DTPorcentajePrecios.Rows.Count + 1
|
||||
registro.Item("CvePS") = DdlProducto2.SelectedValue.ToEntero
|
||||
registro.Item("Producto") = DdlProducto2.SelectedText
|
||||
registro.Item("PrecioG") = LbPrecioG.Text.ToDecimal
|
||||
registro.Item("PrecioA") = LbPrecioG.Text.ToDecimal * TxtPorcentajePS.Text.ToDecimal / 100
|
||||
registro.Item("PorcentajeProducto") = TxtPorcentajePS.Text.ToDecimal
|
||||
registro.Item("Estatus") = "I"
|
||||
DTPorcentajePrecios.Rows.Add(registro)
|
||||
CargaDTPorcentajePrecios2(DTPorcentajePrecios.FiltraParametros("Estatus <> 'D' "))
|
||||
Else
|
||||
Alert("El Porcentaje debe estar en un rango entre 0 y 100", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
Else
|
||||
Alert("El campo <b>''Producto''</b> es necesario, por favor ingréselo.", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
|
||||
LimpiaModalPorcentaje()
|
||||
End Sub
|
||||
|
||||
Protected Sub DeleteRow(sender As Object, e As EventArgs)
|
||||
|
||||
Dim lnkRemove As LinkButton = DirectCast(sender, LinkButton)
|
||||
|
||||
|
||||
If DTPorcentajePrecios.Rows.Count > 0 And lnkRemove.CommandArgument.ToString.Length > 0 Then
|
||||
Dim i As Integer
|
||||
i = lnkRemove.CommandArgument.ToString.ToEntero
|
||||
Dim Drs As DataRow() = DTPorcentajePrecios.Select(String.Format("No = {0}", i))
|
||||
If Drs.Count > 0 Then
|
||||
If CveCliente > 0 AndAlso Drs(0)("CvePS").ToString.ToEntero > 0 Then
|
||||
Drs(0)("Estatus") = "D"
|
||||
Else
|
||||
Drs(0).Delete()
|
||||
End If
|
||||
|
||||
End If
|
||||
DTPorcentajePrecios.AcceptChanges()
|
||||
End If
|
||||
|
||||
GvP.EditIndex = -1
|
||||
|
||||
CargaDTPorcentajePrecios2(DTPorcentajePrecios.FiltraParametros("Estatus <> 'D' "))
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub GvP_RowEditing(sender As Object, e As GridViewEditEventArgs) Handles GvP.RowEditing
|
||||
GvP.EditIndex = e.NewEditIndex
|
||||
|
||||
CargaDTPorcentajePrecios2(DTPorcentajePrecios.FiltraParametros("Estatus <> 'D' "))
|
||||
End Sub
|
||||
Protected Sub GvP_RowCancelingEdit(sender As Object, e As GridViewCancelEditEventArgs) Handles GvP.RowCancelingEdit
|
||||
GvP.EditIndex = -1
|
||||
|
||||
CargaDTPorcentajePrecios2(DTPorcentajePrecios.FiltraParametros("Estatus <> 'D' "))
|
||||
End Sub
|
||||
Protected Sub GvP_RowUpdating(sender As Object, e As GridViewUpdateEventArgs) Handles GvP.RowUpdating
|
||||
|
||||
Dim PorcentajeProducto As Double = GvP.Rows(e.RowIndex).FCTextBox("TxtPorcentajeP").Text.ToDouble
|
||||
|
||||
If PorcentajeProducto >= 0 And PorcentajeProducto <= 100 Then
|
||||
Dim No As Integer = GvP.Rows(e.RowIndex).DataKey("No").ToEntero
|
||||
|
||||
Dim Drs As DataRow() = DTPorcentajePrecios.Select(String.Format("No = {0}", No))
|
||||
|
||||
If Drs.Count > 0 Then
|
||||
Drs(0)("PorcentajeProducto") = PorcentajeProducto
|
||||
Drs(0)("PrecioA") = Drs(0)("PrecioG").ToString.ToDouble * PorcentajeProducto / 100
|
||||
Drs(0)("Estatus") = "U"
|
||||
End If
|
||||
|
||||
DTPorcentajePrecios.AcceptChanges()
|
||||
GvP.EditIndex = -1
|
||||
|
||||
CargaDTPorcentajePrecios2(DTPorcentajePrecios.FiltraParametros("Estatus <> 'D' "))
|
||||
Else
|
||||
Alert("El Porcentaje debe estar en un rango entre 0 y 100", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnGuardarPorcentajes_Click(sender As Object, e As EventArgs) Handles BtnGuardarPorcentajes.Click
|
||||
|
||||
Dim TieneError As Boolean = False
|
||||
@@ -8473,7 +8658,7 @@ Partial Class Clientes
|
||||
End Sub
|
||||
|
||||
|
||||
Function FolioNotaCredito() As Boolean
|
||||
Function FolioNotaCredito(Tipo As Integer) As Boolean
|
||||
|
||||
FolioNotaAcumulador = 0
|
||||
SerieNotaAcumulador = ""
|
||||
@@ -8485,7 +8670,7 @@ Partial Class Clientes
|
||||
|
||||
If DTSucursales.Rows.Count > 0 Then
|
||||
|
||||
If ObjFolios.GetFolios("Egs", UsuarioActual.CveEmpresa) Then
|
||||
If ObjFolios.GetFolios(If(Tipo = 1, "RNC", "Egs"), UsuarioActual.CveEmpresa) Then
|
||||
|
||||
Dim DT As DataTable
|
||||
If UsuarioActual.CveSubProyecto > 0 Then
|
||||
@@ -8862,7 +9047,7 @@ Partial Class Clientes
|
||||
Dim Folio As Integer = 0
|
||||
Dim Serie As String = ""
|
||||
|
||||
If FolioNotaCredito() Then
|
||||
If FolioNotaCredito(Tipo) Then
|
||||
Folio = FolioNotaAcumulador
|
||||
Serie = SerieNotaAcumulador
|
||||
End If
|
||||
@@ -8879,7 +9064,7 @@ Partial Class Clientes
|
||||
ObjFactura.CveMoneda = 1
|
||||
ObjFactura.Moneda = "Pesos"
|
||||
ObjFactura.MonedaSAT = "MXN"
|
||||
ObjFactura.TipoDocto = "Egs"
|
||||
ObjFactura.TipoDocto = If(Tipo = 1, "RNC", "Egs")
|
||||
|
||||
ObjFactura.Folio = Folio
|
||||
|
||||
@@ -9013,7 +9198,7 @@ Partial Class Clientes
|
||||
|
||||
End If
|
||||
|
||||
If ObjFactura.TipoDocto = "Egs" Then
|
||||
If ObjFactura.TipoDocto.Contiene("Egs", "RNC") Then
|
||||
ObjFactura.CveTipoRelacion = -1
|
||||
End If
|
||||
|
||||
|
||||
@@ -130,7 +130,7 @@
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="col-md-12">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtPS" CssClass="form-control Mayuscula" runat="server" MaxLength="846"></asp:TextBox>
|
||||
<label class="truncate" for="<%= TxtPS.ClientID.ToString()%>">Descripción del Producto / Servicio:</label>
|
||||
|
||||
@@ -212,6 +212,14 @@ Partial Class ProductosyServicios
|
||||
|
||||
InicializaEcommerce()
|
||||
|
||||
If UsuarioActual.CveEmpresa.Contiene(141) Then
|
||||
'DivDatos.Attributes("class") = "col-md-12"
|
||||
|
||||
DivDdlTipo.Visible = True
|
||||
DdlTipoPSDes.Attributes.Add("onChange", "CreaDescripcionPS();")
|
||||
|
||||
End If
|
||||
|
||||
If UsuarioActual.CveEmpresa.Contiene(1, 72, 80) And CvePS = -1 Then
|
||||
'DivDatos.Attributes("class") = "col-md-12"
|
||||
TxtPS.Enabled = False
|
||||
|
||||
@@ -89,7 +89,8 @@ public partial class Ventas_RepCancelacionesPorRespuesta : ClsPaginas
|
||||
{
|
||||
var resp = Timbrado.VerificarVigenciaSAT(uuid, UsuarioActual.Empresa.RFC, receptor, total, UsuarioActual.Empresa.FacturaProduccion);
|
||||
if (resp != null)
|
||||
{
|
||||
{
|
||||
|
||||
if (resp.Estado == null)
|
||||
{
|
||||
sb.Append("No se pudo comprobar el estado de la factura. El servicio del sat no esta disponible");
|
||||
@@ -100,7 +101,15 @@ public partial class Ventas_RepCancelacionesPorRespuesta : ClsPaginas
|
||||
sb.AppendFormat("Codigo Estado: {0} <br/>", resp.CodigoEstatus);
|
||||
sb.AppendFormat("Estado: {0} <br/>", resp.Estado);
|
||||
sb.AppendFormat("Es Cancelable: {0} <br/>", string.IsNullOrEmpty(resp.EsCancelable) ? "Desconocido" : resp.EsCancelable);
|
||||
sb.AppendFormat("Estatus de Cancelación: {0} <br/><br/>", string.IsNullOrEmpty(resp.EsCancelable) ? "Desconocido" : resp.EstatusCancelacion);
|
||||
sb.AppendFormat("Estatus de Cancelación: {0} <br/><br/>", string.IsNullOrEmpty(resp.EsCancelable) ? "Desconocido" : resp.EstatusCancelacion);
|
||||
|
||||
//var FueCancelado = CancelarDocumento(CveVenta, CveEstatus, CveCliente, Folio, uuid, CancelacionAcuse, CancelacionFecha, TipoDocto, total.ToDouble(), UsuarioActual.Empresa.CvePAC).Mensaje;
|
||||
|
||||
//sb.AppendFormat("{0} <br/>", FueCancelado);
|
||||
//if (CveEstatus.Contiene(4, 5) && EsRefacturacion)
|
||||
//{
|
||||
// Response.Redirect(string.Format("Ventas.aspx?CveDevolucion={0}&NuevaFactura=1", CveVenta));
|
||||
//}
|
||||
|
||||
if ((resp.EsCancelable.ToUpper() == "NO CANCELABLE"))
|
||||
{
|
||||
@@ -123,7 +132,8 @@ public partial class Ventas_RepCancelacionesPorRespuesta : ClsPaginas
|
||||
CancelacionFecha = xmlAcuse.SelectSingleNode("Acuse").Attributes["Fecha"].Value.ToDate();
|
||||
}
|
||||
|
||||
var FueCancelado = CancelarDocumento(CveVenta, CveEstatus, CveCliente, Folio, uuid, CancelacionAcuse, CancelacionFecha, TipoDocto, total.ToDouble(), UsuarioActual.Empresa.CvePAC);
|
||||
var FueCancelado = CancelarDocumento(CveVenta, CveEstatus, CveCliente, Folio, uuid, CancelacionAcuse, CancelacionFecha, TipoDocto, total.ToDouble(), UsuarioActual.Empresa.CvePAC).Mensaje;
|
||||
|
||||
sb.AppendFormat("{0} <br/>", FueCancelado);
|
||||
if (CveEstatus.Contiene(4, 5) && EsRefacturacion)
|
||||
{
|
||||
@@ -160,137 +170,11 @@ public partial class Ventas_RepCancelacionesPorRespuesta : ClsPaginas
|
||||
|
||||
return sb.ToString();
|
||||
}
|
||||
private string CancelarDocumento(int CveVenta, int CveEstatus, int CveCliente, string Folio, string FolioFiscal, string CancelacionAcuse, DateTime CancelacionFecha, string TipoComprobante, double Total, int CvePACCancelacion)
|
||||
private Modelos.Factura.MCancelacionVentaMensaje CancelarDocumento(int CveVenta, int CveEstatus, int CveCliente, string Folio, string FolioFiscal, string CancelacionAcuse, DateTime CancelacionFecha, string TipoComprobante, double Total, int CvePACCancelacion)
|
||||
{
|
||||
string Mensaje = "";
|
||||
ClsVentas ObjVentas = new ClsVentas();
|
||||
ClsOIEventos ObjEventos = new ClsOIEventos(ObjVentas.IniciaTransacSQL());
|
||||
ClsContabilidad ObjConta = new ClsContabilidad(ObjVentas.IniciaTransacSQL());
|
||||
ClsContPAQi ObjContPaq = null;
|
||||
|
||||
try
|
||||
{
|
||||
if (UsuarioActual.Empresa.UsaAC || UsuarioActual.Empresa.Funcionalidad(200) == "1")
|
||||
{
|
||||
ObjContPaq = new ClsContPAQi(UsuarioActual.Empresa);
|
||||
ObjContPaq.IniciaTransacSQL();
|
||||
}
|
||||
bool ErrorCancelar = false;
|
||||
var ErrorList = new List<string>();
|
||||
|
||||
int IDPoliza = -1;
|
||||
int CvePrePolizaCancelacion = -1;
|
||||
|
||||
// CANCELA PREPOLIZA
|
||||
ErrorCancelar = !ObjVentas.ProcesoPrepolizasCancelacion(CveVenta, UsuarioActual.CveUsuario);
|
||||
|
||||
if (ErrorCancelar)
|
||||
{
|
||||
Mensaje = "Ocurrió un error al generar la prepoliza de cancelación.";
|
||||
}
|
||||
else
|
||||
{
|
||||
if (ObjVentas.DtResultados.Rows.Count > 0)
|
||||
{
|
||||
CvePrePolizaCancelacion = ObjVentas.DtResultados.FiltroPrimeroValor("CvePrepolizaCancelacion").ToEntero();
|
||||
if (CvePrePolizaCancelacion <= 0)
|
||||
{
|
||||
ErrorCancelar = true;
|
||||
Mensaje = "Ocurrió un error al generar la prepoliza de cancelación.";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ErrorCancelar = true;
|
||||
Mensaje = "Ocurrió un error al generar la prepoliza de cancelación.";
|
||||
}
|
||||
}
|
||||
|
||||
// POLIZA DE CANCELACION
|
||||
if (!ErrorCancelar)
|
||||
{
|
||||
if (UsuarioActual.Empresa.UsaAC)
|
||||
{
|
||||
IDPoliza = GenerarPolizaAC(ObjContPaq, CveVenta, Folio, CveCliente, TipoComprobante, DateTime.Now, true);
|
||||
if ((IDPoliza <= 0))
|
||||
{
|
||||
ErrorCancelar = true;
|
||||
Mensaje = "Ocurrió un error al generar la poliza de cancelación.";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//AUTO CONTABILIDAD
|
||||
if (!ErrorCancelar)
|
||||
{
|
||||
if (UsuarioActual.Empresa.Funcionalidad(200) == "1" & !ErrorCancelar && CvePrePolizaCancelacion > 0)
|
||||
{
|
||||
if (!ObjConta.ContabilizarPrePoliza(CvePrePolizaCancelacion, UsuarioActual.CveUsuario, UsuarioActual.Empresa, ObjConta: ObjContPaq))
|
||||
{
|
||||
ErrorCancelar = true;
|
||||
Mensaje = "Ocurrió un error al contabilizar. Favor de ponerse en contacto con Soporte Técnico";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// ACTUALIZA ESTATUS
|
||||
if (!ErrorCancelar)
|
||||
{
|
||||
switch (TipoComprobante)
|
||||
{
|
||||
case "Rem":
|
||||
CveEstatus = 12;
|
||||
break;
|
||||
case "Com":
|
||||
CveEstatus = 9;
|
||||
break;
|
||||
}
|
||||
if (!ObjVentas.UpdateCancelaVenta(CveVenta, CancelacionFecha, CancelacionAcuse, UsuarioActual.CveEmpresa, CvePACCancelacion))
|
||||
{
|
||||
ErrorCancelar = true;
|
||||
Mensaje = "Ocurrió un error al guardar el estatus de cancelación.";
|
||||
}
|
||||
}
|
||||
|
||||
if (!ErrorCancelar)
|
||||
{
|
||||
if (ObjContPaq != null)
|
||||
{
|
||||
ObjContPaq.Commit();
|
||||
}
|
||||
ObjVentas.Commit();
|
||||
Mensaje = "El Documento se canceló correctamente";
|
||||
}
|
||||
else
|
||||
{
|
||||
if (ObjContPaq != null)
|
||||
{
|
||||
ObjContPaq.RollBack();
|
||||
}
|
||||
ObjVentas.RollBack();
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
ObjVentas.RollBack();
|
||||
if (ObjContPaq != null)
|
||||
{
|
||||
ObjContPaq.RollBack();
|
||||
}
|
||||
Mensaje = "Ocurrió un error al cancelar la factura";
|
||||
this.OnError(Mensaje, ex);
|
||||
}
|
||||
finally
|
||||
{
|
||||
ObjVentas.Dispose();
|
||||
ObjEventos.Dispose();
|
||||
ObjConta.Dispose();
|
||||
if (ObjContPaq != null)
|
||||
{
|
||||
ObjContPaq.Dispose();
|
||||
}
|
||||
}
|
||||
return Mensaje;
|
||||
var factura = new Modelos.Factura(UsuarioActual, CveVenta, UsuarioActual.CveEmpresa);
|
||||
var retorno = factura.EjecutarCancelacionPendiente(CveEstatus, CancelacionFecha, CancelacionAcuse);
|
||||
return retorno;
|
||||
}
|
||||
|
||||
private int GenerarPolizaAC(ClsContPAQi ObjAC, int CveVenta, string Folio, int CveCliente, string TipoComprobante, DateTime Fecha, bool CancelacionIngreso = false)
|
||||
|
||||
@@ -7,9 +7,10 @@ Imports Microsoft.Reporting.WebForms
|
||||
Imports System.IO
|
||||
Imports System.IO.Compression
|
||||
Imports System.Net
|
||||
|
||||
Imports System.Net.Http
|
||||
|
||||
Partial Class RepVentaDetalle
|
||||
Inherits ClsPaginas
|
||||
Inherits ClsPaginas
|
||||
#Region "P R O P I E D A D E S"
|
||||
Private Property CveProyecto As Integer
|
||||
Get
|
||||
@@ -88,10 +89,10 @@ Partial Class RepVentaDetalle
|
||||
Set(value As DataTable)
|
||||
ViewState("DtColor") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
'pRivate ReadOnly Property ColumnasVisibles As
|
||||
'pRivate ReadOnly Property ColumnasVisibles As
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
If Not IsPostBack Then
|
||||
If UsuarioActual.CveEmpresa = 2 AndAlso UsuarioActual.CveUsuario.Contiene(77, 21) Then Response.Redirect("/Inicio.aspx")
|
||||
@@ -233,8 +234,8 @@ Partial Class RepVentaDetalle
|
||||
DdlVendedor.Enabled = False
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
End Sub
|
||||
|
||||
#Region "CARGA COMBOS"
|
||||
Private Sub CargaGrupo()
|
||||
DdlGrupo.Items.Insert(0, New ListItem("Año", "1"))
|
||||
@@ -386,9 +387,9 @@ Partial Class RepVentaDetalle
|
||||
DdlSubProyecto.DataSource = GlobalDTSubProyectos(DdlProyecto.SelectedValue.ToEntero, CveEmpresa:=UsuarioActual.CveEmpresa)
|
||||
DdlSubProyecto.DataBind()
|
||||
'DdlSubProyecto.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
End Sub
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "SELECTED INDEX CHANGE"
|
||||
Protected Sub DdlTipoComprobante_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
CargaEstatus()
|
||||
@@ -416,10 +417,10 @@ Partial Class RepVentaDetalle
|
||||
'DdlClientes.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa, -1).FiltraParametros($"CveClienteClasificacion = {DdlClienteClasificacion.SelectedValue.ToEntero} OR {DdlClienteClasificacion.SelectedValue.ToEntero} = -1")
|
||||
'DdlClientes.DataBind()
|
||||
'DdlClientes.ddl.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
End Sub
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "CONSULTAR"
|
||||
Protected Sub BtnConsultar_Click(sender As Object, e As System.EventArgs) Handles BtnConsultar.Click
|
||||
CargaDatos()
|
||||
@@ -470,12 +471,12 @@ Partial Class RepVentaDetalle
|
||||
ObjVentas.Dispose()
|
||||
GvDatos.DataBind()
|
||||
GvVsh.DataBind()
|
||||
End Sub
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "GRIDVIEW"
|
||||
|
||||
|
||||
Private Function AddRows(ByRef DT As DataTable) As DataTable
|
||||
Dim i As Integer = 0
|
||||
Dim Ultima As String = String.Empty
|
||||
@@ -589,11 +590,11 @@ Partial Class RepVentaDetalle
|
||||
e.Row.Cells(7).HorizontalAlign = HorizontalAlign.Right
|
||||
|
||||
End If
|
||||
End Sub
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "PERSONALIZAR COLUMNAS"
|
||||
|
||||
|
||||
Protected Sub BtnPersonalizar_Click(sender As Object, e As System.EventArgs) Handles BtnPersonalizar.Click
|
||||
|
||||
If ChkFolio.Checked Then
|
||||
@@ -777,10 +778,10 @@ Partial Class RepVentaDetalle
|
||||
ImgExcelPersonalizado.Visible = False
|
||||
End If
|
||||
UPDatos.Update()
|
||||
End Sub
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "IMPRESIONES"
|
||||
Protected Sub ImgExcel_Click(sender As Object, e As EventArgs) Handles ImgExcel.Click
|
||||
'GvDatos.ExportToExcel("DetalleVentas_" & Now.ToShortDateString)
|
||||
@@ -872,7 +873,28 @@ Partial Class RepVentaDetalle
|
||||
Response.AddHeader("content-Disposition", "attachment; filename=ReporteVentasPDF.zip")
|
||||
Response.ContentType = "application/zip"
|
||||
Response.End()
|
||||
End Sub
|
||||
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}", ClsPaginas.UrlSitio, 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}", 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 BtnDescargarXML_Click(sender As Object, e As EventArgs) Handles BtnDescargarXML.Click
|
||||
Dim pathXML As String
|
||||
@@ -972,132 +994,134 @@ Partial Class RepVentaDetalle
|
||||
GenerarPDF()
|
||||
End Sub
|
||||
|
||||
Private Sub GenerarFacturaVentaDEV(CveVenta As Integer)
|
||||
Dim ObjVentas As New ClsVentas
|
||||
Dim Vta As Modelos.Factura = Nothing
|
||||
|
||||
Dim TmpDTImpuestos = New DataTable
|
||||
TmpDTImpuestos.Columns.Add("ImpuestoLocal", GetType(String))
|
||||
TmpDTImpuestos.Columns.Add("Importe", GetType(Double))
|
||||
TmpDTImpuestos.Columns.Add("Orden", GetType(Integer))
|
||||
|
||||
If ObjVentas.GetVenta(CveVenta, UsuarioActual.CveEmpresa) AndAlso ObjVentas.DtResultados.Rows.Count > 0 Then
|
||||
Dim dtVentas As DataTable = ObjVentas.DtResultados
|
||||
|
||||
' se rellenan los campos de la factura
|
||||
Vta = ObjVentas.DtResultados.Rows(0).DataRowToObject(Of Modelos.Factura)
|
||||
|
||||
Vta.MonedaAbreviatura = dtVentas(0)("Abreviatura").ToString
|
||||
'se rellena la sucursal
|
||||
Vta.Cliente.Sucursal = ObjVentas.DtResultados.Rows(0).DataRowToObject(Of Modelos.SucursalModel).ToString
|
||||
Vta.Cliente = New Modelos.ClienteModel
|
||||
Vta.Cliente.Nombre = dtVentas(0)("ClienteNombre").ToString
|
||||
Vta.Cliente.Telefono = dtVentas(0)("Telefono").ToString
|
||||
Vta.Cliente.Direccion = dtVentas(0)("ClienteDireccion").ToString
|
||||
Vta.Cliente.CP = dtVentas(0)("CPCliente").ToString
|
||||
Vta.Cliente.Ciudad = dtVentas(0)("ClienteCiudad").ToString
|
||||
Vta.Cliente.Localidad = dtVentas(0)("ClienteLocalidad").ToString
|
||||
Vta.Cliente.Estado = dtVentas(0)("ClienteEstado").ToString
|
||||
Vta.Cliente.Pais = dtVentas(0)("ClientePais").ToString
|
||||
Vta.Cliente.RFC = dtVentas(0)("ClienteRFC").ToString
|
||||
Vta.Cliente.Colonia = dtVentas(0)("ColoniaCliente").ToString
|
||||
Vta.AtencionA = dtVentas(0)("AtencionA").ToString
|
||||
Vta.Cliente.NoExt = dtVentas(0)("ClienteNoExt").ToString
|
||||
Vta.Cliente.NoInt = dtVentas(0)("ClienteNoInt").ToString
|
||||
Vta.Cliente.Codigo = dtVentas(0)("ClienteCodigo").ToString
|
||||
Vta.Cliente.Mail = dtVentas(0)("Mail").ToString
|
||||
Vta.RefDocto = dtVentas(0)("Ref").ToString
|
||||
Vta.CveVenta = dtVentas(0)("CveVenta").ToString.ToEntero
|
||||
|
||||
|
||||
Vta.ClienteSucursal = New Modelos.SucursalModel
|
||||
Vta.ClienteSucursal.Direccion = dtVentas(0)("SucClienteDireccion").ToString
|
||||
Vta.ClienteSucursal.NoExt = dtVentas(0)("SucClienteNoExt").ToString
|
||||
Vta.ClienteSucursal.NoInt = dtVentas(0)("SucClienteNoInt").ToString
|
||||
Vta.ClienteSucursal.Colonia = dtVentas(0)("SucClienteColonia").ToString
|
||||
Vta.ClienteSucursal.CP = dtVentas(0)("SucClienteCP").ToString
|
||||
Vta.ClienteSucursal.Municipio = dtVentas(0)("SucClienteCiudad").ToString
|
||||
Vta.ClienteSucursal.Estado = dtVentas(0)("SucClienteEstado").ToString
|
||||
Vta.ClienteSucursal.Pais = dtVentas(0)("SucClientePais").ToString
|
||||
Vta.ClienteSucursal.Localidad = dtVentas(0)("SucClienteLocalidad").ToString
|
||||
Vta.ClienteSucursal.CorreoSucursal = dtVentas(0)("SucClienteCorreo").ToString
|
||||
Vta.ClienteSucursal.TelefonoSucursal = dtVentas(0)("SucClienteTelefono").ToString
|
||||
Vta.ClienteSucursal.Sucursal = dtVentas(0)("SucursalCliente").ToString
|
||||
|
||||
Vta.EnviarA = New Modelos.EnviarAModel
|
||||
Vta.EnviarA.CveDireccionEnvio = dtVentas(0)("CveDireccionEnvio").ToString.ToEntero
|
||||
Vta.EnviarA.EnvioDireccion = dtVentas(0)("EnvioDireccion").ToString
|
||||
Vta.EnviarA.EnvioColonia = dtVentas(0)("EnvioColonia").ToString
|
||||
Vta.EnviarA.EnvioCiudad = dtVentas(0)("EnvioCiudad").ToString
|
||||
Vta.EnviarA.EnvioEstado = dtVentas(0)("EnvioEstado").ToString
|
||||
Vta.EnviarA.EnvioCP = dtVentas(0)("EnvioCP").ToString
|
||||
|
||||
Dim DR As DataRow = TmpDTImpuestos.NewRow()
|
||||
If UsuarioActual.CveEmpresa.Contiene(1, 5, 15, 17, 72, 66, 79, 81, 109, 110, 111, 76) Then
|
||||
If dtVentas(0)("SubTotal").ToString.ToDouble <> 0 Then DR("ImpuestoLocal") = "Subtotal" : DR("Importe") = dtVentas(0)("SubTotal").ToString.ToDouble : DR("Orden") = 10 : TmpDTImpuestos.Rows.Add(DR)
|
||||
DR = TmpDTImpuestos.NewRow()
|
||||
If dtVentas(0)("Descuento").ToString.ToDouble <> 0 Then DR("ImpuestoLocal") = "Descuentos" : DR("Importe") = dtVentas(0)("Descuento").ToString.ToDouble : DR("Orden") = 20 : TmpDTImpuestos.Rows.Add(DR)
|
||||
DR = TmpDTImpuestos.NewRow()
|
||||
If dtVentas(0)("Amortizacion").ToString.ToDouble <> 0 Then DR("ImpuestoLocal") = "Amort.Ant" : DR("Importe") = dtVentas(0)("Amortizacion").ToString.ToDouble : DR("Orden") = 30 : TmpDTImpuestos.Rows.Add(DR)
|
||||
DR = TmpDTImpuestos.NewRow()
|
||||
If dtVentas(0)("SubTotal").ToString.ToDouble <> (dtVentas(0)("SubTotal").ToString.ToDouble - dtVentas(0)("Descuento").ToString.ToDouble - dtVentas(0)("Amortizacion").ToString.ToDouble) Then DR("ImpuestoLocal") = "SubTotal2" : DR("Importe") = (dtVentas(0)("SubTotal").ToString.ToDouble - dtVentas(0)("Descuento").ToString.ToDouble - dtVentas(0)("Amortizacion").ToString.ToDouble) : DR("Orden") = 40 : TmpDTImpuestos.Rows.Add(DR)
|
||||
DR = TmpDTImpuestos.NewRow()
|
||||
If dtVentas(0)("IVA").ToString.ToDouble <> 0 Then DR("ImpuestoLocal") = "IVA" : DR("Importe") = dtVentas(0)("IVA").ToString.ToDouble : DR("Orden") = 50 : TmpDTImpuestos.Rows.Add(DR)
|
||||
|
||||
'solo para eclipse, que muesre un subtotal debajo de IVA
|
||||
If UsuarioActual.CveEmpresa = 15 Then DR = TmpDTImpuestos.NewRow() : DR("ImpuestoLocal") = "Subtotal2" : DR("Importe") = (dtVentas(0)("SubTotal").ToString.ToDouble - dtVentas(0)("Descuento").ToString.ToDouble - dtVentas(0)("Amortizacion").ToString.ToDouble) + dtVentas(0)("IVA").ToString.ToDouble : DR("Orden") = 51 : TmpDTImpuestos.Rows.Add(DR)
|
||||
DR = TmpDTImpuestos.NewRow()
|
||||
If dtVentas(0)("RetIVA").ToString.ToDouble <> 0 Then DR("ImpuestoLocal") = "Ret.IVA" : DR("Importe") = dtVentas(0)("RetIVA").ToString.ToDouble : DR("Orden") = 60 : TmpDTImpuestos.Rows.Add(DR)
|
||||
DR = TmpDTImpuestos.NewRow()
|
||||
If dtVentas(0)("RetISR").ToString.ToDouble <> 0 Then DR("ImpuestoLocal") = "Ret.ISR" : DR("Importe") = dtVentas(0)("RetISR").ToString.ToDouble : DR("Orden") = 70 : TmpDTImpuestos.Rows.Add(DR)
|
||||
DR = TmpDTImpuestos.NewRow()
|
||||
If dtVentas(0)("Total").ToString.ToDouble <> 0 Then DR("ImpuestoLocal") = "Total" : DR("Importe") = dtVentas(0)("Total").ToString.ToDouble : DR("Orden") = 1000 : TmpDTImpuestos.Rows.Add(DR)
|
||||
DR = TmpDTImpuestos.NewRow()
|
||||
End If
|
||||
|
||||
If ObjVentas.GetVentaDetalle(CveVenta) Then 'Obtenemos el Detalle de la Oorden de Compra
|
||||
Vta.DtDetalle = ObjVentas.DtResultados
|
||||
End If
|
||||
|
||||
If ObjVentas.GetVentaImpuestosLocales(CveVenta) Then
|
||||
If UsuarioActual.CveEmpresa.Contiene(1, 5, 15, 17, 72, 66, 79, 81, 109, 110, 111, 76) Then
|
||||
Dim dtImpuesto As DataTable = ObjVentas.DtResultados
|
||||
If dtImpuesto.Rows.Count > 0 Then
|
||||
For Each Row As DataRow In dtImpuesto.Rows
|
||||
Dim Orden = 80
|
||||
If Row("Importe").ToString.ToDouble <> 0 Then
|
||||
DR("ImpuestoLocal") = Row("ImpuestoLocal").ToString
|
||||
DR("Importe") = Row("Importe").ToString.ToDouble
|
||||
DR("Orden") = Orden
|
||||
TmpDTImpuestos.Rows.Add(DR)
|
||||
DR = TmpDTImpuestos.NewRow()
|
||||
Orden = Orden + 1
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
Vta.DtDeduccion = TmpDTImpuestos.FiltraParametros("", Orderby:="Orden ASC")
|
||||
Else
|
||||
Vta.DtDeduccion = ObjVentas.DtResultados
|
||||
End If
|
||||
End If
|
||||
|
||||
If ObjVentas.GetVentasFirmas(CveVenta) Then
|
||||
Vta.DtFirmas = ObjVentas.DtResultados
|
||||
End If
|
||||
End If
|
||||
ObjVentas.Dispose()
|
||||
|
||||
If Not IsNothing(Vta) Then
|
||||
PdfFactura(Vta)
|
||||
Vta = Nothing
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub GenerarFacturaVentaDEV(CveVenta As Integer)
|
||||
|
||||
DescargarFactura(CveVenta, UsuarioActual.CveEmpresa)
|
||||
'Dim ObjVentas As New ClsVentas
|
||||
'Dim Vta As Modelos.Factura = Nothing
|
||||
|
||||
'Dim TmpDTImpuestos = New DataTable
|
||||
'TmpDTImpuestos.Columns.Add("ImpuestoLocal", GetType(String))
|
||||
'TmpDTImpuestos.Columns.Add("Importe", GetType(Double))
|
||||
'TmpDTImpuestos.Columns.Add("Orden", GetType(Integer))
|
||||
|
||||
'If ObjVentas.GetVenta(CveVenta, UsuarioActual.CveEmpresa) AndAlso ObjVentas.DtResultados.Rows.Count > 0 Then
|
||||
' Dim dtVentas As DataTable = ObjVentas.DtResultados
|
||||
|
||||
' ' se rellenan los campos de la factura
|
||||
' Vta = New Modelos.Factura(UsuarioActual, CveVenta, UsuarioActual.CveEmpresa, Server.MapPath("/"))
|
||||
|
||||
' Vta.MonedaAbreviatura = dtVentas(0)("Abreviatura").ToString
|
||||
' 'se rellena la sucursal
|
||||
' Vta.Cliente.Sucursal = New Modelos.ClienteModel(dtVentas(0)("CveCliente").ToString.ToEntero, UsuarioActual.CveEmpresa)
|
||||
' Vta.Cliente = New Modelos.ClienteModel
|
||||
' Vta.Cliente.Nombre = dtVentas(0)("ClienteNombre").ToString
|
||||
' Vta.Cliente.Telefono = dtVentas(0)("Telefono").ToString
|
||||
' Vta.Cliente.Direccion = dtVentas(0)("ClienteDireccion").ToString
|
||||
' Vta.Cliente.CP = dtVentas(0)("CPCliente").ToString
|
||||
' Vta.Cliente.Ciudad = dtVentas(0)("ClienteCiudad").ToString
|
||||
' Vta.Cliente.Localidad = dtVentas(0)("ClienteLocalidad").ToString
|
||||
' Vta.Cliente.Estado = dtVentas(0)("ClienteEstado").ToString
|
||||
' Vta.Cliente.Pais = dtVentas(0)("ClientePais").ToString
|
||||
' Vta.Cliente.RFC = dtVentas(0)("ClienteRFC").ToString
|
||||
' Vta.Cliente.Colonia = dtVentas(0)("ColoniaCliente").ToString
|
||||
' Vta.AtencionA = dtVentas(0)("AtencionA").ToString
|
||||
' Vta.Cliente.NoExt = dtVentas(0)("ClienteNoExt").ToString
|
||||
' Vta.Cliente.NoInt = dtVentas(0)("ClienteNoInt").ToString
|
||||
' Vta.Cliente.Codigo = dtVentas(0)("ClienteCodigo").ToString
|
||||
' Vta.Cliente.Mail = dtVentas(0)("Mail").ToString
|
||||
' Vta.RefDocto = dtVentas(0)("Ref").ToString
|
||||
' Vta.CveVenta = dtVentas(0)("CveVenta").ToString.ToEntero
|
||||
|
||||
|
||||
' Vta.ClienteSucursal = New Modelos.SucursalModel
|
||||
' Vta.ClienteSucursal.Direccion = dtVentas(0)("SucClienteDireccion").ToString
|
||||
' Vta.ClienteSucursal.NoExt = dtVentas(0)("SucClienteNoExt").ToString
|
||||
' Vta.ClienteSucursal.NoInt = dtVentas(0)("SucClienteNoInt").ToString
|
||||
' Vta.ClienteSucursal.Colonia = dtVentas(0)("SucClienteColonia").ToString
|
||||
' Vta.ClienteSucursal.CP = dtVentas(0)("SucClienteCP").ToString
|
||||
' Vta.ClienteSucursal.Municipio = dtVentas(0)("SucClienteCiudad").ToString
|
||||
' Vta.ClienteSucursal.Estado = dtVentas(0)("SucClienteEstado").ToString
|
||||
' Vta.ClienteSucursal.Pais = dtVentas(0)("SucClientePais").ToString
|
||||
' Vta.ClienteSucursal.Localidad = dtVentas(0)("SucClienteLocalidad").ToString
|
||||
' Vta.ClienteSucursal.CorreoSucursal = dtVentas(0)("SucClienteCorreo").ToString
|
||||
' Vta.ClienteSucursal.TelefonoSucursal = dtVentas(0)("SucClienteTelefono").ToString
|
||||
' Vta.ClienteSucursal.Sucursal = dtVentas(0)("SucursalCliente").ToString
|
||||
|
||||
' Vta.EnviarA = New Modelos.EnviarAModel
|
||||
' Vta.EnviarA.CveDireccionEnvio = dtVentas(0)("CveDireccionEnvio").ToString.ToEntero
|
||||
' Vta.EnviarA.EnvioDireccion = dtVentas(0)("EnvioDireccion").ToString
|
||||
' Vta.EnviarA.EnvioColonia = dtVentas(0)("EnvioColonia").ToString
|
||||
' Vta.EnviarA.EnvioCiudad = dtVentas(0)("EnvioCiudad").ToString
|
||||
' Vta.EnviarA.EnvioEstado = dtVentas(0)("EnvioEstado").ToString
|
||||
' Vta.EnviarA.EnvioCP = dtVentas(0)("EnvioCP").ToString
|
||||
|
||||
' Dim DR As DataRow = TmpDTImpuestos.NewRow()
|
||||
' If UsuarioActual.CveEmpresa.Contiene(1, 5, 15, 17, 72, 66, 79, 81, 109, 110, 111, 76) Then
|
||||
' If dtVentas(0)("SubTotal").ToString.ToDouble <> 0 Then DR("ImpuestoLocal") = "Subtotal" : DR("Importe") = dtVentas(0)("SubTotal").ToString.ToDouble : DR("Orden") = 10 : TmpDTImpuestos.Rows.Add(DR)
|
||||
' DR = TmpDTImpuestos.NewRow()
|
||||
' If dtVentas(0)("Descuento").ToString.ToDouble <> 0 Then DR("ImpuestoLocal") = "Descuentos" : DR("Importe") = dtVentas(0)("Descuento").ToString.ToDouble : DR("Orden") = 20 : TmpDTImpuestos.Rows.Add(DR)
|
||||
' DR = TmpDTImpuestos.NewRow()
|
||||
' If dtVentas(0)("Amortizacion").ToString.ToDouble <> 0 Then DR("ImpuestoLocal") = "Amort.Ant" : DR("Importe") = dtVentas(0)("Amortizacion").ToString.ToDouble : DR("Orden") = 30 : TmpDTImpuestos.Rows.Add(DR)
|
||||
' DR = TmpDTImpuestos.NewRow()
|
||||
' If dtVentas(0)("SubTotal").ToString.ToDouble <> (dtVentas(0)("SubTotal").ToString.ToDouble - dtVentas(0)("Descuento").ToString.ToDouble - dtVentas(0)("Amortizacion").ToString.ToDouble) Then DR("ImpuestoLocal") = "SubTotal2" : DR("Importe") = (dtVentas(0)("SubTotal").ToString.ToDouble - dtVentas(0)("Descuento").ToString.ToDouble - dtVentas(0)("Amortizacion").ToString.ToDouble) : DR("Orden") = 40 : TmpDTImpuestos.Rows.Add(DR)
|
||||
' DR = TmpDTImpuestos.NewRow()
|
||||
' If dtVentas(0)("IVA").ToString.ToDouble <> 0 Then DR("ImpuestoLocal") = "IVA" : DR("Importe") = dtVentas(0)("IVA").ToString.ToDouble : DR("Orden") = 50 : TmpDTImpuestos.Rows.Add(DR)
|
||||
|
||||
' 'solo para eclipse, que muesre un subtotal debajo de IVA
|
||||
' If UsuarioActual.CveEmpresa = 15 Then DR = TmpDTImpuestos.NewRow() : DR("ImpuestoLocal") = "Subtotal2" : DR("Importe") = (dtVentas(0)("SubTotal").ToString.ToDouble - dtVentas(0)("Descuento").ToString.ToDouble - dtVentas(0)("Amortizacion").ToString.ToDouble) + dtVentas(0)("IVA").ToString.ToDouble : DR("Orden") = 51 : TmpDTImpuestos.Rows.Add(DR)
|
||||
' DR = TmpDTImpuestos.NewRow()
|
||||
' If dtVentas(0)("RetIVA").ToString.ToDouble <> 0 Then DR("ImpuestoLocal") = "Ret.IVA" : DR("Importe") = dtVentas(0)("RetIVA").ToString.ToDouble : DR("Orden") = 60 : TmpDTImpuestos.Rows.Add(DR)
|
||||
' DR = TmpDTImpuestos.NewRow()
|
||||
' If dtVentas(0)("RetISR").ToString.ToDouble <> 0 Then DR("ImpuestoLocal") = "Ret.ISR" : DR("Importe") = dtVentas(0)("RetISR").ToString.ToDouble : DR("Orden") = 70 : TmpDTImpuestos.Rows.Add(DR)
|
||||
' DR = TmpDTImpuestos.NewRow()
|
||||
' If dtVentas(0)("Total").ToString.ToDouble <> 0 Then DR("ImpuestoLocal") = "Total" : DR("Importe") = dtVentas(0)("Total").ToString.ToDouble : DR("Orden") = 1000 : TmpDTImpuestos.Rows.Add(DR)
|
||||
' DR = TmpDTImpuestos.NewRow()
|
||||
' End If
|
||||
|
||||
' If ObjVentas.GetVentaDetalle(CveVenta) Then 'Obtenemos el Detalle de la Oorden de Compra
|
||||
' Vta.DtDetalle = ObjVentas.DtResultados
|
||||
' End If
|
||||
|
||||
' If ObjVentas.GetVentaImpuestosLocales(CveVenta) Then
|
||||
' If UsuarioActual.CveEmpresa.Contiene(1, 5, 15, 17, 72, 66, 79, 81, 109, 110, 111, 76) Then
|
||||
' Dim dtImpuesto As DataTable = ObjVentas.DtResultados
|
||||
' If dtImpuesto.Rows.Count > 0 Then
|
||||
' For Each Row As DataRow In dtImpuesto.Rows
|
||||
' Dim Orden = 80
|
||||
' If Row("Importe").ToString.ToDouble <> 0 Then
|
||||
' DR("ImpuestoLocal") = Row("ImpuestoLocal").ToString
|
||||
' DR("Importe") = Row("Importe").ToString.ToDouble
|
||||
' DR("Orden") = Orden
|
||||
' TmpDTImpuestos.Rows.Add(DR)
|
||||
' DR = TmpDTImpuestos.NewRow()
|
||||
' Orden = Orden + 1
|
||||
' End If
|
||||
' Next
|
||||
' End If
|
||||
' Vta.DtDeduccion = TmpDTImpuestos.FiltraParametros("", Orderby:="Orden ASC")
|
||||
' Else
|
||||
' Vta.DtDeduccion = ObjVentas.DtResultados
|
||||
' End If
|
||||
' End If
|
||||
|
||||
' If ObjVentas.GetVentasFirmas(CveVenta) Then
|
||||
' Vta.DtFirmas = ObjVentas.DtResultados
|
||||
' End If
|
||||
'End If
|
||||
'ObjVentas.Dispose()
|
||||
|
||||
'If Not IsNothing(Vta) Then
|
||||
' PdfFactura(Vta)
|
||||
' Vta = Nothing
|
||||
'End If
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "GRAFICA"
|
||||
|
||||
|
||||
Private Sub CreaDataTableColor()
|
||||
DtColor = New DataTable
|
||||
DtColor.Columns.Add("Color")
|
||||
@@ -1228,9 +1252,9 @@ Partial Class RepVentaDetalle
|
||||
|
||||
Protected Sub DdlVer_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
CambioGrafica()
|
||||
End Sub
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
|
||||
End Class
|
||||
|
||||
45
localhost.sln
Normal file
@@ -0,0 +1,45 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 15
|
||||
VisualStudioVersion = 15.0.27703.2035
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{E24C65DC-7377-472B-9ABA-BC803B73C61A}") = "http://localhost", "http://localhost", "{82D0C8D1-3CF5-471D-92AF-71A9AE4B4335}"
|
||||
ProjectSection(WebsiteProperties) = preProject
|
||||
SccProjectName = ""$/localhost", CAAAAAAA"
|
||||
SccAuxPath = ""
|
||||
SccLocalPath = "."
|
||||
SccProvider = "MSSCCI:Microsoft Visual SourceSafe"
|
||||
UseIISExpress = "false"
|
||||
TargetFrameworkMoniker = ".NETFramework,Version%3Dv4.6"
|
||||
Debug.AspNetCompiler.VirtualPath = "/localhost"
|
||||
Debug.AspNetCompiler.PhysicalPath = "..\..\..\..\..\inetpub\SIGIT\"
|
||||
Debug.AspNetCompiler.TargetPath = "PrecompiledWeb\localhost\"
|
||||
Debug.AspNetCompiler.Updateable = "true"
|
||||
Debug.AspNetCompiler.ForceOverwrite = "true"
|
||||
Debug.AspNetCompiler.FixedNames = "false"
|
||||
Debug.AspNetCompiler.Debug = "True"
|
||||
Release.AspNetCompiler.VirtualPath = "/localhost"
|
||||
Release.AspNetCompiler.PhysicalPath = "..\..\..\..\..\inetpub\SIGIT\"
|
||||
Release.AspNetCompiler.TargetPath = "PrecompiledWeb\localhost\"
|
||||
Release.AspNetCompiler.Updateable = "true"
|
||||
Release.AspNetCompiler.ForceOverwrite = "true"
|
||||
Release.AspNetCompiler.FixedNames = "false"
|
||||
Release.AspNetCompiler.Debug = "False"
|
||||
SlnRelativePath = "..\..\..\..\..\inetpub\SIGIT\"
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{82D0C8D1-3CF5-471D-92AF-71A9AE4B4335}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{82D0C8D1-3CF5-471D-92AF-71A9AE4B4335}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {B4590109-7BF9-411C-A1AE-792C02707CE6}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
BIN
packages/AjaxControlToolkit.15.1.4.0/.signature.p7s
vendored
Normal file
BIN
packages/AjaxControlToolkit.15.1.4.0/AjaxControlToolkit.15.1.4.0.nupkg
vendored
Normal file
10
packages/AjaxControlToolkit.15.1.4.0/Content/Web.config.transform
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<system.web>
|
||||
<pages>
|
||||
<controls>
|
||||
<add tagPrefix="ajaxToolkit" assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" />
|
||||
</controls>
|
||||
</pages>
|
||||
</system.web>
|
||||
</configuration>
|
||||
BIN
packages/AjaxControlToolkit.15.1.4.0/lib/net40/AjaxControlToolkit.dll
vendored
Normal file
BIN
packages/AjaxControlToolkit.15.1.4.0/readme.txt
vendored
Normal file
BIN
packages/AjaxControlToolkit.StaticResources.15.1.4.0/.signature.p7s
vendored
Normal file
|
After Width: | Height: | Size: 1.9 KiB |
|
After Width: | Height: | Size: 113 KiB |
|
After Width: | Height: | Size: 215 KiB |
|
After Width: | Height: | Size: 43 KiB |
|
After Width: | Height: | Size: 47 KiB |
|
After Width: | Height: | Size: 73 B |
|
After Width: | Height: | Size: 73 B |
|
After Width: | Height: | Size: 49 B |
|
After Width: | Height: | Size: 827 B |
|
After Width: | Height: | Size: 16 KiB |
|
After Width: | Height: | Size: 25 KiB |
|
After Width: | Height: | Size: 26 KiB |
|
After Width: | Height: | Size: 26 KiB |
|
After Width: | Height: | Size: 26 KiB |
|
After Width: | Height: | Size: 67 B |
|
After Width: | Height: | Size: 43 B |
|
After Width: | Height: | Size: 687 B |
|
After Width: | Height: | Size: 262 B |
|
After Width: | Height: | Size: 460 B |
|
After Width: | Height: | Size: 361 B |
|
After Width: | Height: | Size: 686 B |
|
After Width: | Height: | Size: 259 B |
|
After Width: | Height: | Size: 476 B |
|
After Width: | Height: | Size: 374 B |
|
After Width: | Height: | Size: 686 B |
|
After Width: | Height: | Size: 262 B |
|
After Width: | Height: | Size: 359 B |
|
After Width: | Height: | Size: 432 B |
|
After Width: | Height: | Size: 363 B |
|
After Width: | Height: | Size: 536 B |
|
After Width: | Height: | Size: 473 B |
|
After Width: | Height: | Size: 736 B |
|
After Width: | Height: | Size: 389 B |
|
After Width: | Height: | Size: 523 B |
|
After Width: | Height: | Size: 425 B |
|
After Width: | Height: | Size: 507 B |
|
After Width: | Height: | Size: 227 B |
|
After Width: | Height: | Size: 749 B |
|
After Width: | Height: | Size: 409 B |
|
After Width: | Height: | Size: 520 B |
|
After Width: | Height: | Size: 398 B |
|
After Width: | Height: | Size: 313 B |
|
After Width: | Height: | Size: 402 B |
|
After Width: | Height: | Size: 157 B |
|
After Width: | Height: | Size: 748 B |
|
After Width: | Height: | Size: 400 B |
|
After Width: | Height: | Size: 745 B |
|
After Width: | Height: | Size: 387 B |
|
After Width: | Height: | Size: 759 B |
|
After Width: | Height: | Size: 407 B |
|
After Width: | Height: | Size: 507 B |
|
After Width: | Height: | Size: 292 B |
|
After Width: | Height: | Size: 753 B |
|
After Width: | Height: | Size: 402 B |
|
After Width: | Height: | Size: 736 B |
|
After Width: | Height: | Size: 397 B |
|
After Width: | Height: | Size: 745 B |