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

SF.net SVN: ledger-smb:[5140] addons/1.3/b_units/trunk/patches/b_units. patch



Revision: 5140
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=5140&view=rev
Author:   einhverfr
Date:     2012-10-04 10:11:02 +0000 (Thu, 04 Oct 2012)
Log Message:
-----------
correcting business units backport patch GROUP BY logic

Modified Paths:
--------------
    addons/1.3/b_units/trunk/patches/b_units.patch

Modified: addons/1.3/b_units/trunk/patches/b_units.patch
===================================================================
--- addons/1.3/b_units/trunk/patches/b_units.patch	2012-10-04 08:16:31 UTC (rev 5139)
+++ addons/1.3/b_units/trunk/patches/b_units.patch	2012-10-04 10:11:02 UTC (rev 5140)
@@ -1,104 +1,48 @@
-Index: UI/journal/journal_entry.html
+Index: LedgerSMB/AA.pm
 ===================================================================
---- UI/journal/journal_entry.html	(revision 4653)
-+++ UI/journal/journal_entry.html	(working copy)
-@@ -133,6 +133,11 @@
- 	  <?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>
-@@ -255,6 +260,24 @@
- 			<?lsmb END ?>
+--- LedgerSMB/AA.pm	(revision 5138)
++++ LedgerSMB/AA.pm	(working copy)
+@@ -60,6 +60,7 @@
+ 	use strict;
  
- 		   </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 ?>
+     my ( $self, $myconfig, $form ) = @_;
++    $form->all_business_units;
  
-         </tr>
-Index: LedgerSMB/GL.pm
-===================================================================
---- LedgerSMB/GL.pm	(revision 4653)
-+++ LedgerSMB/GL.pm	(working copy)
-@@ -97,6 +97,7 @@
- sub post_transaction {
+     my $exchangerate;
+     my $batch_class;
+@@ -440,6 +441,12 @@
  
-     my ( $self, $myconfig, $form, $locale) = @_;
-+    $form->all_business_units;
-     $form->{reference} = $form->update_defaults( $myconfig, 'glnumber', $dbh )
-       unless $form->{reference};
-     my $null;
-@@ -195,6 +196,10 @@
-     my $debit;
-     my $credit;
+     my $taxformfound=AA->taxform_exist($form,$form->{"$form->{vc}_id"});
  
-+    $b_sth = $dbh->prepare(
-+            qq|INSERT INTO business_unit_ac (entry_id, class_id, bu_id) | . 
-+            qq|VALUES (currval('acc_trans_entry_id_seq'), ?, ?)|
++    my $b_unit_sth = $dbh->prepare(
++         "INSERT INTO business_unit_ac (entry_id, class_id, bu_id)
++          VALUES (currval('acc_trans_entry_id_seq'), ?, ?)"
 +    );
-     # insert acc_trans transactions
-     for $i ( 0 .. $form->{rowcount} ) {
- 
-@@ -244,6 +249,12 @@
-                 ($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;
-         }
-     }
-@@ -654,8 +665,18 @@
-         $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};
-+            }
++
+     foreach $ref ( @{ $form->{acc_trans}{lineitems} } ) {
+         # insert detail records in acc_trans
+         if ( $ref->{amount} ) {
+@@ -461,6 +468,14 @@
+            $dbh->prepare($query)->execute(@queryargs)
+               || $form->dberror($query);
  
-+
-             if ( $ref->{fx_transaction} ) {
-                 $form->{transfer} = 1;
-             }
++           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;";
 Index: LedgerSMB/Form.pm
 ===================================================================
---- LedgerSMB/Form.pm	(revision 4653)
+--- LedgerSMB/Form.pm	(revision 5138)
 +++ LedgerSMB/Form.pm	(working copy)
-@@ -1903,6 +1903,45 @@
+@@ -1977,6 +1977,45 @@
      return $i;
  }
  
@@ -144,7 +88,7 @@
  =item $form->all_vc($myconfig, $vc, $module, $dbh, $transdate, $job);
  
  Populates the list referred to by $form->{all_${vc}} with hashes of either
-@@ -2583,10 +2622,13 @@
+@@ -2657,12 +2696,18 @@
          $query = qq|
  			SELECT c.accno, c.description, a.source, a.amount,
  				a.memo,a.entry_id, a.transdate, a.cleared, a.project_id,
@@ -158,10 +102,70 @@
 +                   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);
+Index: LedgerSMB/GL.pm
+===================================================================
+--- LedgerSMB/GL.pm	(revision 5138)
++++ LedgerSMB/GL.pm	(working copy)
+@@ -97,6 +97,7 @@
+ 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;
+@@ -195,6 +196,10 @@
+     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} ) {
+ 
+@@ -244,6 +249,12 @@
+                 ($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;
+         }
+     }
+@@ -654,8 +665,18 @@
+         $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;
+             }
 Index: LedgerSMB/IR.pm
 ===================================================================
