Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dolibarr
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Software_Artifact_Infrastructure_Repository
dolibarr
Commits
187c54ae
Commit
187c54ae
authored
13 years ago
by
Regis Houssin
Browse files
Options
Downloads
Patches
Plain Diff
[task #176] Allow to use ODT templates for prososal like it's done
parent
915bc47a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
htdocs/core/modules/propale/modules_propale.php
+3
-84
3 additions, 84 deletions
htdocs/core/modules/propale/modules_propale.php
with
3 additions
and
84 deletions
htdocs/core/modules/propale/modules_propale.php
+
3
−
84
View file @
187c54ae
<?php
/* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-201
1
Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-201
1
Regis Houssin <regis@dolibarr.fr>
* Copyright (C) 2004-201
2
Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-201
2
Regis Houssin <regis@dolibarr.fr>
* Copyright (C) 2012 Juanjo Menent <jmenent@2byte.es>
*
* This program is free software; you can redistribute it and/or modify
...
...
@@ -233,87 +233,6 @@ function propale_pdf_create($db, $object, $modele, $outputlangs, $hidedetails=0,
dol_print_error
(
''
,
$langs
->
trans
(
"Error"
)
.
" "
.
$langs
->
trans
(
"ErrorFileDoesNotExists"
,
$dir
.
$file
));
return
-
1
;
}
/*
// Positionne modele sur le nom du modele de propale a utiliser
$file = "pdf_".$modele.".modules.php";
// On verifie l'emplacement du modele
$file = dol_buildpath($dir.$file);
if ($modele && file_exists($file)) $modelisok=1;
// Si model pas encore bon
if (! $modelisok)
{
if ($conf->global->PROPALE_ADDON_PDF) $modele = $conf->global->PROPALE_ADDON_PDF;
$file = "pdf_".$modele.".modules.php";
// On verifie l'emplacement du modele
$file = dol_buildpath($dir.$file);
if (file_exists($file)) $modelisok=1;
}
// Si model pas encore bon
if (! $modelisok)
{
$liste=ModelePDFPropales::liste_modeles($db);
$modele=key($liste); // Renvoie premiere valeur de cle trouve dans le tableau
$file = "pdf_".$modele.".modules.php";
$file = dol_buildpath($dir.$file);
if (file_exists($file)) $modelisok=1;
}
// Charge le modele
if ($modelisok)
{
$classname = "pdf_".$modele;
require_once($file);
$obj = new $classname($db);
// We save charset_output to restore it because write_file can change it if needed for
// output format that does not support UTF8.
$sav_charset_output=$outputlangs->charset_output;
if ($obj->write_file($object, $outputlangs, $srctemplatepath, $hidedetails, $hidedesc, $hideref, $hookmanager) > 0)
{
$outputlangs->charset_output=$sav_charset_output;
// we delete preview files
require_once(DOL_DOCUMENT_ROOT."/core/lib/files.lib.php");
dol_delete_preview($object);
// Appel des triggers
include_once(DOL_DOCUMENT_ROOT . "/core/class/interfaces.class.php");
$interface=new Interfaces($db);
$result=$interface->run_triggers('PROPAL_BUILDDOC',$object,$user,$langs,$conf);
if ($result < 0) { $error++; $this->errors=$interface->errors; }
// Fin appel triggers
return 1;
}
else
{
$outputlangs->charset_output=$sav_charset_output;
dol_syslog("modules_propale::propale_pdf_create error");
dol_print_error($db,$obj->error);
return 0;
}
}
else
{
if (! $conf->global->PROPALE_ADDON_PDF)
{
print $langs->trans("Error")." ".$langs->trans("Error_PROPALE_ADDON_PDF_NotDefined");
}
else
{
print $langs->trans("Error")." ".$langs->trans("ErrorFileDoesNotExists",$file);
}
return 0;
}
*/
}
?>
?>
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment