Re: [Ledger-smb-devel] Employee search question for 1.3
On 06/21/2011 04:02 PM, Chris Travers wrote: Hi John; In terms of the duplication issue can you: SELECT p.id as person_id, e.id as entity_id FROM person p JOIN entity e ON (e.id = p.entity_id) order by p.id; db= SELECT p.id as person_id, e.id as entity_id db- FROM person p db- JOIN entity e ON (e.id = p.entity_id) db- order by p.id; person_id | entity_id ---+--- 1 | 1 3 | 653 4 | 654 5 | 667 (4 rows) This should not contain any personal info but would allow me to look at the join issues involved, Best Wishes, Chris Travers -- EditLive Enterprise is the world's most technically advanced content authoring tool. Experience the power of Track Changes, Inline Image Editing and ensure content is compliant with Accessibility Checking. http://p.sf.net/sfu/ephox-dev2dev ___ Ledger-smb-devel mailing list Ledger-smb-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ledger-smb-devel -- Simplify data backup and recovery for your virtual environment with vRanger. Installation's a snap, and flexible recovery options mean your data is safe, secure and there when you need it. Data protection magic? Nope - It's vRanger. Get your free trial download today. http://p.sf.net/sfu/quest-sfdev2dev ___ Ledger-smb-devel mailing list Ledger-smb-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ledger-smb-devel
Re: [Ledger-smb-devel] Exception handling in Perl or rather: non-local goto's
Hi Chris, On Tue, Jun 21, 2011 at 12:21 AM, Chris Travers chris.trav...@gmail.com wrote: On Mon, Jun 20, 2011 at 2:49 PM, Erik Huelsmann ehu...@gmail.com wrote: Last weekend, I added non-local gotos using exception handling to replace 'exit;' calls. Today, mst showed up on IRC (coincidentally), telling me about an issue with running our code under suEXEC conditions. That bit was fixed in r3304, but as he did some code review, he pointed out my use of Error.pm is really 'so 2005' -- Error.pm having been superseeded by Try::Tiny. I suppose there are worse things than using programming practices that are so 2005. It would be more helpful if we could have some idea what the relevant cost/benefits of an approach are rather than just a blanket characterization. Is the module unmaintained? What precisely are the issues? If we don't know what the issues are and the code works, let's not spend a lot of effort rewriting.s Well, I've spent some time researching the issues which are supposedly involved, but I'm not getting much further than the following - rather generic - statement from the Error.pm perlpod pages: Using the Error module is no longer recommended due to the black-magical nature of its syntactic sugar, which often tends to break. Its maintainers have stopped actively writing code that uses it, and discourage people from doing so. See the SEE ALSO section below for better recommendations. From the above, I would say that it's indeed no longer maintained. But nothing in the page nor in my web searches indicates what would often break. When reading the POD for Try::Tiny, I get extremely unhappy about its treatment of the $@ variable. However, possibly, that doesn't matter much for our specific purpose. Can you be specific here? Yes: studying the pages for Try::Tiny again, their discussion of the $@ variable is really about Perl's general behaviour, meaning I was misunderstanding the discussion to be specifically about Try::Tiny and my disgust is more with Perl in general than with Try::Tiny. Basically, instead of declaring a variable to store the exception object into (like e.g. Java in its catch (class var) {}), any code can store a value in $@. That means you really can't depend on the value of $@ to stay unclobbered. Concluding: Error.pm may be considered unmaintained; switching to Try::Tiny seems a good option, with the drawbacks being general Perl gotcha's. It'll take a bit of getting used to, but I guess I'll manage :-) Bye, Erik. -- Simplify data backup and recovery for your virtual environment with vRanger. Installation's a snap, and flexible recovery options mean your data is safe, secure and there when you need it. Data protection magic? Nope - It's vRanger. Get your free trial download today. http://p.sf.net/sfu/quest-sfdev2dev ___ Ledger-smb-devel mailing list Ledger-smb-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ledger-smb-devel
Re: [Ledger-smb-devel] Employee search question for 1.3
On Wed, Jun 22, 2011 at 10:12 AM, John Locke m...@freelock.com wrote: On 06/21/2011 04:02 PM, Chris Travers wrote: Hi John; In terms of the duplication issue can you: SELECT p.id as person_id, e.id as entity_id FROM person p JOIN entity e ON (e.id = p.entity_id) order by p.id; db= SELECT p.id as person_id, e.id as entity_id db- FROM person p db- JOIN entity e ON (e.id = p.entity_id) db- order by p.id; person_id | entity_id ---+--- 1 | 1 3 | 653 4 | 654 5 | 667 (4 rows) And are you only seeing four rows total in the report? Best Wishes, Chris Travers -- Simplify data backup and recovery for your virtual environment with vRanger. Installation's a snap, and flexible recovery options mean your data is safe, secure and there when you need it. Data protection magic? Nope - It's vRanger. Get your free trial download today. http://p.sf.net/sfu/quest-sfdev2dev ___ Ledger-smb-devel mailing list Ledger-smb-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ledger-smb-devel
Re: [Ledger-smb-devel] Tax account creation: how to 'detect' tax accounts?
At the moment, our customers actually pay via another system (Drupal/Ubercart) which already does the right thing for taxes -- it does a call to a web service run by the State of Washington which returns the appropriate location code and rate. Basically what I need from LedgerSMB is a blank line item I can populate with this data, that is clearly a tax line, exported for reporting. If I can export the tax report detail to ODS, I can then slice it up per location code to file the taxes. That's a very good stopgap measure. Specifically what info would be stored? How can we make it generic? Best Wishes, Chris Travers -- Simplify data backup and recovery for your virtual environment with vRanger. Installation's a snap, and flexible recovery options mean your data is safe, secure and there when you need it. Data protection magic? Nope - It's vRanger. Get your free trial download today. http://p.sf.net/sfu/quest-sfdev2dev ___ Ledger-smb-devel mailing list Ledger-smb-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ledger-smb-devel
Re: [Ledger-smb-devel] Tax account creation: how to 'detect' tax accounts?
On 06/22/2011 04:15 PM, Chris Travers wrote: At the moment, our customers actually pay via another system (Drupal/Ubercart) which already does the right thing for taxes -- it does a call to a web service run by the State of Washington which returns the appropriate location code and rate. Basically what I need from LedgerSMB is a blank line item I can populate with this data, that is clearly a tax line, exported for reporting. If I can export the tax report detail to ODS, I can then slice it up per location code to file the taxes. That's a very good stopgap measure. Specifically what info would be stored? How can we make it generic? I'm thinking it should be correlated with a regular tax account, so that you can flag customers/parts for whether it's relevant (and have a mix of taxable/non-taxable items on it). Then provide these fields 1. Reference (e.g. location id) 2. Description (text field, optional) 3. Percentage 4. Amount ... that would be one line per invoice that could be filled in. I'm thinking it would be nice to calculate amount from applying percentage to taxable items on the invoice, if amount is blank. I also think for maximum flexibility it should be possible to leave percentage blank and provide an amount instead. Then in the tax report for that account, provide a spreadsheet download with the collected details. Cheers, John Locke http://freelock.com -- Simplify data backup and recovery for your virtual environment with vRanger. Installation's a snap, and flexible recovery options mean your data is safe, secure and there when you need it. Data protection magic? Nope - It's vRanger. Get your free trial download today. http://p.sf.net/sfu/quest-sfdev2dev ___ Ledger-smb-devel mailing list Ledger-smb-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ledger-smb-devel