mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-21 00:41:29 +01:00
Merge branch 'develop' into new_branch_24_08_2022
This commit is contained in:
@@ -507,7 +507,7 @@ print '<tr class="oddeven">';
|
||||
print "<td>".$langs->trans("SuggestPaymentByRIBOnAccount")."</td>";
|
||||
print "<td>";
|
||||
if (empty($conf->facture->enabled)) {
|
||||
if (!empty($conf->banque->enabled)) {
|
||||
if (isModEnabled("banque")) {
|
||||
$sql = "SELECT rowid, label";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."bank_account";
|
||||
$sql .= " WHERE clos = 0";
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
|
||||
require '../main.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/security.lib.php';
|
||||
|
||||
// Load translation files required by the page
|
||||
$langs->load("admin");
|
||||
@@ -255,16 +256,18 @@ if ($result) {
|
||||
while ($i < $num) {
|
||||
$obj = $db->fetch_object($result);
|
||||
|
||||
$value = dolDecrypt($obj->value);
|
||||
|
||||
print "\n";
|
||||
|
||||
print '<tr class="oddeven" data-checkbox-id="check_'.$i.'"><td>'.$obj->name.'</td>'."\n";
|
||||
print '<tr class="oddeven" data-checkbox-id="check_'.$i.'"><td>'.dol_escape_htmltag($obj->name).'</td>'."\n";
|
||||
|
||||
// Value
|
||||
print '<td>';
|
||||
print '<input type="hidden" name="const['.$i.'][rowid]" value="'.$obj->rowid.'">';
|
||||
print '<input type="hidden" name="const['.$i.'][name]" value="'.$obj->name.'">';
|
||||
print '<input type="hidden" name="const['.$i.'][type]" value="'.$obj->type.'">';
|
||||
print '<input type="text" id="value_'.$i.'" class="flat inputforupdate minwidth150" name="const['.$i.'][value]" value="'.htmlspecialchars($obj->value).'">';
|
||||
print '<input type="text" id="value_'.$i.'" class="flat inputforupdate minwidth150" name="const['.$i.'][value]" value="'.htmlspecialchars($value).'">';
|
||||
print '</td>';
|
||||
|
||||
// Note
|
||||
@@ -280,12 +283,12 @@ if ($result) {
|
||||
// Entity limit to superadmin
|
||||
if (isModEnabled('multicompany') && !$user->entity) {
|
||||
print '<td>';
|
||||
print '<input type="text" class="flat" size="1" name="const[' . $i . '][entity]" value="' . $obj->entity . '">';
|
||||
print '<input type="text" class="flat" size="1" name="const['.$i.'][entity]" value="'.((int) $obj->entity).'">';
|
||||
print '</td>';
|
||||
print '<td class="center">';
|
||||
} else {
|
||||
print '<td class="center">';
|
||||
print '<input type="hidden" name="const[' . $i . '][entity]" value="' . $obj->entity . '">';
|
||||
print '<input type="hidden" name="const['.$i.'][entity]" value="'.((int) $obj->entity).'">';
|
||||
}
|
||||
|
||||
if ($conf->use_javascript_ajax) {
|
||||
|
||||
@@ -483,33 +483,33 @@ $tabrowid[44] = "rowid";
|
||||
|
||||
// Condition to show dictionary in setup page
|
||||
$tabcond = array();
|
||||
$tabcond[1] = (!empty($conf->societe->enabled));
|
||||
$tabcond[1] = (isModEnabled("societe"));
|
||||
$tabcond[2] = true;
|
||||
$tabcond[3] = true;
|
||||
$tabcond[4] = true;
|
||||
$tabcond[5] = (!empty($conf->societe->enabled) || !empty($conf->adherent->enabled));
|
||||
$tabcond[5] = (isModEnabled("societe") || !empty($conf->adherent->enabled));
|
||||
$tabcond[6] = isModEnabled('agenda');
|
||||
$tabcond[7] = !empty($conf->tax->enabled);
|
||||
$tabcond[8] = !empty($conf->societe->enabled);
|
||||
$tabcond[8] = isModEnabled("societe");
|
||||
$tabcond[9] = true;
|
||||
$tabcond[10] = true;
|
||||
$tabcond[11] = (!empty($conf->societe->enabled));
|
||||
$tabcond[12] = (!empty($conf->commande->enabled) || !empty($conf->propal->enabled) || isModEnabled('facture') || (!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || !empty($conf->supplier_invoice->enabled) || !empty($conf->supplier_order->enabled));
|
||||
$tabcond[13] = (!empty($conf->commande->enabled) || !empty($conf->propal->enabled) || isModEnabled('facture') || (!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || !empty($conf->supplier_invoice->enabled) || !empty($conf->supplier_order->enabled));
|
||||
$tabcond[14] = (!empty($conf->product->enabled) && (!empty($conf->ecotax->enabled) || !empty($conf->global->MAIN_SHOW_ECOTAX_DICTIONNARY)));
|
||||
$tabcond[11] = (isModEnabled("societe"));
|
||||
$tabcond[12] = (!empty($conf->commande->enabled) || isModEnabled("propal") || isModEnabled('facture') || (isModEnabled("fournisseur") && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || isModEnabled("supplier_invoice") || isModEnabled("supplier_order"));
|
||||
$tabcond[13] = (!empty($conf->commande->enabled) || isModEnabled("propal") || isModEnabled('facture') || (isModEnabled("fournisseur") && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || isModEnabled("supplier_invoice") || isModEnabled("supplier_order"));
|
||||
$tabcond[14] = (isModEnabled("product") && (!empty($conf->ecotax->enabled) || !empty($conf->global->MAIN_SHOW_ECOTAX_DICTIONNARY)));
|
||||
$tabcond[15] = true;
|
||||
$tabcond[16] = (!empty($conf->societe->enabled) && empty($conf->global->SOCIETE_DISABLE_PROSPECTS));
|
||||
$tabcond[16] = (isModEnabled("societe") && empty($conf->global->SOCIETE_DISABLE_PROSPECTS));
|
||||
$tabcond[17] = (!empty($conf->deplacement->enabled) || !empty($conf->expensereport->enabled));
|
||||
$tabcond[18] = !empty($conf->expedition->enabled) || !empty($conf->reception->enabled);
|
||||
$tabcond[19] = !empty($conf->societe->enabled);
|
||||
$tabcond[20] = (!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || !empty($conf->supplier_order->enabled);
|
||||
$tabcond[21] = !empty($conf->propal->enabled);
|
||||
$tabcond[22] = (!empty($conf->commande->enabled) || !empty($conf->propal->enabled));
|
||||
$tabcond[18] = isModEnabled("expedition") || isModEnabled("reception");
|
||||
$tabcond[19] = isModEnabled("societe");
|
||||
$tabcond[20] = (isModEnabled("fournisseur") && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || isModEnabled("supplier_order");
|
||||
$tabcond[21] = isModEnabled("propal");
|
||||
$tabcond[22] = (!empty($conf->commande->enabled) || isModEnabled("propal"));
|
||||
$tabcond[23] = true;
|
||||
$tabcond[24] = !empty($conf->resource->enabled);
|
||||
$tabcond[25] = !empty($conf->website->enabled);
|
||||
//$tabcond[26]= !empty($conf->product->enabled);
|
||||
$tabcond[27] = !empty($conf->societe->enabled);
|
||||
//$tabcond[26]= isModEnabled("product");
|
||||
$tabcond[27] = isModEnabled("societe");
|
||||
$tabcond[28] = !empty($conf->holiday->enabled);
|
||||
$tabcond[29] = !empty($conf->project->enabled);
|
||||
$tabcond[30] = !empty($conf->label->enabled);
|
||||
@@ -519,13 +519,13 @@ $tabcond[33] = !empty($conf->hrm->enabled);
|
||||
$tabcond[34] = !empty($conf->hrm->enabled);
|
||||
$tabcond[35] = !empty($conf->expensereport->enabled) && !empty($conf->global->MAIN_USE_EXPENSE_IK);
|
||||
$tabcond[36] = !empty($conf->expensereport->enabled) && !empty($conf->global->MAIN_USE_EXPENSE_IK);
|
||||
$tabcond[37] = !empty($conf->product->enabled);
|
||||
$tabcond[37] = isModEnabled("product");
|
||||
$tabcond[38] = !empty($conf->socialnetworks->enabled);
|
||||
$tabcond[39] = (!empty($conf->societe->enabled) && empty($conf->global->SOCIETE_DISABLE_PROSPECTS) && !empty($conf->global->THIRDPARTY_ENABLE_PROSPECTION_ON_ALTERNATIVE_ADRESSES));
|
||||
$tabcond[40] = (!empty($conf->societe->enabled) && !empty($conf->global->THIRDPARTY_ENABLE_PROSPECTION_ON_ALTERNATIVE_ADRESSES));
|
||||
$tabcond[39] = (isModEnabled("societe") && empty($conf->global->SOCIETE_DISABLE_PROSPECTS) && !empty($conf->global->THIRDPARTY_ENABLE_PROSPECTION_ON_ALTERNATIVE_ADRESSES));
|
||||
$tabcond[40] = (isModEnabled("societe") && !empty($conf->global->THIRDPARTY_ENABLE_PROSPECTION_ON_ALTERNATIVE_ADRESSES));
|
||||
$tabcond[41] = !empty($conf->intracommreport->enabled);
|
||||
$tabcond[42] = !empty($conf->product->enabled);
|
||||
$tabcond[43] = !empty($conf->product->enabled) && !empty($conf->productbatch->enabled) && $conf->global->MAIN_FEATURES_LEVEL >= 2;
|
||||
$tabcond[42] = isModEnabled("product");
|
||||
$tabcond[43] = isModEnabled("product") && !empty($conf->productbatch->enabled) && $conf->global->MAIN_FEATURES_LEVEL >= 2;
|
||||
$tabcond[44] = !empty($conf->asset->enabled);
|
||||
|
||||
// List of help for fields (no more used, help is defined into tabcomplete)
|
||||
|
||||
@@ -278,7 +278,7 @@ if ($action == 'edit') {
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/lib/security2.lib.php';
|
||||
print dolJSToSetRandomPassword($constname, 'generate_token'.$constname);
|
||||
} elseif ($val['type'] == 'product') {
|
||||
if (!empty($conf->product->enabled) || !empty($conf->service->enabled)) {
|
||||
if (isModEnabled("product") || isModEnabled("service")) {
|
||||
$selected = (empty($conf->global->$constname) ? '' : $conf->global->$constname);
|
||||
$form->select_produits($selected, $constname, '', 0);
|
||||
}
|
||||
|
||||
@@ -62,11 +62,11 @@ $conditions = array(
|
||||
'NOTE_PUBLIC' => 1,
|
||||
'NOTE_PRIVATE' => 1,
|
||||
'SOCIETE' => 1,
|
||||
'PRODUCTDESC' => (!empty($conf->product->enabled) || !empty($conf->service->enabled)),
|
||||
'DETAILS' => (isModEnabled('facture') || !empty($conf->propal->enabled) || !empty($conf->commande->enabled) || !empty($conf->supplier_proposal->enabled) || (!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled)),
|
||||
'PRODUCTDESC' => (isModEnabled("product") || isModEnabled("service")),
|
||||
'DETAILS' => (isModEnabled('facture') || isModEnabled("propal") || !empty($conf->commande->enabled) || !empty($conf->supplier_proposal->enabled) || (isModEnabled("fournisseur") && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || isModEnabled("supplier_order") || isModEnabled("supplier_invoice")),
|
||||
'USERSIGN' => 1,
|
||||
'MAILING' => !empty($conf->mailing->enabled),
|
||||
'MAIL' => (isModEnabled('facture') || !empty($conf->propal->enabled) || !empty($conf->commande->enabled)),
|
||||
'MAIL' => (isModEnabled('facture') || isModEnabled("propal") || !empty($conf->commande->enabled)),
|
||||
'TICKET' => !empty($conf->ticket->enabled),
|
||||
);
|
||||
// Picto
|
||||
|
||||
@@ -159,7 +159,7 @@ print '</td></tr>';
|
||||
|
||||
// Synchro contact active
|
||||
if (isModEnabled('societe')) {
|
||||
print '<tr class="oddeven"><td>' . $langs->trans("LDAPDnContactActive") . '</td><td>';
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("LDAPDnContactActive").'</td><td>';
|
||||
print $formldap->selectLdapDnSynchroActive(getDolGlobalInt('LDAP_CONTACT_ACTIVE'), 'activecontact', array(Ldap::SYNCHRO_LDAP_TO_DOLIBARR));
|
||||
print '</td><td><span class="opacitymedium">' . $langs->trans("LDAPDnContactActiveExample") . '</span></td></tr>';
|
||||
}
|
||||
|
||||
@@ -158,7 +158,7 @@ if (!empty($conf->global->ADHERENT_USE_MAILMAN)) {
|
||||
$link .= '</a>';
|
||||
// Edition des varibales globales
|
||||
$constantes = array(
|
||||
'ADHERENT_MAILMAN_ADMINPW',
|
||||
'ADHERENT_MAILMAN_ADMIN_PASSWORD',
|
||||
'ADHERENT_MAILMAN_URL',
|
||||
'ADHERENT_MAILMAN_UNSUB_URL',
|
||||
'ADHERENT_MAILMAN_LISTS'
|
||||
|
||||
@@ -185,13 +185,13 @@ if (!empty($conf->adherent->enabled) && !empty($user->rights->adherent->lire)) {
|
||||
if (!empty($conf->recruitment->enabled) && !empty($user->rights->recruitment->recruitmentjobposition->read)) {
|
||||
$elementList['recruitmentcandidature_send'] = img_picto('', 'recruitmentcandidature', 'class="pictofixedwidth"').dol_escape_htmltag($langs->trans('RecruitmentCandidatures'));
|
||||
}
|
||||
if (!empty($conf->societe->enabled) && !empty($user->rights->societe->lire)) {
|
||||
if (isModEnabled("societe") && !empty($user->rights->societe->lire)) {
|
||||
$elementList['thirdparty'] = img_picto('', 'company', 'class="pictofixedwidth"').dol_escape_htmltag($langs->trans('MailToThirdparty'));
|
||||
}
|
||||
if (!empty($conf->project->enabled)) {
|
||||
$elementList['project'] = img_picto('', 'project', 'class="pictofixedwidth"').dol_escape_htmltag($langs->trans('MailToProject'));
|
||||
}
|
||||
if (!empty($conf->propal->enabled) && !empty($user->rights->propal->lire)) {
|
||||
if (isModEnabled("propal") && !empty($user->rights->propal->lire)) {
|
||||
$elementList['propal_send'] = img_picto('', 'propal', 'class="pictofixedwidth"').dol_escape_htmltag($langs->trans('MailToSendProposal'));
|
||||
}
|
||||
if (!empty($conf->commande->enabled) && !empty($user->rights->commande->lire)) {
|
||||
@@ -200,10 +200,10 @@ if (!empty($conf->commande->enabled) && !empty($user->rights->commande->lire)) {
|
||||
if (isModEnabled('facture') && !empty($user->rights->facture->lire)) {
|
||||
$elementList['facture_send'] = img_picto('', 'bill', 'class="pictofixedwidth"').dol_escape_htmltag($langs->trans('MailToSendInvoice'));
|
||||
}
|
||||
if (!empty($conf->expedition->enabled)) {
|
||||
if (isModEnabled("expedition")) {
|
||||
$elementList['shipping_send'] = img_picto('', 'dolly', 'class="pictofixedwidth"').dol_escape_htmltag($langs->trans('MailToSendShipment'));
|
||||
}
|
||||
if (!empty($conf->reception->enabled)) {
|
||||
if (isModEnabled("reception")) {
|
||||
$elementList['reception_send'] = img_picto('', 'dollyrevert', 'class="pictofixedwidth"').dol_escape_htmltag($langs->trans('MailToSendReception'));
|
||||
}
|
||||
if (!empty($conf->ficheinter->enabled)) {
|
||||
@@ -212,10 +212,10 @@ if (!empty($conf->ficheinter->enabled)) {
|
||||
if (!empty($conf->supplier_proposal->enabled)) {
|
||||
$elementList['supplier_proposal_send'] = img_picto('', 'propal', 'class="pictofixedwidth"').dol_escape_htmltag($langs->trans('MailToSendSupplierRequestForQuotation'));
|
||||
}
|
||||
if ((!empty($conf->fournisseur->enabled) && !empty($user->rights->fournisseur->commande->lire) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || (!empty($conf->supplier_order->enabled) && !empty($user->rights->supplier_order->lire))) {
|
||||
if ((isModEnabled("fournisseur") && !empty($user->rights->fournisseur->commande->lire) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || (isModEnabled("supplier_order") && !empty($user->rights->supplier_order->lire))) {
|
||||
$elementList['order_supplier_send'] = img_picto('', 'order', 'class="pictofixedwidth"').dol_escape_htmltag($langs->trans('MailToSendSupplierOrder'));
|
||||
}
|
||||
if ((!empty($conf->fournisseur->enabled) && !empty($user->rights->fournisseur->facture->lire) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || (!empty($conf->supplier_invoice->enabled) && !empty($user->rights->supplier_invoice->lire))) {
|
||||
if ((isModEnabled("fournisseur") && !empty($user->rights->fournisseur->facture->lire) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || (isModEnabled("supplier_invoice") && !empty($user->rights->supplier_invoice->lire))) {
|
||||
$elementList['invoice_supplier_send'] = img_picto('', 'bill', 'class="pictofixedwidth"').dol_escape_htmltag($langs->trans('MailToSendSupplierInvoice'));
|
||||
}
|
||||
if (!empty($conf->contrat->enabled) && !empty($user->rights->contrat->lire)) {
|
||||
|
||||
@@ -177,7 +177,7 @@ print load_fiche_titre($langs->trans("NotificationSetup"), $linkback, 'title_set
|
||||
print '<span class="opacitymedium">';
|
||||
print $langs->trans("NotificationsDesc").'<br>';
|
||||
print $langs->trans("NotificationsDescUser").'<br>';
|
||||
if (!empty($conf->societe->enabled)) {
|
||||
if (isModEnabled("societe")) {
|
||||
print $langs->trans("NotificationsDescContact").'<br>';
|
||||
}
|
||||
print $langs->trans("NotificationsDescGlobal").'<br>';
|
||||
@@ -361,7 +361,7 @@ print $form->buttonsSaveCancel("Save", '');
|
||||
|
||||
print '<div class="opacitymedium">';
|
||||
print '* '.$langs->trans("GoOntoUserCardToAddMore").'<br>';
|
||||
if (!empty($conf->societe->enabled)) {
|
||||
if (isModEnabled("societe")) {
|
||||
print '** '.$langs->trans("GoOntoContactCardToAddMore").'<br>';
|
||||
}
|
||||
print '</div>';
|
||||
@@ -384,7 +384,7 @@ print load_fiche_titre($langs->trans("ListOfFixedNotifications"), '', 'email');
|
||||
print '<div class="info">';
|
||||
print $langs->trans("Note").':<br>';
|
||||
print '* '.$langs->trans("GoOntoUserCardToAddMore").'<br>';
|
||||
if (!empty($conf->societe->enabled)) {
|
||||
if (isModEnabled("societe")) {
|
||||
print '** '.$langs->trans("GoOntoContactCardToAddMore").'<br>';
|
||||
}
|
||||
print '</div>';
|
||||
|
||||
@@ -525,7 +525,7 @@ print '<tr class="oddeven">';
|
||||
print "<td>".$langs->trans("SuggestPaymentByRIBOnAccount")."</td>";
|
||||
print "<td>";
|
||||
if (empty($conf->facture->enabled)) {
|
||||
if (!empty($conf->banque->enabled)) {
|
||||
if (isModEnabled("banque")) {
|
||||
$sql = "SELECT rowid, label";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."bank_account";
|
||||
$sql .= " WHERE clos = 0";
|
||||
|
||||
@@ -245,7 +245,7 @@ $found++;
|
||||
print '<tr class="oddeven">';
|
||||
print '<td>'.$langs->trans("DeStockOnShipment").'</td>';
|
||||
print '<td class="right">';
|
||||
if (!empty($conf->expedition->enabled)) {
|
||||
if (isModEnabled("expedition")) {
|
||||
if ($conf->use_javascript_ajax) {
|
||||
print ajax_constantonoff('STOCK_CALCULATE_ON_SHIPMENT', array(), null, 0, 0, 0, 2, 1);
|
||||
} else {
|
||||
@@ -262,7 +262,7 @@ $found++;
|
||||
print '<tr class="oddeven">';
|
||||
print '<td>'.$langs->trans("DeStockOnShipmentOnClosing").'</td>';
|
||||
print '<td class="right">';
|
||||
if (!empty($conf->expedition->enabled)) {
|
||||
if (isModEnabled("expedition")) {
|
||||
if ($conf->use_javascript_ajax) {
|
||||
print ajax_constantonoff('STOCK_CALCULATE_ON_SHIPMENT_CLOSE', array(), null, 0, 0, 0, 2, 1);
|
||||
} else {
|
||||
@@ -293,7 +293,7 @@ $found = 0;
|
||||
print '<tr class="oddeven">';
|
||||
print '<td>'.$langs->trans("ReStockOnBill").'</td>';
|
||||
print '<td class="right">';
|
||||
if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled)) {
|
||||
if ((isModEnabled("fournisseur") && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || isModEnabled("supplier_order") || isModEnabled("supplier_invoice")) {
|
||||
if ($conf->use_javascript_ajax) {
|
||||
print ajax_constantonoff('STOCK_CALCULATE_ON_SUPPLIER_BILL', array(), null, 0, 0, 0, 2, 1);
|
||||
} else {
|
||||
@@ -311,7 +311,7 @@ $found++;
|
||||
print '<tr class="oddeven">';
|
||||
print '<td>'.$langs->trans("ReStockOnValidateOrder").'</td>';
|
||||
print '<td class="right">';
|
||||
if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled)) {
|
||||
if ((isModEnabled("fournisseur") && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || isModEnabled("supplier_order") || isModEnabled("supplier_invoice")) {
|
||||
if ($conf->use_javascript_ajax) {
|
||||
print ajax_constantonoff('STOCK_CALCULATE_ON_SUPPLIER_VALIDATE_ORDER', array(), null, 0, 0, 0, 2, 1);
|
||||
} else {
|
||||
@@ -324,7 +324,7 @@ if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SU
|
||||
print "</td>\n</tr>\n";
|
||||
$found++;
|
||||
|
||||
if (!empty($conf->reception->enabled)) {
|
||||
if (isModEnabled("reception")) {
|
||||
print '<tr class="oddeven">';
|
||||
print '<td>'.$langs->trans("StockOnReception").'</td>';
|
||||
print '<td class="right">';
|
||||
@@ -356,7 +356,7 @@ if (!empty($conf->reception->enabled)) {
|
||||
print '<tr class="oddeven">';
|
||||
print '<td>'.$langs->trans("ReStockOnDispatchOrder").'</td>';
|
||||
print '<td class="right">';
|
||||
if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || !empty($conf->supplier_order->enabled)) {
|
||||
if ((isModEnabled("fournisseur") && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || isModEnabled("supplier_order")) {
|
||||
if ($conf->use_javascript_ajax) {
|
||||
print ajax_constantonoff('STOCK_CALCULATE_ON_SUPPLIER_DISPATCH_ORDER', array(), null, 0, 0, 0, 2, 1);
|
||||
} else {
|
||||
@@ -422,7 +422,7 @@ if (!empty($conf->order->enabled)) {
|
||||
print "</tr>\n";
|
||||
}
|
||||
|
||||
if (!empty($conf->expedition->enabled)) {
|
||||
if (isModEnabled("expedition")) {
|
||||
print '<tr class="oddeven">';
|
||||
print '<td>'.$langs->trans("StockMustBeEnoughForShipment").'</td>';
|
||||
print '<td class="right">';
|
||||
|
||||
@@ -343,7 +343,7 @@ if ($action == 'edit') {
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/lib/security2.lib.php';
|
||||
print dolJSToSetRandomPassword($constname, 'generate_token'.$constname);
|
||||
} elseif ($val['type'] == 'product') {
|
||||
if (!empty($conf->product->enabled) || !empty($conf->service->enabled)) {
|
||||
if (isModEnabled("product") || isModEnabled("service")) {
|
||||
$selected = (empty($conf->global->$constname) ? '' : $conf->global->$constname);
|
||||
$form->select_produits($selected, $constname, '', 0);
|
||||
}
|
||||
|
||||
@@ -62,7 +62,7 @@ $workflowcodes = array(
|
||||
'WORKFLOW_PROPAL_AUTOCREATE_ORDER'=>array(
|
||||
'family'=>'create',
|
||||
'position'=>10,
|
||||
'enabled'=>(!empty($conf->propal->enabled) && !empty($conf->commande->enabled)),
|
||||
'enabled'=>(isModEnabled("propal") && !empty($conf->commande->enabled)),
|
||||
'picto'=>'order'
|
||||
),
|
||||
'WORKFLOW_ORDER_AUTOCREATE_INVOICE'=>array(
|
||||
@@ -84,14 +84,14 @@ $workflowcodes = array(
|
||||
'WORKFLOW_ORDER_CLASSIFY_BILLED_PROPAL'=>array(
|
||||
'family'=>'classify_proposal',
|
||||
'position'=>30,
|
||||
'enabled'=>(!empty($conf->propal->enabled) && !empty($conf->commande->enabled)),
|
||||
'enabled'=>(isModEnabled("propal") && !empty($conf->commande->enabled)),
|
||||
'picto'=>'propal',
|
||||
'warning'=>''
|
||||
),
|
||||
'WORKFLOW_INVOICE_CLASSIFY_BILLED_PROPAL'=>array(
|
||||
'family'=>'classify_proposal',
|
||||
'position'=>31,
|
||||
'enabled'=>(!empty($conf->propal->enabled) && isModEnabled('facture')),
|
||||
'enabled'=>(isModEnabled("propal") && isModEnabled('facture')),
|
||||
'picto'=>'propal',
|
||||
'warning'=>''
|
||||
),
|
||||
@@ -100,13 +100,13 @@ $workflowcodes = array(
|
||||
'WORKFLOW_ORDER_CLASSIFY_SHIPPED_SHIPPING'=>array( // when shipping validated
|
||||
'family'=>'classify_order',
|
||||
'position'=>40,
|
||||
'enabled'=>(!empty($conf->expedition->enabled) && !empty($conf->commande->enabled)),
|
||||
'enabled'=>(isModEnabled("expedition") && !empty($conf->commande->enabled)),
|
||||
'picto'=>'order'
|
||||
),
|
||||
'WORKFLOW_ORDER_CLASSIFY_SHIPPED_SHIPPING_CLOSED'=>array( // when shipping closed
|
||||
'family'=>'classify_order',
|
||||
'position'=>41,
|
||||
'enabled'=>(!empty($conf->expedition->enabled) && !empty($conf->commande->enabled)),
|
||||
'enabled'=>(isModEnabled("expedition") && !empty($conf->commande->enabled)),
|
||||
'picto'=>'order'
|
||||
),
|
||||
'WORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_ORDER'=>array(
|
||||
@@ -123,7 +123,7 @@ $workflowcodes = array(
|
||||
'WORKFLOW_ORDER_CLASSIFY_BILLED_SUPPLIER_PROPOSAL'=>array(
|
||||
'family'=>'classify_supplier_proposal',
|
||||
'position'=>60,
|
||||
'enabled'=>(!empty($conf->supplier_proposal->enabled) && ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled))),
|
||||
'enabled'=>(!empty($conf->supplier_proposal->enabled) && ((isModEnabled("fournisseur") && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || isModEnabled("supplier_order") || isModEnabled("supplier_invoice"))),
|
||||
'picto'=>'supplier_proposal',
|
||||
'warning'=>''
|
||||
),
|
||||
@@ -132,7 +132,7 @@ $workflowcodes = array(
|
||||
'WORKFLOW_ORDER_CLASSIFY_RECEIVED_RECEPTION'=>array(
|
||||
'family'=>'classify_supplier_order',
|
||||
'position'=>63,
|
||||
'enabled'=>(!empty($conf->global->MAIN_FEATURES_LEVEL) && (!empty($conf->reception->enabled)) && ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || empty($conf->supplier_order->enabled))),
|
||||
'enabled'=>(!empty($conf->global->MAIN_FEATURES_LEVEL) && (isModEnabled("reception")) && ((isModEnabled("fournisseur") && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || empty($conf->supplier_order->enabled))),
|
||||
'picto'=>'supplier_order',
|
||||
'warning'=>''
|
||||
),
|
||||
@@ -140,7 +140,7 @@ $workflowcodes = array(
|
||||
'WORKFLOW_ORDER_CLASSIFY_RECEIVED_RECEPTION_CLOSED'=>array(
|
||||
'family'=>'classify_supplier_order',
|
||||
'position'=>64,
|
||||
'enabled'=>(!empty($conf->global->MAIN_FEATURES_LEVEL) && (!empty($conf->reception->enabled)) && ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || empty($conf->supplier_order->enabled))),
|
||||
'enabled'=>(!empty($conf->global->MAIN_FEATURES_LEVEL) && (isModEnabled("reception")) && ((isModEnabled("fournisseur") && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || empty($conf->supplier_order->enabled))),
|
||||
'picto'=>'supplier_order',
|
||||
'warning'=>''
|
||||
),
|
||||
@@ -148,7 +148,7 @@ $workflowcodes = array(
|
||||
'WORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_SUPPLIER_ORDER'=>array(
|
||||
'family'=>'classify_supplier_order',
|
||||
'position'=>65,
|
||||
'enabled'=>((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled)),
|
||||
'enabled'=>((isModEnabled("fournisseur") && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || isModEnabled("supplier_order") || isModEnabled("supplier_invoice")),
|
||||
'picto'=>'supplier_order',
|
||||
'warning'=>''
|
||||
),
|
||||
@@ -157,7 +157,7 @@ $workflowcodes = array(
|
||||
'WORKFLOW_BILL_ON_RECEPTION'=>array(
|
||||
'family'=>'classify_reception',
|
||||
'position'=>80,
|
||||
'enabled'=>(!empty($conf->reception->enabled) && ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled))),
|
||||
'enabled'=>(isModEnabled("reception") && ((isModEnabled("fournisseur") && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || isModEnabled("supplier_order") || isModEnabled("supplier_invoice"))),
|
||||
'picto'=>'reception'
|
||||
),
|
||||
|
||||
@@ -165,7 +165,7 @@ $workflowcodes = array(
|
||||
'WORKFLOW_SHIPPING_CLASSIFY_CLOSED_INVOICE' => array(
|
||||
'family' => 'classify_shipping',
|
||||
'position' => 90,
|
||||
'enabled' => !empty($conf->expedition->enabled) && !empty($conf->facture->enabled),
|
||||
'enabled' => isModEnabled("expedition") && isModEnabled("facture"),
|
||||
'picto' => 'shipment'
|
||||
),
|
||||
|
||||
|
||||
Reference in New Issue
Block a user