Improve code

This commit is contained in:
sparkyx 2025-10-24 11:53:22 +02:00
parent 69b807e2eb
commit 23d77ad996
4 changed files with 8 additions and 9 deletions

View file

@ -1979,7 +1979,7 @@ class Acc_Ledger extends jrn_def_sql
* @param $internal is the internal code
* @param $p_array is normally the $_POST
@see Acc_Document::create_document
* @return a string
* @return html string
*/
function create_document($internal, $p_array)
{

View file

@ -151,15 +151,15 @@ class Document
throw new Exception ("DC121 cannot create $dirname directory",5000);
}
/**
* md_id == -2 is the standard PDF invoice, you don't parse or compute
* md_id == -2 : INVOICE_STD is the standard PDF invoice, you don't parse or compute
* it
*/
if ( $this->md_id == -2)
if ( $this->md_id == INVOICE_STD)
{
$file_to_parse=str_replace(
array('/', '*', '<', '>', ';', ',', '\\', '.', ':', '(', ')', ' ', '[', ']')
, "-"
, "inv-std-".$p_array['e_pj'].".pdf");
, "inv-std-".$p_array['e_pj']).".pdf";
$this->d_number=$this->db->get_next_seq("seq_doc_type_stdinv");
$this->d_filename=$file_to_parse;