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

SF.net SVN: ledger-smb:[2811] addons/1.3/assets/trunk/scripts/asset.pl



Revision: 2811
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=2811&view=rev
Author:   einhverfr
Date:     2009-12-09 17:05:21 +0000 (Wed, 09 Dec 2009)

Log Message:
-----------
Correcting editing of asset categories

Modified Paths:
--------------
    addons/1.3/assets/trunk/scripts/asset.pl

Modified: addons/1.3/assets/trunk/scripts/asset.pl
===================================================================
--- addons/1.3/assets/trunk/scripts/asset.pl	2009-12-09 16:51:18 UTC (rev 2810)
+++ addons/1.3/assets/trunk/scripts/asset.pl	2009-12-09 17:05:21 UTC (rev 2811)
@@ -50,6 +50,13 @@
     $template->render($request);
 }
 
+sub edit_asset_class {
+   my ($request) = @_;
+   my $ac = LedgerSMB::DBObject::Asset_Class->new(base => $request);
+   $ac->get_asset_class;
+   asset_category_screen($ac);
+}
+
 sub asset_category_results {
     my ($request) = @_;
     my $ac = LedgerSMB::DBObject::Asset_Class->new(base => $request);
@@ -86,12 +93,12 @@
         print STDERR "$aclass\n";
         my $a_acc = $a_accs->{$aclass->{asset_account_id}};
         my $d_acc = $d_accs->{$aclass->{dep_account_id}};
-        my $href = "assets.pl?edit_asset_class";
+        my $href = "asset.pl?action=edit_asset_class";
         my $row = {
              id            => $aclass->{id},
              label         => {
                                text => $aclass->{label},
-                               href => "$href&class_id=$ac->{id}",
+                               href => "$href&id=$aclass->{id}",
                               },
              dep_method    => $aclass->{dep_method},
              life_unit     => $aclass->{life_unit}, 


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