supplier_proposal.php 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588
  1. <?php
  2. /* Copyright (C) 2003-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
  3. * Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
  4. * Copyright (C) 2004 Sebastien Di Cintio <sdicintio@ressource-toi.org>
  5. * Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
  6. * Copyright (C) 2004 Eric Seigne <eric.seigne@ryxeo.com>
  7. * Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com>
  8. * Copyright (C) 2008 Raphael Bertrand (Resultic) <raphael.bertrand@resultic.fr>
  9. * Copyright (C) 2011-2013 Juanjo Menent <jmenent@2byte.es>
  10. * Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
  11. *
  12. * This program is free software; you can redistribute it and/or modify
  13. * it under the terms of the GNU General Public License as published by
  14. * the Free Software Foundation; either version 3 of the License, or
  15. * (at your option) any later version.
  16. *
  17. * This program is distributed in the hope that it will be useful,
  18. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  19. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  20. * GNU General Public License for more details.
  21. *
  22. * You should have received a copy of the GNU General Public License
  23. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  24. */
  25. require '../main.inc.php';
  26. require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
  27. require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php';
  28. require_once DOL_DOCUMENT_ROOT.'/supplier_proposal/class/supplier_proposal.class.php';
  29. require_once DOL_DOCUMENT_ROOT.'/core/lib/supplier_proposal.lib.php';
  30. // Load translation files required by the page
  31. $langs->loadLangs(array("admin", "errors", "other", "supplier_proposal"));
  32. if (! $user->admin) accessforbidden();
  33. $action = GETPOST('action','alpha');
  34. $value = GETPOST('value','alpha');
  35. $label = GETPOST('label','alpha');
  36. $scandir = GETPOST('scan_dir','alpha');
  37. $type='supplier_proposal';
  38. $error=0;
  39. /*
  40. * Actions
  41. */
  42. include DOL_DOCUMENT_ROOT.'/core/actions_setmoduleoptions.inc.php';
  43. if ($action == 'updateMask')
  44. {
  45. $maskconstsupplier_proposal=GETPOST('maskconstsupplier_proposal','alpha');
  46. $masksupplier_proposal=GETPOST('masksupplier_proposal','alpha');
  47. if ($maskconstsupplier_proposal) $res = dolibarr_set_const($db,$maskconstsupplier_proposal,$masksupplier_proposal,'chaine',0,'',$conf->entity);
  48. if (! $res > 0) $error++;
  49. if (! $error)
  50. {
  51. setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
  52. }
  53. else
  54. {
  55. setEventMessages($langs->trans("Error"), null, 'errors');
  56. }
  57. }
  58. if ($action == 'specimen')
  59. {
  60. $modele=GETPOST('module','alpha');
  61. $supplier_proposal = new SupplierProposal($db);
  62. $supplier_proposal->initAsSpecimen();
  63. // Search template files
  64. $file=''; $classname=''; $filefound=0;
  65. $dirmodels=array_merge(array('/'),(array) $conf->modules_parts['models']);
  66. foreach($dirmodels as $reldir)
  67. {
  68. $file=dol_buildpath($reldir."core/modules/supplier_proposal/doc/pdf_".$modele.".modules.php");
  69. if (file_exists($file))
  70. {
  71. $filefound=1;
  72. $classname = "pdf_".$modele;
  73. break;
  74. }
  75. }
  76. if ($filefound)
  77. {
  78. require_once $file;
  79. $module = new $classname($db);
  80. if ($module->write_file($supplier_proposal,$langs) > 0)
  81. {
  82. header("Location: ".DOL_URL_ROOT."/document.php?modulepart=supplier_proposal&file=SPECIMEN.pdf");
  83. return;
  84. }
  85. else
  86. {
  87. setEventMessages($module->error, null, 'errors');
  88. dol_syslog($module->error, LOG_ERR);
  89. }
  90. }
  91. else
  92. {
  93. setEventMessages($langs->trans("ErrorModuleNotFound"), null, 'errors');
  94. dol_syslog($langs->trans("ErrorModuleNotFound"), LOG_ERR);
  95. }
  96. }
  97. if ($action == 'set_SUPPLIER_PROPOSAL_DRAFT_WATERMARK')
  98. {
  99. $draft = GETPOST('SUPPLIER_PROPOSAL_DRAFT_WATERMARK','alpha');
  100. $res = dolibarr_set_const($db, "SUPPLIER_PROPOSAL_DRAFT_WATERMARK",trim($draft),'chaine',0,'',$conf->entity);
  101. if (! $res > 0) $error++;
  102. if (! $error)
  103. {
  104. setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
  105. }
  106. else
  107. {
  108. setEventMessages($langs->trans("Error"), null, 'errors');
  109. }
  110. }
  111. if ($action == 'set_SUPPLIER_PROPOSAL_FREE_TEXT')
  112. {
  113. $freetext = GETPOST('SUPPLIER_PROPOSAL_FREE_TEXT','none'); // No alpha here, we want exact string
  114. $res = dolibarr_set_const($db, "SUPPLIER_PROPOSAL_FREE_TEXT",$freetext,'chaine',0,'',$conf->entity);
  115. if (! $res > 0) $error++;
  116. if (! $error)
  117. {
  118. setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
  119. }
  120. else
  121. {
  122. setEventMessages($langs->trans("Error"), null, 'errors');
  123. }
  124. }
  125. if ($action == 'set_BANK_ASK_PAYMENT_BANK_DURING_SUPPLIER_PROPOSAL')
  126. {
  127. $res = dolibarr_set_const($db, "BANK_ASK_PAYMENT_BANK_DURING_SUPPLIER_PROPOSAL",$value,'chaine',0,'',$conf->entity);
  128. if (! $res > 0) $error++;
  129. if (! $error)
  130. {
  131. setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
  132. }
  133. else
  134. {
  135. setEventMessages($langs->trans("Error"), null, 'errors');
  136. }
  137. }
  138. // Activate a model
  139. if ($action == 'set')
  140. {
  141. $ret = addDocumentModel($value, $type, $label, $scandir);
  142. }
  143. else if ($action == 'del')
  144. {
  145. $ret = delDocumentModel($value, $type);
  146. if ($ret > 0)
  147. {
  148. if ($conf->global->SUPPLIER_PROPOSAL_ADDON_PDF == "$value") dolibarr_del_const($db, 'SUPPLIER_PROPOSAL_ADDON_PDF',$conf->entity);
  149. }
  150. }
  151. else if ($action == 'setdoc')
  152. {
  153. if (dolibarr_set_const($db, "SUPPLIER_PROPOSAL_ADDON_PDF",$value,'chaine',0,'',$conf->entity))
  154. {
  155. $conf->global->SUPPLIER_PROPOSAL_ADDON_PDF = $value;
  156. }
  157. // On active le modele
  158. $ret = delDocumentModel($value, $type);
  159. if ($ret > 0)
  160. {
  161. $ret = addDocumentModel($value, $type, $label, $scandir);
  162. }
  163. }
  164. else if ($action == 'setmod')
  165. {
  166. // TODO Verifier si module numerotation choisi peut etre active
  167. // par appel methode canBeActivated
  168. dolibarr_set_const($db, "SUPPLIER_PROPOSAL_ADDON",$value,'chaine',0,'',$conf->entity);
  169. }
  170. /*
  171. * Affiche page
  172. */
  173. $dirmodels=array_merge(array('/'),(array) $conf->modules_parts['models']);
  174. llxHeader('',$langs->trans("SupplierProposalSetup"));
  175. $form=new Form($db);
  176. //if ($mesg) print $mesg;
  177. $linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans("BackToModuleList").'</a>';
  178. print load_fiche_titre($langs->trans("SupplierProposalSetup"),$linkback,'title_setup');
  179. $head = supplier_proposal_admin_prepare_head();
  180. dol_fiche_head($head, 'general', $langs->trans("CommRequests"), 0, 'supplier_proposal');
  181. /*
  182. * Module numerotation
  183. */
  184. print load_fiche_titre($langs->trans("SupplierProposalNumberingModules"),'','');
  185. print '<table class="noborder" width="100%">';
  186. print '<tr class="liste_titre">';
  187. print '<td>'.$langs->trans("Name")."</td>\n";
  188. print '<td>'.$langs->trans("Description")."</td>\n";
  189. print '<td class="nowrap">'.$langs->trans("Example")."</td>\n";
  190. print '<td align="center" width="60">'.$langs->trans("Status").'</td>';
  191. print '<td align="center" width="16">'.$langs->trans("ShortInfo").'</td>';
  192. print '</tr>'."\n";
  193. clearstatcache();
  194. foreach ($dirmodels as $reldir)
  195. {
  196. $dir = dol_buildpath($reldir."core/modules/supplier_proposal/");
  197. if (is_dir($dir))
  198. {
  199. $handle = opendir($dir);
  200. if (is_resource($handle))
  201. {
  202. while (($file = readdir($handle))!==false)
  203. {
  204. if (substr($file, 0, 22) == 'mod_supplier_proposal_' && substr($file, dol_strlen($file)-3, 3) == 'php')
  205. {
  206. $file = substr($file, 0, dol_strlen($file)-4);
  207. require_once $dir.$file.'.php';
  208. $module = new $file;
  209. // Show modules according to features level
  210. if ($module->version == 'development' && $conf->global->MAIN_FEATURES_LEVEL < 2) continue;
  211. if ($module->version == 'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1) continue;
  212. if ($module->isEnabled())
  213. {
  214. print '<tr class="oddeven"><td>'.$module->nom."</td><td>\n";
  215. print $module->info();
  216. print '</td>';
  217. // Show example of numbering module
  218. print '<td class="nowrap">';
  219. $tmp=$module->getExample();
  220. if (preg_match('/^Error/',$tmp)) print '<div class="error">'.$langs->trans($tmp).'</div>';
  221. elseif ($tmp=='NotConfigured') print $langs->trans($tmp);
  222. else print $tmp;
  223. print '</td>'."\n";
  224. print '<td align="center">';
  225. if ($conf->global->SUPPLIER_PROPOSAL_ADDON == "$file")
  226. {
  227. print img_picto($langs->trans("Activated"),'switch_on');
  228. }
  229. else
  230. {
  231. print '<a href="'.$_SERVER["PHP_SELF"].'?action=setmod&amp;value='.$file.'">';
  232. print img_picto($langs->trans("Disabled"),'switch_off');
  233. print '</a>';
  234. }
  235. print '</td>';
  236. $supplier_proposal=new SupplierProposal($db);
  237. $supplier_proposal->initAsSpecimen();
  238. // Info
  239. $htmltooltip='';
  240. $htmltooltip.=''.$langs->trans("Version").': <b>'.$module->getVersion().'</b><br>';
  241. $nextval=$module->getNextValue($mysoc,$supplier_proposal);
  242. if ("$nextval" != $langs->trans("NotAvailable")) { // Keep " on nextval
  243. $htmltooltip.=''.$langs->trans("NextValue").': ';
  244. if ($nextval) {
  245. if (preg_match('/^Error/',$nextval) || $nextval=='NotConfigured')
  246. $nextval = $langs->trans($nextval);
  247. $htmltooltip.=$nextval.'<br>';
  248. } else {
  249. $htmltooltip.=$langs->trans($module->error).'<br>';
  250. }
  251. }
  252. print '<td align="center">';
  253. print $form->textwithpicto('',$htmltooltip,1,0);
  254. print '</td>';
  255. print "</tr>\n";
  256. }
  257. }
  258. }
  259. closedir($handle);
  260. }
  261. }
  262. }
  263. print "</table><br>\n";
  264. /*
  265. * Document templates generators
  266. */
  267. print load_fiche_titre($langs->trans("SupplierProposalPDFModules"),'','');
  268. // Load array def with activated templates
  269. $def = array();
  270. $sql = "SELECT nom";
  271. $sql.= " FROM ".MAIN_DB_PREFIX."document_model";
  272. $sql.= " WHERE type = '".$type."'";
  273. $sql.= " AND entity = ".$conf->entity;
  274. $resql=$db->query($sql);
  275. if ($resql)
  276. {
  277. $i = 0;
  278. $num_rows=$db->num_rows($resql);
  279. while ($i < $num_rows)
  280. {
  281. $array = $db->fetch_array($resql);
  282. array_push($def, $array[0]);
  283. $i++;
  284. }
  285. }
  286. else
  287. {
  288. dol_print_error($db);
  289. }
  290. print "<table class=\"noborder\" width=\"100%\">\n";
  291. print "<tr class=\"liste_titre\">\n";
  292. print " <td>".$langs->trans("Name")."</td>\n";
  293. print " <td>".$langs->trans("Description")."</td>\n";
  294. print '<td align="center" width="40">'.$langs->trans("Status")."</td>\n";
  295. print '<td align="center" width="40">'.$langs->trans("Default")."</td>\n";
  296. print '<td align="center" width="40">'.$langs->trans("ShortInfo").'</td>';
  297. print '<td align="center" width="40">'.$langs->trans("Preview").'</td>';
  298. print "</tr>\n";
  299. clearstatcache();
  300. foreach ($dirmodels as $reldir)
  301. {
  302. foreach (array('','/doc') as $valdir)
  303. {
  304. $dir = dol_buildpath($reldir."core/modules/supplier_proposal".$valdir);
  305. if (is_dir($dir))
  306. {
  307. $handle=opendir($dir);
  308. if (is_resource($handle))
  309. {
  310. while (($file = readdir($handle))!==false)
  311. {
  312. $filelist[]=$file;
  313. }
  314. closedir($handle);
  315. arsort($filelist);
  316. foreach($filelist as $file)
  317. {
  318. if (preg_match('/\.modules\.php$/i',$file) && preg_match('/^(pdf_|doc_)/',$file))
  319. {
  320. if (file_exists($dir.'/'.$file))
  321. {
  322. $name = substr($file, 4, dol_strlen($file) -16);
  323. $classname = substr($file, 0, dol_strlen($file) -12);
  324. require_once $dir.'/'.$file;
  325. $module = new $classname($db);
  326. $modulequalified=1;
  327. if ($module->version == 'development' && $conf->global->MAIN_FEATURES_LEVEL < 2) $modulequalified=0;
  328. if ($module->version == 'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1) $modulequalified=0;
  329. if ($modulequalified)
  330. {
  331. print '<tr class="oddeven"><td width="100">';
  332. print (empty($module->name)?$name:$module->name);
  333. print "</td><td>\n";
  334. if (method_exists($module,'info')) print $module->info($langs);
  335. else print $module->description;
  336. print '</td>';
  337. // Active
  338. if (in_array($name, $def))
  339. {
  340. print '<td align="center">'."\n";
  341. print '<a href="'.$_SERVER["PHP_SELF"].'?action=del&amp;value='.$name.'">';
  342. print img_picto($langs->trans("Enabled"),'switch_on');
  343. print '</a>';
  344. print '</td>';
  345. }
  346. else
  347. {
  348. print "<td align=\"center\">\n";
  349. print '<a href="'.$_SERVER["PHP_SELF"].'?action=set&amp;value='.$name.'&amp;scan_dir='.$module->scandir.'&amp;label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"),'switch_off').'</a>';
  350. print "</td>";
  351. }
  352. // Defaut
  353. print "<td align=\"center\">";
  354. if ($conf->global->SUPPLIER_PROPOSAL_ADDON_PDF == "$name")
  355. {
  356. print img_picto($langs->trans("Default"),'on');
  357. }
  358. else
  359. {
  360. print '<a href="'.$_SERVER["PHP_SELF"].'?action=setdoc&amp;value='.$name.'&amp;scan_dir='.$module->scandir.'&amp;label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"),'off').'</a>';
  361. }
  362. print '</td>';
  363. // Info
  364. $htmltooltip = ''.$langs->trans("Name").': '.$module->name;
  365. $htmltooltip.='<br>'.$langs->trans("Type").': '.($module->type?$module->type:$langs->trans("Unknown"));
  366. if ($module->type == 'pdf')
  367. {
  368. $htmltooltip.='<br>'.$langs->trans("Width").'/'.$langs->trans("Height").': '.$module->page_largeur.'/'.$module->page_hauteur;
  369. }
  370. $htmltooltip.='<br><br><u>'.$langs->trans("FeaturesSupported").':</u>';
  371. $htmltooltip.='<br>'.$langs->trans("Logo").': '.yn($module->option_logo,1,1);
  372. $htmltooltip.='<br>'.$langs->trans("PaymentMode").': '.yn($module->option_modereg,1,1);
  373. $htmltooltip.='<br>'.$langs->trans("PaymentConditions").': '.yn($module->option_condreg,1,1);
  374. $htmltooltip.='<br>'.$langs->trans("MultiLanguage").': '.yn($module->option_multilang,1,1);
  375. //$htmltooltip.='<br>'.$langs->trans("Discounts").': '.yn($module->option_escompte,1,1);
  376. //$htmltooltip.='<br>'.$langs->trans("CreditNote").': '.yn($module->option_credit_note,1,1);
  377. $htmltooltip.='<br>'.$langs->trans("WatermarkOnDraftProposal").': '.yn($module->option_draft_watermark,1,1);
  378. print '<td align="center">';
  379. print $form->textwithpicto('',$htmltooltip,1,0);
  380. print '</td>';
  381. // Preview
  382. print '<td align="center">';
  383. if ($module->type == 'pdf')
  384. {
  385. print '<a href="'.$_SERVER["PHP_SELF"].'?action=specimen&module='.$name.'">'.img_object($langs->trans("Preview"),'bill').'</a>';
  386. }
  387. else
  388. {
  389. print img_object($langs->trans("PreviewNotAvailable"),'generic');
  390. }
  391. print '</td>';
  392. print "</tr>\n";
  393. }
  394. }
  395. }
  396. }
  397. }
  398. }
  399. }
  400. }
  401. print '</table>';
  402. print '<br>';
  403. /*
  404. * Other options
  405. *
  406. */
  407. print load_fiche_titre($langs->trans("OtherOptions"),'','');
  408. print "<table class=\"noborder\" width=\"100%\">";
  409. print "<tr class=\"liste_titre\">";
  410. print "<td>".$langs->trans("Parameter")."</td>\n";
  411. print '<td width="60" align="center">'.$langs->trans("Value")."</td>\n";
  412. print "<td>&nbsp;</td>\n";
  413. print "</tr>";
  414. $substitutionarray=pdf_getSubstitutionArray($langs, null, null, 2);
  415. $substitutionarray['__(AnyTranslationKey)__']=$langs->trans("Translation");
  416. $htmltext = '<i>'.$langs->trans("AvailableVariables").':<br>';
  417. foreach($substitutionarray as $key => $val) $htmltext.=$key.'<br>';
  418. $htmltext.='</i>';
  419. print '<form action="'.$_SERVER["PHP_SELF"].'" method="post">';
  420. print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
  421. print '<input type="hidden" name="action" value="set_SUPPLIER_PROPOSAL_FREE_TEXT">';
  422. print '<tr class="oddeven"><td colspan="2">';
  423. print $form->textwithpicto($langs->trans("FreeLegalTextOnSupplierProposal"), $langs->trans("AddCRIfTooLong").'<br><br>'.$htmltext, 1, 'help', '', 0, 2, 'freetexttooltip').'<br>';
  424. $variablename='SUPPLIER_PROPOSAL_FREE_TEXT';
  425. if (empty($conf->global->PDF_ALLOW_HTML_FOR_FREE_TEXT))
  426. {
  427. print '<textarea name="'.$variablename.'" class="flat" cols="120">'.$conf->global->$variablename.'</textarea>';
  428. }
  429. else
  430. {
  431. include_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
  432. $doleditor=new DolEditor($variablename, $conf->global->$variablename,'',80,'dolibarr_notes');
  433. print $doleditor->Create();
  434. }
  435. print '</td><td align="right">';
  436. print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">';
  437. print "</td></tr>\n";
  438. print '</form>';
  439. print "<form method=\"post\" action=\"".$_SERVER["PHP_SELF"]."\">";
  440. print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
  441. print "<input type=\"hidden\" name=\"action\" value=\"set_SUPPLIER_PROPOSAL_DRAFT_WATERMARK\">";
  442. print '<tr class="oddeven"><td>';
  443. print $form->textwithpicto($langs->trans("WatermarkOnDraftProposal"), $htmltext, 1, 'help', '', 0, 2, 'watermarktooltip').'<br>';
  444. print '</td><td>';
  445. print '<input size="50" class="flat" type="text" name="SUPPLIER_PROPOSAL_DRAFT_WATERMARK" value="'.$conf->global->SUPPLIER_PROPOSAL_DRAFT_WATERMARK.'">';
  446. print '</td><td align="right">';
  447. print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">';
  448. print "</td></tr>\n";
  449. print '</form>';
  450. if ($conf->banque->enabled)
  451. {
  452. print '<tr class="oddeven"><td>';
  453. print $langs->trans("BANK_ASK_PAYMENT_BANK_DURING_SUPPLIER_PROPOSAL").'</td><td>&nbsp</td><td align="right">';
  454. if (! empty($conf->use_javascript_ajax))
  455. {
  456. print ajax_constantonoff('BANK_ASK_PAYMENT_BANK_DURING_SUPPLIER_PROPOSAL');
  457. }
  458. else
  459. {
  460. if (empty($conf->global->BANK_ASK_PAYMENT_BANK_DURING_SUPPLIER_PROPOSAL))
  461. {
  462. print '<a href="'.$_SERVER['PHP_SELF'].'?action=set_BANK_ASK_PAYMENT_BANK_DURING_SUPPLIER_PROPOSAL&amp;value=1">'.img_picto($langs->trans("Disabled"),'switch_off').'</a>';
  463. }
  464. else
  465. {
  466. print '<a href="'.$_SERVER['PHP_SELF'].'?action=set_BANK_ASK_PAYMENT_BANK_DURING_SUPPLIER_PROPOSAL&amp;value=0">'.img_picto($langs->trans("Enabled"),'switch_on').'</a>';
  467. }
  468. }
  469. print '</td></tr>';
  470. }
  471. else
  472. {
  473. print '<tr class="oddeven"><td>';
  474. print $langs->trans("BANK_ASK_PAYMENT_BANK_DURING_SUPPLIER_PROPOSAL").'</td><td>&nbsp;</td><td align="center">'.$langs->trans('NotAvailable').'</td></tr>';
  475. }
  476. print '</table>';
  477. /*
  478. * Directory
  479. */
  480. print '<br>';
  481. print load_fiche_titre($langs->trans("PathToDocuments"),'','');
  482. print "<table class=\"noborder\" width=\"100%\">\n";
  483. print "<tr class=\"liste_titre\">\n";
  484. print " <td>".$langs->trans("Name")."</td>\n";
  485. print " <td>".$langs->trans("Value")."</td>\n";
  486. print "</tr>\n";
  487. print "<tr class=\"oddeven\">\n <td width=\"140\">".$langs->trans("PathDirectory")."</td>\n <td>".$conf->supplier_proposal->dir_output."</td>\n</tr>\n";
  488. print "</table>\n<br>";
  489. // End of page
  490. llxFooter();
  491. $db->close();