diff --git a/App_Code/ClsContabilidad.vb b/App_Code/ClsContabilidad.vb
index 51d7d76b3..9f5fc09fa 100644
--- a/App_Code/ClsContabilidad.vb
+++ b/App_Code/ClsContabilidad.vb
@@ -3,6 +3,7 @@ Option Strict On
Imports System.Data
Imports System.Data.SqlClient
+Imports DocumentFormat.OpenXml.Math
Imports Extensiones
Public Class ClsContabilidad
@@ -754,6 +755,7 @@ Public Class ClsContabilidad
End With
Try
+ SqlAdapter.SelectCommand.CommandTimeout = 0
SqlAdapter.Fill(Data)
Retorno = SqlAdapter.SelectCommand.Parameters("@Movtos").Value.ToString.ToEntero
Catch ex As Exception
@@ -3865,7 +3867,7 @@ Public Class ClsContabilidad
Return Retorno
End Function
- Public Function GetCambioSituacionFinanciera(FechaI As Date, FechaF As Date, Unidad As Integer, TipoReporte As Integer, CveSubProyecto As String, CveEmpresa As Integer) As Boolean
+ Public Function GetCambioSituacionFinanciera(FechaI As Date, FechaF As Date, Unidad As Integer, TipoReporte As Integer, CveSubProyecto As String, CveEmpresa As Integer, Optional ConMovimientos As Integer = -1) As Boolean
Dim Retorno = False
DataAdapter("PA_Conta_RepCambioSituacionFinanciera")
@@ -3877,9 +3879,11 @@ Public Class ClsContabilidad
.Add("@TipoReporte", SqlDbType.Int).Value = TipoReporte
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
+ .Add("@ConMovimientos", SqlDbType.Int).Value = ConMovimientos
End With
Try
+ SqlAdapter.SelectCommand.CommandTimeout = 0
SqlAdapter.Fill(Data)
Retorno = True
Catch ex As Exception
@@ -4124,7 +4128,7 @@ Public Class ClsContabilidad
Return Retorno
End Function
- Public Function GetLibroDiario(FechaInicio As Date, FechaFin As Date, CveEmpresa As Integer) As Boolean
+ Public Function GetLibroDiario(FechaInicio As Date, FechaFin As Date, CveEmpresa As Integer, Optional CveTipoPoliza As Integer = -1) As Boolean
Dim Retorno = False
'SqlAdapter.SelectCommand.t
@@ -4135,6 +4139,7 @@ Public Class ClsContabilidad
.Add("@FechaInicio", SqlDbType.Date).Value = FechaInicio
.Add("@FechaFin", SqlDbType.Date).Value = FechaFin
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
+ .Add("@CveTipoPoliza", SqlDbType.Int).Value = CveTipoPoliza
End With
SqlAdapter.SelectCommand.CommandTimeout = 0
diff --git a/CRM/EmpresaCRM.aspx b/CRM/EmpresaCRM.aspx
index c01d3a2ed..34a05019e 100644
--- a/CRM/EmpresaCRM.aspx
+++ b/CRM/EmpresaCRM.aspx
@@ -19,6 +19,19 @@
Div.MultiLineTextBox > label#lbltxtdinamico {
height: 83px;
}
+
+
+ /* #DivBodyEmpresa > div:nth-child(2) > .form-group.form-md-line-input .help-block.errorimput ~ label:before {
+ content: " ";
+ color: #F3565D;
+ }*/
+
+ #DivBodyEmpresa > div:nth-child(2) > .help-block.errorimput ~ label:before {
+ content: " ";
+ color: #F3565D;
+ }
+
+
@@ -70,12 +83,21 @@
-
+ <%--
- <%----%>
+
+
--%>
+
+
+
+
+
+
diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb
index e7ae66cd7..6030b0aba 100644
--- a/Compras/Compras.aspx.vb
+++ b/Compras/Compras.aspx.vb
@@ -9,7 +9,7 @@ Imports System.IO
Imports System.Threading.Tasks
Imports Newtonsoft.Json
Imports Extensiones
-
+Imports System.Activities.Expressions
Partial Class Compras_Compras
Inherits ClsPaginas
@@ -1167,6 +1167,25 @@ Partial Class Compras_Compras
End Set
End Property
+
+ Private Property NumeroReembolsoOriginal As String
+ Get
+
+ If ViewState("NumeroReembolsoOriginal") Is Nothing Then
+ ViewState("NumeroReembolsoOriginal") = ""
+ End If
+
+ Return ViewState("NumeroReembolsoOriginal").ToString
+ End Get
+ Set(value As String)
+ ViewState("NumeroReembolsoOriginal") = value
+ End Set
+
+
+ End Property
+
+
+
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
If Not IsPostBack Then
'ImgBtnBuscarOC.Attributes.Add("data-toggle", "tooltip")
@@ -2700,6 +2719,10 @@ Partial Class Compras_Compras
TrRembolsoCajaChica.Visible = True
End If
+ If dr("CvePersonal").ToString.ToEntero > 0 Or dr("CveCajaChica").ToString.ToEntero > 0 Then
+ NumeroReembolsoOriginal = dr("NumeroReembolso").ToString
+ End If
+
VisualizaEstatusCompraSaldo(dr("TipoDocto").ToString, dr("Saldo").ToString.ToDecimal, dr("Total").ToString.ToDecimal)
If dr("IdPoliza").ToString.ToEntero > 0 Then
HplCompraContabilizada.Text = "Si"
@@ -2766,6 +2789,9 @@ Partial Class Compras_Compras
ImgDownPDF.Visible = True : ImgDownPDF.NavigateUrl = String.Format("/Compras/PopUpVerFactura.aspx?P={0}", Encripta(String.Format("OP=Fact&EXT=pdf&CveFactura={0}&RFC={1}", dr("CveFactura"), dr("RFC").ToString.Replace("&", "%26%"))))
End If
+
+ TxtRembolsoNumero.Enabled = If(IdPoliza > 0, False, True)
+
'CargaDetalle
If ObjCompra.GetCompraDetalle(CveCompra) Then
TmpDT = ObjCompra.DtResultados
@@ -9251,6 +9277,36 @@ Partial Class Compras_Compras
End If
+
+ If (TxtRembolsoNumero.Text.Trim.Length > 0 AndAlso IdPoliza <= 0) AndAlso (NumeroReembolsoOriginal.Trim <> TxtRembolsoNumero.Text.Trim) Then
+
+ 'CUANDO ES REEMBOLSO COMPROBACION Y CAJA CHICA
+ If UsuarioActual.CveEmpresa.Contiene(1, 119, 141) AndAlso TxtRembolsoNumero.Text.Trim <> "" AndAlso (DdlRembolsoPersonal.SelectedValue.ToEntero > 0 Or DdlRembolsoCajaChica.SelectedValue.ToEntero > 0) Then
+ If ObjCompra.GetComprobacion(DdlRembolsoPersonal.SelectedValue.ToEntero, DdlRembolsoCajaChica.SelectedValue.ToEntero, TxtRembolsoNumero.Text.Trim, UsuarioActual.CveEmpresa) Then
+ Dim CvePreComprobacion As Integer
+ If ObjCompra.DtResultados.Rows.Count = 0 Then
+ 'sino existe, creamos la comprobacion
+ Dim tConcepto As String = If(DdlRembolsoPersonal.SelectedValue.ToEntero > 0, DdlRembolsoPersonal.SelectedItem.Text, DdlRembolsoCajaChica.SelectedItem.Text)
+ tConcepto = String.Format("{0}-{1}", tConcepto, TxtRembolsoNumero.Text.Trim)
+
+ CvePreComprobacion = ObjContabilidad.AddPrePolizas("Compras Comproba", 1, 0, 0, 1, TxtFecha.Text.ToDate, tConcepto, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
+
+ If ObjCompra.AddComprobacion(DdlRembolsoPersonal.SelectedValue.ToEntero, DdlRembolsoCajaChica.SelectedValue.ToEntero, TxtRembolsoNumero.Text.Trim, CvePreComprobacion, UsuarioActual.CveEmpresa) > 0 Then
+
+ End If
+ Else
+ 'si ya existe, obtenemos la prepóliza
+ CvePreComprobacion = ObjCompra.DtResultados.FiltroPrimeroValor("CvePrePoliza").ToEntero
+ End If
+
+ ObjContabilidad.PrePolizaUnificacion(CvePreComprobacion, CvePrePoliza)
+ End If
+
+ End If
+
+
+ End If
+
Else
Retorno = False
End If
diff --git a/Contabilidad/LibroMayor.aspx.vb b/Contabilidad/LibroMayor.aspx.vb
index d605ab9d5..e2fe283cf 100644
--- a/Contabilidad/LibroMayor.aspx.vb
+++ b/Contabilidad/LibroMayor.aspx.vb
@@ -78,14 +78,14 @@ Partial Class Contabilidad_LibroMayor
FechaInicio = If(IsDate(TxtFechaDel.Text), TxtFechaDel.Text.ToDate, MinFecha)
FechaFin = If(IsDate(TxtFechaAl.Text), TxtFechaAl.Text.ToDate, MaxFecha)
- '140
- Dim CvecuentaPadre As Integer = 57416 '140
+
+
If UsuarioActual.Empresa.TipoContabilidad = 1 Then
Dim ObjConta As New ClsContabilidad
- If ObjConta.GetLibroMayorSIG(CvecuentaPadre, FechaInicio, FechaFin, 1, UsuarioActual.CveEmpresa) Then
+ If ObjConta.GetLibroMayorSIG(-1, FechaInicio, FechaFin, 1, UsuarioActual.CveEmpresa) Then
DtDatos = ObjConta.DtResultados
Else
DtDatos = Nothing
diff --git a/Contabilidad2/RepCambiosSituacionFinanciera.aspx b/Contabilidad2/RepCambiosSituacionFinanciera.aspx
index 9cfd5be3d..395e58124 100644
--- a/Contabilidad2/RepCambiosSituacionFinanciera.aspx
+++ b/Contabilidad2/RepCambiosSituacionFinanciera.aspx
@@ -33,54 +33,54 @@