diff --git a/App_Code/ClsVentas.vb b/App_Code/ClsVentas.vb
index 9a0fd3c83..deaf7c5ac 100644
--- a/App_Code/ClsVentas.vb
+++ b/App_Code/ClsVentas.vb
@@ -1991,7 +1991,10 @@ Public Class ClsVentas
Return Retorno
End Function
- Public Function AddPromocionesDetalle(CvePromocion As Integer, CvePS As Integer, TipoPromocion As Integer, Promocion As Double, PUAnterior As Double, PUPromocion As Double, AplicaRestriccion As Boolean, AplicaLunes As Boolean, AplicaMartes As Boolean, AplicaMiercoles As Boolean, AplicaJueves As Boolean, AplicaViernes As Boolean, AplicaSabado As Boolean, AplicaDomingo As Boolean, HoraInicio As DateTime, HoraFin As DateTime, Optional CantidadMinima As Integer = 1) As Boolean
+ Public Function AddPromocionesDetalle(CvePromocion As Integer, CvePS As Integer, TipoPromocion As Integer, Promocion As Double, PUAnterior As Double, PUPromocion As Double,
+ AplicaRestriccion As Boolean, AplicaLunes As Boolean, AplicaMartes As Boolean, AplicaMiercoles As Boolean, AplicaJueves As Boolean,
+ AplicaViernes As Boolean, AplicaSabado As Boolean, AplicaDomingo As Boolean, HoraInicio As DateTime, HoraFin As DateTime, Optional CantidadMinima As Integer = 1,
+ Optional CveClasificacion As Integer = -1) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Vta_PromocionesDetalleAdd")
@@ -2014,6 +2017,7 @@ Public Class ClsVentas
.Add("@HoraInicio", SqlDbType.DateTime).Value = HoraInicio
.Add("@HoraFin", SqlDbType.DateTime).Value = HoraFin
.Add("@CantidadMinima", SqlDbType.Int).Value = CantidadMinima
+ .Add("@CveClasificacion", SqlDbType.Int).Value = CveClasificacion
End With
Try
@@ -2025,7 +2029,10 @@ Public Class ClsVentas
Return Retorno
End Function
- Public Function UpdatePromocionesDetalle(CvePromocionDetalle As Integer, CvePromocion As Integer, CvePS As Integer, TipoPromocion As Integer, Promocion As Double, PUAnterior As Double, PUPromocion As Double, AplicaRestriccion As Boolean, AplicaLunes As Boolean, AplicaMartes As Boolean, AplicaMiercoles As Boolean, AplicaJueves As Boolean, AplicaViernes As Boolean, AplicaSabado As Boolean, AplicaDomingo As Boolean, HoraInicio As DateTime, HoraFin As DateTime, Optional CantidadMinima As Integer = 1) As Boolean
+ Public Function UpdatePromocionesDetalle(CvePromocionDetalle As Integer, CvePromocion As Integer, CvePS As Integer, TipoPromocion As Integer, Promocion As Double, PUAnterior As Double,
+ PUPromocion As Double, AplicaRestriccion As Boolean, AplicaLunes As Boolean, AplicaMartes As Boolean, AplicaMiercoles As Boolean,
+ AplicaJueves As Boolean, AplicaViernes As Boolean, AplicaSabado As Boolean, AplicaDomingo As Boolean, HoraInicio As DateTime, HoraFin As DateTime,
+ Optional CantidadMinima As Integer = 1, Optional CveClasificacion As Integer = -1) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Vta_PromocionesDetalleUpdate")
@@ -2049,6 +2056,7 @@ Public Class ClsVentas
.Add("@HoraFin", SqlDbType.DateTime).Value = HoraFin
.Add("@CvePromocionDetalle", SqlDbType.Int).Value = CvePromocionDetalle
.Add("@CantidadMinima", SqlDbType.Int).Value = CantidadMinima
+ .Add("@CveClasificacion", SqlDbType.Int).Value = CveClasificacion
End With
Try
@@ -2262,6 +2270,43 @@ Public Class ClsVentas
#End Region
+
+
+#Region "Firmas"
+
+ Public Function GetVentasRelacionadas(CveVenta As Integer, CveEmpresa As Integer) As Boolean
+ Dim Retorno As Boolean = False
+ DataAdapter("PA_Vta_VentasRelacionadasGet")
+ With SqlAdapter.SelectCommand.Parameters
+ .Add("@CveVenta", SqlDbType.Int).Value = CveVenta
+ .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
+ End With
+ Try
+ SqlAdapter.Fill(Data)
+ Retorno = True
+ Catch ex As Exception
+ OnError("Ocurrió un error al obtener las ventas relacionadas. ", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
+ End Try
+ Return Retorno
+ End Function
+
+ Public Function AddVentasRelacionadas(CveVenta As Integer, CveVentaRelacionada As Integer) As Boolean
+ Dim Retorno As Boolean = False
+ DataAdapter("PA_Vta_VentasRelacionadasAdd")
+ With SqlAdapter.SelectCommand.Parameters
+ .Add("@CveVenta", SqlDbType.Int).Value = CveVenta
+ .Add("@CveVentaRelacionada", SqlDbType.Int).Value = CveVentaRelacionada
+ End With
+ Try
+ SqlAdapter.Fill(Data)
+ Retorno = True
+ Catch ex As Exception
+ OnError("Ocurrió un error al agregar las ventas relacionadas.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
+ End Try
+ Return Retorno
+ End Function
+#End Region
+
#Region " I M P U E S T O S L O C A L E S"
Public Function AddImpuestosLocales(ImpuestoLocal As String, Porcentaje As Double, Orden As Integer, TipoImpuesto As Integer, Estatus As Integer, IdCtaContable As Integer, CveUsuario As Integer, CveEmpresa As Integer) As Boolean
Dim Retorno As Boolean = False
@@ -4233,7 +4278,7 @@ Public Class ClsVentas
Return Retorno
End Function
- Public Function UpdateVentaUsadoRecibido(CveVenta As Integer, CvePS As Integer, Recibido As Boolean) As Boolean
+ Public Function UpdateVentaUsadoRecibido(CveVenta As Integer, CvePS As Integer, Recibido As Boolean, CveMovimiento As Integer) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Vta_VentasUsadosRecibidoUpdate", CommandType.StoredProcedure)
@@ -4242,6 +4287,7 @@ Public Class ClsVentas
.Add("@CveVenta", SqlDbType.Int).Value = CveVenta
.Add("@CvePS", SqlDbType.Int).Value = CvePS
.Add("@Recibido", SqlDbType.Bit).Value = Recibido
+ .Add("@CveMovimiento", SqlDbType.Int).Value = CveMovimiento
End With
Try
@@ -4256,6 +4302,74 @@ Public Class ClsVentas
#End Region
+
+#Region "P O R C E N T A J E - C O M I S I O N E S"
+ Public Function AddCierreComisionVendedor(CveVendedor As Integer, Mes As Integer, Anio As Integer, PorcentajeComision As Decimal) As Boolean
+ Dim Retorno As Boolean = False
+
+ DataAdapter("PA_Vta_CierreComisionVendedoresAdd", CommandType.StoredProcedure)
+
+ With SqlAdapter.SelectCommand.Parameters
+ .Add("@CveVendedor", SqlDbType.Int).Value = CveVendedor
+ .Add("@Mes", SqlDbType.Int).Value = Mes
+ .Add("@Anio", SqlDbType.Int).Value = Anio
+ .Add("@PorcentajeComision", SqlDbType.Money).Value = PorcentajeComision
+ End With
+
+ Try
+ SqlAdapter.Fill(Data)
+ Retorno = True
+ Catch ex As Exception
+ OnError("Ocurrió un error al agregar cierre de comisión al vendedor.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
+ End Try
+
+ Return Retorno
+ End Function
+ Public Function GetCierreComisionVendedor(CveVendedor As Integer, Mes As Integer, Anio As Integer, CveEmpresa As Integer) As Boolean
+ Dim Retorno As Boolean = False
+
+ DataAdapter("PA_Vta_CierreComisionVendedoresGet", CommandType.StoredProcedure)
+
+ With SqlAdapter.SelectCommand.Parameters
+ .Add("@CveVendedor", SqlDbType.Int).Value = CveVendedor
+ .Add("@Mes", SqlDbType.Int).Value = Mes
+ .Add("@Anio", SqlDbType.Int).Value = Anio
+ .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
+ End With
+
+ Try
+ SqlAdapter.Fill(Data)
+ Retorno = True
+ Catch ex As Exception
+ OnError("Ocurrió un error al agregar cierre de comisión al vendedor.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
+ End Try
+
+ Return Retorno
+ End Function
+
+ Public Function UpdateCierreComisionVendedor(CveVendedor As Integer, Mes As Integer, Anio As Integer, PorcentajeComision As Decimal) As Boolean
+ Dim Retorno As Boolean = False
+
+ DataAdapter("PA_Vta_CierreComisionVendedoresUpdate", CommandType.StoredProcedure)
+
+ With SqlAdapter.SelectCommand.Parameters
+ .Add("@CveVendedor", SqlDbType.Int).Value = CveVendedor
+ .Add("@Mes", SqlDbType.Int).Value = Mes
+ .Add("@Anio", SqlDbType.Int).Value = Anio
+ .Add("@PorcentajeComision", SqlDbType.Money).Value = PorcentajeComision
+ End With
+
+ Try
+ SqlAdapter.Fill(Data)
+ Retorno = True
+ Catch ex As Exception
+ OnError("Ocurrió un error al actualizar el cierre de comisión del vendedor.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
+ End Try
+
+ Return Retorno
+ End Function
+#End Region
+
#Region "IDisposable Support"
diff --git a/App_Code/Modelos.vb b/App_Code/Modelos.vb
index 2091e565f..447ab3844 100644
--- a/App_Code/Modelos.vb
+++ b/App_Code/Modelos.vb
@@ -1439,10 +1439,11 @@ Namespace Modelos
End If
'Contratos
- If factura.CveContrato > 0 AndAlso TipoDocto.Contiene("Ing") Then
- GuardarContratoAvanceEstimaciones(ObjContr, ErrorList, 1)
- ElseIf factura.CveContrato > 0 AndAlso factura.TipoDocto.Contiene("Egs", "Dev") Then
- GuardarContratoAvanceEstimaciones(ObjContr, ErrorList, -1)
+ If factura.CveContrato > 0 AndAlso factura.TipoDocto.Contiene("Ing") Then
+ GuardarContratoAvanceEstimaciones(factura, ObjContr, ErrorList, 1)
+ 'CUANDO ES NOTA DE CRÉDITO, NO DEBE DE CONSIDERAR AVANCE, CUANDO ES NOTA DE CRÉDITO POR AMORTIZACIÓN
+ ElseIf factura.CveContrato > 0 AndAlso factura.TipoDocto.Contiene("Egs", "Dev") AndAlso Not factura.EsNCAmortizacion Then
+ GuardarContratoAvanceEstimaciones(factura, ObjContr, ErrorList, -1)
End If
'Impuestos Locales
@@ -1781,18 +1782,18 @@ Namespace Modelos
Return True
End Function
- Private Sub GuardarContratoAvanceEstimaciones(ObjContrato As ClsContratos, ErrorList As List(Of String), Multiplicador As Integer, Optional CrearAvance As Boolean = False)
+ Private Sub GuardarContratoAvanceEstimaciones(ObjFactura As Modelos.Factura, ObjContrato As ClsContratos, ErrorList As List(Of String), Multiplicador As Integer, Optional CrearAvance As Boolean = False)
- If Me.CveContrato > 0 Then
+ If ObjFactura.CveContrato > 0 Then
Dim CveEstimacion As Integer = -1
- If ObjContrato.AddEstimaciones(Me.CveContrato, Me.Fecha, -1, Me.CveVenta, "-1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
+ If ObjContrato.AddEstimaciones(ObjFactura.CveContrato, ObjFactura.Fecha, -1, ObjFactura.CveVenta, "-1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
CveEstimacion = ObjContrato.DtResultados(0)("CveEstimacion").ToString.ToEntero
- For Each row As DataRow In DtDetalle.Rows
+ For Each row As DataRow In ObjFactura.DtDetalle.Rows
If row("CveContratoDetalle").ToString.ToEntero > 0 Then
- If Not ObjContrato.AddContratosAvance(row("CveContratoDetalle").ToString.ToEntero, row("Cantidad").ToString.ToEntero * Multiplicador, Me.Fecha, UsuarioActual.CveUsuario, CveEstimacion:=CveEstimacion) Then
+ If Not ObjContrato.AddContratosAvance(row("CveContratoDetalle").ToString.ToEntero, row("Cantidad").ToString.ToEntero * Multiplicador, ObjFactura.Fecha, UsuarioActual.CveUsuario, CveEstimacion:=CveEstimacion) Then
ErrorList.Add("Ocurrió un error al agregar los avances")
End If
End If
@@ -4464,13 +4465,13 @@ Namespace Modelos
'CANCELA CONTRATOS
If Not ErrorCancelar Then
If ObjFactura.CveContrato > 0 AndAlso ObjFactura.TipoDocto.Contiene("Ing", "Ant") Then
- ObjFactura.GuardarContratoAvanceEstimaciones(ObjContrato, ErrorList, -1, True)
+ ObjFactura.GuardarContratoAvanceEstimaciones(ObjFactura, ObjContrato, ErrorList, -1, True)
If ErrorList.Count > 0 Then
ErrorCancelar = True
MensajeError = "Ocurrió un error al cancelar las estimaciones del contrato."
End If
ElseIf ObjFactura.CveContrato > 0 AndAlso ObjFactura.TipoDocto.Contiene("Egs", "Dev") Then
- ObjFactura.GuardarContratoAvanceEstimaciones(ObjContrato, ErrorList, 1, True)
+ ObjFactura.GuardarContratoAvanceEstimaciones(ObjFactura, ObjContrato, ErrorList, 1, True)
If ErrorList.Count > 0 Then
ErrorCancelar = True
MensajeError = "Ocurrió un error al cancelar los avances del contrato."
diff --git a/Bancos/RepProgramarRecursos.aspx b/Bancos/RepProgramarRecursos.aspx
index 4867d2c07..e7232caa1 100644
--- a/Bancos/RepProgramarRecursos.aspx
+++ b/Bancos/RepProgramarRecursos.aspx
@@ -1,391 +1,392 @@
-<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepProgramarRecursos.aspx.vb" Inherits="Bancos_RepProgramarRecursos" %>
-
-<%@ Import Namespace="Extensiones" %>
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
-
-
+
+
+
diff --git a/Bancos/RepProgramarRecursos.aspx.vb b/Bancos/RepProgramarRecursos.aspx.vb
index af93c7aca..5c2cd3230 100644
--- a/Bancos/RepProgramarRecursos.aspx.vb
+++ b/Bancos/RepProgramarRecursos.aspx.vb
@@ -342,7 +342,9 @@ Partial Class Bancos_RepProgramarRecursos
LblPesosTotal.Text = String.Format("$ {0}", DtDatos.SUM("SaldoPesos", "CveCompra > 0").ToString.FormatoNumero())
LblAcumulado.Text = String.Format("$ {0}", DtDatos.MAX("TotalProgramado", "CveCompra > 0").ToString.FormatoNumero())
- End If
+ End If
+
+ Gv.Columns(6).Visible = (UsuarioActual.Empresa.Funcionalidad(131).ToEntero > 0 Or UsuarioActual.Empresa.Funcionalidad(134).ToEntero > 0)
Mov.Dispose()
CargaGrid(Orden)
@@ -434,19 +436,41 @@ Partial Class Bancos_RepProgramarRecursos
e.Row.FCCheckBox("Chk").Attributes.Add("onclick", String.Format(" $get('{0}').readOnly = !this.checked;", e.Row.FCTextBox("TxtS").ClientID))
'cuando estan programado, el saldo es el importe programado, para saber el total que se limite el rango, debe de ser el saldo real, saldo + importeprogramado
e.Row.FCTextBox("TxtS").Attributes.Add("onkeyup", String.Format("FnMonedaRango(this,{0});", e.Row.DBCampo("Original").ToDouble + e.Row.DBCampo("Abonado").ToDouble))
+ End If
+
+
+ 'If UsuarioActual.Empresa.GralSoloProyecto Then ' solo muestar el subproyecto
+ ' e.Row.FCDropDownList("DdlCuenta").Visible = True
+ ' e.Row.FCDropDownList("DdlCuenta").DataSource = DtCuentas
+ ' e.Row.FCDropDownList("DdlCuenta").DataBind()
+
+ ' e.Row.FCDropDownList("DdlMov").Visible = True
+ ' e.Row.FCDropDownList("DdlMov").DataSource = DtTipoTransaccion
+ ' e.Row.FCDropDownList("DdlMov").DataBind()
+
+ 'End If
+
+ If UsuarioActual.Empresa.Funcionalidad(131).ToEntero > 0 Or UsuarioActual.Empresa.Funcionalidad(134).ToEntero > 0 Then
+ Dim Str As New StringBuilder
+ Str.AppendFormat("Importe Almacen: ${0} ({1}%) ", e.Row.DBCampo("ImporteAlmacen").FormatoNumero, e.Row.DBCampo("ImporteAlmacenPorcentaje"))
+ If e.Row.DBCampo("ImporteServicios").ToDouble > 0 Then Str.AppendFormat("Importe Servicios: ${0} ({1}%) ", e.Row.DBCampo("ImporteServicios").FormatoNumero, e.Row.DBCampo("ImporteServiciosPorcentaje"))
+ If e.Row.DBCampo("ImporteDevolucion").ToDouble > 0 Then Str.AppendFormat("Importe Devuelto: ${0} ({1}%) ", e.Row.DBCampo("ImporteDevolucion").FormatoNumero, e.Row.DBCampo("ImporteDevolucionPorcentaje"))
+ Str.AppendFormat(" Importes SIN IVA")
+
+ e.Row.FCLabel("LbEstatusInv").Attributes.Add("title", Str.ToString)
+ Select Case e.Row.DBCampo("EstatusInventario").ToEntero
+ Case 1
+ e.Row.FCLabel("LbEstatusInv").Text = ""
+ e.Row.FCLabel("LbEstatusInv").ForeColor = Drawing.Color.Red
+ Case 2
+ e.Row.FCLabel("LbEstatusInv").Text = ""
+ e.Row.FCLabel("LbEstatusInv").ForeColor = Drawing.Color.DarkOrange
+ Case 3
+ e.Row.FCLabel("LbEstatusInv").Text = ""
+ e.Row.FCLabel("LbEstatusInv").ForeColor = Drawing.Color.Green
+ End Select
End If
-
- 'If UsuarioActual.Empresa.GralSoloProyecto Then ' solo muestar el subproyecto
- ' e.Row.FCDropDownList("DdlCuenta").Visible = True
- ' e.Row.FCDropDownList("DdlCuenta").DataSource = DtCuentas
- ' e.Row.FCDropDownList("DdlCuenta").DataBind()
-
- ' e.Row.FCDropDownList("DdlMov").Visible = True
- ' e.Row.FCDropDownList("DdlMov").DataSource = DtTipoTransaccion
- ' e.Row.FCDropDownList("DdlMov").DataBind()
-
- 'End If
End If
If e.Row.DBCampo("Saldo").ToDouble < 0 Then e.Row.Cells(1).ForeColor = Drawing.Color.Red
diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb
index f5a0be724..14fe93b5f 100644
--- a/Compras/Compras.aspx.vb
+++ b/Compras/Compras.aspx.vb
@@ -7904,6 +7904,7 @@ Partial Class Compras_Compras
'AJUSTA POLIZA
If IdPoliza > 0 Then
+ PolizaFolio = ObjContaAC.Folio
ObjContaAC.AjustaPoliza(IdPoliza)
Msg.AppendFormat("
Ver Póliza", IdPoliza)
End If
@@ -7914,35 +7915,43 @@ Partial Class Compras_Compras
Msg.AppendFormat("Imprimir Entrada Almacen", TempParametros)
End If
- ObjCompras.UpdateCompraPrePoliza(TxtFecha.Text.ToDate, PolizaFolio.ToString, IdPoliza, CvePrePoliza, CveCompra, 0)
-
+ If Not ObjCompras.UpdateCompraPrePoliza(TxtFecha.Text.ToDate, PolizaFolio.ToString, IdPoliza, CvePrePoliza, CveCompra, 0) Then
+ TieneError = True
+ End If
+
If EntregaDirecta Then
Msg.AppendFormat($"Recibir mercancía de entrega directa.")
End If
- ObjCompras.Commit()
- If ObjContaAC IsNot Nothing Then ObjContaAC.Commit()
-
- Dim CveEvaluacionProveedor As Integer = -1
-
- If Me.RequiereEvaluacion Then
- Dim ObjPro As New ClsCompProveedores()
- CveEvaluacionProveedor = ObjPro.AddEvaluacionProveedor(CveProveedor, CveCompra, Now, "", Me.CveUsuarioEvaluador, "", "", UsuarioActual.CveEmpresa)
- ObjPro.Dispose()
- End If
-
- 'ENVIO DE CORREO NOTIFICACION A VENDEDORES DE OC
- MandaCorreoOCVendedores(CveCompra)
- If Not ErrorMovInv Then
- For Each intMovimientoAlmacen As Integer In ListaMovimientosAlmacen
- MandaCorreoOCVendedoresRecepcionAlmacen(CveCompra, intMovimientoAlmacen)
- Next
- End If
-
- If CveEvaluacionProveedor > 0 Then
- Msg.Append("
El proveedor tiene evaluaciones pendientes ")
- Msg.Append("¿Desea realizar una evaluacion al proveedor?")
- Msg.AppendFormat($"Evaluar Proveedor.")
+ If Not TieneError Then
+ ObjCompras.Commit()
+ If ObjContaAC IsNot Nothing Then ObjContaAC.Commit()
+
+ Dim CveEvaluacionProveedor As Integer = -1
+
+ If Me.RequiereEvaluacion Then
+ Dim ObjPro As New ClsCompProveedores()
+ CveEvaluacionProveedor = ObjPro.AddEvaluacionProveedor(CveProveedor, CveCompra, Now, "", Me.CveUsuarioEvaluador, "", "", UsuarioActual.CveEmpresa)
+ ObjPro.Dispose()
+ End If
+
+ 'ENVIO DE CORREO NOTIFICACION A VENDEDORES DE OC
+ MandaCorreoOCVendedores(CveCompra)
+ If Not ErrorMovInv Then
+ For Each intMovimientoAlmacen As Integer In ListaMovimientosAlmacen
+ MandaCorreoOCVendedoresRecepcionAlmacen(CveCompra, intMovimientoAlmacen)
+ Next
+ End If
+
+ If CveEvaluacionProveedor > 0 Then
+ Msg.Append("
El proveedor tiene evaluaciones pendientes ")
+ Msg.Append("¿Desea realizar una evaluacion al proveedor?")
+ Msg.AppendFormat($"Evaluar Proveedor.")
+ End If
+ Else
+ ObjCompras.RollBack()
+ If ObjContaAC IsNot Nothing Then ObjContaAC.RollBack()
+ Alert("Ocurrio un error al guardar la compra. Por favor intente nuevamente.", TipoMensaje.MsgError)
End If
Alert(Msg.ToString, TipoMensaje.MsgInformacion, MsgAccionAceptar)
diff --git a/Compras/PopUpVerFactura.aspx.vb b/Compras/PopUpVerFactura.aspx.vb
index 297531b36..38f493d93 100644
--- a/Compras/PopUpVerFactura.aspx.vb
+++ b/Compras/PopUpVerFactura.aspx.vb
@@ -1067,36 +1067,51 @@ Partial Class PopUpVerFactura
If ObjVentas.DtResultados IsNot Nothing AndAlso ObjVentas.DtResultados.Rows.Count > 0 Then
ObjVentas.DtResultados.Columns.Add("Importe", GetType(Decimal))
ObjVentas.DtResultados.Rows(0)("Importe") = ObjVentas.DtResultados.Rows(0)("Total")
- Vta.DtDocumentosRelacionados = ObjVentas.DtResultados.FiltraParametros("FolioFiscal IS NOT NULL")
+ Vta.DtDocumentosRelacionados = ObjVentas.DtResultados.FiltraParametros("FolioFiscal IS NOT NULL")
+ If ObjVentas.GetVentasRelacionadas(CveVenta, UsuarioActual.CveEmpresa) Then
+ Vta.DtNCVinculadas = ObjVentas.DtResultados
+ Vta.DtDocumentosRelacionados = ObjVentas.DtResultados.FiltraParametros("FolioFiscal IS NOT NULL")
+ If Vta.DtDocumentosRelacionados.Rows.Count > 0 Then
+ If Vta.TipoDocto.Contiene("Dev") Then
+ Vta.Timbre.CFDIRelacionados.TipoRelacion = "03"
+ Vta.Timbre.CFDIRelacionados.TipoRelacionTexto = "Devolución aplicada a Ingreso"
+ End If
+ End If
+ End If
End If
End If
Else
- If dtVentas(0)("TipoDocto").ToString.Contiene("Ing", "Ant", "Rem") Then
- 'carga as notas de credito vinculadas
- If ObjVentas.GetVentasAntNC(CveVenta, -1) Then
- Vta.DtDocumentosRelacionados = ObjVentas.DtResultados.FiltraParametros("FolioFiscal IS NOT NULL")
- End If
- End If
+ 'If dtVentas(0)("TipoDocto").ToString.Contiene("Ing", "Ant", "Rem") Then
+ ' 'carga as notas de credito vinculadas
+ ' If ObjVentas.GetVentasAntNC(CveVenta, -1) Then
+ ' Vta.DtDocumentosRelacionados = ObjVentas.DtResultados.FiltraParametros("FolioFiscal IS NOT NULL")
+ ' End If
+ 'End If
- If dtVentas(0)("TipoDocto").ToString.Contiene("Egs", "Dev", "Ant") Then
- If ObjVentas.GetVentasAntNC(-1, CveVenta) Then
+ If dtVentas(0)("TipoDocto").ToString.Contiene("Egs", "Dev", "Ant") Then
+
+ If ObjVentas.GetVentasRelacionadas(CveVenta, UsuarioActual.CveEmpresa) Then
+ Vta.DtNCVinculadas = ObjVentas.DtResultados
Vta.DtDocumentosRelacionados = ObjVentas.DtResultados.FiltraParametros("FolioFiscal IS NOT NULL")
If Vta.DtDocumentosRelacionados.Rows.Count > 0 Then
If Vta.TipoDocto.Contiene("Dev") Then
Vta.Timbre.CFDIRelacionados.TipoRelacion = "03"
Vta.Timbre.CFDIRelacionados.TipoRelacionTexto = "Devolución aplicada a Ingreso"
End If
- End If
+ End If
End If
End If
End If
'End If
- If Vta.TipoDocto.Contiene("Egs", "Dev", "Ant") Then
- If ObjVentas.GetVentasAntNC(-1, CveVenta) Then
- Vta.DtNCVinculadas = ObjVentas.DtResultados
- End If
- End If
+ 'If Vta.TipoDocto.Contiene("Egs", "Dev", "Ant") Then
+ ' 'If ObjVentas.GetVentasAntNC(-1, CveVenta) Then
+ ' ' Vta.DtNCVinculadas = ObjVentas.DtResultados
+ ' 'End If
+ ' If ObjVentas.GetVentasRelacionadas(CveVenta, UsuarioActual.CveEmpresa) Then
+ ' Vta.DtNCVinculadas = ObjVentas.DtResultados
+ ' End If
+ 'End If
End If
ObjVentas.Dispose()
diff --git a/Compras/RepCxPDetalle.aspx b/Compras/RepCxPDetalle.aspx
index ffe97d3fc..43593a36d 100644
--- a/Compras/RepCxPDetalle.aspx
+++ b/Compras/RepCxPDetalle.aspx
@@ -10,6 +10,9 @@
white-space: nowrap;
overflow: hidden;
}
+ .tooltip-inner {
+ max-width: 350px !important;
+ }
@@ -315,6 +318,11 @@
+
+
+
+
+
diff --git a/Compras/RepCxPDetalle.aspx.vb b/Compras/RepCxPDetalle.aspx.vb
index bad04658b..8dab1f576 100644
--- a/Compras/RepCxPDetalle.aspx.vb
+++ b/Compras/RepCxPDetalle.aspx.vb
@@ -315,7 +315,9 @@ Partial Class RepCxPDetalle
DdlTipoProveedor.SelectedValueExist(CveTipoProveedor)
Dim Comprobaciones = IfNull(Request("Comprobaciones"), -1).ToString.ToEntero
- DdlComprobacion.SelectedValueExist(Comprobaciones)
+ DdlComprobacion.SelectedValueExist(Comprobaciones)
+
+ GvDatos.Columns(9).Visible = (UsuarioActual.Empresa.Funcionalidad(131).ToEntero > 0 Or UsuarioActual.Empresa.Funcionalidad(134).ToEntero > 0)
End Sub
@@ -489,7 +491,28 @@ Partial Class RepCxPDetalle
e.Row.FCHyperLink("HplFolio").Text = String.Format("{0}...", e.Row.DBCampo("Agrupador").Substring(0, 25))
End If
Else
- e.Row.FCHyperLink("HplFolio").NavigateUrl = String.Format("/Compras/Compras.aspx?CveCompra={0}", e.Row.DBCampo("CveCompra"))
+ e.Row.FCHyperLink("HplFolio").NavigateUrl = String.Format("/Compras/Compras.aspx?CveCompra={0}", e.Row.DBCampo("CveCompra"))
+
+ If UsuarioActual.Empresa.Funcionalidad(131).ToEntero > 0 Or UsuarioActual.Empresa.Funcionalidad(134).ToEntero > 0 Then
+ Dim Str As New StringBuilder
+ Str.AppendFormat("Importe Almacen: ${0} ({1}%) ", e.Row.DBCampo("ImporteAlmacen").FormatoNumero, e.Row.DBCampo("ImporteAlmacenPorcentaje"))
+ If e.Row.DBCampo("ImporteServicios").ToDouble > 0 Then Str.AppendFormat("Importe Servicios: ${0} ({1}%) ", e.Row.DBCampo("ImporteServicios").FormatoNumero, e.Row.DBCampo("ImporteServiciosPorcentaje"))
+ If e.Row.DBCampo("ImporteDevolucion").ToDouble > 0 Then Str.AppendFormat("Importe Devuelto: ${0} ({1}%) ", e.Row.DBCampo("ImporteDevolucion").FormatoNumero, e.Row.DBCampo("ImporteDevolucionPorcentaje"))
+ Str.AppendFormat(" Importes SIN IVA")
+
+ e.Row.FCLabel("LbEstatusInv").Attributes.Add("title", Str.ToString)
+ Select Case e.Row.DBCampo("EstatusInventario").ToEntero
+ Case 1
+ e.Row.FCLabel("LbEstatusInv").Text = ""
+ e.Row.FCLabel("LbEstatusInv").ForeColor = Drawing.Color.Red
+ Case 2
+ e.Row.FCLabel("LbEstatusInv").Text = ""
+ e.Row.FCLabel("LbEstatusInv").ForeColor = Drawing.Color.DarkOrange
+ Case 3
+ e.Row.FCLabel("LbEstatusInv").Text = ""
+ e.Row.FCLabel("LbEstatusInv").ForeColor = Drawing.Color.Green
+ End Select
+ End If
End If
End If
diff --git a/Contabilidad/RegPrePoliza.aspx.vb b/Contabilidad/RegPrePoliza.aspx.vb
index e6580a22f..d89078102 100644
--- a/Contabilidad/RegPrePoliza.aspx.vb
+++ b/Contabilidad/RegPrePoliza.aspx.vb
@@ -998,36 +998,40 @@ Partial Class ContabilidadC_RegPrePoliza
If Not ObjContabilidad.UpdatePrePolizasDetalleBloquear(CvePrePoliza, False) Then
OcurrioError = True
- End If
-
-
-
- ObjContabilidad.UpdatePrePoliza(MinFecha, -1, DdlTipoPoliza.SelectedValue.ToEntero, -1, CvePrePoliza, UsuarioActual.CveEmpresa, Concepto:=TxtConcepto.Text, FechaPoliza:=TxtFechaDocumento.Text.ToDate)
-
-
- For Each row As GridViewRow In GvPrePoliza.Rows
- If row.DataKey("CvePrePolizaDetalle").ToEntero > 0 Then
- If Not ObjContabilidad.UpdatePrepolizasDetalle(row.DataKey("CvePrePolizaDetalle").ToEntero, row.FCTextBox("TxtConcepto").Text, row.FCDropDownList("DdlSubProyecto").SelectedValue.ToEntero,
+ End If
+
+
+
+ If ObjContabilidad.UpdatePrePoliza(MinFecha, -1, DdlTipoPoliza.SelectedValue.ToEntero, -1, CvePrePoliza, UsuarioActual.CveEmpresa, Concepto:=TxtConcepto.Text, FechaPoliza:=TxtFechaDocumento.Text.ToDate) Then
+
+
+
+ For Each row As GridViewRow In GvPrePoliza.Rows
+ If row.DataKey("CvePrePolizaDetalle").ToEntero > 0 Then
+ If Not ObjContabilidad.UpdatePrepolizasDetalle(row.DataKey("CvePrePolizaDetalle").ToEntero, row.FCTextBox("TxtConcepto").Text, row.FCDropDownList("DdlSubProyecto").SelectedValue.ToEntero,
row.FCDropDownList("DdlCtaContable").SelectedValue.ToEntero, If(row.FCTextBox("TxtCargo").Text.ToDecimal <> 0, False, True), If(row.FCTextBox("TxtCargo").Text.ToDecimal <> 0,
- row.FCTextBox("TxtCargo").Text.ToDecimal, row.FCTextBox("TxtAbono").Text.ToDecimal), CveTipoGasto:=If(DdlTipoGasto.Visible, row.FCDropDownList("DdlTipoGasto").SelectedValue.ToEntero, row.DataKey("CveTipoGasto").ToEntero)) Then
- OcurrioError = True
- Exit For
- End If
- Else
- If Not ObjContabilidad.AddPrePolizasDetalle(CvePrePoliza, If(row.FCTextBox("TxtCargo").Text.ToDecimal <> 0, False, True), If(row.FCTextBox("TxtCargo").Text.ToDecimal <> 0,
+ row.FCTextBox("TxtCargo").Text.ToDecimal, row.FCTextBox("TxtAbono").Text.ToDecimal), CveTipoGasto:=If(DdlTipoGasto.Visible, row.FCDropDownList("DdlTipoGasto").SelectedValue.ToEntero, row.DataKey("CveTipoGasto").ToEntero)) Then
+ OcurrioError = True
+ Exit For
+ End If
+ Else
+ If Not ObjContabilidad.AddPrePolizasDetalle(CvePrePoliza, If(row.FCTextBox("TxtCargo").Text.ToDecimal <> 0, False, True), If(row.FCTextBox("TxtCargo").Text.ToDecimal <> 0,
row.FCTextBox("TxtCargo").Text.ToDecimal, row.FCTextBox("TxtAbono").Text.ToDecimal), row.DataKey("Referencia").ToString,
row.DataKey("CveConceptoContable").ToEntero, row.FCTextBox("TxtConcepto").Text, Now,
row.FCDropDownList("DdlCtaContable").SelectedValue.ToEntero, 0, CveSubProyecto:=row.FCDropDownList("DdlSubProyecto").SelectedValue.ToEntero,
CveTipoGasto:=If(DdlTipoGasto.Visible, row.FCDropDownList("DdlTipoGasto").SelectedValue.ToEntero, row.DataKey("CveTipoGasto").ToEntero),
ImporteMX:=If(row.FCTextBox("TxtCargo").Text.ToDecimal <> 0,
- row.FCTextBox("TxtCargo").Text.ToDecimal, row.FCTextBox("TxtAbono").Text.ToDecimal), CveProveedor:=DdlProveedores.SelectedValue.ToEntero) Then
- OcurrioError = True
- Exit For
- End If
- End If
-
- Next
-
+ row.FCTextBox("TxtCargo").Text.ToDecimal, row.FCTextBox("TxtAbono").Text.ToDecimal), CveProveedor:=DdlProveedores.SelectedValue.ToEntero) Then
+ OcurrioError = True
+ Exit For
+ End If
+ End If
+
+ Next
+ Else
+ OcurrioError = True
+ End If
+
If Not OcurrioError Then
ObjContabilidad.Commit()
Alert("La PrePoliza se actualizó correctamente.", TipoMensaje.MsgInformacion)
diff --git a/Contratos/Contrato.aspx b/Contratos/Contrato.aspx
index dbe3e9d5b..c75733b7f 100644
--- a/Contratos/Contrato.aspx
+++ b/Contratos/Contrato.aspx
@@ -2247,6 +2247,7 @@
+
diff --git a/Empresas/57/Formatos/Factura.rdlc b/Empresas/57/Formatos/Factura.rdlc
index 4f06fc89a..d09c31329 100644
--- a/Empresas/57/Formatos/Factura.rdlc
+++ b/Empresas/57/Formatos/Factura.rdlc
@@ -4153,11 +4153,25 @@
Right
+
+
+
+ Sucursal:
+
+
+
+
+ Textbox111.66812cm0.10722cm
- 2.31759cm
+ 2.54689cm3.426cm54
+
+
+
+
Textbox211.66812cm3.65968cm
- 2.31759cm
+ 2.54689cm6.20467cm55
@@ -130,7 +130,7 @@
=Fields!ConceptoContable.Value
@@ -164,7 +164,7 @@
=Fields!TipoDocto.Value
@@ -198,7 +198,7 @@
=Fields!SerieFolio.Value
@@ -232,7 +232,7 @@
=Fields!FolioReferencia.Value
@@ -266,7 +266,7 @@
=Fields!Cargo.Value
@@ -301,7 +301,7 @@
=Fields!Abono.Value
@@ -336,7 +336,7 @@
=Fields!Abreviatura.Value
@@ -370,7 +370,8 @@
=Fields!CargoMN.Value
@@ -404,7 +405,8 @@
=Fields!AbonoMN.Value
@@ -435,7 +437,7 @@
- 0.8593cm
+ 0.59472cmtrue
@@ -473,7 +475,7 @@
- 0.8593cm
+ 0.59472cmtrue
@@ -511,7 +513,7 @@
- 0.8593cm
+ 0.59472cmtrue
@@ -549,7 +551,7 @@
- 0.8593cm
+ 0.59472cmtrue
@@ -587,7 +589,7 @@
- 0.8593cm
+ 0.59472cmtrue
@@ -625,7 +627,7 @@
- 0.8593cm
+ 0.59472cmtrue
@@ -663,7 +665,7 @@
- 0.8593cm
+ 0.59472cmtrue
@@ -701,7 +703,7 @@
- 0.8593cm
+ 0.59472cmtrue
@@ -710,7 +712,7 @@
- Moneda
+ Mon.
@@ -739,7 +741,7 @@
- 0.8593cm
+ 0.59472cmtrue
@@ -777,7 +779,7 @@
- 0.8593cm
+ 0.59472cmtrue
@@ -831,7 +833,7 @@
=Fields!RazonSocial.Value
@@ -860,8 +862,8 @@
DataSet10.75875cm0.06614cm
- 1.4593cm
- 19.58715cm
+ 1.19472cm
+ 19.55393cm
diff --git a/Empresas/Grales/Formatos/Conciliacion.rdlc b/Empresas/Grales/Formatos/Conciliacion.rdlc
index c00b8a81b..cfcc22af8 100644
--- a/Empresas/Grales/Formatos/Conciliacion.rdlc
+++ b/Empresas/Grales/Formatos/Conciliacion.rdlc
@@ -2017,7 +2017,7 @@
- Contralor
+ ContadorHTML