소스 검색

the end accounting period should not be the fiscal month start but the month just before it

Maximilien Rozniecki 2 년 전
부모
커밋
507a1d3b16
1개의 변경된 파일3개의 추가작업 그리고 3개의 파일을 삭제
  1. 3 3
      htdocs/accountancy/tpl/export_journal.tpl.php

+ 3 - 3
htdocs/accountancy/tpl/export_journal.tpl.php

@@ -55,10 +55,10 @@ if (($accountancyexport->getFormatCode($formatexportset) == 'fec' || $accountanc
 	$tmparray = dol_getdate($datetouseforfilename);
 	$fiscalmonth = empty($conf->global->SOCIETE_FISCAL_MONTH_START) ? 1 : $conf->global->SOCIETE_FISCAL_MONTH_START;
 	// Define end of month to use
-	if ($tmparray['mon'] <= $fiscalmonth) {
-		$tmparray['mon'] = $fiscalmonth;
+	if ($tmparray['mon'] < $fiscalmonth || $fiscalmonth == 1) {
+		$tmparray['mon'] = $fiscalmonth == 1 ? 12 : $fiscalmonth - 1;
 	} else {
-		$tmparray['mon'] = $fiscalmonth;
+		$tmparray['mon'] = $fiscalmonth - 1;
 		$tmparray['year']++;
 	}