Merge branch '4.0' of git@github.com:Dolibarr/dolibarr.git into 4.0
This commit is contained in:
commit
03767286ef
@ -5,7 +5,7 @@
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2012 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2012-2016 Philippe Grand <philippe.grand@atoo-net.com>
|
||||
* Copyright (C) 2015 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
||||
* Copyright (C) 2015-2016 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
||||
*
|
||||
* 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
|
||||
@ -1418,11 +1418,11 @@ else
|
||||
// Login
|
||||
if (empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED))
|
||||
{
|
||||
print '<tr><td>'.$langs->trans("Login").' / '.$langs->trans("Id").'</td><td class="valeur">'.$object->login.' </td></tr>';
|
||||
print '<tr><td class="titlefield">'.$langs->trans("Login").' / '.$langs->trans("Id").'</td><td class="valeur">'.$object->login.' </td></tr>';
|
||||
}
|
||||
|
||||
// Type
|
||||
print '<tr><td>'.$langs->trans("Type").'</td><td class="valeur">'.$adht->getNomUrl(1)."</td></tr>\n";
|
||||
print '<tr><td class="titlefield">'.$langs->trans("Type").'</td><td class="valeur">'.$adht->getNomUrl(1)."</td></tr>\n";
|
||||
|
||||
// Morphy
|
||||
print '<tr><td>'.$langs->trans("Nature").'</td><td class="valeur" >'.$object->getmorphylib().'</td>';
|
||||
@ -1463,7 +1463,7 @@ else
|
||||
print '<table class="border tableforfield" width="100%">';
|
||||
|
||||
// Birthday
|
||||
print '<tr><td>'.$langs->trans("Birthday").'</td><td class="valeur">'.dol_print_date($object->birth,'day').'</td></tr>';
|
||||
print '<tr><td class="titlefield">'.$langs->trans("Birthday").'</td><td class="valeur">'.dol_print_date($object->birth,'day').'</td></tr>';
|
||||
|
||||
// Public
|
||||
print '<tr><td>'.$langs->trans("Public").'</td><td class="valeur">'.yn($object->public).'</td></tr>';
|
||||
|
||||
@ -591,11 +591,11 @@ if ($rowid > 0)
|
||||
// Login
|
||||
if (empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED))
|
||||
{
|
||||
print '<tr><td>'.$langs->trans("Login").' / '.$langs->trans("Id").'</td><td class="valeur">'.$object->login.' </td></tr>';
|
||||
print '<tr><td class="titlefield">'.$langs->trans("Login").' / '.$langs->trans("Id").'</td><td class="valeur">'.$object->login.' </td></tr>';
|
||||
}
|
||||
|
||||
// Type
|
||||
print '<tr><td>'.$langs->trans("Type").'</td><td class="valeur">'.$adht->getNomUrl(1)."</td></tr>\n";
|
||||
print '<tr><td class="titlefield">'.$langs->trans("Type").'</td><td class="valeur">'.$adht->getNomUrl(1)."</td></tr>\n";
|
||||
|
||||
// Morphy
|
||||
print '<tr><td>'.$langs->trans("Nature").'</td><td class="valeur" >'.$object->getmorphylib().'</td>';
|
||||
@ -630,7 +630,7 @@ if ($rowid > 0)
|
||||
print '<table class="border tableforfield" width="100%">';
|
||||
|
||||
// Birthday
|
||||
print '<tr><td>'.$langs->trans("Birthday").'</td><td class="valeur">'.dol_print_date($object->birth,'day').'</td></tr>';
|
||||
print '<tr><td class="titlefield">'.$langs->trans("Birthday").'</td><td class="valeur">'.dol_print_date($object->birth,'day').'</td></tr>';
|
||||
|
||||
// Public
|
||||
print '<tr><td>'.$langs->trans("Public").'</td><td class="valeur">'.yn($object->public).'</td></tr>';
|
||||
|
||||
@ -996,7 +996,7 @@ class ActionComm extends CommonObject
|
||||
}
|
||||
|
||||
$this->date_creation = $this->db->jdate($obj->datec);
|
||||
$this->date_modification = $this->db->jdate($obj->datem);
|
||||
if (! empty($obj->fk_user_mod)) $this->date_modification = $this->db->jdate($obj->datem);
|
||||
}
|
||||
$this->db->free($result);
|
||||
}
|
||||
|
||||
@ -322,7 +322,7 @@ abstract class CommonDocGenerator
|
||||
*
|
||||
* @param Object $object Main object to use as data source
|
||||
* @param Translate $outputlangs Lang object to use for output
|
||||
* @param array_key $array_key Name of the key for return array
|
||||
* @param string $array_key Name of the key for return array
|
||||
* @return array Array of substitution
|
||||
*/
|
||||
function get_substitutionarray_object($object,$outputlangs,$array_key='object')
|
||||
|
||||
@ -130,7 +130,7 @@ class mod_barcode_product_standard extends ModeleNumRefBarCode
|
||||
* @param string $type type of barcode (EAN, ISBN, ...)
|
||||
* @return string Value if OK, '' if module not configured, <0 if KO
|
||||
*/
|
||||
function getNextValue($objproduct,$type='')
|
||||
function getNextValue($objproduct=null,$type='')
|
||||
{
|
||||
global $db,$conf;
|
||||
|
||||
|
||||
@ -91,7 +91,7 @@ abstract class ModeleNumRefBarCode
|
||||
* @param int $type Type
|
||||
* @return string Value
|
||||
*/
|
||||
function getNextValue($objsoc=0,$type=-1)
|
||||
function getNextValue($objsoc=null,$type=-1)
|
||||
{
|
||||
global $langs;
|
||||
return $langs->trans("Function_getNextValue_InModuleNotWorking");
|
||||
|
||||
@ -108,8 +108,7 @@ class modPrinting extends DolibarrModules
|
||||
$this->menu[$r]=array( 'fk_menu'=>'fk_mainmenu=home,fk_leftmenu=admintools', // Put 0 if this is a top menu
|
||||
'type'=>'left', // This is a Top menu entry
|
||||
'titre'=>'MenuDirectPrinting',
|
||||
'mainmenu'=>'printing',
|
||||
'url'=>'/printing/index.php',
|
||||
'url'=>'/printing/index.php?mainmenu=home&leftmenu=admintools',
|
||||
'langs'=>'printing', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.
|
||||
'position'=>300,
|
||||
'enabled'=>'$conf->printing->enabled && $leftmenu==\'admintools\'',
|
||||
|
||||
@ -108,25 +108,26 @@ class doc_generic_project_odt extends ModelePDFProjects
|
||||
*
|
||||
* @param Project $object Main object to use as data source
|
||||
* @param Translate $outputlangs Lang object to use for output
|
||||
* @param string $array_key Name of the key for return array
|
||||
* @return array Array of substitution
|
||||
*/
|
||||
function get_substitutionarray_object($object,$outputlangs)
|
||||
function get_substitutionarray_object($object,$outputlangs,$array_key='object')
|
||||
{
|
||||
global $conf;
|
||||
|
||||
$resarray=array(
|
||||
'object_id'=>$object->id,
|
||||
'object_ref'=>$object->ref,
|
||||
'object_title'=>$object->title,
|
||||
'object_description'=>$object->description,
|
||||
'object_date_creation'=>dol_print_date($object->date_c,'day'),
|
||||
'object_date_modification'=>dol_print_date($object->date_m,'day'),
|
||||
'object_date_start'=>dol_print_date($object->date_start,'day'),
|
||||
'object_date_end'=>dol_print_date($object->date_end,'day'),
|
||||
'object_note_private'=>$object->note_private,
|
||||
'object_note_public'=>$object->note_public,
|
||||
'object_public'=>$object->public,
|
||||
'object_statut'=>$object->getLibStatut()
|
||||
$array_key.'_id'=>$object->id,
|
||||
$array_key.'_ref'=>$object->ref,
|
||||
$array_key.'_title'=>$object->title,
|
||||
$array_key.'_description'=>$object->description,
|
||||
$array_key.'_date_creation'=>dol_print_date($object->date_c,'day'),
|
||||
$array_key.'_date_modification'=>dol_print_date($object->date_m,'day'),
|
||||
$array_key.'_date_start'=>dol_print_date($object->date_start,'day'),
|
||||
$array_key.'_date_end'=>dol_print_date($object->date_end,'day'),
|
||||
$array_key.'_note_private'=>$object->note_private,
|
||||
$array_key.'_note_public'=>$object->note_public,
|
||||
$array_key.'_public'=>$object->public,
|
||||
$array_key.'_statut'=>$object->getLibStatut()
|
||||
);
|
||||
|
||||
// Retrieve extrafields
|
||||
|
||||
@ -109,25 +109,26 @@ class doc_generic_task_odt extends ModelePDFTask
|
||||
*
|
||||
* @param Project $object Main object to use as data source
|
||||
* @param Translate $outputlangs Lang object to use for output
|
||||
* @param string $array_key Name of the key for return array
|
||||
* @return array Array of substitution
|
||||
*/
|
||||
function get_substitutionarray_object($object,$outputlangs)
|
||||
function get_substitutionarray_object($object,$outputlangs,$array_key='object')
|
||||
{
|
||||
global $conf;
|
||||
|
||||
$resarray=array(
|
||||
'object_id'=>$object->id,
|
||||
'object_ref'=>$object->ref,
|
||||
'object_title'=>$object->title,
|
||||
'object_description'=>$object->description,
|
||||
'object_date_creation'=>dol_print_date($object->date_c,'day'),
|
||||
'object_date_modification'=>dol_print_date($object->date_m,'day'),
|
||||
'object_date_start'=>dol_print_date($object->date_start,'day'),
|
||||
'object_date_end'=>dol_print_date($object->date_end,'day'),
|
||||
'object_note_private'=>$object->note_private,
|
||||
'object_note_public'=>$object->note_public,
|
||||
'object_public'=>$object->public,
|
||||
'object_statut'=>$object->getLibStatut()
|
||||
$array_key.'_id'=>$object->id,
|
||||
$array_key.'_ref'=>$object->ref,
|
||||
$array_key.'_title'=>$object->title,
|
||||
$array_key.'_description'=>$object->description,
|
||||
$array_key.'_date_creation'=>dol_print_date($object->date_c,'day'),
|
||||
$array_key.'_date_modification'=>dol_print_date($object->date_m,'day'),
|
||||
$array_key.'_date_start'=>dol_print_date($object->date_start,'day'),
|
||||
$array_key.'_date_end'=>dol_print_date($object->date_end,'day'),
|
||||
$array_key.'_note_private'=>$object->note_private,
|
||||
$array_key.'_note_public'=>$object->note_public,
|
||||
$array_key.'_public'=>$object->public,
|
||||
$array_key.'_statut'=>$object->getLibStatut()
|
||||
);
|
||||
|
||||
// Retrieve extrafields
|
||||
|
||||
@ -106,11 +106,14 @@ abstract class ModeleNumRefSuppliersInvoices
|
||||
return true;
|
||||
}
|
||||
|
||||
/** Returns next value assigned
|
||||
*
|
||||
* @return string Valeur
|
||||
*/
|
||||
function getNextValue()
|
||||
/** Returns next value assigned
|
||||
*
|
||||
* @param Societe $objsoc Object third party
|
||||
* @param Object $object Object
|
||||
* @param string $mode 'next' for next value or 'last' for last value
|
||||
* @return string Value if OK, 0 if KO
|
||||
*/
|
||||
function getNextValue($objsoc,$object,$mode)
|
||||
{
|
||||
global $langs;
|
||||
return $langs->trans("NotAvailable");
|
||||
|
||||
@ -30,6 +30,7 @@ if (! $res) die("Include of main fails");
|
||||
|
||||
require 'class/dolresource.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/fichinter/class/fichinter.class.php';
|
||||
|
||||
// Load traductions files requiredby by page
|
||||
$langs->load("resource");
|
||||
@ -265,7 +266,8 @@ else
|
||||
{
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/fichinter.lib.php';
|
||||
|
||||
$fichinter = fetchObjectByElement($element_id, $element);
|
||||
$fichinter = new Fichinter($db);
|
||||
$fichinter->fetch($element_id);
|
||||
if (is_object($fichinter))
|
||||
{
|
||||
$head=fichinter_prepare_head($fichinter);
|
||||
@ -283,11 +285,11 @@ else
|
||||
|
||||
|
||||
// Customer
|
||||
if ( is_null($fichinter->client) )
|
||||
if ( is_null($fichinter->thirdparty) )
|
||||
$fichinter->fetch_thirdparty();
|
||||
|
||||
print "<tr><td>".$langs->trans("Company")."</td>";
|
||||
print '<td colspan="3">'.$fichinter->client->getNomUrl(1).'</td></tr>';
|
||||
print '<td colspan="3">'.$fichinter->thirdparty->getNomUrl(1).'</td></tr>';
|
||||
print "</table>";
|
||||
|
||||
dol_fiche_end();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user