Skip to content

Commit

Permalink
FIX ASSET: annual depreciation starting year (Again ;-)) Dolibarr#26084
Browse files Browse the repository at this point in the history
FIX Update asset.class.php
This is an old issue that has been already fixed by 
Dolibarr#26084

I tested it several times and it works.
  • Loading branch information
josett225 authored Jun 14, 2024
1 parent 5989ee9 commit 80f8e11
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion htdocs/asset/class/asset.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -863,7 +863,7 @@ public function calculationDepreciation()
// Get fiscal period
require_once DOL_DOCUMENT_ROOT . '/core/lib/date.lib.php';
require_once DOL_DOCUMENT_ROOT . '/core/lib/accounting.lib.php';
$dates = getDefaultDatesForTransfer();
$dates = getCurrentPeriodofFiscalYear($this->db, $conf, $this->date_start > $this->date_acquisition ? $this->date_start : $this->date_acquisition);
$init_fiscal_period_start = $dates['date_start'];
$init_fiscal_period_end = $dates['date_end'];
if (empty($init_fiscal_period_start) || empty($init_fiscal_period_end)) {
Expand Down

0 comments on commit 80f8e11

Please sign in to comment.