print $langs->trans($tmp); } else { print $tmp; } print '</td>' . "\n"; print '<td align="center">'; if ($conf->global->PROPALE_ADDON == "{$file}") { print img_picto($langs->trans("Activated"), 'switch_on'); } else { print '<a href="' . $_SERVER["PHP_SELF"] . '?action=setmod&value=' . $file . '">'; print img_picto($langs->trans("Disabled"), 'switch_off'); print '</a>'; } print '</td>'; $propal = new Propal($db); $propal->initAsSpecimen(); // Info $htmltooltip = ''; $htmltooltip .= '' . $langs->trans("Version") . ': <b>' . $module->getVersion() . '</b><br>'; $propal->type = 0; $nextval = $module->getNextValue($mysoc, $propal); if ("{$nextval}" != $langs->trans("NotAvailable")) { $htmltooltip .= '' . $langs->trans("NextValue") . ': '; if ($nextval) { $htmltooltip .= $nextval . '<br>'; } else { $htmltooltip .= $langs->trans($module->error) . '<br>'; } } print '<td align="center">'; print $form->textwithpicto('', $htmltooltip, 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(); // Einstein $localobject->modelpdf='azur'; $result=propale_pdf_create($db, $localobject, $localobject->modelpdf, $langs); $this->assertLessThan($result, 0); print __METHOD__." result=".$result."\n"; // Edison $localobject->modelpdf='jaune'; $result=propale_pdf_create($db, $localobject, $localobject->modelpdf, $langs); $this->assertLessThan($result, 0); print __METHOD__." result=".$result."\n"; return 0; }
/** * testPropalCreate * * @return void */ public function testPropalCreate() { global $conf,$user,$langs,$db; $conf=$this->savconf; $user=$this->savuser; $langs=$this->savlangs; $db=$this->savdb; $localobject=new Propal($this->savdb); $localobject->initAsSpecimen(); $result=$localobject->create($user); $this->assertLessThan($result, 0); print __METHOD__." result=".$result."\n"; return $result; }
/** * 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; }