New: possibility to view/edit notes in invoice card

This commit is contained in:
Regis Houssin 2012-03-16 11:12:59 +01:00
parent 0df083a8d8
commit 1622a86d71
3 changed files with 20 additions and 10 deletions

View File

@ -2737,7 +2737,11 @@ else
}
print '</table><br>';
if (! empty($conf->global->MAIN_DISABLE_NOTES_TAB))
{
include(DOL_DOCUMENT_ROOT.'/core/tpl/notes.tpl.php');
}
/*
* Lines

View File

@ -72,7 +72,8 @@ class Facture extends CommonObject
var $total_ht=0;
var $total_tva=0;
var $total_ttc=0;
var $note;
var $note; // deprecated
var $note_private;
var $note_public;
//! 0=draft,
//! 1=validated (need to be paid),
@ -763,7 +764,7 @@ class Facture extends CommonObject
$sql.= ', f.datec as datec';
$sql.= ', f.date_valid as datev';
$sql.= ', f.tms as datem';
$sql.= ', f.note, f.note_public, f.fk_statut, f.paye, f.close_code, f.close_note, f.fk_user_author, f.fk_user_valid, f.model_pdf';
$sql.= ', f.note as note_private, f.note_public, f.fk_statut, f.paye, f.close_code, f.close_note, f.fk_user_author, f.fk_user_valid, f.model_pdf';
$sql.= ', f.fk_facture_source';
$sql.= ', f.fk_mode_reglement, f.fk_cond_reglement, f.fk_projet';
$sql.= ', p.code as mode_reglement_code, p.libelle as mode_reglement_libelle';
@ -818,7 +819,8 @@ class Facture extends CommonObject
$this->cond_reglement_doc = $obj->cond_reglement_libelle_doc;
$this->fk_project = $obj->fk_projet;
$this->fk_facture_source = $obj->fk_facture_source;
$this->note = $obj->note;
$this->note = $obj->note_private;
$this->note_private = $obj->note_private; // deprecated
$this->note_public = $obj->note_public;
$this->user_author = $obj->fk_user_author;
$this->user_valid = $obj->fk_user_valid;

View File

@ -1,5 +1,6 @@
<?php
/* Copyright (C) 2005-2009 Laurent Destailleur <eldy@users.sourceforge.net>
/* Copyright (C) 2005-2012 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2012 Regis Houssin <regis@dolibarr.fr>
*
* 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
@ -66,11 +67,14 @@ function facture_prepare_head($object)
// $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab
// $this->tabs = array('entity:-tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to remove a tab
complete_head_from_modules($conf,$langs,$object,$head,$h,'invoice');
$head[$h][0] = DOL_URL_ROOT.'/compta/facture/note.php?facid='.$object->id;
$head[$h][1] = $langs->trans('Notes');
$head[$h][2] = 'note';
$h++;
if (empty($conf->global->MAIN_DISABLE_NOTES_TAB))
{
$head[$h][0] = DOL_URL_ROOT.'/compta/facture/note.php?facid='.$object->id;
$head[$h][1] = $langs->trans('Notes');
$head[$h][2] = 'note';
$h++;
}
$head[$h][0] = DOL_URL_ROOT.'/compta/facture/document.php?facid='.$object->id;
/*$filesdir = $conf->facture->dir_output . "/" . dol_sanitizeFileName($fac->ref);