public void cs_pxEliminarDocumento(string Id)
        {
            try
            {
                //actualizar relacion y estado en tabla document.
                List <List <string> > registros = new clsEntityDocument(localDB).cs_pxObtenerPorResumenDiario(Id);
                clsEntityDocument     doc;
                foreach (var item in registros)
                {
                    doc = new clsEntityDocument(localDB).cs_fxObtenerUnoPorId(item[0].ToString().Trim());
                    //doc.Cs_pr_EstadoSCC = "2";
                    //doc.Cs_pr_EstadoSUNAT = "2";
                    doc.Cs_pr_Resumendiario = "";
                    doc.cs_pxActualizar(false, false);
                }

                //eliminar de summary documents y los relacionados:
                clsEntitySummaryDocuments       Summary       = new clsEntitySummaryDocuments(localDB).cs_fxObtenerUnoPorId(Id);
                clsEntitySummaryDocuments_Notes Summary_Notes = new clsEntitySummaryDocuments_Notes(localDB);//eliminado
                clsEntitySummaryDocuments_SummaryDocumentsLine Summary_Line = new clsEntitySummaryDocuments_SummaryDocumentsLine(localDB);
                clsEntitySummaryDocuments_SummaryDocumentsLine_AllowanceCharge Summary_Line_Allowance_Charge = new clsEntitySummaryDocuments_SummaryDocumentsLine_AllowanceCharge(localDB);
                clsEntitySummaryDocuments_SummaryDocumentsLine_BillingPayment  Summary_Line_Billing_Payment  = new clsEntitySummaryDocuments_SummaryDocumentsLine_BillingPayment(localDB);
                clsEntitySummaryDocuments_SummaryDocumentsLine_TaxTotal        Summay_Line_Tax_Total         = new clsEntitySummaryDocuments_SummaryDocumentsLine_TaxTotal(localDB);

                foreach (var item in Summary_Notes.cs_fxObtenerTodoPorSummaryId(Id))
                {
                    item.cs_pxElimnar(false);
                }
                foreach (var item in Summary_Line.cs_fxObtenerTodoPorCabeceraId(Id))
                {
                    foreach (var item1 in Summary_Line_Billing_Payment.cs_fxObtenerTodoPorCabeceraId(item.Cs_pr_SummaryDocuments_SummaryDocumentsLine_Id))
                    {
                        item1.cs_pxElimnar(false);
                    }

                    foreach (var item2 in Summary_Line_Allowance_Charge.cs_fxObtenerTodoPorCabeceraId(item.Cs_pr_SummaryDocuments_SummaryDocumentsLine_Id))
                    {
                        item2.cs_pxElimnar(false);
                    }

                    foreach (var item3 in Summay_Line_Tax_Total.cs_fxObtenerTodoPorCabeceraId(item.Cs_pr_SummaryDocuments_SummaryDocumentsLine_Id))
                    {
                        item3.cs_pxElimnar(false);
                    }

                    item.cs_pxElimnar(false);
                }

                Summary.cs_pxElimnar(false);
            }
            catch (Exception ex)
            {
                clsBaseLog.cs_pxRegistarAdd("clsEntitySummaryDocuments cs_pxEliminarDocumento " + ex.ToString());
            }
        }
        //Cristhian|16/04/2018|FEI2-585

        /*Creado para limpiar los items del resumen diario cuando se activa liberar documentos, ya que se detecto que
         * los items del resumen diario se estaban duplicando generando error en el envio del resumen diario*/
        /*INICIO MODIFICACIóN*/
        public void cs_pxEliminarDocumento(string Id, bool LiberarDocumentos)
        {
            try
            {
                clsEntitySummaryDocuments_Notes Summary_Notes = new clsEntitySummaryDocuments_Notes(localDB);//eliminado
                clsEntitySummaryDocuments_SummaryDocumentsLine Summary_Line = new clsEntitySummaryDocuments_SummaryDocumentsLine(localDB);
                clsEntitySummaryDocuments_SummaryDocumentsLine_AllowanceCharge Summary_Line_Allowance_Charge = new clsEntitySummaryDocuments_SummaryDocumentsLine_AllowanceCharge(localDB);
                clsEntitySummaryDocuments_SummaryDocumentsLine_BillingPayment  Summary_Line_Billing_Payment  = new clsEntitySummaryDocuments_SummaryDocumentsLine_BillingPayment(localDB);
                clsEntitySummaryDocuments_SummaryDocumentsLine_TaxTotal        Summay_Line_Tax_Total         = new clsEntitySummaryDocuments_SummaryDocumentsLine_TaxTotal(localDB);

                foreach (var item in Summary_Notes.cs_fxObtenerTodoPorSummaryId(Id))
                {
                    item.cs_pxElimnar(false);
                }
                foreach (var item in Summary_Line.cs_fxObtenerTodoPorCabeceraId(Id))
                {
                    foreach (var item1 in Summary_Line_Billing_Payment.cs_fxObtenerTodoPorCabeceraId(item.Cs_pr_SummaryDocuments_SummaryDocumentsLine_Id))
                    {
                        item1.cs_pxElimnar(false);
                    }

                    foreach (var item2 in Summary_Line_Allowance_Charge.cs_fxObtenerTodoPorCabeceraId(item.Cs_pr_SummaryDocuments_SummaryDocumentsLine_Id))
                    {
                        item2.cs_pxElimnar(false);
                    }

                    foreach (var item3 in Summay_Line_Tax_Total.cs_fxObtenerTodoPorCabeceraId(item.Cs_pr_SummaryDocuments_SummaryDocumentsLine_Id))
                    {
                        item3.cs_pxElimnar(false);
                    }

                    item.cs_pxElimnar(false);
                }
            }
            catch (Exception ex)
            {
                clsBaseLog.cs_pxRegistarAdd("clsEntitySummaryDocuments cs_pxEliminarDocumento " + ex.ToString());
            }
        }