-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into loan_schedule
- Loading branch information
Showing
579 changed files
with
3,750 additions
and
3,036 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,7 @@ | |
/* Copyright (C) 2017-2022 OpenDSI <[email protected]> | ||
* Copyright (C) 2024 MDW <[email protected]> | ||
* Copyright (C) 2024 Frédéric France <[email protected]> | ||
* Copyright (C) 2024 Alexandre Janniaux <[email protected]> | ||
* | ||
* This program is free software; you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
|
@@ -103,6 +104,50 @@ public function __construct($db) | |
$this->ismultientitymanaged = 0; | ||
} | ||
|
||
/** | ||
* Create a new Accounting Journal. | ||
* | ||
* @param User $user the user that created the journal, currently unused | ||
* @return int Return integer <0 on error, or the ID of the created object | ||
*/ | ||
public function create($user) | ||
{ | ||
$valid_nature = array(1, 2, 3, 4, 5, 8, 9); | ||
if (!in_array((int) $this->nature, $valid_nature)) { | ||
$this->error = get_class($this)."::Create Error invalid field nature '" . strval($this->nature) . "'"; | ||
dol_syslog($this->error, LOG_ERR); | ||
return -1; | ||
} | ||
|
||
$sql = "INSERT INTO ".MAIN_DB_PREFIX."accounting_journal"; | ||
$sql .= " (entity, code, label, nature, active)"; | ||
$sql .= " VALUES (" | ||
. ((int) $this->entity) .",'" | ||
. $this->db->escape($this->code) ."','" | ||
. $this->db->escape($this->label) ."'," | ||
. ((int) $this->nature) ."," | ||
. ((int) $this->active) .")"; | ||
|
||
dol_syslog(get_class($this)."::create", LOG_DEBUG); | ||
$resql = $this->db->query($sql); | ||
if (!$resql) { | ||
$this->error = get_class($this)."::Create Error: " . $this->db->lasterror(); | ||
dol_syslog($this->error, LOG_ERR); | ||
return -1; | ||
} | ||
|
||
$id = $this->db->last_insert_id(MAIN_DB_PREFIX."accounting_journal"); | ||
if ($id <= 0) { | ||
$this->error = get_class($this)."::Create Error " . $id . ": " . $this->db->lasterror(); | ||
dol_syslog($this->error, LOG_ERR); | ||
return -2; | ||
} | ||
|
||
$this->id = $id; | ||
$this->rowid = $id; | ||
return $id; | ||
} | ||
|
||
/** | ||
* Load an object from database | ||
* | ||
|
@@ -189,9 +234,9 @@ public function getNomUrl($withpicto = 0, $withlabel = 0, $nourl = 0, $moretitle | |
if (empty($notooltip)) { | ||
if (getDolGlobalString('MAIN_OPTIMIZEFORTEXTBROWSER')) { | ||
$label = $langs->trans("ShowAccountingJournal"); | ||
$linkclose .= ' alt="'.dol_escape_htmltag($label, 1).'"'; | ||
$linkclose .= ' alt="'.dolPrintHTMLForAttribute($label).'"'; | ||
} | ||
$linkclose .= ' title="'.dol_escape_htmltag($label, 1).'"'; | ||
$linkclose .= ' title="'.dolPrintHTMLForAttribute($label).'"'; | ||
$linkclose .= ' class="classfortooltip"'; | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
<?php | ||
/* Copyright (C) 2019-2023 Open-DSI <[email protected]> | ||
* Copyright (C) 2024 Frédéric France <[email protected]> | ||
/* Copyright (C) 2019-2023 Open-DSI <[email protected]> | ||
* Copyright (C) 2024 Frédéric France <[email protected]> | ||
* Copyright (C) 2025 Alexandre Spangaro <[email protected]> | ||
* | ||
* This program is free software; you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
|
@@ -39,7 +40,7 @@ | |
*/ | ||
|
||
// Load translation files required by the page | ||
$langs->loadLangs(array("compta", "bills", "other", "accountancy")); | ||
$langs->loadLangs(array("accountancy", "bills", "compta", "exports", "other")); | ||
|
||
$action = GETPOST('action', 'aZ09'); | ||
$confirm = GETPOST('confirm', 'aZ09'); | ||
|
@@ -410,7 +411,7 @@ | |
// Step 2 | ||
$head = array(); | ||
$head[0][0] = DOL_URL_ROOT . '/accountancy/closure/index.php?fiscal_period_id=' . $current_fiscal_period['id']; | ||
$head[0][1] = $langs->trans("Step").(getDolGlobalString("ACCOUNTANCY_DISABLE_CLOSURE_LINE_BY_LINE") ? '1' : '2').' - '.$langs->trans("AccountancyClosureStep2"); | ||
$head[0][1] = $langs->trans("Step"). ' ' . (getDolGlobalString("ACCOUNTANCY_DISABLE_CLOSURE_LINE_BY_LINE") ? '1' : '2').' - '.$langs->trans("AccountancyClosureStep2"); | ||
$head[0][2] = 'step2'; | ||
print dol_get_fiche_head($head, 'step2', '', -1, ''); | ||
|
||
|
@@ -433,7 +434,7 @@ | |
// Step 3 | ||
$head = array(); | ||
$head[0][0] = DOL_URL_ROOT . '/accountancy/closure/index.php?fiscal_period_id=' . $current_fiscal_period['id']; | ||
$head[0][1] = $langs->trans("Step").(getDolGlobalString("ACCOUNTANCY_DISABLE_CLOSURE_LINE_BY_LINE") ? '2' : '3').' - '.$langs->trans("AccountancyClosureStep3"); | ||
$head[0][1] = $langs->trans("Step"). ' ' . (getDolGlobalString("ACCOUNTANCY_DISABLE_CLOSURE_LINE_BY_LINE") ? '2' : '3').' - '.$langs->trans("AccountancyClosureStep3"); | ||
$head[0][2] = 'step3'; | ||
print dol_get_fiche_head($head, 'step3', '', -1, ''); | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.