Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
a342ef5ecf
9 changed files with 36 additions and 20 deletions
|
|
@ -102,6 +102,7 @@ class box_funnel_of_prospection extends ModeleBoxes
|
|||
$sql .= " FROM ".MAIN_DB_PREFIX."c_lead_status as cls";
|
||||
$sql .= " WHERE active=1";
|
||||
$sql .= " AND cls.code <> 'LOST'";
|
||||
$sql .= " AND cls.code <> 'WON'";
|
||||
$sql .= $this->db->order('cls.rowid', 'ASC');
|
||||
$resql = $this->db->query($sql);
|
||||
if ($resql) {
|
||||
|
|
@ -126,9 +127,6 @@ class box_funnel_of_prospection extends ModeleBoxes
|
|||
case 'NEGO':
|
||||
$colorseriesstat[$objp->rowid] = $badgeStatus4;
|
||||
break;
|
||||
case 'WON':
|
||||
$colorseriesstat[$objp->rowid] = $badgeStatus6;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
@ -152,7 +150,7 @@ class box_funnel_of_prospection extends ModeleBoxes
|
|||
$sql .= " WHERE p.entity IN (".getEntity('project').")";
|
||||
$sql .= " AND p.fk_opp_status = cls.rowid";
|
||||
$sql .= " AND p.fk_statut = 1"; // Opend projects only
|
||||
$sql .= " AND cls.code NOT IN ('LOST')";
|
||||
$sql .= " AND cls.code NOT IN ('LOST', 'WON')";
|
||||
$sql .= " GROUP BY p.fk_opp_status, cls.code";
|
||||
$resql = $this->db->query($sql);
|
||||
|
||||
|
|
@ -236,6 +234,7 @@ class box_funnel_of_prospection extends ModeleBoxes
|
|||
$dolgraph->setShowPercent(1);
|
||||
$dolgraph->setMirrorGraphValues(true);
|
||||
$dolgraph->setBorderWidth(2);
|
||||
$dolgraph->setBorderSkip('false');
|
||||
$dolgraph->SetType(array('horizontalbars'));
|
||||
$dolgraph->SetHeight('200');
|
||||
$dolgraph->SetWidth('600');
|
||||
|
|
|
|||
|
|
@ -167,8 +167,9 @@ abstract class CommonObject
|
|||
* @var CommonObject To store a cloned copy of object before to edit it and keep track of old properties
|
||||
*/
|
||||
public $oldcopy;
|
||||
|
||||
/**
|
||||
* @var CommonObject To store old value of a modified ref
|
||||
* @var string To store old value of a modified ref
|
||||
*/
|
||||
public $oldref;
|
||||
|
||||
|
|
|
|||
|
|
@ -94,6 +94,7 @@ class DolGraph
|
|||
public $bgcolorgrid = array(255, 255, 255); // array(R,G,B)
|
||||
public $datacolor; // array(array(R,G,B),...)
|
||||
public $borderwidth = 1;
|
||||
public $borderskip = 'start';
|
||||
|
||||
private $stringtoshow; // To store string to output graph into HTML page
|
||||
|
||||
|
|
@ -311,6 +312,18 @@ class DolGraph
|
|||
$this->borderwidth = $borderwidth;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set border skip
|
||||
*
|
||||
* @param int $borderskip Can be 'start' to skip start border, 'end' to skip end border, 'middle' to skip middle border,
|
||||
* 'false' to not skip any border, 'true' to skip all border
|
||||
* @return void
|
||||
*/
|
||||
public function setBorderSkip($borderskip)
|
||||
{
|
||||
$this->borderskip = $borderskip;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set tooltips labels of the graph
|
||||
*
|
||||
|
|
@ -1483,6 +1496,7 @@ class DolGraph
|
|||
$this->stringtoshow .= 'borderWidth: \''.$this->borderwidth.'\', ';
|
||||
}
|
||||
$this->stringtoshow .= 'borderColor: \'' . $bordercolor . '\', ';
|
||||
$this->stringtoshow .= 'borderSkipped: \'' . $this->borderskip . '\', ';
|
||||
$this->stringtoshow .= 'backgroundColor: \'' . $color . '\', ';
|
||||
if (!empty($arrayofgroupslegend) && !empty($arrayofgroupslegend[$i])) {
|
||||
$this->stringtoshow .= 'stack: \'' . $arrayofgroupslegend[$i]['stacknum'] . '\', ';
|
||||
|
|
|
|||
|
|
@ -1584,7 +1584,7 @@ function show_actions_todo($conf, $langs, $db, $filterobj, $objcon = '', $noprin
|
|||
* @param mixed $filterobj Filter on object Adherent|Societe|Project|Product|CommandeFournisseur|Dolresource|Ticket... to list events linked to an object
|
||||
* @param Contact $objcon Filter on object contact to filter events on a contact
|
||||
* @param int $noprint Return string but does not output it
|
||||
* @param string $actioncode Filter on actioncode
|
||||
* @param string|string[] $actioncode Filter on actioncode
|
||||
* @param string $donetodo Filter on event 'done' or 'todo' or ''=nofilter (all).
|
||||
* @param array $filters Filter on other fields
|
||||
* @param string $sortfield Sort field
|
||||
|
|
@ -1810,13 +1810,10 @@ function show_actions_done($conf, $langs, $db, $filterobj, $objcon = '', $noprin
|
|||
$sql .= ' AND (';
|
||||
foreach ($actioncode as $key => $code) {
|
||||
if ($key != 0) {
|
||||
$sql .= "OR (";
|
||||
$sql .= " OR ";
|
||||
}
|
||||
if (!empty($code)) {
|
||||
addEventTypeSQL($sql, $code);
|
||||
}
|
||||
if ($key != 0) {
|
||||
$sql .= ")";
|
||||
addEventTypeSQL($sql, $code, "");
|
||||
}
|
||||
}
|
||||
$sql .= ')';
|
||||
|
|
|
|||
|
|
@ -4788,8 +4788,8 @@ class Product extends CommonObject
|
|||
// phpcs:enable
|
||||
$this->db->begin();
|
||||
|
||||
$sql = 'INSERT INTO '.$this->db->prefix().'product_association (fk_product_pere, fk_product_fils, qty)';
|
||||
$sql .= " SELECT ".$toId.", fk_product_fils, qty FROM ".$this->db->prefix()."product_association";
|
||||
$sql = 'INSERT INTO '.$this->db->prefix().'product_association (fk_product_pere, fk_product_fils, qty, incdec)';
|
||||
$sql .= " SELECT ".$toId.", fk_product_fils, qty, incdec FROM ".$this->db->prefix()."product_association";
|
||||
$sql .= " WHERE fk_product_pere = ".((int) $fromId);
|
||||
|
||||
dol_syslog(get_class($this).'::clone_association', LOG_DEBUG);
|
||||
|
|
|
|||
|
|
@ -266,12 +266,12 @@ if (empty($reshook)) {
|
|||
$object->login = GETPOST("login", 'alphanohtml');
|
||||
$object->api_key = GETPOST("api_key", 'alphanohtml');
|
||||
$object->gender = GETPOST("gender", 'aZ09');
|
||||
$object->admin = GETPOST("admin", 'int');
|
||||
$object->admin = GETPOSTINT("admin");
|
||||
$object->address = GETPOST('address', 'alphanohtml');
|
||||
$object->zip = GETPOST('zipcode', 'alphanohtml');
|
||||
$object->town = GETPOST('town', 'alphanohtml');
|
||||
$object->country_id = GETPOST('country_id', 'int');
|
||||
$object->state_id = GETPOST('state_id', 'int');
|
||||
$object->country_id = GETPOSTINT('country_id');
|
||||
$object->state_id = GETPOSTINT('state_id');
|
||||
$object->office_phone = GETPOST("office_phone", 'alphanohtml');
|
||||
$object->office_fax = GETPOST("office_fax", 'alphanohtml');
|
||||
$object->user_mobile = GETPOST("user_mobile", 'alphanohtml');
|
||||
|
|
@ -314,7 +314,7 @@ if (empty($reshook)) {
|
|||
$object->dateendvalidity = $dateendvalidity;
|
||||
$object->birth = $dateofbirth;
|
||||
|
||||
$object->fk_warehouse = GETPOST('fk_warehouse', 'int');
|
||||
$object->fk_warehouse = GETPOSTINT('fk_warehouse');
|
||||
|
||||
$object->lang = GETPOST('default_lang', 'aZ09');
|
||||
|
||||
|
|
|
|||
|
|
@ -81,6 +81,11 @@ class User extends CommonObject
|
|||
|
||||
public $id = 0;
|
||||
|
||||
/**
|
||||
* @var User old copy of User
|
||||
*/
|
||||
public $oldcopy;
|
||||
|
||||
/**
|
||||
* @var int
|
||||
* @deprecated
|
||||
|
|
|
|||
|
|
@ -315,7 +315,7 @@ class UserBankAccount extends Account
|
|||
$country_code_in_EEC = getCountriesInEEC();
|
||||
return in_array($this->country_code, $country_code_in_EEC);
|
||||
} else {
|
||||
return -1;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -868,7 +868,7 @@ class WebsitePage extends CommonObject
|
|||
|
||||
$now = dol_now();
|
||||
|
||||
$this->fk_website = '';
|
||||
$this->fk_website = 0;
|
||||
$this->type_container = 'page';
|
||||
$this->pageurl = 'specimen';
|
||||
$this->aliasalt = 'specimenalt';
|
||||
|
|
@ -879,7 +879,7 @@ class WebsitePage extends CommonObject
|
|||
$this->allowed_in_frames = 1;
|
||||
$this->htmlheader = '';
|
||||
$this->content = '<html><body>This is a html content</body></html>';
|
||||
$this->status = '';
|
||||
$this->status = self::STATUS_DRAFT;
|
||||
$this->grabbed_from = '';
|
||||
$this->date_creation = $now - (24 * 30 * 3600);
|
||||
$this->date_modification = $now - (24 * 7 * 3600);
|
||||
|
|
|
|||
Loading…
Reference in a new issue