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

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



Revision: 5253
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=5253&view=rev
Author:   einhverfr
Date:     2012-11-24 10:31:43 +0000 (Sat, 24 Nov 2012)
Log Message:
-----------
fixed ECA's not distinct on parts screen pricematrix or related search

Modified Paths:
--------------
    branches/1.3/Changelog
    branches/1.3/LedgerSMB/IC.pm
    branches/1.3/bin/ic.pl

Modified: branches/1.3/Changelog
===================================================================
--- branches/1.3/Changelog	2012-11-24 07:19:45 UTC (rev 5252)
+++ branches/1.3/Changelog	2012-11-24 10:31:43 UTC (rev 5253)
@@ -7,6 +7,8 @@
 * Fixed pricematrix rows not showing where pricegroups are used (Chris T)
 * Fixed missing grant in some cases on cr_coa_to_account (Chris T)
 * Fixed letterhead not showing up on emailed invoices (Chris T, h/t Kevin B)
+* Fixed blank screen on posting AR/IS/OE (Chris T)
+* Fixed ECA's not distinct on parts screen and search (Chris T, 3550075)
 
 Chris T is Chris Travers
 Kevin B is Kevin Bailey

Modified: branches/1.3/LedgerSMB/IC.pm
===================================================================
--- branches/1.3/LedgerSMB/IC.pm	2012-11-24 07:19:45 UTC (rev 5252)
+++ branches/1.3/LedgerSMB/IC.pm	2012-11-24 10:31:43 UTC (rev 5253)
@@ -202,7 +202,7 @@
         $query = qq|
 			  SELECT v.id, e.name, pv.partnumber,
 			         pv.lastcost, pv.leadtime, 
-			         pv.curr AS vendorcurr
+			         pv.curr AS vendorcurr, v.meta_number
 			    FROM partsvendor pv
 			    JOIN entity_credit_account v 
                                  ON (v.id = pv.credit_id)
@@ -226,7 +226,7 @@
 			   SELECT pc.pricebreak, pc.sellprice AS customerprice,
 			          pc.curr AS customercurr, pc.validfrom, 
 			          pc.validto, e.name, c.id AS cid, 
-			          g.pricegroup, g.id AS gid
+			          g.pricegroup, g.id AS gid, c.meta_number
 			     FROM partscustomer pc
 			LEFT JOIN entity_credit_account c 
                                   ON (c.id = pc.credit_id)

