Merge branch 'master' of http://jperez@192.168.10.111:8383/SIG.git
This commit is contained in:
@@ -1,16 +1,16 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
|
||||
Imports Extensiones
|
||||
Imports System.Data
|
||||
Imports System.IO
|
||||
Imports System.Xml
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
Imports System.Security.Cryptography.X509Certificates
|
||||
Imports System.Globalization
|
||||
Imports System.Net.Http
|
||||
Imports Newtonsoft.Json.Linq
|
||||
Imports System.Diagnostics
|
||||
Imports System.Globalization
|
||||
Imports System.IO
|
||||
Imports System.Net.Http
|
||||
Imports System.Security.Cryptography.X509Certificates
|
||||
Imports System.Xml
|
||||
Imports Extensiones
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
Imports Newtonsoft.Json.Linq
|
||||
|
||||
Partial Class Ventas
|
||||
Inherits ClsPaginas
|
||||
@@ -2535,7 +2535,7 @@ Partial Class Ventas
|
||||
CargarCamiones()
|
||||
|
||||
'SI USUARIO USA AMORTIZACIÓN CONTABLE, se carga las tablas para usarlas mas adelante
|
||||
If UsuarioActual.Empresa.UsaAC Then
|
||||
If UsuarioActual.Empresa.TipoContabilidad = 2 AndAlso UsuarioActual.Empresa.UsaAC Then
|
||||
|
||||
DdlTipoComprobante.Items.Remove(DdlTipoComprobante.Items.FindByValue("Rem"))
|
||||
DdlTipoComprobante.Items.Remove(DdlTipoComprobante.Items.FindByValue("Cot"))
|
||||
@@ -2631,7 +2631,9 @@ Partial Class Ventas
|
||||
If Request("CveEmbarqueManifiesto") IsNot Nothing AndAlso IsNumeric(Request("CveEmbarqueManifiesto")) AndAlso Request("CveEmbarqueManifiesto").ToEntero() > 0 Then
|
||||
DdlMoneda.SelectedValueExist(2)
|
||||
Using ObjVentas As New ClsNominas
|
||||
|
||||
If ObjVentas.EmbarqueManifiestoGet(-1, -1, -1, Request("CveEmbarqueManifiesto").ToString().ToEntero()) And ObjVentas.DtResultados.Rows.Count > 0 Then
|
||||
DdlSubProyectoDatos.SelectedValueExist(ObjVentas.DtResultados.Rows(0)("CveSubProyecto").ToString())
|
||||
End If
|
||||
If ObjVentas.ManifiestoForVtaGet(UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario, "", Request("CveEmbarqueManifiesto").ToEntero()) Then
|
||||
TmpDT = ObjVentas.DtResultados
|
||||
TmpDT.Columns.Add("EntregaDirecta", GetType(Integer))
|
||||
@@ -4975,6 +4977,9 @@ Partial Class Ventas
|
||||
If (UsuarioActual.TienePermisoProceso(166) Or UsuarioActual.CveRol = 1) AndAlso (LblFolioFiscal.Text = "" Or LblFolioFiscal.Text = "test") Then
|
||||
LkEliminarFactura.Visible = True
|
||||
End If
|
||||
If (UsuarioActual.CveRol = 1) AndAlso (LblFolioFiscal.Text <> "") Then
|
||||
LnkUUIDRelacionados.Visible = True
|
||||
End If
|
||||
|
||||
'Envio Direccion
|
||||
If DbRowVenta("CveDireccionEnvio").ToString().ToEntero() > 0 AndAlso DbRowVenta("CveDireccionEnvio").ToString() IsNot Nothing Then
|
||||
@@ -5109,7 +5114,7 @@ Partial Class Ventas
|
||||
|
||||
Else
|
||||
'cuando no este contabilizada y usa AC, habilita el boton para generar la poliza
|
||||
If UsuarioActual.Empresa.UsaAC AndAlso UsuarioActual.CveRol = 1 Then
|
||||
If UsuarioActual.Empresa.TipoContabilidad = 2 AndAlso UsuarioActual.Empresa.UsaAC AndAlso UsuarioActual.CveRol = 1 Then
|
||||
BtnGenerarPoliza.Visible = True
|
||||
End If
|
||||
If UsuarioActual.Empresa.Funcionalidad(200) = "1" Then
|
||||
@@ -7301,7 +7306,7 @@ Partial Class Ventas
|
||||
dtt.Dispose()
|
||||
End Sub
|
||||
Private Sub CargaClasificaciones()
|
||||
If UsuarioActual.Empresa.UsaAC Then
|
||||
If UsuarioActual.Empresa.TipoContabilidad = 2 AndAlso UsuarioActual.Empresa.UsaAC Then
|
||||
DdlClasificacion.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa, UsoClasificacion:=1).FiltraParametros(" Codigo = '' OR Codigo IS NULL ", Orderby:="Clasificacion")
|
||||
DdlClasificacionPyME.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa, UsoClasificacion:=1).FiltraParametros(" Codigo = '' OR Codigo IS NULL ", Orderby:="Clasificacion")
|
||||
Else
|
||||
@@ -7603,7 +7608,7 @@ Partial Class Ventas
|
||||
Else
|
||||
'MODO NORMAL
|
||||
|
||||
If UsuarioActual.Empresa.UsaAC Then
|
||||
If UsuarioActual.Empresa.TipoContabilidad = 2 AndAlso UsuarioActual.Empresa.UsaAC Then
|
||||
e.Row.FCDropDownList("DdlFR").DataSource = DTPresupuestoIngresos
|
||||
e.Row.FCDropDownList("DdlFR").DataBind()
|
||||
e.Row.FCDropDownList("DdlFR").SelectedValue = e.Row.DBCampo("CvePresupuestoIngreso")
|
||||
@@ -8899,7 +8904,7 @@ Partial Class Ventas
|
||||
End If
|
||||
|
||||
'VALIDA CUENTAS CONTABLES DE AC
|
||||
If UsuarioActual.Empresa.UsaAC Then
|
||||
If UsuarioActual.Empresa.TipoContabilidad = 2 AndAlso UsuarioActual.Empresa.UsaAC Then
|
||||
If ObjFactura.Cliente.IdCtaContClientes <= 0 Then
|
||||
Alert("El Cliente no tiene registrado la cuenta contable", TipoMensaje.MsgError)
|
||||
Exit Sub
|
||||
@@ -9335,7 +9340,7 @@ Partial Class Ventas
|
||||
End If
|
||||
|
||||
Else
|
||||
If UsuarioActual.Empresa.UsaAC Then
|
||||
If UsuarioActual.Empresa.TipoContabilidad = 2 AndAlso UsuarioActual.Empresa.UsaAC Then
|
||||
If ObjContPaq IsNot Nothing Then ObjContPaq.Commit()
|
||||
End If
|
||||
End If
|
||||
@@ -13407,7 +13412,7 @@ Partial Class Ventas
|
||||
If row2.DataKey("IdCtaContable").ToEntero() > 0 Then
|
||||
IdCtaContable = row2.DataKey("IdCtaContable").ToEntero()
|
||||
Else
|
||||
If ObjConta.GetRetCuenta(row2.DataKey("CveConceptoContable").ToEntero(), ObjFactura.CveCliente) Then
|
||||
If UsuarioActual.Empresa.TipoContabilidad = 2 AndAlso ObjConta.GetRetCuenta(row2.DataKey("CveConceptoContable").ToEntero(), ObjFactura.CveCliente) Then
|
||||
If ObjConta.DtResultados.Rows.Count > 0 Then
|
||||
IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCtaContFondoGarantia").ToString().ToEntero()
|
||||
End If
|
||||
@@ -13865,7 +13870,7 @@ Partial Class Ventas
|
||||
FechaMovimiento = ObjFactura.FechaPago
|
||||
CveSubProyectoContabilizar = CveSubProyectoVenta
|
||||
|
||||
If importeMovimiento <> 0 AndAlso ObjConta.GetRetCuenta(ConceptoContable, ObjFactura.CveEmpresa) Then
|
||||
If UsuarioActual.Empresa.TipoContabilidad = 2 AndAlso importeMovimiento <> 0 AndAlso ObjConta.GetRetCuenta(ConceptoContable, ObjFactura.CveEmpresa) Then
|
||||
If ObjConta.DtResultados.Rows.Count > 0 Then
|
||||
IdCtaContable = ObjConta.DtResultados.Rows(0)("Conta_IdCuentaDescuentoVenta").ToString().ToEntero()
|
||||
'CveCuenta = ObjConta.DtResultados.Rows(0)("Conta_IdCuentaDescuentoVenta").ToString().ToEntero()
|
||||
@@ -13938,7 +13943,7 @@ Partial Class Ventas
|
||||
If IdCtaContRetIVA > 0 Then
|
||||
IdCtaContable = IdCtaContRetIVA
|
||||
Else
|
||||
If ObjConta.GetRetCuenta(ConceptoContable, ObjFactura.CveEmpresa) Then
|
||||
If UsuarioActual.Empresa.TipoContabilidad = 2 AndAlso ObjConta.GetRetCuenta(ConceptoContable, ObjFactura.CveEmpresa) Then
|
||||
If ObjConta.DtResultados.Rows.Count > 0 Then
|
||||
IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCuentaRetIVACirculacion").ToString().ToEntero()
|
||||
End If
|
||||
@@ -13964,7 +13969,7 @@ Partial Class Ventas
|
||||
End If
|
||||
|
||||
'OBTENER CUENTAS
|
||||
If ObjConta.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
|
||||
If UsuarioActual.Empresa.TipoContabilidad = 2 AndAlso ObjConta.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
|
||||
If ObjConta.DtResultados.Rows.Count > 0 Then
|
||||
'Conta ContPAQ
|
||||
IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCtaContable").ToString().ToEntero()
|
||||
@@ -13994,7 +13999,7 @@ Partial Class Ventas
|
||||
If IdCtaContRetISR > 0 Then
|
||||
IdCtaContable = IdCtaContRetISR
|
||||
Else
|
||||
If importeMovimiento <> 0 AndAlso ObjConta.GetRetCuenta(ConceptoContable, ObjFactura.CveEmpresa) Then
|
||||
If UsuarioActual.Empresa.TipoContabilidad = 2 AndAlso importeMovimiento <> 0 AndAlso ObjConta.GetRetCuenta(ConceptoContable, ObjFactura.CveEmpresa) Then
|
||||
If ObjConta.DtResultados.Rows.Count > 0 Then
|
||||
IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCuentaRetISRCirculacion").ToString().ToEntero()
|
||||
End If
|
||||
@@ -14042,13 +14047,13 @@ Partial Class Ventas
|
||||
importeMX = importeMX * -1
|
||||
CveIE = ObjFacturaNC.PagadoCveIE
|
||||
|
||||
If importeMovimiento <> 0 AndAlso ObjConta.GetRetCuenta(ConceptoContable, ObjFactura.CveEmpresa) Then
|
||||
If UsuarioActual.Empresa.TipoContabilidad = 2 AndAlso importeMovimiento <> 0 AndAlso ObjConta.GetRetCuenta(ConceptoContable, ObjFactura.CveEmpresa) Then
|
||||
If ObjConta.DtResultados.Rows.Count > 0 Then
|
||||
IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCuentaIEPSTrasladado").ToString().ToEntero()
|
||||
End If
|
||||
End If
|
||||
Else
|
||||
If importeMovimiento <> 0 AndAlso ObjConta.GetRetCuenta(ConceptoContable, ObjFactura.CveEmpresa) Then
|
||||
If UsuarioActual.Empresa.TipoContabilidad = 2 AndAlso importeMovimiento <> 0 AndAlso ObjConta.GetRetCuenta(ConceptoContable, ObjFactura.CveEmpresa) Then
|
||||
If ObjConta.DtResultados.Rows.Count > 0 Then
|
||||
IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCuentaIEPSxTrasladar").ToString().ToEntero()
|
||||
End If
|
||||
@@ -14218,7 +14223,7 @@ Partial Class Ventas
|
||||
'RETIVA X TRASLADAR
|
||||
'OBTENER CUENTAS
|
||||
|
||||
If ObjConta.GetRetCuenta(313, UsuarioActual.CveEmpresa) AndAlso ObjConta.DtResultados.Rows.Count > 0 Then
|
||||
If UsuarioActual.Empresa.TipoContabilidad = 2 AndAlso ObjConta.GetRetCuenta(313, UsuarioActual.CveEmpresa) AndAlso ObjConta.DtResultados.Rows.Count > 0 Then
|
||||
'Conta ContPAQ
|
||||
IdCtaContableRetIVA = ObjConta.DtResultados.Rows(0)("IdCtaContable").ToString.ToEntero
|
||||
Else
|
||||
@@ -14232,7 +14237,7 @@ Partial Class Ventas
|
||||
End If
|
||||
|
||||
'RETIVA PAGADO
|
||||
If ObjConta.GetRetCuenta(314, UsuarioActual.CveEmpresa) AndAlso ObjConta.DtResultados.Rows.Count > 0 Then
|
||||
If UsuarioActual.Empresa.TipoContabilidad = 2 AndAlso ObjConta.GetRetCuenta(314, UsuarioActual.CveEmpresa) AndAlso ObjConta.DtResultados.Rows.Count > 0 Then
|
||||
'Conta ContPAQ
|
||||
IdCtaContableRetIVA = ObjConta.DtResultados.Rows(0)("IdCtaContable").ToString.ToEntero
|
||||
Else
|
||||
@@ -14629,7 +14634,7 @@ Partial Class Ventas
|
||||
End If
|
||||
End Sub
|
||||
Private Sub GuardarVentaAC(ObjVentas As ClsVentas, factura As Modelos.Factura, Msgok As StringBuilder, ObjAC As ClsContPAQi)
|
||||
If UsuarioActual.Empresa.UsaAC Then
|
||||
If UsuarioActual.Empresa.TipoContabilidad = 2 AndAlso UsuarioActual.Empresa.UsaAC Then
|
||||
|
||||
If factura.TipoDocto.Contiene("Ing", "Egs", "OP", "Com") Then
|
||||
|
||||
@@ -15599,7 +15604,7 @@ Partial Class Ventas
|
||||
importeMovimiento = importeMovimiento.RoundSQL
|
||||
importeMX = importeMX.RoundSQL
|
||||
|
||||
If ObjConta.GetRetCuenta(ConceptoContable, CveCliente) Then
|
||||
If UsuarioActual.Empresa.TipoContabilidad = 2 AndAlso ObjConta.GetRetCuenta(ConceptoContable, CveCliente) Then
|
||||
If ObjConta.DtResultados.Rows.Count > 0 Then
|
||||
IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCtaContable").ToString().ToEntero()
|
||||
End If
|
||||
@@ -15861,7 +15866,7 @@ Partial Class Ventas
|
||||
|
||||
importeMovimiento = (TxtIEPS.Text.ToDecimal * (importeMovimiento / TxtTotal.Text.ToDecimal())).RoundSQL
|
||||
importeMX = importeMovimiento
|
||||
If importeMovimiento <> 0 AndAlso ObjConta.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
|
||||
If UsuarioActual.Empresa.TipoContabilidad = 2 AndAlso importeMovimiento <> 0 AndAlso ObjConta.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
|
||||
If ObjConta.DtResultados.Rows.Count > 0 Then
|
||||
IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCuentaIEPSxTrasladar").ToString().ToEntero()
|
||||
End If
|
||||
@@ -15881,7 +15886,7 @@ Partial Class Ventas
|
||||
|
||||
importeMovimiento = (TxtIEPS.Text.ToDecimal * (importeMovimiento / TxtTotal.Text.ToDecimal())).RoundSQL
|
||||
importeMX = importeMovimiento
|
||||
If importeMovimiento <> 0 AndAlso ObjConta.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
|
||||
If UsuarioActual.Empresa.TipoContabilidad = 2 AndAlso importeMovimiento <> 0 AndAlso ObjConta.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
|
||||
If ObjConta.DtResultados.Rows.Count > 0 Then
|
||||
IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCuentaIEPSTrasladado").ToString().ToEntero()
|
||||
End If
|
||||
@@ -16163,7 +16168,7 @@ Partial Class Ventas
|
||||
If IdCtaContRetIVA <> 0 Then
|
||||
IdCtaContable = IdCtaContRetIVA
|
||||
Else
|
||||
If ObjConta.GetRetCuenta(8, UsuarioActual.CveEmpresa) Then
|
||||
If UsuarioActual.Empresa.TipoContabilidad = 2 AndAlso ObjConta.GetRetCuenta(8, UsuarioActual.CveEmpresa) Then
|
||||
If ObjConta.DtResultados.Rows.Count > 0 Then
|
||||
IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCuentaRetIVACirculacion").ToString().ToEntero()
|
||||
End If
|
||||
@@ -16189,7 +16194,7 @@ Partial Class Ventas
|
||||
If IdCtaContRetISR <> 0 Then
|
||||
IdCtaContable = IdCtaContRetISR
|
||||
Else
|
||||
If ObjConta.GetRetCuenta(9, UsuarioActual.CveEmpresa) Then
|
||||
If UsuarioActual.Empresa.TipoContabilidad = 2 AndAlso ObjConta.GetRetCuenta(9, UsuarioActual.CveEmpresa) Then
|
||||
If ObjConta.DtResultados.Rows.Count > 0 Then
|
||||
IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCuentaRetISRCirculacion").ToString().ToEntero()
|
||||
End If
|
||||
@@ -16255,7 +16260,7 @@ Partial Class Ventas
|
||||
If IdCtaContRetIVA <> 0 Then
|
||||
IdCtaContable = IdCtaContRetIVA
|
||||
Else
|
||||
If ObjConta.GetRetCuenta(62, UsuarioActual.CveEmpresa) Then
|
||||
If UsuarioActual.Empresa.TipoContabilidad = 2 AndAlso ObjConta.GetRetCuenta(62, UsuarioActual.CveEmpresa) Then
|
||||
IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCuentaRetIVACirculacion").ToString().ToEntero()
|
||||
End If
|
||||
End If
|
||||
@@ -16279,7 +16284,7 @@ Partial Class Ventas
|
||||
If IdCtaContRetISR <> 0 Then
|
||||
IdCtaContable = IdCtaContRetISR
|
||||
Else
|
||||
If ObjConta.GetRetCuenta(63, UsuarioActual.CveEmpresa) Then
|
||||
If UsuarioActual.Empresa.TipoContabilidad = 2 AndAlso ObjConta.GetRetCuenta(63, UsuarioActual.CveEmpresa) Then
|
||||
If ObjConta.DtResultados.Rows.Count > 0 Then
|
||||
IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCuentaRetISRCirculacion").ToString().ToEntero()
|
||||
End If
|
||||
@@ -16781,7 +16786,7 @@ Partial Class Ventas
|
||||
If RespCancelacion.Verificado Then
|
||||
'falta verificar traer el acuse y reenviarlo
|
||||
|
||||
If UsuarioActual.Empresa.UsaAC Then
|
||||
If UsuarioActual.Empresa.TipoContabilidad = 2 AndAlso UsuarioActual.Empresa.UsaAC Then
|
||||
Dim IDMPoliza As Modelos.RetornoPolizaConta = GenerarPolizaAC(ObjAC, ObjFacturaDevolucion, True)
|
||||
IDPoliza = IDMPoliza.IdPoliza
|
||||
If IDMPoliza.IdPoliza <= 0 Then
|
||||
@@ -16872,7 +16877,7 @@ Partial Class Ventas
|
||||
Mensaje = "La factura no se pudo cancelar. <br />Posbiles causas:<br /> - Los servicios del SAT están ocupados.<br /> - El Folio Fiscal no ha quedado registrado."
|
||||
ElseIf Respuesta.NoCertificadoSAT <> String.Empty Then
|
||||
|
||||
If UsuarioActual.Empresa.UsaAC Then
|
||||
If UsuarioActual.Empresa.TipoContabilidad = 2 AndAlso UsuarioActual.Empresa.UsaAC Then
|
||||
Dim IDMPoliza As Modelos.RetornoPolizaConta = GenerarPolizaAC(ObjAC, ObjFacturaDevolucion, True)
|
||||
IDPoliza = IDMPoliza.IdPoliza
|
||||
If IDMPoliza.IdPoliza <= 0 Then
|
||||
@@ -18490,7 +18495,7 @@ Partial Class Ventas
|
||||
Row("SATClaveProdServ") = DrPS("SATClavePS")
|
||||
Row("SATClaveUM") = DrPS("SATClaveUnidadMedida")
|
||||
|
||||
If UsuarioActual.Empresa.UsaAC Then
|
||||
If UsuarioActual.Empresa.TipoContabilidad = 2 AndAlso UsuarioActual.Empresa.UsaAC Then
|
||||
Row("CvePresupuestoIngreso") = Me.DdlFuenteRecaudacion.SelectedValue
|
||||
End If
|
||||
|
||||
@@ -19495,7 +19500,7 @@ Partial Class Ventas
|
||||
Dim DdlFR_Gv As DropDownList = CType(sender, DropDownList)
|
||||
Dim index As Integer = CType(DdlFR_Gv.NamingContainer, GridViewRow).FCLiteral("LtlConsecutivo").Text.ToString().ToEntero()
|
||||
|
||||
If UsuarioActual.Empresa.UsaAC Then
|
||||
If UsuarioActual.Empresa.TipoContabilidad = 2 AndAlso UsuarioActual.Empresa.UsaAC Then
|
||||
TmpDT(index - 1)("CvePresupuestoIngreso") = DdlFR_Gv.SelectedValue
|
||||
End If
|
||||
TmpDT.AcceptChanges()
|
||||
@@ -19692,7 +19697,7 @@ Partial Class Ventas
|
||||
Dim ErrorMovimiento = False
|
||||
|
||||
'Elimina la poliza
|
||||
If (UsuarioActual.Empresa.UsaAC Or UsuarioActual.Empresa.UsaContabilidad) AndAlso IdPoliza > 0 Then
|
||||
If UsuarioActual.Empresa.TipoContabilidad = 2 AndAlso (UsuarioActual.Empresa.UsaAC Or UsuarioActual.Empresa.UsaContabilidad) AndAlso IdPoliza > 0 Then
|
||||
If Not ObjAC.RemovePoliza(IdPoliza) Then
|
||||
ErrorMovimiento = True
|
||||
End If
|
||||
@@ -24725,7 +24730,7 @@ Partial Class Ventas
|
||||
DdlTipo.DataBind()
|
||||
End Sub
|
||||
Private Sub CargaClasificacionesPS()
|
||||
If UsuarioActual.Empresa.UsaAC Then
|
||||
If UsuarioActual.Empresa.TipoContabilidad = 2 AndAlso UsuarioActual.Empresa.UsaAC Then
|
||||
DdlClasificacionPS.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa, UsoClasificacion:=1).FiltraParametros(" Codigo = '' OR Codigo IS NULL ", Orderby:="Clasificacion")
|
||||
'DdlTipo.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa, UsoClasificacion:=1).FiltraParametros(" Codigo = '' OR Codigo IS NULL ", Orderby:="Clasificacion")
|
||||
Else
|
||||
@@ -32927,7 +32932,7 @@ Partial Class Ventas
|
||||
|
||||
Protected Sub TxtFecha_TextChanged(sender As Object, e As EventArgs)
|
||||
'SI USUARIO USA AMORTIZACIÓN CONTABLE, se carga las tablas para usarlas mas adelante
|
||||
If UsuarioActual.CveEmpresa = 48 AndAlso UsuarioActual.Empresa.UsaAC Then
|
||||
If UsuarioActual.Empresa.TipoContabilidad = 2 AndAlso UsuarioActual.CveEmpresa = 48 AndAlso UsuarioActual.Empresa.UsaAC Then
|
||||
|
||||
DdlTipoComprobante.Items.Remove(DdlTipoComprobante.Items.FindByValue("Rem"))
|
||||
DdlTipoComprobante.Items.Remove(DdlTipoComprobante.Items.FindByValue("Cot"))
|
||||
@@ -34860,5 +34865,58 @@ Partial Class Ventas
|
||||
UpAgregarMercancia.Update()
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub LnkUUIDRelacionados_Click(sender As Object, e As EventArgs)
|
||||
|
||||
Dim Vigencia = Timbrado.VerificarVigenciaSAT(FolioFiscal, UsuarioActual.Empresa.RFC, LblRFC.Text, TxtTotal.Text, True)
|
||||
Dim sb As New StringBuilder
|
||||
|
||||
sb.AppendFormat("<b>{0}</b> <br/>", Vigencia.EsCancelable)
|
||||
|
||||
Dim Relacionados = Timbrado.ConsultarUUIDRelacionados(UsuarioActual.Empresa, FolioFiscal, UsuarioActual.Empresa.FacturaProduccion)
|
||||
If Relacionados IsNot Nothing Then
|
||||
Dim sbExtra As New StringBuilder()
|
||||
If Relacionados.Codigo = 500 Then
|
||||
sbExtra.Append("El servicio de verificación de documentos relacionados no esta disponible.")
|
||||
Else
|
||||
sbExtra.Append(Relacionados.Mensaje)
|
||||
|
||||
Dim SbHijos = New StringBuilder()
|
||||
Dim SbPadres = New StringBuilder()
|
||||
|
||||
If Relacionados.RelacionadosPadre IsNot Nothing Then
|
||||
For Each padre In Relacionados.RelacionadosPadre
|
||||
SbPadres.AppendFormat("{0};", padre.Uuid)
|
||||
Next
|
||||
If SbPadres.Length > 0 Then
|
||||
SbPadres.Remove(SbPadres.Length - 1, 1)
|
||||
End If
|
||||
End If
|
||||
|
||||
Using ObjVentas As New ClsVentas
|
||||
|
||||
If SbPadres.Length > 0 Then
|
||||
If ObjVentas.GetFacturasRelacionadasPorFolioFiscal(SbPadres.ToString(), UsuarioActual.CveEmpresa) Then
|
||||
Dim dtt As DataTable = ObjVentas.DtResultados.FiltraParametros($"CveVenta <> {CveVenta}")
|
||||
|
||||
For Each dr As DataRow In dtt.Rows
|
||||
sb.AppendFormat("{0}-{1}-{2}<br/>", dr("TipoDocto"), dr("SerieFolio"), dr("FolioFiscal"))
|
||||
Next
|
||||
|
||||
End If
|
||||
End If
|
||||
|
||||
End Using
|
||||
|
||||
End If
|
||||
|
||||
If sbExtra.Length > 0 Then
|
||||
LbExtraRefacturacion.Text = $"<br><b>*{sbExtra.ToString()}</b>"
|
||||
End If
|
||||
|
||||
End If
|
||||
Alert(sb.ToString(), TipoMensaje.MsgInformacion)
|
||||
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
Reference in New Issue
Block a user