This commit is contained in:
janeth arvizu
2019-08-19 11:05:58 -07:00
20 changed files with 1156 additions and 1294 deletions

539
.gitignore vendored
View File

@@ -1,270 +1,269 @@
## Ignore Visual Studio temporary files, build results, and ## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons. ## files generated by popular Visual Studio add-ons.
web.config web.config
Log.txt Log.txt
LogMail.txt LogMail.txt
LogPenske.txt LogPenske.txt
LogTimbrado.txt LogTimbrado.txt
[Mm]enu/ [Mm]enu/
[Tt]emp/ [Tt]emp/
[Ee]mpresas/ [Ee]mpresas/
# User-specific files # User-specific files
*.suo *.suo
*.user *.user
*.userosscache *.userosscache
*.sln.docstates *.sln.docstates
# User-specific files (MonoDevelop/Xamarin Studio) # User-specific files (MonoDevelop/Xamarin Studio)
*.userprefs *.userprefs
# Build results # Build results
[Dd]ebug/ [Dd]ebug/
[Dd]ebugPublic/ [Dd]ebugPublic/
[Rr]elease/ [Rr]elease/
[Rr]eleases/ [Rr]eleases/
x64/ x64/
x86/ x86/
bld/ bld/
[Bb]in/ [Bb]in/
[Oo]bj/ [Oo]bj/
[Ll]og/ [Ll]og/
# Visual Studio 2015 cache/options directory # Visual Studio 2015 cache/options directory
.vs/ .vs/
# Uncomment if you have tasks that create the project's static files in wwwroot # Uncomment if you have tasks that create the project's static files in wwwroot
#wwwroot/ #wwwroot/
# MSTest test Results # MSTest test Results
[Tt]est[Rr]esult*/ [Tt]est[Rr]esult*/
[Bb]uild[Ll]og.* [Bb]uild[Ll]og.*
# NUNIT # NUNIT
*.VisualState.xml *.VisualState.xml
TestResult.xml TestResult.xml
# Build Results of an ATL Project # Build Results of an ATL Project
[Dd]ebugPS/ [Dd]ebugPS/
[Rr]eleasePS/ [Rr]eleasePS/
dlldata.c dlldata.c
# DNX # DNX
project.lock.json project.lock.json
project.fragment.lock.json project.fragment.lock.json
artifacts/ artifacts/
*_i.c *_i.c
*_p.c *_p.c
*_i.h *_i.h
*.ilk *.ilk
*.meta *.meta
*.obj *.obj
*.pch *.pch
*.pdb *.pdb
*.pgc *.pgc
*.pgd *.pgd
*.rsp *.rsp
*.sbr *.sbr
*.tlb *.tlb
*.tli *.tli
*.tlh *.tlh
*.tmp *.tmp
*.tmp_proj *.tmp_proj
*.log *.log
*.vspscc *.vspscc
*.vssscc *.vssscc
.builds .builds
*.pidb *.pidb
*.svclog *.svclog
*.scc *.scc
# Chutzpah Test files # Chutzpah Test files
_Chutzpah* _Chutzpah*
# Visual C++ cache files # Visual C++ cache files
ipch/ ipch/
*.aps *.aps
*.ncb *.ncb
*.opendb *.opendb
*.opensdf *.opensdf
*.sdf *.sdf
*.cachefile *.cachefile
*.VC.db *.VC.db
*.VC.VC.opendb *.VC.VC.opendb
# Visual Studio profiler # Visual Studio profiler
*.psess *.psess
*.vsp *.vsp
*.vspx *.vspx
*.sap *.sap
# TFS 2012 Local Workspace # TFS 2012 Local Workspace
$tf/ $tf/
# Guidance Automation Toolkit # Guidance Automation Toolkit
*.gpState *.gpState
# ReSharper is a .NET coding add-in # ReSharper is a .NET coding add-in
_ReSharper*/ _ReSharper*/
*.[Rr]e[Ss]harper *.[Rr]e[Ss]harper
*.DotSettings.user *.DotSettings.user
# JustCode is a .NET coding add-in # JustCode is a .NET coding add-in
.JustCode .JustCode
# TeamCity is a build add-in # TeamCity is a build add-in
_TeamCity* _TeamCity*
# DotCover is a Code Coverage Tool # DotCover is a Code Coverage Tool
*.dotCover *.dotCover
# NCrunch # NCrunch
_NCrunch_* _NCrunch_*
.*crunch*.local.xml .*crunch*.local.xml
nCrunchTemp_* nCrunchTemp_*
# MightyMoose # MightyMoose
*.mm.* *.mm.*
AutoTest.Net/ AutoTest.Net/
# Web workbench (sass) # Web workbench (sass)
.sass-cache/ .sass-cache/
# Installshield output folder # Installshield output folder
[Ee]xpress/ [Ee]xpress/
# DocProject is a documentation generator add-in # DocProject is a documentation generator add-in
DocProject/buildhelp/ DocProject/buildhelp/
DocProject/Help/*.HxT DocProject/Help/*.HxT
DocProject/Help/*.HxC DocProject/Help/*.HxC
DocProject/Help/*.hhc DocProject/Help/*.hhc
DocProject/Help/*.hhk DocProject/Help/*.hhk
DocProject/Help/*.hhp DocProject/Help/*.hhp
DocProject/Help/Html2 DocProject/Help/Html2
DocProject/Help/html DocProject/Help/html
# Click-Once directory # Click-Once directory
publish/ publish/
# Publish Web Output # Publish Web Output
*.[Pp]ublish.xml *.[Pp]ublish.xml
*.azurePubxml *.azurePubxml
# TODO: Comment the next line if you want to checkin your web deploy settings # TODO: Comment the next line if you want to checkin your web deploy settings
# but database connection strings (with potential passwords) will be unencrypted # but database connection strings (with potential passwords) will be unencrypted
#*.pubxml #*.pubxml
*.publishproj *.publishproj
# Microsoft Azure Web App publish settings. Comment the next line if you want to # 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 # checkin your Azure Web App publish settings, but sensitive information contained
# in these scripts will be unencrypted # in these scripts will be unencrypted
PublishScripts/ PublishScripts/
# NuGet Packages # NuGet Packages
*.nupkg *.nupkg
# The packages folder can be ignored because of Package Restore # The packages folder can be ignored because of Package Restore
**/packages/* **/packages/*
# except build/, which is used as an MSBuild target. # except build/, which is used as an MSBuild target.
!**/packages/build/ !**/packages/build/
# Uncomment if necessary however generally it will be regenerated when needed # Uncomment if necessary however generally it will be regenerated when needed
#!**/packages/repositories.config #!**/packages/repositories.config
# NuGet v3's project.json files produces more ignoreable files # NuGet v3's project.json files produces more ignoreable files
*.nuget.props *.nuget.props
*.nuget.targets *.nuget.targets
# Microsoft Azure Build Output # Microsoft Azure Build Output
csx/ csx/
*.build.csdef *.build.csdef
# Microsoft Azure Emulator # Microsoft Azure Emulator
ecf/ ecf/
rcf/ rcf/
# Windows Store app package directories and files # Windows Store app package directories and files
AppPackages/ AppPackages/
BundleArtifacts/ BundleArtifacts/
Package.StoreAssociation.xml Package.StoreAssociation.xml
_pkginfo.txt _pkginfo.txt
# Visual Studio cache files # Visual Studio cache files
# files ending in .cache can be ignored # files ending in .cache can be ignored
*.[Cc]ache *.[Cc]ache
# but keep track of directories ending in .cache # but keep track of directories ending in .cache
!*.[Cc]ache/ !*.[Cc]ache/
# Others # Others
ClientBin/ ClientBin/
~$* ~$*
*~ *~
*.dbmdl *.dbmdl
*.dbproj.schemaview *.dbproj.schemaview
*.jfm *.jfm
*.pfx *.pfx
*.publishsettings *.publishsettings
node_modules/ node_modules/
orleans.codegen.cs orleans.codegen.cs
# Since there are multiple workflows, uncomment next line to ignore bower_components # Since there are multiple workflows, uncomment next line to ignore bower_components
# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
#bower_components/ #bower_components/
# RIA/Silverlight projects # RIA/Silverlight projects
Generated_Code/ Generated_Code/
# Backup & report files from converting an old project file # Backup & report files from converting an old project file
# to a newer Visual Studio version. Backup files are not needed, # to a newer Visual Studio version. Backup files are not needed,
# because we have git ;-) # because we have git ;-)
_UpgradeReport_Files/ _UpgradeReport_Files/
Backup*/ Backup*/
UpgradeLog*.XML UpgradeLog*.XML
UpgradeLog*.htm UpgradeLog*.htm
# SQL Server files # SQL Server files
*.mdf *.mdf
*.ldf *.ldf
# Business Intelligence projects # Business Intelligence projects
*.rdl.data *.rdl.data
*.bim.layout *.bim.layout
*.bim_*.settings *.bim_*.settings
# Microsoft Fakes # Microsoft Fakes
FakesAssemblies/ FakesAssemblies/
# GhostDoc plugin setting file # GhostDoc plugin setting file
*.GhostDoc.xml *.GhostDoc.xml
# Node.js Tools for Visual Studio # Node.js Tools for Visual Studio
.ntvs_analysis.dat .ntvs_analysis.dat
# Visual Studio 6 build log # Visual Studio 6 build log
*.plg *.plg
# Visual Studio 6 workspace options file # Visual Studio 6 workspace options file
*.opt *.opt
# Visual Studio LightSwitch build output # Visual Studio LightSwitch build output
**/*.HTMLClient/GeneratedArtifacts **/*.HTMLClient/GeneratedArtifacts
**/*.DesktopClient/GeneratedArtifacts **/*.DesktopClient/GeneratedArtifacts
**/*.DesktopClient/ModelManifest.xml **/*.DesktopClient/ModelManifest.xml
**/*.Server/GeneratedArtifacts **/*.Server/GeneratedArtifacts
**/*.Server/ModelManifest.xml **/*.Server/ModelManifest.xml
_Pvt_Extensions _Pvt_Extensions
# Paket dependency manager # Paket dependency manager
.paket/paket.exe .paket/paket.exe
paket-files/ paket-files/
# FAKE - F# Make # FAKE - F# Make
.fake/ .fake/
# JetBrains Rider # JetBrains Rider
.idea/ .idea/
*.sln.iml *.sln.iml
*.sln.iml
# CodeRush
# CodeRush .cr/
.cr/
# Python Tools for Visual Studio (PTVS)
# Python Tools for Visual Studio (PTVS) __pycache__/
__pycache__/ *.pyc
*.pyc /Utilerias
/SIGGIT.sln