---- LedgerSMB/IR.pm	(revision 4653)
+--- LedgerSMB/IR.pm	(revision 5138)
 +++ LedgerSMB/IR.pm	(working copy)
 @@ -69,6 +69,7 @@
  sub post_invoice {
@@ -251,110 +255,11 @@
              $tth->execute( $ref->{id} );
              $ref->{taxaccounts} = "";
              my $taxrate = 0;
-Index: LedgerSMB/AA.pm
-===================================================================
---- LedgerSMB/AA.pm	(revision 4653)
-+++ LedgerSMB/AA.pm	(working copy)
-@@ -60,6 +60,7 @@
- 	use strict;
- 
-     my ( $self, $myconfig, $form ) = @_;
-+    $form->all_business_units;
- 
-     my $exchangerate;
-     my $batch_class;
-@@ -440,6 +441,12 @@
- 
-     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} ) {
-@@ -461,6 +468,14 @@
-            $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;";
-Index: LedgerSMB/OE.pm
-===================================================================
---- LedgerSMB/OE.pm	(revision 4653)
-+++ LedgerSMB/OE.pm	(working copy)
-@@ -307,6 +307,7 @@
- sub save {
-     my ( $self, $myconfig, $form ) = @_;
-   
-+    $form->all_business_units;
-     $form->db_prepare_vars(
-         "quonumber", "transdate",     "vendor_id",     "entity_id",
-         "reqdate",   "taxincluded",   "shippingpoint", "shipvia",
-@@ -315,6 +316,10 @@
-     );
-     # 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;
-@@ -570,6 +575,11 @@
-             $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;
-  
-@@ -814,6 +824,11 @@
-     # 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;
-@@ -928,6 +943,11 @@
-         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;
 Index: LedgerSMB/IS.pm
 ===================================================================
---- LedgerSMB/IS.pm	(revision 4653)
+--- LedgerSMB/IS.pm	(revision 5138)
 +++ LedgerSMB/IS.pm	(working copy)
-@@ -908,6 +908,7 @@
+@@ -910,6 +910,7 @@
  sub post_invoice {
  
      my ( $self, $myconfig, $form ) = @_;
@@ -362,7 +267,7 @@
      $form->{invnumber} = $form->update_defaults( $myconfig, "sinumber", $dbh )
        unless $form->{invnumber};
  
-@@ -1034,6 +1035,10 @@
+@@ -1036,6 +1037,10 @@
  
      my $taxformfound=IS->taxform_exist($form,$form->{"customer_id"});
  
@@ -373,7 +278,7 @@
  
      foreach $i ( 1 .. $form->{rowcount} ) {
          my $allocated = 0;
-@@ -1246,6 +1251,11 @@
+@@ -1248,6 +1253,11 @@
                  $invoice_id
              ) || $form->dberror($query);
  
@@ -385,7 +290,7 @@
  	   my $report=($taxformfound and $form->{"taxformcheck_$i"})?"true":"false";
  
  	   IS->update_invoice_tax_form($form,$dbh,$invoice_id,$report);
-@@ -1296,6 +1306,29 @@
+@@ -1298,6 +1308,29 @@
      $invnetamount = $amount;
  
      $amount = 0;
@@ -415,7 +320,7 @@
      for ( split / /, $form->{taxaccounts} ) {
          $amount += $form->{acc_trans}{ $form->{id} }{$_}{amount} =
            $form->round_amount( $form->{acc_trans}{ $form->{id} }{$_}{amount},
-@@ -1305,6 +1338,11 @@
+@@ -1307,6 +1340,11 @@
  
      $diff = 0;
  
@@ -427,7 +332,7 @@
      if ( $form->{taxincluded} ) {
          $diff = $form->round_amount( $grossamount - $invamount, 2 );
          $invamount += $diff;
-@@ -1337,6 +1375,11 @@
+@@ -1339,6 +1377,11 @@
            || $form->dberror($query);
          $diff   = 0;
          $fxdiff = 0;
@@ -439,7 +344,7 @@
      }
  
      $form->{receivables} = $invamount * -1;
-@@ -2159,6 +2202,12 @@
+@@ -2161,6 +2204,12 @@
            || $form->dberror($query);
  
          
@@ -452,7 +357,7 @@
          # foreign currency
          &exchangerate_defaults( $dbh, $form );
  
-@@ -2185,6 +2234,11 @@
+@@ -2187,6 +2236,11 @@
              $dec = length $dec;
              my $decimalplaces = ( $dec > 2 ) ? $dec : 2;
  
@@ -464,11 +369,180 @@
              $tth->execute( $ref->{id} );
  
              $ref->{taxaccounts} = "";
+Index: LedgerSMB/OE.pm
+===================================================================
+--- LedgerSMB/OE.pm	(revision 5138)
++++ LedgerSMB/OE.pm	(working copy)
+@@ -309,6 +309,7 @@
+ sub save {
+     my ( $self, $myconfig, $form ) = @_;
+   
++    $form->all_business_units;
+     $form->db_prepare_vars(
+         "quonumber", "transdate",     "vendor_id",     "entity_id",
+         "reqdate",   "taxincluded",   "shippingpoint", "shipvia",
+@@ -317,6 +318,10 @@
+     );
+     # 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;
+@@ -572,6 +577,11 @@
+             $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;
+  
+@@ -816,6 +826,11 @@
+     # 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;
+@@ -930,6 +945,11 @@
+         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;
+Index: UI/journal/journal_entry.html
+===================================================================
+--- UI/journal/journal_entry.html	(revision 5138)
++++ UI/journal/journal_entry.html	(working copy)
+@@ -134,6 +134,11 @@
+ 	  <?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>
+@@ -256,6 +261,24 @@
+ 			<?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>
+Index: bin/aa.pl
+===================================================================
+--- bin/aa.pl	(revision 5138)
++++ bin/aa.pl	(working copy)
+@@ -435,6 +435,10 @@
+ 
+     $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});
+@@ -744,7 +748,13 @@
+ 	  <th>| . $locale->text('Account') . qq|</th>
+ 	  <th>| . $locale->text('Description') . qq|</th>
+ 	  <th>| . $locale->text('Tax Form Applied') . qq|</th>
+-	  $project
++	  $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|
+ 	</tr>
+ |;
+ 
+@@ -792,7 +802,27 @@
+ 	  <td><select name="$form->{ARAP}_amount_$i">$selectamount</select></td>
+ 	  $description
+           $taxformcheck
+-	  $project
++	  $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|
+ 	</tr>
+ |;
+ 
+@@ -1492,6 +1522,9 @@
+         $selectname = qq|<input name=$form->{vc} size=35>|;
+     }
+ 
++    # Business Reporting Units
++    $form->all_business_units;
++
+     # departments
+     if ( @{ $form->{all_department} } ) {
+         $form->{selectdepartment} = "<option>\n";
 Index: bin/gl.pl
 ===================================================================
---- bin/gl.pl	(revision 4653)
+--- bin/gl.pl	(revision 5138)
 +++ bin/gl.pl	(working copy)
-@@ -177,6 +177,7 @@
+@@ -179,6 +179,7 @@
  sub display_form
  {
      #Add General Ledger Transaction
@@ -476,7 +550,7 @@
      $form->close_form;
      $form->open_form; 
      $form->{dbh}->commit;
-@@ -404,7 +405,12 @@
+@@ -406,7 +407,12 @@
  			      $temphash1->{debit}=$form->{"debit_$i"};
  			      $temphash1->{credit}=$form->{"credit_$i"};
  
@@ -489,7 +563,7 @@
  			      if ( $i < $form->{rowcount} )
  			      {					      
  						    $temphash1->{accno}=$form->{"accno_$i"};
-@@ -925,6 +931,8 @@
+@@ -927,6 +933,8 @@
  
      &create_links;
  
@@ -498,7 +572,7 @@
      $form->{locked} =
        ( $form->{revtrans} )
        ? '1'
-@@ -954,6 +962,10 @@
+@@ -956,6 +964,10 @@
              $form->{"credit_$i"} = $ref->{amount};
          }
  
@@ -511,9 +585,9 @@
     if ($form->{id}){
 Index: bin/io.pl
 ===================================================================
---- bin/io.pl	(revision 4653)
+--- bin/io.pl	(revision 5138)
 +++ bin/io.pl	(working copy)
-@@ -124,6 +124,15 @@
+@@ -126,6 +126,15 @@
  
  sub display_row {
      my $numrows = shift;
@@ -529,7 +603,7 @@
  
      @column_index = qw(runningnumber partnumber description qty);
  
-@@ -172,6 +181,14 @@
+@@ -174,6 +183,14 @@
  
      push @column_index, @{LedgerSMB::Sysconfig::io_lineitem_columns};
  
@@ -544,7 +618,7 @@
      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 ;
  
-@@ -334,6 +351,26 @@
+@@ -336,6 +353,26 @@
  
  	}
  
@@ -571,72 +645,3 @@
  
  $column_data{runningnumber} =
            qq|<td><input name="runningnumber_$i" size=3 value=$i></td>|;
-Index: bin/aa.pl
-===================================================================
---- bin/aa.pl	(revision 4653)
-+++ bin/aa.pl	(working copy)
-@@ -435,6 +435,10 @@
- 
-     $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});
-@@ -738,7 +742,13 @@
- 	  <th>| . $locale->text('Account') . qq|</th>
- 	  <th>| . $locale->text('Description') . qq|</th>
- 	  <th>| . $locale->text('Tax Form Applied') . qq|</th>
--	  $project
-+	  $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|
- 	</tr>
- |;
- 
-@@ -786,7 +796,27 @@
- 	  <td><select name="$form->{ARAP}_amount_$i">$selectamount</select></td>
- 	  $description
-           $taxformcheck
--	  $project
-+	  $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|
- 	</tr>
- |;
- 
-@@ -1486,6 +1516,9 @@
-         $selectname = qq|<input name=$form->{vc} size=35>|;
-     }
- 
-+    # Business Reporting Units
-+    $form->all_business_units;
-+
-     # departments
-     if ( @{ $form->{all_department} } ) {
-         $form->{selectdepartment} = "<option>\n";

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