|
@@ -38,9 +38,11 @@ require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php';
|
|
|
// Load translation files required by the page
|
|
|
$langs->loadLangs(array("admin", "other", "orders"));
|
|
|
|
|
|
+$action = GETPOST('action', 'aZ09');
|
|
|
+
|
|
|
$type = GETPOST('type', 'alpha');
|
|
|
$value = GETPOST('value', 'alpha');
|
|
|
-$action = GETPOST('action', 'aZ09');
|
|
|
+$modulepart = GETPOST('modulepart', 'aZ09'); // Used by actions_setmoduleoptions.inc.php
|
|
|
|
|
|
$label = GETPOST('label', 'alpha');
|
|
|
$scandir = GETPOST('scan_dir', 'alpha');
|
|
@@ -98,7 +100,9 @@ if ($action == 'specimen') { // For invoices
|
|
|
$facture->thirdparty = $specimenthirdparty; // Define who should has build the invoice (so the supplier)
|
|
|
|
|
|
// Search template files
|
|
|
- $file = ''; $classname = ''; $filefound = 0;
|
|
|
+ $file = '';
|
|
|
+ $classname = '';
|
|
|
+ $filefound = 0;
|
|
|
$dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']);
|
|
|
foreach ($dirmodels as $reldir) {
|
|
|
$file = dol_buildpath($reldir."core/modules/supplier_invoice/doc/pdf_".$modele.".modules.php", 0);
|
|
@@ -185,12 +189,12 @@ if ($action == 'set_SUPPLIER_INVOICE_FREE_TEXT') {
|
|
|
* View
|
|
|
*/
|
|
|
|
|
|
+$form = new Form($db);
|
|
|
+
|
|
|
$dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']);
|
|
|
|
|
|
llxHeader("", "");
|
|
|
|
|
|
-$form = new Form($db);
|
|
|
-
|
|
|
$linkback = '<a href="'.DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans("BackToModuleList").'</a>';
|
|
|
print load_fiche_titre($langs->trans("SuppliersSetup"), $linkback, 'title_setup');
|
|
|
|
|
@@ -205,6 +209,7 @@ print dol_get_fiche_head($head, 'invoice', $langs->trans("Suppliers"), -1, 'comp
|
|
|
|
|
|
print load_fiche_titre($langs->trans("SuppliersInvoiceNumberingModel"), '', '');
|
|
|
|
|
|
+print '<div class="div-table-responsive-no-min">';
|
|
|
print '<table class="noborder centpercent">';
|
|
|
print '<tr class="liste_titre">';
|
|
|
print '<td width="100">'.$langs->trans("Name").'</td>';
|
|
@@ -244,7 +249,7 @@ foreach ($dirmodels as $reldir) {
|
|
|
print $module->info();
|
|
|
print '</td>';
|
|
|
|
|
|
- // Show example of numbering model
|
|
|
+ // Show example of numbering module
|
|
|
print '<td class="nowrap">';
|
|
|
$tmp = $module->getExample();
|
|
|
if (preg_match('/^Error/', $tmp)) {
|
|
@@ -297,13 +302,13 @@ foreach ($dirmodels as $reldir) {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-print '</table><br>';
|
|
|
+print '</table></div><br>';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
- * Modeles documents for supplier invoices
|
|
|
+ * Documents models for supplier invoices
|
|
|
*/
|
|
|
|
|
|
print load_fiche_titre($langs->trans("BillsPDFModules"), '', '');
|
|
@@ -329,6 +334,7 @@ if ($resql) {
|
|
|
dol_print_error($db);
|
|
|
}
|
|
|
|
|
|
+print '<div class="div-table-responsive-no-min">';
|
|
|
print '<table class="noborder centpercent">'."\n";
|
|
|
print '<tr class="liste_titre">'."\n";
|
|
|
print '<td width="100">'.$langs->trans("Name").'</td>'."\n";
|
|
@@ -380,7 +386,7 @@ foreach ($dirmodels as $reldir) {
|
|
|
//if ($conf->global->INVOICE_SUPPLIER_ADDON_PDF != "$name")
|
|
|
//{
|
|
|
// Even if choice is the default value, we allow to disable it: For supplier invoice, we accept to have no doc generation at all
|
|
|
- print '<a href="'.$_SERVER["PHP_SELF"].'?action=del&token='.newToken().'&value='.urlencode($name).'&scan_dir='.urlencode($module->scandir).'&label='.urlencode($module->name).'&type=invoice_supplier">';
|
|
|
+ print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=del&token='.newToken().'&value='.urlencode($name).'&scan_dir='.urlencode($module->scandir).'&label='.urlencode($module->name).'&type=invoice_supplier">';
|
|
|
print img_picto($langs->trans("Enabled"), 'switch_on');
|
|
|
print '</a>';
|
|
|
/*}
|
|
@@ -391,7 +397,7 @@ foreach ($dirmodels as $reldir) {
|
|
|
print "</td>";
|
|
|
} else {
|
|
|
print '<td class="center">'."\n";
|
|
|
- print '<a href="'.$_SERVER["PHP_SELF"].'?action=set&token='.newToken().'&value='.urlencode($name).'&scan_dir='.urlencode($module->scandir).'&label='.urlencode($module->name).'&type=invoice_supplier">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>';
|
|
|
+ print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=set&token='.newToken().'&value='.urlencode($name).'&scan_dir='.urlencode($module->scandir).'&label='.urlencode($module->name).'&type=invoice_supplier">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>';
|
|
|
print "</td>";
|
|
|
}
|
|
|
|
|
@@ -400,9 +406,9 @@ foreach ($dirmodels as $reldir) {
|
|
|
if (getDolGlobalString("INVOICE_SUPPLIER_ADDON_PDF") == "$name") {
|
|
|
//print img_picto($langs->trans("Default"),'on');
|
|
|
// Even if choice is the default value, we allow to disable it: For supplier invoice, we accept to have no doc generation at all
|
|
|
- print '<a href="'.$_SERVER["PHP_SELF"].'?action=unsetdoc&token='.newToken().'&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'&type=invoice_supplier"" alt="'.$langs->trans("Disable").'">'.img_picto($langs->trans("Enabled"), 'on').'</a>';
|
|
|
+ print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=unsetdoc&token='.newToken().'&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'&type=invoice_supplier"" alt="'.$langs->trans("Disable").'">'.img_picto($langs->trans("Enabled"), 'on').'</a>';
|
|
|
} else {
|
|
|
- print '<a href="'.$_SERVER["PHP_SELF"].'?action=setdoc&token='.newToken().'&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'&type=invoice_supplier"" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'off').'</a>';
|
|
|
+ print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setdoc&token='.newToken().'&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'&type=invoice_supplier"" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'off').'</a>';
|
|
|
}
|
|
|
print '</td>';
|
|
|
|
|
@@ -420,7 +426,7 @@ foreach ($dirmodels as $reldir) {
|
|
|
print $form->textwithpicto('', $htmltooltip, 1, 0);
|
|
|
print '</td>';
|
|
|
print '<td class="center">';
|
|
|
- print '<a href="'.$_SERVER["PHP_SELF"].'?action=specimen&module='.$name.'">'.img_object($langs->trans("Preview"), 'pdf').'</a>';
|
|
|
+ print '<a href="'.$_SERVER["PHP_SELF"].'?action=specimen&module='.urlencode($name).'">'.img_object($langs->trans("Preview"), 'pdf').'</a>';
|
|
|
print '</td>';
|
|
|
|
|
|
print "</tr>\n";
|
|
@@ -432,7 +438,7 @@ foreach ($dirmodels as $reldir) {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-print '</table><br>';
|
|
|
+print '</table></div><br>';
|
|
|
|
|
|
/*
|
|
|
* Other options
|
|
@@ -443,6 +449,8 @@ print '<input type="hidden" name="token" value="'.newToken().'">';
|
|
|
print '<input type="hidden" name="action" value="set_SUPPLIER_INVOICE_FREE_TEXT">';
|
|
|
|
|
|
print load_fiche_titre($langs->trans("OtherOptions"), '', '');
|
|
|
+
|
|
|
+print '<div class="div-table-responsive-no-min">';
|
|
|
print '<table class="noborder centpercent">';
|
|
|
print '<tr class="liste_titre">';
|
|
|
print '<td>'.$langs->trans("Parameter").'</td>';
|
|
@@ -472,7 +480,7 @@ print '</td><td class="right">';
|
|
|
print '<input type="submit" class="button button-edit" value="'.$langs->trans("Modify").'">';
|
|
|
print "</td></tr>\n";
|
|
|
|
|
|
-print '</table><br>';
|
|
|
+print '</table></div><br>';
|
|
|
|
|
|
print '</form>';
|
|
|
|
|
@@ -482,6 +490,8 @@ print '</form>';
|
|
|
*/
|
|
|
|
|
|
print load_fiche_titre($langs->trans("Notifications"), '', '');
|
|
|
+
|
|
|
+print '<div class="div-table-responsive-no-min">';
|
|
|
print '<table class="noborder centpercent">';
|
|
|
print '<tr class="liste_titre">';
|
|
|
print '<td>'.$langs->trans("Parameter").'</td>';
|
|
@@ -495,6 +505,7 @@ print '</td><td class="right">';
|
|
|
print "</td></tr>\n";
|
|
|
|
|
|
print '</table>';
|
|
|
+print '</div>';
|
|
|
|
|
|
// End of page
|
|
|
llxFooter();
|