Merge branch 'develop' of ssh://git@github.com/Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
19940e5f58
@ -277,8 +277,8 @@ $tabcond[8] = $conf->societe->enabled;
|
|||||||
$tabcond[9] = true;
|
$tabcond[9] = true;
|
||||||
$tabcond[10]= true;
|
$tabcond[10]= true;
|
||||||
$tabcond[11]= true;
|
$tabcond[11]= true;
|
||||||
$tabcond[12]= $conf->commande->enabled||$conf->propale->enabled||$conf->facture->enabled||$conf->fournisseur->enabled;
|
$tabcond[12]= $conf->commande->enabled||$conf->propal->enabled||$conf->facture->enabled||$conf->fournisseur->enabled;
|
||||||
$tabcond[13]= $conf->commande->enabled||$conf->propale->enabled||$conf->facture->enabled||$conf->fournisseur->enabled;
|
$tabcond[13]= $conf->commande->enabled||$conf->propal->enabled||$conf->facture->enabled||$conf->fournisseur->enabled;
|
||||||
$tabcond[14]= $conf->product->enabled&&$conf->ecotax->enabled;
|
$tabcond[14]= $conf->product->enabled&&$conf->ecotax->enabled;
|
||||||
$tabcond[15]= true;
|
$tabcond[15]= true;
|
||||||
$tabcond[16]= $conf->societe->enabled && empty($conf->global->SOCIETE_DISABLE_PROSPECTS);
|
$tabcond[16]= $conf->societe->enabled && empty($conf->global->SOCIETE_DISABLE_PROSPECTS);
|
||||||
@ -286,8 +286,8 @@ $tabcond[17]= $conf->deplacement->enabled;
|
|||||||
$tabcond[18]= $conf->expedition->enabled;
|
$tabcond[18]= $conf->expedition->enabled;
|
||||||
$tabcond[19]= $conf->societe->enabled;
|
$tabcond[19]= $conf->societe->enabled;
|
||||||
$tabcond[20]= $conf->fournisseur->enabled;
|
$tabcond[20]= $conf->fournisseur->enabled;
|
||||||
$tabcond[21]= $conf->propale->enabled;
|
$tabcond[21]= $conf->propal->enabled;
|
||||||
$tabcond[22]= $conf->commande->enabled||$conf->propale->enabled;
|
$tabcond[22]= $conf->commande->enabled||$conf->propal->enabled;
|
||||||
|
|
||||||
|
|
||||||
complete_dictionnary_with_modules($taborder,$tabname,$tablib,$tabsql,$tabsqlsort,$tabfield,$tabfieldvalue,$tabfieldinsert,$tabrowid,$tabcond);
|
complete_dictionnary_with_modules($taborder,$tabname,$tablib,$tabsql,$tabsqlsort,$tabfield,$tabfieldvalue,$tabfieldinsert,$tabrowid,$tabcond);
|
||||||
|
|||||||
@ -631,7 +631,7 @@ print "<tr class=\"liste_titre\">\n";
|
|||||||
print " <td>".$langs->trans("Name")."</td>\n";
|
print " <td>".$langs->trans("Name")."</td>\n";
|
||||||
print " <td>".$langs->trans("Value")."</td>\n";
|
print " <td>".$langs->trans("Value")."</td>\n";
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
print "<tr ".$bc[false].">\n <td width=\"140\">".$langs->trans("PathDirectory")."</td>\n <td>".$conf->propale->dir_output."</td>\n</tr>\n";
|
print "<tr ".$bc[false].">\n <td width=\"140\">".$langs->trans("PathDirectory")."</td>\n <td>".$conf->propal->dir_output."</td>\n</tr>\n";
|
||||||
print "</table>\n<br>";
|
print "</table>\n<br>";
|
||||||
|
|
||||||
dol_htmloutput_mesg($mesg);
|
dol_htmloutput_mesg($mesg);
|
||||||
|
|||||||
@ -515,7 +515,7 @@ if ($conf->propal->enabled && $user->rights->propale->lire)
|
|||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td width="16" align="center" class="nobordernopadding">';
|
print '<td width="16" align="center" class="nobordernopadding">';
|
||||||
$filename=dol_sanitizeFileName($obj->ref);
|
$filename=dol_sanitizeFileName($obj->ref);
|
||||||
$filedir=$conf->propale->dir_output . '/' . dol_sanitizeFileName($obj->ref);
|
$filedir=$conf->propal->dir_output . '/' . dol_sanitizeFileName($obj->ref);
|
||||||
$urlsource=$_SERVER['PHP_SELF'].'?id='.$obj->propalid;
|
$urlsource=$_SERVER['PHP_SELF'].'?id='.$obj->propalid;
|
||||||
$formfile->show_documents('propal',$filename,$filedir,$urlsource,'','','',1,'',1);
|
$formfile->show_documents('propal',$filename,$filedir,$urlsource,'','','',1,'',1);
|
||||||
print '</td></tr></table>';
|
print '</td></tr></table>';
|
||||||
|
|||||||
@ -492,7 +492,7 @@ if ($action == 'send' && ! $_POST['addfile'] && ! $_POST['removedfile'] && ! $_P
|
|||||||
if ($result > 0)
|
if ($result > 0)
|
||||||
{
|
{
|
||||||
// $objectref = dol_sanitizeFileName($object->ref);
|
// $objectref = dol_sanitizeFileName($object->ref);
|
||||||
// $file = $conf->propale->dir_output . '/' . $objectref . '/' . $objectref . '.pdf';
|
// $file = $conf->propal->dir_output . '/' . $objectref . '/' . $objectref . '.pdf';
|
||||||
|
|
||||||
// if (is_readable($file))
|
// if (is_readable($file))
|
||||||
// {
|
// {
|
||||||
@ -1737,7 +1737,7 @@ if ($id > 0 || ! empty($ref))
|
|||||||
* Documents generes
|
* Documents generes
|
||||||
*/
|
*/
|
||||||
$filename=dol_sanitizeFileName($object->ref);
|
$filename=dol_sanitizeFileName($object->ref);
|
||||||
$filedir=$conf->propale->dir_output . "/" . dol_sanitizeFileName($object->ref);
|
$filedir=$conf->propal->dir_output . "/" . dol_sanitizeFileName($object->ref);
|
||||||
$urlsource=$_SERVER["PHP_SELF"]."?id=".$object->id;
|
$urlsource=$_SERVER["PHP_SELF"]."?id=".$object->id;
|
||||||
$genallowed=$user->rights->propale->creer;
|
$genallowed=$user->rights->propale->creer;
|
||||||
$delallowed=$user->rights->propale->supprimer;
|
$delallowed=$user->rights->propale->supprimer;
|
||||||
@ -1771,7 +1771,7 @@ if ($id > 0 || ! empty($ref))
|
|||||||
{
|
{
|
||||||
$ref = dol_sanitizeFileName($object->ref);
|
$ref = dol_sanitizeFileName($object->ref);
|
||||||
include_once(DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php');
|
include_once(DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php');
|
||||||
$fileparams = dol_most_recent_file($conf->propale->dir_output . '/' . $ref);
|
$fileparams = dol_most_recent_file($conf->propal->dir_output . '/' . $ref);
|
||||||
$file=$fileparams['fullname'];
|
$file=$fileparams['fullname'];
|
||||||
|
|
||||||
// Build document if it not exists
|
// Build document if it not exists
|
||||||
@ -1794,7 +1794,7 @@ if ($id > 0 || ! empty($ref))
|
|||||||
dol_print_error($db,$result);
|
dol_print_error($db,$result);
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
$fileparams = dol_most_recent_file($conf->propale->dir_output . '/' . $ref);
|
$fileparams = dol_most_recent_file($conf->propal->dir_output . '/' . $ref);
|
||||||
$file=$fileparams['fullname'];
|
$file=$fileparams['fullname'];
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2003,7 +2003,7 @@ else
|
|||||||
|
|
||||||
print '<td width="16" align="right" class="nobordernopadding">';
|
print '<td width="16" align="right" class="nobordernopadding">';
|
||||||
$filename=dol_sanitizeFileName($objp->ref);
|
$filename=dol_sanitizeFileName($objp->ref);
|
||||||
$filedir=$conf->propale->dir_output . '/' . dol_sanitizeFileName($objp->ref);
|
$filedir=$conf->propal->dir_output . '/' . dol_sanitizeFileName($objp->ref);
|
||||||
$urlsource=$_SERVER['PHP_SELF'].'?id='.$objp->propalid;
|
$urlsource=$_SERVER['PHP_SELF'].'?id='.$objp->propalid;
|
||||||
$formfile->show_documents('propal',$filename,$filedir,$urlsource,'','','',1,'',1);
|
$formfile->show_documents('propal',$filename,$filedir,$urlsource,'','','',1,'',1);
|
||||||
print '</td></tr></table>';
|
print '</td></tr></table>';
|
||||||
|
|||||||
@ -119,7 +119,7 @@ if ($id > 0 || ! empty($ref))
|
|||||||
* Documents
|
* Documents
|
||||||
*/
|
*/
|
||||||
$objectref = dol_sanitizeFileName($object->ref);
|
$objectref = dol_sanitizeFileName($object->ref);
|
||||||
$dir_output = $conf->propale->dir_output . "/";
|
$dir_output = $conf->propal->dir_output . "/";
|
||||||
$filepath = $dir_output . $objectref . "/";
|
$filepath = $dir_output . $objectref . "/";
|
||||||
$file = $filepath . $objectref . ".pdf";
|
$file = $filepath . $objectref . ".pdf";
|
||||||
$filedetail = $filepath . $objectref . "-detail.pdf";
|
$filedetail = $filepath . $objectref . "-detail.pdf";
|
||||||
|
|||||||
@ -1801,10 +1801,10 @@ class Propal extends CommonObject
|
|||||||
{
|
{
|
||||||
// We remove directory
|
// We remove directory
|
||||||
$propalref = dol_sanitizeFileName($this->ref);
|
$propalref = dol_sanitizeFileName($this->ref);
|
||||||
if ($conf->propale->dir_output)
|
if ($conf->propal->dir_output)
|
||||||
{
|
{
|
||||||
$dir = $conf->propale->dir_output . "/" . $propalref ;
|
$dir = $conf->propal->dir_output . "/" . $propalref ;
|
||||||
$file = $conf->propale->dir_output . "/" . $propalref . "/" . $propalref . ".pdf";
|
$file = $conf->propal->dir_output . "/" . $propalref . "/" . $propalref . ".pdf";
|
||||||
if (file_exists($file))
|
if (file_exists($file))
|
||||||
{
|
{
|
||||||
dol_delete_preview($this);
|
dol_delete_preview($this);
|
||||||
|
|||||||
@ -70,7 +70,7 @@ if ($_POST["sendit"] && ! empty($conf->global->MAIN_UPLOAD_DOC))
|
|||||||
{
|
{
|
||||||
$object->fetch_thirdparty();
|
$object->fetch_thirdparty();
|
||||||
|
|
||||||
$upload_dir = $conf->propale->dir_output . "/" . dol_sanitizeFileName($object->ref);
|
$upload_dir = $conf->propal->dir_output . "/" . dol_sanitizeFileName($object->ref);
|
||||||
|
|
||||||
if (dol_mkdir($upload_dir) >= 0)
|
if (dol_mkdir($upload_dir) >= 0)
|
||||||
{
|
{
|
||||||
@ -106,7 +106,7 @@ if ($action == 'confirm_deletefile' && $confirm == 'yes')
|
|||||||
{
|
{
|
||||||
$object->fetch_thirdparty();
|
$object->fetch_thirdparty();
|
||||||
|
|
||||||
$upload_dir = $conf->propale->dir_output . "/" . dol_sanitizeFileName($object->ref);
|
$upload_dir = $conf->propal->dir_output . "/" . dol_sanitizeFileName($object->ref);
|
||||||
$file = $upload_dir . '/' . $_GET['urlfile']; // Do not use urldecode here ($_GET and $_REQUEST are already decoded by PHP).
|
$file = $upload_dir . '/' . $_GET['urlfile']; // Do not use urldecode here ($_GET and $_REQUEST are already decoded by PHP).
|
||||||
dol_delete_file($file,0,0,0,$object);
|
dol_delete_file($file,0,0,0,$object);
|
||||||
$mesg = '<div class="ok">'.$langs->trans("FileWasRemoved").'</div>';
|
$mesg = '<div class="ok">'.$langs->trans("FileWasRemoved").'</div>';
|
||||||
@ -128,7 +128,7 @@ if ($id > 0 || ! empty($ref))
|
|||||||
{
|
{
|
||||||
$object->fetch_thirdparty();
|
$object->fetch_thirdparty();
|
||||||
|
|
||||||
$upload_dir = $conf->propale->dir_output.'/'.dol_sanitizeFileName($object->ref);
|
$upload_dir = $conf->propal->dir_output.'/'.dol_sanitizeFileName($object->ref);
|
||||||
|
|
||||||
$head = propal_prepare_head($object);
|
$head = propal_prepare_head($object);
|
||||||
dol_fiche_head($head, 'document', $langs->trans('Proposal'), 0, 'propal');
|
dol_fiche_head($head, 'document', $langs->trans('Proposal'), 0, 'propal');
|
||||||
|
|||||||
@ -248,7 +248,7 @@ if ($resql)
|
|||||||
|
|
||||||
print '<td width="16" align="right" class="nobordernopadding">';
|
print '<td width="16" align="right" class="nobordernopadding">';
|
||||||
$filename=dol_sanitizeFileName($obj->ref);
|
$filename=dol_sanitizeFileName($obj->ref);
|
||||||
$filedir=$conf->propale->dir_output . '/' . dol_sanitizeFileName($obj->ref);
|
$filedir=$conf->propal->dir_output . '/' . dol_sanitizeFileName($obj->ref);
|
||||||
$urlsource=$_SERVER['PHP_SELF'].'?id='.$obj->rowid;
|
$urlsource=$_SERVER['PHP_SELF'].'?id='.$obj->rowid;
|
||||||
$formfile->show_documents('commande',$filename,$filedir,$urlsource,'','','',1,'',1);
|
$formfile->show_documents('commande',$filename,$filedir,$urlsource,'','','',1,'',1);
|
||||||
print '</td></tr></table>';
|
print '</td></tr></table>';
|
||||||
@ -318,7 +318,7 @@ if ($conf->propal->enabled && $user->rights->propale->lire)
|
|||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td width="16" align="center" class="nobordernopadding">';
|
print '<td width="16" align="center" class="nobordernopadding">';
|
||||||
$filename=dol_sanitizeFileName($obj->ref);
|
$filename=dol_sanitizeFileName($obj->ref);
|
||||||
$filedir=$conf->propale->dir_output . '/' . dol_sanitizeFileName($obj->ref);
|
$filedir=$conf->propal->dir_output . '/' . dol_sanitizeFileName($obj->ref);
|
||||||
$urlsource=$_SERVER['PHP_SELF'].'?id='.$obj->propalid;
|
$urlsource=$_SERVER['PHP_SELF'].'?id='.$obj->propalid;
|
||||||
$formfile->show_documents('propal',$filename,$filedir,$urlsource,'','','',1,'',1);
|
$formfile->show_documents('propal',$filename,$filedir,$urlsource,'','','',1,'',1);
|
||||||
print '</td></tr></table>';
|
print '</td></tr></table>';
|
||||||
|
|||||||
@ -58,7 +58,7 @@ llxHeader();
|
|||||||
|
|
||||||
print_fiche_titre($langs->trans("ProposalsStatistics"), $mesg);
|
print_fiche_titre($langs->trans("ProposalsStatistics"), $mesg);
|
||||||
|
|
||||||
$dir=$conf->propale->dir_temp;
|
$dir=$conf->propal->dir_temp;
|
||||||
|
|
||||||
dol_mkdir($dir);
|
dol_mkdir($dir);
|
||||||
|
|
||||||
|
|||||||
@ -211,6 +211,7 @@ class Conf
|
|||||||
elseif (preg_match('/^MAIN_MODULE_([A-Z_]+)$/i',$key,$reg))
|
elseif (preg_match('/^MAIN_MODULE_([A-Z_]+)$/i',$key,$reg))
|
||||||
{
|
{
|
||||||
$modulename=strtolower($reg[1]);
|
$modulename=strtolower($reg[1]);
|
||||||
|
if ($modulename == 'propale') $modulename='propal';
|
||||||
$this->$modulename=(object) array();
|
$this->$modulename=(object) array();
|
||||||
$this->$modulename->enabled=true;
|
$this->$modulename->enabled=true;
|
||||||
$this->modules[]=$modulename; // Add this module in list of enabled modules
|
$this->modules[]=$modulename; // Add this module in list of enabled modules
|
||||||
@ -258,7 +259,6 @@ class Conf
|
|||||||
|
|
||||||
// For backward compatibility
|
// For backward compatibility
|
||||||
// TODO Replace this->xxx->enabled by this->modulename->enabled to remove this code
|
// TODO Replace this->xxx->enabled by this->modulename->enabled to remove this code
|
||||||
if (isset($this->propale->enabled)) $this->propal->enabled=$this->propale->enabled;
|
|
||||||
if (isset($this->categorie->enabled)) $this->category->enabled=$this->categorie->enabled;
|
if (isset($this->categorie->enabled)) $this->category->enabled=$this->categorie->enabled;
|
||||||
|
|
||||||
// Define default dir_output and dir_temp for directories of modules
|
// Define default dir_output and dir_temp for directories of modules
|
||||||
@ -280,6 +280,10 @@ class Conf
|
|||||||
$this->user->dir_output=$rootforuser."/users";
|
$this->user->dir_output=$rootforuser."/users";
|
||||||
$this->user->dir_temp=$rootforuser."/users/temp";
|
$this->user->dir_temp=$rootforuser."/users/temp";
|
||||||
|
|
||||||
|
// For propal storage
|
||||||
|
$this->propal->dir_output=$rootforuser."/propale";
|
||||||
|
$this->propal->dir_temp=$rootforuser."/propale/temp";
|
||||||
|
|
||||||
// Exception: Some dir are not the name of module. So we keep exception here
|
// Exception: Some dir are not the name of module. So we keep exception here
|
||||||
// for backward compatibility.
|
// for backward compatibility.
|
||||||
|
|
||||||
|
|||||||
@ -743,15 +743,14 @@ function dol_delete_preview($object)
|
|||||||
global $langs,$conf;
|
global $langs,$conf;
|
||||||
require_once(DOL_DOCUMENT_ROOT."/core/lib/files.lib.php");
|
require_once(DOL_DOCUMENT_ROOT."/core/lib/files.lib.php");
|
||||||
|
|
||||||
if ($object->element == 'commande') $dir = $conf->commande->dir_output;
|
$element = $object->element;
|
||||||
elseif ($object->element == 'propal') $dir = $conf->propale->dir_output;
|
$dir = $conf->$element->dir_output;
|
||||||
elseif ($object->element == 'ficheinter') $dir = $conf->ficheinter->dir_output;
|
|
||||||
elseif ($object->element == 'order_supplier') $dir = $conf->fournisseur->dir_output.'/commande';
|
if ($object->element == 'order_supplier') $dir = $conf->fournisseur->dir_output.'/commande';
|
||||||
elseif ($object->element == 'invoice_supplier') $dir = $conf->fournisseur->dir_output.'/facture';
|
elseif ($object->element == 'invoice_supplier') $dir = $conf->fournisseur->dir_output.'/facture';
|
||||||
elseif ($object->element == 'project') $dir = $conf->projet->dir_output;
|
elseif ($object->element == 'project') $dir = $conf->projet->dir_output;
|
||||||
elseif ($object->element == 'delivery') $dir = $conf->livraison->dir_output;
|
elseif ($object->element == 'delivery') $dir = $conf->livraison->dir_output;
|
||||||
elseif ($object->element == 'facture') $dir = $conf->facture->dir_output;
|
|
||||||
elseif ($object->element == 'don') $dir = $conf->don->dir_output;
|
|
||||||
if (empty($dir)) return 'ErrorObjectNoSupportedByFunction';
|
if (empty($dir)) return 'ErrorObjectNoSupportedByFunction';
|
||||||
|
|
||||||
$refsan = dol_sanitizeFileName($object->ref);
|
$refsan = dol_sanitizeFileName($object->ref);
|
||||||
|
|||||||
@ -86,7 +86,7 @@ function propal_prepare_head($object)
|
|||||||
}
|
}
|
||||||
|
|
||||||
$head[$h][0] = DOL_URL_ROOT.'/comm/propal/document.php?id='.$object->id;
|
$head[$h][0] = DOL_URL_ROOT.'/comm/propal/document.php?id='.$object->id;
|
||||||
/*$filesdir = $conf->propale->dir_output . "/" . dol_sanitizeFileName($propal->ref);
|
/*$filesdir = $conf->propal->dir_output . "/" . dol_sanitizeFileName($propal->ref);
|
||||||
include_once(DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php');
|
include_once(DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php');
|
||||||
$listoffiles=dol_dir_list($filesdir,'files',1);
|
$listoffiles=dol_dir_list($filesdir,'files',1);
|
||||||
$head[$h][1] = (count($listoffiles)?$langs->trans('DocumentsNb',count($listoffiles)):$langs->trans('Documents'));*/
|
$head[$h][1] = (count($listoffiles)?$langs->trans('DocumentsNb',count($listoffiles)):$langs->trans('Documents'));*/
|
||||||
|
|||||||
@ -252,7 +252,7 @@ class doc_generic_proposal_odt extends ModelePDFPropales
|
|||||||
$outputlangs->load("companies");
|
$outputlangs->load("companies");
|
||||||
$outputlangs->load("bills");
|
$outputlangs->load("bills");
|
||||||
|
|
||||||
if ($conf->propale->dir_output)
|
if ($conf->propal->dir_output)
|
||||||
{
|
{
|
||||||
// If $object is id instead of object
|
// If $object is id instead of object
|
||||||
if (! is_object($object))
|
if (! is_object($object))
|
||||||
@ -267,7 +267,7 @@ class doc_generic_proposal_odt extends ModelePDFPropales
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$dir = $conf->propale->dir_output;
|
$dir = $conf->propal->dir_output;
|
||||||
$objectref = dol_sanitizeFileName($object->ref);
|
$objectref = dol_sanitizeFileName($object->ref);
|
||||||
if (! preg_match('/specimen/i',$objectref)) $dir.= "/" . $objectref;
|
if (! preg_match('/specimen/i',$objectref)) $dir.= "/" . $objectref;
|
||||||
$file = $dir . "/" . $objectref . ".odt";
|
$file = $dir . "/" . $objectref . ".odt";
|
||||||
@ -296,7 +296,7 @@ class doc_generic_proposal_odt extends ModelePDFPropales
|
|||||||
//print "file=".$file;
|
//print "file=".$file;
|
||||||
//print "conf->societe->dir_temp=".$conf->societe->dir_temp;
|
//print "conf->societe->dir_temp=".$conf->societe->dir_temp;
|
||||||
|
|
||||||
dol_mkdir($conf->propale->dir_temp);
|
dol_mkdir($conf->propal->dir_temp);
|
||||||
|
|
||||||
|
|
||||||
// If BILLING contact defined on invoice, we use it
|
// If BILLING contact defined on invoice, we use it
|
||||||
@ -343,7 +343,7 @@ class doc_generic_proposal_odt extends ModelePDFPropales
|
|||||||
$odfHandler = new odf(
|
$odfHandler = new odf(
|
||||||
$srctemplatepath,
|
$srctemplatepath,
|
||||||
array(
|
array(
|
||||||
'PATH_TO_TMP' => $conf->propale->dir_temp,
|
'PATH_TO_TMP' => $conf->propal->dir_temp,
|
||||||
'ZIP_PROXY' => 'PclZipProxy', // PhpZipProxy or PclZipProxy. Got "bad compression method" error when using PhpZipProxy.
|
'ZIP_PROXY' => 'PclZipProxy', // PhpZipProxy or PclZipProxy. Got "bad compression method" error when using PhpZipProxy.
|
||||||
'DELIMITER_LEFT' => '{',
|
'DELIMITER_LEFT' => '{',
|
||||||
'DELIMITER_RIGHT' => '}'
|
'DELIMITER_RIGHT' => '}'
|
||||||
|
|||||||
@ -129,7 +129,7 @@ class pdf_azur extends ModelePDFPropales
|
|||||||
$outputlangs->load("propal");
|
$outputlangs->load("propal");
|
||||||
$outputlangs->load("products");
|
$outputlangs->load("products");
|
||||||
|
|
||||||
if ($conf->propale->dir_output)
|
if ($conf->propal->dir_output)
|
||||||
{
|
{
|
||||||
$object->fetch_thirdparty();
|
$object->fetch_thirdparty();
|
||||||
|
|
||||||
@ -138,13 +138,13 @@ class pdf_azur extends ModelePDFPropales
|
|||||||
// Definition de $dir et $file
|
// Definition de $dir et $file
|
||||||
if ($object->specimen)
|
if ($object->specimen)
|
||||||
{
|
{
|
||||||
$dir = $conf->propale->dir_output;
|
$dir = $conf->propal->dir_output;
|
||||||
$file = $dir . "/SPECIMEN.pdf";
|
$file = $dir . "/SPECIMEN.pdf";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$objectref = dol_sanitizeFileName($object->ref);
|
$objectref = dol_sanitizeFileName($object->ref);
|
||||||
$dir = $conf->propale->dir_output . "/" . $objectref;
|
$dir = $conf->propal->dir_output . "/" . $objectref;
|
||||||
$file = $dir . "/" . $objectref . ".pdf";
|
$file = $dir . "/" . $objectref . ".pdf";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -129,7 +129,7 @@ class pdf_jaune extends ModelePDFPropales
|
|||||||
$outputlangs->load("propal");
|
$outputlangs->load("propal");
|
||||||
$outputlangs->load("products");
|
$outputlangs->load("products");
|
||||||
|
|
||||||
if ($conf->propale->dir_output)
|
if ($conf->propal->dir_output)
|
||||||
{
|
{
|
||||||
$object->fetch_thirdparty();
|
$object->fetch_thirdparty();
|
||||||
|
|
||||||
@ -138,13 +138,13 @@ class pdf_jaune extends ModelePDFPropales
|
|||||||
// Definition de $dir et $file
|
// Definition de $dir et $file
|
||||||
if ($object->specimen)
|
if ($object->specimen)
|
||||||
{
|
{
|
||||||
$dir = $conf->propale->dir_output;
|
$dir = $conf->propal->dir_output;
|
||||||
$file = $dir . "/SPECIMEN.pdf";
|
$file = $dir . "/SPECIMEN.pdf";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$objectref = dol_sanitizeFileName($object->ref);
|
$objectref = dol_sanitizeFileName($object->ref);
|
||||||
$dir = $conf->propale->dir_output . "/" . $objectref;
|
$dir = $conf->propal->dir_output . "/" . $objectref;
|
||||||
$file = $dir . "/" . $objectref . ".pdf";
|
$file = $dir . "/" . $objectref . ".pdf";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -137,7 +137,7 @@ class InterfaceNotification
|
|||||||
dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id);
|
dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id);
|
||||||
|
|
||||||
$ref = dol_sanitizeFileName($object->ref);
|
$ref = dol_sanitizeFileName($object->ref);
|
||||||
$filepdf = $conf->propale->dir_output . '/' . $ref . '/' . $ref . '.pdf';
|
$filepdf = $conf->propal->dir_output . '/' . $ref . '/' . $ref . '.pdf';
|
||||||
if (! file_exists($filepdf)) $filepdf='';
|
if (! file_exists($filepdf)) $filepdf='';
|
||||||
$filepdf=''; // We can't add PDF as it is not generated yet.
|
$filepdf=''; // We can't add PDF as it is not generated yet.
|
||||||
$langs->load("other");
|
$langs->load("other");
|
||||||
|
|||||||
@ -183,7 +183,7 @@ if ($modulepart)
|
|||||||
$accessallowed=1;
|
$accessallowed=1;
|
||||||
}
|
}
|
||||||
|
|
||||||
$original_file=$conf->propale->dir_output.'/'.$original_file;
|
$original_file=$conf->propal->dir_output.'/'.$original_file;
|
||||||
$sqlprotectagainstexternals = "SELECT fk_soc as fk_soc FROM ".MAIN_DB_PREFIX."propal WHERE ref='".$refname."' AND entity=".$conf->entity;
|
$sqlprotectagainstexternals = "SELECT fk_soc as fk_soc FROM ".MAIN_DB_PREFIX."propal WHERE ref='".$refname."' AND entity=".$conf->entity;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -881,7 +881,7 @@ else if ($module == 'invoice_supplier') // Auto area for suppliers invoices
|
|||||||
}
|
}
|
||||||
else if ($module == 'propal') // Auto area for customers orders
|
else if ($module == 'propal') // Auto area for customers orders
|
||||||
{
|
{
|
||||||
$upload_dir = $conf->propale->dir_output;
|
$upload_dir = $conf->propal->dir_output;
|
||||||
$filearray=dol_dir_list($upload_dir,"files",1,'',array('^SPECIMEN\.pdf$','^\.','\.meta$','^temp$','^payments$','^CVS$','^thumbs$'),$sortfield,(strtolower($sortorder)=='desc'?SORT_DESC:SORT_ASC),1);
|
$filearray=dol_dir_list($upload_dir,"files",1,'',array('^SPECIMEN\.pdf$','^\.','\.meta$','^temp$','^payments$','^CVS$','^thumbs$'),$sortfield,(strtolower($sortorder)=='desc'?SORT_DESC:SORT_ASC),1);
|
||||||
|
|
||||||
$param.='&module='.$module;
|
$param.='&module='.$module;
|
||||||
|
|||||||
@ -200,14 +200,13 @@ if (GETPOST('purge'))
|
|||||||
foreach ($listmodulepart as $modulepart)
|
foreach ($listmodulepart as $modulepart)
|
||||||
{
|
{
|
||||||
$filearray=array();
|
$filearray=array();
|
||||||
|
$upload_dir = $conf->$modulepart->dir_output;
|
||||||
if ($modulepart == 'company') $upload_dir = $conf->societe->dir_output;
|
if ($modulepart == 'company') $upload_dir = $conf->societe->dir_output;
|
||||||
if ($modulepart == 'invoice') $upload_dir = $conf->facture->dir_output;
|
if ($modulepart == 'invoice') $upload_dir = $conf->facture->dir_output;
|
||||||
if ($modulepart == 'invoice_supplier') $upload_dir = $conf->fournisseur->facture->dir_output;
|
if ($modulepart == 'invoice_supplier') $upload_dir = $conf->fournisseur->facture->dir_output;
|
||||||
if ($modulepart == 'propal') $upload_dir = $conf->propale->dir_output;
|
|
||||||
if ($modulepart == 'order') $upload_dir = $conf->commande->dir_output;
|
if ($modulepart == 'order') $upload_dir = $conf->commande->dir_output;
|
||||||
if ($modulepart == 'order_supplier') $upload_dir = $conf->fournisseur->commande->dir_output;
|
if ($modulepart == 'order_supplier') $upload_dir = $conf->fournisseur->commande->dir_output;
|
||||||
if ($modulepart == 'contract') $upload_dir = $conf->contrat->dir_output;
|
if ($modulepart == 'contract') $upload_dir = $conf->contrat->dir_output;
|
||||||
if ($modulepart == 'tax') $upload_dir = $conf->tax->dir_output;
|
|
||||||
|
|
||||||
if (empty($upload_dir)) continue;
|
if (empty($upload_dir)) continue;
|
||||||
|
|
||||||
|
|||||||
@ -133,7 +133,7 @@ if ($modulepart)
|
|||||||
elseif ($modulepart == 'apercupropal')
|
elseif ($modulepart == 'apercupropal')
|
||||||
{
|
{
|
||||||
if ($user->rights->propale->lire) $accessallowed=1;
|
if ($user->rights->propale->lire) $accessallowed=1;
|
||||||
$original_file=$conf->propale->dir_output.'/'.$original_file;
|
$original_file=$conf->propal->dir_output.'/'.$original_file;
|
||||||
}
|
}
|
||||||
// Wrapping pour les apercu commande
|
// Wrapping pour les apercu commande
|
||||||
elseif ($modulepart == 'apercucommande')
|
elseif ($modulepart == 'apercucommande')
|
||||||
@ -151,7 +151,7 @@ if ($modulepart)
|
|||||||
elseif ($modulepart == 'propalstats')
|
elseif ($modulepart == 'propalstats')
|
||||||
{
|
{
|
||||||
if ($user->rights->propale->lire) $accessallowed=1;
|
if ($user->rights->propale->lire) $accessallowed=1;
|
||||||
$original_file=$conf->propale->dir_temp.'/'.$original_file;
|
$original_file=$conf->propal->dir_temp.'/'.$original_file;
|
||||||
}
|
}
|
||||||
// Wrapping pour les images des stats commandes
|
// Wrapping pour les images des stats commandes
|
||||||
elseif ($modulepart == 'orderstats')
|
elseif ($modulepart == 'orderstats')
|
||||||
|
|||||||
@ -109,7 +109,7 @@ class BuildDocTest extends PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
if (! $conf->facture->enabled) { print __METHOD__." invoice module not enabled\n"; die(); }
|
if (! $conf->facture->enabled) { print __METHOD__." invoice module not enabled\n"; die(); }
|
||||||
if (! $conf->commande->enabled) { print __METHOD__." order module not enabled\n"; die(); }
|
if (! $conf->commande->enabled) { print __METHOD__." order module not enabled\n"; die(); }
|
||||||
if (! $conf->propale->enabled) { print __METHOD__." propal module not enabled\n"; die(); }
|
if (! $conf->propal->enabled) { print __METHOD__." propal module not enabled\n"; die(); }
|
||||||
if (! $conf->projet->enabled) { print __METHOD__." project module not enabled\n"; die(); }
|
if (! $conf->projet->enabled) { print __METHOD__." project module not enabled\n"; die(); }
|
||||||
if (! $conf->expedition->enabled) { print __METHOD__." shipment module not enabled\n"; die(); }
|
if (! $conf->expedition->enabled) { print __METHOD__." shipment module not enabled\n"; die(); }
|
||||||
|
|
||||||
@ -294,7 +294,7 @@ class BuildDocTest extends PHPUnit_Framework_TestCase
|
|||||||
$langs=$this->savlangs;
|
$langs=$this->savlangs;
|
||||||
$db=$this->savdb;
|
$db=$this->savdb;
|
||||||
|
|
||||||
$conf->propale->dir_output.='/temp';
|
$conf->propal->dir_output.='/temp';
|
||||||
$localobject=new Propal($this->savdb);
|
$localobject=new Propal($this->savdb);
|
||||||
$localobject->initAsSpecimen();
|
$localobject->initAsSpecimen();
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user