View File

@@ -1618,7 +1618,7 @@ Public Class ClsCompras
#Region "F A C T U R A S " #Region "F A C T U R A S "
Public Function GetFacturas(CveFactura As Integer, Folio As String, FechaFacturaI As Date, FechaFacturaF As Date, RFC As String, Proveedor As String, FueValidado As Integer, CveResponsable As Integer, CveProveedorClasificacion As Integer, CveTipoProveedor As Integer, CveEmpresa As Integer) As Boolean Public Function GetFacturas(CveFactura As Integer, Folio As String, FechaFacturaI As Date, FechaFacturaF As Date, RFC As String, Proveedor As String, FueValidado As Integer, CveResponsable As Integer, CveProveedorClasificacion As Integer, CveTipoProveedor As Integer, TipoComprobante As String, CveEmpresa As Integer) As Boolean
Dim OnError As Boolean = False Dim OnError As Boolean = False
'StrSQL.Clear() 'StrSQL.Clear()
@@ -1653,6 +1653,7 @@ Public Class ClsCompras
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@CveProveedorClasificacion", SqlDbType.Int).Value = CveProveedorClasificacion .Add("@CveProveedorClasificacion", SqlDbType.Int).Value = CveProveedorClasificacion
.Add("@CveTipoProveedor", SqlDbType.Int).Value = CveTipoProveedor .Add("@CveTipoProveedor", SqlDbType.Int).Value = CveTipoProveedor
.Add("@TipoComprobante", SqlDbType.VarChar).Value = TipoComprobante
End With End With
Try Try

View File

@@ -389,7 +389,17 @@ Public Class ClsPaginas
Property GlobalDTPSATUM() As DataTable Property GlobalDTPSATUM() As DataTable
Get Get
GlobalDTPSATUM = DirectCast(Application("GlobalDTPSATUM"), DataTable)
'System.Data.EnumerableRowCollection
If Not IsNothing(Application("GlobalDTPSATUM")) Then
If Application("GlobalDTPSATUM").GetType().IsSubclassOf(GetType(EnumerableRowCollection)) Then
Return DirectCast(Application("GlobalDTPSATUM"), EnumerableRowCollection(Of DataRow)).CopyToDataTable()
Else
Return DirectCast(Application("GlobalDTPSATUM"), DataTable)
End If
Else
Return Nothing
End If
End Get End Get
Set(value As DataTable) Set(value As DataTable)
Application("GlobalDTPSATUM") = value Application("GlobalDTPSATUM") = value
@@ -3308,9 +3318,6 @@ Public Class ClsPaginas
'Protected Overridable Sub Page_PreRender(sender As Object, e As EventArgs) Handles Me.PreRender
'End Sub
Private Function Obt_ClavePagina(Pagina As String) As Integer Private Function Obt_ClavePagina(Pagina As String) As Integer
Dim Retorno As Integer Dim Retorno As Integer
@@ -3320,7 +3327,7 @@ Public Class ClsPaginas
PaginaDict = New System.Collections.Hashtable PaginaDict = New System.Collections.Hashtable
PaginaDict.Add("/Inicio.aspx".ToUpper(), -1) PaginaDict.Add("/Inicio.aspx".ToUpper(), -1)
PaginaDict.Add("/Ventas/RepConciliacionEmitidosSat.aspx".ToUpper(), -1)
PaginaDict.Add("/Nomina/CatConceptos2.aspx".ToUpper(), -1) PaginaDict.Add("/Nomina/CatConceptos2.aspx".ToUpper(), -1)
PaginaDict.Add("/Nomina/Aguinaldo.aspx".ToUpper(), -1) PaginaDict.Add("/Nomina/Aguinaldo.aspx".ToUpper(), -1)
@@ -4661,11 +4668,14 @@ Public Class ClsPaginas
Mensaje.Alert(Mensaje, pOpcion, JSBtnAceptar, TimeoutToast:=timeout) Mensaje.Alert(Mensaje, pOpcion, JSBtnAceptar, TimeoutToast:=timeout)
End If End If
End Sub End Sub
Protected Overrides Sub SavePageStateToPersistenceMedium(pviewState As Object) Protected Overridable Sub Page_PreRender(sender As Object, e As EventArgs) Handles Me.PreRender
If Not IsNothing(ViewState("strToastMsglargonoreplace")) AndAlso ViewState("strToastMsglargonoreplace").ToString.Length > 0 Then If Not IsNothing(ViewState("strToastMsglargonoreplace")) AndAlso ViewState("strToastMsglargonoreplace").ToString.Length > 0 Then
RegistraScript(ViewState("strToastMsglargonoreplace").ToString(), "esteseraunticklargoparaquenosesobrescribaconotro") RegistraScript(ViewState("strToastMsglargonoreplace").ToString(), "esteseraunticklargoparaquenosesobrescribaconotro")
ViewState("strToastMsglargonoreplace") = Nothing ViewState("strToastMsglargonoreplace") = Nothing
End If End If
End Sub
Protected Overrides Sub SavePageStateToPersistenceMedium(pviewState As Object)
'If Request.Form("__VIEWSTATE_KEY") IsNot Nothing Then Cache.Remove(Request.Form("__VIEWSTATE_KEY")) 'elimino la cachado anteriormente 'If Request.Form("__VIEWSTATE_KEY") IsNot Nothing Then Cache.Remove(Request.Form("__VIEWSTATE_KEY")) 'elimino la cachado anteriormente
Dim VSKey As String = String.Format("VIEWSTATE_{0}_{1}_{2}", Session.SessionID, Request.Path, Date.Now.Ticks) Dim VSKey As String = String.Format("VIEWSTATE_{0}_{1}_{2}", Session.SessionID, Request.Path, Date.Now.Ticks)
'Cache.Add(VSKey, pviewState, Nothing, Date.Now.AddMinutes(60), Cache.NoSlidingExpiration, CacheItemPriority.Default, Nothing) 'Store the ViewState on Cache 'Cache.Add(VSKey, pviewState, Nothing, Date.Now.AddMinutes(60), Cache.NoSlidingExpiration, CacheItemPriority.Default, Nothing) 'Store the ViewState on Cache

