Merge branch 'develop' of https://github.com/Dolibarr/dolibarr into develop
This commit is contained in:
commit
5738020883
@ -90,10 +90,10 @@ class Dolistore
|
|||||||
// Here we set the option array for the Webservice : we want products resources
|
// Here we set the option array for the Webservice : we want products resources
|
||||||
$opt = array();
|
$opt = array();
|
||||||
$opt['resource'] = 'products';
|
$opt['resource'] = 'products';
|
||||||
|
$opt2 = array();
|
||||||
|
|
||||||
// make a search to limit the id returned.
|
// make a search to limit the id returned.
|
||||||
if ($this->search != '') {
|
if ($this->search != '') {
|
||||||
$opt2 = array();
|
|
||||||
$opt2['url'] = $conf->global->MAIN_MODULE_DOLISTORE_API_SRV.'/api/search?query='.$this->search.'&language='.$this->lang;
|
$opt2['url'] = $conf->global->MAIN_MODULE_DOLISTORE_API_SRV.'/api/search?query='.$this->search.'&language='.$this->lang;
|
||||||
|
|
||||||
// Call
|
// Call
|
||||||
@ -109,7 +109,6 @@ class Dolistore
|
|||||||
}
|
}
|
||||||
$opt['filter[id]'] = '['.implode('|', $products).']';
|
$opt['filter[id]'] = '['.implode('|', $products).']';
|
||||||
} elseif ($this->categorie != 0) {
|
} elseif ($this->categorie != 0) {
|
||||||
$opt2 = array();
|
|
||||||
$opt2['resource'] = 'categories';
|
$opt2['resource'] = 'categories';
|
||||||
$opt2['id'] = $this->categorie;
|
$opt2['id'] = $this->categorie;
|
||||||
// Call
|
// Call
|
||||||
|
|||||||
@ -630,7 +630,7 @@ class ExtraFields
|
|||||||
private function update_label($attrname,$label,$type,$size,$elementtype,$unique=0,$required=0,$pos=0,$param='',$alwayseditable=0,$perms='',$list='0',$help='',$default='',$computed='',$entity='',$langfile='',$enabled='1')
|
private function update_label($attrname,$label,$type,$size,$elementtype,$unique=0,$required=0,$pos=0,$param='',$alwayseditable=0,$perms='',$list='0',$help='',$default='',$computed='',$entity='',$langfile='',$enabled='1')
|
||||||
{
|
{
|
||||||
global $conf, $user;
|
global $conf, $user;
|
||||||
dol_syslog(get_class($this)."::update_label ".$attrname.", ".$label.", ".$type.", ".$size.", ".$elementtype.", ".$unique.", ".$required.", ".$pos.", ".$alwayseditable.", ".$perms.", ".$list.", ".$notused.", ".$default.", ".$computed.", ".$entity.", ".$langfile.", ".$enabled);
|
dol_syslog(get_class($this)."::update_label ".$attrname.", ".$label.", ".$type.", ".$size.", ".$elementtype.", ".$unique.", ".$required.", ".$pos.", ".$alwayseditable.", ".$perms.", ".$list.", ".$default.", ".$computed.", ".$entity.", ".$langfile.", ".$enabled);
|
||||||
|
|
||||||
// Clean parameters
|
// Clean parameters
|
||||||
if ($elementtype == 'thirdparty') $elementtype='societe';
|
if ($elementtype == 'thirdparty') $elementtype='societe';
|
||||||
|
|||||||
@ -1292,7 +1292,7 @@ class Form
|
|||||||
* @param int $socid Id ot third party or 0 for all
|
* @param int $socid Id ot third party or 0 for all
|
||||||
* @param string $selected Id contact pre-selectionne
|
* @param string $selected Id contact pre-selectionne
|
||||||
* @param string $htmlname Name of HTML field ('none' for a not editable field)
|
* @param string $htmlname Name of HTML field ('none' for a not editable field)
|
||||||
* @param int $showempty 0=no empty value, 1=add an empty value
|
* @param int $showempty 0=no empty value, 1=add an empty value, 2=add line 'Internal' (used by user edit), 3=add an empty value only if more than one record into list
|
||||||
* @param string $exclude List of contacts id to exclude
|
* @param string $exclude List of contacts id to exclude
|
||||||
* @param string $limitto Disable answers that are not id in this array list
|
* @param string $limitto Disable answers that are not id in this array list
|
||||||
* @param integer $showfunction Add function into label
|
* @param integer $showfunction Add function into label
|
||||||
@ -1316,10 +1316,10 @@ class Form
|
|||||||
* Return HTML code of the SELECT of list of all contacts (for a third party or all).
|
* Return HTML code of the SELECT of list of all contacts (for a third party or all).
|
||||||
* This also set the number of contacts found into $this->num
|
* This also set the number of contacts found into $this->num
|
||||||
*
|
*
|
||||||
* @param int $socid Id ot third party or 0 for all
|
* @param int $socid Id ot third party or 0 for all or -1 for empty list
|
||||||
* @param array|int $selected Array of ID of pre-selected contact id
|
* @param array|int $selected Array of ID of pre-selected contact id
|
||||||
* @param string $htmlname Name of HTML field ('none' for a not editable field)
|
* @param string $htmlname Name of HTML field ('none' for a not editable field)
|
||||||
* @param int $showempty 0=no empty value, 1=add an empty value, 2=add line 'Internal' (used by user edit)
|
* @param int $showempty 0=no empty value, 1=add an empty value, 2=add line 'Internal' (used by user edit), 3=add an empty value only if more than one record into list
|
||||||
* @param string $exclude List of contacts id to exclude
|
* @param string $exclude List of contacts id to exclude
|
||||||
* @param string $limitto Disable answers that are not id in this array list
|
* @param string $limitto Disable answers that are not id in this array list
|
||||||
* @param integer $showfunction Add function into label
|
* @param integer $showfunction Add function into label
|
||||||
@ -1351,7 +1351,7 @@ class Form
|
|||||||
$sql.= " FROM ".MAIN_DB_PREFIX ."socpeople as sp";
|
$sql.= " FROM ".MAIN_DB_PREFIX ."socpeople as sp";
|
||||||
if ($showsoc > 0) $sql.= " LEFT OUTER JOIN ".MAIN_DB_PREFIX ."societe as s ON s.rowid=sp.fk_soc";
|
if ($showsoc > 0) $sql.= " LEFT OUTER JOIN ".MAIN_DB_PREFIX ."societe as s ON s.rowid=sp.fk_soc";
|
||||||
$sql.= " WHERE sp.entity IN (".getEntity('socpeople').")";
|
$sql.= " WHERE sp.entity IN (".getEntity('socpeople').")";
|
||||||
if ($socid > 0) $sql.= " AND sp.fk_soc=".$socid;
|
if ($socid > 0 || $socid == -1) $sql.= " AND sp.fk_soc=".$socid;
|
||||||
if (! empty($conf->global->CONTACT_HIDE_INACTIVE_IN_COMBOBOX)) $sql.= " AND sp.statut <> 0";
|
if (! empty($conf->global->CONTACT_HIDE_INACTIVE_IN_COMBOBOX)) $sql.= " AND sp.statut <> 0";
|
||||||
$sql.= " ORDER BY sp.lastname ASC";
|
$sql.= " ORDER BY sp.lastname ASC";
|
||||||
|
|
||||||
@ -1368,7 +1368,7 @@ class Form
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($htmlname != 'none' || $options_only) $out.= '<select class="flat'.($moreclass?' '.$moreclass:'').'" id="'.$htmlid.'" name="'.$htmlname.($multiple ? '[]' : '').'" '.($multiple ? 'multiple' : '').' '.(!empty($moreparam) ? $moreparam : '').'>';
|
if ($htmlname != 'none' || $options_only) $out.= '<select class="flat'.($moreclass?' '.$moreclass:'').'" id="'.$htmlid.'" name="'.$htmlname.($multiple ? '[]' : '').'" '.($multiple ? 'multiple' : '').' '.(!empty($moreparam) ? $moreparam : '').'>';
|
||||||
if ($showempty == 1 && !$multiple) $out.= '<option value="0"'.(in_array(0,$selected)?' selected':'').'> </option>';
|
if (($showempty == 1 || ($showempty == 3 && $num > 1)) && !$multiple) $out.= '<option value="0"'.(in_array(0,$selected)?' selected':'').'> </option>';
|
||||||
if ($showempty == 2) $out.= '<option value="0"'.(in_array(0,$selected)?' selected':'').'>'.$langs->trans("Internal").'</option>';
|
if ($showempty == 2) $out.= '<option value="0"'.(in_array(0,$selected)?' selected':'').'>'.$langs->trans("Internal").'</option>';
|
||||||
$num = $this->db->num_rows($resql);
|
$num = $this->db->num_rows($resql);
|
||||||
$i = 0;
|
$i = 0;
|
||||||
@ -1426,7 +1426,9 @@ class Form
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$out.= '<option value="-1"'.($showempty==2 || $multiple?'':' selected').' disabled>'.$langs->trans($socid?"NoContactDefinedForThirdParty":"NoContactDefined").'</option>';
|
$out.= '<option value="-1"'.(($showempty==2 || $multiple) ? '' : ' selected').' disabled>';
|
||||||
|
$out.= ($socid != -1) ? ($langs->trans($socid?"NoContactDefinedForThirdParty":"NoContactDefined")) : $langs->trans('SelectAThirdPartyFirst');
|
||||||
|
$out.= '</option>';
|
||||||
}
|
}
|
||||||
if ($htmlname != 'none' || $options_only)
|
if ($htmlname != 'none' || $options_only)
|
||||||
{
|
{
|
||||||
@ -6170,6 +6172,7 @@ class Form
|
|||||||
|
|
||||||
$linktoelem='';
|
$linktoelem='';
|
||||||
$linktoelemlist='';
|
$linktoelemlist='';
|
||||||
|
$listofidcompanytoscan='';
|
||||||
|
|
||||||
if (! is_object($object->thirdparty)) $object->fetch_thirdparty();
|
if (! is_object($object->thirdparty)) $object->fetch_thirdparty();
|
||||||
|
|
||||||
|
|||||||
@ -934,7 +934,7 @@ class FormMail extends Form
|
|||||||
$url=getOnlinePaymentUrl(0, $typeforonlinepayment, $this->substit['__REF__']);
|
$url=getOnlinePaymentUrl(0, $typeforonlinepayment, $this->substit['__REF__']);
|
||||||
$paymenturl=$url;
|
$paymenturl=$url;
|
||||||
|
|
||||||
$validpaymentmethod = getValidOnlinePaymentMethods($paymentmethod);
|
$validpaymentmethod = getValidOnlinePaymentMethods('');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (count($validpaymentmethod) > 0 && $paymenturl)
|
if (count($validpaymentmethod) > 0 && $paymenturl)
|
||||||
|
|||||||
@ -239,9 +239,9 @@ class FormTicket
|
|||||||
|
|
||||||
// Contact and type
|
// Contact and type
|
||||||
print '<tr><td>' . $langs->trans("Contact") . '</td><td>';
|
print '<tr><td>' . $langs->trans("Contact") . '</td><td>';
|
||||||
// If no socid, set to first one (id=1) to avoid full contacts list
|
// If no socid, set to -1 to avoid full contacts list
|
||||||
$selectedCompany = $this->withfromsocid > 0 ? $this->withfromsocid : 1;
|
$selectedCompany = ($this->withfromsocid > 0) ? $this->withfromsocid : -1;
|
||||||
$nbofcontacts = $form->select_contacts($selectedCompany, $this->withfromcontactid, 'contactid', 0, '', '', 0, 'minwidth200');
|
$nbofcontacts = $form->select_contacts($selectedCompany, $this->withfromcontactid, 'contactid', 3, '', '', 0, 'minwidth200');
|
||||||
$formcompany->selectTypeContact($ticketstatic, '', 'type', 'external', '', 0, 'maginleftonly');
|
$formcompany->selectTypeContact($ticketstatic, '', 'type', 'external', '', 0, 'maginleftonly');
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@ -7666,3 +7666,15 @@ function isVisibleToUserType($type_user, &$menuentry, &$listofmodulesforexternal
|
|||||||
if (! $menuentry['perms']) return 2; // No permissions and user is external
|
if (! $menuentry['perms']) return 2; // No permissions and user is external
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Round to next multiple.
|
||||||
|
*
|
||||||
|
* @param double $n Number to round up
|
||||||
|
* @param integer $x Multiple. For example 60 to round up to nearest exact minute for a date with seconds.
|
||||||
|
* @return integer Value rounded.
|
||||||
|
*/
|
||||||
|
function roundUpToNextMultiple($n, $x=5)
|
||||||
|
{
|
||||||
|
return (ceil($n)%$x === 0) ? ceil($n) : round(($n+$x/2)/$x)*$x;
|
||||||
|
}
|
||||||
|
|||||||
@ -84,9 +84,9 @@ function holiday_admin_prepare_head()
|
|||||||
// Entries must be declared in modules descriptor with line
|
// Entries must be declared in modules descriptor with line
|
||||||
// $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 add new tab
|
||||||
// $this->tabs = array('entity:-tabname); to remove a tab
|
// $this->tabs = array('entity:-tabname); to remove a tab
|
||||||
complete_head_from_modules($conf,$langs,$object,$head,$h,'holiday_admin');
|
complete_head_from_modules($conf,$langs,null,$head,$h,'holiday_admin');
|
||||||
|
|
||||||
complete_head_from_modules($conf,$langs,$object,$head,$h,'holiday_admin','remove');
|
complete_head_from_modules($conf,$langs,null,$head,$h,'holiday_admin','remove');
|
||||||
|
|
||||||
return $head;
|
return $head;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -90,7 +90,7 @@ function payment_supplier_prepare_head(Paiement $object) {
|
|||||||
/**
|
/**
|
||||||
* Return array of valid payment mode
|
* Return array of valid payment mode
|
||||||
*
|
*
|
||||||
* @param string $paymentmethod Filter on this payment method
|
* @param string $paymentmethod Filter on this payment method (''=none, 'paypal', ...)
|
||||||
* @return array Array of valid payment method
|
* @return array Array of valid payment method
|
||||||
*/
|
*/
|
||||||
function getValidOnlinePaymentMethods($paymentmethod='')
|
function getValidOnlinePaymentMethods($paymentmethod='')
|
||||||
|
|||||||
@ -100,11 +100,8 @@ class CommActionRapport
|
|||||||
// For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO
|
// For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO
|
||||||
if (! empty($conf->global->MAIN_USE_FPDF)) $outputlangs->charset_output='ISO-8859-1';
|
if (! empty($conf->global->MAIN_USE_FPDF)) $outputlangs->charset_output='ISO-8859-1';
|
||||||
|
|
||||||
$outputlangs->load("main");
|
// Load traductions files requiredby by page
|
||||||
$outputlangs->load("dict");
|
$outputlangs->loadLangs(array("main", "dict", "companies", "bills", "products"));
|
||||||
$outputlangs->load("companies");
|
|
||||||
$outputlangs->load("bills");
|
|
||||||
$outputlangs->load("products");
|
|
||||||
|
|
||||||
$dir = $conf->agenda->dir_temp."/";
|
$dir = $conf->agenda->dir_temp."/";
|
||||||
$file = $dir . "actions-".$this->month."-".$this->year.".pdf";
|
$file = $dir . "actions-".$this->month."-".$this->year.".pdf";
|
||||||
|
|||||||
@ -100,10 +100,8 @@ class pdf_ban extends ModeleBankAccountDoc
|
|||||||
// For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO
|
// For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO
|
||||||
if (! empty($conf->global->MAIN_USE_FPDF)) $outputlangs->charset_output='ISO-8859-1';
|
if (! empty($conf->global->MAIN_USE_FPDF)) $outputlangs->charset_output='ISO-8859-1';
|
||||||
|
|
||||||
$outputlangs->load("main");
|
// Load traductions files requiredby by page
|
||||||
$outputlangs->load("dict");
|
$outputlangs->loadLangs(array("main", "dict", "companies", "projects"));
|
||||||
$outputlangs->load("companies");
|
|
||||||
$outputlangs->load("projects");
|
|
||||||
|
|
||||||
if ($conf->bank->dir_output)
|
if ($conf->bank->dir_output)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -45,8 +45,8 @@ class BordereauChequeBlochet extends ModeleChequeReceipts
|
|||||||
{
|
{
|
||||||
global $conf,$langs,$mysoc;
|
global $conf,$langs,$mysoc;
|
||||||
|
|
||||||
$langs->load("main");
|
// Load traductions files requiredby by page
|
||||||
$langs->load("bills");
|
$langs->loadLangs(array("main", "bills"));
|
||||||
|
|
||||||
$this->db = $db;
|
$this->db = $db;
|
||||||
$this->name = "blochet";
|
$this->name = "blochet";
|
||||||
@ -92,11 +92,8 @@ class BordereauChequeBlochet extends ModeleChequeReceipts
|
|||||||
$sav_charset_output=$outputlangs->charset_output;
|
$sav_charset_output=$outputlangs->charset_output;
|
||||||
if (! empty($conf->global->MAIN_USE_FPDF)) $outputlangs->charset_output='ISO-8859-1';
|
if (! empty($conf->global->MAIN_USE_FPDF)) $outputlangs->charset_output='ISO-8859-1';
|
||||||
|
|
||||||
$outputlangs->load("main");
|
// Load traductions files requiredby by page
|
||||||
$outputlangs->load("companies");
|
$outputlangs->loadLangs(array("main", "companies", "bills", "products", "compta"));
|
||||||
$outputlangs->load("bills");
|
|
||||||
$outputlangs->load("products");
|
|
||||||
$outputlangs->load("compta");
|
|
||||||
|
|
||||||
$dir = $_dir . "/".get_exdir($number,0,1,0,$object,'cheque').$number;
|
$dir = $_dir . "/".get_exdir($number,0,1,0,$object,'cheque').$number;
|
||||||
|
|
||||||
@ -214,8 +211,8 @@ class BordereauChequeBlochet extends ModeleChequeReceipts
|
|||||||
global $langs;
|
global $langs;
|
||||||
$default_font_size = pdf_getPDFFontSize($outputlangs);
|
$default_font_size = pdf_getPDFFontSize($outputlangs);
|
||||||
|
|
||||||
$outputlangs->load("compta");
|
// Load traductions files requiredby by page
|
||||||
$outputlangs->load("banks");
|
$outputlangs->loadLangs(array("compta", "banks"));
|
||||||
|
|
||||||
$title = $outputlangs->transnoentities("CheckReceipt");
|
$title = $outputlangs->transnoentities("CheckReceipt");
|
||||||
$pdf->SetFont('','B', $default_font_size);
|
$pdf->SetFont('','B', $default_font_size);
|
||||||
@ -391,4 +388,3 @@ class BordereauChequeBlochet extends ModeleChequeReceipts
|
|||||||
return pdf_pagefoot($pdf,$outputlangs,$newfreetext,$this->emetteur,$this->marge_basse,$this->marge_gauche,$this->page_hauteur,$object,$showdetails,$hidefreetext);
|
return pdf_pagefoot($pdf,$outputlangs,$newfreetext,$this->emetteur,$this->marge_basse,$this->marge_gauche,$this->page_hauteur,$object,$showdetails,$hidefreetext);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -68,9 +68,9 @@ class pdf_einstein extends ModelePDFCommandes
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @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 = array(5, 2);
|
public $phpmin = array(5, 4);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Dolibarr version of the loaded document
|
* Dolibarr version of the loaded document
|
||||||
@ -78,14 +78,45 @@ class pdf_einstein extends ModelePDFCommandes
|
|||||||
*/
|
*/
|
||||||
public $version = 'dolibarr';
|
public $version = 'dolibarr';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var int page_largeur
|
||||||
|
*/
|
||||||
public $page_largeur;
|
public $page_largeur;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var int page_hauteur
|
||||||
|
*/
|
||||||
public $page_hauteur;
|
public $page_hauteur;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var array format
|
||||||
|
*/
|
||||||
public $format;
|
public $format;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var int marge_gauche
|
||||||
|
*/
|
||||||
public $marge_gauche;
|
public $marge_gauche;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var int marge_droite
|
||||||
|
*/
|
||||||
public $marge_droite;
|
public $marge_droite;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var int marge_haute
|
||||||
|
*/
|
||||||
public $marge_haute;
|
public $marge_haute;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var int marge_basse
|
||||||
|
*/
|
||||||
public $marge_basse;
|
public $marge_basse;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Issuer
|
||||||
|
* @var Societe
|
||||||
|
*/
|
||||||
public $emetteur; // Objet societe qui emet
|
public $emetteur; // Objet societe qui emet
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -39,21 +39,72 @@ require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
|
|||||||
*/
|
*/
|
||||||
class pdf_strato extends ModelePDFContract
|
class pdf_strato extends ModelePDFContract
|
||||||
{
|
{
|
||||||
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
|
||||||
|
*/
|
||||||
|
public $name;
|
||||||
|
|
||||||
var $page_largeur;
|
/**
|
||||||
var $page_hauteur;
|
* @var string model description (short text)
|
||||||
var $format;
|
*/
|
||||||
var $marge_gauche;
|
public $description;
|
||||||
var $marge_droite;
|
|
||||||
var $marge_haute;
|
/**
|
||||||
var $marge_basse;
|
* @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
|
* Issuer
|
||||||
|
|||||||
@ -33,11 +33,82 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php';
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Classe permettant de generer les borderaux envoi au modele Merou
|
* Class to build sending documents with model Merou
|
||||||
*/
|
*/
|
||||||
class pdf_merou extends ModelePdfExpedition
|
class pdf_merou extends ModelePdfExpedition
|
||||||
{
|
{
|
||||||
var $emetteur; // Objet societe qui emet
|
/**
|
||||||
|
* @var DoliDb Database handler
|
||||||
|
*/
|
||||||
|
public $db;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var string model name
|
||||||
|
*/
|
||||||
|
public $name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var string model description (short text)
|
||||||
|
*/
|
||||||
|
public $description;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @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 Societe
|
||||||
|
*/
|
||||||
|
public $emetteur;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -65,7 +136,7 @@ class pdf_merou extends ModelePdfExpedition
|
|||||||
|
|
||||||
$this->option_logo = 1;
|
$this->option_logo = 1;
|
||||||
|
|
||||||
// Recupere emmetteur
|
// Get source company
|
||||||
$this->emetteur=$mysoc;
|
$this->emetteur=$mysoc;
|
||||||
if (! $this->emetteur->country_code) $this->emetteur->country_code=substr($langs->defaultlang,-2); // By default if not defined
|
if (! $this->emetteur->country_code) $this->emetteur->country_code=substr($langs->defaultlang,-2); // By default if not defined
|
||||||
}
|
}
|
||||||
|
|||||||
@ -32,11 +32,82 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php';
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Classe permettant de generer les borderaux envoi au modele Rouget
|
* Class to build sending documents with model Rouget
|
||||||
*/
|
*/
|
||||||
class pdf_rouget extends ModelePdfExpedition
|
class pdf_rouget extends ModelePdfExpedition
|
||||||
{
|
{
|
||||||
var $emetteur; // Objet societe qui emet
|
/**
|
||||||
|
* @var DoliDb Database handler
|
||||||
|
*/
|
||||||
|
public $db;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var string model name
|
||||||
|
*/
|
||||||
|
public $name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var string model description (short text)
|
||||||
|
*/
|
||||||
|
public $description;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @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 Societe
|
||||||
|
*/
|
||||||
|
public $emetteur; // Objet societe qui emet
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -58,18 +58,58 @@ class pdf_standard extends ModeleExpenseReport
|
|||||||
*/
|
*/
|
||||||
public $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)
|
||||||
|
*/
|
||||||
|
public $phpmin = array(5, 4);
|
||||||
|
|
||||||
var $page_largeur;
|
/**
|
||||||
var $page_hauteur;
|
* Dolibarr version of the loaded document
|
||||||
var $format;
|
* @public string
|
||||||
var $marge_gauche;
|
*/
|
||||||
var $marge_droite;
|
public $version = 'dolibarr';
|
||||||
var $marge_haute;
|
|
||||||
var $marge_basse;
|
|
||||||
|
|
||||||
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 Societe
|
||||||
|
*/
|
||||||
|
public $emetteur; // Objet societe qui emet
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -69,9 +69,9 @@ class pdf_crabe extends ModelePDFFactures
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @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 = array(5, 2);
|
public $phpmin = array(5, 4);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Dolibarr version of the loaded document
|
* Dolibarr version of the loaded document
|
||||||
@ -79,14 +79,45 @@ class pdf_crabe extends ModelePDFFactures
|
|||||||
*/
|
*/
|
||||||
public $version = 'dolibarr';
|
public $version = 'dolibarr';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var int page_largeur
|
||||||
|
*/
|
||||||
public $page_largeur;
|
public $page_largeur;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var int page_hauteur
|
||||||
|
*/
|
||||||
public $page_hauteur;
|
public $page_hauteur;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var array format
|
||||||
|
*/
|
||||||
public $format;
|
public $format;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var int marge_gauche
|
||||||
|
*/
|
||||||
public $marge_gauche;
|
public $marge_gauche;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var int marge_droite
|
||||||
|
*/
|
||||||
public $marge_droite;
|
public $marge_droite;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var int marge_haute
|
||||||
|
*/
|
||||||
public $marge_haute;
|
public $marge_haute;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var int marge_basse
|
||||||
|
*/
|
||||||
public $marge_basse;
|
public $marge_basse;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Issuer
|
||||||
|
* @var Societe
|
||||||
|
*/
|
||||||
public $emetteur; // Objet societe qui emet
|
public $emetteur; // Objet societe qui emet
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -38,21 +38,78 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
|
|||||||
*/
|
*/
|
||||||
class pdf_soleil extends ModelePDFFicheinter
|
class pdf_soleil extends ModelePDFFicheinter
|
||||||
{
|
{
|
||||||
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
|
||||||
|
*/
|
||||||
|
public $name;
|
||||||
|
|
||||||
var $page_largeur;
|
/**
|
||||||
var $page_hauteur;
|
* @var string model description (short text)
|
||||||
var $format;
|
*/
|
||||||
var $marge_gauche;
|
public $description;
|
||||||
var $marge_droite;
|
|
||||||
var $marge_haute;
|
/**
|
||||||
var $marge_basse;
|
* @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 Societe
|
||||||
|
*/
|
||||||
|
public $emetteur; // Objet societe qui emet
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor
|
* Constructor
|
||||||
@ -496,10 +553,8 @@ class pdf_soleil extends ModelePDFFicheinter
|
|||||||
global $conf,$langs;
|
global $conf,$langs;
|
||||||
$default_font_size = pdf_getPDFFontSize($outputlangs);
|
$default_font_size = pdf_getPDFFontSize($outputlangs);
|
||||||
|
|
||||||
$outputlangs->load("main");
|
// Load traductions files requiredby by page
|
||||||
$outputlangs->load("dict");
|
$outputlangs->loadLangs(array("main", "dict", "companies", "interventions"));
|
||||||
$outputlangs->load("companies");
|
|
||||||
$outputlangs->load("interventions");
|
|
||||||
|
|
||||||
pdf_pagehead($pdf,$outputlangs,$this->page_hauteur);
|
pdf_pagehead($pdf,$outputlangs,$this->page_hauteur);
|
||||||
|
|
||||||
|
|||||||
@ -324,11 +324,8 @@ class pdf_standard extends CommonStickerGenerator
|
|||||||
// For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO
|
// For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO
|
||||||
if (! empty($conf->global->MAIN_USE_FPDF)) $outputlangs->charset_output='ISO-8859-1';
|
if (! empty($conf->global->MAIN_USE_FPDF)) $outputlangs->charset_output='ISO-8859-1';
|
||||||
|
|
||||||
$outputlangs->load("main");
|
// Load traductions files requiredby by page
|
||||||
$outputlangs->load("dict");
|
$outputlangs->loadLangs(array("main", "dict", "companies", "admin", "members"));
|
||||||
$outputlangs->load("companies");
|
|
||||||
$outputlangs->load("admin");
|
|
||||||
$outputlangs->load("members");
|
|
||||||
|
|
||||||
if (empty($mode) || $mode == 'member')
|
if (empty($mode) || $mode == 'member')
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1,120 +0,0 @@
|
|||||||
<?php
|
|
||||||
/* Copyright (C) 2010-2014 Regis Houssin <regis.houssin@capnetworks.com>
|
|
||||||
* Copyright (C) 2014 Marcos García <marcosgdf@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
|
|
||||||
* 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/>.
|
|
||||||
* or see http://www.gnu.org/
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* \file htdocs/core/modules/project/modules_project.php
|
|
||||||
* \ingroup project
|
|
||||||
* \brief File that contain parent class for projects models
|
|
||||||
* and parent class for projects numbering models
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Classe mere des modeles de numerotation des references de projets
|
|
||||||
*/
|
|
||||||
abstract class ModeleNumRefTicket
|
|
||||||
{
|
|
||||||
public $error = '';
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Return if a module can be used or not
|
|
||||||
*
|
|
||||||
* @return boolean true if module can be used
|
|
||||||
*/
|
|
||||||
public function isEnabled()
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Renvoi la description par defaut du modele de numerotation
|
|
||||||
*
|
|
||||||
* @return string Texte descripif
|
|
||||||
*/
|
|
||||||
public function info()
|
|
||||||
{
|
|
||||||
global $langs;
|
|
||||||
$langs->load("ticket");
|
|
||||||
return $langs->trans("NoDescription");
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Renvoi un exemple de numerotation
|
|
||||||
*
|
|
||||||
* @return string Example
|
|
||||||
*/
|
|
||||||
public function getExample()
|
|
||||||
{
|
|
||||||
global $langs;
|
|
||||||
$langs->load("ticket");
|
|
||||||
return $langs->trans("NoExample");
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Test si les numeros deja en vigueur dans la base ne provoquent pas de
|
|
||||||
* de conflits qui empechera cette numerotation de fonctionner.
|
|
||||||
*
|
|
||||||
* @return boolean false si conflit, true si ok
|
|
||||||
*/
|
|
||||||
public function canBeActivated()
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Renvoi prochaine valeur attribuee
|
|
||||||
*
|
|
||||||
* @param Societe $objsoc Object third party
|
|
||||||
* @param Project $project Object project
|
|
||||||
* @return string Valeur
|
|
||||||
*/
|
|
||||||
public function getNextValue($objsoc, $project)
|
|
||||||
{
|
|
||||||
global $langs;
|
|
||||||
return $langs->trans("NotAvailable");
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Renvoi version du module numerotation
|
|
||||||
*
|
|
||||||
* @return string Valeur
|
|
||||||
*/
|
|
||||||
public function getVersion()
|
|
||||||
{
|
|
||||||
global $langs;
|
|
||||||
$langs->load("admin");
|
|
||||||
|
|
||||||
if ($this->version == 'development') {
|
|
||||||
return $langs->trans("VersionDevelopment");
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($this->version == 'experimental') {
|
|
||||||
return $langs->trans("VersionExperimental");
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($this->version == 'dolibarr') {
|
|
||||||
return DOL_VERSION;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($this->version) {
|
|
||||||
return $this->version;
|
|
||||||
}
|
|
||||||
|
|
||||||
return $langs->trans("NotAvailable");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -255,10 +255,8 @@ class pdf_standardlabel extends CommonStickerGenerator
|
|||||||
// For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO
|
// For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO
|
||||||
if (! empty($conf->global->MAIN_USE_FPDF)) $outputlangs->charset_output='ISO-8859-1';
|
if (! empty($conf->global->MAIN_USE_FPDF)) $outputlangs->charset_output='ISO-8859-1';
|
||||||
|
|
||||||
$outputlangs->load("main");
|
// Load traductions files requiredby by page
|
||||||
$outputlangs->load("dict");
|
$outputlangs->loadLangs(array("main", "dict", "companies", "admin"));
|
||||||
$outputlangs->load("companies");
|
|
||||||
$outputlangs->load("admin");
|
|
||||||
|
|
||||||
$title=$outputlangs->transnoentities('Labels');
|
$title=$outputlangs->transnoentities('Labels');
|
||||||
$keywords=$title." ".$outputlangs->convToOutputCharset($mysoc->name);
|
$keywords=$title." ".$outputlangs->convToOutputCharset($mysoc->name);
|
||||||
|
|||||||
@ -296,10 +296,8 @@ class pdf_tcpdflabel extends CommonStickerGenerator
|
|||||||
// For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO
|
// For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO
|
||||||
if (! empty($conf->global->MAIN_USE_FPDF)) $outputlangs->charset_output='ISO-8859-1';
|
if (! empty($conf->global->MAIN_USE_FPDF)) $outputlangs->charset_output='ISO-8859-1';
|
||||||
|
|
||||||
$outputlangs->load("main");
|
// Load traductions files requiredby by page
|
||||||
$outputlangs->load("dict");
|
$outputlangs->loadLangs(array("main", "dict", "companies", "admin"));
|
||||||
$outputlangs->load("companies");
|
|
||||||
$outputlangs->load("admin");
|
|
||||||
|
|
||||||
$title=$outputlangs->transnoentities('Labels');
|
$title=$outputlangs->transnoentities('Labels');
|
||||||
$keywords=$title." ".$outputlangs->convToOutputCharset($mysoc->name);
|
$keywords=$title." ".$outputlangs->convToOutputCharset($mysoc->name);
|
||||||
|
|||||||
@ -88,8 +88,8 @@ class pdf_standard extends ModelePDFProduct
|
|||||||
{
|
{
|
||||||
global $conf,$langs,$mysoc;
|
global $conf,$langs,$mysoc;
|
||||||
|
|
||||||
$langs->load("main");
|
// Load traductions files requiredby by page
|
||||||
$langs->load("companies");
|
$langs->loadLangs(array("main", "companies"));
|
||||||
|
|
||||||
$this->db = $db;
|
$this->db = $db;
|
||||||
$this->name = "standard";
|
$this->name = "standard";
|
||||||
@ -136,13 +136,8 @@ class pdf_standard extends ModelePDFProduct
|
|||||||
// For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO
|
// For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO
|
||||||
if (! empty($conf->global->MAIN_USE_FPDF)) $outputlangs->charset_output='ISO-8859-1';
|
if (! empty($conf->global->MAIN_USE_FPDF)) $outputlangs->charset_output='ISO-8859-1';
|
||||||
|
|
||||||
$outputlangs->load("main");
|
// Load traductions files requiredby by page
|
||||||
$outputlangs->load("dict");
|
$outputlangs->loadLangs(array("main", "dict", "companies", "bills", "products", "orders", "deliveries"));
|
||||||
$outputlangs->load("companies");
|
|
||||||
$outputlangs->load("bills");
|
|
||||||
$outputlangs->load("products");
|
|
||||||
$outputlangs->load("orders");
|
|
||||||
$outputlangs->load("deliveries");
|
|
||||||
|
|
||||||
$nblignes = count($object->lines);
|
$nblignes = count($object->lines);
|
||||||
|
|
||||||
@ -688,11 +683,9 @@ class pdf_standard extends ModelePDFProduct
|
|||||||
{
|
{
|
||||||
global $conf,$langs,$hookmanager;
|
global $conf,$langs,$hookmanager;
|
||||||
|
|
||||||
$outputlangs->load("main");
|
// Load traductions files requiredby by page
|
||||||
$outputlangs->load("bills");
|
$outputlangs->loadLangs(array("main", "propal", "companies", "bills", "orders"));
|
||||||
$outputlangs->load("propal");
|
|
||||||
$outputlangs->load("companies");
|
|
||||||
$outputlangs->load("orders");
|
|
||||||
$default_font_size = pdf_getPDFFontSize($outputlangs);
|
$default_font_size = pdf_getPDFFontSize($outputlangs);
|
||||||
|
|
||||||
if ($object->type == 1) $titlekey='ServiceSheet';
|
if ($object->type == 1) $titlekey='ServiceSheet';
|
||||||
|
|||||||
@ -180,10 +180,8 @@ class pdf_baleine extends ModelePDFProjects
|
|||||||
// For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO
|
// For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO
|
||||||
if (! empty($conf->global->MAIN_USE_FPDF)) $outputlangs->charset_output='ISO-8859-1';
|
if (! empty($conf->global->MAIN_USE_FPDF)) $outputlangs->charset_output='ISO-8859-1';
|
||||||
|
|
||||||
$outputlangs->load("main");
|
// Load traductions files requiredby by page
|
||||||
$outputlangs->load("dict");
|
$outputlangs->loadLangs(array("main", "dict", "companies", "projects"));
|
||||||
$outputlangs->load("companies");
|
|
||||||
$outputlangs->load("projects");
|
|
||||||
|
|
||||||
if ($conf->projet->dir_output)
|
if ($conf->projet->dir_output)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -127,10 +127,8 @@ class pdf_beluga extends ModelePDFProjects
|
|||||||
// For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO
|
// For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO
|
||||||
if (! empty($conf->global->MAIN_USE_FPDF)) $outputlangs->charset_output='ISO-8859-1';
|
if (! empty($conf->global->MAIN_USE_FPDF)) $outputlangs->charset_output='ISO-8859-1';
|
||||||
|
|
||||||
$outputlangs->load("main");
|
// Load traductions files requiredby by page
|
||||||
$outputlangs->load("dict");
|
$outputlangs->loadLangs(array("main", "dict", "companies", "projects"));
|
||||||
$outputlangs->load("companies");
|
|
||||||
$outputlangs->load("projects");
|
|
||||||
|
|
||||||
if ($conf->projet->dir_output)
|
if ($conf->projet->dir_output)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -108,10 +108,8 @@ class pdf_timespent extends ModelePDFProjects
|
|||||||
// For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO
|
// For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO
|
||||||
if (! empty($conf->global->MAIN_USE_FPDF)) $outputlangs->charset_output='ISO-8859-1';
|
if (! empty($conf->global->MAIN_USE_FPDF)) $outputlangs->charset_output='ISO-8859-1';
|
||||||
|
|
||||||
$outputlangs->load("main");
|
// Load traductions files requiredby by page
|
||||||
$outputlangs->load("dict");
|
$outputlangs->loadLangs(array("main", "dict", "companies", "projects"));
|
||||||
$outputlangs->load("companies");
|
|
||||||
$outputlangs->load("projects");
|
|
||||||
|
|
||||||
if ($conf->projet->dir_output)
|
if ($conf->projet->dir_output)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -220,12 +220,8 @@ class pdf_azur extends ModelePDFPropales
|
|||||||
// For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO
|
// For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO
|
||||||
if (! empty($conf->global->MAIN_USE_FPDF)) $outputlangs->charset_output='ISO-8859-1';
|
if (! empty($conf->global->MAIN_USE_FPDF)) $outputlangs->charset_output='ISO-8859-1';
|
||||||
|
|
||||||
$outputlangs->load("main");
|
// Load traductions files requiredby by page
|
||||||
$outputlangs->load("dict");
|
$outputlangs->loadLangs(array("main", "dict", "companies", "bills", "propal", "products"));
|
||||||
$outputlangs->load("companies");
|
|
||||||
$outputlangs->load("bills");
|
|
||||||
$outputlangs->load("propal");
|
|
||||||
$outputlangs->load("products");
|
|
||||||
|
|
||||||
$nblignes = count($object->lines);
|
$nblignes = count($object->lines);
|
||||||
|
|
||||||
@ -1437,10 +1433,8 @@ class pdf_azur extends ModelePDFPropales
|
|||||||
{
|
{
|
||||||
global $conf,$langs;
|
global $conf,$langs;
|
||||||
|
|
||||||
$outputlangs->load("main");
|
// Load traductions files requiredby by page
|
||||||
$outputlangs->load("bills");
|
$outputlangs->loadLangs(array("main", "propal", "companies", "bills"));
|
||||||
$outputlangs->load("propal");
|
|
||||||
$outputlangs->load("companies");
|
|
||||||
|
|
||||||
$default_font_size = pdf_getPDFFontSize($outputlangs);
|
$default_font_size = pdf_getPDFFontSize($outputlangs);
|
||||||
|
|
||||||
|
|||||||
@ -88,8 +88,8 @@ class pdf_standard extends ModelePDFStock
|
|||||||
{
|
{
|
||||||
global $conf,$langs,$mysoc;
|
global $conf,$langs,$mysoc;
|
||||||
|
|
||||||
$langs->load("main");
|
// Load traductions files requiredby by page
|
||||||
$langs->load("companies");
|
$langs->loadLangs(array("main", "companies"));
|
||||||
|
|
||||||
$this->db = $db;
|
$this->db = $db;
|
||||||
$this->name = "standard";
|
$this->name = "standard";
|
||||||
@ -165,13 +165,8 @@ class pdf_standard extends ModelePDFStock
|
|||||||
// For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO
|
// For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO
|
||||||
if (! empty($conf->global->MAIN_USE_FPDF)) $outputlangs->charset_output='ISO-8859-1';
|
if (! empty($conf->global->MAIN_USE_FPDF)) $outputlangs->charset_output='ISO-8859-1';
|
||||||
|
|
||||||
$outputlangs->load("main");
|
// Load traductions files requiredby by page
|
||||||
$outputlangs->load("dict");
|
$outputlangs->loadLangs(array("main", "dict", "companies", "bills", "stocks", "orders", "deliveries"));
|
||||||
$outputlangs->load("companies");
|
|
||||||
$outputlangs->load("bills");
|
|
||||||
$outputlangs->load("stocks");
|
|
||||||
$outputlangs->load("orders");
|
|
||||||
$outputlangs->load("deliveries");
|
|
||||||
|
|
||||||
$nblignes = count($object->lines);
|
$nblignes = count($object->lines);
|
||||||
|
|
||||||
@ -920,12 +915,9 @@ class pdf_standard extends ModelePDFStock
|
|||||||
{
|
{
|
||||||
global $conf,$langs,$db,$hookmanager;
|
global $conf,$langs,$db,$hookmanager;
|
||||||
|
|
||||||
$outputlangs->load("main");
|
// Load traductions files requiredby by page
|
||||||
$outputlangs->load("bills");
|
$outputlangs->loadLangs(array("main", "propal", "companies", "bills", "orders", "stocks"));
|
||||||
$outputlangs->load("propal");
|
|
||||||
$outputlangs->load("companies");
|
|
||||||
$outputlangs->load("orders");
|
|
||||||
$outputlangs->load("stocks");
|
|
||||||
$default_font_size = pdf_getPDFFontSize($outputlangs);
|
$default_font_size = pdf_getPDFFontSize($outputlangs);
|
||||||
|
|
||||||
if ($object->type == 1) $titlekey='ServiceSheet';
|
if ($object->type == 1) $titlekey='ServiceSheet';
|
||||||
|
|||||||
@ -89,8 +89,8 @@ class pdf_stdmovement extends ModelePDFMovement
|
|||||||
{
|
{
|
||||||
global $conf,$langs,$mysoc;
|
global $conf,$langs,$mysoc;
|
||||||
|
|
||||||
$langs->load("main");
|
// Load traductions files requiredby by page
|
||||||
$langs->load("companies");
|
$langs->loadLangs(array("main", "companies"));
|
||||||
|
|
||||||
$this->db = $db;
|
$this->db = $db;
|
||||||
$this->name = "stdmouvement";
|
$this->name = "stdmouvement";
|
||||||
@ -168,13 +168,8 @@ class pdf_stdmovement extends ModelePDFMovement
|
|||||||
// For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO
|
// For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO
|
||||||
if (! empty($conf->global->MAIN_USE_FPDF)) $outputlangs->charset_output='ISO-8859-1';
|
if (! empty($conf->global->MAIN_USE_FPDF)) $outputlangs->charset_output='ISO-8859-1';
|
||||||
|
|
||||||
$outputlangs->load("main");
|
// Load traductions files requiredby by page
|
||||||
$outputlangs->load("dict");
|
$outputlangs->loadLangs(array("main", "dict", "companies", "bills", "stocks", "orders", "deliveries"));
|
||||||
$outputlangs->load("companies");
|
|
||||||
$outputlangs->load("bills");
|
|
||||||
$outputlangs->load("stocks");
|
|
||||||
$outputlangs->load("orders");
|
|
||||||
$outputlangs->load("deliveries");
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* TODO: get from object
|
* TODO: get from object
|
||||||
@ -922,12 +917,9 @@ class pdf_stdmovement extends ModelePDFMovement
|
|||||||
{
|
{
|
||||||
global $conf,$langs,$db,$hookmanager;
|
global $conf,$langs,$db,$hookmanager;
|
||||||
|
|
||||||
$outputlangs->load("main");
|
// Load traductions files requiredby by page
|
||||||
$outputlangs->load("bills");
|
$outputlangs->loadLangs(array("main", "propal", "companies", "bills", "orders", "stocks"));
|
||||||
$outputlangs->load("propal");
|
|
||||||
$outputlangs->load("companies");
|
|
||||||
$outputlangs->load("orders");
|
|
||||||
$outputlangs->load("stocks");
|
|
||||||
$default_font_size = pdf_getPDFFontSize($outputlangs);
|
$default_font_size = pdf_getPDFFontSize($outputlangs);
|
||||||
|
|
||||||
if ($object->type == 1) $titlekey='ServiceSheet';
|
if ($object->type == 1) $titlekey='ServiceSheet';
|
||||||
|
|||||||
@ -128,7 +128,7 @@ if ($permission) {
|
|||||||
<?php $selectedCompany = $formcompany->selectCompaniesForNewContact($object, 'id', $selectedCompany, 'newcompany', '', 0, '', 'minwidth300imp'); ?>
|
<?php $selectedCompany = $formcompany->selectCompaniesForNewContact($object, 'id', $selectedCompany, 'newcompany', '', 0, '', 'minwidth300imp'); ?>
|
||||||
</div>
|
</div>
|
||||||
<div class="tagtd maxwidthonsmartphone noborderbottom">
|
<div class="tagtd maxwidthonsmartphone noborderbottom">
|
||||||
<?php $nbofcontacts=$form->select_contacts($selectedCompany, '', 'contactid', 0, '', '', 0, 'minwidth100imp'); ?>
|
<?php $nbofcontacts=$form->select_contacts(($selectedCompany > 0 ? $selectedCompany : -1), '', 'contactid', 3, '', '', 0, 'minwidth100imp'); ?>
|
||||||
</div>
|
</div>
|
||||||
<div class="tagtd maxwidthonsmartphone noborderbottom">
|
<div class="tagtd maxwidthonsmartphone noborderbottom">
|
||||||
<?php
|
<?php
|
||||||
|
|||||||
@ -947,4 +947,4 @@ AssignedTo=Assigned to
|
|||||||
Deletedraft=Delete draft
|
Deletedraft=Delete draft
|
||||||
ConfirmMassDraftDeletion=Draft mass delete confirmation
|
ConfirmMassDraftDeletion=Draft mass delete confirmation
|
||||||
FileSharedViaALink=File shared via a link
|
FileSharedViaALink=File shared via a link
|
||||||
|
SelectAThirdPartyFirst=Select a third party first...
|
||||||
|
|||||||
@ -198,7 +198,8 @@ TicketMessageMailSignatureLabelAdmin=Signature of response email
|
|||||||
TicketMessageMailSignatureHelpAdmin=This text will be inserted after the response message.
|
TicketMessageMailSignatureHelpAdmin=This text will be inserted after the response message.
|
||||||
TicketMessageHelp=Only this text will be saved in the message list on ticket card.
|
TicketMessageHelp=Only this text will be saved in the message list on ticket card.
|
||||||
TicketMessageSubstitutionReplacedByGenericValues=Substitutions variables are replaced by generic values.
|
TicketMessageSubstitutionReplacedByGenericValues=Substitutions variables are replaced by generic values.
|
||||||
TicketTimeToRead=Time elapsed before ticket read
|
TimeElapsedSince=Time elapsed since
|
||||||
|
TicketTimeToRead=Time elapsed before read
|
||||||
TicketContacts=Contacts ticket
|
TicketContacts=Contacts ticket
|
||||||
TicketDocumentsLinked=Documents linked to ticket
|
TicketDocumentsLinked=Documents linked to ticket
|
||||||
ConfirmReOpenTicket=Confirm reopen this ticket ?
|
ConfirmReOpenTicket=Confirm reopen this ticket ?
|
||||||
|
|||||||
@ -83,7 +83,7 @@ class MyObject extends CommonObject
|
|||||||
'label' =>array('type'=>'varchar(255)', 'label'=>'Label', 'enabled'=>1, 'visible'=>1, 'position'=>30, 'searchall'=>1, 'css'=>'minwidth200', 'help'=>'Help text', 'showoncombobox'=>1),
|
'label' =>array('type'=>'varchar(255)', 'label'=>'Label', 'enabled'=>1, 'visible'=>1, 'position'=>30, 'searchall'=>1, 'css'=>'minwidth200', 'help'=>'Help text', 'showoncombobox'=>1),
|
||||||
'amount' =>array('type'=>'double(24,8)', 'label'=>'Amount', 'enabled'=>1, 'visible'=>1, 'default'=>'null', 'position'=>40, 'searchall'=>0, 'isameasure'=>1, 'help'=>'Help text'),
|
'amount' =>array('type'=>'double(24,8)', 'label'=>'Amount', 'enabled'=>1, 'visible'=>1, 'default'=>'null', 'position'=>40, 'searchall'=>0, 'isameasure'=>1, 'help'=>'Help text'),
|
||||||
'fk_soc' =>array('type'=>'integer:Societe:societe/class/societe.class.php', 'label'=>'ThirdParty', 'visible'=>1, 'enabled'=>1, 'position'=>50, 'notnull'=>-1, 'index'=>1, 'help'=>'LinkToThirparty'),
|
'fk_soc' =>array('type'=>'integer:Societe:societe/class/societe.class.php', 'label'=>'ThirdParty', 'visible'=>1, 'enabled'=>1, 'position'=>50, 'notnull'=>-1, 'index'=>1, 'help'=>'LinkToThirparty'),
|
||||||
'description' =>array('type'=>'text', 'label'=>'Descrption', 'enabled'=>1, 'visible'=>0, 'position'=>60),
|
'description' =>array('type'=>'text', 'label'=>'Description', 'enabled'=>1, 'visible'=>0, 'position'=>60),
|
||||||
'note_public' =>array('type'=>'html', 'label'=>'NotePublic', 'enabled'=>1, 'visible'=>0, 'position'=>61),
|
'note_public' =>array('type'=>'html', 'label'=>'NotePublic', 'enabled'=>1, 'visible'=>0, 'position'=>61),
|
||||||
'note_private' =>array('type'=>'html', 'label'=>'NotePrivate', 'enabled'=>1, 'visible'=>0, 'position'=>62),
|
'note_private' =>array('type'=>'html', 'label'=>'NotePrivate', 'enabled'=>1, 'visible'=>0, 'position'=>62),
|
||||||
'date_creation' =>array('type'=>'datetime', 'label'=>'DateCreation', 'enabled'=>1, 'visible'=>-2, 'notnull'=>1, 'position'=>500),
|
'date_creation' =>array('type'=>'datetime', 'label'=>'DateCreation', 'enabled'=>1, 'visible'=>-2, 'notnull'=>1, 'position'=>500),
|
||||||
|
|||||||
@ -82,6 +82,8 @@ $permissiontoadd = $user->rights->ticket->write;
|
|||||||
|
|
||||||
$actionobject = new ActionsTicket($db);
|
$actionobject = new ActionsTicket($db);
|
||||||
|
|
||||||
|
$now = dol_now();
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Actions
|
* Actions
|
||||||
@ -364,26 +366,23 @@ if ($action == 'view' || $action == 'add_message' || $action == 'close' || $acti
|
|||||||
// Creation date
|
// Creation date
|
||||||
print '<tr><td>' . $langs->trans("DateCreation") . '</td><td>';
|
print '<tr><td>' . $langs->trans("DateCreation") . '</td><td>';
|
||||||
print dol_print_date($object->datec, 'dayhour');
|
print dol_print_date($object->datec, 'dayhour');
|
||||||
|
print ' - '.$langs->trans("TimeElapsedSince").': '.'<i>'.convertSecondToTime(roundUpToNextMultiple($now - $object->datec, 60)).'</i>';
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Read date
|
// Read date
|
||||||
if (!empty($object->date_read)) {
|
|
||||||
print '<tr><td>' . $langs->trans("TicketReadOn") . '</td><td>';
|
print '<tr><td>' . $langs->trans("TicketReadOn") . '</td><td>';
|
||||||
|
if (!empty($object->date_read)) {
|
||||||
print dol_print_date($object->date_read, 'dayhour');
|
print dol_print_date($object->date_read, 'dayhour');
|
||||||
print '</td></tr>';
|
print ' - '.$langs->trans("TicketTimeToRead").': <i>'.convertSecondToTime(roundUpToNextMultiple($object->date_read - $object->datec, 60)).'</i>';
|
||||||
|
print ' - '.$langs->trans("TimeElapsedSince").': '.'<i>'.convertSecondToTime(roundUpToNextMultiple($now - $object->date_read, 60)).'</i>';
|
||||||
print '<tr><td>' . $langs->trans("TicketTimeToRead") . '</td><td>';
|
|
||||||
print '<strong>' . convertSecondToTime($object->date_read - $object->datec) . '</strong>';
|
|
||||||
print '</td></tr>';
|
|
||||||
}
|
}
|
||||||
|
print '</td></tr>';
|
||||||
|
|
||||||
// Close date
|
// Close date
|
||||||
if (!empty($object->date_close)) {
|
|
||||||
print '<tr><td>' . $langs->trans("TicketCloseOn") . '</td><td>';
|
print '<tr><td>' . $langs->trans("TicketCloseOn") . '</td><td>';
|
||||||
|
if (!empty($object->date_close)) {
|
||||||
print dol_print_date($object->date_close, 'dayhour');
|
print dol_print_date($object->date_close, 'dayhour');
|
||||||
print '</td></tr>';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Thirdparty
|
// Thirdparty
|
||||||
@ -453,7 +452,9 @@ if ($action == 'view' || $action == 'add_message' || $action == 'close' || $acti
|
|||||||
print '</td>';
|
print '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
// Timing (Duration sum of linked fichinter
|
// Timing (Duration sum of linked fichinter)
|
||||||
|
if ($conf->fichinter->enabled)
|
||||||
|
{
|
||||||
$object->fetchObjectLinked();
|
$object->fetchObjectLinked();
|
||||||
$num = count($object->linkedObjects);
|
$num = count($object->linkedObjects);
|
||||||
$timing = 0;
|
$timing = 0;
|
||||||
@ -472,6 +473,7 @@ if ($action == 'view' || $action == 'add_message' || $action == 'close' || $acti
|
|||||||
print '</td><td>';
|
print '</td><td>';
|
||||||
print convertSecondToTime($timing, 'all', $conf->global->MAIN_DURATION_OF_WORKDAY);
|
print convertSecondToTime($timing, 'all', $conf->global->MAIN_DURATION_OF_WORKDAY);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
}
|
||||||
|
|
||||||
// Other attributes
|
// Other attributes
|
||||||
include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_view.tpl.php';
|
include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_view.tpl.php';
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user