diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb index 8a8e6a275..115ce05c3 100644 --- a/Compras/Compras.aspx.vb +++ b/Compras/Compras.aspx.vb @@ -16708,11 +16708,11 @@ Partial Class Compras_Compras End If - If UsuarioActual.Empresa.CveEmpresa = 158 AndAlso DdlSubProyecto.SelectedValue.ToEntero > 0 AndAlso DdlSubProyecto.SelectedValue.ToEntero.Contiene(11881, 11882, 11886) Then - RfvDdlCultivosCuadro.Visible = True - Else - RfvDdlCultivosCuadro.Visible = False - End If + 'If UsuarioActual.Empresa.CveEmpresa = 158 AndAlso DdlSubProyecto.SelectedValue.ToEntero > 0 AndAlso DdlSubProyecto.SelectedValue.ToEntero.Contiene(11881, 11882, 11886) Then + ' RfvDdlCultivosCuadro.Visible = True + 'Else + ' RfvDdlCultivosCuadro.Visible = False + 'End If End Sub Private Sub DdlPSChange() diff --git a/Contabilidad/PopUpAuxiliar.aspx.vb b/Contabilidad/PopUpAuxiliar.aspx.vb index 250bd30f0..afaa319cb 100644 --- a/Contabilidad/PopUpAuxiliar.aspx.vb +++ b/Contabilidad/PopUpAuxiliar.aspx.vb @@ -219,6 +219,16 @@ Partial Class PopUpAuxiliar Else e.Row.FCLinkButton("LnkDesAplicar").CommandArgument = String.Format("{0}|{1}|{2}", e.Row.DBCampo("CvePrePoliza"), e.Row.DBCampo("CveVentaAmortizacion"), e.Row.DBCampo("CveVenta")) End If + ElseIf e.Row.DBCampo("CveConceptoContable").Contiene("60", "272") Then 'desaplicar NC Compra + + e.Row.FCLinkButton("LnkDesAplicar").Visible = True + e.Row.FCLinkButton("LnkDesAplicar").CommandName = "DesAplicarCompra" + e.Row.FCLinkButton("imgD").Visible = False + If e.Row.DBCampo("CveConceptoContable").Contiene("272") Then + e.Row.FCLinkButton("LnkDesAplicar").CommandArgument = String.Format("{0}|{1}|{2}", e.Row.DBCampo("CvePrePoliza"), e.Row.DBCampo("CveCompra"), e.Row.DBCampo("CveCompraAmortizacion")) + Else + e.Row.FCLinkButton("LnkDesAplicar").CommandArgument = String.Format("{0}|{1}|{2}", e.Row.DBCampo("CvePrePoliza"), e.Row.DBCampo("CveCompraAmortizacion"), e.Row.DBCampo("CveCompra")) + End If End If If e.Row.DBCampo("TipoReferencia").ToEntero = 1 Then @@ -387,7 +397,6 @@ Partial Class PopUpAuxiliar Else Return ViewState("CvePrePolizaNegativa").ToString.ToEntero End If - End Get Set(value As Integer) ViewState("CvePrePolizaNegativa") = value @@ -395,7 +404,6 @@ Partial Class PopUpAuxiliar End Property - Private Sub AgregaPolizaNegativo(CvePrePoliza As Integer) Dim ObjContabilidad As New ClsContabilidad @@ -405,8 +413,6 @@ Partial Class PopUpAuxiliar Dim CvePrePolizaNueva As Integer = ObjContabilidad.AddPrePolizasNegativa(CvePrePoliza, UsuarioActual.CveUsuario, TxtConceptoCancelacion.Text, UsuarioActual.CveEmpresa, TxtFechaCancelacion.Text.ToDate) If Not CvePrePolizaNueva > 0 Then - - TieneError = True End If @@ -482,6 +488,40 @@ Partial Class PopUpAuxiliar End If + If e.CommandName = "DesAplicarCompra" Then + + Dim CvePrePoliza, CveCompra, CveCompraAmortizacion As Integer + Dim TieneError = False + + Dim St As String() = e.CommandArgument.ToString.Split("|"c) + If St.Length > 0 Then + CvePrePoliza = St(0).ToEntero + CveCompra = St(1).ToEntero + CveCompraAmortizacion = St(2).ToEntero + End If + + If CvePrePoliza > 0 Then + Dim Conta As New ClsContabilidad() + Conta.IniciaTransacSQL() + + If Not Conta.UpdatePrePolizasDetalleBloquear(CvePrePoliza, False) Then + TieneError = True + End If + + If Not TieneError AndAlso Not Conta.DesAplicarPago(CvePrePoliza, 272, CveCompra, CveCompraAmortizacion) Then + TieneError = True + End If + + If Not TieneError Then + Conta.Commit() + Alert("Pago Desaplicado.", TipoMensaje.ToastInformacion) + Else + Conta.RollBack() + Alert("Pago no fue desaplicado.", TipoMensaje.ToastError) + End If + End If + + End If End Sub diff --git a/Empresas/140/Formatos/RepEntradasUsados.rdlc b/Empresas/140/Formatos/RepEntradasUsados.rdlc index 185b39735..535e4b852 100644 --- a/Empresas/140/Formatos/RepEntradasUsados.rdlc +++ b/Empresas/140/Formatos/RepEntradasUsados.rdlc @@ -1,1559 +1,1569 @@ - - - 0 - - - - System.Data.DataSet - /* Local Connection */ - - db271139-498f-42f1-b0bc-9c6d57014da7 - - - - - - DataSet - /* Local Query */ - - - - CvePSCargo - System.Int - - - CodigoPS - System.String - - - E_Almacen - System.String - - - E_Traspaso - System.String - - - E_Compra - System.String - - - S_Almacen - System.String - - - S_Traspaso - System.String - - - - DataSet - C:\Users\Janeth\documents\visual studio 2015\WebSites\Reporteweb\App_Code\DataSet1.xsd - DataTable4 - - - - - - - - - - - - - - - 4.26476cm - - - 1.53801cm - - - 1.53371cm - - - 1.23763cm - - - 1.60315cm - - - 2.1657cm - - - 1.37304cm - - - 1.5767cm - - - 2.05295cm - - - 1.13771cm - - - 2.31753cm - - - - - 0.62959cm - - - - - true - true - - - - - Grupo - - - - - - - Textbox9 - - - Silver - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Inicial - - - - - - - Textbox1 - - - Silver - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - E.Alm - - - - - - - Textbox29 - - - Silver - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - E.Pub - - - - - - - Textbox13 - - - Silver - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - E.Tras - - - - - - - Textbox27 - - - Silver - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - E.Compras - - - - - - - Textbox15 - - - Silver - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Otrs. - - - - - - - Textbox17 - - - Silver - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - S.Alm - - - - - - - Textbox5 - - - Silver - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - S.Trasp - - - - - - - Textbox8 - - - Silver - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Otrs - - - - - - - Textbox11 - - - Silver - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Exist Actual - - - - - - - Textbox41 - - - Silver - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.32063cm - - - - - true - true - - - - - =Fields!CodigoPS.Value - - - - - - - CodigoPS - - - =IIF(Fields!CvePSCargo.Value > 0, "White","Silver") - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - 0 - - - - - - - TipoAgrupador - - - =IIF(Fields!CvePSCargo.Value > 0, "White","Silver") - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!E_Almacen.Value - - - - - - - E_Almacen - - - =IIF(Fields!CvePSCargo.Value > 0, "White","Silver") - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - 0 - - - - - - - Paqueteria1 - - - =IIF(Fields!CvePSCargo.Value > 0, "White","Silver") - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!E_Traspaso.Value - - - - - - - E_Traspaso - - - =IIF(Fields!CvePSCargo.Value > 0, "White","Silver") - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!E_Compra.Value - - - - - - - E_Compra - - - =IIF(Fields!CvePSCargo.Value > 0, "White","Silver") - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - 0 - - - - - - - Fecha - - - =IIF(Fields!CvePSCargo.Value > 0, "White","Silver") - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!S_Almacen.Value - - - - - - - S_Almacen - - - =IIF(Fields!CvePSCargo.Value > 0, "White","Silver") - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!S_Traspaso.Value - - - - - - - S_Traspaso - - - =IIF(Fields!CvePSCargo.Value > 0, "White","Silver") - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - 0 - - - - - - - Textbox16 - - - =IIF(Fields!CvePSCargo.Value > 0, "White","Silver") - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - 0 - - - - - - - Textbox42 - - - =IIF(Fields!CvePSCargo.Value > 0, "White","Silver") - 2pt - 2pt - 2pt - 2pt - - - - - - - - - - - - - - - - - - - - - - - - - - - After - - - - - - - DataSet1 - 0.10583cm - 0.08377cm - 0.95022cm - 20.80089cm - - - - - - 0.51993in - - - - - 8.2362in - - - 3.54682cm - true - true - - - Embedded - Logo - Fit - 0.09927in - 0.10752in - 0.99993in - 1.6045in - - - - - - true - - - - - BDH BATERÍAS DISTRIBUCIONES DE - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Tarjeta de Almacén Del - - - - =Parameters!FechaInicial.Value - - - - Al - - - - =Parameters!FechaFinal.Value - - - - - - - Textbox4 - 2.84098cm - 5.75736cm - 0.6cm - 10.1061cm - 2 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!Almacen.Value - - - - - - - Textbox4 - 2.09987cm - 5.75736cm - 0.6cm - 10.1061cm - 3 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!Direccion.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - - 0.6cm - true - true - - - 0.12693cm - 0.01325cm - 0cm - 20.90669cm - - - - - - true - true - - - - - Usuario imprimio: - - - - =Parameters!UsuarioImprimio.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Fecha impresión: - - - - =Parameters!FechaConFormato.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Pagina: - - - - =Globals!PageNumber - - - - PageNumber - 16.84241cm - 0.6cm - 4.00442cm - 3 - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - 27.94cm - 21.59cm - 0.5cm - 0cm - 0.5cm - 1cm - 0.13cm - + + + + + + Textbox9 + + + Silver + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Inicial + + + + + + + Textbox1 + + + Silver + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + E.Alm + + + + + + + Textbox29 + + + Silver + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + E.Pub + + + + + + + Textbox13 + + + Silver + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + E.Tras + + + + + + + Textbox27 + + + Silver + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + E.Compras + + + + + + + Textbox15 + + + Silver + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Otrs. + + + + + + + Textbox17 + + + Silver + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + S.Alm + + + + + + + Textbox5 + + + Silver + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + S.Trasp + + + + + + + Textbox8 + + + Silver + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Otrs + + + + + + + Textbox11 + + + Silver + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Exist Actual + + + + + + + Textbox41 + + + Silver + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.32063cm + + + + + true + true + + + + + =Fields!CodigoPS.Value + + + + + + + CodigoPS + + + =IIF(Fields!CvePSCargo.Value > 0, "White","Silver") + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + 0 + + + + + + + TipoAgrupador + + + =IIF(Fields!CvePSCargo.Value > 0, "White","Silver") + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!E_Almacen.Value + + + + + + + E_Almacen + + + =IIF(Fields!CvePSCargo.Value > 0, "White","Silver") + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + 0 + + + + + + + Paqueteria1 + + + =IIF(Fields!CvePSCargo.Value > 0, "White","Silver") + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!E_Traspaso.Value + + + + + + + E_Traspaso + + + =IIF(Fields!CvePSCargo.Value > 0, "White","Silver") + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!E_Compra.Value + + + + + + + E_Compra + + + =IIF(Fields!CvePSCargo.Value > 0, "White","Silver") + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + 0 + + + + + + + Fecha + + + =IIF(Fields!CvePSCargo.Value > 0, "White","Silver") + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!S_Almacen.Value + + + + + + + S_Almacen + + + =IIF(Fields!CvePSCargo.Value > 0, "White","Silver") + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!S_Traspaso.Value + + + + + + + S_Traspaso + + + =IIF(Fields!CvePSCargo.Value > 0, "White","Silver") + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!S_Otros.Value + + + + + + + S_Otros + + + =IIF(Fields!CvePSCargo.Value > 0, "White","Silver") + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Exist_Actual.Value + + + + + + + Exist_Actual + + + =IIF(Fields!CvePSCargo.Value > 0, "White","Silver") + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + + + + + + + + + + + + + + + + + After + + + + + + + DataSet1 + 0.10583cm + 0.08377cm + 0.95022cm + 20.80089cm + + + + + + 0.51993in + + + + + 8.2362in + + + 3.54682cm + true + true + + + Embedded + Logo + Fit + 0.09927in + 0.10752in + 0.99993in + 1.6045in + + + + + + true + + + + + BDH BATERÍAS DISTRIBUCIONES DE + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Tarjeta de Almacén Del + + + + =Parameters!FechaInicial.Value + + + + Al + + + + =Parameters!FechaFinal.Value + + + + + + + Textbox4 + 2.84098cm + 5.75736cm + 0.6cm + 10.1061cm + 2 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!Almacen.Value + + + + + + + Textbox4 + 2.09987cm + 5.75736cm + 0.6cm + 10.1061cm + 3 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!Direccion.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + + 0.6cm + true + true + + + 0.12693cm + 0.01325cm + 0cm + 20.90669cm + + + + + + true + true + + + + + Usuario imprimio: + + + + =Parameters!UsuarioImprimio.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Fecha impresión: + + + + =Parameters!FechaConFormato.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Pagina: + + + + =Globals!PageNumber + + + + PageNumber + 16.84241cm + 0.6cm + 4.00442cm + 3 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 27.94cm + 21.59cm + 0.5cm + 0cm + 0.5cm + 1cm + 0.13cm +