View File

@@ -1,4 +1,4 @@
<%@ WebHandler Language="VB" Class="SIGGPS" %> <%@ WebHandler Language="VB" Class="SIGGPS" %>
Option Explicit On Option Explicit On
Option Strict On Option Strict On
@@ -16,7 +16,9 @@ Public Class SIGGPS : Implements IHttpHandler, IRequiresSessionState
If context.Request("metodo") IsNot Nothing Then If context.Request("metodo") IsNot Nothing Then
Select Case context.Request("metodo") Select Case context.Request("metodo")
Case "getimginstalacion" Case "getimginstalacion"
GetImgInstalacion(context) GetImgInstalacion(context)
Case "EjecutarNotificaciones"
EjecutarNotificaciones(context)
End Select End Select
ElseIf context.Request.InputStream IsNot Nothing Then ElseIf context.Request.InputStream IsNot Nothing Then
Using reader As New StreamReader(context.Request.InputStream) Using reader As New StreamReader(context.Request.InputStream)
@@ -64,6 +66,14 @@ Public Class SIGGPS : Implements IHttpHandler, IRequiresSessionState
Return URLParametros Return URLParametros
End Function End Function
Private Sub EjecutarNotificaciones(ByVal context As HttpContext)
Dim Retorno As String = "[]"
Using ObjGPS As New ClsSisNotificaciones
ObjGPS.ObtenerNotificaciones()
End Using
context.Response.Write(Retorno)
End Sub
Private Sub GetImgInstalacion(ByVal context As HttpContext) Private Sub GetImgInstalacion(ByVal context As HttpContext)
Dim params As String = Decripta(context.Request("r").ToString) Dim params As String = Decripta(context.Request("r").ToString)
Dim Parametros = Me.Parametros(params) Dim Parametros = Me.Parametros(params)

View File

