Skip to content

multi name templates #215

@tronx2100

Description

@tronx2100

to add multiname templates we can easy do it in pdf_rfltr_default.modules.php starting on line 148

            // add this
            $title = "";  
            $rowid = $object->array_options['options_rfltr_model_id'];
            if ($rowid > 0) {
                $sql = "SELECT title FROM " . MAIN_DB_PREFIX . "referenceletters WHERE rowid = " . $this->db->escape($rowid) . ";";
                $this->db->begin();
                dol_syslog(get_class($this) . "::" . __METHOD__, LOG_DEBUG);
                $resql = $this->db->query($sql);
                if ($resql) {
                    if ($this->db->num_rows($resql) > 0) {
                        $obj = $this->db->fetch_object($resql);
                        $title = '_'.$obj->title;
                    }
                }
            }
            $file_dest = $dir_dest . '/' . $objectref .$title. '.pdf';   // change this

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions