diff --git a/App_Code/ClsAcumuladores.vb b/App_Code/ClsAcumuladores.vb
index 614160d81..c243c6058 100644
--- a/App_Code/ClsAcumuladores.vb
+++ b/App_Code/ClsAcumuladores.vb
@@ -477,20 +477,21 @@ Public Class ClsAcumuladores
End Try
Return Retorno
- End Function
-
+ End Function
+
#End Region
-
+
#Region " FOLIOS GARANTÍA "
-
- Public Function FoliosGarantiaGet(CveFolioGarantia As Integer, CveEmpresa As Integer) As Boolean
+
+ Public Function FoliosGarantiaGet(CveFolioGarantia As Integer, CveEmpresa As Integer, Optional Estatus As Integer = -1) As Boolean
Dim Retorno As Boolean = False
'Data = New DataTable
SqlDataAdapter("PA_Acum_FoliosGarantiaGet")
With SqlAdapter.SelectCommand.Parameters
- .Add("@CveFolioGarantia", SqlDbType.Int).Value = CveFolioGarantia
+ .Add("@CveFolioGarantia", SqlDbType.Int).Value = CveFolioGarantia
+ .Add("@Estatus", SqlDbType.Int).Value = Estatus
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
End With
@@ -753,7 +754,21 @@ Public Class ClsAcumuladores
SqlAdapter.Fill(Data)
Retorno = True
Catch ex As SqlException
- OnError("Ocurrió un al agregar la garantia detalle. ", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
+ OnError("Ocurrió un al obtener la garantía detalle. ", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
+ End Try
+ Return Retorno
+ End Function
+ Public Function GetGarantiasPolizaVirtual(CveVenta As Integer) As Boolean
+ Dim Retorno As Boolean = False
+ SqlDataAdapter("PA_Acum_GarantiasPolizaVirtualGet")
+ With SqlAdapter.SelectCommand.Parameters
+ .Add("@CveVenta", SqlDbType.Int).Value = CveVenta
+ End With
+ Try
+ SqlAdapter.Fill(Data)
+ Retorno = True
+ Catch ex As SqlException
+ OnError("Ocurrió un al obtener la información de poliza virtual.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try
Return Retorno
End Function
diff --git a/App_Code/ClsClientes.vb b/App_Code/ClsClientes.vb
index 2b603bb68..a268761f6 100644
--- a/App_Code/ClsClientes.vb
+++ b/App_Code/ClsClientes.vb
@@ -568,7 +568,7 @@ Public Class ClsClientes
Optional ObservacionRevsion As String = "-1", Optional ReferenciaFiscal As String = "-1", Optional Celular As String = "-1", Optional ExtOtros As String = "-1", Optional CveUsoCFDI As Integer = -1, Optional CveFormaPago33 As Integer = -1, Optional CveMetodoPago33 As Integer = -1, Optional DesglosaIEPS As Boolean = True,
Optional AplicaComercioExterior As Boolean = False, Optional CveTipoOperacion As Integer = -1, Optional CvePedimento As Integer = -1, Optional CveIncoterm As Integer = -1, Optional CvePais As Integer = -1, Optional CveEstado As Integer = -1, Optional CveMunicipio As Integer = -1, Optional CveColonia As Integer = -1,
Optional CveMotivoTraslado As Integer = 0, Optional NumRegIdTrib As String = "", Optional ComExtEstado As String = "-1", Optional ComExtMunicipio As String = "-1", Optional ComExtColonia As String = "-1", Optional RequiereOC As Boolean = False,
- Optional LT As String = "0", Optional LG As String = "0", Optional EsDistribuidor As Boolean = False, Optional TipoCliente As Integer = 1, Optional CargoUsado As Boolean = False, Optional BonificacionUsado As Boolean = False) As Boolean
+ Optional LT As String = "0", Optional LG As String = "0", Optional EsDistribuidor As Boolean = False, Optional TipoCliente As Integer = 1, Optional CargoUsado As Boolean = False, Optional BonificacionUsado As Boolean = False, Optional CveTipoRetencion As Integer = 0) As Boolean
Dim Retorno As Boolean = False
@@ -702,6 +702,7 @@ Public Class ClsClientes
.Add("@TipoCliente", SqlDbType.Int).Value = TipoCliente
.Add("@CargoUsado", SqlDbType.Bit).Value = CargoUsado
.Add("@BonificacionUsado", SqlDbType.Bit).Value = BonificacionUsado
+ .Add("@CveTipoRetencion", SqlDbType.TinyInt).Value = CveTipoRetencion
.Add("@RETURN_VALUE", SqlDbType.Int).Direction = ParameterDirection.ReturnValue
End With
@@ -747,7 +748,7 @@ Public Class ClsClientes
Optional AplicaComercioExterior As Boolean = False, Optional CveTipoOperacion As Integer = -1, Optional CvePedimento As Integer = -1, Optional CveIncoterm As Integer = -1, Optional CvePais As Integer = -1, Optional CveEstado As Integer = -1, Optional CveMunicipio As Integer = -1, Optional CveColonia As Integer = -1,
Optional CveMotivoTraslado As Integer = 0, Optional NumRegIdTrib As String = "-1", Optional ComExtEstado As String = "-1", Optional ComExtMunicipio As String = "-1", Optional ComExtColonia As String = "-1",
Optional ApellidoPaternoPF As String = "-1", Optional ApellidoMaternoPF As String = "-1", Optional NombresPF As String = "-1", Optional RequiereOC As Boolean = False,
- Optional LT As String = "0", Optional LG As String = "0", Optional EsDistribuidor As Boolean = False, Optional TipoCliente As Integer = 1, Optional CargoUsado As Boolean = False, Optional BonificacionUsado As Boolean = False) As Boolean
+ Optional LT As String = "0", Optional LG As String = "0", Optional EsDistribuidor As Boolean = False, Optional TipoCliente As Integer = 1, Optional CargoUsado As Boolean = False, Optional BonificacionUsado As Boolean = False, Optional CveTipoRetencion As Integer = 0) As Boolean
Dim Retorno As Boolean = False
@@ -896,7 +897,8 @@ Public Class ClsClientes
.Add("@EsDistribuidor", SqlDbType.Bit).Value = EsDistribuidor
.Add("@TipoCliente", SqlDbType.Int).Value = TipoCliente
.Add("@CargoUsado", SqlDbType.Bit).Value = CargoUsado
- .Add("@BonificacionUsado", SqlDbType.Bit).Value = BonificacionUsado
+ .Add("@BonificacionUsado", SqlDbType.Bit).Value = BonificacionUsado
+ .Add("@CveTipoRetencion", SqlDbType.TinyInt).Value = CveTipoRetencion
End With
Try
SqlAdapter.Fill(Data)
@@ -1581,6 +1583,22 @@ Public Class ClsClientes
Try
SqlAdapter.Fill(Data)
Retorno = True
+ Catch Ex1 As SqlException
+
+ If Ex1.Message.Contains("Número: 2627;") Then
+ Alert("El Nuevo Cliente no se guardo debido a que actualmente se encuentra registrado", TipoMensaje.MsgAdvertencia)
+
+ ElseIf Ex1.Message.Contains("Número: 2601;") Then
+ If Ex1.Message.Contains("UN_ClientesRFCEmpresa") Then
+ Alert("Ya existe un cliente registrado con el mismo RFC.", TipoMensaje.MsgAdvertencia)
+ End If
+
+ If Ex1.Message.Contains("IND_Clientes_Codigo") Then
+ Alert("Ya existe un cliente registrado con el mismo Código.", TipoMensaje.MsgAdvertencia)
+ End If
+ Else
+ Me.OnError("Ocurrió un error al Intentar guardar el Nuevo Cliente.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
+ End If
Catch ex As Exception
OnError("Ocurrió un error al agregar el cliente", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try
diff --git a/App_Code/ClsContabilidad.vb b/App_Code/ClsContabilidad.vb
index 8f89239ca..597854f57 100644
--- a/App_Code/ClsContabilidad.vb
+++ b/App_Code/ClsContabilidad.vb
@@ -5768,6 +5768,7 @@ Public Class ClsContabilidad
.Add("@Opcion", SqlDbType.Int).Value = Opcion
.Add("@Valor", SqlDbType.Int).Direction = ParameterDirection.Output
.Add("@MsgSalida", SqlDbType.VarChar, 100).Direction = ParameterDirection.Output
+ .Add("@MsgPrePolizaSalida", SqlDbType.VarChar, 800).Direction = ParameterDirection.Output
.Add("@Diferencia", SqlDbType.Float).Direction = ParameterDirection.Output
End With
diff --git a/App_Code/ClsGenerales.vb b/App_Code/ClsGenerales.vb
index 79167e0a2..d64782ccb 100644
--- a/App_Code/ClsGenerales.vb
+++ b/App_Code/ClsGenerales.vb
@@ -133,6 +133,24 @@ Public Class ClsGenerales
End With
End Sub
+ Public Function RepConciliacionSatDetalleGET(cveEmpresa As Int32, tipoDocto As String, fechaI As String, fechaF As String, RegistroEn As Integer) As Boolean
+ Dim retorno As Boolean = False
+ DataAdapter("PA_RepConciliacionSatDetalleGET", CommandType.StoredProcedure)
+ With SqlAdapter.SelectCommand.Parameters
+ .Add("@CveEmpresa", SqlDbType.Int).Value = cveEmpresa
+ .Add("@TipoDocto", SqlDbType.VarChar).Value = tipoDocto
+ .Add("@RegistroEn", SqlDbType.Int).Value = RegistroEn
+ .Add("@FechaI", SqlDbType.VarChar).Value = fechaI
+ .Add("@FechaF", SqlDbType.VarChar).Value = fechaF
+ End With
+ Try
+ SqlAdapter.Fill(Data)
+ retorno = True
+ Catch ex As Exception
+ OnError("Ocurrió un error al obtener los registros de Conciliaciones SAT.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
+ End Try
+ Return retorno
+ End Function
Public Function RepConciliacionSatGET(cveEmpresa As Int32, tipoDocto As String, fechaI As String, fechaF As String) As Boolean
Dim retorno As Boolean = False
diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb
index 150011e9b..761bcfd3e 100644
--- a/App_Code/ClsPaginas.vb
+++ b/App_Code/ClsPaginas.vb
@@ -3985,9 +3985,11 @@ Public Class ClsPaginas
PaginaDict.Add("/Contabilidad/RepBalanzaComprobacion.aspx".ToUpper(), 344)
PaginaDict.Add("/Contabilidad/CatCuentasSIG.aspx".ToUpper(), 405)
PaginaDict.Add("/Contabilidad/RepIEPS.aspx".ToUpper(), 714)
- PaginaDict.Add("/Contabilidad/CatPeriodosBloqueo.aspx".ToUpper(), 677)
+ PaginaDict.Add("/Contabilidad/CatPeriodosBloqueo.aspx".ToUpper(), 677)
+ PaginaDict.Add("/Contabilidad/CatClasificacionPorcentaje.aspx".ToUpper(), 752)
+
#End Region
- 'CONTABILIDAD2
+ 'CONTABILIDAD2
#Region "Contabilidad2"
PaginaDict.Add("/Contabilidad2/RepAnexoCatalogo.aspx".ToUpper(), 580)
PaginaDict.Add("/Contabilidad2/RepBalanzaComprobacion.aspx".ToUpper(), 582)
diff --git a/App_Code/ClsVentas.vb b/App_Code/ClsVentas.vb
index 955f487b8..25fb3c073 100644
--- a/App_Code/ClsVentas.vb
+++ b/App_Code/ClsVentas.vb
@@ -317,7 +317,7 @@ Public Class ClsVentas
Optional ObservacionesAlmacen As String = "", Optional CveSubProyecto As Integer = -1, Optional CveSubProyectoEjecucion As Integer = -1, Optional CveSubProyectoCobranza As Integer = -1,
Optional CveFormaPago33 As Integer = -1, Optional CveMetodoPago33 As Integer = -1, Optional CveUsoCFDI As Integer = -1, Optional OrdenCompra As String = "-1", Optional CveCuentaTerminal As Integer = -1, Optional CveTipoRelacion As Integer = -1, Optional ImpuestoLocal As Double = 0,
Optional CveTipoAmortizacionAnticipo As Integer = -1, Optional CveVentaRelacion As Integer = -1, Optional ImporteRelacion As Decimal = -1, Optional CveEmpresaCRM As Integer = -1, Optional EsInterno As Integer = -1, Optional CveAcercamientoCRM As Integer = -1,
- Optional DiasCredito As Integer = 0, Optional EsDiasCreditoFijo As Boolean = False, Optional AnticipoEspecial As Boolean = False) As Boolean
+ Optional DiasCredito As Integer = 0, Optional EsDiasCreditoFijo As Boolean = False, Optional AnticipoEspecial As Boolean = False, Optional Kilometraje As Double = 0) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_VentasAdd")
@@ -403,6 +403,7 @@ Public Class ClsVentas
.Add("@DiasCredito", SqlDbType.Int).Value = DiasCredito
.Add("@EsDiasCreditoFijo", SqlDbType.Bit).Value = EsDiasCreditoFijo
.Add("@AnticipoEspecial", SqlDbType.Bit).Value = AnticipoEspecial
+ .Add("@Kilometraje", SqlDbType.Float).Value = Kilometraje
.Add("@RETURN_VALUE", SqlDbType.Int).Direction = ParameterDirection.ReturnValue
End With
@@ -430,7 +431,8 @@ Public Class ClsVentas
Fecha As Date, Observaciones As String, CveEmpresa As Integer, CveVenta As Integer, CveMetodoPago As Integer, FormaPago As Integer,
Optional TipoDocto As String = "Cot", Optional Vigencia As Date = MinFecha, Optional CondicionesPago As Integer = -1,
Optional AtencionA As String = "-1", Optional PedidoContrato As String = "-1", Optional CveFormaPago33 As Integer = -1, Optional CveMetodoPago33 As Integer = -1,
- Optional CveCliente As Integer = -1, Optional CveClienteSucursal As Integer = -1, Optional OrdenCompra As String = "-1", Optional RetIVA As Double = -1, Optional RetISR As Double = -1) As Boolean
+ Optional CveCliente As Integer = -1, Optional CveClienteSucursal As Integer = -1, Optional OrdenCompra As String = "-1", Optional RetIVA As Double = -1,
+ Optional RetISR As Double = -1, Optional Kilometraje As Double = 0) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Vta_VentasUpdate")
@@ -460,6 +462,7 @@ Public Class ClsVentas
.Add("@CveCliente", SqlDbType.Int).Value = CveCliente
.Add("@CveClienteSucursal", SqlDbType.Int).Value = CveClienteSucursal
.Add("@OrdenCompra", SqlDbType.VarChar).Value = OrdenCompra
+ .Add("@Kilometraje", SqlDbType.Float).Value = Kilometraje
End With
Try
@@ -2674,6 +2677,45 @@ Public Class ClsVentas
Return OnError
End Function
+ Public Function GetFacturasCanceladasPendientesWS(RFC As String, CveEmpresa As Integer, Optional showalert As Boolean = True) As Boolean
+ Dim retorno As Boolean = False
+ Try
+
+ Dim objServicio As Cancelacion.CancelacionSoapClient = New Cancelacion.CancelacionSoapClient()
+ Dim resp As Cancelacion.StructCancel = objServicio.ObtienePendientes(RFC, "UserTest", "1234567890")
+ If resp.Estado = 0 Then
+ Dim XmlPendientes As String = System.Text.Encoding.UTF8.GetString(Convert.FromBase64String(resp.Xml))
+ Dim theReader As IO.StringReader = New IO.StringReader(XmlPendientes)
+ Dim theDataSet As DataSet = New DataSet()
+ theDataSet.ReadXml(theReader)
+
+ If theDataSet.Tables(0).Rows(0)("Uuid").ToString() <> "null" Then
+ Dim sb = New StringBuilder()
+
+ For Each item As DataRow In theDataSet.Tables(0).Rows
+ sb.AppendFormat("{0};", item("Uuid").ToString())
+ Next
+
+ If GetFacturasCanceladasPendientes(sb.ToString(), CveEmpresa) Then
+ retorno = True
+ End If
+
+ Else
+ If showalert Then
+ Alert("No se encontraron cancelaciones pendientes", ModExtensiones.TipoMensaje.MsgError)
+ End If
+ End If
+ Else
+ Alert("Error al obtener cancelaciones pendientes: " & resp.Descripcion, ModExtensiones.TipoMensaje.MsgError)
+ End If
+
+ Catch ex As Exception
+ retorno = False
+ Me.OnError("Error al obtener cancelaciones pendientes: ", ex, "")
+ End Try
+ Return retorno
+ End Function
+
Public Function UpdateVentaFacturas(CveFactura As Integer, CveVenta As Integer, CveEmpresa As Integer) As Boolean
Dim OnError As Boolean = False
diff --git a/App_Code/Modelos.vb b/App_Code/Modelos.vb
index fea43d93f..6df87817e 100644
--- a/App_Code/Modelos.vb
+++ b/App_Code/Modelos.vb
@@ -368,7 +368,7 @@ Namespace Modelos
End If
Timbre = New CFDITimbre
End Sub
- Public Sub New(UsuarioActual As Usuario, CveVenta As Integer, CveEmpresa As Integer, Optional DirectorioServidor As String = "")
+ Public Sub New(UsuarioActual As Usuario, CveVenta As Integer, CveEmpresa As Integer, Optional DirectorioServidor As String = "", Optional EsCancelacion As Boolean = False)
Me.UsuarioActual = UsuarioActual
Me.CveVenta = CveVenta
Me.CveEmpresa = CveEmpresa
@@ -393,7 +393,7 @@ Namespace Modelos
Me.DtDetalle = ObjVentas.DtResultados.Copy()
End If
ObjVentas.Dispose()
- IniciaValoresVentas()
+ IniciaValoresVentas(EsCancelacion)
If String.IsNullOrEmpty(DirectorioServidor) Then
DirectorioServidor = HttpContext.Current.Server.MapPath("/")
End If
@@ -446,7 +446,7 @@ Namespace Modelos
Me.IEPS = 0
Me.CveAlmacenTraspasoOrigen = 0
End Sub
- Private Sub IniciaValoresVentas()
+ Private Sub IniciaValoresVentas(Optional EsCancelacion As Boolean = False)
If CveVenta > 0 AndAlso CveEmpresa > 0 Then
Me.DtAnticipos = New DataTable()
Me.DtAntNCVinculadas = New DataTable()
@@ -492,6 +492,10 @@ Namespace Modelos
Me.DtNCVinculadas = ObjVentas.DtResultados.Copy()
End If
+ If TipoDocto.Contiene("Ant") AndAlso EsCancelacion Then
+ EsNCAmortizacion = True
+ End If
+
If ObjVentas.GetVentasAntNC(-1, CveVenta, AplicaAmortizacion:=EsNCAmortizacion) Then
Me.DtAnticipos = ObjVentas.DtResultados.Copy()
End If
@@ -2333,7 +2337,7 @@ Namespace Modelos
Exit Select
End If
- If ObjFactura.TipoDocto.Contiene("Ing", "Egs") AndAlso ValorMultiplicador = -1 Then
+ If ObjFactura.TipoDocto.Contiene("Ing", "Egs", "Ant") AndAlso ValorMultiplicador = -1 Then
For Each row2 As DataRow In ObjFactura.DtAnticipos.Rows
If row2("CveConceptoContable").ToString().ToEntero = 11 Then
importeMovimiento = row2("Importe").ToString().ToDecimal * ValorMultiplicador '- ((row2.FCTextBox("TxtAnticipo" & row2.RowIndex).Text.ToDecimal / row2.DataKey("TotalAnticipo").ToDecimal) * row2.DataKey("IVAAnticipo").ToDecimal)
@@ -2344,7 +2348,10 @@ Namespace Modelos
CveSubProyectoContabilizar = CveSubProyectoVenta
If importeMovimiento <> 0 Then
- If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=row2("CveVenta").ToString().ToEntero, CveVentaAmortizacion:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIEAnticipo, ImporteMX:=importeMovimiento * tipoCambio, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveCuenta:=CveCuenta, CveSubProyecto:=CveSubProyectoContabilizar, Contabilizable:=SeContabiliza) Then
+ If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1,
+ CveVenta:=ObjFactura.CveVenta, CveVentaAmortizacion:=row2("CveVenta").ToString().ToEntero, CveCliente:=ObjFactura.CveCliente,
+ CveIE:=CveIEAnticipo, ImporteMX:=importeMovimiento * tipoCambio, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveCuenta:=CveCuenta,
+ CveSubProyecto:=CveSubProyectoContabilizar, Contabilizable:=SeContabiliza) Then
ErrorPrepoliza = True
Exit For
Else
diff --git a/App_Code/modExtensiones.vb b/App_Code/modExtensiones.vb
index 9832061b6..2a531ef0d 100644
--- a/App_Code/modExtensiones.vb
+++ b/App_Code/modExtensiones.vb
@@ -54,8 +54,8 @@ Namespace Extensiones
' BaseDatos = CType(System.Web.HttpContext.Current.Session("UsuarioSIG"), Usuario).Empresa.BaseDatosNombre
'End If
-
- Return String.Format("Data Source=192.168.0.2;Initial Catalog={0};User Id=JCaudillo;Password=JCau127*953;pooling=True; Min Pool Size=10;Application Name=SIG;", BaseDatos)
+ Return ConfigurationManager.ConnectionStrings("Conexion").ConnectionString
+ ' Return String.Format("Data Source=192.168.0.2;Initial Catalog={0};User Id=JCaudillo;Password=JCau127*953;pooling=True; Min Pool Size=10;Application Name=SIG;", BaseDatos)
End Function
diff --git a/Ashx/SIGWeb.ashx b/Ashx/SIGWeb.ashx
index a1d1c9720..faf915fda 100644
--- a/Ashx/SIGWeb.ashx
+++ b/Ashx/SIGWeb.ashx
@@ -247,13 +247,13 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
'ObjProveedores.Dispose()
Dim dt As DataTable = DirectCast(context.Application(AppNombre), DataTable).FiltraParametros($"CveEmpresa = {CveEmpresa}")
If dt IsNot Nothing AndAlso dt.Rows.Count > 0 Then
- DtRetorno = dt.FiltraParametros($"RazonSocial like '%{Name}%'")
+ DtRetorno = dt.FiltraParametros($"NombreCortoProveedor like '%{Name}%'")
End If
End If
If DtRetorno IsNot Nothing AndAlso DtRetorno.Rows.Count > 0 Then
DtRetorno.Columns("CveProveedor").ColumnName = "id"
- DtRetorno.Columns("RazonSocial").ColumnName = "text"
+ DtRetorno.Columns("NombreCortoProveedor").ColumnName = "text"
retorno = JsonConvert.SerializeObject(DtRetorno).ToString
context.Response.Write(retorno)
Else
diff --git a/Bancos/ConciliacionesBancarias.aspx.vb b/Bancos/ConciliacionesBancarias.aspx.vb
index f84d6bdb4..6e71943d2 100644
--- a/Bancos/ConciliacionesBancarias.aspx.vb
+++ b/Bancos/ConciliacionesBancarias.aspx.vb
@@ -613,6 +613,7 @@ Partial Class Bancos_ConciliacionesBancariasaspx
params.Add(New ReportParameter("SaldoFinalLibros", SaldoFinalLibros.FormatoNumero))
Dim SaldoFinalContabilidad As Double = 0
+ Dim SaldoFinalContabilidadComplementaria As Double = 0
If DdlCuenta.SelectedValue.ToEntero > 0 Then
Dim CveCuenta As Integer = 0
Dim CveCuentaComplementaria As Integer = 0
@@ -636,7 +637,7 @@ Partial Class Bancos_ConciliacionesBancariasaspx
If CveCuentaComplementaria > 0 Then
If ObjConta.GetMovimientosAuxiliaresCatalogo(CveCuentaComplementaria, txtFechaI.Text.ToDate, txtFechaF.Text.ToDate, CveMoneda, "-1", UsuarioActual.CveEmpresa, "1") Then
If ObjConta.DtResultados.Rows.Count > 1 Then
- SaldoFinalContabilidad += ObjConta.DtResultados.Rows(1)("SaldoActual").ToString.ToDouble
+ SaldoFinalContabilidadComplementaria = ObjConta.DtResultados.Rows(1)("SaldoActual").ToString.ToDouble
End If
End If
End If
@@ -644,6 +645,7 @@ Partial Class Bancos_ConciliacionesBancariasaspx
End If
params.Add(New ReportParameter("SaldoFinalContabilidad", (SaldoFinalContabilidad.FormatoNumero)))
+ params.Add(New ReportParameter("SaldoFinalContabilidadComplementaria", (SaldoFinalContabilidadComplementaria.FormatoNumero)))
params.Add(New ReportParameter("Diferencia", (SaldoFinalLibros - SaldoFinalContabilidad).FormatoNumero))
If Imagen.Exists Then
diff --git a/Bancos/FluctuacionCambiaria.aspx.vb b/Bancos/FluctuacionCambiaria.aspx.vb
index 64f05ff7c..3146fb542 100644
--- a/Bancos/FluctuacionCambiaria.aspx.vb
+++ b/Bancos/FluctuacionCambiaria.aspx.vb
@@ -315,6 +315,8 @@ Partial Class Bancos_FluctuacionCambiaria
Dim Total As Decimal = 0
Dim Conta As New ClsContabilidad
Conta.IniciaTransacSQL()
+ Dim ObjContPaq As New ClsContPAQi(UsuarioActual.Empresa)
+ ObjContPaq.IniciaTransacSQL()
Dim CvePrePoliza As Integer = Conta.AddPrePolizas("Banc/Fluctua", 1, 0, 0, 1, TxtFecha.Text.ToDate, "Fluctuación", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
Dim idCta As Integer = 0
Dim CveCuenta As Integer = 0
@@ -372,8 +374,19 @@ Partial Class Bancos_FluctuacionCambiaria
End If
Next
+ Dim SeContabilizo As Boolean = False
+
+ Dim AutoConta As Boolean = UsuarioActual.Empresa.Funcionalidad(200) = "1"
+ If AutoConta Then
+ If Conta.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa, ObjConta:=ObjContPaq) Then
+ SeContabilizo = True
+ Else
+ Alert("Ocurrio un Error al contabilizar, pongase en contacto con Soporte Técnico", TipoMensaje.MsgError)
+ End If
+ End If
+
+ If Not ErrorRegistrar And SeContabilizo Then
- If Not ErrorRegistrar Then
Conta.Commit()
Alert(String.Format("La Fluctuación se ha generado Ver Póliza", CvePrePoliza), TipoMensaje.MsgInformacion)
CargaDatosCuentas()
diff --git a/Bancos/IE.aspx.vb b/Bancos/IE.aspx.vb
index 79d753686..1027f7906 100644
--- a/Bancos/IE.aspx.vb
+++ b/Bancos/IE.aspx.vb
@@ -2322,7 +2322,9 @@ Partial Class Bancos_IE
ElseIf CveProveedor > 0 Then
CveConceptoCompra = 21 'Pago a Proveedor/CAncelacion Anticipos
CveConceptoContable = 30 'Bancos
- CvePlantillaPoliza = 7
+ CvePlantillaPoliza = 7
+ ElseIf CveCliente > 0 Then
+ CvePlantillaPoliza = 11
End If
End If
diff --git a/Bancos/ProveedoresAbonar.aspx.vb b/Bancos/ProveedoresAbonar.aspx.vb
index c86542405..1ab731944 100644
--- a/Bancos/ProveedoresAbonar.aspx.vb
+++ b/Bancos/ProveedoresAbonar.aspx.vb
@@ -827,7 +827,7 @@ Partial Class Bancos_ProveedoresAbonar
'cheque
- If DdlTipoTransaccion.SelectedValue = "1" Then FolioFijo = TxtFolio.Text.ToEntero
+ If DdlTipoTransaccion.SelectedValue = "1" AndAlso UsuarioActual.CveEmpresa.Contiene(13, 83) Then FolioFijo = TxtFolio.Text.ToEntero
CvePrePoliza = ObjMov.AddPrePolizas("Bancos/ProveedoresAbonar", 2, ImporteSeleccionado, ImporteSeleccionado, GlobalDTBancosCuentas(UsuarioActual.CveUsuario).FiltroPrimeroValor("CveMoneda", "CveCuenta = " & DdlCuenta.SelectedValue).ToEntero, TxtFechaDocumento.Text.ToDate, ConceptoPoliza, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, FolioFijo:=FolioFijo, ReglaFolioPoliza:=ObjComp.ObtenerReglaFolio(DdlTipoTransaccion.SelectedValue, Nothing, UsuarioActual.CveEmpresa), CveTipoPoliza:=ObjMov.ObtenerTipoPoliza(DdlTipoTransaccion.SelectedValue, "-1", UsuarioActual.CveEmpresa))
diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb
index 9b80eb72f..12ec62f2a 100644
--- a/Compras/Compras.aspx.vb
+++ b/Compras/Compras.aspx.vb
@@ -13594,35 +13594,40 @@ Partial Class Compras_Compras
' guardardevolucion(ObjInventario, cvecompra, subtotal, Now.ToDate)
'End Sub
Protected Sub BtnVinculaDevolucion_Click(sender As Object, e As EventArgs)
- Dim subtotaldevolucion As Double = 0
- Dim realizadevolucion As Boolean = False
+ Try
+ Dim subtotaldevolucion As Double = 0
+ Dim realizadevolucion As Boolean = False
+
+
+ 'Calculo los subtotales para comparar con la NC
+ Dim cantidad As Double = 0.0
+
+ For Each Dr As GridViewRow In GVDevolucion.Rows
+ cantidad = Dr.FCTextBox("TxtCantidad").Text.ToDouble
+ If cantidad > 0 Then
+ realizadevolucion = True
+ subtotaldevolucion += Dr.DataKey("PU").ToString.ToDouble * cantidad
+ End If
+ Next
+
+ 'si no esta vinculado a nc simplemente me lo brinco
+ If realizadevolucion Then
+ 'si el subtotal es iwal a la nc lo guardo si no marco error
+ If TxtSubTotal.Text.ToDouble > subtotaldevolucion - 1 AndAlso TxtSubTotal.Text.ToDouble < subtotaldevolucion + 1 Then
+
+ VinculaDevolucion()
+
+ Else
+ Alert("El Total de la NC debe ser igual al total de la devolucion", TipoMensaje.MsgAdvertencia)
+ End If
+ Else
+ Alert("No se ha seleccionado nada para la devolución. Por favor rectifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia)
+ End If
+ Catch ex As Exception
+ OnError("Ocurrió un error al realizar la vinculación", ex)
+ End Try
- 'Calculo los subtotales para comparar con la NC
- Dim cantidad As Double = 0.0
-
- For Each Dr As GridViewRow In GVDevolucion.Rows
- cantidad = Dr.FCTextBox("TxtCantidad").Text.ToDouble
- If cantidad > 0 Then
- realizadevolucion = True
- subtotaldevolucion += Dr.DataKey("PU").ToString.ToDouble * cantidad
- End If
- Next
-
- 'si no esta vinculado a nc simplemente me lo brinco
- If realizadevolucion Then
- 'si el subtotal es iwal a la nc lo guardo si no marco error
- If TxtSubTotal.Text.ToDouble > subtotaldevolucion - 1 AndAlso TxtSubTotal.Text.ToDouble < subtotaldevolucion + 1 Then
-
- VinculaDevolucion()
-
- Else
- Alert("El Total de la NC debe ser igual al total de la devolucion", TipoMensaje.MsgAdvertencia)
- End If
- Else
- Alert("No se ha seleccionado nada para la devolución. Por favor rectifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia)
- End If
-
End Sub
Private Sub VinculaDevolucion()
@@ -13685,7 +13690,7 @@ Partial Class Compras_Compras
GvOC1.DataSource = DTOCTemp
Dim DTCVEOCS As DataTable = DTOCTemp.FiltraParametros("", "", {"CveOrdenCompra"})
- If DTCVEOCS.Rows.Count > 1 Then
+ If DTCVEOCS IsNot Nothing AndAlso DTCVEOCS.Rows.Count > 1 Then
GvOC1.Columns(0).Visible = True
Else
GvOC1.Columns(0).Visible = False
diff --git a/Compras/PopUpVerFactura.aspx.vb b/Compras/PopUpVerFactura.aspx.vb
index afd814184..74cb73e65 100644
--- a/Compras/PopUpVerFactura.aspx.vb
+++ b/Compras/PopUpVerFactura.aspx.vb
@@ -1471,7 +1471,7 @@ Partial Class PopUpVerFactura
If Archivo.Exists Then
'IMPRESION ESPECIAL SALIDA DE COMPUPROVEEDORES y VSH
- If UsuarioActual.CveEmpresa.Contiene(1, 72, 80, 119, 4, 145) Then
+ If UsuarioActual.CveEmpresa.Contiene(1, 72, 80, 119, 4, 145, 146) Then
Dim CiudadSucursal As String = ""
Dim DomicilioSucursal As String = ""
Dim DomicilioCliente As String = String.Format("{0} #{1}, {2}, Col. {3}, CP: {4}, {5}, {6}", DtMovimientos(0)("SucClienteDireccion").ToString, DtMovimientos(0)("SucClienteNoExt").ToString, DtMovimientos(0)("SucClienteNoInt").ToString, DtMovimientos(0)("SucClienteColonia"), DtMovimientos(0)("SucClienteCP").ToString, DtMovimientos(0)("SucClienteCiudad"), DtMovimientos(0)("SucClientePais").ToString)
@@ -1487,7 +1487,7 @@ Partial Class PopUpVerFactura
End If
- If UsuarioActual.CveEmpresa.Contiene(72, 80) Then
+ If UsuarioActual.CveEmpresa.Contiene(72, 80, 146) Then
params.Add(New ReportParameter("Fecha", String.Format("{0} {1}", FechaHora.ToDate.ToString("yyyy-MM-dd"), FechaHora.ToDateTime.ToString("HH:mm:ss"))))
params.Add(New ReportParameter("SucursalCliente", DtMovimientos(0)("SucCliente").ToString))
diff --git a/Contabilidad/CatClasificacionPorcentaje.aspx b/Contabilidad/CatClasificacionPorcentaje.aspx
new file mode 100644
index 000000000..728874eca
--- /dev/null
+++ b/Contabilidad/CatClasificacionPorcentaje.aspx
@@ -0,0 +1,137 @@
+<%@ Page Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="CatClasificacionPorcentaje.aspx.vb" Inherits="Contabilidad_CatClasificacionPorcentaje" %>
+
+<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
+
+
+
+
+
+
+
+ Catálogo de Clasificacion Porcentaje
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <%----%>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Clasificación porcentaje
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Contabilidad/CatClasificacionPorcentaje.aspx.vb b/Contabilidad/CatClasificacionPorcentaje.aspx.vb
new file mode 100644
index 000000000..4c7f79bc3
--- /dev/null
+++ b/Contabilidad/CatClasificacionPorcentaje.aspx.vb
@@ -0,0 +1,150 @@
+Imports System.Data
+Imports Extensiones
+Imports Microsoft.Reporting.WebForms
+
+Partial Class Contabilidad_CatClasificacionPorcentaje
+ Inherits ClsPaginas
+
+ Private Property DtClasificacionPorcentaje As DataTable
+ Get
+ Return CType(ViewState("DtClasificacionPorcentaje"), DataTable)
+ End Get
+ Set(value As DataTable)
+ ViewState("DtClasificacionPorcentaje") = value
+ End Set
+ End Property
+
+ Private Property CveClasificacion As Integer
+ Get
+ Return CType(ViewState("CveClasificacion"), Integer)
+ End Get
+ Set(value As Integer)
+ ViewState("CveClasificacion") = value
+ End Set
+ End Property
+
+ Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
+ If Not Page.IsPostBack Then
+
+ CargaDatos()
+ CargaContPaq()
+
+ End If
+ End Sub
+
+ Protected Sub CargaDatos()
+ Dim ObjGenerales As New ClsGenerales
+ If ObjGenerales.GetClasificacionPorcentaje(UsuarioActual.CveEmpresa, CveClasificacionPorcentaje:=-1, CveClasificacion:=-1, PorcentajeIVA:=-1, Opcion:=2) Then
+ GvDatos.DataSource = ObjGenerales.DtResultados
+ DtClasificacionPorcentaje = ObjGenerales.DtResultados
+ End If
+ ObjGenerales.Dispose()
+ GvDatos.DataBind()
+
+ DdlClasificaciones.Items.Add(New ListItem("Seleccione", "-1"))
+ DdlClasificaciones.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa)
+ DdlClasificaciones.DataBind()
+
+ End Sub
+
+ Protected Sub CargaContPaq()
+ Dim Empresa As DataTable = GlobalDTEmpresas(UsuarioActual.CveEmpresa)
+ Dim Servidor As String = Empresa.FiltroPrimeroValor("ServerContPAQi")
+ Dim BD As String = Empresa.FiltroPrimeroValor("BDContPAQi")
+ Dim Usuario As String = Empresa.FiltroPrimeroValor("UsrContPAQi")
+ Dim Contra As String = Empresa.FiltroPrimeroValor("PwdContPAQi")
+
+ Dim ObjPaq As New ClsContPAQi(Servidor, BD, Usuario, Contra)
+
+ DdlIdCtaIVAXAcreditar.Items.Add(New ListItem("Seleccione una cuenta", "-1"))
+ DdlIdCtaIVAAcreditable.Items.Add(New ListItem("Seleccione una cuenta", "-1"))
+ DdlIdCtaIVAXTrasladar.Items.Add(New ListItem("Seleccione una cuenta", "-1"))
+ DdlIdCtaIVATrasladado.Items.Add(New ListItem("Seleccione una cuenta", "-1"))
+ DdlIdCtaIVANoAcreditable.Items.Add(New ListItem("Seleccione una cuenta", "-1"))
+
+ If ObjPaq.GetCuentas(-1, "-1", -1, IdPadre:=-1) Then
+ DdlIdCtaIVAXAcreditar.DataSource = ObjPaq.DtResultados
+ DdlIdCtaIVAAcreditable.DataSource = ObjPaq.DtResultados
+ DdlIdCtaIVAXTrasladar.DataSource = ObjPaq.DtResultados
+ DdlIdCtaIVATrasladado.DataSource = ObjPaq.DtResultados
+ DdlIdCtaIVANoAcreditable.DataSource = ObjPaq.DtResultados
+ End If
+ ObjPaq.Dispose()
+ DdlIdCtaIVAXAcreditar.DataBind()
+ DdlIdCtaIVAAcreditable.DataBind()
+ DdlIdCtaIVAXTrasladar.DataBind()
+ DdlIdCtaIVATrasladado.DataBind()
+ DdlIdCtaIVANoAcreditable.DataBind()
+ End Sub
+
+ Protected Sub BtnAgregarMotivo_Click(sender As Object, e As EventArgs) Handles BtnAgregarClas.Click
+ BtnAgregarTiposDModal.Text = "Agregar"
+ BtnEditarTiposDModal.Visible = False
+ BtnAgregarTiposDModal.Visible = True
+ TxtPorcentajeIva.Text = ""
+ UpModalTiposD.Update()
+ RegistraScript(String.Format("$('#{0}').modal();", "DivAgregarTiposD"))
+ End Sub
+
+ Protected Sub LbAgregar_Click(sender As Object, e As System.EventArgs) Handles BtnAgregarTiposDModal.Click 'esta funcion es la que agrega un nuevo motivo de baja se activa con el boton "Agregar" de la ventana modal"
+ Dim ObjGenerales As New ClsGenerales
+ If BtnAgregarTiposDModal.Text = "Agregar" Then
+ If ObjGenerales.AddClasificacionPorcentaje(DdlClasificaciones.SelectedValue, TxtPorcentajeIva.Text.ToDouble, DdlIdCtaIVAXAcreditar.SelectedValue, DdlIdCtaIVAAcreditable.SelectedValue,
+ DdlIdCtaIVAXTrasladar.SelectedValue, DdlIdCtaIVATrasladado.SelectedValue, UsuarioActual.CveEmpresa) Then
+ RegistraScript(String.Format("$('#{0}').modal('hide');", "DivAgregarTiposD"))
+ Alert("Clasificación porcentaje agregado correctamente")
+ If ObjGenerales.GetClasificacionPorcentaje(-1) Then
+ GlobalDTClasificacionPorcentaje(-1) = ObjGenerales.DtResultados
+ End If
+ CargaDatos()
+ CargaContPaq()
+ UpDatos.Update()
+ End If
+ ElseIf BtnAgregarTiposDModal.Text = "Actualizar" Then
+ If ObjGenerales.UpdateClasificacionPorcentaje(CveClasificacion, DdlClasificaciones.SelectedValue, TxtPorcentajeIva.Text.ToDouble, DdlIdCtaIVAXAcreditar.SelectedValue,
+ DdlIdCtaIVAAcreditable.SelectedValue, DdlIdCtaIVAXTrasladar.SelectedValue, DdlIdCtaIVATrasladado.SelectedValue) Then
+ RegistraScript(String.Format("$('#{0}').modal('hide');", "DivAgregarTiposD"))
+ Alert("Clasificación porcentaje actualizado correctamente")
+ If ObjGenerales.GetClasificacionPorcentaje(-1) Then
+ GlobalDTClasificacionPorcentaje(-1) = ObjGenerales.DtResultados
+ End If
+ CargaDatos()
+ CargaContPaq()
+ UpDatos.Update()
+ End If
+ End If
+ ObjGenerales.Dispose()
+ End Sub
+
+ Protected Sub GvDatos_RowDeleting(sender As Object, e As System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles GvDatos.RowDeleting
+ Dim objgenerales As New ClsGenerales
+ If objgenerales.RemoveClasificacionPorcentaje(GvDatos.DataKeys(e.RowIndex).Value.ToString) Then
+ Alert("la clasificación porcentaje se eliminó correctamente")
+ If objgenerales.GetClasificacionPorcentaje(-1) Then
+ GlobalDTClasificacionPorcentaje(-1) = objgenerales.DtResultados
+ End If
+ CargaDatos()
+ CargaContPaq()
+ UpDatos.Update()
+ End If
+ objgenerales.Dispose()
+ End Sub
+
+ Public Sub GvDatos_RowEditing(sender As Object, e As EventArgs)
+ BtnAgregarTiposDModal.Text = "Actualizar"
+
+ Dim renglon As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
+ DdlClasificaciones.SelectedValue = If(renglon.DataKey("CveClasificacion").ToString IsNot "", renglon.DataKey("CveClasificacion"), "-1")
+ TxtPorcentajeIva.Text = renglon.DataKey("PorcentajeIVA")
+ DdlIdCtaIVAXAcreditar.SelectedValue = If(renglon.DataKey("IdCtaIVAXAcreditar").ToString IsNot "", renglon.DataKey("IdCtaIVAXAcreditar"), "-1")
+ DdlIdCtaIVAAcreditable.SelectedValue = If(renglon.DataKey("IdCtaIVAAcreditable").ToString IsNot "", renglon.DataKey("IdCtaIVAAcreditable"), "-1")
+ DdlIdCtaIVAXTrasladar.SelectedValue = If(renglon.DataKey("IdCtaIVAXTrasladar").ToString IsNot "", renglon.DataKey("IdCtaIVAXTrasladar"), "-1")
+ DdlIdCtaIVATrasladado.SelectedValue = If(renglon.DataKey("IdCtaIVATrasladado").ToString IsNot "", renglon.DataKey("IdCtaIVATrasladado"), "-1")
+ DdlIdCtaIVANoAcreditable.SelectedValue = If(renglon.DataKey("IdCtaIVANoAcreditable").ToString IsNot "", renglon.DataKey("IdCtaIVANoAcreditable"), "-1")
+
+ BtnEditarTiposDModal.Visible = False
+ BtnAgregarTiposDModal.Visible = True
+ UpModalTiposD.Update()
+ RegistraScript(String.Format("$('#{0}').modal();", "DivAgregarTiposD"))
+ End Sub
+End Class
diff --git a/Contabilidad/RegPrePoliza.aspx b/Contabilidad/RegPrePoliza.aspx
index 2836aea82..88e35e479 100644
--- a/Contabilidad/RegPrePoliza.aspx
+++ b/Contabilidad/RegPrePoliza.aspx
@@ -373,6 +373,9 @@
+
+
+
diff --git a/Contabilidad/RegPrePoliza.aspx.vb b/Contabilidad/RegPrePoliza.aspx.vb
index 623229efd..e6580a22f 100644
--- a/Contabilidad/RegPrePoliza.aspx.vb
+++ b/Contabilidad/RegPrePoliza.aspx.vb
@@ -794,6 +794,18 @@ Partial Class ContabilidadC_RegPrePoliza
e.Row.FCLinkButton("ImgBancos").CssClass = "btn btn-circle btn-sm green"
End If
End If
+
+ If e.Row.DataKey("CveConcepto").ToEntero.Contiene(17) Then
+ e.Row.FCDropDownList("DdlProveedores").Visible = True
+ e.Row.FCDropDownList("DdlProveedores").DataSource = GlobalDTCompProveedores(UsuarioActual.CveEmpresa)
+ e.Row.FCDropDownList("DdlProveedores").DataBind()
+ e.Row.FCDropDownList("DdlProveedores").Items.Insert(0, New ListItem(" - ", "-1"))
+
+ 'If CveTipoTransaccion > 0 And CveCuenta > 0 And Folio.Length > 0 And ImporteDocumento > 0 And Beneficiario.Length > 0 Then
+ ' e.Row.FCLinkButton("ImgPagoCompra").CssClass = "btn btn-circle btn-sm green"
+ 'End If
+ End If
+
End If
End Sub
@@ -854,15 +866,20 @@ Partial Class ContabilidadC_RegPrePoliza
If ObjIE.GetBancosIE(CveIE, -1, -1, "-1", -1, "-1", "-1", -1, -1, -1, -1, -1, MinFecha, MaxFecha, MinFecha, MaxFecha, MinFecha, MaxFecha, -1, -1, UsuarioActual.CveEmpresa) Then
FolioIE = ObjIE.Folio
End If
- End If
-
-
+ End If
+
+
+ Dim CveProveedor As Integer = -1
+ Dim CveCompra As Integer = -1
'inserto las compras que voy a pagarDdlSaldos
For Each gvr As GridViewRow In GvMov.Rows
If gvr.DataKey("IDCuenta").ToEntero > 0 Then
IdCtaContable = gvr.DataKey("IDCuenta")
End If
+ CveProveedor = gvr.DataKey("CveProveedor").ToEntero
+ CveCompra = gvr.DataKey("CveCompra").ToEntero
+ CveConcepto = gvr.DataKey("CveConcepto").ToEntero
If gvr.DataKey("TipoMovto").ToDouble <> 0 Then
Importe = gvr.FCTextBox("TxtAbono").Text.ToDouble
@@ -870,6 +887,11 @@ Partial Class ContabilidadC_RegPrePoliza
Else
Importe = gvr.FCTextBox("TxtCargo").Text.ToDouble
TipoMovto = False
+ End If
+ 'Registra pago de compra
+ If CveConcepto = 17 Then
+ CveProveedor = gvr.FCDropDownList("DdlProveedores").SelectedValue.ToEntero
+ CveCompra = gvr.FCDropDownList("DdlCompras").SelectedValue.ToEntero
End If
If CveConcepto = 41 Then
@@ -890,7 +912,7 @@ Partial Class ContabilidadC_RegPrePoliza
If Importe <> 0 Then
If ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovto, Importe, gvr.FCLiteral("LtlReferencia").Text, gvr.DataKey("CveConcepto").ToEntero, gvr.FCTextBox("TxtConcepto").Text,
TxtFecha.Text.ToDate, IdCtaContable, -1, CveSubProyecto:=gvr.FCDropDownList("DdlSubProyecto").SelectedValue.ToEntero, CveIE:=CveIE,
- CveProveedor:=gvr.DataKey("CveProveedor").ToEntero, CveCompra:=gvr.DataKey("CveCompra").ToEntero,
+ CveProveedor:=CveProveedor, CveCompra:=CveCompra,
CvePersonal:=gvr.DataKey("CvePersonal").ToEntero, CveClasificacion:=gvr.DataKey("CveClasificacion").ToEntero,
ImporteMX:=Importe, CveTipoGasto:=gvr.FCDropDownList("DdlTipoGasto").SelectedValue.ToEntero,
CveCliente:=gvr.DataKey("CveCliente").ToEntero, CveVenta:=gvr.DataKey("CveVenta").ToEntero, TipoCambio:=If(gvr.DataKey("TC").ToString.ToDouble > 0, gvr.DataKey("TC").ToString.ToDouble, 1),
@@ -1560,10 +1582,34 @@ Partial Class ContabilidadC_RegPrePoliza
Protected Sub LnkComplementoPago_Click(sender As Object, e As EventArgs)
GeneraTimbre(CvePrePoliza)
- End Sub
+ End Sub
#End Region
-
-
-
+
+
+
+ Protected Sub DdlProveedores_SelectedIndexChanged1(sender As Object, e As EventArgs)
+ Dim ddl As DropDownList = CType(sender, DropDownList)
+ Dim ddl2 As DropDownList = DirectCast(ddl.BindingContainer, GridViewRow).FCDropDownList("DdlCompras")
+ CargaCompras2(ddl.SelectedValue.ToEntero, ddl2)
+ End Sub
+
+ Private Sub CargaCompras2(CveProveedor As Integer, ddl As DropDownList)
+
+ Dim ObjCompras As New ClsCompras
+
+ ddl.ClearSelection()
+ If ObjCompras.GetCompras(-1, "-1", "-1", CveProveedor, -1, UsuarioActual.CveEmpresa) Then
+ ddl.DataSource = ObjCompras.DtResultados.FiltraParametros("Saldo > 0")
+ ddl.DataBind()
+ ddl.Items.Insert(0, New ListItem(" - ", "-1"))
+ ddl.Visible = True
+ Else
+ ddl.DataSource = Nothing
+ ddl.DataBind()
+ ddl.Items.Insert(0, New ListItem(" - ", "-1"))
+
+ End If
+ ObjCompras.Dispose()
+ End Sub
End Class
diff --git a/Empresas/146/Formatos/Factura.rdlc b/Empresas/146/Formatos/Factura.rdlc
index 5be0b965e..ed8648fc9 100644
--- a/Empresas/146/Formatos/Factura.rdlc
+++ b/Empresas/146/Formatos/Factura.rdlc
@@ -23,9 +23,9 @@
Textbox31.37762in
- 5.662in
+ 5.81465in0.5cm
- 2.24597in
+ 2.09332in
@@ -73,9 +73,9 @@
Textbox30.93484in
- 5.662in
+ 5.81465in0.5cm
- 2.24597in
+ 2.09332in1
-
- true
- true
-
-
-
-
- Régimen: Sociedad Anónima de Capital Variable; Condiciones de pago:
-
-
-
- =IIF(Parameters!CondicionPago.Value.ToString="","No Identificado",Parameters!CondicionPago.Value)
-
-
-
- ; Método de Pago:
-
-
-
- =IIF(Parameters!MetodoPago.Value.ToString="","No Identificado",Parameters!MetodoPago.Value)
-
-
-
- ; Num. Cta Pago:
-
-
-
- =IIF(Parameters!NumCta.Value="0" Orelse Parameters!NumCta.Value="","No Identificado",Parameters!NumCta.Value)
-
-
-
-
-
-
- Textbox62
- 6.65199in
- 1.5367in
- 0.29498in
- 6.38809in
- 24
-
-
- 2pt
- 2pt
- 2pt
- 2pt
-
- truetrue
@@ -1045,7 +977,7 @@
2.54119in0.25in3.69856in
- 25
+ 24
@@ -1104,7 +1036,7 @@
- Por éste pagare prometo (emos) pagar incondicionalmente a la orden de Localización Precisa GPS de México SA de CV, a su vencimiento el
+ Por éste pagare prometo (emos) pagar incondicionalmente a la orden de VICTOR MANUEL RAMIREZ CASTILLO, a su vencimiento el
- , en Hermosillo, Sonora o en el domicilio señalado a elección del acreedor o tenedor la cantidad de $
+ , en Tijuana, Baja California o en el domicilio señalado a elección del acreedor o tenedor la cantidad de $
- ). Valor recibido a mi (nuestra) entera satisfacción. La falta de pago de éste documento a su vencimiento dará derecho a Localización Precisa GPS de México SA de CV o tenedor, desde el día siguiente a cobrar el 10% mensual de interes moratorios hasta su total liquidación y los gastos judiciales que se ocasionen. Lugar y Fecha de Suscripción: Hermosillo, Sonora a
+ ). Valor recibido a mi (nuestra) entera satisfacción. La falta de pago de éste documento a su vencimiento dará derecho a VICTOR MANUEL RAMIREZ CASTILLO o tenedor, desde el día siguiente a cobrar el 5% mensual de interes moratorios hasta su total liquidación y los gastos judiciales que se ocasionen. Lugar y Fecha de Suscripción: Tijuana, Baja California a
+
+
+
+
+
+ Textbox1
+
+
+ #ff1037
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
@@ -2041,7 +2012,7 @@
=Fields!Cantidad.Value
@@ -2109,6 +2080,48 @@
+
+
+
+ true
+ true
+
+
+
+
+ =Fields!Codigo.Value
+
+
+
+
+
+
+ Codigo
+
+
+
+
+
+
+
+
+
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
@@ -2293,6 +2306,38 @@
+
+
+
+ true
+ true
+
+
+
+
+
+
+
+
+
+
+
+ Textbox5
+
+
+
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
@@ -2404,6 +2449,7 @@
+
@@ -2423,8 +2469,8 @@
5.75246cm0.11468cm1.07241cm
- 20.01064cm
- 27
+ 19.97804cm
+ 26
@@ -2463,7 +2509,7 @@
5.662in0.21567in2.26391in
- 28
+ 27
@@ -2748,7 +2794,7 @@
5.73412in0.34081in2.19818in
- 29
+ 28
@@ -2862,7 +2908,7 @@
14.56464cm0.6cm5.58343cm
- 30
+ 29
@@ -2876,7 +2922,13 @@
3.33888cm
- 11.00525cm
+ 3.672cm
+
+
+ 3.83158cm
+
+
+ 3.48541cm
@@ -2928,10 +2980,58 @@
2pt
- 2
+ 3
+
+
+
+
+ true
+ true
+
+
+
+
+
+
+
+
+
+
+
+ Textbox74
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1pt
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
@@ -2986,7 +3086,7 @@
-
+ truetrue
@@ -3005,19 +3105,34 @@
- Textbox127
+ Textbox67
+
+
+
+
+
+
+
+
+
+ White
+ Middle2pt2pt2pt2pt
+ 3
+
+
@@ -3049,7 +3164,7 @@
+
@@ -3079,7 +3194,7 @@
-
+ truetrue
@@ -3098,19 +3213,25 @@
- Textbox131
+ Textbox70
+ White
+
+ White
+ Middle2pt2pt2pt2pt
+ 3
+
+
@@ -3118,14 +3239,14 @@
-
+ truetrue
- Uso CFDI:
+ Orden de compra:
- Textbox15
+ Textbox39
+
@@ -3172,14 +3293,14 @@
-
+ truetrue
- =Parameters!UsoCFDI.Value
+ =IIF(Parameters!OrdenCompra.Value = "-1","",Parameters!OrdenCompra.Value)
- Textbox17
+ Textbox71
+
+
+ Middle
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+ fecha de vencimiento:
+
+
+
+
+
+
+ Textbox40
+
+
+ #ff1037
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+ =Parameters!Vencimiento.Value
+
+
+
+
+
+
+ Textbox78
@@ -3236,7 +3429,7 @@
+
@@ -3266,7 +3459,7 @@
-
+ truetrue
@@ -3285,20 +3478,25 @@
- Textbox133
+ Textbox72
+ White
+
- Top
+ White
+ Middle2pt2pt2pt2pt
+ 3
+
+
@@ -3330,7 +3528,7 @@
+
@@ -3360,7 +3558,7 @@
-
+ truetrue
@@ -3379,20 +3577,25 @@
- Textbox135
+ Textbox73
+ White
+
- Top
+ White
+ Middle2pt2pt2pt2pt
+ 3
+
+
@@ -3447,10 +3650,12 @@
2pt
- 2
+ 4
+
+
@@ -3459,6 +3664,8 @@
+
+
@@ -3476,8 +3683,8 @@
6.91306cm0.11468cm5.76188cm
- 14.34413cm
- 31
+ 14.32787cm
+ 30
@@ -3520,7 +3727,7 @@
0.04404in0.36457in7.87931in
- 32
+ 31
@@ -4022,7 +4229,7 @@
0.05568cm2.97096cm20.1554cm
- 33
+ 32=Microsoft.VisualBasic.Interaction.IIF(First(Fields!SerieFolio.Value, "DataSet4") <> "", False, True)
@@ -4036,11 +4243,10 @@
EmbeddedVISTAPREVIA22FitProportional
- 0cm19.87567cm18.27471cm0.33541cm
- 34
+ 33=IIf(Parameters!CveVenta.Value > 0, True,False)
@@ -4056,9 +4262,9 @@
FitProportional1.19556cm0.14361cm
- 1.67893cm
+ 1.22745cm4.7959cm
- 35
+ 34
@@ -4104,7 +4310,7 @@
0.04515in0.37389in4.70134in
- 36
+ 35
@@ -4115,11 +4321,108 @@
2pt
+
+ true
+
+
+
+
+ Uso CFDI:
+
+
+
+ =Parameters!UsoCFDI.Value
+
+
+
+
+
+
+
+
+ Régime:
+
+
+
+ Personas Físicas con Actividades Empresariales y Profesionales
+
+
+
+
+
+
+
+
+ Método de Pago:
+
+
+
+
+
+
+
+ =IIF(Parameters!MetodoPago.Value.ToString="","No Identificado",Parameters!MetodoPago.Value)
+
+
+
+
+
+
+
+
+
+
+ Textbox10
+ 0.99561in
+ 3.82301in
+ 0.62735in
+ 1.99164in
+ 36
+
+
+ Top
+
+ 25.59192cm