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

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



Revision: 4362
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=4362&view=rev
Author:   einhverfr
Date:     2012-02-25 07:24:31 +0000 (Sat, 25 Feb 2012)
Log Message:
-----------
Clarified vendor part number field in parts screen (Frans S)
Cleaned up end of lines
Partial fix on account recon box not being set when account is set there

Modified Paths:
--------------
    branches/1.3/Changelog
    branches/1.3/LedgerSMB/DBObject/Account.pm
    branches/1.3/bin/ic.pl
    branches/1.3/sql/modules/Account.sql

Modified: branches/1.3/Changelog
===================================================================
--- branches/1.3/Changelog	2012-02-24 15:22:22 UTC (rev 4361)
+++ branches/1.3/Changelog	2012-02-25 07:24:31 UTC (rev 4362)
@@ -16,6 +16,7 @@
 * Corrected permissions on fixed asset depreciation workflow/menu (Chris T)
 * Corrected Perl issues on _db_init when custom fields defined, 5.12 (Chris T)
 * Adding missing permissions for editing parts (Chris T)
+* Clarified string for vendor's part number in parts screen (Frans S)
 
 Hilton D is Hilton Day
 

Modified: branches/1.3/LedgerSMB/DBObject/Account.pm
===================================================================
--- branches/1.3/LedgerSMB/DBObject/Account.pm	2012-02-24 15:22:22 UTC (rev 4361)
+++ branches/1.3/LedgerSMB/DBObject/Account.pm	2012-02-25 07:24:31 UTC (rev 4362)
@@ -119,6 +119,19 @@
     $self->{has_transactions} = $ref->{'account_has_transactions'};
 } 
 
+=item is_recon
+
+Returns true if is set up for reconciliation.  False otherwise.
+
+=cut
+
+sub is_recon {
+    my $self = shift @_;
+    my ($ref) = $self->exec_method(funcname => 'account__is_recon');
+    $self->{account__is_recon} = $ref->{'account__is_recon'};
+    return $self->{account__is_recon};
+}
+
 =item delete()
 
 Attemps to delete the account.  This will NOT succeed if the account is 

Modified: branches/1.3/bin/ic.pl
===================================================================
--- branches/1.3/bin/ic.pl	2012-02-24 15:22:22 UTC (rev 4361)
+++ branches/1.3/bin/ic.pl	2012-02-25 07:24:31 UTC (rev 4362)
@@ -2808,7 +2808,7 @@
       <table width=100%>
 	<tr>
 	  <th class="listheading">| . $locale->text('Vendor') . qq|</th>
-	  <th class="listheading">| . $locale->text('Number') . qq|</th>
+	  <th class="listheading">| . $locale->text('Vendor Reference Number') . qq|</th>
 	  <th class="listheading">| . $locale->text('Cost') . qq|</th>
 	  $currency
 	  <th class="listheading">| . $locale->text('Leadtime') . qq|</th>
@@ -3931,21 +3931,21 @@
           . qq|</td>|;
         $column_data{rop} =
             qq|<td align=right>|
-          . $form->format_amount( \%myconfig, $ref->{rop}, '', "&nbsp;" )
-          . qq|</td>|;
-        $column_data{stock} =
-            qq|<td width=10%><input name="qty_$i" size="10" value="|
-          . $form->format_amount( \%myconfig, $ref->{stock} )
-          . qq|"></td>
-    <input type=hidden name="stock_$i" value="$ref->{stock}">|;
-
-        $j++;
-        $j %= 2;
-        print
-qq|<tr class=listrow$j><input name="id_$i" type=hidden value="$ref->{id}">\n|;
-
-        for (@column_index) { print "\n$column_data{$_}" }
-
+          . $form->format_amount( \%myconfig, $ref->{rop}, '', "&nbsp;" )
+          . qq|</td>|;
+        $column_data{stock} =
+            qq|<td width=10%><input name="qty_$i" size="10" value="|
+          . $form->format_amount( \%myconfig, $ref->{stock} )
+          . qq|"></td>
+    <input type=hidden name="stock_$i" value="$ref->{stock}">|;
+
+        $j++;
+        $j %= 2;
+        print
+qq|<tr class=listrow$j><input name="id_$i" type=hidden value="$ref->{id}">\n|;
+
+        for (@column_index) { print "\n$column_data{$_}" }
+
         print qq|
 	</tr>
 |;

Modified: branches/1.3/sql/modules/Account.sql
===================================================================
--- branches/1.3/sql/modules/Account.sql	2012-02-24 15:22:22 UTC (rev 4361)
+++ branches/1.3/sql/modules/Account.sql	2012-02-25 07:24:31 UTC (rev 4362)
@@ -10,6 +10,17 @@
 $$ Returns the account where the accno field matches (excatly) the 
 in_accno provided.$$;
 
+CREATE OR REPLACE FUNCTION account__is_recon(in_accno text) RETURNS BOOL AS
+$$ SELECT count(*) > 0 
+     FROM cr_coa_to_account c2a
+     JOIN account ON account.id = c2a.chart_id 
+    WHERE accno = $1; $$
+LANGUAGE SQL;
+
+COMMENT ON FUNCTION account__is_recon(in_accno text) IS
+$$ Returns true if account is set up for reconciliation, false otherwise.
+Note that returns false on invalid account number too$$;
+
 CREATE OR REPLACE FUNCTION account__get_taxes()
 RETURNS setof account AS
 $$

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