Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
b1cab83af5
@ -296,7 +296,7 @@ if ($resql)
|
||||
|
||||
$moreforfilter = '';
|
||||
$moreforfilter.='<div class="divsearchfield">';
|
||||
$moreforfilter.= $langs->trans('MyFilter') . ': <input type="text" name="search_myfield" value="'.dol_escpae_htmltag($search_myfield).'">';
|
||||
$moreforfilter.= $langs->trans('MyFilter') . ': <input type="text" name="search_myfield" value="'.dol_escape_htmltag($search_myfield).'">';
|
||||
$moreforfilter.= '</div>';
|
||||
|
||||
$parameters=array();
|
||||
|
||||
@ -33,17 +33,28 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/commonobject.class.php';
|
||||
*/
|
||||
class AdherentType extends CommonObject
|
||||
{
|
||||
public $table_element = 'adherent_type';
|
||||
public $element = 'adherent_type';
|
||||
public $table_element = 'adherent_type';
|
||||
public $element = 'adherent_type';
|
||||
|
||||
var $id;
|
||||
var $ref;
|
||||
var $libelle;
|
||||
var $subscription; // Subscription required
|
||||
var $note;
|
||||
var $vote; // Can vote
|
||||
var $mail_valid; // mail sent during validation
|
||||
var $statut;
|
||||
/** @var string Label */
|
||||
public $libelle;
|
||||
/**
|
||||
* @var bool
|
||||
* @deprecated Use subscription
|
||||
* @see subscription
|
||||
*/
|
||||
public $cotisation;
|
||||
/**
|
||||
* @var bool Subsription required
|
||||
* @since 5.0
|
||||
*/
|
||||
public $subscription;
|
||||
/** @var string Public note */
|
||||
public $note;
|
||||
/** @var bool Can vote*/
|
||||
public $vote;
|
||||
/** @var bool Email sent during validation */
|
||||
public $mail_valid;
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@ -2,6 +2,7 @@
|
||||
/* Copyright (C) 2007 Patrick Raguin <patrick.raguin@gmail.com>
|
||||
* Copyright (C) 2007-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2009-2011 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2016 Meziane Sof <virtualsof@yahoo.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -33,10 +34,14 @@ $langs->load('other');
|
||||
|
||||
if (! $user->admin) accessforbidden();
|
||||
|
||||
$dirstandard = "/core/menus/standard";
|
||||
$dirsmartphone = "/core/menus/smartphone";
|
||||
|
||||
$dirmenu = array($dirstandard,$dirsmartphone);
|
||||
$dirstandard = array();
|
||||
$dirsmartphone = array();
|
||||
$dirmenus=array_merge(array("/core/menus/"),(array) $conf->modules_parts['menus']);
|
||||
foreach($dirmenus as $dirmenu)
|
||||
{
|
||||
$dirstandard[]=$dirmenu.'standard';
|
||||
$dirsmartphone[]=$dirmenu.'smartphone';
|
||||
}
|
||||
|
||||
$action=GETPOST('action');
|
||||
|
||||
@ -244,7 +249,7 @@ if ($action == 'confirm_delete' && $_POST["confirm"] == 'yes')
|
||||
$this->db->begin();
|
||||
|
||||
$sql = "DELETE FROM ".MAIN_DB_PREFIX."menu WHERE rowid = ".GETPOST('menuId', 'int');
|
||||
$db->query($sql);
|
||||
$result=$db->query($sql);
|
||||
|
||||
if ($result == 0)
|
||||
{
|
||||
@ -331,7 +336,7 @@ if ($action == 'create')
|
||||
// Handler
|
||||
print '<tr><td class="fieldrequired">'.$langs->trans('MenuHandler').'</td>';
|
||||
print '<td>';
|
||||
$formadmin->select_menu_families($menu_handler,'menu_handler',$dirmenu);
|
||||
$formadmin->select_menu_families($menu_handler.(preg_match('/_menu/',$menu_handler)?'':'_menu'),'menu_handler',array_merge($dirstandard,$dirsmartphone));
|
||||
print '</td>';
|
||||
print '<td>'.$langs->trans('DetailMenuHandler').'</td></tr>';
|
||||
|
||||
|
||||
@ -521,9 +521,10 @@ class ProductFournisseur extends Product
|
||||
*
|
||||
* @param int $prodid Product id
|
||||
* @param int $qty Minimum quantity
|
||||
* @param int $socid get min price for specific supplier
|
||||
* @return int <0 if KO, 0=Not found of no product id provided, >0 if OK
|
||||
*/
|
||||
function find_min_price_product_fournisseur($prodid, $qty=0)
|
||||
function find_min_price_product_fournisseur($prodid, $qty=0, $socid=0)
|
||||
{
|
||||
global $conf;
|
||||
|
||||
@ -556,6 +557,7 @@ class ProductFournisseur extends Product
|
||||
$sql.= " AND pfp.fk_soc = s.rowid";
|
||||
$sql.= " AND s.status = 1"; // only enabled society
|
||||
if ($qty > 0) $sql.= " AND pfp.quantity <= ".$qty;
|
||||
if ($socid > 0) $sql.= ' AND pfp.fk_soc = '.$socid;
|
||||
|
||||
dol_syslog(get_class($this)."::find_min_price_product_fournisseur", LOG_DEBUG);
|
||||
|
||||
|
||||
@ -1059,7 +1059,7 @@ if (empty($reshook))
|
||||
$array_option = $lines[$i]->array_options;
|
||||
}
|
||||
|
||||
$result = $productsupplier->find_min_price_product_fournisseur($lines[$i]->fk_product, $lines[$i]->qty);
|
||||
$result = $productsupplier->find_min_price_product_fournisseur($lines[$i]->fk_product, $lines[$i]->qty, $srcobject->socid);
|
||||
if ($result>=0)
|
||||
{
|
||||
$tva_tx = $lines[$i]->tva_tx;
|
||||
|
||||
@ -970,7 +970,16 @@ else
|
||||
{
|
||||
if ($action != "edit" )
|
||||
{
|
||||
// Modify
|
||||
|
||||
// Create event
|
||||
if ($conf->agenda->enabled && ! empty($conf->global->MAIN_ADD_EVENT_ON_ELEMENT_CARD)) // Add hidden condition because this is not a
|
||||
// "workflow" action so should appears somewhere else on
|
||||
// page.
|
||||
{
|
||||
print '<div class="inline-block divButAction"><a class="butAction" href="'.DOL_URL_ROOT.'/comm/action/card.php?action=create&origin=' . $object->element . '&originid=' . $object->id . '&socid=' . $object->socid . '&projectid=' . $object->id . '">' . $langs->trans("AddAction") . '</a></div>';
|
||||
}
|
||||
|
||||
// Modify
|
||||
if ($object->statut != 2 && $user->rights->projet->creer)
|
||||
{
|
||||
if ($userWrite > 0)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user