[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Add field to parts



Hi Brian,

This mail is going through the -devel@ mailing list as that's the appropriate forum to discuss changes to the LedgerSMB software - just letting you know.

On Tue, Jul 24, 2012 at 3:49 AM, Brian Wolf <..hidden..> wrote:
Everyone:

I'd like to add a field to the parts table and display it when editing a part.  I'm new to LedgerSMB, and even newer to Perl.  I've added the column to the database and added a field to the HTML form.  But, can someone give me some guidance on adding code to save updated values to the database ?


Unfortunately, the bit you're trying to change is located in "old code": code that's still inherited from SQL Ledger, which means you probably need a few extra rounds to make it work in all cases. But from what I found out so far is that you're looking to change the query in IC.pm:435 to include your new column and the $dbh->execute() line right below to include the value of the column to be set. That value is held in $form->{<name-of-the-entry-field-in-the-form>}.

HTH,


Erik.