Merge branch 'develop' of https://github.com/Dolibarr/dolibarr into develop
This commit is contained in:
commit
af5db04824
@ -35,6 +35,8 @@ For developers:
|
||||
- New: Show version of client lib used by mysql drivers.
|
||||
- New: Add function to get content of an url (using all dolibarr setup like timeout, proxies...)
|
||||
- New: Upgrade lib of TCPDF to 6.0
|
||||
- New: Add property hidden into module descriptor to allow to hide a module according to
|
||||
some dynamic conditions.
|
||||
|
||||
|
||||
***** ChangeLog for 3.4 compared to 3.3.2 *****
|
||||
|
||||
@ -97,8 +97,10 @@ class modMyModule extends DolibarrModules
|
||||
$this->config_page_url = array("mysetuppage.php@mymodule");
|
||||
|
||||
// Dependencies
|
||||
$this->hidden = false; // A condition to hide module
|
||||
$this->depends = array(); // List of modules id that must be enabled if this module is enabled
|
||||
$this->requiredby = array(); // List of modules id to disable if this one is disabled
|
||||
$this->conflictwith = array(); // List of modules id this module is in conflict with
|
||||
$this->phpmin = array(5,0); // Minimum version of PHP required by module
|
||||
$this->need_dolibarr_version = array(3,0); // Minimum version of Dolibarr required by module
|
||||
$this->langfiles = array("mylangfile@mymodule");
|
||||
|
||||
@ -152,7 +152,8 @@ foreach ($modulesdir as $dir)
|
||||
$const_name = 'MAIN_MODULE_'.strtoupper(preg_replace('/^mod/i','',get_class($objMod)));
|
||||
if ($objMod->version == 'development' && (empty($conf->global->$const_name) && ($conf->global->MAIN_FEATURES_LEVEL < 2))) $modulequalified=0;
|
||||
if ($objMod->version == 'experimental' && (empty($conf->global->$const_name) && ($conf->global->MAIN_FEATURES_LEVEL < 1))) $modulequalified=0;
|
||||
//if ($mode == 'expdev' && ($objMod->version != 'experimental' && $objMod->version != 'development')) $modulequalified=0;
|
||||
// We discard modules according to property disabled
|
||||
if (isset($objMod->hidden) && $objMod->hidden) $modulequalified=false;
|
||||
|
||||
// Define array $categ with categ with at least one qualified module
|
||||
if ($modulequalified)
|
||||
|
||||
@ -138,10 +138,10 @@ $sql.= " AND t.active = 1";
|
||||
$sql.= " AND p.code = '".$mysoc->country_code."'";
|
||||
//print $request;
|
||||
|
||||
$res = $db->query($sql);
|
||||
if ($res)
|
||||
$resql = $db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
while ( $tab = $db->fetch_array($res) )
|
||||
while ( $tab = $db->fetch_array($resql) )
|
||||
{
|
||||
foreach ( $tab as $cle => $valeur )
|
||||
{
|
||||
|
||||
@ -106,7 +106,7 @@ if (! empty($conf->stock->enabled))
|
||||
print '<td>';
|
||||
$disabled=0;
|
||||
if (! empty($conf->global->CASHDESK_ID_WAREHOUSE)) $disabled=1; // If a particular stock is defined, we disable choice
|
||||
print $formproduct->selectWarehouses(GETPOST('warehouseid')?GETPOST('warehouseid'):$conf->global->CASHDESK_ID_WAREHOUSE,'warehouseid','',!$disabled,$disabled);
|
||||
print $formproduct->selectWarehouses((GETPOST('warehouseid')?GETPOST('warehouseid'):(empty($conf->global->CASHDESK_ID_WAREHOUSE)?'ifone':$conf->global->CASHDESK_ID_WAREHOUSE)),'warehouseid','',!$disabled,$disabled);
|
||||
//print '<input name="warehouse_id" class="texte_login" type="warehouse_id" value="" />';
|
||||
print '</td>';
|
||||
print "</tr>\n";
|
||||
|
||||
@ -45,7 +45,6 @@ class ActionComm extends CommonObject
|
||||
var $code;
|
||||
var $label;
|
||||
|
||||
var $date;
|
||||
var $datec; // Date creation record (datec)
|
||||
var $datem; // Date modification record (tms)
|
||||
var $author; // Object user that create action
|
||||
@ -53,7 +52,6 @@ class ActionComm extends CommonObject
|
||||
|
||||
var $datep; // Date action start (datep)
|
||||
var $datef; // Date action end (datep2)
|
||||
var $dateend; // ??
|
||||
var $durationp = -1; // -1=Unkown duration
|
||||
var $fulldayevent = 0; // 1=Event on full day
|
||||
var $punctual = 1; // Milestone
|
||||
@ -123,11 +121,11 @@ class ActionComm extends CommonObject
|
||||
if (empty($this->punctual)) $this->punctual = 0;
|
||||
if (empty($this->transparency)) $this->transparency = 0;
|
||||
if ($this->percentage > 100) $this->percentage = 100;
|
||||
if ($this->percentage == 100 && ! $this->dateend) $this->dateend = $this->date;
|
||||
//if ($this->percentage == 100 && ! $this->dateend) $this->dateend = $this->date;
|
||||
if (! empty($this->datep) && ! empty($this->datef)) $this->durationp=($this->datef - $this->datep);
|
||||
if (! empty($this->date) && ! empty($this->dateend)) $this->durationa=($this->dateend - $this->date);
|
||||
//if (! empty($this->date) && ! empty($this->dateend)) $this->durationa=($this->dateend - $this->date);
|
||||
if (! empty($this->datep) && ! empty($this->datef) && $this->datep > $this->datef) $this->datef=$this->datep;
|
||||
if (! empty($this->date) && ! empty($this->dateend) && $this->date > $this->dateend) $this->dateend=$this->date;
|
||||
//if (! empty($this->date) && ! empty($this->dateend) && $this->date > $this->dateend) $this->dateend=$this->date;
|
||||
if (! isset($this->fk_project) || $this->fk_project < 0) $this->fk_project = 0;
|
||||
if ($this->elementtype=='facture') $this->elementtype='invoice';
|
||||
if ($this->elementtype=='commande') $this->elementtype='order';
|
||||
@ -444,11 +442,11 @@ class ActionComm extends CommonObject
|
||||
if (empty($this->transparency)) $this->transparency = 0;
|
||||
if (empty($this->fulldayevent)) $this->fulldayevent = 0;
|
||||
if ($this->percentage > 100) $this->percentage = 100;
|
||||
if ($this->percentage == 100 && ! $this->dateend) $this->dateend = $this->date;
|
||||
//if ($this->percentage == 100 && ! $this->dateend) $this->dateend = $this->date;
|
||||
if ($this->datep && $this->datef) $this->durationp=($this->datef - $this->datep);
|
||||
if ($this->date && $this->dateend) $this->durationa=($this->dateend - $this->date);
|
||||
//if ($this->date && $this->dateend) $this->durationa=($this->dateend - $this->date);
|
||||
if ($this->datep && $this->datef && $this->datep > $this->datef) $this->datef=$this->datep;
|
||||
if ($this->date && $this->dateend && $this->date > $this->dateend) $this->dateend=$this->date;
|
||||
//if ($this->date && $this->dateend && $this->date > $this->dateend) $this->dateend=$this->date;
|
||||
if ($this->fk_project < 0) $this->fk_project = 0;
|
||||
|
||||
// Check parameters
|
||||
@ -460,15 +458,12 @@ class ActionComm extends CommonObject
|
||||
|
||||
$this->db->begin();
|
||||
|
||||
//print 'eeea'.$this->datep.'-'.(strval($this->datep) != '').'-'.$this->db->idate($this->datep);
|
||||
$sql = "UPDATE ".MAIN_DB_PREFIX."actioncomm ";
|
||||
$sql.= " SET percent = '".$this->percentage."'";
|
||||
if ($this->fk_action > 0) $sql.= ", fk_action = '".$this->fk_action."'";
|
||||
$sql.= ", label = ".($this->label ? "'".$this->db->escape($this->label)."'":"null");
|
||||
$sql.= ", datep = ".(strval($this->datep)!='' ? "'".$this->db->idate($this->datep)."'" : 'null');
|
||||
$sql.= ", datep2 = ".(strval($this->datef)!='' ? "'".$this->db->idate($this->datef)."'" : 'null');
|
||||
//$sql.= ", datea = ".(strval($this->date)!='' ? "'".$this->db->idate($this->date)."'" : 'null');
|
||||
//$sql.= ", datea2 = ".(strval($this->dateend)!='' ? "'".$this->db->idate($this->dateend)."'" : 'null');
|
||||
$sql.= ", note = ".($this->note ? "'".$this->db->escape($this->note)."'":"null");
|
||||
$sql.= ", fk_soc =". ($this->societe->id > 0 ? "'".$this->societe->id."'":"null");
|
||||
$sql.= ", fk_project =". ($this->fk_project > 0 ? "'".$this->fk_project."'":"null");
|
||||
|
||||
@ -1470,6 +1470,7 @@ class Form
|
||||
$sql = "SELECT price, price_ttc, price_base_type, tva_tx";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."product_price";
|
||||
$sql.= " WHERE fk_product='".$objp->rowid."'";
|
||||
$sql.= " AND entity IN (".getEntity('productprice', 1).")";
|
||||
$sql.= " AND price_level=".$price_level;
|
||||
$sql.= " ORDER BY date_price";
|
||||
$sql.= " DESC LIMIT 1";
|
||||
|
||||
@ -39,6 +39,8 @@ class modCron extends DolibarrModules
|
||||
*/
|
||||
function __construct($db)
|
||||
{
|
||||
global $langs,$conf;
|
||||
|
||||
$this->db = $db;
|
||||
$this->numero = 2300;
|
||||
|
||||
@ -65,8 +67,10 @@ class modCron extends DolibarrModules
|
||||
|
||||
// Dependancies
|
||||
//-------------
|
||||
$this->depends = array();
|
||||
$this->requiredby = array();
|
||||
$this->hidden = ! empty($conf->global->CRON_MODULE_DISABLED); // A condition to disable module
|
||||
$this->depends = array(); // List of modules id that must be enabled if this module is enabled
|
||||
$this->requiredby = array(); // List of modules id to disable if this one is disabled
|
||||
$this->conflictwith = array(); // List of modules id this module is in conflict with
|
||||
$this->langfiles = array("cron@cron");
|
||||
|
||||
// Constantes
|
||||
|
||||
@ -25,9 +25,9 @@ create table llx_actioncomm
|
||||
id integer AUTO_INCREMENT PRIMARY KEY,
|
||||
ref_ext varchar(128),
|
||||
entity integer DEFAULT 1 NOT NULL, -- multi company id
|
||||
datep datetime, -- date debut planifiee
|
||||
datep2 datetime, -- deprecated
|
||||
datea datetime, -- date debut realisation
|
||||
datep datetime, -- date start
|
||||
datep2 datetime, -- date end
|
||||
datea datetime, -- deprecated
|
||||
datea2 datetime, -- deprecated
|
||||
|
||||
fk_action integer, -- type of action (optionnal link with llx_c_actioncomm or null)
|
||||
|
||||
@ -47,6 +47,5 @@ CREATE TABLE llx_cronjob
|
||||
fk_user_author integer DEFAULT NULL,
|
||||
fk_user_mod integer DEFAULT NULL,
|
||||
note text
|
||||
|
||||
)ENGINE=innodb;
|
||||
|
||||
|
||||
|
||||
@ -1382,7 +1382,7 @@ AccountancyCodeBuy=Purchase account. code
|
||||
AgendaSetup=Events and agenda module setup
|
||||
PasswordTogetVCalExport=Key to authorize export link
|
||||
PastDelayVCalExport=Do not export event older than
|
||||
AGENDA_USE_EVENT_TYPE=Use events types (manage into Configuration->Dictionnary->llx_c_actioncomm)
|
||||
AGENDA_USE_EVENT_TYPE=Use events types (managed into Configuration->Dictionnary->llx_c_actioncomm)
|
||||
##### ClickToDial #####
|
||||
ClickToDialDesc=This module allows to add an icon after phone numbers. A click on this icon will call a server with a particular URL you define below. This can be used to call a call center system from Dolibarr that can call the phone number on a SIP system for example.
|
||||
##### Point Of Sales (CashDesk) #####
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/* Copyright (C) 2006 Andre Cianfarani <acianfa@free.fr>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2005-2013 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2007-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@ -101,6 +101,7 @@ if (! empty($action) && $action == 'fetch' && ! empty($id))
|
||||
$sql = "SELECT price, price_ttc, price_base_type, tva_tx";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."product_price ";
|
||||
$sql.= " WHERE fk_product='".$id."'";
|
||||
$sql.= " AND entity IN (".getEntity('productprice', 1).")";
|
||||
$sql.= " AND price_level=".$price_level;
|
||||
$sql.= " ORDER BY date_price";
|
||||
$sql.= " DESC LIMIT 1";
|
||||
|
||||
@ -101,9 +101,9 @@ class FormProduct
|
||||
}
|
||||
|
||||
/**
|
||||
* Return list of possible payments modes
|
||||
* Return list of warehouses
|
||||
*
|
||||
* @param int $selected Id du mode de paiement pre-selectionne
|
||||
* @param int $selected Id of preselected warehouse ('' for no value, 'ifone'=select value if one value otherwise no value)
|
||||
* @param string $htmlname Name of html select html
|
||||
* @param string $filtertype For filter
|
||||
* @param int $empty 1=Can be empty, 0 if not
|
||||
@ -119,23 +119,22 @@ class FormProduct
|
||||
dol_syslog(get_class($this)."::selectWarehouses $selected, $htmlname, $filtertype, $empty, $disabled, $fk_product",LOG_DEBUG);
|
||||
|
||||
$this->loadWarehouses($fk_product);
|
||||
$nbofwarehouses=count($this->cache_warehouses);
|
||||
|
||||
$out='<select class="flat"'.($disabled?' disabled="disabled"':'').' id="'.$htmlname.'" name="'.($htmlname.($disabled?'_disabled':'')).'">';
|
||||
if ($empty) $out.='<option value="-1">'.($empty_label?$empty_label:' ').'</option>';
|
||||
foreach($this->cache_warehouses as $id => $arraytypes)
|
||||
{
|
||||
$out.='<option value="'.$id.'"';
|
||||
// Si selected est text, on compare avec code, sinon avec id
|
||||
if ($selected == $id) $out.=' selected="selected"';
|
||||
if ($selected == $id || ($selected == 'ifone' && $nbofwarehouses == 1)) $out.=' selected="selected"';
|
||||
$out.='>';
|
||||
$out.=$arraytypes['label'];
|
||||
if ($fk_product) $out.=' ('.$langs->trans("Stock").': '.($arraytypes['stock']>0?$arraytypes['stock']:'?').')';
|
||||
$out.='</option>';
|
||||
}
|
||||
$out.='</select>';
|
||||
if ($disabled) $out.='<input type="hidden" name="'.$htmlname.'" value="'.$selected.'">';
|
||||
if ($disabled) $out.='<input type="hidden" name="'.$htmlname.'" value="'.(($selected>0)?$selected:'').'">';
|
||||
|
||||
//count($this->cache_warehouses);
|
||||
return $out;
|
||||
}
|
||||
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/* Copyright (C) 2001-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2005-2013 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2006 Andre Cianfarani <acianfa@free.fr>
|
||||
* Copyright (C) 2007-2011 Jean Heimburger <jean@tiaris.info>
|
||||
* Copyright (C) 2010-2011 Juanjo Menent <jmenent@2byte.es>
|
||||
@ -822,13 +822,15 @@ class Product extends CommonObject
|
||||
*/
|
||||
function _log_price($user,$level=0)
|
||||
{
|
||||
global $conf;
|
||||
|
||||
$now=dol_now();
|
||||
|
||||
// Add new price
|
||||
$sql = "INSERT INTO ".MAIN_DB_PREFIX."product_price(price_level,date_price,fk_product,fk_user_author,price,price_ttc,price_base_type,tosell,tva_tx,recuperableonly,";
|
||||
$sql.= " localtax1_tx, localtax2_tx, price_min,price_min_ttc,price_by_qty) ";
|
||||
$sql.= " localtax1_tx, localtax2_tx, price_min,price_min_ttc,price_by_qty,entity) ";
|
||||
$sql.= " VALUES(".($level?$level:1).", '".$this->db->idate($now)."',".$this->id.",".$user->id.",".$this->price.",".$this->price_ttc.",'".$this->price_base_type."',".$this->status.",".$this->tva_tx.",".$this->tva_npr.",";
|
||||
$sql.= " ".$this->localtax1_tx.",".$this->localtax2_tx.",".$this->price_min.",".$this->price_min_ttc.",".$this->price_by_qty;
|
||||
$sql.= " ".$this->localtax1_tx.",".$this->localtax2_tx.",".$this->price_min.",".$this->price_min_ttc.",".$this->price_by_qty.",".$conf->entity;
|
||||
$sql.= ")";
|
||||
|
||||
dol_syslog(get_class($this)."_log_price sql=".$sql);
|
||||
@ -1199,7 +1201,8 @@ class Product extends CommonObject
|
||||
$sql = "SELECT price, price_ttc, price_min, price_min_ttc,";
|
||||
$sql.= " price_base_type, tva_tx, tosell, price_by_qty, rowid, recuperableonly";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."product_price";
|
||||
$sql.= " WHERE price_level=".$i;
|
||||
$sql.= " WHERE entity IN (".getEntity('productprice', 1).")";
|
||||
$sql.= " AND price_level=".$i;
|
||||
$sql.= " AND fk_product = '".$this->id."'";
|
||||
$sql.= " ORDER BY date_price DESC";
|
||||
$sql.= " LIMIT 1";
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
/* Copyright (C) 2001-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005 Eric Seigne <eric.seigne@ryxeo.com>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2005-2013 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2006 Andre Cianfarani <acianfa@free.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@ -667,6 +667,7 @@ $sql.= " p.date_price as dp, u.rowid as user_id, u.login";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."product_price as p,";
|
||||
$sql.= " ".MAIN_DB_PREFIX."user as u";
|
||||
$sql.= " WHERE fk_product = ".$object->id;
|
||||
$sql.= " AND p.entity IN (".getEntity('productprice', 1).")";
|
||||
$sql.= " AND p.fk_user_author = u.rowid";
|
||||
if (! empty($socid) && ! empty($conf->global->PRODUIT_MULTIPRICES)) $sql.= " AND p.price_level = ".$soc->price_level;
|
||||
$sql.= " ORDER BY p.date_price DESC, p.price_level ASC";
|
||||
|
||||
@ -65,6 +65,7 @@ if (! empty($conf->global->MAIN_OVERWRITE_THEME_RES)) { $path='/'.$conf->global-
|
||||
// Define image path files
|
||||
$fontlist='arial, sans-serif, verdana, helvetica';
|
||||
//$fontlist='Verdana,Helvetica,Arial,sans-serif';
|
||||
|
||||
$dol_hide_topmenu=$conf->dol_hide_topmenu;
|
||||
$dol_hide_leftmenu=$conf->dol_hide_leftmenu;
|
||||
$dol_optimize_smallscreen=$conf->dol_optimize_smallscreen;
|
||||
|
||||
@ -1709,7 +1709,7 @@ div.liste_titre, tr.liste_titre, tr.liste_titre_sel, form.liste_titre, form.list
|
||||
white-space: <?php echo $dol_optimize_smallscreen?'normal':'nowrap'; ?>;
|
||||
text-align: <?php echo $left; ?>;
|
||||
}
|
||||
tr.liste_titre th, th.liste_titre, tr.liste_titre td, td.liste_titre, form.liste_titre div
|
||||
tr.liste_titre th, th.liste_titre, tr.liste_titre td, td.liste_titre, form.liste_titre div, div.liste_titre
|
||||
{
|
||||
font-family: <?php print $fontlist ?>;
|
||||
/*font-weight: normal;*/
|
||||
@ -1717,6 +1717,9 @@ tr.liste_titre th, th.liste_titre, tr.liste_titre td, td.liste_titre, form.liste
|
||||
white-space: <?php echo $dol_optimize_smallscreen?'normal':'nowrap'; ?>;
|
||||
text-shadow:1px 0px 1px #ffffff;
|
||||
}
|
||||
div.liste_titre {
|
||||
padding-left: 3px;
|
||||
}
|
||||
tr.liste_titre_sel th, th.liste_titre_sel, tr.liste_titre_sel td, td.liste_titre_sel, form.liste_titre_sel div
|
||||
{
|
||||
font-family: <?php print $fontlist ?>;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user