Code rewrite : save Acc_Document without passing by Document

This commit is contained in:
sparkyx 2025-10-19 12:15:49 +02:00
parent 0c6fd54e63
commit 8ca0f9d568
2 changed files with 29 additions and 21 deletions

View file

@ -389,8 +389,7 @@ class Document
* \param $p_file is the generated file
* \return 0 if no error otherwise 1
*/
function saveGenerated($p_file)
protected function saveGenerated($p_file)
{
// We save the generated file
$doc=new Document($this->db);
@ -1819,21 +1818,6 @@ class Document
$this->db->lo_unlink($d_lob);
}
/*!
* \brief Move a document from the table document into the concerned operation
* the document is not copied : it is only a link
* \param $p_internal internal code
*/
function moveDocumentACC($p_internal)
{
$sql="update jrn set jr_pj=$1,jr_pj_name=$2,jr_pj_type=$3 where jr_internal=$4";
$this->db->exec_sql($sql, array($this->d_lob, $this->d_filename, $this->d_mimetype, $p_internal));
// clean the table document
$sql='delete from document where d_id=$1';
$this->db->exec_sql($sql,[$this->d_id]);
}
/**
* @brief replace a special tag *TAGxxxx with the value from fiche_detail, the xxxx
* is the ad_value