mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-05 17:18:13 +01:00
Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into 5.0
This commit is contained in:
@@ -96,6 +96,7 @@ $fieldstosearchall = array(
|
|||||||
'd.note_public'=>'NotePublic',
|
'd.note_public'=>'NotePublic',
|
||||||
'd.note_private'=>'NotePrivate',
|
'd.note_private'=>'NotePrivate',
|
||||||
);
|
);
|
||||||
|
if($db->type == 'pgsql') unset($fieldstosearchall['d.rowid']);
|
||||||
$arrayfields=array(
|
$arrayfields=array(
|
||||||
'd.ref'=>array('label'=>$langs->trans("Ref"), 'checked'=>1),
|
'd.ref'=>array('label'=>$langs->trans("Ref"), 'checked'=>1),
|
||||||
'd.lastname'=>array('label'=>$langs->trans("Lastname"), 'checked'=>1),
|
'd.lastname'=>array('label'=>$langs->trans("Lastname"), 'checked'=>1),
|
||||||
|
|||||||
@@ -372,6 +372,8 @@ if (dol_strlen($search_dv_end) > 0) $param .= '&search_end_dvmonth=' . GETPOST
|
|||||||
if ($search_req_nb) $param.='&req_nb='.urlencode($search_req_nb);
|
if ($search_req_nb) $param.='&req_nb='.urlencode($search_req_nb);
|
||||||
if (GETPOST("thirdparty")) $param.='&thirdparty='.urlencode(GETPOST("thirdparty"));
|
if (GETPOST("thirdparty")) $param.='&thirdparty='.urlencode(GETPOST("thirdparty"));
|
||||||
if ($optioncss != '') $param.='&optioncss='.$optioncss;
|
if ($optioncss != '') $param.='&optioncss='.$optioncss;
|
||||||
|
if(!empty($search_conciliated) || $search_conciliated === 0) $param.='&search_conciliated='.$search_conciliated;
|
||||||
|
|
||||||
// Add $param from extra fields
|
// Add $param from extra fields
|
||||||
foreach ($search_array_options as $key => $val)
|
foreach ($search_array_options as $key => $val)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -486,7 +486,8 @@ class Facture extends CommonInvoice
|
|||||||
foreach ($exp->linkedObjectsIds['commande'] as $key => $value)
|
foreach ($exp->linkedObjectsIds['commande'] as $key => $value)
|
||||||
{
|
{
|
||||||
$originforcontact = 'commande';
|
$originforcontact = 'commande';
|
||||||
$originidforcontact = $value->id;
|
if (is_object($value)) $originidforcontact = $value->id;
|
||||||
|
else $originidforcontact = $value;
|
||||||
break; // We take first one
|
break; // We take first one
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1753,6 +1753,8 @@ function pdf_getlineremisepercent($object,$i,$outputlangs,$hidedetails=0)
|
|||||||
*/
|
*/
|
||||||
function pdf_getlineprogress($object, $i, $outputlangs, $hidedetails = 0, $hookmanager = null)
|
function pdf_getlineprogress($object, $i, $outputlangs, $hidedetails = 0, $hookmanager = null)
|
||||||
{
|
{
|
||||||
|
if (empty($hookmanager)) global $hookmanager;
|
||||||
|
|
||||||
$reshook=0;
|
$reshook=0;
|
||||||
$result='';
|
$result='';
|
||||||
//if (is_object($hookmanager) && ( (isset($object->lines[$i]->product_type) && $object->lines[$i]->product_type == 9 && ! empty($object->lines[$i]->special_code)) || ! empty($object->lines[$i]->fk_parent_line) ) )
|
//if (is_object($hookmanager) && ( (isset($object->lines[$i]->product_type) && $object->lines[$i]->product_type == 9 && ! empty($object->lines[$i]->special_code)) || ! empty($object->lines[$i]->fk_parent_line) ) )
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
/* Copyright (C) 2002-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2002-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2004-2016 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2004-2016 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2005-2015 Regis Houssin <regis.houssin@capnetworks.com>
|
* Copyright (C) 2005-2015 Regis Houssin <regis.houssin@capnetworks.com>
|
||||||
* Copyright (C) 2011-2013 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2011-2017 Juanjo Menent <jmenent@2byte.es>
|
||||||
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
||||||
* Copyright (C) 2014-2015 Ferran Marcet <fmarcet@2byte.es>
|
* Copyright (C) 2014-2015 Ferran Marcet <fmarcet@2byte.es>
|
||||||
* Copyright (C) 2014-2015 Charlie Benke <charlies@patas-monkey.com>
|
* Copyright (C) 2014-2015 Charlie Benke <charlies@patas-monkey.com>
|
||||||
@@ -785,7 +785,8 @@ if (empty($reshook))
|
|||||||
$parameters=array('id'=>$object->id);
|
$parameters=array('id'=>$object->id);
|
||||||
$reshook=$hookmanager->executeHooks('insertExtraFields',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks
|
$reshook=$hookmanager->executeHooks('insertExtraFields',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks
|
||||||
if (empty($reshook))
|
if (empty($reshook))
|
||||||
{ $result=$object->updateExtraField($_POST["attribute"]);
|
{
|
||||||
|
$result=$object->insertExtraFields();
|
||||||
if ($result < 0)
|
if ($result < 0)
|
||||||
{
|
{
|
||||||
$error++;
|
$error++;
|
||||||
|
|||||||
@@ -1408,7 +1408,7 @@ class CommandeFournisseur extends CommonOrder
|
|||||||
$result=$prod->get_buyprice($fk_prod_fourn_price, $qty, $fk_product, 'none', $this->fk_soc); // Search on couple $fk_prod_fourn_price/$qty first, then on triplet $qty/$fk_product/$fourn_ref/$this->fk_soc
|
$result=$prod->get_buyprice($fk_prod_fourn_price, $qty, $fk_product, 'none', $this->fk_soc); // Search on couple $fk_prod_fourn_price/$qty first, then on triplet $qty/$fk_product/$fourn_ref/$this->fk_soc
|
||||||
if ($result > 0)
|
if ($result > 0)
|
||||||
{
|
{
|
||||||
$pu = $prod->fourn_pu; // Unit price supplier price set by get_buyprice
|
$pu = $prod->fourn_pu; // Unit price supplier price set by get_buyprice
|
||||||
$ref_supplier = $prod->ref_supplier; // Ref supplier price set by get_buyprice
|
$ref_supplier = $prod->ref_supplier; // Ref supplier price set by get_buyprice
|
||||||
}
|
}
|
||||||
if ($result == 0) // If result == 0, we failed to found the supplier reference price
|
if ($result == 0) // If result == 0, we failed to found the supplier reference price
|
||||||
|
|||||||
Reference in New Issue
Block a user