X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=fixed_assets%2Fincludes%2Ffixed_assets_db.inc;h=3881adadab8079f97880a4b0e670c0c4ec4aff15;hb=c6a369c46e88601885080d716a43a9274a2f1275;hp=11c9c027d50662f5d85d8fbf5c87174f9ca21750;hpb=3539962a4e524de683d8c5e851c482ad99a97267;p=fa-stable.git diff --git a/fixed_assets/includes/fixed_assets_db.inc b/fixed_assets/includes/fixed_assets_db.inc index 11c9c027..3881adad 100644 --- a/fixed_assets/includes/fixed_assets_db.inc +++ b/fixed_assets/includes/fixed_assets_db.inc @@ -32,7 +32,7 @@ function process_fixed_asset_depreciation($stock_id, $gl_rows, $refline, $memo_) $value_of_change = 0; foreach ($gl_rows as $row) { - $value_of_change += round($row['value'], 2); + $value_of_change += round2($row['value'], user_price_dec()); $cart->add_gl_item($stock_gl_code["adjustment_account"], $stock_gl_code["dimension_id"], $stock_gl_code["dimension2_id"], -$row['value'], @@ -57,8 +57,6 @@ function process_fixed_asset_depreciation($stock_id, $gl_rows, $refline, $memo_) WHERE stock_id=".db_escape($stock_id); db_query($sql,"The depreciation start date could not be updated"); - $update_no = -1; - add_audit_trail(ST_JOURNAL, $update_no, $date_); commit_transaction(); return $trans_no;