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

SF.net SVN: ledger-smb:[5376] trunk/LedgerSMB/Report/Invoices



Revision: 5376
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=5376&view=rev
Author:   einhverfr
Date:     2012-12-18 06:29:53 +0000 (Tue, 18 Dec 2012)
Log Message:
-----------
Hyperlinks fixed in AR/AP transaction search and outstanding reports

Modified Paths:
--------------
    trunk/LedgerSMB/Report/Invoices/Outstanding.pm
    trunk/LedgerSMB/Report/Invoices/Transactions.pm

Modified: trunk/LedgerSMB/Report/Invoices/Outstanding.pm
===================================================================
--- trunk/LedgerSMB/Report/Invoices/Outstanding.pm	2012-12-18 06:00:22 UTC (rev 5375)
+++ trunk/LedgerSMB/Report/Invoices/Outstanding.pm	2012-12-18 06:29:53 UTC (rev 5376)
@@ -184,7 +184,7 @@
            name => LedgerSMB::Report::text('ID'),
            type => 'text', 
          pwidth => 2, },
-        {col_id => 'invoice',
+        {col_id => 'invnumber',
            name => $inv_label,
            type => $inv_type, 
          pwidth => 10, },
@@ -306,7 +306,15 @@
        $procname .= '_details';
     }
     my @rows = $self->exec_method({funcname => $procname});
-    # TODO, add hyperlinks for rows
+    for my $r(@rows){
+        my $script;
+        if ($self->entity_class == 2) {
+             $script = ($r->{invoice}) ? 'is.pl' : 'aa.pl';
+        } else {
+             $script = ($r->{invoice}) ? 'ir.pl' : 'aa.pl';
+        }
+        $r->{invnumber_href_suffix} = "$script?action=edit&id=$r->{id}";
+    }
     $self->rows(..hidden..);
 }
 

Modified: trunk/LedgerSMB/Report/Invoices/Transactions.pm
===================================================================
--- trunk/LedgerSMB/Report/Invoices/Transactions.pm	2012-12-18 06:00:22 UTC (rev 5375)
+++ trunk/LedgerSMB/Report/Invoices/Transactions.pm	2012-12-18 06:29:53 UTC (rev 5376)
@@ -311,7 +311,15 @@
 sub run_report {
     my $self = shift;
     my @rows = $self->exec_method({funcname => 'report__aa_transactions'});
-    # TODO add hyperlinks
+    for my $r(@rows){
+        my $script;
+        if ($self->entity_class == 2) {
+             $script = ($r->{invoice}) ? 'is.pl' : 'aa.pl';
+        } else {
+             $script = ($r->{invoice}) ? 'ir.pl' : 'aa.pl';
+        }
+        $r->{invnumber_href_suffix} = "$script?action=edit&id=$r->{id}";
+    }
     $self->rows(..hidden..);
 }
 

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