New: Make option MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT available by default
This commit is contained in:
parent
8b772eef30
commit
925e8f2793
@ -14,6 +14,7 @@ For users:
|
||||
- New: task #10606 : more comprehensive message error
|
||||
- New: task #11278 : Option into point of sale module to add services in list
|
||||
- New: task #11261 : Add an entry into menu called "New shipment".
|
||||
- New: Make option MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT available by default
|
||||
|
||||
For developers:
|
||||
- Qual: Removed no more used external libraries.
|
||||
|
||||
@ -40,6 +40,9 @@ $langs->load("members");
|
||||
if (!$user->admin)
|
||||
accessforbidden();
|
||||
|
||||
/*
|
||||
* Actions
|
||||
*/
|
||||
|
||||
if (isset($_POST["action"]) && $_POST["action"] == 'update')
|
||||
{
|
||||
@ -49,8 +52,7 @@ if (isset($_POST["action"]) && $_POST["action"] == 'update')
|
||||
dolibarr_set_const($db, "MAIN_PROFID2_IN_ADDRESS", $_POST["MAIN_PROFID2_IN_ADDRESS"],'chaine',0,'',$conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_PROFID3_IN_ADDRESS", $_POST["MAIN_PROFID3_IN_ADDRESS"],'chaine',0,'',$conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_PROFID4_IN_ADDRESS", $_POST["MAIN_PROFID4_IN_ADDRESS"],'chaine',0,'',$conf->entity);
|
||||
|
||||
$_SESSION["mainmenu"]=""; // Le gestionnaire de menu a pu changer
|
||||
dolibarr_set_const($db, "MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT", $_POST["MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT"],'chaine',0,'',$conf->entity);
|
||||
|
||||
Header("Location: ".$_SERVER["PHP_SELF"]."?mainmenu=home&leftmenu=setup");
|
||||
exit;
|
||||
@ -135,6 +137,21 @@ if (isset($_GET["action"]) && $_GET["action"] == 'edit') // Edit
|
||||
|
||||
print '</table>';
|
||||
|
||||
print '<br>';
|
||||
|
||||
// Other
|
||||
print_fiche_titre($langs->trans("Other"),'','').'<br>';
|
||||
$var=true;
|
||||
print '<table summary="more" class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre"><td>'.$langs->trans("Parameter").'</td><td width="200px">'.$langs->trans("Value").'</td></tr>';
|
||||
|
||||
// Hide any PDF informations
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td>'.$langs->trans("HideAnyVATInformationOnPDF").'</td><td>';
|
||||
print $html->selectyesno('MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT',(! empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT))?$conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT:0,1);
|
||||
print '</td></tr>';
|
||||
|
||||
print '</table>';
|
||||
|
||||
print '<br><center>';
|
||||
print '<input class="button" type="submit" value="'.$langs->trans("Save").'">';
|
||||
@ -156,7 +173,20 @@ else // Show
|
||||
// Show pdf format
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td>'.$langs->trans("DictionnaryPaperFormat").'</td><td>';
|
||||
print $conf->global->MAIN_PDF_FORMAT;
|
||||
$pdfformatlabel=$conf->global->MAIN_PDF_FORMAT;
|
||||
if (! empty($conf->global->MAIN_PDF_FORMAT))
|
||||
{
|
||||
$sql="SELECT code, label, width, height, unit FROM ".MAIN_DB_PREFIX."c_paper_format";
|
||||
$sql.=" WHERE code LIKE '%".$conf->global->MAIN_PDF_FORMAT."%'";
|
||||
|
||||
$resql=$db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
$obj=$db->fetch_object($resql);
|
||||
$pdfformatlabel=$obj->label.' - '.round($obj->width).'x'.round($obj->height).' '.$obj->unit;
|
||||
}
|
||||
}
|
||||
print $pdfformatlabel;
|
||||
print '</td></tr>';
|
||||
|
||||
print '</table>';
|
||||
@ -193,6 +223,22 @@ else // Show
|
||||
|
||||
print '</table>'."\n";
|
||||
|
||||
print '<br>';
|
||||
|
||||
// Other
|
||||
print_fiche_titre($langs->trans("Other"),'','').'<br>';
|
||||
$var=true;
|
||||
print '<table summary="more" class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre"><td>'.$langs->trans("Parameter").'</td><td width="200px">'.$langs->trans("Value").'</td></tr>';
|
||||
|
||||
// Hide any PDF informations
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td>'.$langs->trans("HideAnyVATInformationOnPDF").'</td><td>';
|
||||
print yn($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT,1);
|
||||
print '</td></tr>';
|
||||
|
||||
print '</table>';
|
||||
|
||||
|
||||
print '<div class="tabsAction">';
|
||||
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?action=edit">'.$langs->trans("Modify").'</a>';
|
||||
|
||||
@ -322,10 +322,12 @@ class FormAdmin
|
||||
|
||||
/**
|
||||
* Return html select list with available languages (key='en_US', value='United States' for example)
|
||||
* @param selected Langue pre-selectionnee
|
||||
* @param htmlname Nom de la zone select
|
||||
* @param filter Key to filter
|
||||
* @param showempty Add empty value
|
||||
*
|
||||
* @param string $selected Paper format pre-selected
|
||||
* @param string $htmlname Name of HTML select field
|
||||
* @param string $filter Key to filter
|
||||
* @param int $showempty Add empty value
|
||||
* @return string Return HTML output
|
||||
*/
|
||||
function select_paper_format($selected='',$htmlname='paperformat_id',$filter=0,$showempty=0)
|
||||
{
|
||||
|
||||
@ -311,6 +311,7 @@ NoSmsEngine=No SMS sender manager available. SMS sender manager are not installe
|
||||
PDF=PDF
|
||||
PDFDesc=You can set each global options related to the PDF generation
|
||||
PDFAddressForging=Rules to forge address boxes
|
||||
HideAnyVATInformationOnPDF=Hide all information related to VAT on generated PDF
|
||||
|
||||
# Modules
|
||||
Module0Name=Users & groups
|
||||
|
||||
@ -312,6 +312,7 @@ NoSmsEngine=Aucun gestionnaire d'envoi de SMS n'est disponible. Les gestionnaire
|
||||
PDF=PDF
|
||||
PDFDesc=Vous pouvez définir ici des options globales sur la génération des PDF
|
||||
PDFAddressForging=Règle de fabrication des zones adresses
|
||||
HideAnyVATInformationOnPDF=Cacher toutes les informations en rapport avec la TVA sur les PDF générés
|
||||
|
||||
# Modules= undefined
|
||||
Module0Name= Utilisateurs & groupes
|
||||
|
||||
Loading…
Reference in New Issue
Block a user