Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into 5.0
This commit is contained in:
commit
062152c723
@ -1513,7 +1513,7 @@ if ($action == 'create' && $user->rights->commande->creer)
|
|||||||
print '</td>';
|
print '</td>';
|
||||||
} else {
|
} else {
|
||||||
print '<td colspan="2">';
|
print '<td colspan="2">';
|
||||||
print $form->select_company('', 'socid', 's.client = 1 OR s.client = 3', 'SelectThirdParty');
|
print $form->select_company('', 'socid', '(s.client = 1 OR s.client = 3)', 'SelectThirdParty');
|
||||||
// reload page to retrieve customer informations
|
// reload page to retrieve customer informations
|
||||||
if (!empty($conf->global->RELOAD_PAGE_ON_CUSTOMER_CHANGE))
|
if (!empty($conf->global->RELOAD_PAGE_ON_CUSTOMER_CHANGE))
|
||||||
{
|
{
|
||||||
|
|||||||
@ -629,20 +629,41 @@ if ($object->id > 0)
|
|||||||
if ($conf->supplier_proposal->enabled && $user->rights->supplier_proposal->creer)
|
if ($conf->supplier_proposal->enabled && $user->rights->supplier_proposal->creer)
|
||||||
{
|
{
|
||||||
$langs->load("supplier_proposal");
|
$langs->load("supplier_proposal");
|
||||||
|
if ($object->status == 1)
|
||||||
|
{
|
||||||
print '<a class="butAction" href="'.DOL_URL_ROOT.'/supplier_proposal/card.php?action=create&socid='.$object->id.'">'.$langs->trans("AddSupplierProposal").'</a>';
|
print '<a class="butAction" href="'.DOL_URL_ROOT.'/supplier_proposal/card.php?action=create&socid='.$object->id.'">'.$langs->trans("AddSupplierProposal").'</a>';
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
print '<a class="butActionRefused" title="'.dol_escape_js($langs->trans("ThirdPartyIsClosed")).'" href="#">'.$langs->trans("AddSupplierProposal").'</a>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if ($user->rights->fournisseur->commande->creer)
|
if ($user->rights->fournisseur->commande->creer)
|
||||||
{
|
{
|
||||||
$langs->load("orders");
|
$langs->load("orders");
|
||||||
|
if ($object->status == 1)
|
||||||
|
{
|
||||||
print '<a class="butAction" href="'.DOL_URL_ROOT.'/fourn/commande/card.php?action=create&socid='.$object->id.'">'.$langs->trans("AddOrder").'</a>';
|
print '<a class="butAction" href="'.DOL_URL_ROOT.'/fourn/commande/card.php?action=create&socid='.$object->id.'">'.$langs->trans("AddOrder").'</a>';
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
print '<a class="butActionRefused" title="'.dol_escape_js($langs->trans("ThirdPartyIsClosed")).'" href="#">'.$langs->trans("AddOrder").'</a>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if ($user->rights->fournisseur->facture->creer)
|
if ($user->rights->fournisseur->facture->creer)
|
||||||
{
|
{
|
||||||
$langs->load("bills");
|
$langs->load("bills");
|
||||||
|
if ($object->status == 1)
|
||||||
|
{
|
||||||
print '<a class="butAction" href="'.DOL_URL_ROOT.'/fourn/facture/card.php?action=create&socid='.$object->id.'">'.$langs->trans("AddBill").'</a>';
|
print '<a class="butAction" href="'.DOL_URL_ROOT.'/fourn/facture/card.php?action=create&socid='.$object->id.'">'.$langs->trans("AddBill").'</a>';
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
print '<a class="butActionRefused" title="'.dol_escape_js($langs->trans("ThirdPartyIsClosed")).'" href="#">'.$langs->trans("AddBill").'</a>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if ($user->rights->fournisseur->facture->creer)
|
if ($user->rights->fournisseur->facture->creer)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -308,6 +308,18 @@ else
|
|||||||
{
|
{
|
||||||
require_once $dolibarr_main_document_root.'/core/lib/admin.lib.php';
|
require_once $dolibarr_main_document_root.'/core/lib/admin.lib.php';
|
||||||
|
|
||||||
|
// If password is encoded, we decode it
|
||||||
|
if (preg_match('/crypted:/i',$dolibarr_main_db_pass) || ! empty($dolibarr_main_db_encrypted_pass))
|
||||||
|
{
|
||||||
|
require_once $dolibarr_main_document_root.'/core/lib/security.lib.php';
|
||||||
|
if (preg_match('/crypted:/i',$dolibarr_main_db_pass))
|
||||||
|
{
|
||||||
|
$dolibarr_main_db_encrypted_pass = preg_replace('/crypted:/i', '', $dolibarr_main_db_pass); // We need to set this as it is used to know the password was initially crypted
|
||||||
|
$dolibarr_main_db_pass = dol_decode($dolibarr_main_db_encrypted_pass);
|
||||||
|
}
|
||||||
|
else $dolibarr_main_db_pass = dol_decode($dolibarr_main_db_encrypted_pass);
|
||||||
|
}
|
||||||
|
|
||||||
// $conf is already instancied inside inc.php
|
// $conf is already instancied inside inc.php
|
||||||
$conf->db->type = $dolibarr_main_db_type;
|
$conf->db->type = $dolibarr_main_db_type;
|
||||||
$conf->db->host = $dolibarr_main_db_host;
|
$conf->db->host = $dolibarr_main_db_host;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user