diff options
author | einhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46> | 2007-07-09 23:09:45 +0000 |
---|---|---|
committer | einhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46> | 2007-07-09 23:09:45 +0000 |
commit | 8b040e5df9af9de3d01e3451b56ae37c90df1a4d (patch) | |
tree | 9e39ca28325ff4a195ad174585d61562169fcede /LedgerSMB/IC.pm | |
parent | 4de76bf567a88296a96401168516f6fc2e90996e (diff) |
Fixing bug 1748255
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/branches/1.2@1361 4979c152-3d1c-0410-bac9-87ea11338e46
Diffstat (limited to 'LedgerSMB/IC.pm')
-rwxr-xr-x | LedgerSMB/IC.pm | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/LedgerSMB/IC.pm b/LedgerSMB/IC.pm index 3132a8a7..749a94e3 100755 --- a/LedgerSMB/IC.pm +++ b/LedgerSMB/IC.pm @@ -204,6 +204,9 @@ sub get_part { sub save { my ( $self, $myconfig, $form ) = @_; + $form->{partnumber} = + $form->update_defaults( $myconfig, "partnumber", $dbh ) + if !$form->{partnumber}; ( $form->{inventory_accno} ) = split( /--/, $form->{IC_inventory} ); ( $form->{expense_accno} ) = split( /--/, $form->{IC_expense} ); @@ -378,9 +381,6 @@ sub save { ( $null, $partsgroup_id ) = split /--/, $form->{partsgroup}; $partsgroup_id *= 1; - $form->{partnumber} = - $form->update_defaults( $myconfig, "partnumber", $dbh ) - if !$form->{partnumber}; if ( !$form->{priceupdate} ) { $form->{priceupdate} = 'now'; @@ -1599,13 +1599,8 @@ sub include_assembly { $form->{$id} = 1; my @a = qw(partnumber description bin); - if ( $form->{sort} eq 'partnumber' ) { - $sortorder = "TRUE"; - } - else { - @a = grep !/$form->{sort}/, @a; - $sortorder = "$form->{sort} $form->{direction}, " . join ',', @a; - } + @a = grep !/$form->{sort}/, @a; + $sortorder = "$form->{sort} $form->{direction}, " . join ',', @a; @a = (); my $query = qq| |