X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=fixed_assets%2Finquiry%2Fstock_inquiry.php;h=93c79446b88b972e7ebe4e18918a7339eb900530;hb=7622ac6f58b8173c16e238be48d3bb43296b438a;hp=e60d448fb36d21330731fd6480df9d48eb3f1219;hpb=9661cffeeab646dfbd51cf93eb042bb43e9bd061;p=fa-stable.git diff --git a/fixed_assets/inquiry/stock_inquiry.php b/fixed_assets/inquiry/stock_inquiry.php index e60d448f..93c79446 100644 --- a/fixed_assets/inquiry/stock_inquiry.php +++ b/fixed_assets/inquiry/stock_inquiry.php @@ -73,11 +73,14 @@ function depr_method_title($row) { return $depreciation_methods[$row['depreciation_method']]; } -function depr_rate_title($row) { - if ($row['depreciation_method'] == 'S') - return $row['depreciation_rate'].' years'; - else - return $row['depreciation_rate'].'%'; +function depr_par($row) { + if ($row['depreciation_method'] == 'D') + return $row['depreciation_rate']*$row['depreciation_factor'].'%'; + elseif ($row['depreciation_method'] == 'N') + return $row['depreciation_rate'].' '._('years' + ); + else + return $row['depreciation_rate'].'%'; } function status_title($row) { @@ -139,7 +142,7 @@ $cols = array( _("Class"), _("UOM") => array('align' => 'center'), _("Description"), - _("Rate or Lifecycle") => array('fun' => 'depr_rate_title'), + _("Rate or Lifecycle") => array('fun' => 'depr_par'), _("Method") => array('fun' => 'depr_method_title'), _("Status") => array('fun' => 'status_title'), _("Purchased") => array('fun' => 'purchase_link'),