Merge remote-tracking branch 'origin/3.6' into develop
Conflicts: htdocs/core/lib/security.lib.php htdocs/product/fiche.php htdocs/product/liste.php
This commit is contained in:
commit
4a60d57544
@ -153,6 +153,9 @@ Dolibarr better:
|
||||
- Fix: fix ErrorBadValueForParamNotAString error message in price customer multiprice
|
||||
- Fix: bug 1588 : relative discount
|
||||
- Fix: label of input method not tranlated.
|
||||
- Fix: box of customer and propsects were not correctly disabled.
|
||||
- Fix: right and error management #1961
|
||||
- Fix: Fix Error when trying to clone an Order #1943
|
||||
|
||||
***** ChangeLog for 3.6.1 compared to 3.6.* *****
|
||||
For users:
|
||||
|
||||
@ -898,6 +898,13 @@ class Commande extends CommonOrder
|
||||
$this->date_validation = '';
|
||||
$this->ref_client = '';
|
||||
|
||||
// Set ref
|
||||
require_once DOL_DOCUMENT_ROOT ."/core/modules/commande/".$conf->global->COMMANDE_ADDON.'.php';
|
||||
$obj = $conf->global->COMMANDE_ADDON;
|
||||
$modCommande = new $obj;
|
||||
$this->ref = $modCommande->getNextValue($objsoc,$this);
|
||||
|
||||
|
||||
// Create clone
|
||||
$result=$this->create($user);
|
||||
if ($result < 0) $error++;
|
||||
|
||||
@ -112,7 +112,7 @@ if ($conf->salaries->enabled)
|
||||
$total = 0 ;
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
print_liste_field_titre($langs->trans("PeriodEndDate"),$_SERVER["PHP_SELF"],"s.datev","",$param,'width="120"',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("PeriodEndDate"),$_SERVER["PHP_SELF"],"s.datev","",$param,'width="140px"',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("Label"),$_SERVER["PHP_SELF"],"s.label","",$param,'',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("ExpectedToPay"),$_SERVER["PHP_SELF"],"s.amount","",$param,'align="right"',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("RefPayment"),$_SERVER["PHP_SELF"],"s.rowid","",$param,'',$sortfield,$sortorder);
|
||||
@ -145,7 +145,7 @@ if ($conf->salaries->enabled)
|
||||
|
||||
$i++;
|
||||
}
|
||||
print '<tr class="liste_total"><td align="right" colspan="2">'.$langs->trans("Total").'</td>';
|
||||
print '<tr class="liste_total"><td colspan="2">'.$langs->trans("Total").'</td>';
|
||||
print '<td align="right">'.price($total)."</td>";
|
||||
print '<td align="center"> </td>';
|
||||
print '<td align="center"> </td>';
|
||||
@ -175,7 +175,7 @@ if ($conf->tax->enabled)
|
||||
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
print_liste_field_titre($langs->trans("PeriodEndDate"),$_SERVER["PHP_SELF"],"cs.date_ech","",$param,'width="120"',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("PeriodEndDate"),$_SERVER["PHP_SELF"],"cs.date_ech","",$param,'width="140px"',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("Label"),$_SERVER["PHP_SELF"],"c.libelle","",$param,'',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("Type"),$_SERVER["PHP_SELF"],"cs.fk_type","",$param,'',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("ExpectedToPay"),$_SERVER["PHP_SELF"],"cs.amount","",$param,'align="right"',$sortfield,$sortorder);
|
||||
@ -305,7 +305,7 @@ if ($conf->tax->enabled)
|
||||
$total = 0 ;
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
print_liste_field_titre($langs->trans("PeriodEndDate"),$_SERVER["PHP_SELF"],"pv.datev","",$param,'width="120"',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("PeriodEndDate"),$_SERVER["PHP_SELF"],"pv.datev","",$param,'width="140px"',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("Label"),$_SERVER["PHP_SELF"],"pv.label","",$param,'',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("ExpectedToPay"),$_SERVER["PHP_SELF"],"pv.amount","",$param,'align="right"',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("RefPayment"),$_SERVER["PHP_SELF"],"pv.rowid","",$param,'',$sortfield,$sortorder);
|
||||
@ -338,7 +338,7 @@ if ($conf->tax->enabled)
|
||||
|
||||
$i++;
|
||||
}
|
||||
print '<tr class="liste_total"><td align="right" colspan="2">'.$langs->trans("Total").'</td>';
|
||||
print '<tr class="liste_total"><td colspan="2">'.$langs->trans("Total").'</td>';
|
||||
print '<td align="right">'.price($total)."</td>";
|
||||
print '<td align="center"> </td>';
|
||||
print '<td align="center"> </td>';
|
||||
|
||||
@ -37,12 +37,28 @@ class box_clients extends ModeleBoxes
|
||||
var $depends = array("societe");
|
||||
|
||||
var $db;
|
||||
var $param;
|
||||
var $enabled = 1;
|
||||
|
||||
var $info_box_head = array();
|
||||
var $info_box_contents = array();
|
||||
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param DoliDB $db Database handler
|
||||
* @param string $param More parameters
|
||||
*/
|
||||
function __construct($db,$param='')
|
||||
{
|
||||
global $conf, $user;
|
||||
|
||||
$this->db = $db;
|
||||
|
||||
// disable box for such cases
|
||||
if (! empty($conf->global->SOCIETE_DISABLE_CUSTOMERS)) $this->enabled=0; // disabled by this option
|
||||
}
|
||||
|
||||
/**
|
||||
* Load data for box to show them later
|
||||
*
|
||||
|
||||
@ -39,11 +39,28 @@ class box_prospect extends ModeleBoxes
|
||||
var $depends = array("societe");
|
||||
|
||||
var $db;
|
||||
var $enabled = 1;
|
||||
|
||||
var $info_box_head = array();
|
||||
var $info_box_contents = array();
|
||||
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param DoliDB $db Database handler
|
||||
* @param string $param More parameters
|
||||
*/
|
||||
function __construct($db,$param='')
|
||||
{
|
||||
global $conf, $user;
|
||||
|
||||
$this->db = $db;
|
||||
|
||||
// disable box for such cases
|
||||
if (! empty($conf->global->SOCIETE_DISABLE_PROSPECTS)) $this->enabled=0; // disabled by this option
|
||||
}
|
||||
|
||||
/**
|
||||
* Load data into info_box_contents array to show array later.
|
||||
*
|
||||
|
||||
@ -422,11 +422,10 @@ if (empty($reshook))
|
||||
$_error++;
|
||||
$action = "";
|
||||
|
||||
$mesg='<div class="error">'.$langs->trans("ErrorProductAlreadyExists",$object->ref);
|
||||
$mesg=$langs->trans("ErrorProductAlreadyExists",$object->ref);
|
||||
$mesg.=' <a href="'.$_SERVER["PHP_SELF"].'?ref='.$object->ref.'">'.$langs->trans("ShowCardHere").'</a>.';
|
||||
$mesg.='</div>';
|
||||
setEventMessage($mesg, 'errors');
|
||||
//dol_print_error($object->db);
|
||||
$object->fetch($id);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@ -462,7 +462,7 @@ else
|
||||
}
|
||||
|
||||
// Better buy price
|
||||
if ($user->rights->produit->creer)
|
||||
if ($user->rights->fournisseur->lire)
|
||||
{
|
||||
print '<td align="right">';
|
||||
if ($objp->minsellprice != '')
|
||||
|
||||
Loading…
Reference in New Issue
Block a user