Hi Del; On Sun, Jan 4, 2009 at 9:49 AM, Del Miller <[email protected]> wrote:
> So I'd like to make, what appears to be, a simple change to a report and > am hopelessly lost and looking for some direction. Your frustration is not unusual. The legacy code is hard to follow. I can't wait until we get rid of all of it :-) > It would seem that if one goes to AR->Customers->Reports->History, > selects Sales Invoices, Summary and then enters the From: & To: fields, > that the report I'm after should appear... a summary of invoices to a > given customer over a given time frame. All the pieces seem to be in > place, if I could just modify the code to produce the report given the > seletions. Wouldn't be hard -- it's already looping though customers > and displaying invoices/details -- all that need happen is to add an > accumulator and display the total for each customer on the resulting report. Hmm... Looks like I accidently got rid of the history report in 1.3..... Fortunately, this area needs to be rewritten for clarity anyway in 1.3, so I am going to propose a reasonably portable solution. We create a stored procedure for the report, and I hand it to Del for modifications. Then she can add a little logic to call her modified stored proc in CT->get_history() and hand it back to me for porting to 1.3. > > The problem is that I can't, for the life of me, follow the code enough > to figure out where to put it! CT.pm, get_history generates the report. Good luck following that function though :-( Now you can see why we are advocating an incremental rewrite to get rid of ALL inherited code ;-). > After several hours of > searching/grepping/schlepping/slogging/poking/prodding/etc. through code > I don't feel as if I'm any closer to a solution then before I started. > All I need is a couple of hints as to where the bodies are buried -- > I'll go dig them up, I don't mind getting dirty. Everything seems to > point to ./bin/ct.pl & ./LedgerSMB/CT.PM but from there I'm lost. What > gets called? What generates the report page? All I want is a add a > field without going insane. bin/ct.pl sub history bin/ct.pl sub list_history LedgerSMB/CT.pm sub get_history Hope this helps. Chris Travers ------------------------------------------------------------------------------ _______________________________________________ Ledger-smb-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ledger-smb-devel
