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

SF.net SVN: ledger-smb:[5147] branches/1.3



Revision: 5147
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=5147&view=rev
Author:   einhverfr
Date:     2012-10-06 09:25:40 +0000 (Sat, 06 Oct 2012)
Log Message:
-----------
Undoing accidental commit of b_units backport addon

Modified Paths:
--------------
    branches/1.3/LedgerSMB/AA.pm
    branches/1.3/LedgerSMB/Form.pm
    branches/1.3/LedgerSMB/GL.pm
    branches/1.3/LedgerSMB/IR.pm
    branches/1.3/LedgerSMB/IS.pm
    branches/1.3/LedgerSMB/OE.pm
    branches/1.3/UI/journal/journal_entry.html
    branches/1.3/bin/aa.pl
    branches/1.3/bin/gl.pl
    branches/1.3/bin/io.pl

Modified: branches/1.3/LedgerSMB/AA.pm
===================================================================
--- branches/1.3/LedgerSMB/AA.pm	2012-10-06 09:16:58 UTC (rev 5146)
+++ branches/1.3/LedgerSMB/AA.pm	2012-10-06 09:25:40 UTC (rev 5147)
@@ -60,7 +60,6 @@
 	use strict;
 
     my ( $self, $myconfig, $form ) = @_;
-    $form->all_business_units;
 
     my $exchangerate;
     my $batch_class;
@@ -441,12 +440,6 @@
 
     my $taxformfound=AA->taxform_exist($form,$form->{"$form->{vc}_id"});
 
