Merge branch '16.0' of git@github.com:Dolibarr/dolibarr.git into 16.0
This commit is contained in:
commit
51a890bf1a
@ -412,7 +412,7 @@ if ($usergroup > 0) {
|
||||
}
|
||||
$sql .= " s.nom as societe, s.rowid as socid, s.client, s.email as socemail,";
|
||||
$sql .= " a.id, a.code, a.label, a.note, a.datep as dp, a.datep2 as dp2, a.fulldayevent, a.location,";
|
||||
$sql .= ' a.fk_user_author,a.fk_user_action,';
|
||||
$sql .= " a.fk_user_author, a.fk_user_action,";
|
||||
$sql .= " a.fk_contact, a.note, a.percent as percent,";
|
||||
$sql .= " a.fk_element, a.elementtype, a.datec, a.tms as datem,";
|
||||
$sql .= " c.code as type_code, c.libelle as type_label, c.color as type_color, c.type as type_type, c.picto as type_picto,";
|
||||
@ -916,6 +916,7 @@ while ($i < $imaxinloop) {
|
||||
$actionstatic->note_private = dol_htmlentitiesbr($obj->note);
|
||||
$actionstatic->datep = $db->jdate($obj->dp);
|
||||
$actionstatic->percentage = $obj->percent;
|
||||
$actionstatic->authorid = $obj->fk_user_author;
|
||||
|
||||
// Initialize $this->userassigned && this->socpeopleassigned array && this->userownerid
|
||||
// but only if we need it
|
||||
|
||||
@ -248,13 +248,12 @@ class PropaleStats extends Stats
|
||||
global $user;
|
||||
|
||||
$sql = "SELECT product.ref, COUNT(product.ref) as nb, SUM(tl.".$this->field_line.") as total, AVG(tl.".$this->field_line.") as avg";
|
||||
$sql .= " FROM ".$this->from.", ".$this->from_line.", ".MAIN_DB_PREFIX."product as product";
|
||||
$sql .= " FROM ".$this->from." INNER JOIN ".$this->from_line." ON p.rowid = tl.fk_propal INNER JOIN ".MAIN_DB_PREFIX."product as product ON tl.fk_product = product.rowid";
|
||||
if (empty($user->rights->societe->client->voir) && !$user->socid) {
|
||||
$sql .= " INNER JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON p.fk_soc = sc.fk_soc AND sc.fk_user = ".((int) $user->id);
|
||||
}
|
||||
$sql .= $this->join;
|
||||
$sql .= " WHERE ".$this->where;
|
||||
$sql .= " AND p.rowid = tl.fk_propal AND tl.fk_product = product.rowid";
|
||||
$sql .= " AND ".$this->field_date." BETWEEN '".$this->db->idate(dol_get_first_day($year, 1, false))."' AND '".$this->db->idate(dol_get_last_day($year, 12, false))."'";
|
||||
$sql .= " GROUP BY product.ref";
|
||||
$sql .= $this->db->order('nb', 'DESC');
|
||||
|
||||
@ -2594,8 +2594,8 @@ if ($action == 'create') {
|
||||
|
||||
print '</table>';
|
||||
print '</div>';
|
||||
//var_dump($object);
|
||||
print '<script javascript>
|
||||
|
||||
print '<script>
|
||||
|
||||
/* JQuery for product free or predefined select */
|
||||
jQuery(document).ready(function() {
|
||||
@ -2611,6 +2611,10 @@ if ($action == 'create') {
|
||||
jQuery("#value_unit_ht").val("");
|
||||
}
|
||||
});
|
||||
';
|
||||
|
||||
if (! empty($conf->global->MAIN_USE_EXPENSE_IK)) {
|
||||
print '
|
||||
|
||||
/* unit price coéf calculation */
|
||||
jQuery(".input_qty, #fk_c_type_fees, #select_fk_c_exp_tax_cat, #vatrate ").change(function(event) {
|
||||
@ -2656,6 +2660,10 @@ if ($action == 'create') {
|
||||
jQuery("#value_unit_ht").val("");
|
||||
}*/
|
||||
});
|
||||
';
|
||||
}
|
||||
|
||||
print '
|
||||
|
||||
});
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user