Skip to content
Snippets Groups Projects
Commit 351ab978 authored by Laurent Destailleur's avatar Laurent Destailleur
Browse files

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

parents e061c442 6f408252
No related branches found
No related tags found
No related merge requests found
......@@ -128,9 +128,9 @@ function pdf_getInstance($format='',$metric='mm',$pagetype='P')
// Protection and encryption of pdf
if (empty($conf->global->MAIN_USE_FPDF) && ! empty($conf->global->PDF_SECURITY_ENCRYPTION))
{
{
/* Permission supported by TCPDF
- print : Print the document;
- print : Print the document;
- modify : Modify the contents of the document by operations other than those controlled by 'fill-forms', 'extract' and 'assemble';
- copy : Copy or otherwise extract text and graphics from the document;
- annot-forms : Add or modify text annotations, fill in interactive form fields, and, if 'modify' is also set, create or modify interactive form fields (including signature fields);
......@@ -145,8 +145,8 @@ function pdf_getInstance($format='',$metric='mm',$pagetype='P')
// For TCPDF, we specify permission we want to block
$pdfrights = array('modify','copy');
$pdfuserpass = ''; // Mot de passe pour l'utilisateur final
$pdfownerpass = NULL; // Mot de passe du proprietaire, cree aleatoirement si pas defini
$pdfuserpass = ''; // Password for the end user
$pdfownerpass = NULL; // Password of the owner, created randomly if not defined
$pdf->SetProtection($pdfrights,$pdfuserpass,$pdfownerpass);
}
else
......@@ -160,8 +160,8 @@ function pdf_getInstance($format='',$metric='mm',$pagetype='P')
{
// Declare here a class to overwrite FPDI to add method writeHTMLCell
/**
* This class if a enhanced FPDI class that support method writeHTMLCell
*/
* This class if a enhanced FPDI class that support method writeHTMLCell
*/
class FPDI_DolExtended extends FPDI
{
/**
......@@ -258,7 +258,7 @@ function pdf_getPDFFontSize($outputlangs)
/**
* Return height to use for Logo onot PDF
* Return height to use for Logo onto PDF
*
* @param string $logo Full path to logo file to use
* @param bool $url Image with url (true or false)
......@@ -311,7 +311,7 @@ function pdf_build_address($outputlangs,$sourcecompany,$targetcompany='',$target
if (empty($conf->global->MAIN_PDF_DISABLESOURCEDETAILS))
{
// Tel
// Phone
if ($sourcecompany->phone) $stringaddress .= ($stringaddress ? "\n" : '' ).$outputlangs->transnoentities("Phone").": ".$outputlangs->convToOutputCharset($sourcecompany->phone);
// Fax
if ($sourcecompany->fax) $stringaddress .= ($stringaddress ? "\n" : '' ).$outputlangs->transnoentities("Fax").": ".$outputlangs->convToOutputCharset($sourcecompany->fax);
......@@ -344,7 +344,7 @@ function pdf_build_address($outputlangs,$sourcecompany,$targetcompany='',$target
if (! empty($conf->global->MAIN_PDF_ADDALSOTARGETDETAILS))
{
// Tel
// Phone
if ($targetcontact->phone_pro) $stringaddress .= ($stringaddress ? "\n" : '' ).$outputlangs->transnoentities("Phone").": ".$outputlangs->convToOutputCharset($targetcontact->phone_pro);
// Fax
if ($targetcontact->fax) $stringaddress .= ($stringaddress ? "\n" : '' ).$outputlangs->transnoentities("Fax").": ".$outputlangs->convToOutputCharset($targetcontact->fax);
......@@ -362,7 +362,7 @@ function pdf_build_address($outputlangs,$sourcecompany,$targetcompany='',$target
if (! empty($conf->global->MAIN_PDF_ADDALSOTARGETDETAILS))
{
// Tel
// Phone
if ($targetcompany->phone) $stringaddress .= ($stringaddress ? "\n" : '' ).$outputlangs->transnoentities("Phone").": ".$outputlangs->convToOutputCharset($targetcompany->phone);
// Fax
if ($targetcompany->fax) $stringaddress .= ($stringaddress ? "\n" : '' ).$outputlangs->transnoentities("Fax").": ".$outputlangs->convToOutputCharset($targetcompany->fax);
......@@ -410,7 +410,7 @@ function pdf_build_address($outputlangs,$sourcecompany,$targetcompany='',$target
{
$stringaddress .= ($stringaddress ? "\n" : '' ).$outputlangs->convToOutputCharset(dol_format_address($deliverycompany))."\n";
// Tel
// Phone
if ($deliverycompany->phone) $stringaddress .= ($stringaddress ? "\n" : '' ).$outputlangs->transnoentities("Phone").": ".$outputlangs->convToOutputCharset($deliverycompany->phone);
// Fax
if ($deliverycompany->fax) $stringaddress .= ($stringaddress ? ($deliverycompany->phone ? " - " : "\n") : '' ).$outputlangs->transnoentities("Fax").": ".$outputlangs->convToOutputCharset($deliverycompany->fax);
......@@ -446,7 +446,7 @@ function pdf_pagehead(&$pdf,$outputlangs,$page_height)
* @param Translate $outputlangs Object lang
* @param int $h Height of PDF
* @param int $w Width of PDF
* @param string $unit Unit of height (mmn, pt, ...)
* @param string $unit Unit of height (mm, pt, ...)
* @param string $text Text to show
* @return void
*/
......@@ -782,7 +782,7 @@ function pdf_pagefoot(&$pdf,$outputlangs,$paramfreetext,$fromcompany,$marge_bass
$pdf->SetFont('','',7);
$pdf->SetDrawColor(224,224,224);
// On positionne le debut du bas de page selon nbre de lignes de ce bas de page
// The start of the bottom of this page footer is positioned according to # of lines
$freetextheight=0;
if ($line) // Free text
{
......@@ -900,7 +900,7 @@ function pdf_writeLinkedObjects(&$pdf,$object,$outputlangs,$posx,$posy,$w,$h,$al
* @param int $posx Pos x
* @param int $posy Pos y
* @param int $hideref Hide reference
* @param int $hidedesc Hide description
* @param int $hidedesc Hide description
* @param int $issupplierline Is it a line for a supplier object ?
* @return void
*/
......@@ -1013,7 +1013,7 @@ function pdf_getlinedesc($object,$i,$outputlangs,$hideref=0,$hidedesc=0,$issuppl
// If line linked to a product
if ($idprod)
{
// On ajoute la ref
// We add ref
if ($prodser->ref)
{
$prefix_prodserv = "";
......
......@@ -20,7 +20,7 @@
/**
* \file htdocs/product/index.php
* \ingroup product
* \brief Page accueil des produits et services
* \brief Homepage products and services
*/
require '../main.inc.php';
......@@ -29,7 +29,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
$type=isset($_GET["type"])?$_GET["type"]:(isset($_POST["type"])?$_POST["type"]:'');
if ($type =='' && !$user->rights->produit->lire) $type='1'; // Force global page on service page only
if ($type =='' && !$user->rights->service->lire) $type='0'; // Force global page on prpduct page only
if ($type =='' && !$user->rights->service->lire) $type='0'; // Force global page on product page only
// Security check
if ($type=='0') $result=restrictedArea($user,'produit');
......@@ -74,7 +74,7 @@ print '<div class="fichecenter"><div class="fichethirdleft">';
/*
* Zone recherche produit/service
* Search Area of product/service
*/
$rowspan=2;
if (! empty($conf->barcode->enabled)) $rowspan++;
......@@ -101,7 +101,7 @@ print "</table></form><br>";
/*
* Nombre de produits et/ou services
* Number of products and/or services
*/
$prodser = array();
$prodser[0][0]=$prodser[0][1]=$prodser[1][0]=$prodser[1][1]=0;
......@@ -284,10 +284,10 @@ function activitytrim($product_type)
{
global $conf,$langs,$db;
// on affiche les 3 dernières années
// We display the last 3 years
$yearofbegindate=date('Y',dol_time_plus_duree(time(), -3, "y"));
// ventilation par trimestre
// breakdown by quarter
$sql = "SELECT DATE_FORMAT(p.datep,'%Y') as annee, DATE_FORMAT(p.datep,'%m') as mois, SUM(fd.total_ht) as Mnttot";
$sql.= " FROM ".MAIN_DB_PREFIX."societe as s,".MAIN_DB_PREFIX."facture as f, ".MAIN_DB_PREFIX."facturedet as fd";
$sql.= " , ".MAIN_DB_PREFIX."paiement as p,".MAIN_DB_PREFIX."paiement_facture as pf";
......@@ -346,7 +346,7 @@ function activitytrim($product_type)
print '</tr>';
$lgn++;
}
// on passe à l'année suivante
// We go to the following year
$tmpyear = $objp->annee;
$trim1=0;
$trim2=0;
......
......@@ -300,7 +300,7 @@ if ($id > 0 || ! empty($ref))
print '<td colspan="1">';
// On recupere les id des users deja selectionnes
$contactsofproject=$projectstatic->getListContactId('internal');
$form->select_users($user->id,'userid',0,'',0,'',$contactsofproject);
$form->select_users($user->id,'contactid',0,'',0,'',$contactsofproject);
print '</td>';
print '<td>';
$formcompany->selectTypeContact($object, '', 'type','internal','rowid');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment