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

This commit is contained in:
Laurent Destailleur 2012-01-05 13:10:14 +01:00
commit c598fb34c0
3 changed files with 6 additions and 85 deletions

View File

@ -1009,8 +1009,10 @@ class Propal extends CommonObject
$this->statut = $obj->fk_statut;
$this->statut_libelle = $obj->statut_label;
$this->datec = $this->db->jdate($obj->datec);
$this->datev = $this->db->jdate($obj->datev);
$this->datec = $this->db->jdate($obj->datec); //TODO obsolete
$this->datev = $this->db->jdate($obj->datev); //TODO obsolete
$this->date_creation = $this->db->jdate($obj->datec); //Creation date
$this->date_validation = $this->db->jdate($obj->datev); //Validation date
$this->date = $this->db->jdate($obj->dp); // Proposal date
$this->datep = $this->db->jdate($obj->dp);
$this->fin_validite = $this->db->jdate($obj->dfv);

View File

@ -1,7 +1,7 @@
<?php
/* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2011 Regis Houssin <regis@dolibarr.fr>
* Copyright (C) 2004-2012 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2012 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;
}
*/
}
?>