@@ -310,9 +310,9 @@ Partial Class Bancos_ProveedoresAbonar
ViewState("CveCuentaRetISR") = 0 ViewState("CveCuentaRetISR") = 0
End If End If
If UsuarioActual.CveEmpresa.Contiene(1, 4, 5, 7, 11, 12, 72, 80, 126, 119, 122) Then 'If UsuarioActual.CveEmpresa.Contiene(1, 4, 5, 7, 11, 12, 72, 80, 126, 119, 122,145) Then
rowComisiones.Visible = True ' rowComisiones.Visible = True
End If 'End If
IdCuenta = 0 IdCuenta = 0
CveCuentaB = 0 CveCuentaB = 0
@@ -1506,16 +1506,16 @@ Partial Class Bancos_ProveedoresAbonar
'funcionalidad que toma el 100% del pago para acreditamiento de iva 'funcionalidad que toma el 100% del pago para acreditamiento de iva
If TotalImporte = gvr.DataKey("Saldo").ToDecimal Then If TotalImporte = gvr.DataKey("Saldo").ToDecimal Then
If CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then If CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
ImporteMovimiento = gvr.DataKey("IVADeducible").ToDecimal ImporteMovimiento = gvr.DataKey("IVA").ToDecimal
importeMX = ImporteMovimiento importeMX = ImporteMovimiento
ElseIf CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then ElseIf CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
ImporteMovimiento = gvr.DataKey("IVADeducible").ToDecimal ImporteMovimiento = gvr.DataKey("IVA").ToDecimal
importeMX = gvr.DataKey("IVADeducible").ToDecimal * If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra) importeMX = gvr.DataKey("IVA").ToDecimal * If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
ImporteMovimiento = gvr.DataKey("IVADeducible").ToDecimal ImporteMovimiento = gvr.DataKey("IVA").ToDecimal
importeMX = ImporteMovimiento * tipoCambioCompra importeMX = ImporteMovimiento * tipoCambioCompra
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
ImporteMovimiento = gvr.DataKey("IVADeducible").ToDecimal ImporteMovimiento = gvr.DataKey("IVA").ToDecimal
importeMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra) importeMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
End If End If
ImporteMovimiento = Math.Round(ImporteMovimiento, 2, MidpointRounding.AwayFromZero) ImporteMovimiento = Math.Round(ImporteMovimiento, 2, MidpointRounding.AwayFromZero)
@@ -1528,79 +1528,16 @@ Partial Class Bancos_ProveedoresAbonar
End If End If
Else Else
If CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then If CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
ImporteMovimiento = If(TotalImporte = gvr.DataKey("Saldo").ToDecimal AndAlso Math.Abs(Math.Round(gvr.DataKey("IVAPorPagarDeducible").ToDecimal - (gvr.DataKey("IVADeducible").ToDecimal * PorcentajePago), 2)) <= 0.02, gvr.DataKey("IVAPorPagarDeducible").ToDecimal, gvr.DataKey("IVADeducible").ToDecimal * PorcentajePago) ImporteMovimiento = If(TotalImporte = gvr.DataKey("Saldo").ToDecimal AndAlso Math.Abs(Math.Round(gvr.DataKey("IVAPorPagar").ToDecimal - (gvr.DataKey("IVA").ToDecimal * PorcentajePago), 2)) <= 0.02, gvr.DataKey("IVAPorPagar").ToDecimal, gvr.DataKey("IVA").ToDecimal * PorcentajePago)
importeMX = ImporteMovimiento importeMX = ImporteMovimiento
ElseIf CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then ElseIf CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
ImporteMovimiento = If(TotalImporte = gvr.DataKey("Saldo").ToDecimal AndAlso Math.Abs(Math.Round(gvr.DataKey("IVAPorPagarDeducible").ToDecimal - (gvr.DataKey("IVADeducible").ToDecimal * PorcentajePago), 2)) <= 0.02, gvr.DataKey("IVAPorPagarDeducible").ToDecimal, gvr.DataKey("IVADeducible").ToDecimal * PorcentajePago) ImporteMovimiento = If(TotalImporte = gvr.DataKey("Saldo").ToDecimal AndAlso Math.Abs(Math.Round(gvr.DataKey("IVAPorPagar").ToDecimal - (gvr.DataKey("IVA").ToDecimal * PorcentajePago), 2)) <= 0.02, gvr.DataKey("IVAPorPagar").ToDecimal, gvr.DataKey("IVA").ToDecimal * PorcentajePago)
importeMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra) importeMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
ImporteMovimiento = If(TotalImporte = gvr.DataKey("Saldo").ToDecimal AndAlso Math.Abs(Math.Round(gvr.DataKey("IVAPorPagarDeducible").ToDecimal - (gvr.DataKey("IVADeducible").ToDecimal * PorcentajePago), 2)) <= 0.02, gvr.DataKey("IVAPorPagarDeducible").ToDecimal, gvr.DataKey("IVADeducible").ToDecimal * PorcentajePago) ImporteMovimiento = If(TotalImporte = gvr.DataKey("Saldo").ToDecimal AndAlso Math.Abs(Math.Round(gvr.DataKey("IVAPorPagar").ToDecimal - (gvr.DataKey("IVA").ToDecimal * PorcentajePago), 2)) <= 0.02, gvr.DataKey("IVAPorPagar").ToDecimal, gvr.DataKey("IVA").ToDecimal * PorcentajePago)
importeMX = ImporteMovimiento * tipoCambioCompra importeMX = ImporteMovimiento * tipoCambioCompra
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
ImporteMovimiento = If(TotalImporte = gvr.DataKey("Saldo").ToDecimal AndAlso Math.Abs(Math.Round(gvr.DataKey("IVAPorPagarDeducible").ToDecimal - (gvr.DataKey("IVADeducible").ToDecimal * PorcentajePago), 2)) <= 0.02, gvr.DataKey("IVAPorPagarDeducible").ToDecimal, gvr.DataKey("IVADeducible").ToDecimal * PorcentajePago) ImporteMovimiento = If(TotalImporte = gvr.DataKey("Saldo").ToDecimal AndAlso Math.Abs(Math.Round(gvr.DataKey("IVAPorPagar").ToDecimal - (gvr.DataKey("IVA").ToDecimal * PorcentajePago), 2)) <= 0.02, gvr.DataKey("IVAPorPagar").ToDecimal, gvr.DataKey("IVA").ToDecimal * PorcentajePago)
importeMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
End If
ImporteMovimiento = Math.Round(ImporteMovimiento, 2, MidpointRounding.AwayFromZero)
importeMX = Math.Round(importeMX, 2, MidpointRounding.AwayFromZero)
If TipoCambioPago > 1 Then ConceptoMovimiento += $" TC:{TipoCambioPago} ${ImporteMovimiento.FormatoNumero(2)}"
End If
TipoCambioGeneral = If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
PorcentajeImpuesto = gvr.DataKey("PorcentajeIVA").ToDecimal
Dim IdCtaIVAXAcreditar As Integer = 0
Dim IdCtaIVAAcreditable As Integer = 0
If GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeImpuesto).Rows.Count > 0 Then
IdCtaIVAXAcreditar = GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeImpuesto).Rows(0)("IdCtaIVAXAcreditar").ToString.ToEntero
IdCtaIVAAcreditable = GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeImpuesto).Rows(0)("IdCtaIVAAcreditable").ToString.ToEntero
End If
IdCtaContable = If(IdCtaIVAAcreditable > 0, IdCtaIVAAcreditable, 0)
If ImporteMovimiento <> 0 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) And Not IdCtaContable > 0 Then
If ObjMov.DtResultados.Rows.Count > 0 Then
IdCtaContable = ObjMov.DtResultados.Rows(0)("IdCuentaIVAAcreditable").ToString.ToEntero
CveCuenta = ObjMov.DtResultados.Rows(0)("IdCuentaIVAAcreditableSIG").ToString.ToEntero
End If
End If
Case 280 'Iva Acreditado No Deducible
Dim TotalImporte As Decimal = gvr.FCTextBox("TxtAbonar").Text.ToDecimal
If UsuarioActual.Empresa.Funcionalidad(521) = "1" Then
'funcionalidad que toma el 100% del pago para acreditamiento de iva
If TotalImporte = gvr.DataKey("Saldo").ToDecimal Then
If CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
ImporteMovimiento = gvr.DataKey("IVANoDeducible").ToDecimal
importeMX = ImporteMovimiento
ElseIf CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
ImporteMovimiento = gvr.DataKey("IVANoDeducible").ToDecimal
importeMX = gvr.DataKey("IVANoDeducible").ToDecimal * If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
ImporteMovimiento = gvr.DataKey("IVANoDeducible").ToDecimal
importeMX = ImporteMovimiento * tipoCambioCompra
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
ImporteMovimiento = gvr.DataKey("IVANoDeducible").ToDecimal
importeMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
End If
ImporteMovimiento = Math.Round(ImporteMovimiento, 2, MidpointRounding.AwayFromZero)
importeMX = Math.Round(importeMX, 2, MidpointRounding.AwayFromZero)
If TipoCambioPago > 1 Then ConceptoMovimiento += $" TC:{TipoCambioPago} ${ImporteMovimiento.FormatoNumero(2)}"
Else
ImporteMovimiento = 0
importeMX = 0
End If
Else
If CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
ImporteMovimiento = If(TotalImporte = gvr.DataKey("Saldo").ToDecimal AndAlso Math.Abs(Math.Round(gvr.DataKey("IVAPorPagarNoDeducible").ToDecimal - (gvr.DataKey("IVANoDeducible").ToDecimal * PorcentajePago), 2)) <= 0.02, gvr.DataKey("IVAPorPagarNoDeducible").ToDecimal, gvr.DataKey("IVANoDeducible").ToDecimal * PorcentajePago)
importeMX = ImporteMovimiento
ElseIf CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
ImporteMovimiento = If(TotalImporte = gvr.DataKey("Saldo").ToDecimal AndAlso Math.Abs(Math.Round(gvr.DataKey("IVAPorPagarNoDeducible").ToDecimal - (gvr.DataKey("IVANoDeducible").ToDecimal * PorcentajePago), 2)) <= 0.02, gvr.DataKey("IVAPorPagarNoDeducible").ToDecimal, gvr.DataKey("IVANoDeducible").ToDecimal * PorcentajePago)
importeMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
ImporteMovimiento = If(TotalImporte = gvr.DataKey("Saldo").ToDecimal AndAlso Math.Abs(Math.Round(gvr.DataKey("IVAPorPagarNoDeducible").ToDecimal - (gvr.DataKey("IVANoDeducible").ToDecimal * PorcentajePago), 2)) <= 0.02, gvr.DataKey("IVAPorPagarNoDeducible").ToDecimal, gvr.DataKey("IVANoDeducible").ToDecimal * PorcentajePago)
importeMX = ImporteMovimiento * tipoCambioCompra
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
ImporteMovimiento = If(TotalImporte = gvr.DataKey("Saldo").ToDecimal AndAlso Math.Abs(Math.Round(gvr.DataKey("IVAPorPagarNoDeducible").ToDecimal - (gvr.DataKey("IVANoDeducible").ToDecimal * PorcentajePago), 2)) <= 0.02, gvr.DataKey("IVAPorPagarNoDeducible").ToDecimal, gvr.DataKey("IVANoDeducible").ToDecimal * PorcentajePago)
importeMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra) importeMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
End If End If
ImporteMovimiento = Math.Round(ImporteMovimiento, 2, MidpointRounding.AwayFromZero) ImporteMovimiento = Math.Round(ImporteMovimiento, 2, MidpointRounding.AwayFromZero)

View File

@@ -1,14 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
public partial class Compras_Default : ClsPaginas
{
protected void Page_Load(object sender, EventArgs e)
{
Alert(UsuarioActual.Nombre);
}
}

View File

@@ -1618,7 +1618,7 @@ Partial Class Compras_Compras
Private Function CargaFactura(CveFactura As Integer) As String Private Function CargaFactura(CveFactura As Integer) As String
Dim ObjeFacturas As New ClsCompras Dim ObjeFacturas As New ClsCompras
Dim RFC As String = "" Dim RFC As String = ""
If ObjeFacturas.GetFacturas(CveFactura, "-1", Now.AddYears(-3), Now, "-1", "-1", -1, -1, -1, -1, UsuarioActual.CveEmpresa) AndAlso ObjeFacturas.DtResultados.Rows.Count > 0 Then If ObjeFacturas.GetFacturas(CveFactura, "-1", Now.AddYears(-3), Now, "-1", "-1", -1, -1, -1, -1, "-1", UsuarioActual.CveEmpresa) AndAlso ObjeFacturas.DtResultados.Rows.Count > 0 Then
Dim dr As DataRow = ObjeFacturas.DtResultados.Rows(0) ' no toma la cero, porque es el totalizador Dim dr As DataRow = ObjeFacturas.DtResultados.Rows(0) ' no toma la cero, porque es el totalizador
Dim XMLDoc As New XmlDocument Dim XMLDoc As New XmlDocument

Binary file not shown.

View File

@@ -484,7 +484,7 @@ Partial Class Compras_Proveedores
Private Function CargadeFactura(CveFactura As Integer) As Integer Private Function CargadeFactura(CveFactura As Integer) As Integer
Dim ObjeFacturas As New ClsCompras Dim ObjeFacturas As New ClsCompras
If ObjeFacturas.GetFacturas(CveFactura, "-1", Now.AddYears(-2), Now, "-1", "-1", -1, -1, -1, -1, UsuarioActual.CveEmpresa) Then If ObjeFacturas.GetFacturas(CveFactura, "-1", Now.AddYears(-2), Now, "-1", "-1", -1, -1, -1, -1, "-1", UsuarioActual.CveEmpresa) Then
Dim XMLDoc As New XmlDocument Dim XMLDoc As New XmlDocument
Try Try

