/** * Create a document onto disk according to template model. * * @param DoliDB $db Database handler * @param Object $object Object supplier order * @param string $modele Force template to use ('' to not force) * @param Translate $outputlangs Object lang to use for traduction * @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 CommandeFournisseur class */ function supplier_order_pdf_create(DoliDB $db, CommandeFournisseur $object, $modele, $outputlangs, $hidedetails = 0, $hidedesc = 0, $hideref = 0) { return $object->generateDocument($modele, $outputlangs, $hidedetails, $hidedesc, $hideref); }
/** * Create a document onto disk according to template model. * * @param DoliDB $db Database handler * @param CommandeFournisseur $object Object supplier order * @param string $modele Force template to use ('' to not force) * @param Translate $outputlangs Object lang to use for traduction * @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 CommandeFournisseur class * @see CommandeFournisseur::generateDocument() */ function supplier_order_pdf_create(DoliDB $db, CommandeFournisseur $object, $modele, $outputlangs, $hidedetails = 0, $hidedesc = 0, $hideref = 0) { dol_syslog(__METHOD__ . " is deprecated", LOG_WARNING); return $object->generateDocument($modele, $outputlangs, $hidedetails, $hidedesc, $hideref); }
/** * testCommandeFournisseurBuild * * @return int */ public function testCommandeFournisseurBuild() { global $conf, $user, $langs, $db; $conf = $this->savconf; $user = $this->savuser; $langs = $this->savlangs; $db = $this->savdb; $conf->fournisseur->commande->dir_output .= '/temp'; $localobject = new CommandeFournisseur($this->savdb); $localobject->initAsSpecimen(); // Muscadet $localobject->modelpdf = 'muscadet'; $result = $localobject->generateDocument($localobject->modelpdf, $langs); $this->assertLessThan($result, 0); print __METHOD__ . " result=" . $result . "\n"; return 0; }