Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
b5b07f8a14
@ -327,7 +327,7 @@ if ($modecompta == 'CREANCES-DETTES') {
|
||||
$var=!$var;
|
||||
print "<tr ".$bc[$var].">";
|
||||
|
||||
// Third party
|
||||
// Product
|
||||
$fullname=$name[$key];
|
||||
if ($key >= 0) {
|
||||
$linkname='<a href="'.DOL_URL_ROOT.'/product/fiche.php?id='.$key.'">'.img_object($langs->trans("ShowProduct"),'product').' '.$fullname.'</a>';
|
||||
@ -339,23 +339,24 @@ if ($modecompta == 'CREANCES-DETTES') {
|
||||
|
||||
// Amount w/o VAT
|
||||
print '<td align="right">';
|
||||
if ($key > 0) {
|
||||
/*if ($key > 0) {
|
||||
print '<a href="'.DOL_URL_ROOT.'/compta/facture/list.php?productid='.$key.'">';
|
||||
} else {
|
||||
print '<a href="#">';
|
||||
}
|
||||
}*/
|
||||
print price($amount_ht[$key]);
|
||||
//print '</a>';
|
||||
print '</td>';
|
||||
|
||||
// Amount with VAT
|
||||
print '<td align="right">';
|
||||
if ($key > 0) {
|
||||
/*if ($key > 0) {
|
||||
print '<a href="'.DOL_URL_ROOT.'/compta/facture/list.php?productid='.$key.'">';
|
||||
} else {
|
||||
print '<a href="#">';
|
||||
}
|
||||
}*/
|
||||
print price($amount[$key]);
|
||||
print '</a>';
|
||||
//print '</a>';
|
||||
print '</td>';
|
||||
|
||||
// Percent;
|
||||
|
||||
@ -207,7 +207,7 @@ class FormFile
|
||||
return $this->getDocumentsLink($modulepart, $filename, $filedir);
|
||||
}
|
||||
$printer = ($user->rights->printipp->read && $conf->printipp->enabled)?true:false;
|
||||
|
||||
$hookmanager->initHooks(array('formfile'));
|
||||
$forname='builddoc';
|
||||
$out='';
|
||||
$var=true;
|
||||
@ -450,14 +450,18 @@ class FormFile
|
||||
$langs->load("errors");
|
||||
$genbutton.= ' '.img_warning($langs->transnoentitiesnoconv("WarningNoDocumentModelActivated"));
|
||||
}
|
||||
|
||||
if (! $allowgenifempty && ! is_array($modellist) && empty($modellist) && empty($conf->dol_no_mouse_hover) && $modulepart != 'unpaid') $genbutton='';
|
||||
|
||||
$out.= $genbutton;
|
||||
$out.= '</th>';
|
||||
|
||||
if ($printer) $out.= '<th></th>';
|
||||
|
||||
if($hookmanager->hooks['formfile'])
|
||||
{
|
||||
foreach($hookmanager->hooks['formfile'] as $module)
|
||||
{
|
||||
if(method_exists($module, 'formBuilddocLineOptions')) $out .= '<th></th>';
|
||||
}
|
||||
}
|
||||
$out.= '</tr>';
|
||||
|
||||
// Execute hooks
|
||||
@ -529,6 +533,7 @@ class FormFile
|
||||
$out.= ($param?'&'.$param:'');
|
||||
$out.= '">'.img_printer().'</a></td>';
|
||||
}
|
||||
if (is_object($hookmanager)) $out.= $hookmanager->executeHooks('formBuilddocLineOptions',$parameters,$file);
|
||||
}
|
||||
|
||||
$out.= '</tr>';
|
||||
|
||||
@ -198,6 +198,7 @@ insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, left
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->comptabilite->enabled || $conf->accounting->enabled', __HANDLER__, 'left', 2703__+MAX_llx_menu__, 'accountancy', '', 2700__+MAX_llx_menu__, '/compta/stats/index.php?leftmenu=ca', 'ReportTurnover', 1, 'main', '$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire', '', 0, 1, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->comptabilite->enabled || $conf->accounting->enabled', __HANDLER__, 'left', 2704__+MAX_llx_menu__, 'accountancy', '', 2703__+MAX_llx_menu__, '/compta/stats/casoc.php?leftmenu=ca', 'ByCompanies', 2, 'main', '$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire', '', 0, 0, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->comptabilite->enabled || $conf->accounting->enabled', __HANDLER__, 'left', 2705__+MAX_llx_menu__, 'accountancy', '', 2703__+MAX_llx_menu__, '/compta/stats/cabyuser.php?leftmenu=ca', 'ByUsers', 2, 'main', '$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire', '', 0, 1, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->comptabilite->enabled || $conf->accounting->enabled', __HANDLER__, 'left', 2708__+MAX_llx_menu__, 'accountancy', '', 2703__+MAX_llx_menu__, '/compta/stats/cabyprodserv.php?leftmenu=ca', 'ByProductsAndServices', 2, 'main', '$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire', '', 0, 1, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->comptabilite->enabled || $conf->accounting->enabled', __HANDLER__, 'left', 2706__+MAX_llx_menu__, 'accountancy', '', 2700__+MAX_llx_menu__, '/compta/journal/sellsjournal.php?leftmenu=ca', 'SellsJournal', 1, 'main', '$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire', '', 0, 1, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->comptabilite->enabled || $conf->accounting->enabled', __HANDLER__, 'left', 2707__+MAX_llx_menu__, 'accountancy', '', 2700__+MAX_llx_menu__, '/compta/journal/purchasesjournal.php?leftmenu=ca', 'PurchasesJournal', 1, 'main', '$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire', '', 0, 1, __ENTITY__);
|
||||
-- Check deposit
|
||||
|
||||
@ -66,4 +66,4 @@ ALTER TABLE llx_propaldet_extrafields ADD INDEX idx_propaldet_extrafields (fk_ob
|
||||
DROP table llx_adherent_options;
|
||||
DROP table llx_adherent_options_label;
|
||||
|
||||
|
||||
ALTER TABLE `llx_user` ADD `accountancy_code` VARCHAR( 24 ) NULL;
|
||||
|
||||
@ -1,51 +1,51 @@
|
||||
-- ===================================================================
|
||||
-- Copyright (C) 2013 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
-- Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
||||
--
|
||||
-- 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
|
||||
-- the Free Software Foundation; either version 3 of the License, or
|
||||
-- (at your option) any later version.
|
||||
--
|
||||
-- This program is distributed in the hope that it will be useful,
|
||||
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
-- GNU General Public License for more details.
|
||||
--
|
||||
-- You should have received a copy of the GNU General Public License
|
||||
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
--
|
||||
-- ===================================================================
|
||||
|
||||
|
||||
CREATE TABLE llx_cronjob
|
||||
(
|
||||
rowid integer AUTO_INCREMENT PRIMARY KEY,
|
||||
tms timestamp,
|
||||
datec datetime,
|
||||
jobtype varchar(10) NOT NULL,
|
||||
label text NOT NULL,
|
||||
command varchar(255),
|
||||
classesname varchar(255),
|
||||
objectname varchar(255),
|
||||
methodename varchar(255),
|
||||
params text NOT NULL,
|
||||
md5params varchar(32),
|
||||
module_name varchar(255),
|
||||
priority integer DEFAULT 0,
|
||||
datelastrun datetime,
|
||||
datenextrun datetime,
|
||||
datestart datetime,
|
||||
dateend datetime,
|
||||
datelastresult datetime,
|
||||
lastresult text,
|
||||
lastoutput text,
|
||||
unitfrequency integer NOT NULL DEFAULT 0,
|
||||
frequency integer NOT NULL DEFAULT 0,
|
||||
nbrun integer,
|
||||
status integer NOT NULL DEFAULT 1,
|
||||
fk_user_author integer DEFAULT NULL,
|
||||
fk_user_mod integer DEFAULT NULL,
|
||||
note text
|
||||
|
||||
-- ===================================================================
|
||||
-- Copyright (C) 2013 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
-- Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
||||
--
|
||||
-- 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
|
||||
-- the Free Software Foundation; either version 3 of the License, or
|
||||
-- (at your option) any later version.
|
||||
--
|
||||
-- This program is distributed in the hope that it will be useful,
|
||||
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
-- GNU General Public License for more details.
|
||||
--
|
||||
-- You should have received a copy of the GNU General Public License
|
||||
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
--
|
||||
-- ===================================================================
|
||||
|
||||
|
||||
CREATE TABLE llx_cronjob
|
||||
(
|
||||
rowid integer AUTO_INCREMENT PRIMARY KEY,
|
||||
tms timestamp,
|
||||
datec datetime,
|
||||
jobtype varchar(10) NOT NULL,
|
||||
label text NOT NULL,
|
||||
command varchar(255),
|
||||
classesname varchar(255),
|
||||
objectname varchar(255),
|
||||
methodename varchar(255),
|
||||
params text NOT NULL,
|
||||
md5params varchar(32),
|
||||
module_name varchar(255),
|
||||
priority integer DEFAULT 0,
|
||||
datelastrun datetime,
|
||||
datenextrun datetime,
|
||||
datestart datetime,
|
||||
dateend datetime,
|
||||
datelastresult datetime,
|
||||
lastresult text,
|
||||
lastoutput text,
|
||||
unitfrequency integer NOT NULL DEFAULT 0,
|
||||
frequency integer NOT NULL DEFAULT 0,
|
||||
nbrun integer,
|
||||
status integer NOT NULL DEFAULT 1,
|
||||
fk_user_author integer DEFAULT NULL,
|
||||
fk_user_mod integer DEFAULT NULL,
|
||||
note text
|
||||
|
||||
)ENGINE=innodb;
|
||||
@ -62,5 +62,6 @@ create table llx_user
|
||||
statut tinyint DEFAULT 1,
|
||||
photo varchar(255), -- filename or url of photo
|
||||
lang varchar(6),
|
||||
color varchar(6)
|
||||
color varchar(6),
|
||||
accountancy_code varchar(24) NULL
|
||||
)ENGINE=innodb;
|
||||
|
||||
@ -226,6 +226,7 @@ if ($search_all)
|
||||
$sql.= " OR s.code_client LIKE '%".$db->escape($search_all)."%'";
|
||||
$sql.= " OR s.email LIKE '%".$db->escape($search_all)."%'";
|
||||
$sql.= " OR s.url LIKE '%".$db->escape($search_all)."%'";
|
||||
$sql.= " OR s.siren LIKE '%".$db->escape($search_all)."%'";
|
||||
$sql.= ")";
|
||||
}
|
||||
if ($search_nom)
|
||||
@ -235,6 +236,7 @@ if ($search_nom)
|
||||
$sql.= " OR s.code_client LIKE '%".$db->escape($search_nom)."%'";
|
||||
$sql.= " OR s.email LIKE '%".$db->escape($search_nom)."%'";
|
||||
$sql.= " OR s.url LIKE '%".$db->escape($search_nom)."%'";
|
||||
$sql.= " OR s.siren LIKE '%".$db->escape($search_nom)."%'";
|
||||
$sql.= ")";
|
||||
}
|
||||
if ($search_town) $sql .= " AND s.town LIKE '%".$db->escape($search_town)."%'";
|
||||
|
||||
@ -96,6 +96,8 @@ class User extends CommonObject
|
||||
|
||||
var $users; // To store all tree of users hierarchy
|
||||
var $parentof; // To store an array of all parents for all ids.
|
||||
|
||||
var $accountancy_code; // Accountancy code in prevision of the complete accountancy module
|
||||
|
||||
|
||||
/**
|
||||
@ -149,6 +151,7 @@ class User extends CommonObject
|
||||
$sql.= " u.datepreviouslogin as datep,";
|
||||
$sql.= " u.photo as photo,";
|
||||
$sql.= " u.openid as openid,";
|
||||
$sql.= " u.accountancy_code,";
|
||||
$sql.= " u.ref_int, u.ref_ext";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."user as u";
|
||||
|
||||
@ -209,6 +212,7 @@ class User extends CommonObject
|
||||
$this->openid = $obj->openid;
|
||||
$this->lang = $obj->lang;
|
||||
$this->entity = $obj->entity;
|
||||
$this->accountancy_code = $obj->accountancy_code;
|
||||
|
||||
$this->datec = $this->db->jdate($obj->datec);
|
||||
$this->datem = $this->db->jdate($obj->datem);
|
||||
@ -1114,6 +1118,7 @@ class User extends CommonObject
|
||||
$this->address = empty($this->address)?'':$this->address;
|
||||
$this->zip = empty($this->zip)?'':$this->zip;
|
||||
$this->town = empty($this->town)?'':$this->town;
|
||||
$this->accountancy_code = trim($this->accountancy_code);
|
||||
|
||||
// Check parameters
|
||||
if (! empty($conf->global->USER_MAIL_REQUIRED) && ! isValidEMail($this->email))
|
||||
@ -1142,6 +1147,7 @@ class User extends CommonObject
|
||||
$sql.= ", email = '".$this->db->escape($this->email)."'";
|
||||
$sql.= ", job = '".$this->db->escape($this->job)."'";
|
||||
$sql.= ", signature = '".$this->db->escape($this->signature)."'";
|
||||
$sql.= ", accountancy_code = '".$this->db->escape($this->accountancy_code)."'";
|
||||
$sql.= ", note = '".$this->db->escape($this->note)."'";
|
||||
$sql.= ", photo = ".($this->photo?"'".$this->db->escape($this->photo)."'":"null");
|
||||
$sql.= ", openid = ".($this->openid?"'".$this->db->escape($this->openid)."'":"null");
|
||||
|
||||
@ -188,6 +188,7 @@ if ($action == 'add' && $canadduser)
|
||||
$object->email = GETPOST("email");
|
||||
$object->job = GETPOST("job");
|
||||
$object->signature = GETPOST("signature");
|
||||
$object->accountancy_code = GETPOST("accountancy_code");
|
||||
$object->note = GETPOST("note");
|
||||
$object->ldap_sid = GETPOST("ldap_sid");
|
||||
|
||||
@ -324,6 +325,7 @@ if ($action == 'update' && ! $_POST["cancel"])
|
||||
$object->email = GETPOST("email");
|
||||
$object->job = GETPOST("job");
|
||||
$object->signature = GETPOST("signature");
|
||||
$object->accountancy_code = GETPOST("accountancy_code");
|
||||
$object->openid = GETPOST("openid");
|
||||
$object->fk_user = GETPOST("fk_user")>0?GETPOST("fk_user"):0;
|
||||
|
||||
@ -1192,6 +1194,10 @@ else
|
||||
}
|
||||
print '</td>';
|
||||
print "</tr>\n";
|
||||
|
||||
// Accountancy code
|
||||
print '<tr><td valign="top">'.$langs->trans("AccountancyCode").'</td>';
|
||||
print '<td>'.$object->accountancy_code.'</td>';
|
||||
|
||||
// Status
|
||||
print '<tr><td valign="top">'.$langs->trans("Status").'</td>';
|
||||
@ -1821,6 +1827,21 @@ else
|
||||
}
|
||||
print '</td>';
|
||||
print "</tr>\n";
|
||||
|
||||
// Accountancy code
|
||||
print "<tr>";
|
||||
print '<td valign="top">'.$langs->trans("AccountancyCode").'</td>';
|
||||
print '<td>';
|
||||
if ($caneditfield)
|
||||
{
|
||||
print '<input size="30" type="text" class="flat" name="accountancy_code" value="'.$object->accountancy_code.'">';
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<input type="hidden" name="accountancy_code" value="'.$object->accountancy_code.'">';
|
||||
print $object->accountancy_code;
|
||||
}
|
||||
print '</td>';
|
||||
|
||||
// Status
|
||||
print '<tr><td valign="top">'.$langs->trans("Status").'</td>';
|
||||
|
||||
Loading…
Reference in New Issue
Block a user