View File

@@ -154,6 +154,13 @@
<asp:ListItem Selected="False" Text="Ambos" Value="3"></asp:ListItem> <asp:ListItem Selected="False" Text="Ambos" Value="3"></asp:ListItem>
</asp:DropDownList> </asp:DropDownList>
</li> </li>
<li>Tipo Comprobante
<asp:DropDownList ID="DdlTipoComprobante" runat="server" CssClass="form-control select2me input-sm" Width="150px">
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
<asp:ListItem Selected="False" Text="Ingresos" Value="I"></asp:ListItem>
<asp:ListItem Selected="False" Text="Egresos" Value="E"></asp:ListItem>
</asp:DropDownList>
</li>
</ul> </ul>
</div> </div>
</div> </div>

View File

@@ -673,7 +673,7 @@ Partial Class Compras_eFacturas
End If End If
Dim DtPagos As DataTable = Nothing Dim DtPagos As DataTable = Nothing
Dim ObjDatos As New ClsCompras Dim ObjDatos As New ClsCompras
If ObjDatos.GetFacturas(-1, Folio, FechaI, FechaF, RFC, Proveedor, DdlValidado.SelectedValue.ToEntero, DdlResponsable.SelectedValue.ToEntero, DdlClasificacionProv.SelectedValue.ToEntero, DdlCveTipoProveedor.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then If ObjDatos.GetFacturas(-1, Folio, FechaI, FechaF, RFC, Proveedor, DdlValidado.SelectedValue.ToEntero, DdlResponsable.SelectedValue.ToEntero, DdlClasificacionProv.SelectedValue.ToEntero, DdlCveTipoProveedor.SelectedValue.ToEntero, DdlTipoComprobante.SelectedValue.ToString, UsuarioActual.CveEmpresa) Then
If ObjDatos.DtResultados.Rows.Count > 0 Then If ObjDatos.DtResultados.Rows.Count > 0 Then
GvD.DataSource = ObjDatos.DtResultados.FiltraParametros("TipoComprobante <> 'P'") '.AsEnumerable().Take(100).CopyToDataTable() GvD.DataSource = ObjDatos.DtResultados.FiltraParametros("TipoComprobante <> 'P'") '.AsEnumerable().Take(100).CopyToDataTable()
DtPagos = ObjDatos.DtResultados.FiltraParametros("TipoComprobante = 'P'") DtPagos = ObjDatos.DtResultados.FiltraParametros("TipoComprobante = 'P'")
@@ -1246,7 +1246,7 @@ Partial Class Compras_eFacturas
Dim Folio = If(TxtFolio.Text.Trim.Length > 0, String.Format("%{0}%", TxtFolio.Text.Trim.ToUpper), "-1") Dim Folio = If(TxtFolio.Text.Trim.Length > 0, String.Format("%{0}%", TxtFolio.Text.Trim.ToUpper), "-1")
Dim Proveedor = If(TxtProveedor.Text.Trim.Length > 0, String.Format("%{0}%", TxtProveedor.Text.Trim.ToUpper.Replace(" ", "%")), "-1") Dim Proveedor = If(TxtProveedor.Text.Trim.Length > 0, String.Format("%{0}%", TxtProveedor.Text.Trim.ToUpper.Replace(" ", "%")), "-1")
If ObjDatos.GetFacturas(-1, Folio, txtFechaI.Text.Trim.ToDate, txtFechaF.Text.Trim.ToDate, "-1", Proveedor, DdlValidado.SelectedValue.ToEntero, DdlResponsable.SelectedValue.ToEntero, DdlClasificacionProv.SelectedValue.ToEntero, DdlCveTipoProveedor.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then If ObjDatos.GetFacturas(-1, Folio, txtFechaI.Text.Trim.ToDate, txtFechaF.Text.Trim.ToDate, "-1", Proveedor, DdlValidado.SelectedValue.ToEntero, DdlResponsable.SelectedValue.ToEntero, DdlClasificacionProv.SelectedValue.ToEntero, DdlCveTipoProveedor.SelectedValue.ToEntero, DdlTipoComprobante.SelectedValue.ToString, UsuarioActual.CveEmpresa) Then
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta)) Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa) Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)

View File

@@ -117,6 +117,7 @@
<asp:HyperLinkField DataTextField="SerieFolio" DataNavigateUrlFields="CveVenta" Target="_blank" DataNavigateUrlFormatString="/Ventas/Ventas.aspx?CveVenta={0}" HeaderText="Folio" ControlStyle-Width="85px" /> <asp:HyperLinkField DataTextField="SerieFolio" DataNavigateUrlFields="CveVenta" Target="_blank" DataNavigateUrlFormatString="/Ventas/Ventas.aspx?CveVenta={0}" HeaderText="Folio" ControlStyle-Width="85px" />
<asp:BoundField HeaderText="SubTotal" DataField="SubTotal" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" /> <asp:BoundField HeaderText="SubTotal" DataField="SubTotal" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="IVA" DataField="IVA" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" /> <asp:BoundField HeaderText="IVA" DataField="IVA" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="%IVA" DataField="PorcentajeIVA" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="IEPS" DataField="IEPS" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" /> <asp:BoundField HeaderText="IEPS" DataField="IEPS" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="RetIVA" DataField="RetIVA" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" /> <asp:BoundField HeaderText="RetIVA" DataField="RetIVA" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="RetISR" DataField="RetISR" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" /> <asp:BoundField HeaderText="RetISR" DataField="RetISR" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />

View File

@@ -16,13 +16,13 @@ Partial Class SessionesActivas
End Property End Property
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
If Not IsPostBack Then If Not IsPostBack Then
Dim listacve As New List(Of String) ' Dim listacve As New List(Of String)
listacve.Add("1815") ' listacve.Add("1815")
Notificaciones.AlertaVentana("notificacion", listacve, timeoutseconds:=0) ' Notificaciones.AlertaVentana("notificacion", listacve, timeoutseconds:=0)
RCveUsuario = "0" ' RCveUsuario = "0"
ClsSisNotificaciones.SendNotificacionERP(100, "Titulo", "Hola Mundo", 1) 'ClsSisNotificaciones.SendNotificacionERP(100, "Titulo", "Hola Mundo", 1)
CargaDatos("") CargaDatos("")
End If End If
End Sub End Sub

View File

@@ -98,10 +98,11 @@
<ItemTemplate> <ItemTemplate>
<%--<asp:Label ID="lblrutaXml" runat="server" Text='<%# Eval("RutaXml")%>'> </asp:Label>--%> <%--<asp:Label ID="lblrutaXml" runat="server" Text='<%# Eval("RutaXml")%>'> </asp:Label>--%>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField HeaderText=""> <asp:TemplateField HeaderText="">
<ItemTemplate> <ItemTemplate>
<asp:LinkButton ID="LnkRegistrar" runat="server" data-toggle="tooltip" ToolTip="Registrar" CssClass="btn btn-circle btn-sm blue" OnClick="LnkRegistrar_Click"><i class="fa fa-plus"></i></asp:LinkButton> <asp:HyperLink runat="server" NavigateUrl='<%# Eval("CveVenta","/Ventas/Ventas.aspx?CveVenta={0}") %>' CssClass="btn btn-circle btn-sm btn-success" Visible='<%# (Eval("CveVenta").ToString() =="" ? false :true) %>' ><i class="fa fa-info"></i>r</asp:HyperLink>
<asp:LinkButton ID="LnkRegistrar" Visible='<%# Eval("CveVenta").ToString() =="" %>' runat="server" data-toggle="tooltip" ToolTip="Registrar" CssClass="btn btn-circle btn-sm blue" OnClick="LnkRegistrar_Click"><i class="fa fa-plus"></i></asp:LinkButton>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
</Columns> </Columns>

