public virtual IEnumerable PrintReport(PXAdapter adapter)
        {
            ARStatementPrint graph = PXGraph.CreateInstance <ARStatementPrint>();

            graph.Filter.Current.StatementCycleId = this.History.Current.StatementCycleId;
            graph.Filter.Current.StatementDate    = this.History.Current.StatementDate;
            throw new PXRedirectRequiredException(graph, "Report Process");
        }
Exemplo n.º 2
0
        public virtual IEnumerable PrintReport(PXAdapter adapter)
        {
            ARStatementPrint graph = PXGraph.CreateInstance <ARStatementPrint>();

            graph.Filter.Current.StatementCycleId = this.History.Current.StatementCycleId;
            graph.Filter.Current.StatementDate    = this.History.Current.StatementDate;
            throw new PXRedirectRequiredException(graph, "Report Process");

            /*
             * if (this.History.Current != null && this.Filter.Current != null)
             * {
             *      Dictionary<string, string> parameters = new Dictionary<string, string>();
             *      Copy(parameters, this.History.Current);
             *      throw new PXReportRequiredException(parameters,ARStatementReportParams.CS_StatementReportID, "AR Statement Report");
             * }
             * return Filter.Select();
             */
        }
        public System.Collections.IEnumerable PrintReport(PXAdapter adapter)
        {
            if (this.Details.Current != null && this.Filter.Current != null)
            {
                if (this.Filter.Current.CustomerID.HasValue)
                {
                    Customer customer = PXSelect <Customer,
                                                  Where <Customer.bAccountID, Equal <Required <Customer.bAccountID> > > >
                                        .Select(this, Filter.Current.CustomerID);

                    if (customer != null)
                    {
                        Dictionary <string, string> parameters = new Dictionary <string, string>();

                        Export(parameters, this.Details.Current);
                        parameters[ARStatementReportParams.Parameters.CustomerID] = customer.AcctCD;

                        parameters[ARStatementReportParams.Parameters.PrintOnPaper] =
                            customer.PrintStatements == true ?
                            ARStatementReportParams.BoolValues.True :
                            ARStatementReportParams.BoolValues.False;
                        parameters[ARStatementReportParams.Parameters.SendByEmail] =
                            customer.SendStatementByEmail == true ?
                            ARStatementReportParams.BoolValues.True:
                            ARStatementReportParams.BoolValues.False;

                        string reportID = (customer.PrintCuryStatements ?? false) ? ARStatementReportParams.CS_CuryStatementReportID : ARStatementReportParams.CS_StatementReportID;

                        var reportRequired = PXReportRequiredException.CombineReport(null,
                                                                                     ARStatementPrint.GetCustomerReportID(this, reportID, customer.BAccountID, this.Details.Current.BranchID), parameters);
                        if (reportRequired != null)
                        {
                            throw reportRequired;
                        }
                    }
                }
            }
            return(Filter.Select());
        }
Exemplo n.º 4
0
        public static string ReportIDForCustomer(PXGraph graph, Customer customer, int?branchID)
        {
            var reportID = customer.PrintCuryStatements == true ? ARStatementReportParams.CS_CuryStatementReportID : ARStatementReportParams.CS_StatementReportID;

            return(ARStatementPrint.GetCustomerReportID(graph, reportID, customer.BAccountID, branchID));
        }