Esempio n. 1
0
 /**
  * testPropalBuild
  *
  * @return int
  */
 public function testPropalBuild()
 {
     global $conf, $user, $langs, $db;
     $conf = $this->savconf;
     $user = $this->savuser;
     $langs = $this->savlangs;
     $db = $this->savdb;
     $conf->propal->dir_output .= '/temp';
     $localobject = new Propal($this->savdb);
     $localobject->initAsSpecimen();
     // Azur
     $localobject->modelpdf = 'azur';
     $result = $localobject->generateDocument($localobject->modelpdf, $langs);
     $this->assertLessThan($result, 0);
     print __METHOD__ . " result=" . $result . "\n";
     return 0;
 }
Esempio n. 2
0
/**
 *  Create a document onto disk according to template module.
 *
 * 	@param	    DoliDB		$db  			Database handler
 * 	@param	    Propal		$object			Object proposal
 * 	@param	    string		$modele			Force model to use ('' to not force)
 * 	@param		Translate	$outputlangs	Object langs to use for output
 *  @param      int			$hidedetails    Hide details of lines
 *  @param      int			$hidedesc       Hide description
 *  @param      int			$hideref        Hide ref
 * 	@return     int         				0 if KO, 1 if OK
 * @deprecated Use the new function generateDocument of Propal class
 * @see Propal::generateDocument()
 */
function propale_pdf_create(DoliDB $db, Propal $object, $modele, $outputlangs, $hidedetails = 0, $hidedesc = 0, $hideref = 0)
{
    dol_syslog(__METHOD__ . " is deprecated", LOG_WARNING);
    return $object->generateDocument($modele, $outputlangs, $hidedetails, $hidedesc, $hideref);
}
Esempio n. 3
0
/**
 *  Create a document onto disk according to template module.
 *
 * 	@param	    DoliDB		$db  			Database handler
 * 	@param	    object		$object			Object proposal
 * 	@param	    string		$modele			Force model to use ('' to not force)
 * 	@param		Translate	$outputlangs	Object langs to use for output
 *  @param      int			$hidedetails    Hide details of lines
 *  @param      int			$hidedesc       Hide description
 *  @param      int			$hideref        Hide ref
 * 	@return     int         				0 if KO, 1 if OK
 * @deprecated Use the new function generateDocument of Propal class
 */
function propale_pdf_create(DoliDB $db, Propal $object, $modele, $outputlangs, $hidedetails = 0, $hidedesc = 0, $hideref = 0)
{
    return $object->generateDocument($modele, $outputlangs, $hidedetails, $hidedesc, $hideref);
}