Modified: branches/1.3/bin/ic.pl
===================================================================
--- branches/1.3/bin/ic.pl	2012-11-24 07:19:45 UTC (rev 5252)
+++ branches/1.3/bin/ic.pl	2012-11-24 10:31:43 UTC (rev 5253)
@@ -289,6 +289,8 @@
     $i = 1;
     foreach $ref ( @{ $form->{vendormatrix} } ) {
         $form->{"vendor_$i"} = qq|$ref->{name}--$ref->{id}|;
+        $form->{"vendor_mn_$i"} = $ref->{meta_number};
+        
 
         for (qw(partnumber lastcost leadtime vendorcurr)) {
             $form->{"${_}_$i"} = $ref->{$_};
@@ -323,6 +325,7 @@
     foreach $ref ( @{ $form->{customermatrix} } ) {
 
         $form->{"customer_$i"} = "$ref->{name}--$ref->{cid}" if $ref->{cid};
+        $form->{"customer_mn_$i"} = $ref->{meta_number};
         $form->{"pricegroup_$i"} = "$ref->{pricegroup}--$ref->{gid}"
           if $ref->{gid};
 
@@ -2812,6 +2815,7 @@
       <table width=100%>
 	<tr>
 	  <th class="listheading">| . $locale->text('Vendor') . qq|</th>
+	  <th class="listheading">| . $locale->text('Account Number') . qq|</th>
 	  <th class="listheading">| . $locale->text('Vendor Reference Number') . qq|</th>
 	  <th class="listheading">| . $locale->text('Cost') . qq|</th>
 	  $currency
@@ -2833,6 +2837,7 @@
 
             $vendor = qq|
           <td><input name="vendor_$i" size=35 value="$form->{"vendor_$i"}"></td>
+          <td><input name="vendor_mn_$i" size=35 value="$form->{"vendor_mn_$i"}"></td>
 |;
 
             if ( $form->{selectvendor} ) {
@@ -2849,6 +2854,9 @@
           <td>$vendor
 	  <input type=hidden name="vendor_$i" value="$form->{"vendor_$i"}">
 	  </td>
+          <td>$form->{"vendor_mn_$i"}
+	  <input type=hidden name="vendor_$i" value="$form->{"vendor_mn_$i"}">
+	  </td>
 |;
         }
 
@@ -2908,6 +2916,7 @@
       <table width=100%>
 	<tr>
 	  <th class="listheading">| . $locale->text('Customer') . qq|</th>
+	  <th class="listheading">| . $locale->text('Account') . qq|</th>
 	  $pricegroup
 	  <th class="listheading">| . $locale->text('Break') . qq|</th>
 	  <th class="listheading">| . $locale->text('Sell Price') . qq|</th>
@@ -2930,6 +2939,9 @@
         if ( $i == $numrows ) {
             $customer = qq|
           <td><input name="customer_$i" size=35 value="$form->{"customer_$i"}"></td>
+          <td>
+         <input name="customer_mn_$i" size=35 value="$form->{"customer_mn_$i"}">
+         </td>
 	  |;
 
             if ( $form->{selectcustomer} ) {
@@ -2950,6 +2962,8 @@
             $customer = qq|
           <td>$customer</td>
 	  <input type=hidden name="customer_$i" value="$form->{"customer_$i"}">
+          <td>$form->{"customer_mn_$i"}</td>
+	  <input type=hidden name="customer_$i" value="$form->{"customer_mn_$i"}">
 	  |;
 
             if ( $form->{selectpricegroup} ) {
@@ -3328,13 +3342,15 @@
     }
 
     $i = $form->{vendor_rows};
+    $form->{vendornumber} = $form->{"vendor_mn_$i"};
 
     if ( !$form->{selectvendor} ) {
 
-        if ( $form->{"vendor_$i"} && !$form->{"vendor_id_$i"} ) {
+        if ( ($form->{"vendor_$i"} || $form->{vendornumber}) 
+              && !$form->{"vendor_id_$i"} ) {
             ( $form->{vendor} ) = split /--/, $form->{"vendor_$i"};
-            if ( ( $j = $form->get_name( \%myconfig, vendor ) ) > 1 ) {
-                &select_name( vendor, $i );
+            if ( ( $j = $form->get_name( \%myconfig, "vendor" ) ) > 1 ) {
+                &select_name( "vendor", $i );
                 $form->finalize_request();
             }
 
@@ -3405,17 +3421,17 @@
     }
 
     $i = $form->{customer_rows};
+    $form->{customernumber} = $form->{"customer_mn_$i"};
 
     if ( !$form->{selectcustomer} ) {
 
         if ( $form->{"customer_$i"} && !$form->{"customer_id_$i"} ) {
             ( $form->{customer} ) = split /--/, $form->{"customer_$i"};
 
-            if ( ( $j = $form->get_name( \%myconfig, customer ) ) > 1 ) {
-                &select_name( customer, $i );
+            if ( ( $j = $form->get_name( \%myconfig, 'customer' ) ) > 1 ) {
+                &select_name( 'customer', $i );
                 $form->finalize_request();
             }
-
             if ( $j == 1 ) {
 
                 # we got one name
@@ -3453,12 +3469,14 @@
 sub select_name {
     my ( $table, $vr ) = @_;
 
-    @column_index = qw(ndx name address);
+    @column_index = qw(ndx name meta_number address);
 
     $label = ucfirst $table;
     $column_data{ndx} = qq|<th>&nbsp;</th>|;
     $column_data{name} =
       qq|<th class=listheading>| . $locale->text($label) . qq|</th>|;
+    $column_data{meta_number} =
+      qq|<th class=listheading>| . $locale->text('Account Number') . qq|</th>|;
     $column_data{address} =
         qq|<th class=listheading colspan=5>|
       . $locale->text('Address')
@@ -3492,7 +3510,7 @@
 	</tr>
 |;
 
-    @column_index = qw(ndx name address city state zipcode country);
+    @column_index = qw(ndx name meta_number address city state zipcode country);
 
     my $i = 0;
     foreach $ref ( @{ $form->{name_list} } ) {
@@ -3504,7 +3522,9 @@
 qq|<td><input name=ndx class=radio type=radio value=$i $checked></td>|;
         $column_data{name} =
 qq|<td><input name="new_name_$i" type=hidden value="$ref->{name}">$ref->{name}</td>|;
-        $column_data{address} = qq|<td>$ref->{address1} $ref->{address2}|;
+        $column_data{meta_number} =
+qq|<td>$ref->{meta_number}</td>|;
+        $column_data{address} = qq|<td>$ref->{address1} $ref->{address2}&nbsp;</td>|;
         for (qw(city state zipcode country)) {
             $column_data{$_} = qq|<td>$ref->{$_}&nbsp;</td>|;
         }

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