mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
Merge branch '16.0' of git@github.com:Dolibarr/dolibarr.git into 17.0
This commit is contained in:
commit
925cd10cee
|
|
@ -700,7 +700,7 @@ class AccountancyCategory // extends CommonObject
|
|||
}
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."accounting_bookkeeping as t";
|
||||
//if (in_array($this->db->type, array('mysql', 'mysqli'))) $sql.=' USE INDEX idx_accounting_bookkeeping_doc_date';
|
||||
$sql .= " WHERE t.entity = ".$conf->entity;
|
||||
$sql .= " WHERE t.entity = ".((int) $conf->entity);
|
||||
if (is_array($cpt)) {
|
||||
$sql .= " AND t.numero_compte IN (".$this->db->sanitize($listofaccount, 1).")";
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -1469,7 +1469,7 @@ if ($action == 'create') {
|
|||
print "\n".'<script type="text/javascript">';
|
||||
print '$(document).ready(function () {
|
||||
$("#projectid").change(function () {
|
||||
var url = "'.DOL_URL_ROOT.'/projet/ajax/projects.php?mode=gettasks&socid="+$("#projectid").val()+"&projectid="+$("#projectid").val();
|
||||
var url = "'.DOL_URL_ROOT.'/projet/ajax/projects.php?mode=gettasks&socid="+$("#search_socid").val()+"&projectid="+$("#projectid").val();
|
||||
console.log("Call url to get new list of tasks: "+url);
|
||||
$.get(url, function(data) {
|
||||
console.log(data);
|
||||
|
|
|
|||
|
|
@ -409,7 +409,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,";
|
||||
|
|
@ -925,6 +925,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
|
||||
|
|
|
|||
|
|
@ -246,13 +246,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');
|
||||
|
|
|
|||
|
|
@ -2562,8 +2562,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() {
|
||||
|
|
@ -2579,6 +2579,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) {
|
||||
|
|
@ -2624,6 +2628,10 @@ if ($action == 'create') {
|
|||
jQuery("#value_unit_ht").val("");
|
||||
}*/
|
||||
});
|
||||
';
|
||||
}
|
||||
|
||||
print '
|
||||
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -1336,7 +1336,7 @@ if ($socid && $action != 'edit' && $action != 'create' && $action != 'editcard'
|
|||
|
||||
if ($nbremote == 0 && $nblocal == 0) {
|
||||
$colspan = (!empty($conf->global->STRIPE_ALLOW_LOCAL_CARD) ? 10 : 9);
|
||||
print '<tr><td colspan="'.$colspan.'"<span class="opacitymedium">'.$langs->trans("None").'</span></td></tr>';
|
||||
print '<tr><td colspan="'.$colspan.'"><span class="opacitymedium">'.$langs->trans("None").'</span></td></tr>';
|
||||
}
|
||||
print "</table>";
|
||||
print "</div>";
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user