-    my $b_unit_sth = $dbh->prepare(
-         "INSERT INTO business_unit_ac (entry_id, class_id, bu_id)
-          VALUES (currval('acc_trans_entry_id_seq'), ?, ?)"
-    );
-
-
     foreach $ref ( @{ $form->{acc_trans}{lineitems} } ) {
         # insert detail records in acc_trans
         if ( $ref->{amount} ) {
@@ -468,14 +461,6 @@
            $dbh->prepare($query)->execute(@queryargs)
               || $form->dberror($query);
 
-           if ($ref->{row_num} and !$ref->{fx_transaction}){
-              my $i = $ref->{row_num};
-              for my $cls(@{$form->{bu_class}}){
-                  if ($form->{"b_unit_$cls->{id}_$i"}){
-                     $b_unit_sth->execute($cls->{id}, $form->{"b_unit_$cls->{id}_$i"});
-                  }
-              }
-           }
            if($taxformfound)
            {
             $query="select max(entry_id) from acc_trans;";

Modified: branches/1.3/LedgerSMB/Form.pm
===================================================================
--- branches/1.3/LedgerSMB/Form.pm	2012-10-06 09:16:58 UTC (rev 5146)
+++ branches/1.3/LedgerSMB/Form.pm	2012-10-06 09:25:40 UTC (rev 5147)
@@ -1977,45 +1977,6 @@
     return $i;
 }
 
-=item $form->all_business_units([$transdate, $credit_id]);
-
-Returns a list at bu_class with class information, ordered by order information
-and a list of units in lists at bu_units->$class_id.  $transdate is used to
-filter projects active at specified date.  $credit_id is to filter out 
-units assigned to other customers.
-
-=cut
-
-sub all_business_units {
-
-    my ( $self, $transdate, $credit_id, $module_name) = @_;
-    $self->{bu_class} = [];
-    $self->{b_units} = {};
-
-    my $dbh       = $self->{dbh};
-    my $class_sth = $dbh->prepare(
-                q|SELECT * FROM business_unit__list_classes('1', ?)|
-    );
-    $class_sth->execute($module_name);
-
-    my $bu_sth    = $dbh->prepare(
-                q|SELECT * 
-                    FROM business_unit__list_by_class(?, ?, ?, 'false')|
-    );
-
-    while (my $classref = $class_sth->fetchrow_hashref('NAME_lc')){
-        push @{$self->{bu_class}}, $classref;
-        $bu_sth->execute($classref->{id}, $transdate, $credit_id);
-        $self->{b_units}->{$classref->{id}} = [];
-        while (my $buref = $bu_sth->fetchrow_hashref('NAME_lc')){
-           push @{$self->{b_units}->{$classref->{id}}}, $buref;
-        }
-    }
-    $class_sth->finish;
-    $bu_sth->finish;
-
-}
-
 =item $form->all_vc($myconfig, $vc, $module, $dbh, $transdate, $job);
 
 Populates the list referred to by $form->{all_${vc}} with hashes of either
@@ -2696,18 +2657,12 @@
         $query = qq|
 			SELECT c.accno, c.description, a.source, a.amount,
 				a.memo,a.entry_id, a.transdate, a.cleared, a.project_id,
-				p.projectnumber,
-                                compound_array(ARRAY[ARRAY[bul.class_id, bul.bu_id]])
-                                AS bu_lines
+				p.projectnumber
 			FROM acc_trans a
 			JOIN chart c ON (c.id = a.chart_id)
 			LEFT JOIN project p ON (p.id = a.project_id)
-                   LEFT JOIN business_unit_ac bul ON a.entry_id = bul.entry_id
 			WHERE a.trans_id = ?
 				AND a.fx_transaction = '0'
-                        GROUP BY c.accno, c.description, a.source, a.amount,
-                                 a.memo,a.entry_id, a.transdate, a.cleared,
-                                 a.project_id, p.projectnumber
 			ORDER BY transdate|;
 
         $sth = $dbh->prepare($query);

Modified: branches/1.3/LedgerSMB/GL.pm
===================================================================
--- branches/1.3/LedgerSMB/GL.pm	2012-10-06 09:16:58 UTC (rev 5146)
+++ branches/1.3/LedgerSMB/GL.pm	2012-10-06 09:25:40 UTC (rev 5147)
@@ -97,7 +97,6 @@
 sub post_transaction {
 
     my ( $self, $myconfig, $form, $locale) = @_;
-    $form->all_business_units;
     $form->{reference} = $form->update_defaults( $myconfig, 'glnumber', $dbh )
       unless $form->{reference};
     my $null;
@@ -196,10 +195,6 @@
     my $debit;
     my $credit;
 
-    $b_sth = $dbh->prepare(
-            qq|INSERT INTO business_unit_ac (entry_id, class_id, bu_id) | . 
-            qq|VALUES (currval('acc_trans_entry_id_seq'), ?, ?)|
-    );
     # insert acc_trans transactions
     for $i ( 0 .. $form->{rowcount} ) {
 
@@ -249,12 +244,6 @@
                 ($form->{"cleared_$i"} || 0)
             ) || $form->dberror($query);
 
-            for my $cls(@{$form->{bu_class}}){
-                if ($form->{"b_unit_$cls->{id}_$i"}){
-                    $b_sth->execute($cls->{id}, 
-                                     $form->{"b_unit_$cls->{id}_$i"});
-                }
-            }
             $posted = 1;
         }
     }
@@ -665,18 +654,8 @@
         $sth = $dbh->prepare($query);
         $sth->execute( $form->{id} ) || $form->dberror($query);
 
-        my $bu_sth = $dbh->prepare(
-            qq|SELECT * FROM business_unit_ac 
-                WHERE entry_id = ?  |
-        );
-
         while ( $ref = $sth->fetchrow_hashref(NAME_lc) ) {
-            $bu_sth->execute($ref->{entry_id});
-            while ($buref = $bu_sth->fetchrow_hashref(NAME_lc) ) {
-                 $ref->{"b_unit_$buref->{class_id}"} = $buref->{bu_id};
-            }
 
-
             if ( $ref->{fx_transaction} ) {
                 $form->{transfer} = 1;
             }

Modified: branches/1.3/LedgerSMB/IR.pm
===================================================================
--- branches/1.3/LedgerSMB/IR.pm	2012-10-06 09:16:58 UTC (rev 5146)
+++ branches/1.3/LedgerSMB/IR.pm	2012-10-06 09:25:40 UTC (rev 5147)
@@ -69,7 +69,6 @@
 sub post_invoice {
     my ( $self, $myconfig, $form ) = @_;
 
-    $form->all_business_units;
     if ($form->{id}){
         delete_invoice($self, $myconfig, $form);
     }
@@ -206,15 +205,6 @@
     
     my $taxformfound=IR->taxform_exist($form,$form->{"vendor_id"});#tshvr this always returns true!!
   
-    my $b_unit_sth = $dbh->prepare(
-         "INSERT INTO business_unit_inv (entry_id, class_id, bu_id)
-          VALUES (currval('invoice_id_seq'), ?, ?)"
-    );
-
-    my $b_unit_sth_ac = $dbh->prepare(
-         "INSERT INTO business_unit_ac (entry_id, class_id, bu_id)
-          VALUES (currval('acc_trans_entry_id_seq'), ?, ?)"
-    );
     for my $i ( 1 .. $form->{rowcount} ) {
         $form->{"qty_$i"} = $form->parse_amount( $myconfig, $form->{"qty_$i"} );
 
@@ -347,12 +337,6 @@
                 $invoice_id
             ) || $form->dberror($query);
 
-            for my $cls(@{$form->{bu_class}}){
-                if ($form->{"b_unit_$cls->{id}_$i"}){
-                 $b_unit_sth->execute($cls->{id}, $form->{"b_unit_$cls->{id}_$i"});
-                }
-            }
-
             if($taxformfound)
             {
              my $report=$form->{"taxformcheck_$i"}?"true":"false";
@@ -499,11 +483,6 @@
                             $ref->{transdate}, $ref->{transdate},
                         ) || $form->dberror($query);
 
-                        for my $cls(@{$form->{bu_class}}){
-                            if ($form->{"b_unit_$cls->{id}_$i"}){
-                             $b_unit_sth_ac->execute($cls->{id}, $form->{"b_unit_$cls->{id}_$i"});
-                            }
-                        }
                         # add expense
                         $query = qq|
 				INSERT INTO acc_trans 
@@ -528,12 +507,6 @@
                         ) || $form->dberror($query);
                     }
 
-
-                    for my $cls(@{$form->{bu_class}}){
-                        if ($form->{"b_unit_$cls->{id}_$i"}){
-                         $b_unit_sth_ac->execute($cls->{id}, $form->{"b_unit_$cls->{id}_$i"});
-                        }
-                    }
                     # update allocated for sold item
                     $form->update_balance( $dbh, "invoice", "allocated",
                         qq|id = $ref->{id}|,
@@ -1302,13 +1275,7 @@
         $sth->execute( $form->{language_code}, $form->{id} )
           || $form->dberror($query);
 
-        my $bu_sth = $dbh->prepare(
-            qq|SELECT * FROM business_unit_inv
-                WHERE entry_id = ?  |
-        );
-
         # exchangerate defaults
-        # exchangerate defaults
         &exchangerate_defaults( $dbh, $form );
 
         # price matrix and vendor partnumber
@@ -1333,11 +1300,6 @@
             $dec = length $dec;
             my $decimalplaces = ( $dec > 2 ) ? $dec : 2;
 
-            $bu_sth->execute($ref->{invoice_id});
-            while ( $buref = $bu_sth->fetchrow_hashref(NAME_lc) ) {
-                $ref->{"b_unit_$buref->{class_id}"} = $buref->{bu_id};
-            }
-
             $tth->execute( $ref->{id} );
             $ref->{taxaccounts} = "";
             my $taxrate = 0;

Modified: branches/1.3/LedgerSMB/IS.pm
===================================================================
--- branches/1.3/LedgerSMB/IS.pm	2012-10-06 09:16:58 UTC (rev 5146)
+++ branches/1.3/LedgerSMB/IS.pm	2012-10-06 09:25:40 UTC (rev 5147)
@@ -910,7 +910,6 @@
 sub post_invoice {
 
     my ( $self, $myconfig, $form ) = @_;
-    $form->all_business_units;
     $form->{invnumber} = $form->update_defaults( $myconfig, "sinumber", $dbh )
       unless $form->{invnumber};
 
@@ -1037,10 +1036,6 @@
 
     my $taxformfound=IS->taxform_exist($form,$form->{"customer_id"});
 
-    my $b_unit_sth = $dbh->prepare(
-         "INSERT INTO business_unit_inv (entry_id, class_id, bu_id)
-          VALUES (currval('invoice_id_seq'), ?, ?)"
-    );
 
     foreach $i ( 1 .. $form->{rowcount} ) {
         my $allocated = 0;
@@ -1253,11 +1248,6 @@
                 $invoice_id
             ) || $form->dberror($query);
 
-            for my $cls(@{$form->{bu_class}}){
-                if ($form->{"b_unit_$cls->{id}_$i"}){
-                 $b_unit_sth->execute($cls->{id}, $form->{"b_unit_$cls->{id}_$i"});
-                }
-            }
 	   my $report=($taxformfound and $form->{"taxformcheck_$i"})?"true":"false";
 
 	   IS->update_invoice_tax_form($form,$dbh,$invoice_id,$report);
@@ -1308,29 +1298,6 @@
     $invnetamount = $amount;
 
     $amount = 0;
-
-    $form->{paid} = 0;
-    for $i ( 1 .. $form->{paidaccounts} ) {
-        $form->{"paid_$i"} =
-          $form->parse_amount( $myconfig, $form->{"paid_$i"} )->bstr();
-        $form->{paid} += $form->{"paid_$i"};
-        $form->{datepaid} = $form->{"datepaid_$i"}
-          if ( $form->{"paid_$i"} );
-    }
-
-    # add lineitems + tax
-    $amount        = 0;
-    $grossamount   = 0;
-    $fxgrossamount = 0;
-
-    for ( @{ $form->{acc_trans}{lineitems} } ) {
-        $amount        += $_->{amount};
-        $grossamount   += $_->{grossamount};
-        $fxgrossamount += $_->{fxgrossamount};
-    }
-    $invnetamount = $amount;
-
-    $amount = 0;
     for ( split / /, $form->{taxaccounts} ) {
         $amount += $form->{acc_trans}{ $form->{id} }{$_}{amount} =
           $form->round_amount( $form->{acc_trans}{ $form->{id} }{$_}{amount},
@@ -1340,11 +1307,6 @@
 
     $diff = 0;
 
-    $b_unit_sth = $dbh->prepare(
-         "INSERT INTO business_unit_ac (entry_id, class_id, bu_id)
-          VALUES (currval('acc_trans_entry_id_seq'), ?, ?)"
-    );
-
     if ( $form->{taxincluded} ) {
         $diff = $form->round_amount( $grossamount - $invamount, 2 );
         $invamount += $diff;
@@ -1377,11 +1339,6 @@
           || $form->dberror($query);
         $diff   = 0;
         $fxdiff = 0;
-        for my $cls(@{$form->{bu_class}}){
-            if ($form->{"b_unit_$cls->{id}_$i"}){
-               $b_unit_sth->execute($cls->{id}, $form->{"b_unit_$cls->{id}_$i"});
-            }
-        }
     }
 
     $form->{receivables} = $invamount * -1;
@@ -2204,12 +2161,6 @@
           || $form->dberror($query);
 
         
-        my $bu_sth = $dbh->prepare(
-            qq|SELECT * FROM business_unit_inv
-                WHERE entry_id = ?  |
-        );
-
-        
         # foreign currency
         &exchangerate_defaults( $dbh, $form );
 
@@ -2236,11 +2187,6 @@
             $dec = length $dec;
             my $decimalplaces = ( $dec > 2 ) ? $dec : 2;
 
-            $bu_sth->execute($ref->{invoice_id});
-            while ( $buref = $bu_sth->fetchrow_hashref(NAME_lc) ) {
-                $ref->{"b_unit_$buref->{class_id}"} = $buref->{bu_id};
-            }
-
             $tth->execute( $ref->{id} );
 
             $ref->{taxaccounts} = "";

Modified: branches/1.3/LedgerSMB/OE.pm
===================================================================
--- branches/1.3/LedgerSMB/OE.pm	2012-10-06 09:16:58 UTC (rev 5146)
+++ branches/1.3/LedgerSMB/OE.pm	2012-10-06 09:25:40 UTC (rev 5147)
@@ -309,7 +309,6 @@
 sub save {
     my ( $self, $myconfig, $form ) = @_;
   
-    $form->all_business_units;
     $form->db_prepare_vars(
         "quonumber", "transdate",     "vendor_id",     "entity_id",
         "reqdate",   "taxincluded",   "shippingpoint", "shipvia",
@@ -318,10 +317,6 @@
     );
     # connect to database, turn off autocommit
     my $dbh = $form->{dbh};
-    my $b_unit_sth = $dbh->prepare(
-         "INSERT INTO business_unit_oitem (entry_id, class_id, bu_id)
-          VALUES (currval('orderitems_id_seq'), ?, ?)"
-    );
     my @queryargs;
     my $quotation;
     my $ordnumber;
@@ -577,11 +572,6 @@
             $sth->execute(@queryargs) || $form->dberror($query);
 	    $dbh->commit;
             $form->{"sellprice_$i"} = $fxsellprice;
-            for my $cls(@{$form->{bu_class}}){
-                if ($form->{"b_unit_$cls->{id}_$i"}){
-                 $b_unit_sth->execute($cls->{id}, $form->{"b_unit_$cls->{id}_$i"});
-                }
-            }
         }
         $form->{"discount_$i"} *= 100;
  
@@ -826,11 +816,6 @@
     # connect to database
     my $dbh = $form->{dbh};
 
-    my $bu_sth = $dbh->prepare(
-            qq|SELECT * FROM business_unit_oitem
-                WHERE entry_id = ?  |
-    );
-
     my $query;
     my $sth;
     my $var;
@@ -945,11 +930,6 @@
         while ( $ref = $sth->fetchrow_hashref('NAME_lc') ) {
             $form->db_parse_numeric(sth=>$sth, hashref=>$ref);
 
-            $bu_sth->execute($ref->{invoice_id});
-            while ( $buref = $bu_sth->fetchrow_hashref(NAME_lc) ) {
-                $ref->{"b_unit_$buref->{class_id}"} = $buref->{bu_id};
-            }
-
             ($decimalplaces) = ( $ref->{sellprice} =~ /\.(\d+)/ );
             $decimalplaces = length $decimalplaces;
             $decimalplaces = ( $decimalplaces > 2 ) ? $decimalplaces : 2;

Modified: branches/1.3/UI/journal/journal_entry.html
===================================================================
--- branches/1.3/UI/journal/journal_entry.html	2012-10-06 09:16:58 UTC (rev 5146)
+++ branches/1.3/UI/journal/journal_entry.html	2012-10-06 09:25:40 UTC (rev 5147)
@@ -134,11 +134,6 @@
 	  <?lsmb IF form.projectset == 1 ?>
 	  <th class="listheading"><?lsmb text('Project') ?></th>
 	  <?lsmb END ?>
-          <?lsmb FOREACH cls IN form.bu_class ?>
-              <?lsmb IF form.b_units.${cls.id} ?>
-          <th><?lsmb text(cls.label) ?></th>
-               <?lsmb END ?>
-          <?lsmb END ?>
 	</tr>
 	<?lsmb FOREACH displayrow IN displayrows ?> 
 	<tr>
@@ -261,24 +256,6 @@
 			<?lsmb END ?>
 
 		   </td>
-                   <?lsmb END ?>
-                   <?lsmb FOREACH cls IN form.bu_class ?>
-                      <?lsmb IF form.b_units.${cls.id} ?>
-                   <td>
-                       
-                       <?lsmb clsid = cls.id;
-                              bucid = "b_unit_$clsid";
-                              burow = "${bucid}_$INDEX";
-                       form.b_units.${clsid}.unshift({});
-                       INCLUDE select element_data = {
-                              text_attr = "control_code"
-                             value_attr = "id"
-                         default_values = [displayrow.${bucid}]
-                                   name = "$burow"
-                                options = form.b_units.${clsid}
-                       } ?>
-                   </td>
-                   <?lsmb END ?>
 		  <?lsmb END ?>
 
         </tr>

Modified: branches/1.3/bin/aa.pl
===================================================================
--- branches/1.3/bin/aa.pl	2012-10-06 09:16:58 UTC (rev 5146)
+++ branches/1.3/bin/aa.pl	2012-10-06 09:25:40 UTC (rev 5147)
@@ -435,10 +435,6 @@
 
     $title = $form->{title};
 
-    $form->all_business_units($form->{transdate}, 
-                              $form->{"$form->{vc}_id"}, 
-                              $form->{ARAP});
-
     if($form->{batch_id})
     {
 		$form->{batch_control_code}=$form->get_batch_control_code($form->{dbh},$form->{batch_id});
@@ -748,13 +744,7 @@
 	  <th>| . $locale->text('Account') . qq|</th>
 	  <th>| . $locale->text('Description') . qq|</th>
 	  <th>| . $locale->text('Tax Form Applied') . qq|</th>
-	  $project|;
-    for my $cls (@{$form->{bu_class}}){
-        if (scalar @{$form->{b_units}->{"$cls->{id}"}}){
-            print qq|<th>| . $locale->text($cls->{label}) . qq|</th>|;
-        }
-    }
-       print qq|
+	  $project
 	</tr>
 |;
 
@@ -802,27 +792,7 @@
 	  <td><select name="$form->{ARAP}_amount_$i">$selectamount</select></td>
 	  $description
           $taxformcheck
-	  $project|;
-
-        for my $cls (@{$form->{bu_class}}){
-            if (scalar @{$form->{b_units}->{"$cls->{id}"}}){
-                print qq|<td><select name="b_unit_$cls->{id}_$i">
-                                    <option></option>|;
-                      for my $bu (@{$form->{b_units}->{"$cls->{id}"}}){
-                         my $selected = '';
-                         if ($form->{"b_unit_$cls->{id}_$i"} eq $bu->{id}){
-                            $selected = "SELECTED='SELECTED'";
-                         }
-                         print qq|  <option value="$bu->{id}" $selected>
-                                        $bu->{control_code}
-                                    </option>|;
-                      }
-                print qq|
-                             </select>
-                        </th>|;
-            }
-        }
-        print qq|
+	  $project
 	</tr>
 |;
 
@@ -1522,9 +1492,6 @@
         $selectname = qq|<input name=$form->{vc} size=35>|;
     }
 
-    # Business Reporting Units
-    $form->all_business_units;
-
     # departments
     if ( @{ $form->{all_department} } ) {
         $form->{selectdepartment} = "<option>\n";

Modified: branches/1.3/bin/gl.pl
===================================================================
--- branches/1.3/bin/gl.pl	2012-10-06 09:16:58 UTC (rev 5146)
+++ branches/1.3/bin/gl.pl	2012-10-06 09:25:40 UTC (rev 5147)
@@ -179,7 +179,6 @@
 sub display_form
 {
     #Add General Ledger Transaction
-    $form->all_business_units($form->{transdate}, undef, 'GL');
     $form->close_form;
     $form->open_form; 
     $form->{dbh}->commit;
@@ -407,12 +406,7 @@
 			      $temphash1->{debit}=$form->{"debit_$i"};
 			      $temphash1->{credit}=$form->{"credit_$i"};
 
-                              for my $cls(@{$form->{bu_class}}){
-                                  $temphash1->{"b_unit_$cls->{id}"} =
-                                         $form->{"b_unit_$cls->{id}_$i"};
-                              } 
 
-
 			      if ( $i < $form->{rowcount} )
 			      {					      
 						    $temphash1->{accno}=$form->{"accno_$i"};
@@ -933,8 +927,6 @@
 
     &create_links;
 
-    $form->all_business_units($form->{transdate}, undef, 'GL');
-
     $form->{locked} =
       ( $form->{revtrans} )
       ? '1'
@@ -964,10 +956,6 @@
             $form->{"credit_$i"} = $ref->{amount};
         }
 
-        for my $cls (@{$form->{bu_class}}){
-            $form->{"b_unit_$cls->{id}_$i"} = $ref->{"b_unit_$cls->{id}"};
-        }
-
         $i++;
     }
    if ($form->{id}){

Modified: branches/1.3/bin/io.pl
===================================================================
--- branches/1.3/bin/io.pl	2012-10-06 09:16:58 UTC (rev 5146)
+++ branches/1.3/bin/io.pl	2012-10-06 09:25:40 UTC (rev 5147)
@@ -126,15 +126,6 @@
 
 sub display_row {
     my $numrows = shift;
-    my $lsmb_module;
-    if ($form->{vc} eq 'customer'){
-       $lsmb_module = 'AR';
-    } elsif ($form->{vc} eq 'vendor'){
-       $lsmb_module = 'AP';
-    }
-    $form->all_business_units($form->{transdate}, 
-                              $form->{"$form->{vc}_id"}, 
-                              $lsmb_module);
 
     @column_index = qw(runningnumber partnumber description qty);
 
@@ -183,14 +174,6 @@
 
     push @column_index, @{LedgerSMB::Sysconfig::io_lineitem_columns};
 
-    for my $cls(@{$form->{bu_class}}){
-        if (scalar @{$form->{b_units}->{"$cls->{id}"}}){
-             push @column_index, "b_unit_$cls->{id}";
-             $column_data{"b_unit_$cls->{id}"} = 
-               qq|<th class=listheading nowrap>| . $cls->{label} . qq|</th>|;
-        }
-    }
-
     push @column_index, "taxformcheck";#increase the number of elements by pushing into column_index.(Ex: NEw added element 
 				       # taxformcheck & check the screen AR->Sales Invoice) do everything before colspan ;
 
@@ -353,26 +336,6 @@
 
 	}
 
-        for my $cls(@{$form->{bu_class}}){
-            if (scalar @{$form->{b_units}->{"$cls->{id}"}}){
-                $column_data{"b_unit_$cls->{id}"} = 
-                   qq|<td><select name="b_unit_$cls->{id}_$i">
-                           <option></option>|;
-                for my $bu (@{$form->{b_units}->{"$cls->{id}"}}){
-                   my $selected = "";
-                   if ($bu->{id} eq $form->{"b_unit_$cls->{id}_$i"}){
-                       $selected = "SELECTED='SELECTED'";
-                   }
-                   $column_data{"b_unit_$cls->{id}"} .= qq|
-                       <option value="$bu->{id}" $selected >
-                               $bu->{control_code}
-                       </option>|;
-                }
-                $column_data{"b_unit_$cls->{id}"} .= qq|
-                     </select></td>|;
-                   
-            }
-        }
 
 $column_data{runningnumber} =
           qq|<td><input name="runningnumber_$i" size=3 value=$i></td>|;

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.