diff --git a/App_Code/ClsGenerales.vb b/App_Code/ClsGenerales.vb index f2506fff7..dcb1ca78e 100644 --- a/App_Code/ClsGenerales.vb +++ b/App_Code/ClsGenerales.vb @@ -2849,6 +2849,72 @@ Public Class ClsGenerales Return Retorno End Function + Public Function GetMotivoRechazoPaqueteria(CveMotivoRechazoPaqueteria As Integer, CveEmpresa As Integer) As Boolean + Dim Retorno As Boolean = False + DataAdapter("Gral_MotivoRechazoPaqueteriaGet") + With SqlAdapter.SelectCommand.Parameters + .Add("@CveMotivoRechazoPaqueteria", SqlDbType.Int).Value = CveMotivoRechazoPaqueteria + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + End With + Try + SqlAdapter.Fill(Data) + Retorno = True + Catch ex As Exception + OnError("Ocurrió un error al obtener los motivos de rechazo de entrega", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + End Try + + Return Retorno + End Function + + Public Function AddMotivoRechazoPaqueteria(Descripcion As String, CveEmpresa As Integer) As Boolean + Dim Retorno As Boolean = False + DataAdapter("Gral_MotivoRechazoPaqueteriaAdd") + With SqlAdapter.SelectCommand.Parameters + .Add("@Descripcion", SqlDbType.VarChar).Value = Descripcion + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + End With + Try + SqlAdapter.Fill(Data) + Retorno = True + Catch ex As Exception + OnError("Ocurrió un error al agregar el motivos de rechazo de entrega", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + End Try + + Return Retorno + End Function + + Public Function RemoveMotivoRechazoPaqueteria(CveMotivoRechazoPaqueteria As Integer) As Boolean + Dim Retorno As Boolean = False + DataAdapter("Gral_MotivoRechazoPaqueteriaDelete") + With SqlAdapter.SelectCommand.Parameters + .Add("@CveMotivoRechazoPaqueteria", SqlDbType.Int).Value = CveMotivoRechazoPaqueteria + End With + Try + SqlAdapter.Fill(Data) + Retorno = True + Catch ex As Exception + OnError("Ocurrió un error al eliminar el motivos de rechazo de entrega", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + End Try + + Return Retorno + End Function + + Public Function UpdateMotivoRechazoPaqueteria(CveMotivoRechazoPaqueteria As Integer, Optional Descripcion As String = "-1") As Boolean + Dim Retorno As Boolean = False + DataAdapter("Gral_MotivoRechazoPaqueteriaUpdate") + With SqlAdapter.SelectCommand.Parameters + .Add("@CveMotivoRechazoPaqueteria", SqlDbType.Int).Value = CveMotivoRechazoPaqueteria + .Add("@Descripcion", SqlDbType.VarChar).Value = Descripcion + End With + Try + SqlAdapter.Fill(Data) + Retorno = True + Catch ex As Exception + OnError("Ocurrió un error al modificar el motivos de rechazo de entrega", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + End Try + + Return Retorno + End Function #End Region #Region "P A Q U E T E R I A S G U I A S D E T A L L E S" diff --git a/App_Code/ClsOC.vb b/App_Code/ClsOC.vb index 2aa435c09..20d2c9d8f 100644 --- a/App_Code/ClsOC.vb +++ b/App_Code/ClsOC.vb @@ -2532,7 +2532,23 @@ Public Class ClsOC End Function #End Region + Public Function GetVentasRelacionadas(CveOCDetalle As String) As Boolean + Dim Retorno As Boolean = False + DataAdapter("PA_OC_VentaRelacionada") + With SqlAdapter.SelectCommand.Parameters + .Add("@CveOCDetalles", SqlDbType.NVarChar).Value = CveOCDetalle + End With + + Try + SqlAdapter.Fill(Data) + Retorno = True + Catch ex As Exception + OnError("Ocurrió un error al obtener la venta relacionada", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + End Try + + Return Retorno + End Function #Region " IDisposable Support " ' IDisposable diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb index c856c52ed..cfe34dbcd 100644 --- a/App_Code/ClsPaginas.vb +++ b/App_Code/ClsPaginas.vb @@ -3668,6 +3668,7 @@ Public Class ClsPaginas PaginaDict.Add("/Sistemas/CatPlataformas.aspx".ToUpper(), -1) PaginaDict.Add("/Sistemas/PopUpAddUsuario.aspx".ToUpper(), -1) PaginaDict.Add("/General/JAMComparativos.aspx".ToUpper(), 643) + PaginaDict.Add("/General/CatMotivoRechazoGuias.aspx".ToUpper(), 729) '-------------------------------------------Q U I T A R---------------------------------- #Region "Q U I T A R" diff --git a/App_Code/ClsVentas.vb b/App_Code/ClsVentas.vb index e9f7496a6..c348cebec 100644 --- a/App_Code/ClsVentas.vb +++ b/App_Code/ClsVentas.vb @@ -4462,6 +4462,21 @@ Public Class ClsVentas End Try Return retorno End Function + + Public Function GetOCRelacionadas(CveVentasDetalles As String) As Boolean + Dim retorno As Boolean = False + DataAdapter("PA_Vta_OrdenCompraRelacionada", CommandType.StoredProcedure) + With SqlAdapter.SelectCommand.Parameters + .Add("@CveVentasDetalles", SqlDbType.NVarChar).Value = CveVentasDetalles + End With + Try + SqlAdapter.Fill(Data) + retorno = True + Catch ex As Exception + OnError("Ocurrió un error al obtener la orden de compra relacionada", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + End Try + Return retorno + End Function #Region "Conciliación emitidas SAT" Public Function ConciliacionemitidasSATGet(cveEmpresa As Int32) As Boolean diff --git a/App_Code/DtDatos.xsd b/App_Code/DtDatos.xsd index a4b0800c5..f354dcef4 100644 --- a/App_Code/DtDatos.xsd +++ b/App_Code/DtDatos.xsd @@ -12,7 +12,7 @@ - + @@ -28,7 +28,7 @@ - + @@ -46,7 +46,7 @@ - + @@ -64,7 +64,7 @@ - + @@ -87,7 +87,7 @@ - + @@ -111,7 +111,7 @@ - + @@ -137,7 +137,7 @@ - + @@ -153,7 +153,7 @@ - + @@ -170,7 +170,7 @@ - + @@ -179,7 +179,7 @@ - + @@ -215,7 +215,7 @@ - + @@ -237,7 +237,7 @@ - + @@ -259,10 +259,15 @@ + + + + + - + diff --git a/App_Code/DtDatos.xss b/App_Code/DtDatos.xss index d278af616..6f4a11dac 100644 --- a/App_Code/DtDatos.xss +++ b/App_Code/DtDatos.xss @@ -4,7 +4,7 @@ Changes to this file may cause incorrect behavior and will be lost if the code is regenerated. --> - + diff --git a/Bancos/IE.aspx.vb b/Bancos/IE.aspx.vb index c8a70dd0d..9dea8b176 100644 --- a/Bancos/IE.aspx.vb +++ b/Bancos/IE.aspx.vb @@ -4642,7 +4642,7 @@ Partial Class Bancos_IE Dim Dep As New ClsGenerales If Dep.GetCuentasDepositos(CveProveedor:=CveProveedor, CveCliente:=CveCliente, CvePersonal:=CvePersonal) Then - If DdlTipoTransaccion.SelectedValue = "9" Then + If DdlTipoTransaccion.SelectedValue = "9" And CveIE = Nothing Then DdlCuentaDeposito.DataSource = Dep.DtResultados.FiltraParametros("EstatusPagoElectronico = 'True' AND Estatus ='True'") @@ -4653,7 +4653,7 @@ Partial Class Bancos_IE Alert("El Beneficiario no tiene una cuenta activa en BBVA, dela de alta o seleccione otro método de pago", TipoMensaje.MsgAdvertencia) End If - ElseIf DdlTipoTransaccion.SelectedValue = "17" Then + ElseIf DdlTipoTransaccion.SelectedValue = "17" And CveIE = Nothing Then If Dep.DtResultados.Rows.Count > 0 Then @@ -4685,7 +4685,7 @@ Partial Class Bancos_IE Else - If DdlTipoTransaccion.SelectedValue.Contiene("9", "17") Then + If DdlTipoTransaccion.SelectedValue.Contiene("9", "17") And CveIE = Nothing Then BtnGuardar.Enabled = False Alert("El proveedor no tiene cuentas deposito.", TipoMensaje.MsgAdvertencia) diff --git a/Bancos/PagoElectronico.aspx.vb b/Bancos/PagoElectronico.aspx.vb index ed0b9df3c..355150d54 100644 --- a/Bancos/PagoElectronico.aspx.vb +++ b/Bancos/PagoElectronico.aspx.vb @@ -2756,10 +2756,15 @@ Partial Class Bancos_PagoElectronico params.Add(New ReportParameter("LogoPath", "")) End If - params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa)) + params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa)) params.Add(New ReportParameter("Direccion", UsuarioActual.Empresa.Direccion)) params.Add(New ReportParameter("RFC", UsuarioActual.Empresa.RFC)) - params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy"))) + params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy"))) + + + params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) + params.Add(New ReportParameter("Titulo", "Reporte Pago Proveedor Layout")) + ImprimirPDF("Empresas/Grales/Formatos/LayoutPagoProveedor.rdlc", DtPago, params, "LayoutPagoProveedor", RDSName:="DSPagoElectronicoV2") End If diff --git a/Bancos/PagoElectronicoGrupos.aspx.vb b/Bancos/PagoElectronicoGrupos.aspx.vb index 9529708ac..8b8bbf24e 100644 --- a/Bancos/PagoElectronicoGrupos.aspx.vb +++ b/Bancos/PagoElectronicoGrupos.aspx.vb @@ -216,6 +216,62 @@ Partial Class Bancos_PagoElectronicoGrupos End Property + Property CveIEPagoActual As Integer + Get + If ViewState("CveIEPagoActual") Is Nothing Then + Return -1 + Else + Return ViewState("CveIEPagoActual").ToString.ToEntero + End If + End Get + Set(value As Integer) + ViewState("CveIEPagoActual") = value + End Set + End Property + + Property CveLayoutEnvioDetalleActual As Integer + Get + If ViewState("CveLayoutEnvioDetalleActual") Is Nothing Then + Return -1 + Else + Return ViewState("CveLayoutEnvioDetalleActual").ToString.ToEntero + End If + End Get + Set(value As Integer) + ViewState("CveLayoutEnvioDetalleActual") = value + End Set + End Property + + Property GvIndexActual As Integer + Get + If ViewState("GvIndexActual") Is Nothing Then + Return -1 + Else + Return ViewState("GvIndexActual").ToString.ToEntero + End If + End Get + Set(value As Integer) + ViewState("GvIndexActual") = value + End Set + + End Property + + + Property DTFoliosPrefijos As DataTable + Get + If ViewState("DTFoliosPrefijos") Is Nothing Then + Return Crate_DTFoliosPrefijos() + Else + Return DirectCast(ViewState("DTFoliosPrefijos"), DataTable) + End If + End Get + Set(value As DataTable) + ViewState("DTFoliosPrefijos") = value + End Set + + End Property + + #End Region Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load @@ -244,6 +300,18 @@ Partial Class Bancos_PagoElectronicoGrupos End Sub + Private Function Crate_DTFoliosPrefijos() As DataTable + + Dim DTFolios As New DataTable + DTFolios.Columns.Add("CveIE", GetType(Integer)) + DTFolios.Columns.Add("Folio", GetType(String)) + DTFolios.AcceptChanges() + + Return DTFolios + + End Function + + #Region " C A R G A - D A T O S " Private Sub CargaCuentas() DdlCuenta.DataSource = GlobalDTBancosCuentas(UsuarioActual.CveUsuario).FiltraParametros("UsaLayoutGrupos = 1") @@ -2491,7 +2559,7 @@ Partial Class Bancos_PagoElectronicoGrupos params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy"))) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) - params.Add(New ReportParameter("Titulo", "Reporte Pago Proveedor Layout")) + params.Add(New ReportParameter("Titulo", "Reporte Pago Proveedor Layout Grupos")) ImprimirPDF("Empresas/Grales/Formatos/LayoutPagoProveedor.rdlc", DT_PagosReporte, params, "LayoutPagoProveedor", RDSName:="DSPagoElectronicoV2") End If @@ -2626,44 +2694,6 @@ Partial Class Bancos_PagoElectronicoGrupos End Sub - Property CveIEPagoActual As Integer - Get - If ViewState("CveIEPagoActual") Is Nothing Then - Return -1 - Else - Return ViewState("CveIEPagoActual").ToString.ToEntero - End If - End Get - Set(value As Integer) - ViewState("CveIEPagoActual") = value - End Set - End Property - - Property CveLayoutEnvioDetalleActual As Integer - Get - If ViewState("CveLayoutEnvioDetalleActual") Is Nothing Then - Return -1 - Else - Return ViewState("CveLayoutEnvioDetalleActual").ToString.ToEntero - End If - End Get - Set(value As Integer) - ViewState("CveLayoutEnvioDetalleActual") = value - End Set - End Property - - Property GvIndexActual As Integer - Get - If ViewState("GvIndexActual") Is Nothing Then - Return -1 - Else - Return ViewState("GvIndexActual").ToString.ToEntero - End If - End Get - Set(value As Integer) - ViewState("GvIndexActual") = value - End Set - End Property @@ -2770,9 +2800,24 @@ Partial Class Bancos_PagoElectronicoGrupos If Not ObjBanco.UpdateLayoutEnviosDetalle(CveLayoutEnvioDetalle, CveLayoutEnvio, CveIE, CveProveedor, 2, "", True) Then ErrorProceso = True + + End If + DTFoliosPrefijos.Clear() + For Each RowGV As GridViewRow In GvEnviadas.Rows + + Dim nRow As DataRow = DTFoliosPrefijos.NewRow + + nRow("CveIE") = RowGV.DataKey("CveIE").ToEntero + nRow("Folio") = RowGV.FCTextBox("TxtFolio").Text.Trim + + DTFoliosPrefijos.Rows.Add(nRow) + + Next + DTFoliosPrefijos.AcceptChanges() + If NuevoFolio <> "-1" Or Comprobante <> "-1" And Not ErrorProceso Then If Not ObjBanco.UpdateBancos_IEFolio(CveIE, NuevoFolio, Comprobante) Then ErrorProceso = True @@ -2797,11 +2842,9 @@ Partial Class Bancos_PagoElectronicoGrupos ErrorProceso = True Alert("Error al guardar comprobante.", TipoMensaje.MsgError) End Try - End If - If ErrorProceso Then ObjBanco.RollBack() Else @@ -2811,8 +2854,13 @@ Partial Class Bancos_PagoElectronicoGrupos CargaEnviados() - End If + For Each RowGV As GridViewRow In GvEnviadas.Rows + RowGV.FCTextBox("TxtFolio").Text = DTFoliosPrefijos.FiltroPrimeroValor("Folio", $"CveIE = {RowGV.DataKey("CveIE").ToEntero}") + Next + UpEnviados.Update() + + End If ObjBanco.Dispose() diff --git a/Contabilidad/RepIVA.aspx b/Contabilidad/RepIVA.aspx index 83e549317..ab77a2796 100644 --- a/Contabilidad/RepIVA.aspx +++ b/Contabilidad/RepIVA.aspx @@ -37,6 +37,9 @@ +
  • + Generales del proveedor +
  • diff --git a/Contabilidad/RepIVA.aspx.cs b/Contabilidad/RepIVA.aspx.cs index d76955b06..f694ee2bc 100644 --- a/Contabilidad/RepIVA.aspx.cs +++ b/Contabilidad/RepIVA.aspx.cs @@ -43,7 +43,7 @@ public partial class Contabilidad_RepIVA : ClsPaginas if (!IsPostBack) { InicializaValores(); - + } } @@ -53,8 +53,8 @@ public partial class Contabilidad_RepIVA : ClsPaginas TCEspecifico = -1; txtFechaI.Text = $"01/{DateTime.Now.Month}/{DateTime.Now.Year}"; txtFechaF.Text = DateTime.Now.ToShortDateString(); - - LnkAccionesDIOT.Visible = true; + + LnkAccionesDIOT.Visible = true; } @@ -84,17 +84,17 @@ public partial class Contabilidad_RepIVA : ClsPaginas { GvA.DataSource = ObjCont.DtResultados; DtIVAAcreditable = ObjCont.DtResultados; - if (DtIVAAcreditable.FiltraParametros("IVA < 0 OR IEPS < 0 ").Rows.Count > 0) + if (DtIVAAcreditable.FiltraParametros("IVA < 0 OR IEPS < 0 ").Rows.Count > 0) { LblMsgAcreditable.Text = "La información presenta importes en negativo, estos no se incluirán en el archivo generado para DIOT"; - } - + } + if (ObjCont.GetRepIVAAcumulado(txtFechaI.Text.ToDate(), txtFechaF.Text.ToDate(), Conciliado, 3, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)) { GvIVA2.DataSource = ObjCont.DtResultados; } - + } ObjCont.Dispose(); @@ -130,19 +130,19 @@ public partial class Contabilidad_RepIVA : ClsPaginas { e.Row.CssClass = "Totales"; } - if (e.Row.DBCampo("PorcentajeIVA").ToDecimal() > 0 ) - { - Decimal SubTotal = (e.Row.DBCampo("SubTotal16").ToDecimal() > 0? e.Row.DBCampo("SubTotal16").ToDecimal() : (e.Row.DBCampo("SubTotal8").ToDecimal() > 0? e.Row.DBCampo("SubTotal8").ToDecimal() : (Decimal)0.0) ); + if (e.Row.DBCampo("PorcentajeIVA").ToDecimal() > 0) + { + Decimal SubTotal = (e.Row.DBCampo("SubTotal16").ToDecimal() > 0 ? e.Row.DBCampo("SubTotal16").ToDecimal() : (e.Row.DBCampo("SubTotal8").ToDecimal() > 0 ? e.Row.DBCampo("SubTotal8").ToDecimal() : (Decimal)0.0)); Decimal dif = Math.Round(SubTotal * e.Row.DBCampo("PorcentajeIVA").ToDecimal(), 2) - Math.Round(e.Row.DBCampo("IVA").ToDecimal(), 2); if (dif > 1) { e.Row.ForeColor = System.Drawing.Color.Red; - e.Row.Cells[0].Text = e.Row.Cells[0].Text + "Err"; + e.Row.Cells[0].Text = e.Row.Cells[0].Text + "Err"; - e.Row.ToolTip = "Dif:" + dif.ToString() + "- Sub:" + e.Row.DBCampo("SubTotal")+ " - IVA:"+ e.Row.DBCampo("IVA"); + e.Row.ToolTip = "Dif:" + dif.ToString() + "- Sub:" + e.Row.DBCampo("SubTotal") + " - IVA:" + e.Row.DBCampo("IVA"); } - } + } } } @@ -155,6 +155,10 @@ public partial class Contabilidad_RepIVA : ClsPaginas { Imprimir("EXCEL"); } + protected void LnkExcel2_Click(object sender, EventArgs e) + { + Imprimir("EXCEL2"); + } public void Imprimir(String Opcion) { @@ -192,11 +196,12 @@ public partial class Contabilidad_RepIVA : ClsPaginas } DataTable Dt = TT.ActiveTabIndex == 0 ? DtIVATrasladado.Copy() : DtIVAAcreditable.Copy(); - string Formato = TT.ActiveTabIndex == 0 ? "RepIVA.rpt" : "RepIVAAcreditable.rpt"; + string Formato = TT.ActiveTabIndex == 0 ? "RepIVA.rpt" : (Opcion == "EXCEL2" ? "RepIVAAcreditable2.rpt" : "RepIVAAcreditable.rpt"); + Opcion = (Opcion == "EXCEL2" ? "EXCEL" : Opcion); para.Add(new CrystalParametro("Excel", Formato)); string Ruta = (ModExtensiones.DirectorioBaseEmpresas + $@"Empresas\Grales\Formatos\{Formato}"); - Ruta.GuardaLogAD(); - ImprimirbytesPDF(ImprimirPDFCrystal(Ruta, Dt,para, "Reporte de IVA", Opcion), "Reporte de IVA", Opcion); + Ruta.GuardaLogAD(); + ImprimirbytesPDF(ImprimirPDFCrystal(Ruta, Dt, para, "Reporte de IVA", Opcion), "Reporte de IVA", Opcion); } else { @@ -248,17 +253,17 @@ public partial class Contabilidad_RepIVA : ClsPaginas foreach (DataRow Drow in Objconta.DtResultados.FiltraParametros("CveCompra is null and CveProveedor > 0 and SubTotal >= 1 ").Rows) // and(IVA > 1 OR IEPS > 0) { - SBDIOT.AppendLine( - Drow["TipoTercero"].ToString() + "|" + - Drow["TipoOperacion"].ToString() + "|" + - Drow["RFC"].ToString() +"|"+ - Drow["NumeroIDFiscal"].ToString() + "|" + - Drow["NombreExtranjero"].ToString() +"|"+ - Drow["PaisResidencia"].ToString() + "|" + - Drow["Nacionalidad"].ToString() +"|"+ - LV(Drow["valorActos1516"].ToString()) + "|"+ + SBDIOT.AppendLine( + Drow["TipoTercero"].ToString() + "|" + + Drow["TipoOperacion"].ToString() + "|" + + Drow["RFC"].ToString() + "|" + + Drow["NumeroIDFiscal"].ToString() + "|" + + Drow["NombreExtranjero"].ToString() + "|" + + Drow["PaisResidencia"].ToString() + "|" + + Drow["Nacionalidad"].ToString() + "|" + + LV(Drow["valorActos1516"].ToString()) + "|" + LV(Drow["valorActos15"].ToString()) + "|" + - LV(Drow["ValorIvaNo1516"].ToString()) +"|"+ + LV(Drow["ValorIvaNo1516"].ToString()) + "|" + LV(Drow["valorActos1011"].ToString()) + "|" + LV(Drow["valorActos10"].ToString()) + "|" + @@ -270,11 +275,11 @@ public partial class Contabilidad_RepIVA : ClsPaginas LV(Drow["ValorIvaNoImp16"].ToString()) + "|" + LV(Drow["valorActosImp10"].ToString()) + "|" + - LV(Drow["ValorIvaNoImp10"].ToString()) + "|" + + LV(Drow["ValorIvaNoImp10"].ToString()) + "|" + - LV(Drow["IvaExentoImpo"].ToString()) + "|"+ + LV(Drow["IvaExentoImpo"].ToString()) + "|" + LV(Drow["IVACero"].ToString()) + "|" + - LV(Drow["IvaExento"].ToString()) + "|"+ + LV(Drow["IvaExento"].ToString()) + "|" + LV(Drow["IvaRetenido"].ToString()) + "|" + LV(Drow["IvaDevoluciones"].ToString()) + "|"); } @@ -286,7 +291,7 @@ public partial class Contabilidad_RepIVA : ClsPaginas //TextWriter tw = new StreamWriter(ms, System.Text.Encoding.UTF8); //tw.Write(SBDIOT.ToString()); - + //tw.Flush(); //byte[] bytes = ms.ToArray(); @@ -310,7 +315,7 @@ public partial class Contabilidad_RepIVA : ClsPaginas Response.End(); } - protected string LV(string Valor ) + protected string LV(string Valor) { return (Valor.ToDecimal() > 0) ? Valor.ToDecimal().ToString().FormatoNumero(0).Replace(",", string.Empty) : ""; } diff --git a/Empresas/Grales/Formatos/RepIVAAcreditable2.rpt b/Empresas/Grales/Formatos/RepIVAAcreditable2.rpt new file mode 100644 index 000000000..76a5aadc4 Binary files /dev/null and b/Empresas/Grales/Formatos/RepIVAAcreditable2.rpt differ diff --git a/General/CatMotivoRechazoGuias.aspx b/General/CatMotivoRechazoGuias.aspx new file mode 100644 index 000000000..2628a6266 --- /dev/null +++ b/General/CatMotivoRechazoGuias.aspx @@ -0,0 +1,74 @@ +<%@ Page Title="General - Catálogo de motivo de rechazo de guías" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="CatMotivoRechazoGuias.aspx.cs" Inherits="General_CatMotivoRechazoGuias" %> + +<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %> + + + + + + + + Catálogo de Motivos de Rechazo de Paquetes + + + + +
  • + +
  • + +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/General/CatMotivoRechazoGuias.aspx.cs b/General/CatMotivoRechazoGuias.aspx.cs new file mode 100644 index 000000000..73f3ca210 --- /dev/null +++ b/General/CatMotivoRechazoGuias.aspx.cs @@ -0,0 +1,96 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; +using Extensiones; +using System.Data; + +public partial class General_CatMotivoRechazoGuias : ClsPaginas +{ + private int CveMotivoRechazoPaqueteria + { + get + { + return ViewState["CveMotivoRechazoPaqueteria"].ToString().ToEntero(); + } + + set + { + ViewState["CveMotivoRechazoPaqueteria"] = value; + } + } + + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + CargaDatos(); + UpDatos.Update(); + } + } + + private void CargaDatos() + { + ClsGenerales ObjGeneral = new ClsGenerales(); + if (ObjGeneral.GetMotivoRechazoPaqueteria(-1,UsuarioActual.CveEmpresa)) + { + GvDatos.DataSource = ObjGeneral.DtResultados; + GvDatos.DataBind(); + } + ObjGeneral.Dispose(); + } + + protected void BtnAgregarMotivoD_Click(object sender, EventArgs e) + { + BtnAgregarTiposDModal.Text = "Agregar"; + UpModalTiposD.Update(); + RegistraScript(String.Format("$('#{0}').modal();", "DivAgregarTiposD")); + } + + protected void LnkEditar_Click(object sender, EventArgs e) + { + BtnAgregarTiposDModal.Text = "Actualizar"; + GridViewRow GvRow = (GridViewRow)(((LinkButton)sender).NamingContainer); + CveMotivoRechazoPaqueteria = GvRow.DataKey("CveMotivoRechazoPaqueteria").ToEntero(); + DescripcionTxt.Text = GvRow.DataKey("Descripcion"); + UpModalTiposD.Update(); + RegistraScript(String.Format("$('#{0}').modal();", "DivAgregarTiposD")); + } + + protected void BtnAgregarTiposDModal_Click(object sender, EventArgs e) + { + ClsGenerales ObjGeneral = new ClsGenerales(); + if (BtnAgregarTiposDModal.Text == "Agregar") + { + if (ObjGeneral.AddMotivoRechazoPaqueteria(DescripcionTxt.Text,UsuarioActual.CveEmpresa)) + { + Alert("Motivo Agregado Correctamente"); + } + }else + { + if (ObjGeneral.UpdateMotivoRechazoPaqueteria(CveMotivoRechazoPaqueteria, DescripcionTxt.Text)) + { + Alert("Motivo Actualizado Correctamente"); + } + } + ObjGeneral.Dispose(); + CargaDatos(); + UpDatos.Update(); + } + + protected void LnkEliminar_Click(object sender, EventArgs e) + { + GridViewRow GvRow = (GridViewRow)(((LinkButton)sender).NamingContainer); + int CveMotivoRechazoPaqueteriaAux = GvRow.DataKey("CveMotivoRechazoPaqueteria").ToEntero(); + ClsGenerales ObjGeneral = new ClsGenerales(); + if (ObjGeneral.RemoveMotivoRechazoPaqueteria(CveMotivoRechazoPaqueteriaAux)) + { + Alert("Motivo Eliminado con Correctamente"); + } + ObjGeneral.Dispose(); + CargaDatos(); + UpDatos.Update(); + } +} \ No newline at end of file diff --git a/OC/OC.aspx b/OC/OC.aspx index 340dca446..54e04febc 100644 --- a/OC/OC.aspx +++ b/OC/OC.aspx @@ -591,7 +591,7 @@ Cliente:
    - + <%-- --%>
    @@ -856,7 +856,7 @@ - @@ -1503,6 +1503,25 @@ +
    +
    +
    +
    + + Venta Relacionada +
    +
    + +
    +
    + + + + + +
    +
    @@ -2558,8 +2577,8 @@
    <%----%> - -<%-- + + <%-- --%>
    @@ -2589,7 +2608,7 @@
    - + @@ -2613,11 +2632,11 @@