Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
250be086b7
@ -202,7 +202,7 @@ if ($resql)
|
|||||||
if ($sall)
|
if ($sall)
|
||||||
{
|
{
|
||||||
foreach($fieldstosearchall as $key => $val) $fieldstosearchall[$key]=$langs->trans($val);
|
foreach($fieldstosearchall as $key => $val) $fieldstosearchall[$key]=$langs->trans($val);
|
||||||
print $langs->trans("FilterOnInto", $sall, join(', ',$fieldstosearchall));
|
print $langs->trans("FilterOnInto", $sall) . join(', ',$fieldstosearchall);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Filter on categories
|
// Filter on categories
|
||||||
|
|||||||
@ -281,7 +281,7 @@ if ($result)
|
|||||||
{
|
{
|
||||||
foreach($fieldstosearchall as $key => $val) $fieldstosearchall[$key]=$langs->trans($val);
|
foreach($fieldstosearchall as $key => $val) $fieldstosearchall[$key]=$langs->trans($val);
|
||||||
//sort($fieldstosearchall);
|
//sort($fieldstosearchall);
|
||||||
print $langs->trans("FilterOnInto", $sall, join(', ',$fieldstosearchall));
|
print $langs->trans("FilterOnInto", $sall) . join(', ',$fieldstosearchall);
|
||||||
}
|
}
|
||||||
|
|
||||||
$i = 0;
|
$i = 0;
|
||||||
|
|||||||
@ -287,7 +287,7 @@ if ($result)
|
|||||||
if ($sall)
|
if ($sall)
|
||||||
{
|
{
|
||||||
foreach($fieldstosearchall as $key => $val) $fieldstosearchall[$key]=$langs->trans($val);
|
foreach($fieldstosearchall as $key => $val) $fieldstosearchall[$key]=$langs->trans($val);
|
||||||
print $langs->trans("FilterOnInto", $sall, join(', ',$fieldstosearchall));
|
print $langs->trans("FilterOnInto", $sall) . join(', ',$fieldstosearchall);
|
||||||
}
|
}
|
||||||
if ($search_firstlast_only)
|
if ($search_firstlast_only)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -46,7 +46,12 @@ if ($action == 'print_file' and $user->rights->printing->read)
|
|||||||
|
|
||||||
if (! empty($conf->global->{$printer->active})) {
|
if (! empty($conf->global->{$printer->active})) {
|
||||||
$subdir=(GETPOST('printer', 'alpha')=='expedition'?'sending':'');
|
$subdir=(GETPOST('printer', 'alpha')=='expedition'?'sending':'');
|
||||||
$errorprint = $printer->print_file(GETPOST('file', 'alpha'), GETPOST('printer', 'alpha'), $subdir);
|
$module = GETPOST('printer', 'alpha');
|
||||||
|
if ($module =='commande_fournisseur') {
|
||||||
|
$module = 'fournisseur';
|
||||||
|
$subdir = 'commande';
|
||||||
|
}
|
||||||
|
$errorprint = $printer->print_file(GETPOST('file', 'alpha'), $module, $subdir);
|
||||||
//if ($errorprint < 0) {
|
//if ($errorprint < 0) {
|
||||||
// setEventMessage($interface->errors, 'errors');
|
// setEventMessage($interface->errors, 'errors');
|
||||||
//}
|
//}
|
||||||
|
|||||||
@ -285,7 +285,7 @@ class FormFile
|
|||||||
}
|
}
|
||||||
|
|
||||||
$printer=0;
|
$printer=0;
|
||||||
if (in_array($modulepart,array('facture','askpricesupplier','propal','proposal','order','commande','expedition'))) // The direct print feature is implemented only for such elements
|
if (in_array($modulepart,array('facture','askpricesupplier','propal','proposal','order','commande','expedition', 'commande_fournisseur'))) // The direct print feature is implemented only for such elements
|
||||||
{
|
{
|
||||||
$printer = (!empty($user->rights->printing->read) && !empty($conf->printing->enabled))?true:false;
|
$printer = (!empty($user->rights->printing->read) && !empty($conf->printing->enabled))?true:false;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -179,6 +179,7 @@ function getBrowserInfo($user_agent)
|
|||||||
|
|
||||||
// OS
|
// OS
|
||||||
if (preg_match('/linux/i', $user_agent)) { $os='linux'; }
|
if (preg_match('/linux/i', $user_agent)) { $os='linux'; }
|
||||||
|
elseif (preg_match('/macintosh/i', $user_agent)) { $os='macintosh'; }
|
||||||
|
|
||||||
// Name
|
// Name
|
||||||
if (preg_match('/firefox(\/|\s)([\d\.]*)/i', $user_agent, $reg)) { $name='firefox'; $version=$reg[2]; }
|
if (preg_match('/firefox(\/|\s)([\d\.]*)/i', $user_agent, $reg)) { $name='firefox'; $version=$reg[2]; }
|
||||||
|
|||||||
@ -121,26 +121,38 @@ class ProductFournisseur extends Product
|
|||||||
*/
|
*/
|
||||||
function remove_product_fournisseur_price($rowid)
|
function remove_product_fournisseur_price($rowid)
|
||||||
{
|
{
|
||||||
global $conf;
|
global $conf, $user;
|
||||||
|
|
||||||
$this->db->begin();
|
$this->db->begin();
|
||||||
|
|
||||||
$sql = "DELETE FROM ".MAIN_DB_PREFIX."product_fournisseur_price";
|
// Call trigger
|
||||||
$sql.= " WHERE rowid = ".$rowid;
|
$result=$this->call_trigger('SUPPLIER_PRODUCT_BUYPRICE_DELETE',$user);
|
||||||
|
if ($result < 0) $error++;
|
||||||
|
// End call triggers
|
||||||
|
|
||||||
dol_syslog(get_class($this)."::remove_product_fournisseur_price", LOG_DEBUG);
|
if (empty($error))
|
||||||
$resql = $this->db->query($sql);
|
|
||||||
if ($resql)
|
|
||||||
{
|
{
|
||||||
|
|
||||||
|
$sql = "DELETE FROM ".MAIN_DB_PREFIX."product_fournisseur_price";
|
||||||
|
$sql.= " WHERE rowid = ".$rowid;
|
||||||
|
|
||||||
|
dol_syslog(get_class($this)."::remove_product_fournisseur_price", LOG_DEBUG);
|
||||||
|
$resql = $this->db->query($sql);
|
||||||
|
if (!$resql)
|
||||||
|
{
|
||||||
|
$this->error=$this->db->lasterror();
|
||||||
|
$error++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (empty($error)){
|
||||||
$this->db->commit();
|
$this->db->commit();
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}else{
|
||||||
else
|
|
||||||
{
|
|
||||||
$this->error=$this->db->lasterror();
|
|
||||||
$this->db->rollback();
|
$this->db->rollback();
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -872,6 +872,8 @@ if (empty($reshook))
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
include DOL_DOCUMENT_ROOT.'/core/actions_printing.inc.php';
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Create an order
|
* Create an order
|
||||||
|
|||||||
@ -95,9 +95,14 @@ if (empty($reshook))
|
|||||||
{
|
{
|
||||||
if ($rowid)
|
if ($rowid)
|
||||||
{
|
{
|
||||||
$result=$object->remove_product_fournisseur_price($rowid);
|
|
||||||
$action = '';
|
$action = '';
|
||||||
setEventMessage($langs->trans("PriceRemoved"));
|
$result=$product->remove_product_fournisseur_price($rowid);
|
||||||
|
if($result > 0){
|
||||||
|
setEventMessage($langs->trans("PriceRemoved"));
|
||||||
|
}else{
|
||||||
|
$error++;
|
||||||
|
setEventMessages($product->error, $product->errors, 'errors');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -333,7 +333,7 @@ else
|
|||||||
if ($sall)
|
if ($sall)
|
||||||
{
|
{
|
||||||
foreach($fieldstosearchall as $key => $val) $fieldstosearchall[$key]=$langs->trans($val);
|
foreach($fieldstosearchall as $key => $val) $fieldstosearchall[$key]=$langs->trans($val);
|
||||||
print $langs->trans("FilterOnInto", $sall, join(', ',$fieldstosearchall));
|
print $langs->trans("FilterOnInto", $sall) . join(', ',$fieldstosearchall);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Filter on categories
|
// Filter on categories
|
||||||
|
|||||||
@ -259,7 +259,7 @@ if ($resql)
|
|||||||
if ($search_all)
|
if ($search_all)
|
||||||
{
|
{
|
||||||
foreach($fieldstosearchall as $key => $val) $fieldstosearchall[$key]=$langs->trans($val);
|
foreach($fieldstosearchall as $key => $val) $fieldstosearchall[$key]=$langs->trans($val);
|
||||||
print $langs->trans("FilterOnInto", $search_all, join(', ',$fieldstosearchall));
|
print $langs->trans("FilterOnInto", $search_all) . join(', ',$fieldstosearchall);
|
||||||
}
|
}
|
||||||
|
|
||||||
$colspan=8;
|
$colspan=8;
|
||||||
|
|||||||
@ -445,7 +445,7 @@ if ($resql)
|
|||||||
if ($search_all)
|
if ($search_all)
|
||||||
{
|
{
|
||||||
foreach($fieldstosearchall as $key => $val) $fieldstosearchall[$key]=$langs->trans($val);
|
foreach($fieldstosearchall as $key => $val) $fieldstosearchall[$key]=$langs->trans($val);
|
||||||
print $langs->trans("FilterOnInto", $search_all, join(', ',$fieldstosearchall));
|
print $langs->trans("FilterOnInto", $search_all) . join(', ',$fieldstosearchall);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Filter on categories
|
// Filter on categories
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user