Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop

This commit is contained in:
Laurent Destailleur
2018-07-15 20:16:54 +02:00
23 changed files with 323 additions and 175 deletions

View File

@@ -356,6 +356,22 @@ class Documents extends DolibarrApi
$upload_dir = $conf->facture->dir_output . "/" . get_exdir(0, 0, 0, 1, $object, 'invoice'); $upload_dir = $conf->facture->dir_output . "/" . get_exdir(0, 0, 0, 1, $object, 'invoice');
} }
else if ($modulepart == 'agenda' || $modulepart == 'action' || $modulepart == 'event')
{
require_once DOL_DOCUMENT_ROOT.'/comm/action/class/actioncomm.class.php';
if (!DolibarrApiAccess::$user->rights->agenda->myactions->read && !DolibarrApiAccess::$user->rights->agenda->allactions->read) {
throw new RestException(401);
}
$object = new ActionComm($this->db);
$result=$object->fetch($id, $ref);
if ( ! $result ) {
throw new RestException(404, 'Event not found');
}
$upload_dir = $conf->agenda->dir_output.'/'.dol_sanitizeFileName($object->ref);
}
else else
{ {
throw new RestException(500, 'Modulepart '.$modulepart.' not implemented yet.'); throw new RestException(500, 'Modulepart '.$modulepart.' not implemented yet.');

View File

@@ -573,13 +573,13 @@ class Notify
$mesg = $langs->transnoentitiesnoconv("EMailTextOrderValidated",$link); $mesg = $langs->transnoentitiesnoconv("EMailTextOrderValidated",$link);
break; break;
case 'PROPAL_VALIDATE': case 'PROPAL_VALIDATE':
$link='/comm/propal/card.php?id='.$object->id; $link='<a href="' . $urlwithroot . '/comm/propal/card.php?id='.$object->id . '">' . $newref . '</a>';
$dir_output = $conf->propal->multidir_output[$object->entity]; $dir_output = $conf->propal->multidir_output[$object->entity];
$object_type = 'propal'; $object_type = 'propal';
$mesg = $langs->transnoentitiesnoconv("EMailTextProposalValidated",$link); $mesg = $langs->transnoentitiesnoconv("EMailTextProposalValidated",$link);
break; break;
case 'PROPAL_CLOSE_SIGNED': case 'PROPAL_CLOSE_SIGNED':
$link='/comm/propal/card.php?id='.$object->id; $link='<a href="' . $urlwithroot . '/comm/propal/card.php?id='.$object->id . '">' . $newref . '</a>';
$dir_output = $conf->propal->multidir_output[$object->entity]; $dir_output = $conf->propal->multidir_output[$object->entity];
$object_type = 'propal'; $object_type = 'propal';
$mesg = $langs->transnoentitiesnoconv("EMailTextProposalClosedSigned",$link); $mesg = $langs->transnoentitiesnoconv("EMailTextProposalClosedSigned",$link);

View File

@@ -1484,10 +1484,7 @@ function show_actions_done($conf, $langs, $db, $filterobj, $objcon='', $noprint=
$delay_warning=$conf->global->MAIN_DELAY_ACTIONS_TODO*24*60*60; $delay_warning=$conf->global->MAIN_DELAY_ACTIONS_TODO*24*60*60;
require_once DOL_DOCUMENT_ROOT.'/comm/action/class/actioncomm.class.php'; require_once DOL_DOCUMENT_ROOT.'/comm/action/class/actioncomm.class.php';
require_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php'; include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
require_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php';
require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.commande.class.php';
require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php';
$formactions=new FormActions($db); $formactions=new FormActions($db);
@@ -1496,12 +1493,6 @@ function show_actions_done($conf, $langs, $db, $filterobj, $objcon='', $noprint=
$userstatic=new User($db); $userstatic=new User($db);
$contactstatic = new Contact($db); $contactstatic = new Contact($db);
// TODO mutualize/uniformize
$propalstatic=new Propal($db);
$orderstatic=new Commande($db);
$supplierorderstatic=new CommandeFournisseur($db);
$facturestatic=new Facture($db);
$out.='<form name="listactionsfilter" class="listactionsfilter" action="' . $_SERVER["PHP_SELF"] . '" method="POST">'; $out.='<form name="listactionsfilter" class="listactionsfilter" action="' . $_SERVER["PHP_SELF"] . '" method="POST">';
if ($objcon && get_class($objcon) == 'Contact' && $filterobj && get_class($filterobj) == 'Societe') if ($objcon && get_class($objcon) == 'Contact' && $filterobj && get_class($filterobj) == 'Societe')
{ {
@@ -1662,45 +1653,10 @@ function show_actions_done($conf, $langs, $db, $filterobj, $objcon='', $noprint=
//$out.='<td>'.dol_trunc($histo[$key]['note'], 40).'</td>'; //$out.='<td>'.dol_trunc($histo[$key]['note'], 40).'</td>';
// Objet lie // Objet lie
// TODO mutualize/uniformize
$out.='<td>'; $out.='<td>';
//var_dump($histo[$key]['elementtype']); if (isset($histo[$key]['elementtype']) && !empty($histo[$key]['fk_element']))
if (isset($histo[$key]['elementtype']))
{ {
if ($histo[$key]['elementtype'] == 'propal' && ! empty($conf->propal->enabled)) $out.=dolGetElementUrl($histo[$key]['fk_element'],$histo[$key]['elementtype'],1);
{
//$propalstatic->ref=$langs->trans("ProposalShort");
//$propalstatic->id=$histo[$key]['fk_element'];
if ($propalstatic->fetch($histo[$key]['fk_element'])>0) {
$propalstatic->type=$histo[$key]['ftype'];
$out.=$propalstatic->getNomUrl(1);
} else {
//$out.= '<span class="opacitymedium">'.$langs->trans("ProposalDeleted").'</span>';
}
}
elseif (($histo[$key]['elementtype'] == 'order' || $histo[$key]['elementtype'] == 'commande') && ! empty($conf->commande->enabled))
{
//$orderstatic->ref=$langs->trans("Order");
//$orderstatic->id=$histo[$key]['fk_element'];
if ($orderstatic->fetch($histo[$key]['fk_element'])>0) {
$orderstatic->type=$histo[$key]['ftype'];
$out.=$orderstatic->getNomUrl(1);
} else {
//$out.= '<span class="opacitymedium">'.$langs->trans("OrderDeleted").'<span>';
}
}
elseif (($histo[$key]['elementtype'] == 'invoice' || $histo[$key]['elementtype'] == 'facture') && ! empty($conf->facture->enabled))
{
//$facturestatic->ref=$langs->trans("Invoice");
//$facturestatic->id=$histo[$key]['fk_element'];
if ($facturestatic->fetch($histo[$key]['fk_element'])>0) {
$facturestatic->type=$histo[$key]['ftype'];
$out.=$facturestatic->getNomUrl(1,'compta');
} else {
//$out.= '<span class="opacitymedium">'.$langs->trans("InvoiceDeleted").'</span>';
}
}
else $out.='&nbsp;';
} }
else $out.='&nbsp;'; else $out.='&nbsp;';
$out.='</td>'; $out.='</td>';

View File

@@ -7576,7 +7576,7 @@ function getDictvalue($tablename, $field, $id, $checkentity=false, $rowidfield='
{ {
$dictvalues[$tablename] = array(); $dictvalues[$tablename] = array();
$sql = 'SELECT * FROM '.$tablename.' WHERE 1'; $sql = 'SELECT * FROM '.$tablename.' WHERE 1';
if ($checkentity) $sql.= ' entity IN (0,'.getEntity('').')'; if ($checkentity) $sql.= ' AND entity IN (0,'.getEntity('').')';
$resql = $db->query($sql); $resql = $db->query($sql);
if ($resql) if ($resql)

View File

@@ -1871,7 +1871,11 @@ function dolGetElementUrl($objectid,$objecttype,$withpicto=0,$option='')
{ {
$object = new $classname($db); $object = new $classname($db);
$res=$object->fetch($objectid); $res=$object->fetch($objectid);
if ($res > 0) $ret=$object->getNomUrl($withpicto,$option); if ($res > 0) {
$ret=$object->getNomUrl($withpicto,$option);
} elseif($res==0) {
$ret=$langs->trans('Deleted');
}
unset($object); unset($object);
} }
else dol_syslog("Class with classname ".$classname." is unknown even after the include", LOG_ERR); else dol_syslog("Class with classname ".$classname." is unknown even after the include", LOG_ERR);

View File

@@ -337,7 +337,7 @@ class DolibarrModules // Can not be abstract, because we need to insta
/** /**
* @var array() Minimum version of PHP required by module. * @var array() Minimum version of PHP required by module.
* e.g.: PHP ≥ 5.3 = array(5, 3) * e.g.: PHP ≥ 5.4 = array(5, 4)
*/ */
public $phpmin; public $phpmin;
@@ -464,7 +464,7 @@ class DolibarrModules // Can not be abstract, because we need to insta
} }
/** /**
* Disable function. Deletes the module constant and boxes from the database. * Disable function. Deletes the module constants and boxes from the database.
* *
* @param string[] $array_sql SQL requests to be executed when module is disabled * @param string[] $array_sql SQL requests to be executed when module is disabled
* @param string $options Options when disabling module: * @param string $options Options when disabling module:
@@ -553,7 +553,7 @@ class DolibarrModules // Can not be abstract, because we need to insta
} }
else else
{ {
// If module name translation using it's unique id does not exists, we try to use its name to find translation // If module name translation using it's unique id does not exist, we try to use its name to find translation
if (is_array($this->langfiles)) if (is_array($this->langfiles))
{ {
foreach($this->langfiles as $val) foreach($this->langfiles as $val)
@@ -613,9 +613,9 @@ class DolibarrModules // Can not be abstract, because we need to insta
/** /**
* Gives the long description of a module. First check README-la_LA.md then README.md * Gives the long description of a module. First check README-la_LA.md then README.md
* If not markdown files found, it return translated value of the key ->descriptionlong. * If no markdown files found, it returns translated value of the key ->descriptionlong.
* *
* @return string Long description of a module from README.md of from property. * @return string Long description of a module from README.md of from property.
*/ */
function getDescLong() function getDescLong()
{ {

View File

@@ -66,8 +66,11 @@ class modSociete extends DolibarrModules
$this->dirs = array("/societe/temp"); $this->dirs = array("/societe/temp");
// Dependencies // Dependencies
$this->depends = array(); $this->hidden = false; // A condition to hide module
$this->requiredby = array("modExpedition","modFacture","modFournisseur","modFicheinter","modPropale","modContrat","modCommande"); $this->depends = array(); // List of module class names as string that must be enabled if this module is enabled
$this->requiredby = array("modExpedition","modFacture","modFournisseur","modFicheinter","modPropale","modContrat","modCommande"); // List of module ids to disable if this one is disabled
$this->conflictwith = array(); // List of module class names as string this module is in conflict with
$this->phpmin = array(5,4); // Minimum version of PHP required by module
$this->langfiles = array("companies",'bills'); $this->langfiles = array("companies",'bills');
// Constants // Constants

View File

@@ -65,8 +65,11 @@ class modStock extends DolibarrModules
$this->config_page_url = array("stock.php"); $this->config_page_url = array("stock.php");
// Dependencies // Dependencies
$this->depends = array("modProduct"); $this->hidden = false; // A condition to hide module
$this->requiredby = array("modProductBatch"); $this->depends = array("modProduct"); // List of module class names as string that must be enabled if this module is enabled
$this->requiredby = array("modProductBatch"); // List of module ids to disable if this one is disabled
$this->conflictwith = array(); // List of module class names as string this module is in conflict with
$this->phpmin = array(5,4); // Minimum version of PHP required by module
$this->langfiles = array("stocks"); $this->langfiles = array("stocks");
// Constants // Constants

View File

@@ -65,10 +65,11 @@ class modStripe extends DolibarrModules
// Data directories to create when module is enabled. // Data directories to create when module is enabled.
$this->dirs = array(); $this->dirs = array();
// Config pages. Put here list of php page names stored in admmin directory used to setup module. // Config pages. Put here list of php page names stored in admin directory used to setup module.
$this->config_page_url = array("stripe.php@stripe"); $this->config_page_url = array("stripe.php@stripe");
// Dependencies // Dependencies
$this->hidden = false; // A condition to hide module
$this->depends = array(); // List of modules id that must be enabled if this module is enabled $this->depends = array(); // List of modules id that must be enabled if this module is enabled
$this->requiredby = array(); // List of modules id to disable if this one is disabled $this->requiredby = array(); // List of modules id to disable if this one is disabled
$this->phpmin = array(5,4); // Minimum version of PHP required by module $this->phpmin = array(5,4); // Minimum version of PHP required by module

View File

@@ -57,13 +57,19 @@ class modSupplierProposal extends DolibarrModules
$this->const_name = 'MAIN_MODULE_'.strtoupper($this->name); $this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
$this->picto='supplier_proposal'; $this->picto='supplier_proposal';
// Data directories to create when module is enabled.
$this->dirs = array(); $this->dirs = array();
// Config pages. Put here list of php page names stored in admin directory used to setup module.
$this->config_page_url = array("supplier_proposal.php");
// Dependancies // Dependencies
$this->depends = array('modFournisseur'); $this->hidden = false; // A condition to hide module
$this->requiredby = array(); $this->depends = array('modFournisseur'); // List of module class names as string that must be enabled if this module is enabled
$this->config_page_url = array("supplier_proposal.php"); $this->requiredby = array(); // List of module ids to disable if this one is disabled
$this->conflictwith = array(); // List of module class names as string this module is in conflict with
$this->phpmin = array(5,4); // Minimum version of PHP required by module
$this->langfiles = array("supplier_proposal"); $this->langfiles = array("supplier_proposal");
// Constants // Constants

View File

@@ -67,8 +67,11 @@ class modSyslog extends DolibarrModules
$this->config_page_url = array("syslog.php"); $this->config_page_url = array("syslog.php");
// Dependencies // Dependencies
$this->depends = array(); $this->hidden = false; // A condition to hide module
$this->requiredby = array(); $this->depends = array(); // List of module class names as string that must be enabled if this module is enabled
$this->requiredby = array(); // List of module ids to disable if this one is disabled
$this->conflictwith = array(); // List of module class names as string this module is in conflict with
$this->phpmin = array(5,4); // Minimum version of PHP required by module
// Constants // Constants
$this->const = array(); $this->const = array();

View File

@@ -67,9 +67,11 @@ class modTax extends DolibarrModules
$this->config_page_url = array("taxes.php"); $this->config_page_url = array("taxes.php");
// Dependencies // Dependencies
$this->depends = array(); $this->hidden = false; // A condition to hide module
$this->requiredby = array(); $this->depends = array(); // List of module class names as string that must be enabled if this module is enabled
$this->conflictwith = array(); $this->requiredby = array(); // List of module ids to disable if this one is disabled
$this->conflictwith = array(); // List of module class names as string this module is in conflict with
$this->phpmin = array(5,4); // Minimum version of PHP required by module
$this->langfiles = array("compta","bills"); $this->langfiles = array("compta","bills");
// Constants // Constants
@@ -117,13 +119,10 @@ class modTax extends DolibarrModules
// Menus // Menus
//-------
$this->menu = 1; // This module add menu entries. They are coded into menu manager. $this->menu = 1; // This module add menu entries. They are coded into menu manager.
// Exports // Exports
//--------
$r=0; $r=0;
$r++; $r++;

View File

@@ -95,12 +95,11 @@ class modTicket extends DolibarrModules
$this->config_page_url = array("ticket.php"); $this->config_page_url = array("ticket.php");
// Dependencies // Dependencies
// List of modules id that must be enabled if this module is enabled $this->hidden = false; // A condition to hide module
$this->depends = array(); $this->depends = array(); // List of module class names as string that must be enabled if this module is enabled
// List of modules id to disable if this one is disabled $this->requiredby = array(); // List of module ids to disable if this one is disabled
$this->requiredby = array(); $this->conflictwith = array(); // List of module class names as string this module is in conflict with
// Minimum version of PHP required by module $this->phpmin = array(5,4); // Minimum version of PHP required by module
$this->phpmin = array(5, 3);
$this->langfiles = array("ticket"); $this->langfiles = array("ticket");
// Constants // Constants
// List of particular constants to add when module is enabled // List of particular constants to add when module is enabled
@@ -115,7 +114,7 @@ class modTicket extends DolibarrModules
'project:+ticket:Tickets:@ticket:$user->rights->ticket->read:/ticket/list.php?projectid=__ID__', 'project:+ticket:Tickets:@ticket:$user->rights->ticket->read:/ticket/list.php?projectid=__ID__',
); );
// Dictionnaries // Dictionaries
if (! isset($conf->ticket->enabled)) { if (! isset($conf->ticket->enabled)) {
$conf->ticket=new stdClass(); $conf->ticket=new stdClass();
$conf->ticket->enabled=0; $conf->ticket->enabled=0;

View File

@@ -63,9 +63,12 @@ class modUser extends DolibarrModules
// Config pages // Config pages
$this->config_page_url = array("user.php"); $this->config_page_url = array("user.php");
// Dependancies // Dependencies
$this->depends = array(); $this->hidden = false; // A condition to hide module
$this->requiredby = array(); $this->depends = array(); // List of module class names as string that must be enabled if this module is enabled
$this->requiredby = array(); // List of module ids to disable if this one is disabled
$this->conflictwith = array(); // List of module class names as string this module is in conflict with
$this->phpmin = array(5,4); // Minimum version of PHP required by module
$this->langfiles = array("main","users","companies","members",'salaries'); $this->langfiles = array("main","users","companies","members",'salaries');
$this->always_enabled = true; // Can't be disabled $this->always_enabled = true; // Can't be disabled
@@ -205,13 +208,10 @@ class modUser extends DolibarrModules
// Menus // Menus
//-------
$this->menu = 1; // This module add menu entries. They are coded into menu manager. $this->menu = 1; // This module add menu entries. They are coded into menu manager.
// Exports // Exports
//--------
$r=0; $r=0;
$r++; $r++;
@@ -244,7 +244,6 @@ class modUser extends DolibarrModules
$this->export_sql_end[$r] .=' WHERE u.entity IN ('.getEntity('user').')'; $this->export_sql_end[$r] .=' WHERE u.entity IN ('.getEntity('user').')';
// Imports // Imports
//--------
$r=0; $r=0;
// Import list of users attributes // Import list of users attributes

View File

@@ -79,12 +79,10 @@ class modVariants extends DolibarrModules
// Dependencies // Dependencies
$this->hidden = false; // A condition to hide module $this->hidden = false; // A condition to hide module
$this->depends = array( $this->depends = array('modProduct'); // List of module class names as string that must be enabled if this module is enabled
'modProduct' $this->requiredby = array(); // List of module ids to disable if this one is disabled
); // List of modules id that must be enabled if this module is enabled $this->conflictwith = array(); // List of module class names as string this module is in conflict with
$this->requiredby = array(); // List of modules id to disable if this one is disabled $this->phpmin = array(5,4); // Minimum version of PHP required by module
$this->conflictwith = array(); // List of modules id this module is in conflict with
$this->phpmin = array(5,0); // Minimum version of PHP required by module
$this->need_dolibarr_version = array(3,0); // Minimum version of Dolibarr required by module $this->need_dolibarr_version = array(3,0); // Minimum version of Dolibarr required by module
$this->langfiles = array("products"); $this->langfiles = array("products");

View File

@@ -55,30 +55,26 @@ class modWebServices extends DolibarrModules
$this->dirs = array(); $this->dirs = array();
// Config pages // Config pages
//-------------
$this->config_page_url = array("index.php@webservices"); $this->config_page_url = array("index.php@webservices");
// Dependancies // Dependencies
//------------- $this->hidden = false; // A condition to hide module
$this->depends = array(); $this->depends = array(); // List of module class names as string that must be enabled if this module is enabled
$this->requiredby = array(); $this->requiredby = array(); // List of module ids to disable if this one is disabled
//$this->phpmax = array(7,1); // Maximum version of PHP required by module $this->conflictwith = array(); // List of module class names as string this module is in conflict with
$this->phpmin = array(5,4); // Minimum version of PHP required by module
$this->langfiles = array("other"); $this->langfiles = array("other");
// Constants // Constants
//-----------
$this->const = array(); $this->const = array();
// New pages on tabs // New pages on tabs
// -----------------
$this->tabs = array(); $this->tabs = array();
// Boxes // Boxes
//------
$this->boxes = array(); $this->boxes = array();
// Permissions // Permissions
//------------
$this->rights = array(); $this->rights = array();
$this->rights_class = 'webservices'; $this->rights_class = 'webservices';
$r=0; $r=0;

View File

@@ -55,29 +55,26 @@ class modWebServicesClient extends DolibarrModules
$this->dirs = array(); $this->dirs = array();
// Config pages // Config pages
//-------------
//$this->config_page_url = array(); //$this->config_page_url = array();
// Dependancies // Dependencies
//------------- $this->hidden = false; // A condition to hide module
$this->depends = array(); $this->depends = array(); // List of module class names as string that must be enabled if this module is enabled
$this->requiredby = array(); $this->requiredby = array(); // List of module ids to disable if this one is disabled
$this->conflictwith = array(); // List of module class names as string this module is in conflict with
$this->phpmin = array(5,4); // Minimum version of PHP required by module
$this->langfiles = array("other"); $this->langfiles = array("other");
// Constants // Constants
//-----------
$this->const = array(); $this->const = array();
// New pages on tabs // New pages on tabs
// -----------------
$this->tabs = array(); $this->tabs = array();
// Boxes // Boxes
//------
$this->boxes = array(); $this->boxes = array();
// Permissions // Permissions
//------------
$this->rights = array(); $this->rights = array();
$this->rights_class = 'syncsupplierwebservices'; $this->rights_class = 'syncsupplierwebservices';
$r=0; $r=0;

View File

@@ -61,27 +61,23 @@ class modWebsite extends DolibarrModules
$this->dirs = array("/website/temp"); $this->dirs = array("/website/temp");
// Config pages // Config pages
//-------------
$this->config_page_url = array('website.php'); $this->config_page_url = array('website.php');
// Dependancies // Dependencies
//-------------
$this->hidden = ! empty($conf->global->MODULE_WEBSITE_DISABLED); // A condition to disable module $this->hidden = ! empty($conf->global->MODULE_WEBSITE_DISABLED); // A condition to disable module
$this->depends = array('modFckeditor'); // List of modules id that must be enabled if this module is enabled $this->depends = array('modFckeditor'); // List of modules id that must be enabled if this module is enabled
$this->requiredby = array(); // List of modules id to disable if this one is disabled $this->requiredby = array(); // List of modules id to disable if this one is disabled
$this->conflictwith = array(); // List of modules id this module is in conflict with $this->conflictwith = array(); // List of modules id this module is in conflict with
$this->phpmin = array(5,4); // Minimum version of PHP required by module
$this->langfiles = array("website"); $this->langfiles = array("website");
// Constants // Constants
//-----------
$this->const = array(); $this->const = array();
// New pages on tabs // New pages on tabs
// -----------------
//$this->tabs[] = array(); // To add a new tab identified by code tabname1 //$this->tabs[] = array(); // To add a new tab identified by code tabname1
// Boxes // Boxes
//------
$this->boxes = array(); $this->boxes = array();
// Permissions // Permissions

View File

@@ -68,9 +68,11 @@ class modWorkflow extends DolibarrModules
$this->config_page_url = array('workflow.php'); $this->config_page_url = array('workflow.php');
// Dependencies // Dependencies
$this->depends = array(); // List of modules id that must be enabled if this module is enabled $this->hidden = false; // A condition to hide module
$this->requiredby = array(); // List of modules id to disable if this one is disabled $this->depends = array(); // List of module class names as string that must be enabled if this module is enabled
$this->phpmin = array(5,2); // Minimum version of PHP required by module $this->requiredby = array(); // List of module ids to disable if this one is disabled
$this->conflictwith = array(); // List of module class names as string this module is in conflict with
$this->phpmin = array(5,4); // Minimum version of PHP required by module
$this->need_dolibarr_version = array(2,8); // Minimum version of Dolibarr required by module $this->need_dolibarr_version = array(2,8); // Minimum version of Dolibarr required by module
$this->langfiles = array("@workflow"); $this->langfiles = array("@workflow");

View File

@@ -40,24 +40,83 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php';
*/ */
class pdf_azur extends ModelePDFPropales class pdf_azur extends ModelePDFPropales
{ {
var $db; /**
var $name; * @var DoliDb Database handler
var $description; */
var $update_main_doc_field; // Save the name of generated file as the main doc when generating a doc with this template public $db;
var $type;
/**
var $phpmin = array(4,3,0); // Minimum version of PHP required by module * @var string model name
var $version = 'dolibarr'; */
public $name;
var $page_largeur;
var $page_hauteur; /**
var $format; * @var string model description (short text)
var $marge_gauche; */
var $marge_droite; public $description;
var $marge_haute;
var $marge_basse; /**
* @var string Save the name of generated file as the main doc when generating a doc with this template
var $emetteur; // Objet societe qui emet */
public $update_main_doc_field;
/**
* @var string document type
*/
public $type;
/**
* @var array() Minimum version of PHP required by module.
* e.g.: PHP ≥ 5.4 = array(5, 4)
*/
public $phpmin = array(5, 4);
/**
* Dolibarr version of the loaded document
* @public string
*/
public $version = 'dolibarr';
/**
* @var int page_largeur
*/
public $page_largeur;
/**
* @var int page_hauteur
*/
public $page_hauteur;
/**
* @var array format
*/
public $format;
/**
* @var int marge_gauche
*/
public $marge_gauche;
/**
* @var int marge_droite
*/
public $marge_droite;
/**
* @var int marge_haute
*/
public $marge_haute;
/**
* @var int marge_basse
*/
public $marge_basse;
/**
* Issuer
* @var Objet societe qui emet
*/
public $emetteur;
/** /**

View File

@@ -36,23 +36,79 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php';
*/ */
class pdf_canelle extends ModelePDFSuppliersInvoices class pdf_canelle extends ModelePDFSuppliersInvoices
{ {
var $db; /**
var $name; * @var DoliDb Database handler
var $description; */
var $type; public $db;
var $phpmin = array(4,3,0); // Minimum version of PHP required by module /**
var $version = 'dolibarr'; * @var string model name
*/
var $page_largeur; public $name;
var $page_hauteur;
var $format; /**
var $marge_gauche; * @var string model description (short text)
var $marge_droite; */
var $marge_haute; public $description;
var $marge_basse;
/**
var $emetteur; // Objet societe qui emet * @var string document type
*/
public $type;
/**
* @var array() Minimum version of PHP required by module.
* e.g.: PHP ≥ 5.4 = array(5, 4)
*/
public $phpmin = array(5, 4);
/**
* Dolibarr version of the loaded document
* @public string
*/
public $version = 'dolibarr';
/**
* @var int page_largeur
*/
public $page_largeur;
/**
* @var int page_hauteur
*/
public $page_hauteur;
/**
* @var array format
*/
public $format;
/**
* @var int marge_gauche
*/
public $marge_gauche;
/**
* @var int marge_droite
*/
public $marge_droite;
/**
* @var int marge_haute
*/
public $marge_haute;
/**
* @var int marge_basse
*/
public $marge_basse;
/**
* Issuer
* @var Objet societe qui emet
*/
public $emetteur;
/** /**

View File

@@ -40,23 +40,78 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php';
*/ */
class pdf_muscadet extends ModelePDFSuppliersOrders class pdf_muscadet extends ModelePDFSuppliersOrders
{ {
var $db; /**
var $name; * @var DoliDb Database handler
var $description; */
var $type; public $db;
/**
* @var string model name
*/
public $name;
/**
* @var string model description (short text)
*/
public $description;
/**
* @var string document type
*/
public $type;
var $phpmin = array(4,3,0); // Minimum version of PHP required by module /**
var $version = 'dolibarr'; * @var array() Minimum version of PHP required by module.
* e.g.: PHP ≥ 5.4 = array(5, 4)
var $page_largeur; */
var $page_hauteur; public $phpmin = array(5, 4);
var $format;
var $marge_gauche; /**
var $marge_droite; * Dolibarr version of the loaded document
var $marge_haute; * @public string
var $marge_basse; */
public $version = 'dolibarr';
var $emetteur; // Objet societe qui emet
/**
* @var int page_largeur
*/
public $page_largeur;
/**
* @var int page_hauteur
*/
public $page_hauteur;
/**
* @var array format
*/
public $format;
/**
* @var int marge_gauche
*/
public $marge_gauche;
/**
* @var int marge_droite
*/
public $marge_droite;
/**
* @var int marge_haute
*/
public $marge_haute;
/**
* @var int marge_basse
*/
public $marge_basse;
/**
* Issuer
* @var Objet societe qui emet
*/
public $emetteur;
/** /**

View File

@@ -130,8 +130,8 @@ $dolibarr_main_url_root_alt=(empty($dolibarr_main_url_root_alt)?'':trim($dolibar
$dolibarr_main_document_root=trim($dolibarr_main_document_root); $dolibarr_main_document_root=trim($dolibarr_main_document_root);
$dolibarr_main_document_root_alt=(empty($dolibarr_main_document_root_alt)?'':trim($dolibarr_main_document_root_alt)); $dolibarr_main_document_root_alt=(empty($dolibarr_main_document_root_alt)?'':trim($dolibarr_main_document_root_alt));
if (empty($dolibarr_main_db_port)) $dolibarr_main_db_port=0; // Pour compatibilite avec anciennes configs, si non defini, on prend 'mysql' if (empty($dolibarr_main_db_port)) $dolibarr_main_db_port=3306; // For compatibility with old configs, if not defined, we take 'mysql' type
if (empty($dolibarr_main_db_type)) $dolibarr_main_db_type='mysqli'; // Pour compatibilite avec anciennes configs, si non defini, on prend 'mysql' if (empty($dolibarr_main_db_type)) $dolibarr_main_db_type='mysqli'; // For compatibility with old configs, if not defined, we take 'mysql' type
// Mysql driver support has been removed in favor of mysqli // Mysql driver support has been removed in favor of mysqli
if ($dolibarr_main_db_type == 'mysql') $dolibarr_main_db_type = 'mysqli'; if ($dolibarr_main_db_type == 'mysql') $dolibarr_main_db_type = 'mysqli';