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

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



Revision: 3078
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=3078&view=rev
Author:   einhverfr
Date:     2010-10-01 18:44:34 +0000 (Fri, 01 Oct 2010)

Log Message:
-----------
fixes for saving fixed assets and transaction import addons

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	2010-10-01 18:40:10 UTC (rev 3077)
+++ addons/1.3/assets/trunk/scripts/asset.pl	2010-10-01 18:44:34 UTC (rev 3078)
@@ -267,6 +267,11 @@
 sub asset_save {
     my ($request) = @_;
     my $asset = LedgerSMB::DBObject::Asset->new(base => $request);
+    for my $number (qw(salvage_value purchase_value usable_life)){
+        $asset->{"$number"} = $asset->parse_amount(
+                   user => $asset->{_user}, amount => $asset->{"$number"}
+        );
+    }
     $asset->save;
     $asset->{note} = 'Vendor:' . $asset->{meta_number} . "\n" 
                    . 'Invoice:'.$asset->{invnumber};


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