Skip to content
Snippets Groups Projects
Commit 5b115ab7 authored by Juanjo Menent's avatar Juanjo Menent
Browse files

Task #8618: Add supplier invoice free text

parent 6acf2595
No related branches found
No related tags found
No related merge requests found
......@@ -191,6 +191,10 @@ if ($_POST["action"] == 'addcat')
$fourn->CreateCategory($user,$_POST["cat"]);
}
if ($_POST["action"] == 'set_SUPPLIER_INVOICE_FREE_TEXT')
{
dolibarr_set_const($db, "SUPPLIER_INVOICE_FREE_TEXT",$_POST["SUPPLIER_INVOICE_FREE_TEXT"],'chaine',0,'',$conf->entity);
}
/*
* View
*/
......@@ -533,9 +537,29 @@ while (($file = readdir($handle))!==false)
print "</tr>\n";
}
}
closedir($handle);
print '</table><br/>';
print_titre($langs->trans("OtherOptions"));
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">';
print '<td>'.$langs->trans("Parameter").'</td>';
print '<td align="center" width="60">'.$langs->trans("Value").'</td>';
print '<td width="80">&nbsp;</td>';
print "</tr>\n";
print '<form action="'.$_SERVER["PHP_SELF"].'" method="post">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<input type="hidden" name="action" value="set_SUPPLIER_INVOICE_FREE_TEXT">';
print '<tr '.$bc[$var].'><td colspan="2">';
print $langs->trans("FreeLegalTextOnInvoices").' ('.$langs->trans("AddCRIfTooLong").')<br>';
print '<textarea name="SUPPLIER_INVOICE_FREE_TEXT" class="flat" cols="120">'.$conf->global->SUPPLIER_INVOICE_FREE_TEXT.'</textarea>';
print '</td><td align="right">';
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">';
print "</td></tr>\n";
print '</form>';
closedir($handle);
llxFooter('$Date$ - $Revision$');
?>
......@@ -772,7 +772,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
*/
function _pagefoot(&$pdf, $object, $outputlangs)
{
return pdf_pagefoot($pdf,$outputlangs,'FACTURESUPPLIER_FREE_TEXT',$this->emetteur,$this->marge_basse,$this->marge_gauche,$this->page_hauteur,$object);
return pdf_pagefoot($pdf,$outputlangs,'SUPPLIER_INVOICE_FREE_TEXT',$this->emetteur,$this->marge_basse,$this->marge_gauche,$this->page_hauteur,$object);
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment