diff --git a/App_Code/ClsMovimientos.vb b/App_Code/ClsMovimientos.vb
index 32eda4c1c..937f5cfc6 100644
--- a/App_Code/ClsMovimientos.vb
+++ b/App_Code/ClsMovimientos.vb
@@ -1875,5 +1875,24 @@ Public Class ClsMovimientos
Return Retorno
End Function
+
+ Public Function GetRemisionesCobranza(CveEmpresa As Integer, CveSubProyecto As Integer, FechaInicio As Date, FechaFin As Date) As Boolean
+ Dim Retorno As Boolean = False
+ DataAdapter("PA_Vta_RemisionesCobranza")
+ With SqlAdapter.SelectCommand.Parameters
+ .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
+ .Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
+ .Add("@FechaInicio", SqlDbType.Date).Value = FechaInicio
+ .Add("@FechaFin", SqlDbType.Date).Value = FechaFin
+ End With
+ Try
+ SqlAdapter.Fill(Data)
+ Retorno = True
+ Catch ex As SqlException
+ OnError("Ocurrió un error al consultar las Compras Pagadas de Caja Chica.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
+ End Try
+
+ Return Retorno
+ End Function
End Class
diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb
index e974a2f66..71e703a33 100644
--- a/App_Code/ClsPaginas.vb
+++ b/App_Code/ClsPaginas.vb
@@ -9306,6 +9306,7 @@ Public Class ClsPaginas
'PaginaDict.Add("/Ventas/RepABT.aspx".ToUpper(), 353)
PaginaDict.Add("/Ventas/CatPromociones.aspx".ToUpper(), 123)
PaginaDict.Add("/Ventas/Promociones.aspx".ToUpper(), 123)
+ PaginaDict.Add("/Ventas/RepEntregasEcommerce.aspx".ToUpper(), 371)
PaginaDict.Add("/Ventas/CatFamiliaSubFamilia.aspx".ToUpper(), 372)
PaginaDict.Add("/Ventas/RepComisiones.aspx".ToUpper(), 382)
PaginaDict.Add("/Ventas/RepComisionesDetalle.aspx".ToUpper(), 382)
diff --git a/App_Code/ClsVentas.vb b/App_Code/ClsVentas.vb
index ccfa7a551..89fa9d3c9 100644
--- a/App_Code/ClsVentas.vb
+++ b/App_Code/ClsVentas.vb
@@ -1721,7 +1721,7 @@ Public Class ClsVentas
Optional EsGarantia As Integer = -1, Optional CveCondicionesPago As Integer = -1, Optional EsDistribuidor As Integer = -1, Optional CveClasificacion2 As Integer = -1,
Optional ServicioDomicilio As Integer = -1) As Boolean
Dim Retorno As Boolean = False
- DataAdapter("PA_Vta_GetRepPS")
+ DataAdapter("PA_Vta_GetRepPS33")
With SqlAdapter.SelectCommand.Parameters
.Add("@CveProyecto", SqlDbType.Int).Value = CveProyecto
@@ -6080,6 +6080,7 @@ Public Class ClsVentas
End Function
#End Region
+
#Region "PRODEDIMIENTOS"
Public Function GetProcedimientos(CveProcedimiento As Integer, CveEmpresa As Integer, Estatus As Integer) As Boolean
diff --git a/Ashx/SIGWeb.ashx b/Ashx/SIGWeb.ashx
index b7689a08c..82169dccc 100644
--- a/Ashx/SIGWeb.ashx
+++ b/Ashx/SIGWeb.ashx
@@ -124,6 +124,8 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
cancelarRemision(context)
Case "RemoveMovimiento"
RemoveMovimiento(context)
+ Case "GetContaCuentas"
+ GetContaCuentas(context)
End Select
Catch ex As Exception
ex.GuardaLog(ex.Message)
@@ -872,7 +874,7 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
If objInv.GetExistenciasProducto(CvePS, -1, CveEmpresa, -1, FechaMovto:=DateTime.Today.AddDays(1).ToString("yyyy/MM/dd HH:mm")) Then
' limpio los almacenes donde no tiene ningun producto existencia
- For i = objInv.DtResultados.Columns.Count - 1 To 1 Step -1
+ For i As Integer = objInv.DtResultados.Columns.Count - 1 To 1 Step -1
If Not objInv.DtResultados.Columns(i).ColumnName.Contiene("CveAlmacen", "Almacen", "Existencia") Then
objInv.DtResultados.Columns.RemoveAt(i)
@@ -996,7 +998,7 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
'If FuePorXml >= 0 Then
' DTPS = DTPS.Where((Function(a) Convert.ToInt32(a!FuePorXML) = FuePorXml))
'End If
-
+ Name = Name.REPLACE(" ", "*")
If Name <> "-1" Then
If PSCodigoDescripcion = "PSCodigo" Then
DTPS = DTPS.Where((Function(a) a!PSCodigo.ToString.ToLower Like ("*" + Name.ToLower + "*")))
@@ -1434,6 +1436,59 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
End Function
#End Region
+ Private Function GetContaCuentas(ByVal context As HttpContext, Optional PSCodigoDescripcion As String = "PSCodigo") As String
+ Dim retorno As String = ""
+ Dim DtPSRetorno As DataTable = Nothing
+
+ 'NOTA:
+ ' EN EL WHERE DE LINQ NO SE DEBE USAS EL OPERADOR 'AND' SABE PORQUE FUNCIONA DIFERENTE SE DEBE USAR 'ANDALSO',
+ ' EJEMPLO UNA CONDICION AND DE DOS CAMPOS ARROJA CERO RESULTADOS PERO SI SE PONE ESTAS DOS CONDICIONES POR SEPARADO ARROJA DATOS
+ Dim usuario As Usuario = UsuarioActual(context)
+ Dim CveEmpresa As Integer
+ If IsNothing(usuario) Then
+ context.Response.Write("")
+ Else
+ CveEmpresa = usuario.CveEmpresa
+ Dim Afectable = IfNull(context.Request("Afectable"), "-1").ToString.ToEntero
+ Dim Name = IfNull(context.Request("Name"), "-1").ToString.Replace(" ", "%")
+ 'Dim CveClasificacion = IfNull(context.Request("CveClasificacion"), "-1").ToString.ToEntero
+ 'Dim CveSubFamilia = IfNull(context.Request("CveSubFamilia"), "-1").ToString.ToEntero
+ 'Dim CveClasificacionPresupuesto = IfNull(context.Request("CveClasificacionPresupuesto"), "-1").ToString.ToEntero
+ 'Dim Pagina = IfNull(context.Request("Pagina"), "-1").ToString
+ 'Dim Estatus = IfNull(context.Request("Estatus"), "1").ToString
+ 'Dim CveSucursal = IfNull(context.Request("cvesucursal"), "-1").ToString.ToEntero
+ 'Dim CveSubProyecto = IfNull(context.Request("cvesubproyecto"), "-1").ToString.ToEntero
+ 'Dim UsoClasificacion = IfNull(context.Request("usoclasificacion"), "-1").ToString.ToEntero
+ 'Dim AplicaParaVenta = IfNull(context.Request("aplicaparaventa"), "1").ToString.ToEntero
+ 'Dim CveMarca = IfNull(context.Request("cvemarca"), "-1").ToString.ToEntero
+
+ DtPSRetorno = ClsPaginas.GlobalDTContaCuentasContables(CveEmpresa, "-1", Afectable).FiltraParametros($"CuentaFormatoNombre like '%{Name}%'")
+
+
+
+
+ If DtPSRetorno IsNot Nothing AndAlso DtPSRetorno.Rows.Count > 0 Then
+
+ DtPSRetorno.Columns("CvePS").ColumnName = "id"
+ DtPSRetorno.Columns(PSCodigoDescripcion).ColumnName = "text"
+ If PSCodigoDescripcion = "PSCodigo" Then
+ DtPSRetorno.Columns().Remove("PSCodigoClasificacion")
+ Else
+ DtPSRetorno.Columns().Remove("PSCodigo")
+ End If
+
+ retorno = JsonConvert.SerializeObject(DtPSRetorno).ToString
+ context.Response.Write(retorno)
+ DtPSRetorno.Dispose()
+ DtPSRetorno = Nothing
+ Else
+ context.Response.Write("[]")
+ End If
+
+ End If
+
+ Return retorno
+ End Function
Private Function GetFilesDirectory(ByVal context As HttpContext) As String
Dim retorno As String = ""
@@ -1443,7 +1498,7 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
Dim xmlarchivos As System.Xml.Linq.XDocument = New System.Xml.Linq.XDocument()
Dim xfolder As XElement = New XElement("folder")
- For Each urfile In System.IO.Directory.GetFiles(directorio)
+ For Each urfile As String In System.IO.Directory.GetFiles(directorio)
Dim xfile As New XElement("archivo", "")
xfile.SetAttributeValue("EXT", Path.GetExtension(urfile))
xfile.SetAttributeValue("urlfile", urfile)
diff --git a/Bin/GoCfdi.dll b/Bin/GoCfdi.dll
index 73bf07e1e..732b21123 100644
Binary files a/Bin/GoCfdi.dll and b/Bin/GoCfdi.dll differ
diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb
index c6a2fd3ed..ef64bf4d7 100644
--- a/Compras/Compras.aspx.vb
+++ b/Compras/Compras.aspx.vb
@@ -19745,7 +19745,7 @@ Partial Class Compras_Compras
Dim DTInventarios As DataTable = ObjInventarios.DtResultados
If DTInventarios.Rows.Count > 0 Then
- Dim DTMovimientos As DataTable = DTInventarios.FiltraParametros("", "", {"CVeMovimiento"})
+ Dim DTMovimientos As DataTable = DTInventarios.FiltraParametros("", "", {"CveMovimiento"})
For Each diRow As DataRow In DTMovimientos.Rows
@@ -19789,7 +19789,7 @@ Partial Class Compras_Compras
SBEliminacionCompra.Append($"-Cantidad: {dRow("Cantidad").ToString.ToDecimal().ToString("###,###,###.00") }, PS: {dRow("PS")}, Obs: {dRow("Obs")}, Sub Proyecto: {dRow("SubProyecto")}, Tipo Gasto: {dRow("TipoGasto")}, IVA: {dRow("IVA").ToString.ToDecimal.ToString("###,###,###.00")}, IEPSPS: {dRow("IEPSPS").ToString.ToDecimal.ToString("###,###,###.00") }
")
Next
- If Not ObjGral.AddHistorialBitacora(Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, CveCompra, Nothing, "", "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 1,
+ If Not ErrorCompra AndAlso Not ObjGral.AddHistorialBitacora(Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, CveCompra, Nothing, "", "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 1,
TxtModalEliminarCompraDescripcion.Text, "Compras", SBEliminacionCompra.ToString) Then
ErrorCompra = True
End If
diff --git a/Compras/RepComprasAF.aspx.vb b/Compras/RepComprasAF.aspx.vb
index 360e706c8..0448dfd73 100644
--- a/Compras/RepComprasAF.aspx.vb
+++ b/Compras/RepComprasAF.aspx.vb
@@ -60,19 +60,19 @@ Partial Class Compras_RepComprasAF
DdlProveedores.DataSource = GlobalDTCompProveedores(UsuarioActual.CveEmpresa)
DdlProveedores.DataBind()
- DdlProveedores.Items.Insert(0, New ListItem("Seleccione", "-1"))
+ DdlProveedores.Items.Insert(0, New ListItem("Todos", "-1"))
DdlMonedas.DataSource = GlobalDTMonedas()
DdlMonedas.DataBind()
- DdlMonedas.Items.Insert(0, New ListItem("Seleccione", "-1"))
+ DdlMonedas.Items.Insert(0, New ListItem("Todos", "-1"))
DdlTipoActivoFijo.DataSource = GlobalDTTipoActivoFijo(UsuarioActual.CveEmpresa).FiltraParametros("", "TipoActivoFijo")
DdlTipoActivoFijo.DataBind()
- DdlTipoActivoFijo.Items.Insert(0, New ListItem("Seleccione", "-1"))
+ DdlTipoActivoFijo.Items.Insert(0, New ListItem("Todos", "-1"))
DdlClasificacion.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltraParametros(" Codigo = '' OR Codigo IS NULL ", Orderby:="Clasificacion")
DdlClasificacion.DataBind()
- DdlClasificacion.Items.Insert(0, New ListItem("Seleccione", "-1"))
+ DdlClasificacion.Items.Insert(0, New ListItem("Todos", "-1"))
Dim ObjClasificacion As New ClsClasificaciones
@@ -85,11 +85,11 @@ Partial Class Compras_RepComprasAF
ObjClasificacion.Dispose()
DdlClasificacion2.DataBind()
- DdlClasificacion2.Items.Insert(0, New ListItem("Seleccione", "-1"))
+ DdlClasificacion2.Items.Insert(0, New ListItem("Todos", "-1"))
DdlActivoFijo.DataSource = GlobalDTActivoFijos(UsuarioActual.CveEmpresa)
DdlActivoFijo.DataBind()
- DdlActivoFijo.Items.Insert(0, New ListItem("Seleccione", "-1"))
+ DdlActivoFijo.Items.Insert(0, New ListItem("Todos", "-1"))
CargarCentrosDeCosto(DdlProyecto, DdlSubProyecto, LblProyecto, LblSubProyecto, divProyecto:=DivProyecto)
diff --git a/Contabilidad/RegPrePolizaS.aspx.vb b/Contabilidad/RegPrePolizaS.aspx.vb
index d932c2a87..40ef9cbe7 100644
--- a/Contabilidad/RegPrePolizaS.aspx.vb
+++ b/Contabilidad/RegPrePolizaS.aspx.vb
@@ -271,10 +271,18 @@ Partial Class ContabilidadC_RegPrePolizaS
Beneficiario = "-1"
Actualizar = False
IdPoliza = -1
+ TipoPlantilla = -1
+ If IfNull(Request("Tipo"), "").ToString = "Ing" Then
+ TipoPlantilla = 1
+ LblEncabezado.Text = "Otros Ingresos"
+ End If
CargaPlantillas(TipoPlantilla)
CargaConceptosContablesE()
CargaModalConceptoCuentas()
+ CargaConceptos()
+ CargaSubProyectos()
+ CargaCuentasBancos()
If IfNull(Request("Tipo"), "").ToString = "NOMPROV" Then
DivTipoGasto.Visible = True
@@ -346,20 +354,6 @@ Partial Class ContabilidadC_RegPrePolizaS
End If
- TipoPlantilla = -1
- If IfNull(Request("Tipo"), "").ToString = "Ing" Then
- TipoPlantilla = 1
- LblEncabezado.Text = "Otros Ingresos"
- End If
-
-
-
- 'If UsuarioActual.CveRol = 1 Then trNotificar.Visible = True
-
- CargaConceptos()
- CargaSubProyectos()
- CargaCuentasBancos()
-
'crea tabla temporal
ArregloMovs = New ArrayList
If IfNull(Request("Tipo"), "").ToString <> "NOMPROV" Then
@@ -459,7 +453,7 @@ Partial Class ContabilidadC_RegPrePolizaS
TxtFechaelaboracion.Text = dr("FechaIng").ToString.ToDate.ToString("dd/MM/yyyy")
TxtFechaelaboracion.ToolTip = dr("FechaIng").ToString.ToDate.ToShortTimeString
CvePlantillaPoliza = dr("CvePlantillaPoliza").ToString.ToEntero
- DdlPlantilla.SelectedValue = CvePlantillaPoliza.ToString
+ DdlPlantilla.SelectedValueExist(CvePlantillaPoliza)
HplImprimirPDF.NavigateUrl = $"/Compras/PopUpVerFactura.aspx?P={Encripta($"OP=PREPO&CvePrePoliza={CvePrePoliza}")}"
HplImprimirPDF.Visible = True
If UsuarioActual.CveRol = 1 Then TxtUsuarioElaboro.ToolTip = dr("Modulo").ToString
@@ -559,17 +553,17 @@ Partial Class ContabilidadC_RegPrePolizaS
Dim CveConceptoContable As Integer = e.Row.DataKey("CveConceptoContable").ToEntero
- If CveConceptoContable.Contiene(1, 2, 12, 91, 13, 38, 207, 203, 39, 61, 62, 63, 4, 278, 291, 292, 293, 294, 272, 150, 251, 301) Then e.Row.FCHyperLink("HlReferencia").NavigateUrl = String.Format("/Ventas/Ventas.aspx?CveVenta={0}", e.Row.DataKey("CveVenta"))
- If CveConceptoContable.Contiene(5, 6, 17, 18, 14, 19, 25, 26, 60, 205, 225, 234, 235, 240, 305, 306, 307, 308, 309, 310, 311, 312, 201, 206, 323, 324, 341, 342, 343, 344, 304, 272, 259, 287, 288) Then e.Row.FCHyperLink("HlReferencia").NavigateUrl = String.Format("/Compras/Compras.aspx?CveCompra={0}", e.Row.DataKey("CveCompra"))
- If CveConceptoContable.Contiene(68) Then e.Row.FCHyperLink("HlReferencia").NavigateUrl = String.Format("/Inventarios/EntradasSalidas.aspx?CveMovimiento={0}", e.Row.DBCampo("CveMovimientoAlmacen"))
- If CveConceptoContable.Contiene(30, 204, 66, 92, 202, 10, 21, 48, 56, 338, 339, 340, 345, 346, 347) Then e.Row.FCHyperLink("HlReferencia").NavigateUrl = String.Format("/Bancos/IE.aspx?CveIE={0}", e.Row.DBCampo("CveIE"))
+ If CveConceptoContable.Contiene(1, 2, 12, 91, 13, 38, 207, 203, 39, 61, 62, 63, 4, 278, 291, 292, 293, 294, 272, 150, 251, 301) Then e.Row.FCHyperLink("HlReferencia").NavigateUrl = String.Format("/Ventas/Ventas.aspx?CveVenta={0}", e.Row.DataKey("CveVenta"))
+ If CveConceptoContable.Contiene(5, 6, 17, 18, 14, 19, 25, 26, 60, 205, 225, 234, 235, 240, 305, 306, 307, 308, 309, 310, 311, 312, 201, 206, 323, 324, 341, 342, 343, 344, 304, 272, 259, 287, 288) Then e.Row.FCHyperLink("HlReferencia").NavigateUrl = String.Format("/Compras/Compras.aspx?CveCompra={0}", e.Row.DataKey("CveCompra"))
+ If CveConceptoContable.Contiene(68) Then e.Row.FCHyperLink("HlReferencia").NavigateUrl = String.Format("/Inventarios/EntradasSalidas.aspx?CveMovimiento={0}", e.Row.DBCampo("CveMovimientoAlmacen"))
+ If CveConceptoContable.Contiene(30, 204, 66, 92, 202, 10, 21, 48, 56, 338, 339, 340, 345, 346, 347) Then e.Row.FCHyperLink("HlReferencia").NavigateUrl = String.Format("/Bancos/IE.aspx?CveIE={0}", e.Row.DBCampo("CveIE"))
- If e.Row.DBCampo("Modificado") = "True" Then
- e.Row.FCCheckBox("chkModificado").Checked = True
- End If
- End If
+ If e.Row.DBCampo("Modificado") = "True" Then
+ e.Row.FCCheckBox("chkModificado").Checked = True
+ End If
+ End If
- If e.Row.RowType = DataControlRowType.Header Then
+ If e.Row.RowType = DataControlRowType.Header Then
'e.Row.FCDropDownList("DdlSubProyectoFiltro").DataSource = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa)
'e.Row.FCDropDownList("DdlSubProyectoFiltro").DataBind()
'e.Row.FCDropDownList("DdlSubProyectoFiltro").Items.Insert(0, New ListItem("Todos", "-1"))
@@ -579,20 +573,16 @@ Partial Class ContabilidadC_RegPrePolizaS
Private Sub CargaPlantillas(TipoPlantilla As Integer)
- 'GvPlantillas.DataSource = GlobalDTContaPlantillasPolizas(UsuarioActual.CveEmpresa, TipoPlantilla)
- 'GvPlantillas.DataBind()
+ Dim dtt As DataTable = Nothing
If UsuarioActual.CveEmpresa.Contiene(120) Then
- DdlPlantilla.DataSource = GlobalDTContaPlantillasPolizas(UsuarioActual.CveEmpresa, -1)
- DdlPlantilla2.DataSource = GlobalDTContaPlantillasPolizas(UsuarioActual.CveEmpresa, -1)
-
+ dtt = GlobalDTContaPlantillasPolizas(UsuarioActual.CveEmpresa, -1)
Else
- DdlPlantilla.DataSource = GlobalDTContaPlantillasPolizas(UsuarioActual.CveEmpresa, TipoPlantilla)
- DdlPlantilla2.DataSource = GlobalDTContaPlantillasPolizas(UsuarioActual.CveEmpresa, TipoPlantilla)
-
+ dtt = GlobalDTContaPlantillasPolizas(UsuarioActual.CveEmpresa, TipoPlantilla)
End If
-
+ DdlPlantilla.DataSource = dtt
+ DdlPlantilla2.DataSource = dtt
DdlPlantilla.DataBind()
DdlPlantilla.Items.Insert(0, New ListItem("Plantilla Personalizada", "53"))
@@ -886,7 +876,7 @@ Partial Class ContabilidadC_RegPrePolizaS
e.Row.FCLinkButton("ImgBancos").Visible = True
If e.Row.DataKey("ContadoTipoTransaccion").ToEntero > 0 And e.Row.DataKey("ContadoCuenta").ToEntero > 0 And e.Row.DataKey("ContadoNumeroFolio").ToString.Length > 0 And
- e.Row.DataKey("ContadoImporte").ToDecimal > 0 And e.Row.DataKey("ContadoBeneficiario").ToString.Length > 0 Then
+ e.Row.DataKey("ContadoBeneficiario").ToString.Length > 0 Then
e.Row.FCLinkButton("ImgBancos").CssClass = "btn btn-circle btn-sm green"
End If
End If
@@ -909,10 +899,17 @@ Partial Class ContabilidadC_RegPrePolizaS
TotalCargos = TxtTotalCargos.Text.ToDecimal
TotalAbonos = TxtTotalAbonos.Text.ToDecimal
Else
- For Each Gvr As GridViewRow In GvMov.Rows
- TotalCargos += Gvr.FCTextBox("TxtCargo").Text.ToDecimal
- TotalAbonos += Gvr.FCTextBox("TxtAbono").Text.ToDecimal
- Next
+ If GvPrePoliza.Visible Then
+ For Each Gvr As GridViewRow In GvPrePoliza.Rows
+ TotalCargos += Gvr.DataKey("Cargo").ToDecimal
+ TotalAbonos += Gvr.DataKey("Abono").ToDecimal
+ Next
+ Else
+ For Each Gvr As GridViewRow In GvMov.Rows
+ TotalCargos += Gvr.FCTextBox("TxtCargo").Text.ToDecimal
+ TotalAbonos += Gvr.FCTextBox("TxtAbono").Text.ToDecimal
+ Next
+ End If
End If
'validaciones
@@ -978,34 +975,6 @@ Partial Class ContabilidadC_RegPrePolizaS
'inserto las compras que voy a pagarDdlSaldos
For Each gvr As GridViewRow In Gv.Rows
- 'Registra movimieno bancario
- If gvr.DataKey("CveConceptoContable").ToEntero = 30 AndAlso (gvr.DataKey("ContadoImporte").ToDecimal <> 0 OrElse TipoGrid = 1) Then
- Dim tFolio As String = gvr.DataKey("ContadoNumeroFolio").ToString
- If tFolio.ToEntero = 0 Then tFolio = SiguienteFolioBancos(gvr.DataKey("ContadoCuenta").ToEntero, gvr.DataKey("ContadoTipoTransaccion").ToEntero)
-
- Dim ImporteIE As Decimal = gvr.DataKey("ContadoImporte").ToDecimal
-
- If TipoGrid = 1 Then
- ImporteIE = gvr.DataKey("ImporteMN").ToDecimal
- End If
-
- Dim tCveMoneda As Integer = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveCuenta:=DdlCuenta.SelectedValue.ToEntero, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveMoneda").ToEntero
-
- CveIE = ObjIE.AddBancos_IE(gvr.DataKey("ContadoCuenta").ToEntero, gvr.DataKey("ContadoTipoTransaccion").ToEntero, TxtFechaDocumento.Text.ToDate, tFolio,
- gvr.DataKey("ContadoBeneficiario"), ImporteIE, tCveMoneda, 0, gvr.DataKey("ContadoObservaciones"), "",
- False, False, 0, CvePrePolizaInsertada, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
- If CveIE < 0 Then
- MsgError = "No se pudo registrar movimiento bancario"
- Exit For
- Else
- If tFolio <> "0" Or tFolio <> "" Then
- FolioIE = tFolio
- Else
- FolioIE = ObjIE.Folio
- End If
- End If
- End If
-
ImporteME = 0
TipoCambio = 1
@@ -1045,6 +1014,7 @@ Partial Class ContabilidadC_RegPrePolizaS
End If
End If
+
If Not gvr.DataKey("CveConceptoContable").Contiene("30", "10", "204") Then ' 30-bancos, 10-anticipos proveedores, 204- blancos complementaria
If gvr.DataKey("CveConceptoContable").ToEntero = 41 Then
CveIE = gvr.FCDropDownList("DdlSaldos").SelectedValue.ToEntero
@@ -1053,6 +1023,29 @@ Partial Class ContabilidadC_RegPrePolizaS
End If
End If
+ 'Registra movimieno bancario
+ If gvr.DataKey("CveConceptoContable").ToEntero = 30 Then
+ Dim tFolio As String = gvr.DataKey("ContadoNumeroFolio").ToString
+ If tFolio.ToEntero = 0 Then tFolio = SiguienteFolioBancos(gvr.DataKey("ContadoCuenta").ToEntero, gvr.DataKey("ContadoTipoTransaccion").ToEntero)
+
+ Dim tCveMoneda As Integer = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveCuenta:=DdlCuenta.SelectedValue.ToEntero, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveMoneda").ToEntero
+
+ CveIE = ObjIE.AddBancos_IE(gvr.DataKey("ContadoCuenta").ToEntero, gvr.DataKey("ContadoTipoTransaccion").ToEntero, TxtFechaDocumento.Text.ToDate, tFolio,
+ gvr.DataKey("ContadoBeneficiario"), Importe, tCveMoneda, 0, gvr.DataKey("ContadoObservaciones"), "",
+ False, False, 0, CvePrePolizaInsertada, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
+ If CveIE < 0 Then
+ MsgError = "No se pudo registrar movimiento bancario"
+ Exit For
+ Else
+ If tFolio <> "0" Or tFolio <> "" Then
+ FolioIE = tFolio
+ Else
+ FolioIE = ObjIE.Folio
+ End If
+ End If
+ End If
+
+
If Importe <> 0 OrElse TipoGrid = 1 Then 'si es diferente de cero o si viene de grid prepolizas, que registre todo
Dim tCveCuenta As Integer = gvr.DataKey("CveCuenta").ToEntero
Dim tReferencia, tConcepto As String
@@ -1698,8 +1691,8 @@ Partial Class ContabilidadC_RegPrePolizaS
dr("CveConceptoContable") = DdlConceptosContablesE.SelectedValue
dr("Concepto") = TxtConceptoE.Text
dr("Referencia") = TxtReferenciaE.Text
- dr("TipoMovto") = If(Math.Abs(TxtCargoE.Text.ToDecimal) > 0, False, True)
- dr("ImporteMN") = If(Math.Abs(TxtCargoE.Text.ToDecimal) > 0, TxtCargoE.Text.ToDecimal, TxtAbonoE.Text.ToDecimal)
+ dr("TipoMovto") = If(Math.Abs(TxtCargoE.Text.ToDecimal) <> 0, False, True)
+ dr("ImporteMN") = If(Math.Abs(TxtCargoE.Text.ToDecimal) <> 0, TxtCargoE.Text.ToDecimal, TxtAbonoE.Text.ToDecimal)
dr("CveSubProyecto") = DdlSubProyectoE.SelectedValue
dr("SubProyecto") = DdlSubProyectoE.SelectedItem.Text
dr("CveClasificacion") = DdlClasificacionesE.SelectedValue.ToEntero
@@ -1717,7 +1710,7 @@ Partial Class ContabilidadC_RegPrePolizaS
dr("ContadoNumeroFolio") = TxtModalConceptoDocumentoFolio.Text
dr("ContadoBeneficiario") = TxtModalConceptoDocumentoBeneficiario.Text
dr("ContadoObservaciones") = TxtModalConceptoDocumentoObservaciones.Text
- dr("ContadoImporte") = TxtModalConceptoDocumentoImporte.Text.ToDecimal
+ 'dr("ContadoImporte") = TxtModalConceptoDocumentoImporte.Text.ToDecimal
If DdlComprasE.Visible = True AndAlso DdlComprasE.SelectedValue.ToEntero > 0 Then dr("FolioFactura") = DdlComprasE.SelectedItem.ToString()
If DdlVentasE.Visible = True AndAlso DdlVentasE.SelectedValue.ToEntero > 0 Then dr("FolioFactura") = DdlVentasE.SelectedItem.ToString()
@@ -1728,11 +1721,9 @@ Partial Class ContabilidadC_RegPrePolizaS
If dr("EsMonedaExtranjera").ToString = "True" Then dr("ImporteME") = TxtME.Text.ToDecimal
End If
- If DdlPorcentajeIVAE.Visible Then
- dr("PorcentajeImpuesto") = DdlPorcentajeIVAE.SelectedValue.ToDecimal
- End If
+ If DdlPorcentajeIVAE.Visible Then dr("PorcentajeImpuesto") = DdlPorcentajeIVAE.SelectedValue.ToDecimal
- If TxtCargoE.Text <> "" Then
+ If TxtCargoE.Text <> "" AndAlso TxtCargoE.Text.ToDecimal <> 0 Then
dr("Cargo") = TxtCargoE.Text.ToDecimal : dr("Abono") = 0
Else
dr("Abono") = TxtAbonoE.Text.ToDecimal : dr("Cargo") = 0
@@ -1749,7 +1740,7 @@ Partial Class ContabilidadC_RegPrePolizaS
GvPrePoliza.DataBind()
UpPrePoliza.Update()
GvPrePoliza.Visible = True
- If IndiceGrid > 0 Then GvPrePoliza.Rows(IndiceGrid).FCCheckBox("chkModificado").Checked = True
+ If IndiceGrid >= 0 Then GvPrePoliza.Rows(IndiceGrid).FCCheckBox("chkModificado").Checked = True
TxtTotalCargos.Text = DtMovimientos.SUMD("Cargo").ToString.FormatoNumero
TxtTotalAbonos.Text = DtMovimientos.SUMD("Abono").ToString.FormatoNumero
diff --git a/Contabilidad2/CatContaEjercicios.aspx b/Contabilidad2/CatContaEjercicios.aspx
index 43e5f2be4..60eac9825 100644
--- a/Contabilidad2/CatContaEjercicios.aspx
+++ b/Contabilidad2/CatContaEjercicios.aspx
@@ -159,7 +159,7 @@