Dolibarr ERP & CRM » Tasks and Feature requests » task #955 Add project reference in PDF templatesDernières modifications
Répondre
État Détails |
Submitted on: | 22/06/2013 23:55 | | Submitted by: | Marcos García (marcosgdf) |
Last Modified On: | 22/06/2013 23:55 | |
Summary: | Add project reference in PDF templates |
Description: | When an invoice, proposal, etc.. is linked to a project, show it in the template generated |
Priority: | 3 | | Open to Any Developer: | Yes |
Subproject: | Aucun | | Assigned to (multiple): | Aucun |
Planned for version: | | | Etat |
Start Date: | - | | End Date: | - |
Completion (0-100%): | 0 | | Status: | Open |
Commentaires- Thierry Kauffmann 26/12/2013 18:08
- // Show linked project
$sql = "SELECT p.title";
$sql.= " FROM ".MAIN_DB_PREFIX."facture as f";
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."projet as p ON f.fk_projet = p.rowid";
$sql.= " WHERE f.rowid = ".$object->id;
$resql=$this->db->query($sql);
if ($resql)
{
$row = $this->db->fetch_object($resql);
$pdf->SetFont('','', $default_font_size - 1);
$pdf->writeHTMLCell(190, 3, $this->posxdesc-1, $tab_top, "Projet : ".$row->title, 0, 1);
$tab_top = $tab_top+6;
} |
|
$sql = "SELECT p.title";
$sql.= " FROM ".MAIN_DB_PREFIX."facture as f";
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."projet as p ON f.fk_projet = p.rowid";
$sql.= " WHERE f.rowid = ".$object->id;
$resql=$this->db->query($sql);
if ($resql)
{
$row = $this->db->fetch_object($resql);
$pdf->SetFont('','', $default_font_size - 1);
$pdf->writeHTMLCell(190, 3, $this->posxdesc-1, $tab_top, "Projet : ".$row->title, 0, 1);
$tab_top = $tab_top+6;
}