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
|
||||
$opt = array();
|
||||
$opt['resource'] = 'products';
|
||||
$opt2 = array();
|
||||
|
||||
// make a search to limit the id returned.
|
||||
if ($this->search != '') {
|
||||
$opt2 = array();
|
||||
$opt2['url'] = $conf->global->MAIN_MODULE_DOLISTORE_API_SRV.'/api/search?query='.$this->search.'&language='.$this->lang;
|
||||
|
||||
// Call
|
||||
@ -109,7 +109,6 @@ class Dolistore
|
||||
}
|
||||
$opt['filter[id]'] = '['.implode('|', $products).']';
|
||||
} elseif ($this->categorie != 0) {
|
||||
$opt2 = array();
|
||||
$opt2['resource'] = 'categories';
|
||||
$opt2['id'] = $this->categorie;
|
||||
// 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')
|
||||
{
|
||||
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
|
||||
if ($elementtype == 'thirdparty') $elementtype='societe';
|
||||
|
||||
@ -1292,7 +1292,7 @@ class Form
|
||||
* @param int $socid Id ot third party or 0 for all
|
||||
* @param string $selected Id contact pre-selectionne
|
||||
* @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 $limitto Disable answers that are not id in this array list
|
||||
* @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).
|
||||
* 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 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 $limitto Disable answers that are not id in this array list
|
||||
* @param integer $showfunction Add function into label
|
||||
@ -1351,7 +1351,7 @@ class Form
|
||||
$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";
|
||||
$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";
|
||||
$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 ($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>';
|
||||
$num = $this->db->num_rows($resql);
|
||||
$i = 0;
|
||||
@ -1426,7 +1426,9 @@ class Form
|
||||
}
|
||||
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)
|
||||
{
|
||||
@ -6170,6 +6172,7 @@ class Form
|
||||
|
||||
$linktoelem='';
|
||||
$linktoelemlist='';
|
||||
$listofidcompanytoscan='';
|
||||
|
||||
if (! is_object($object->thirdparty)) $object->fetch_thirdparty();
|
||||
|
||||
|
||||
@ -934,7 +934,7 @@ class FormMail extends Form
|
||||
$url=getOnlinePaymentUrl(0, $typeforonlinepayment, $this->substit['__REF__']);
|
||||
$paymenturl=$url;
|
||||
|
||||
$validpaymentmethod = getValidOnlinePaymentMethods($paymentmethod);
|
||||
$validpaymentmethod = getValidOnlinePaymentMethods('');
|
||||
}
|
||||
|
||||
if (count($validpaymentmethod) > 0 && $paymenturl)
|
||||
|
||||
@ -239,9 +239,9 @@ class FormTicket
|
||||
|
||||
// Contact and type
|
||||
print '<tr><td>' . $langs->trans("Contact") . '</td><td>';
|
||||
// If no socid, set to first one (id=1) to avoid full contacts list
|
||||
$selectedCompany = $this->withfromsocid > 0 ? $this->withfromsocid : 1;
|
||||
$nbofcontacts = $form->select_contacts($selectedCompany, $this->withfromcontactid, 'contactid', 0, '', '', 0, 'minwidth200');
|
||||
// If no socid, set to -1 to avoid full contacts list
|
||||
$selectedCompany = ($this->withfromsocid > 0) ? $this->withfromsocid : -1;
|
||||
$nbofcontacts = $form->select_contacts($selectedCompany, $this->withfromcontactid, 'contactid', 3, '', '', 0, 'minwidth200');
|
||||
$formcompany->selectTypeContact($ticketstatic, '', 'type', 'external', '', 0, 'maginleftonly');
|
||||
print '</td></tr>';
|
||||
} else {
|
||||
|
||||
@ -7666,3 +7666,15 @@ function isVisibleToUserType($type_user, &$menuentry, &$listofmodulesforexternal
|
||||
if (! $menuentry['perms']) return 2; // No permissions and user is external
|
||||
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
|
||||
// $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
|
||||
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;
|
||||
}
|
||||
|
||||
@ -90,7 +90,7 @@ function payment_supplier_prepare_head(Paiement $object) {
|
||||
/**
|
||||
* 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
|
||||
*/
|
||||
function getValidOnlinePaymentMethods($paymentmethod='')
|
||||
|
||||
@ -99,12 +99,9 @@ class CommActionRapport
|
||||
if (! is_object($outputlangs)) $outputlangs=$langs;
|
||||
// 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';
|
||||
|
||||
$outputlangs->load("main");
|
||||
$outputlangs->load("dict");
|
||||
$outputlangs->load("companies");
|
||||
$outputlangs->load("bills");
|
||||
$outputlangs->load("products");
|
||||
|
||||
// Load traductions files requiredby by page
|
||||
$outputlangs->loadLangs(array("main", "dict", "companies", "bills", "products"));
|
||||
|
||||
$dir = $conf->agenda->dir_temp."/";
|
||||
$file = $dir . "actions-".$this->month."-".$this->year.".pdf";
|
||||
|
||||
@ -99,11 +99,9 @@ class pdf_ban extends ModeleBankAccountDoc
|
||||
if (! is_object($outputlangs)) $outputlangs=$langs;
|
||||
// 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';
|
||||
|
||||
$outputlangs->load("main");
|
||||
$outputlangs->load("dict");
|
||||
$outputlangs->load("companies");
|
||||
$outputlangs->load("projects");
|
||||
|
||||
// Load traductions files requiredby by page
|
||||
$outputlangs->loadLangs(array("main", "dict", "companies", "projects"));
|
||||
|
||||
if ($conf->bank->dir_output)
|
||||
{
|
||||
|
||||
@ -44,9 +44,9 @@ class BordereauChequeBlochet extends ModeleChequeReceipts
|
||||
function __construct($db)
|
||||
{
|
||||
global $conf,$langs,$mysoc;
|
||||
|
||||
$langs->load("main");
|
||||
$langs->load("bills");
|
||||
|
||||
// Load traductions files requiredby by page
|
||||
$langs->loadLangs(array("main", "bills"));
|
||||
|
||||
$this->db = $db;
|
||||
$this->name = "blochet";
|
||||
@ -91,12 +91,9 @@ class BordereauChequeBlochet extends ModeleChequeReceipts
|
||||
// For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO
|
||||
$sav_charset_output=$outputlangs->charset_output;
|
||||
if (! empty($conf->global->MAIN_USE_FPDF)) $outputlangs->charset_output='ISO-8859-1';
|
||||
|
||||
$outputlangs->load("main");
|
||||
$outputlangs->load("companies");
|
||||
$outputlangs->load("bills");
|
||||
$outputlangs->load("products");
|
||||
$outputlangs->load("compta");
|
||||
|
||||
// Load traductions files requiredby by page
|
||||
$outputlangs->loadLangs(array("main", "companies", "bills", "products", "compta"));
|
||||
|
||||
$dir = $_dir . "/".get_exdir($number,0,1,0,$object,'cheque').$number;
|
||||
|
||||
@ -213,9 +210,9 @@ class BordereauChequeBlochet extends ModeleChequeReceipts
|
||||
{
|
||||
global $langs;
|
||||
$default_font_size = pdf_getPDFFontSize($outputlangs);
|
||||
|
||||
$outputlangs->load("compta");
|
||||
$outputlangs->load("banks");
|
||||
|
||||
// Load traductions files requiredby by page
|
||||
$outputlangs->loadLangs(array("compta", "banks"));
|
||||
|
||||
$title = $outputlangs->transnoentities("CheckReceipt");
|
||||
$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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -68,24 +68,55 @@ class pdf_einstein extends ModelePDFCommandes
|
||||
|
||||
/**
|
||||
* @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
|
||||
* @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
|
||||
|
||||
|
||||
|
||||
@ -39,21 +39,72 @@ require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
|
||||
*/
|
||||
class pdf_strato extends ModelePDFContract
|
||||
{
|
||||
var $db;
|
||||
var $name;
|
||||
var $description;
|
||||
var $type;
|
||||
/**
|
||||
* @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 $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);
|
||||
|
||||
/**
|
||||
* Dolibarr version of the loaded document
|
||||
* @public string
|
||||
*/
|
||||
public $version = 'dolibarr';
|
||||
|
||||
var $page_largeur;
|
||||
var $page_hauteur;
|
||||
var $format;
|
||||
var $marge_gauche;
|
||||
var $marge_droite;
|
||||
var $marge_haute;
|
||||
var $marge_basse;
|
||||
/**
|
||||
* @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
|
||||
|
||||
@ -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
|
||||
{
|
||||
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;
|
||||
|
||||
// Recupere emmetteur
|
||||
// Get source company
|
||||
$this->emetteur=$mysoc;
|
||||
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
|
||||
{
|
||||
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;
|
||||
|
||||
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);
|
||||
|
||||
/**
|
||||
* Dolibarr version of the loaded document
|
||||
* @public string
|
||||
*/
|
||||
public $version = 'dolibarr';
|
||||
|
||||
var $page_largeur;
|
||||
var $page_hauteur;
|
||||
var $format;
|
||||
var $marge_gauche;
|
||||
var $marge_droite;
|
||||
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,24 +69,55 @@ class pdf_crabe extends ModelePDFFactures
|
||||
|
||||
/**
|
||||
* @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
|
||||
* @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
|
||||
|
||||
/**
|
||||
|
||||
@ -38,21 +38,78 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
|
||||
*/
|
||||
class pdf_soleil extends ModelePDFFicheinter
|
||||
{
|
||||
var $db;
|
||||
var $name;
|
||||
var $description;
|
||||
var $type;
|
||||
/**
|
||||
* @var DoliDb Database handler
|
||||
*/
|
||||
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 $format;
|
||||
var $marge_gauche;
|
||||
var $marge_droite;
|
||||
var $marge_haute;
|
||||
var $marge_basse;
|
||||
/**
|
||||
* @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
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
@ -495,11 +552,9 @@ class pdf_soleil extends ModelePDFFicheinter
|
||||
{
|
||||
global $conf,$langs;
|
||||
$default_font_size = pdf_getPDFFontSize($outputlangs);
|
||||
|
||||
$outputlangs->load("main");
|
||||
$outputlangs->load("dict");
|
||||
$outputlangs->load("companies");
|
||||
$outputlangs->load("interventions");
|
||||
|
||||
// Load traductions files requiredby by page
|
||||
$outputlangs->loadLangs(array("main", "dict", "companies", "interventions"));
|
||||
|
||||
pdf_pagehead($pdf,$outputlangs,$this->page_hauteur);
|
||||
|
||||
|
||||
@ -323,12 +323,9 @@ class pdf_standard extends CommonStickerGenerator
|
||||
if (! is_object($outputlangs)) $outputlangs=$langs;
|
||||
// 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';
|
||||
|
||||
$outputlangs->load("main");
|
||||
$outputlangs->load("dict");
|
||||
$outputlangs->load("companies");
|
||||
$outputlangs->load("admin");
|
||||
$outputlangs->load("members");
|
||||
|
||||
// Load traductions files requiredby by page
|
||||
$outputlangs->loadLangs(array("main", "dict", "companies", "admin", "members"));
|
||||
|
||||
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");
|
||||
}
|
||||
}
|
||||
@ -254,11 +254,9 @@ class pdf_standardlabel extends CommonStickerGenerator
|
||||
if (! is_object($outputlangs)) $outputlangs=$langs;
|
||||
// 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';
|
||||
|
||||
$outputlangs->load("main");
|
||||
$outputlangs->load("dict");
|
||||
$outputlangs->load("companies");
|
||||
$outputlangs->load("admin");
|
||||
|
||||
// Load traductions files requiredby by page
|
||||
$outputlangs->loadLangs(array("main", "dict", "companies", "admin"));
|
||||
|
||||
$title=$outputlangs->transnoentities('Labels');
|
||||
$keywords=$title." ".$outputlangs->convToOutputCharset($mysoc->name);
|
||||
|
||||
@ -295,11 +295,9 @@ class pdf_tcpdflabel extends CommonStickerGenerator
|
||||
if (! is_object($outputlangs)) $outputlangs=$langs;
|
||||
// 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';
|
||||
|
||||
$outputlangs->load("main");
|
||||
$outputlangs->load("dict");
|
||||
$outputlangs->load("companies");
|
||||
$outputlangs->load("admin");
|
||||
|
||||
// Load traductions files requiredby by page
|
||||
$outputlangs->loadLangs(array("main", "dict", "companies", "admin"));
|
||||
|
||||
$title=$outputlangs->transnoentities('Labels');
|
||||
$keywords=$title." ".$outputlangs->convToOutputCharset($mysoc->name);
|
||||
|
||||
@ -87,9 +87,9 @@ class pdf_standard extends ModelePDFProduct
|
||||
public function __construct($db)
|
||||
{
|
||||
global $conf,$langs,$mysoc;
|
||||
|
||||
$langs->load("main");
|
||||
$langs->load("companies");
|
||||
|
||||
// Load traductions files requiredby by page
|
||||
$langs->loadLangs(array("main", "companies"));
|
||||
|
||||
$this->db = $db;
|
||||
$this->name = "standard";
|
||||
@ -135,14 +135,9 @@ class pdf_standard extends ModelePDFProduct
|
||||
if (! is_object($outputlangs)) $outputlangs=$langs;
|
||||
// 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';
|
||||
|
||||
$outputlangs->load("main");
|
||||
$outputlangs->load("dict");
|
||||
$outputlangs->load("companies");
|
||||
$outputlangs->load("bills");
|
||||
$outputlangs->load("products");
|
||||
$outputlangs->load("orders");
|
||||
$outputlangs->load("deliveries");
|
||||
|
||||
// Load traductions files requiredby by page
|
||||
$outputlangs->loadLangs(array("main", "dict", "companies", "bills", "products", "orders", "deliveries"));
|
||||
|
||||
$nblignes = count($object->lines);
|
||||
|
||||
@ -687,12 +682,10 @@ class pdf_standard extends ModelePDFProduct
|
||||
function _pagehead(&$pdf, $object, $showaddress, $outputlangs, $titlekey="")
|
||||
{
|
||||
global $conf,$langs,$hookmanager;
|
||||
|
||||
// Load traductions files requiredby by page
|
||||
$outputlangs->loadLangs(array("main", "propal", "companies", "bills", "orders"));
|
||||
|
||||
$outputlangs->load("main");
|
||||
$outputlangs->load("bills");
|
||||
$outputlangs->load("propal");
|
||||
$outputlangs->load("companies");
|
||||
$outputlangs->load("orders");
|
||||
$default_font_size = pdf_getPDFFontSize($outputlangs);
|
||||
|
||||
if ($object->type == 1) $titlekey='ServiceSheet';
|
||||
|
||||
@ -179,11 +179,9 @@ class pdf_baleine extends ModelePDFProjects
|
||||
if (! is_object($outputlangs)) $outputlangs=$langs;
|
||||
// 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';
|
||||
|
||||
$outputlangs->load("main");
|
||||
$outputlangs->load("dict");
|
||||
$outputlangs->load("companies");
|
||||
$outputlangs->load("projects");
|
||||
|
||||
// Load traductions files requiredby by page
|
||||
$outputlangs->loadLangs(array("main", "dict", "companies", "projects"));
|
||||
|
||||
if ($conf->projet->dir_output)
|
||||
{
|
||||
|
||||
@ -126,11 +126,9 @@ class pdf_beluga extends ModelePDFProjects
|
||||
if (! is_object($outputlangs)) $outputlangs=$langs;
|
||||
// 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';
|
||||
|
||||
$outputlangs->load("main");
|
||||
$outputlangs->load("dict");
|
||||
$outputlangs->load("companies");
|
||||
$outputlangs->load("projects");
|
||||
|
||||
// Load traductions files requiredby by page
|
||||
$outputlangs->loadLangs(array("main", "dict", "companies", "projects"));
|
||||
|
||||
if ($conf->projet->dir_output)
|
||||
{
|
||||
|
||||
@ -107,11 +107,9 @@ class pdf_timespent extends ModelePDFProjects
|
||||
if (! is_object($outputlangs)) $outputlangs=$langs;
|
||||
// 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';
|
||||
|
||||
$outputlangs->load("main");
|
||||
$outputlangs->load("dict");
|
||||
$outputlangs->load("companies");
|
||||
$outputlangs->load("projects");
|
||||
|
||||
// Load traductions files requiredby by page
|
||||
$outputlangs->loadLangs(array("main", "dict", "companies", "projects"));
|
||||
|
||||
if ($conf->projet->dir_output)
|
||||
{
|
||||
|
||||
@ -219,13 +219,9 @@ class pdf_azur extends ModelePDFPropales
|
||||
if (! is_object($outputlangs)) $outputlangs=$langs;
|
||||
// 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';
|
||||
|
||||
$outputlangs->load("main");
|
||||
$outputlangs->load("dict");
|
||||
$outputlangs->load("companies");
|
||||
$outputlangs->load("bills");
|
||||
$outputlangs->load("propal");
|
||||
$outputlangs->load("products");
|
||||
|
||||
// Load traductions files requiredby by page
|
||||
$outputlangs->loadLangs(array("main", "dict", "companies", "bills", "propal", "products"));
|
||||
|
||||
$nblignes = count($object->lines);
|
||||
|
||||
@ -1436,11 +1432,9 @@ class pdf_azur extends ModelePDFPropales
|
||||
function _pagehead(&$pdf, $object, $showaddress, $outputlangs)
|
||||
{
|
||||
global $conf,$langs;
|
||||
|
||||
$outputlangs->load("main");
|
||||
$outputlangs->load("bills");
|
||||
$outputlangs->load("propal");
|
||||
$outputlangs->load("companies");
|
||||
|
||||
// Load traductions files requiredby by page
|
||||
$outputlangs->loadLangs(array("main", "propal", "companies", "bills"));
|
||||
|
||||
$default_font_size = pdf_getPDFFontSize($outputlangs);
|
||||
|
||||
|
||||
@ -87,9 +87,9 @@ class pdf_standard extends ModelePDFStock
|
||||
public function __construct($db)
|
||||
{
|
||||
global $conf,$langs,$mysoc;
|
||||
|
||||
$langs->load("main");
|
||||
$langs->load("companies");
|
||||
|
||||
// Load traductions files requiredby by page
|
||||
$langs->loadLangs(array("main", "companies"));
|
||||
|
||||
$this->db = $db;
|
||||
$this->name = "standard";
|
||||
@ -164,14 +164,9 @@ class pdf_standard extends ModelePDFStock
|
||||
if (! is_object($outputlangs)) $outputlangs=$langs;
|
||||
// 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';
|
||||
|
||||
$outputlangs->load("main");
|
||||
$outputlangs->load("dict");
|
||||
$outputlangs->load("companies");
|
||||
$outputlangs->load("bills");
|
||||
$outputlangs->load("stocks");
|
||||
$outputlangs->load("orders");
|
||||
$outputlangs->load("deliveries");
|
||||
|
||||
// Load traductions files requiredby by page
|
||||
$outputlangs->loadLangs(array("main", "dict", "companies", "bills", "stocks", "orders", "deliveries"));
|
||||
|
||||
$nblignes = count($object->lines);
|
||||
|
||||
@ -919,13 +914,10 @@ class pdf_standard extends ModelePDFStock
|
||||
function _pagehead(&$pdf, $object, $showaddress, $outputlangs, $titlekey="")
|
||||
{
|
||||
global $conf,$langs,$db,$hookmanager;
|
||||
|
||||
// Load traductions files requiredby by page
|
||||
$outputlangs->loadLangs(array("main", "propal", "companies", "bills", "orders", "stocks"));
|
||||
|
||||
$outputlangs->load("main");
|
||||
$outputlangs->load("bills");
|
||||
$outputlangs->load("propal");
|
||||
$outputlangs->load("companies");
|
||||
$outputlangs->load("orders");
|
||||
$outputlangs->load("stocks");
|
||||
$default_font_size = pdf_getPDFFontSize($outputlangs);
|
||||
|
||||
if ($object->type == 1) $titlekey='ServiceSheet';
|
||||
|
||||
@ -88,9 +88,9 @@ class pdf_stdmovement extends ModelePDFMovement
|
||||
public function __construct($db)
|
||||
{
|
||||
global $conf,$langs,$mysoc;
|
||||
|
||||
$langs->load("main");
|
||||
$langs->load("companies");
|
||||
|
||||
// Load traductions files requiredby by page
|
||||
$langs->loadLangs(array("main", "companies"));
|
||||
|
||||
$this->db = $db;
|
||||
$this->name = "stdmouvement";
|
||||
@ -167,14 +167,9 @@ class pdf_stdmovement extends ModelePDFMovement
|
||||
if (! is_object($outputlangs)) $outputlangs=$langs;
|
||||
// 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';
|
||||
|
||||
$outputlangs->load("main");
|
||||
$outputlangs->load("dict");
|
||||
$outputlangs->load("companies");
|
||||
$outputlangs->load("bills");
|
||||
$outputlangs->load("stocks");
|
||||
$outputlangs->load("orders");
|
||||
$outputlangs->load("deliveries");
|
||||
|
||||
// Load traductions files requiredby by page
|
||||
$outputlangs->loadLangs(array("main", "dict", "companies", "bills", "stocks", "orders", "deliveries"));
|
||||
|
||||
/**
|
||||
* TODO: get from object
|
||||
@ -921,13 +916,10 @@ class pdf_stdmovement extends ModelePDFMovement
|
||||
function _pagehead(&$pdf, $object, $showaddress, $outputlangs, $titlekey="")
|
||||
{
|
||||
global $conf,$langs,$db,$hookmanager;
|
||||
|
||||
// Load traductions files requiredby by page
|
||||
$outputlangs->loadLangs(array("main", "propal", "companies", "bills", "orders", "stocks"));
|
||||
|
||||
$outputlangs->load("main");
|
||||
$outputlangs->load("bills");
|
||||
$outputlangs->load("propal");
|
||||
$outputlangs->load("companies");
|
||||
$outputlangs->load("orders");
|
||||
$outputlangs->load("stocks");
|
||||
$default_font_size = pdf_getPDFFontSize($outputlangs);
|
||||
|
||||
if ($object->type == 1) $titlekey='ServiceSheet';
|
||||
|
||||
@ -128,7 +128,7 @@ if ($permission) {
|
||||
<?php $selectedCompany = $formcompany->selectCompaniesForNewContact($object, 'id', $selectedCompany, 'newcompany', '', 0, '', 'minwidth300imp'); ?>
|
||||
</div>
|
||||
<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 class="tagtd maxwidthonsmartphone noborderbottom">
|
||||
<?php
|
||||
|
||||
@ -947,4 +947,4 @@ AssignedTo=Assigned to
|
||||
Deletedraft=Delete draft
|
||||
ConfirmMassDraftDeletion=Draft mass delete confirmation
|
||||
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.
|
||||
TicketMessageHelp=Only this text will be saved in the message list on ticket card.
|
||||
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
|
||||
TicketDocumentsLinked=Documents linked to 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),
|
||||
'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'),
|
||||
'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_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),
|
||||
|
||||
@ -82,6 +82,8 @@ $permissiontoadd = $user->rights->ticket->write;
|
||||
|
||||
$actionobject = new ActionsTicket($db);
|
||||
|
||||
$now = dol_now();
|
||||
|
||||
|
||||
/*
|
||||
* Actions
|
||||
@ -364,26 +366,23 @@ if ($action == 'view' || $action == 'add_message' || $action == 'close' || $acti
|
||||
// Creation date
|
||||
print '<tr><td>' . $langs->trans("DateCreation") . '</td><td>';
|
||||
print dol_print_date($object->datec, 'dayhour');
|
||||
print ' - '.$langs->trans("TimeElapsedSince").': '.'<i>'.convertSecondToTime(roundUpToNextMultiple($now - $object->datec, 60)).'</i>';
|
||||
print '</td></tr>';
|
||||
|
||||
// Read date
|
||||
print '<tr><td>' . $langs->trans("TicketReadOn") . '</td><td>';
|
||||
if (!empty($object->date_read)) {
|
||||
print '<tr><td>' . $langs->trans("TicketReadOn") . '</td><td>';
|
||||
print dol_print_date($object->date_read, 'dayhour');
|
||||
print '</td></tr>';
|
||||
|
||||
print '<tr><td>' . $langs->trans("TicketTimeToRead") . '</td><td>';
|
||||
print '<strong>' . convertSecondToTime($object->date_read - $object->datec) . '</strong>';
|
||||
print '</td></tr>';
|
||||
print dol_print_date($object->date_read, 'dayhour');
|
||||
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 '</td></tr>';
|
||||
|
||||
// Close date
|
||||
print '<tr><td>' . $langs->trans("TicketCloseOn") . '</td><td>';
|
||||
if (!empty($object->date_close)) {
|
||||
print '<tr><td>' . $langs->trans("TicketCloseOn") . '</td><td>';
|
||||
print dol_print_date($object->date_close, 'dayhour');
|
||||
print '</td></tr>';
|
||||
print dol_print_date($object->date_close, 'dayhour');
|
||||
}
|
||||
|
||||
print '</td></tr>';
|
||||
|
||||
// Thirdparty
|
||||
@ -453,25 +452,28 @@ if ($action == 'view' || $action == 'add_message' || $action == 'close' || $acti
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
// Timing (Duration sum of linked fichinter
|
||||
$object->fetchObjectLinked();
|
||||
$num = count($object->linkedObjects);
|
||||
$timing = 0;
|
||||
if ($num) {
|
||||
foreach ($object->linkedObjects as $objecttype => $objects) {
|
||||
if ($objecttype = "fichinter") {
|
||||
foreach ($objects as $fichinter) {
|
||||
$timing += $fichinter->duration;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
print '<tr><td valign="top">';
|
||||
// Timing (Duration sum of linked fichinter)
|
||||
if ($conf->fichinter->enabled)
|
||||
{
|
||||
$object->fetchObjectLinked();
|
||||
$num = count($object->linkedObjects);
|
||||
$timing = 0;
|
||||
if ($num) {
|
||||
foreach ($object->linkedObjects as $objecttype => $objects) {
|
||||
if ($objecttype = "fichinter") {
|
||||
foreach ($objects as $fichinter) {
|
||||
$timing += $fichinter->duration;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
print '<tr><td valign="top">';
|
||||
|
||||
print $form->textwithpicto($langs->trans("TicketDurationAuto"), $langs->trans("TicketDurationAutoInfos"), 1);
|
||||
print '</td><td>';
|
||||
print convertSecondToTime($timing, 'all', $conf->global->MAIN_DURATION_OF_WORKDAY);
|
||||
print '</td></tr>';
|
||||
print $form->textwithpicto($langs->trans("TicketDurationAuto"), $langs->trans("TicketDurationAutoInfos"), 1);
|
||||
print '</td><td>';
|
||||
print convertSecondToTime($timing, 'all', $conf->global->MAIN_DURATION_OF_WORKDAY);
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
// Other attributes
|
||||
include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_view.tpl.php';
|
||||
|
||||
Loading…
Reference in New Issue
Block a user