View File

@@ -24,6 +24,7 @@ public partial class Ventas_RepConciliacionEmitidosSat : ClsPaginas
DdlSubProyectoDatos.DataSource = get_GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1).FiltraParametros("EsSucursal = True "); DdlSubProyectoDatos.DataSource = get_GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1).FiltraParametros("EsSucursal = True ");
DdlSubProyectoDatos.DataBind(); DdlSubProyectoDatos.DataBind();
DdlClasificacion.DataSource = get_GlobalDTClasificaciones(UsuarioActual.CveEmpresa, UsoClasificacion: 1).FiltraParametros(" Codigo = '' OR Codigo IS NULL ", Orderby: "Clasificacion"); DdlClasificacion.DataSource = get_GlobalDTClasificaciones(UsuarioActual.CveEmpresa, UsoClasificacion: 1).FiltraParametros(" Codigo = '' OR Codigo IS NULL ", Orderby: "Clasificacion");
DdlClasificacion.DataBind(); DdlClasificacion.DataBind();
@@ -43,98 +44,184 @@ public partial class Ventas_RepConciliacionEmitidosSat : ClsPaginas
DdlPS.setEsWebService(false); DdlPS.setEsWebService(false);
DdlPS.ddl.DataSource = get_GlobalDTPSSimplificado(UsuarioActual.CveEmpresa, CveClasificacion: CveClasificacion, Estatus: 1, AplicaParaVenta: 1); DdlPS.ddl.DataSource = get_GlobalDTPSSimplificado(UsuarioActual.CveEmpresa, CveClasificacion: CveClasificacion, Estatus: 1, AplicaParaVenta: 1);
DdlPS.ddl.DataBind(); DdlPS.ddl.DataBind();
} }
} }
} }
protected void CargaConciliacionemitidasSATGet() protected void CargaConciliacionemitidasSATGet()
{ {
ClsVentas ObjV = new ClsVentas(); ClsVentas ObjV = new ClsVentas();
ObjV.ConciliacionemitidasSATGet(UsuarioActual.CveEmpresa); ObjV.ConciliacionemitidasSATGet(UsuarioActual.CveEmpresa);
GVConciliacionemitidasSAT.DataSource = ObjV.DtResultados; GVConciliacionemitidasSAT.DataSource = ObjV.DtResultados.FiltraParametros("", "CveVenta");
ObjV.Dispose(); ObjV.Dispose();
GVConciliacionemitidasSAT.DataBind(); GVConciliacionemitidasSAT.DataBind();
UpDatosReporte.Update(); UpDatosReporte.Update();
}
private void registrarventa(GridViewRow gvrow)
{
{
string ruta = gvrow.DataKey("RutaXml");
strErrores = new StringBuilder();
XmlSatCFDI objxml = null;
Modelos.Factura objfact = null;
bool continuar = true;
objxml = XmlSatCFDI.readXML(ruta);
continuar = continuar && (objxml != null);
if (continuar)
{
objfact = GetFacturaFromXML(objxml);
}
continuar = continuar && (objfact != null);
if (continuar)
{
// Dim As New (ObjVentas.IniciaTransacSQL())
// Dim As = Nothing
// Dim MensajeAlert = New StringBuilder
ClsVentas ObjVentas = new ClsVentas();
ClsInventarios ObjInventario = new ClsInventarios(ObjVentas.IniciaTransacSQL());
ClsContabilidad ObjConta = new ClsContabilidad(ObjVentas.IniciaTransacSQL());
ClsContratos ObjContr = new ClsContratos(ObjVentas.IniciaTransacSQL());
ClsOS ObjOS = new ClsOS(ObjVentas.IniciaTransacSQL());
ClsBancos ObjBancos = new ClsBancos(ObjVentas.IniciaTransacSQL());
ClsClientes ObjClientes = new ClsClientes(ObjVentas.IniciaTransacSQL());
ClsOIEventos ObjEventos = new ClsOIEventos(ObjVentas.IniciaTransacSQL());
ClsCGame ObjCGame = new ClsCGame(ObjVentas.IniciaTransacSQL());
ClsEdocumentacion ObjDocCliente = new ClsEdocumentacion(ObjVentas.IniciaTransacSQL());
ClsAcumuladores ObjAcum = new ClsAcumuladores(ObjVentas.IniciaTransacSQL());
ClsContPAQi ObjContPaq = null;
//StringBuilder MensajeAlert = new StringBuilder() ;
try
{
objfact.GuardarVenta(ref objfact, ref ObjVentas, ref ObjConta, ref ObjInventario, ref ObjContr, ref objfact.DtDetalle, objfact.CveNCaVincular, ref ObjContPaq, ref ObjBancos, ref ObjOS, ref ObjEventos, ref ObjCGame, ref ObjClientes, ObjAcum: ObjAcum);
}
catch (Exception)
{
objfact.CveVenta = -1;
}
if (ObjVentas.UpdateEstatusFactura(3, objxml.complemento.UUID, "", DateTime.ParseExact(objxml.comprobante.Fecha.Replace("T", " "), "yyyy-MM-dd HH:mm:ss", System.Globalization.CultureInfo.InvariantCulture), ObjVentas.CveVenta, CvePAC: 4))
if (objfact.CveVenta > 0 && objfact.ErrorList.Count == 0)
{
ObjVentas.Commit();
}
else
{
foreach (string item in objfact.ErrorList)
{
strErrores.AppendLine("<br/>");
strErrores.AppendLine(item);
}
objfact.CveVenta = -1;
ObjVentas.RollBack();
}
ObjVentas.Dispose();
ObjConta.Dispose();
ObjInventario.Dispose();
ObjCGame.Dispose();
ObjContr.Dispose();
ObjDocCliente.Dispose();
ObjClientes.Dispose();
ObjAcum.Dispose();
}
if (objfact != null && objfact.CveVenta > 0)
{
CargaConciliacionemitidasSATGet();
Alert($"se ha agregado la factura correctamente.<br/> <a href=\"/Ventas/Ventas.aspx?CveVenta={objfact.CveVenta}\" > Ver Factura </a>", ModExtensiones.TipoMensaje.ToastInformacion, timeout: 25);
}
else { continuar = false; }
if (!continuar)
{
Alert($"no se pudo agregar la factura {strErrores.ToString()}", ModExtensiones.TipoMensaje.MsgAdvertencia);
}
}
} }
protected void LnkRegistrar_Click(object sender, EventArgs e) protected void LnkRegistrar_Click(object sender, EventArgs e)
{ {
GridViewRow gvrow = (GridViewRow)(((LinkButton)sender).NamingContainer); GridViewRow gvrow = (GridViewRow)(((LinkButton)sender).NamingContainer);
string ruta = gvrow.DataKey("RutaXml"); registrarventa(gvrow);
strErrores = new StringBuilder(); //string ruta = gvrow.DataKey("RutaXml");
XmlSatCFDI objxml = null; //strErrores = new StringBuilder();
Modelos.Factura objfact = null; //XmlSatCFDI objxml = null;
bool continuar = true; //Modelos.Factura objfact = null;
objxml = XmlSatCFDI.readXML(ruta); //bool continuar = true;
continuar = continuar && (objxml != null); //objxml = XmlSatCFDI.readXML(ruta);
if (continuar) //continuar = continuar && (objxml != null);
{ //if (continuar)
//{
objfact = GetFacturaFromXML(objxml); // objfact = GetFacturaFromXML(objxml);
} //}
continuar = continuar && (objfact != null); //continuar = continuar && (objfact != null);
if (continuar) //if (continuar)
{ //{
// Dim As New (ObjVentas.IniciaTransacSQL()) // // Dim As New (ObjVentas.IniciaTransacSQL())
// Dim As = Nothing // // Dim As = Nothing
// Dim MensajeAlert = New StringBuilder // // Dim MensajeAlert = New StringBuilder
ClsVentas ObjVentas = new ClsVentas(); // ClsVentas ObjVentas = new ClsVentas();
ClsInventarios ObjInventario = new ClsInventarios(ObjVentas.IniciaTransacSQL()); // ClsInventarios ObjInventario = new ClsInventarios(ObjVentas.IniciaTransacSQL());
ClsContabilidad ObjConta = new ClsContabilidad(ObjVentas.IniciaTransacSQL()); // ClsContabilidad ObjConta = new ClsContabilidad(ObjVentas.IniciaTransacSQL());
ClsContratos ObjContr = new ClsContratos(ObjVentas.IniciaTransacSQL()); // ClsContratos ObjContr = new ClsContratos(ObjVentas.IniciaTransacSQL());
ClsOS ObjOS = new ClsOS(ObjVentas.IniciaTransacSQL()); // ClsOS ObjOS = new ClsOS(ObjVentas.IniciaTransacSQL());
ClsBancos ObjBancos = new ClsBancos(ObjVentas.IniciaTransacSQL()); // ClsBancos ObjBancos = new ClsBancos(ObjVentas.IniciaTransacSQL());
ClsClientes ObjClientes = new ClsClientes(ObjVentas.IniciaTransacSQL()); // ClsClientes ObjClientes = new ClsClientes(ObjVentas.IniciaTransacSQL());
ClsOIEventos ObjEventos = new ClsOIEventos(ObjVentas.IniciaTransacSQL()); // ClsOIEventos ObjEventos = new ClsOIEventos(ObjVentas.IniciaTransacSQL());
ClsCGame ObjCGame = new ClsCGame(ObjVentas.IniciaTransacSQL()); // ClsCGame ObjCGame = new ClsCGame(ObjVentas.IniciaTransacSQL());
ClsEdocumentacion ObjDocCliente = new ClsEdocumentacion(ObjVentas.IniciaTransacSQL()); // ClsEdocumentacion ObjDocCliente = new ClsEdocumentacion(ObjVentas.IniciaTransacSQL());
ClsAcumuladores ObjAcum = new ClsAcumuladores(ObjVentas.IniciaTransacSQL()); // ClsAcumuladores ObjAcum = new ClsAcumuladores(ObjVentas.IniciaTransacSQL());
ClsContPAQi ObjContPaq = null; // ClsContPAQi ObjContPaq = null;
//StringBuilder MensajeAlert = new StringBuilder() ; // //StringBuilder MensajeAlert = new StringBuilder() ;
try // try
{ // {
objfact.GuardarVenta(ref objfact, ref ObjVentas, ref ObjConta, ref ObjInventario, ref ObjContr, ref objfact.DtDetalle, objfact.CveNCaVincular, ref ObjContPaq, ref ObjBancos, ref ObjOS, ref ObjEventos, ref ObjCGame, ref ObjClientes, ObjAcum: ObjAcum); // objfact.GuardarVenta(ref objfact, ref ObjVentas, ref ObjConta, ref ObjInventario, ref ObjContr, ref objfact.DtDetalle, objfact.CveNCaVincular, ref ObjContPaq, ref ObjBancos, ref ObjOS, ref ObjEventos, ref ObjCGame, ref ObjClientes, ObjAcum: ObjAcum);
} // }
catch (Exception ) // catch (Exception )
{ // {
objfact.CveVenta = -1; // objfact.CveVenta = -1;
} // }
if (ObjVentas.UpdateEstatusFactura(3, objxml.complemento.UUID, "", DateTime.ParseExact(objxml.comprobante.Fecha.Replace("T", " "), "yyyy-MM-dd HH:mm:ss", System.Globalization.CultureInfo.InvariantCulture), ObjVentas.CveVenta, CvePAC: 4)) // if (ObjVentas.UpdateEstatusFactura(3, objxml.complemento.UUID, "", DateTime.ParseExact(objxml.comprobante.Fecha.Replace("T", " "), "yyyy-MM-dd HH:mm:ss", System.Globalization.CultureInfo.InvariantCulture), ObjVentas.CveVenta, CvePAC: 4))
if (objfact.CveVenta > 0 && objfact.ErrorList.Count == 0) // if (objfact.CveVenta > 0 && objfact.ErrorList.Count == 0)
{ // {
ObjVentas.Commit(); // ObjVentas.Commit();
} // }
else // else
{ // {
foreach (string item in objfact.ErrorList) // foreach (string item in objfact.ErrorList)
{ // {
strErrores.AppendLine("<br/>"); // strErrores.AppendLine("<br/>");
strErrores.AppendLine(item); // strErrores.AppendLine(item);
} // }
objfact.CveVenta = -1; // objfact.CveVenta = -1;
ObjVentas.RollBack(); // ObjVentas.RollBack();
} // }
ObjVentas.Dispose(); // ObjVentas.Dispose();
ObjConta.Dispose(); // ObjConta.Dispose();
ObjInventario.Dispose(); // ObjInventario.Dispose();
ObjCGame.Dispose(); // ObjCGame.Dispose();
ObjContr.Dispose(); // ObjContr.Dispose();
ObjDocCliente.Dispose(); // ObjDocCliente.Dispose();
ObjClientes.Dispose(); // ObjClientes.Dispose();
ObjAcum.Dispose(); // ObjAcum.Dispose();
} //}
if (objfact != null && objfact.CveVenta > 0) //if (objfact != null && objfact.CveVenta > 0)
{ //{
CargaConciliacionemitidasSATGet(); // CargaConciliacionemitidasSATGet();
Alert($"se ha agregado la factura correctamente.<br/> <a href=\"/Ventas/Ventas.aspx?CveVenta={objfact.CveVenta}\" > Ver Factura </a>", ModExtensiones.TipoMensaje.MsgInformacion); // Alert($"se ha agregado la factura correctamente.<br/> <a href=\"/Ventas/Ventas.aspx?CveVenta={objfact.CveVenta}\" > Ver Factura </a>", ModExtensiones.TipoMensaje.ToastInformacion,timeout:25);
} //}
else { continuar = false; } //else { continuar = false; }
if (!continuar) //if (!continuar)
{ //{
Alert($"no se pudo agregar la factura {strErrores.ToString()}", ModExtensiones.TipoMensaje.MsgAdvertencia); // Alert($"no se pudo agregar la factura {strErrores.ToString()}", ModExtensiones.TipoMensaje.MsgAdvertencia);
} //}
} }
protected Modelos.Factura GetFacturaFromXML(XmlSatCFDI objxml) protected Modelos.Factura GetFacturaFromXML(XmlSatCFDI objxml)
@@ -388,11 +475,17 @@ public partial class Ventas_RepConciliacionEmitidosSat : ClsPaginas
Row["CveTipoPS"] = DrPS["CveTipoPS"]; Row["CveTipoPS"] = DrPS["CveTipoPS"];
Row["CveTipoInvPS"] = DrPS["Inv_CveMetodoInventario"]; Row["CveTipoInvPS"] = DrPS["Inv_CveMetodoInventario"];
Row["CveTamaño"] = DrPS["CveTamaño"]; Row["CveTamaño"] = DrPS["CveTamaño"];
ADSistemaLibrary.SatXml.CFDIConceptoImpuesto impuesto = item.Impuestos.FirstOrDefault(x => x.Impuesto == "002" && x.Impuesto == "Traslado"); ADSistemaLibrary.SatXml.CFDIConceptoImpuesto impuesto = item.Impuestos.FirstOrDefault(x => x.Impuesto == "002" && x.Tipo == "Traslado");
decimal sumaimpuesto=0;
decimal PorcentajeIVA = 0;
if (impuesto != null) if (impuesto != null)
{ {
Row["PorcentajeIVA"] = impuesto.TasaOCuota; decimal decimpuesto = 0;
Row["ImporteIVA"] = impuesto.Importe; decimal.TryParse(impuesto.TasaOCuota, out decimpuesto);
PorcentajeIVA = decimpuesto/100;
Row["PorcentajeIVA"] = decimpuesto / 100;
Row["ImporteIVA"] = decimpuesto / 100;// impuesto.Importe;//Math.Round(item.Importe * (decimpuesto/100), 2);
sumaimpuesto += impuesto.Importe;
} }
else else
{ {
@@ -400,12 +493,15 @@ public partial class Ventas_RepConciliacionEmitidosSat : ClsPaginas
Row["ImporteIVA"] = 0; Row["ImporteIVA"] = 0;
} }
Row["IVA"] = Row["PorcentajeIVA"]; Row["IVA"] = Row["PorcentajeIVA"];
impuesto = item.Impuestos.FirstOrDefault(x => x.Impuesto == "003" && x.Impuesto == "Traslado"); impuesto = item.Impuestos.FirstOrDefault(x => x.Impuesto == "003" && x.Tipo == "Traslado");
if (impuesto != null) if (impuesto != null)
{ {
Row["PorcentajeIEPS"] = impuesto.TasaOCuota; decimal decimpuesto = 0;
decimal.TryParse(impuesto.TasaOCuota, out decimpuesto);
Row["PorcentajeIEPS"] = decimpuesto / 100;
Row["ImporteIEPS"] = impuesto.Importe; Row["ImporteIEPS"] = impuesto.Importe;
Row["IEPS"] = impuesto.Importe; Row["IEPS"] = impuesto.Importe;
sumaimpuesto += impuesto.Importe;
} }
else else
{ {
@@ -413,22 +509,28 @@ public partial class Ventas_RepConciliacionEmitidosSat : ClsPaginas
Row["ImporteIEPS"] = 0; Row["ImporteIEPS"] = 0;
Row["IEPS"] = 0; Row["IEPS"] = 0;
} }
impuesto = item.Impuestos.FirstOrDefault(x => x.Impuesto == "001" && x.Impuesto == "Retencion"); impuesto = item.Impuestos.FirstOrDefault(x => x.Impuesto == "001" && x.Tipo == "Retencion");
if (impuesto != null) if (impuesto != null)
{ {
decimal decimpuesto = 0;
decimal.TryParse(impuesto.TasaOCuota, out decimpuesto);
Row["PorcentajeRetISR"] = decimpuesto / 100;
Row["ImporteRetISR"] = impuesto.Importe; Row["ImporteRetISR"] = impuesto.Importe;
Row["PorcentajeRetISR"] = impuesto.TasaOCuota; sumaimpuesto -= impuesto.Importe;
} }
else else
{ {
Row["ImporteRetISR"] = 0; Row["ImporteRetISR"] = 0;
Row["PorcentajeRetISR"] = 0; Row["PorcentajeRetISR"] = 0;
} }
impuesto = item.Impuestos.FirstOrDefault(x => x.Impuesto == "002" && x.Impuesto == "Retencion"); impuesto = item.Impuestos.FirstOrDefault(x => x.Impuesto == "002" && x.Tipo == "Retencion");
if (impuesto != null) if (impuesto != null)
{ {
decimal decimpuesto = 0;
decimal.TryParse(impuesto.TasaOCuota, out decimpuesto);
Row["PorcentajeRetIVA"] = decimpuesto / 100;
Row["ImporteRetIVA"] = impuesto.Importe; Row["ImporteRetIVA"] = impuesto.Importe;
Row["PorcentajeRetIVA"] = impuesto.TasaOCuota; sumaimpuesto -= impuesto.Importe;
} }
else else
{ {
@@ -438,7 +540,8 @@ public partial class Ventas_RepConciliacionEmitidosSat : ClsPaginas
Row["Descuento"] = item.Descuento; Row["Descuento"] = item.Descuento;
Row["TipoDescuento"] = "2"; Row["TipoDescuento"] = "2";
Row["Total"] = item.Importe; //Row["Total"] = item.Importe - sumaimpuesto;
Row["Total"] = item.Importe /(1+ PorcentajeIVA);
Row["TotalImporte"] = item.Importe; Row["TotalImporte"] = item.Importe;
Row["SATClaveProdServ"] = item.ClaveProdServ; Row["SATClaveProdServ"] = item.ClaveProdServ;
@@ -468,6 +571,11 @@ public partial class Ventas_RepConciliacionEmitidosSat : ClsPaginas
protected void LnkAceptarDefault_Click(object sender, EventArgs e) protected void LnkAceptarDefault_Click(object sender, EventArgs e)
{ {
RegistraScript("$('#DModalDefaults').modal('hide');"); RegistraScript("$('#DModalDefaults').modal('hide');");
//foreach (GridViewRow gvrow in GVConciliacionemitidasSAT.Rows)
//{
// registrarventa(gvrow);
//}
} }
} }
/* /*

View File

@@ -41,6 +41,8 @@ Partial Class Ventas_RepVentasUtilidad
Dim EsWS = If(UsuarioActual.Empresa.Funcionalidad(105) = "1" Or UsuarioActual.Empresa.Funcionalidad(141) = "1", True, False) Dim EsWS = If(UsuarioActual.Empresa.Funcionalidad(105) = "1" Or UsuarioActual.Empresa.Funcionalidad(141) = "1", True, False)
If EsWS Then If EsWS Then
DdlClientes.setEsWebService(True) DdlClientes.setEsWebService(True)
DdlClientes.SelectedValue = "-1"
DdlClientes.SelectedText = "Todos"
Else Else
DdlClientes.setEsWebService(False) DdlClientes.setEsWebService(False)
DdlClientes.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa, -1) DdlClientes.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa, -1)

View File

@@ -260,6 +260,16 @@
<asp:Label ID="LbSubTotalDolares" Visible="false" runat="server" Text="SubTotal"></asp:Label> <asp:Label ID="LbSubTotalDolares" Visible="false" runat="server" Text="SubTotal"></asp:Label>
</td> </td>
</tr> </tr>
<tr align="left">
<td><b>Dias Emision:</b>&nbsp;</td>
<td>
<asp:Label ID="LblDiasEmision" runat="server" Text="Dias Emision"></asp:Label>
</td>
<td><b>Dias Vencimiento:</b>&nbsp;</td>
<td>
<asp:Label ID="LblDiasVencimiento" runat="server" Text="Dias Vencimiento"></asp:Label>
</td>
</tr>
</table> </table>
</div> </div>
</div> </div>

View File

@@ -181,6 +181,8 @@ Partial Class Ventas_RepVentasUtilidadDetalle
If ObjVentas.DtResultados.Rows.Count > 0 Then If ObjVentas.DtResultados.Rows.Count > 0 Then
CveMovimiento = ObjVentas.DtResultados.Rows(1)("CveMovimiento").ToString.ToEntero CveMovimiento = ObjVentas.DtResultados.Rows(1)("CveMovimiento").ToString.ToEntero
LblDiasVencimiento.Text = ObjVentas.DtResultados.Rows(1)("DiasVencimiento").ToString
LblDiasEmision.Text = ObjVentas.DtResultados.Rows(1)("DiasEmision").ToString
LblCostoFecha.Text = "$" + ObjVentas.Costo.ToString("N2") LblCostoFecha.Text = "$" + ObjVentas.Costo.ToString("N2")
HLCostoFolio.Text = ObjVentas.FolioCosto HLCostoFolio.Text = ObjVentas.FolioCosto
LblFechaSalid.Text = ObjVentas.FechaSalidaCosto.ToDate.ToShortDateString LblFechaSalid.Text = ObjVentas.FechaSalidaCosto.ToDate.ToShortDateString

View File

@@ -44,8 +44,10 @@ Partial Class Ventas_RepVentasUtilidadPadre
txtFechaF.Text = Now.LastDayOfMonth.ToShortDateString txtFechaF.Text = Now.LastDayOfMonth.ToShortDateString
'Carga Clientes 'Carga Clientes
If UsuarioActual.CveEmpresa = 119 Then If UsuarioActual.Empresa.Funcionalidad(105) = "1" Or UsuarioActual.Empresa.Funcionalidad(141) = "1" Then
DdlClientesWS.setEsWebService(True) DdlClientesWS.setEsWebService(True)
DdlClientesWS.SelectedValue = "-1"
DdlClientesWS.SelectedText = "Todos"
Else Else
DdlClientesWS.setEsWebService(False) DdlClientesWS.setEsWebService(False)
DdlClientesWS.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa, -1) DdlClientesWS.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa, -1)

File diff suppressed because it is too large Load Diff