Merge branch 'develop' into cleandeprecated
This commit is contained in:
commit
b21caf935a
53 changed files with 255 additions and 235 deletions
|
|
@ -231,6 +231,7 @@ WARNING:
|
|||
--------
|
||||
|
||||
The following changes may create regressions for some external modules, but were necessary to make Dolibarr better:
|
||||
* The hook changeHelpURL is replaced by llxHeader
|
||||
* The property ->brouillon has been removed from all classes. It was not reliable and was a duplicate of ->status == self::STATUS_DRAFT.
|
||||
* The duplicated and deprecated property ->date_livraison that was renamed into ->delivery_date has been completely removed.
|
||||
* The property ->user_close to store ID of closing user has been renamed into ->user_closing_id.
|
||||
|
|
|
|||
11
README.md
11
README.md
|
|
@ -104,7 +104,7 @@ See the [ChangeLog](https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog)
|
|||
- Batches / Lots / Serials
|
||||
- Product Variants
|
||||
- Bill of Materials (BOM)
|
||||
- Manufacturing Orders
|
||||
- Manufacturing Orders (MO)
|
||||
|
||||
Customer/Sales Management
|
||||
|
||||
|
|
@ -114,7 +114,8 @@ See the [ChangeLog](https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog)
|
|||
- Customer Orders management
|
||||
- Contracts/Subscription management
|
||||
- Interventions management
|
||||
- Ticket System
|
||||
- Ticket System (+ Knowledge management)
|
||||
- Partnership management
|
||||
- Shipping management
|
||||
- Customer Invoices/Credit notes and payment management
|
||||
- Point of Sale (POS)
|
||||
|
|
@ -143,14 +144,16 @@ See the [ChangeLog](https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog)
|
|||
|
||||
- Shared calendar/agenda (with ical and vcal import/export for third-party tools integration)
|
||||
- Projects & Tasks management
|
||||
- Event organization
|
||||
- Ticket System
|
||||
- Surveys
|
||||
|
||||
HR
|
||||
HR - Human Resources Management
|
||||
|
||||
- Employee's leaves management
|
||||
- Expense reports
|
||||
- Recruitment management
|
||||
- Employee/staff management
|
||||
- Timesheets
|
||||
|
||||
### Other application/modules
|
||||
|
|
@ -168,7 +171,7 @@ See the [ChangeLog](https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog)
|
|||
- Payment platforms integration (PayPal, Stripe, Paybox...)
|
||||
- Email-Collector
|
||||
|
||||
(around 100 modules available by default, 1000+ on the addon marketplace)
|
||||
(around 100 modules available by default, 1000+ addons at the official marketplace Dolistore.com)
|
||||
|
||||
### Other general features
|
||||
|
||||
|
|
|
|||
|
|
@ -302,7 +302,7 @@ $html .= '<h2>Lines of code</h2>'."\n";
|
|||
$html .= '<div class="div-table-responsive">'."\n";
|
||||
$html .= '<table class="centpercent">';
|
||||
$html .= '<tr class="loc">';
|
||||
$html .= '<th class="left">Language</td>';
|
||||
$html .= '<th class="left">Language</th>';
|
||||
$html .= '<th class="right">Bytes</th>';
|
||||
$html .= '<th class="right">Files</th>';
|
||||
$html .= '<th class="right">Lines</th>';
|
||||
|
|
@ -310,7 +310,7 @@ $html .= '<th class="right">Blanks</th>';
|
|||
$html .= '<th class="right">Comments</th>';
|
||||
$html .= '<th class="right">Code</th>';
|
||||
//$html .= '<td class="right">'.$val['Complexity'].'</td>';
|
||||
$html .= '</th>';
|
||||
$html .= '</tr>';
|
||||
foreach (array('proj', 'dep') as $source) {
|
||||
$html .= '<tr class="trgroup" id="source'.$source.'">';
|
||||
if ($source == 'proj') {
|
||||
|
|
@ -400,7 +400,7 @@ $( ".seedetail" ).on( "click", function() {
|
|||
});
|
||||
</script>
|
||||
';
|
||||
$html .= '</boby>';
|
||||
$html .= '</body>';
|
||||
$html .= '</html>';
|
||||
|
||||
$fh = fopen($outputpath, 'w');
|
||||
|
|
|
|||
|
|
@ -197,10 +197,6 @@ class BookKeeping extends CommonObject
|
|||
*/
|
||||
public $picto = 'generic';
|
||||
|
||||
/**
|
||||
* @var array List of active fiscal periods cached [[date_start, date_end], ...]
|
||||
*/
|
||||
public static $active_fiscal_period_cached;
|
||||
/**
|
||||
* @var string[] SQL filter used for check if the bookkeeping record can be created/inserted/modified/deleted (cached)
|
||||
*/
|
||||
|
|
@ -2280,6 +2276,8 @@ class BookKeeping extends CommonObject
|
|||
*/
|
||||
public function getCanModifyBookkeepingSQL($alias = '', $force = false)
|
||||
{
|
||||
global $conf;
|
||||
|
||||
$alias = trim($alias);
|
||||
$alias = !empty($alias) && strpos($alias, '.') < 0 ? $alias . "." : $alias;
|
||||
|
||||
|
|
@ -2290,8 +2288,8 @@ class BookKeeping extends CommonObject
|
|||
}
|
||||
|
||||
$sql_list = array();
|
||||
if (is_array(self::$active_fiscal_period_cached)) {
|
||||
foreach (self::$active_fiscal_period_cached as $fiscal_period) {
|
||||
if (!empty($conf->cache['active_fiscal_period_cached']) && is_array($conf->cache['active_fiscal_period_cached'])) {
|
||||
foreach ($conf->cache['active_fiscal_period_cached'] as $fiscal_period) {
|
||||
$sql_list[] = "('" . $this->db->idate($fiscal_period['date_start']) . "' <= {$alias}doc_date AND {$alias}doc_date <= '" . $this->db->idate($fiscal_period['date_end']) . "')";
|
||||
}
|
||||
}
|
||||
|
|
@ -2309,26 +2307,52 @@ class BookKeeping extends CommonObject
|
|||
*/
|
||||
public function canModifyBookkeeping($id)
|
||||
{
|
||||
$result = $this->loadFiscalPeriods(false, 'active');
|
||||
if ($result < 0) {
|
||||
return -1;
|
||||
}
|
||||
global $conf;
|
||||
|
||||
$bookkeeping = new BookKeeping($this->db);
|
||||
$result = $bookkeeping->fetch($id);
|
||||
if ($result <= 0) {
|
||||
return $result;
|
||||
}
|
||||
if (getDolGlobalString('ACCOUNTANCY_FISCAL_PERIOD_MODE') == 'blockedonclosed') {
|
||||
$result = $this->loadFiscalPeriods(false, 'closed');
|
||||
|
||||
if (is_array(self::$active_fiscal_period_cached)) {
|
||||
foreach (self::$active_fiscal_period_cached as $fiscal_period) {
|
||||
if ($fiscal_period['date_start'] <= $bookkeeping->doc_date && $bookkeeping->doc_date <= $fiscal_period['date_end']) {
|
||||
return 1;
|
||||
if ($result < 0) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
$bookkeeping = new BookKeeping($this->db);
|
||||
$result = $bookkeeping->fetch($id);
|
||||
if ($result <= 0) {
|
||||
return $result;
|
||||
}
|
||||
|
||||
if (!empty($conf->cache['closed_fiscal_period_cached']) && is_array($conf->cache['closed_fiscal_period_cached'])) {
|
||||
foreach ($conf->cache['closed_fiscal_period_cached'] as $fiscal_period) {
|
||||
if ($fiscal_period['date_start'] <= $bookkeeping->doc_date && $bookkeeping->doc_date <= $fiscal_period['date_end']) {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
return 1;
|
||||
} else {
|
||||
$result = $this->loadFiscalPeriods(false, 'active');
|
||||
if ($result < 0) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
$bookkeeping = new BookKeeping($this->db);
|
||||
$result = $bookkeeping->fetch($id);
|
||||
if ($result <= 0) {
|
||||
return $result;
|
||||
}
|
||||
|
||||
if (!empty($conf->cache['active_fiscal_period_cached']) && is_array($conf->cache['active_fiscal_period_cached'])) {
|
||||
foreach ($conf->cache['active_fiscal_period_cached'] as $fiscal_period) {
|
||||
if ($fiscal_period['date_start'] <= $bookkeeping->doc_date && $bookkeeping->doc_date <= $fiscal_period['date_end']) {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -2339,10 +2363,23 @@ class BookKeeping extends CommonObject
|
|||
*/
|
||||
public function validBookkeepingDate($date)
|
||||
{
|
||||
global $conf;
|
||||
|
||||
if (getDolGlobalString('ACCOUNTANCY_FISCAL_PERIOD_MODE') == 'blockedonclosed') {
|
||||
$result = $this->loadFiscalPeriods(false, 'closed');
|
||||
|
||||
// TODO
|
||||
if ($result < 0) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (!empty($conf->cache['closed_fiscal_period_cached']) && is_array($conf->cache['closed_fiscal_period_cached'])) {
|
||||
foreach ($conf->cache['closed_fiscal_period_cached'] as $fiscal_period) {
|
||||
if ($fiscal_period['date_start'] <= $date && $date <= $fiscal_period['date_end']) {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return 1;
|
||||
} else {
|
||||
$result = $this->loadFiscalPeriods(false, 'active');
|
||||
|
|
@ -2350,16 +2387,16 @@ class BookKeeping extends CommonObject
|
|||
return -1;
|
||||
}
|
||||
|
||||
if (is_array(self::$active_fiscal_period_cached)) {
|
||||
foreach (self::$active_fiscal_period_cached as $fiscal_period) {
|
||||
if (!empty($conf->cache['active_fiscal_period_cached']) && is_array($conf->cache['active_fiscal_period_cached'])) {
|
||||
foreach ($conf->cache['active_fiscal_period_cached'] as $fiscal_period) {
|
||||
if ($fiscal_period['date_start'] <= $date && $date <= $fiscal_period['date_end']) {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -2374,7 +2411,7 @@ class BookKeeping extends CommonObject
|
|||
global $conf;
|
||||
|
||||
if ($mode == 'active') {
|
||||
if (!isset(self::$active_fiscal_period_cached) || $force) {
|
||||
if (!isset($conf->cache['active_fiscal_period_cached']) || $force) {
|
||||
$sql = "SELECT date_start, date_end";
|
||||
$sql .= " FROM " . $this->db->prefix() . "accounting_fiscalyear";
|
||||
$sql .= " WHERE entity = " . ((int) $conf->entity);
|
||||
|
|
@ -2393,12 +2430,31 @@ class BookKeeping extends CommonObject
|
|||
'date_end' => $this->db->jdate($obj->date_end),
|
||||
);
|
||||
}
|
||||
self::$active_fiscal_period_cached = $list;
|
||||
$conf->cache['active_fiscal_period_cached'] = $list;
|
||||
}
|
||||
}
|
||||
if ($mode == 'closed') {
|
||||
// TODO
|
||||
if (!isset($conf->cache['closed_fiscal_period_cached']) || $force) {
|
||||
$sql = "SELECT date_start, date_end";
|
||||
$sql .= " FROM " . $this->db->prefix() . "accounting_fiscalyear";
|
||||
$sql .= " WHERE entity = " . ((int) $conf->entity);
|
||||
$sql .= " AND statut = 1";
|
||||
|
||||
$resql = $this->db->query($sql);
|
||||
if (!$resql) {
|
||||
$this->errors[] = $this->db->lasterror();
|
||||
return -1;
|
||||
}
|
||||
|
||||
$list = array();
|
||||
while ($obj = $this->db->fetch_object($resql)) {
|
||||
$list[] = array(
|
||||
'date_start' => $this->db->jdate($obj->date_start),
|
||||
'date_end' => $this->db->jdate($obj->date_end),
|
||||
);
|
||||
}
|
||||
$conf->cache['closed_fiscal_period_cached'] = $list;
|
||||
}
|
||||
}
|
||||
|
||||
return 1;
|
||||
|
|
|
|||
|
|
@ -100,6 +100,7 @@ if (empty($reshook)) {
|
|||
// Action mise a jour d'une categorie
|
||||
if ($action == 'update' && $user->hasRight('categorie', 'creer')) {
|
||||
$object->oldcopy = dol_clone($object, 2);
|
||||
|
||||
$object->label = $label;
|
||||
$object->description = dol_htmlcleanlastbr($description);
|
||||
$object->color = $color;
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
|
|||
/**
|
||||
* API class for accounts
|
||||
*
|
||||
* @property DoliDB db
|
||||
* @property DoliDB $db
|
||||
* @access protected
|
||||
* @class DolibarrApiAccess {@requires user,external}
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -630,18 +630,18 @@ if (count($amount)) {
|
|||
} else {
|
||||
$linkname = $langs->trans("PaymentsNotLinkedToInvoice");
|
||||
}
|
||||
print "<td>".$linkname."</td>\n";
|
||||
print '<td class="tdoverflowmax150">'.$linkname."</td>\n";
|
||||
|
||||
print '<td>';
|
||||
print $address_zip[$key];
|
||||
print $address_pays($address_zip[$key]);
|
||||
print '</td>';
|
||||
|
||||
print '<td>';
|
||||
print $address_town[$key];
|
||||
print '<td class="tdoverflowmax150" title="'.dol_escape_htmltag($address_town[$key]).'">';
|
||||
print $address_pays($address_town[$key]);
|
||||
print '</td>';
|
||||
|
||||
print '<td>';
|
||||
print $address_pays[$key];
|
||||
print '<td class="tdoverflowmax150" title="'.dol_escape_htmltag($address_pays[$key]).'">';
|
||||
print $address_pays($address_pays[$key]);
|
||||
print '</td>';
|
||||
|
||||
// Amount w/o VAT
|
||||
|
|
|
|||
|
|
@ -71,20 +71,20 @@ class DolGeoIP
|
|||
}
|
||||
} else {
|
||||
print 'ErrorBadParameterInConstructor';
|
||||
return 0;
|
||||
return;
|
||||
}
|
||||
|
||||
// Here, function exists (embedded into PHP or exists because we made include)
|
||||
if (empty($type) || empty($datfile)) {
|
||||
$this->errorlabel = 'Constructor was called with no datafile parameter';
|
||||
dol_syslog('DolGeoIP '.$this->errorlabel, LOG_ERR);
|
||||
return 0;
|
||||
return;
|
||||
}
|
||||
if (!file_exists($datfile) || !is_readable($datfile)) {
|
||||
$this->error = 'ErrorGeoIPClassNotInitialized';
|
||||
$this->errorlabel = "Datafile ".$datfile." not found";
|
||||
dol_syslog('DolGeoIP '.$this->errorlabel, LOG_ERR);
|
||||
return 0;
|
||||
return;
|
||||
}
|
||||
|
||||
if ($geoipversion == '2') {
|
||||
|
|
@ -93,7 +93,7 @@ class DolGeoIP
|
|||
} catch (Exception $e) {
|
||||
$this->error = $e->getMessage();
|
||||
dol_syslog('DolGeoIP '.$this->errorlabel, LOG_ERR);
|
||||
return 0;
|
||||
return;
|
||||
}
|
||||
} elseif (function_exists('geoip_open') && defined('GEOIP_STANDARD')) {
|
||||
$this->gi = geoip_open($datfile, constant('GEOIP_STANDARD'));
|
||||
|
|
|
|||
|
|
@ -3995,57 +3995,8 @@ class Form
|
|||
}
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
|
||||
/**
|
||||
* Return list of delivery address
|
||||
*
|
||||
* @param string $selected Id contact pre-selectionn
|
||||
* @param int $socid Id of company
|
||||
* @param string $htmlname Name of HTML field
|
||||
* @param int $showempty Add an empty field
|
||||
* @return integer
|
||||
*/
|
||||
public function select_address($selected, $socid, $htmlname = 'address_id', $showempty = 0)
|
||||
{
|
||||
// phpcs:enable
|
||||
// looking for users
|
||||
$sql = "SELECT a.rowid, a.label";
|
||||
$sql .= " FROM " . $this->db->prefix() . "societe_address as a";
|
||||
$sql .= " WHERE a.fk_soc = " . ((int) $socid);
|
||||
$sql .= " ORDER BY a.label ASC";
|
||||
|
||||
dol_syslog(get_class($this) . "::select_address", LOG_DEBUG);
|
||||
$resql = $this->db->query($sql);
|
||||
if ($resql) {
|
||||
print '<select class="flat" id="select_' . $htmlname . '" name="' . $htmlname . '">';
|
||||
if ($showempty) {
|
||||
print '<option value="0"> </option>';
|
||||
}
|
||||
$num = $this->db->num_rows($resql);
|
||||
$i = 0;
|
||||
if ($num) {
|
||||
while ($i < $num) {
|
||||
$obj = $this->db->fetch_object($resql);
|
||||
|
||||
if ($selected && $selected == $obj->rowid) {
|
||||
print '<option value="' . $obj->rowid . '" selected>' . $obj->label . '</option>';
|
||||
} else {
|
||||
print '<option value="' . $obj->rowid . '">' . $obj->label . '</option>';
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
print '</select>';
|
||||
return $num;
|
||||
} else {
|
||||
dol_print_error($this->db);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
|
||||
/**
|
||||
* Load into cache list of payment terms
|
||||
*
|
||||
|
|
|
|||
|
|
@ -371,7 +371,7 @@ class FormOther
|
|||
public function select_percent($selected = 0, $htmlname = 'percent', $disabled = 0, $increment = 5, $start = 0, $end = 100, $showempty = 0)
|
||||
{
|
||||
// phpcs:enable
|
||||
$return = '<select class="flat maxwidth75" name="'.$htmlname.'" '.($disabled ? 'disabled' : '').'>';
|
||||
$return = '<select class="flat maxwidth75 right" name="'.$htmlname.'" '.($disabled ? 'disabled' : '').'>';
|
||||
if ($showempty) {
|
||||
$return .= '<option value="-1"'.(($selected == -1 || $selected == '') ? ' selected' : '').'> </option>';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -172,7 +172,6 @@ class Menubase
|
|||
{
|
||||
$this->db = $db;
|
||||
$this->menu_handler = $menu_handler;
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -101,7 +101,7 @@ class DoliDBPgsql extends DoliDB
|
|||
$this->ok = false;
|
||||
$this->error = "Pgsql PHP functions are not available in this version of PHP";
|
||||
dol_syslog(get_class($this)."::DoliDBPgsql : Pgsql PHP functions are not available in this version of PHP", LOG_ERR);
|
||||
return $this->ok;
|
||||
return;
|
||||
}
|
||||
|
||||
if (!$host) {
|
||||
|
|
@ -109,7 +109,7 @@ class DoliDBPgsql extends DoliDB
|
|||
$this->ok = false;
|
||||
$this->error = $langs->trans("ErrorWrongHostParameter");
|
||||
dol_syslog(get_class($this)."::DoliDBPgsql : Erreur Connect, wrong host parameters", LOG_ERR);
|
||||
return $this->ok;
|
||||
return;
|
||||
}
|
||||
|
||||
// Essai connexion serveur
|
||||
|
|
@ -144,8 +144,6 @@ class DoliDBPgsql extends DoliDB
|
|||
// Pas de selection de base demandee, ok ou ko
|
||||
$this->database_selected = false;
|
||||
}
|
||||
|
||||
return $this->ok;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -86,7 +86,7 @@ class DoliDBSqlite3 extends DoliDB
|
|||
$this->ok = false;
|
||||
$this->error="Sqlite PHP functions for using Sqlite driver are not available in this version of PHP. Try to use another driver.";
|
||||
dol_syslog(get_class($this)."::DoliDBSqlite3 : Sqlite PHP functions for using Sqlite driver are not available in this version of PHP. Try to use another driver.",LOG_ERR);
|
||||
return $this->ok;
|
||||
return;
|
||||
}*/
|
||||
|
||||
/*if (! $host)
|
||||
|
|
@ -95,7 +95,7 @@ class DoliDBSqlite3 extends DoliDB
|
|||
$this->ok = false;
|
||||
$this->error=$langs->trans("ErrorWrongHostParameter");
|
||||
dol_syslog(get_class($this)."::DoliDBSqlite3 : Erreur Connect, wrong host parameters",LOG_ERR);
|
||||
return $this->ok;
|
||||
return;
|
||||
}*/
|
||||
|
||||
// Essai connexion serveur
|
||||
|
|
@ -126,8 +126,6 @@ class DoliDBSqlite3 extends DoliDB
|
|||
//$this->error=sqlite_connect_error();
|
||||
dol_syslog(get_class($this)."::DoliDBSqlite3 : Error Connect ".$this->error, LOG_ERR);
|
||||
}
|
||||
|
||||
return $this->ok;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -224,8 +224,7 @@ function isModEnabled($module)
|
|||
'category' => 'categorie',
|
||||
'contract' => 'contrat',
|
||||
'project' => 'projet',
|
||||
'bank' => 'banque',
|
||||
'category' => 'categorie'
|
||||
'delivery_note' => 'expedition'
|
||||
);
|
||||
if (empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) {
|
||||
$arrayconv['supplier_order'] = 'fournisseur';
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ function dolMd2Html($content, $parser = 'parsedown', $replaceimagepath = null)
|
|||
$content = preg_replace('/<a href="([^"]+)" target="([^"]+)">([^<]+)<\/a>/', '[\3](\1)', $content);
|
||||
|
||||
// Replace HTML coments
|
||||
$content = preg_replace('/<!--.*-->/ms', '', $content); // We remove HTML comment that are not MD comment because they will be escaped and output when setSafeMode is set to true.
|
||||
$content = preg_replace('/<!--.*-->/Ums', '', $content); // We remove HTML comment that are not MD comment because they will be escaped and output when setSafeMode is set to true.
|
||||
|
||||
if (is_array($replaceimagepath)) {
|
||||
foreach ($replaceimagepath as $key => $val) {
|
||||
|
|
|
|||
|
|
@ -1502,8 +1502,12 @@ function pdf_getlinedesc($object, $i, $outputlangs, $hideref = 0, $hidedesc = 0,
|
|||
} else {
|
||||
$textwasnotmodified = ($desc == $prodser->description);
|
||||
}
|
||||
if (!empty($prodser->multilangs[$outputlangs->defaultlang]["description"]) && ($textwasnotmodified || $translatealsoifmodified)) {
|
||||
$desc = $prodser->multilangs[$outputlangs->defaultlang]["description"];
|
||||
if (!empty($prodser->multilangs[$outputlangs->defaultlang]["description"])) {
|
||||
if ($textwasnotmodified) {
|
||||
$desc = str_replace($prodser->description, $prodser->multilangs[$outputlangs->defaultlang]["description"], $desc);
|
||||
} elseif ($translatealsoifmodified) {
|
||||
$desc = $prodser->multilangs[$outputlangs->defaultlang]["description"];
|
||||
}
|
||||
}
|
||||
|
||||
// Set note
|
||||
|
|
|
|||
|
|
@ -1265,20 +1265,17 @@ function projectLinesPerAction(&$inc, $parent, $fuser, $lines, &$level, &$projec
|
|||
|
||||
// Ref
|
||||
print '<td>';
|
||||
print '<!-- Task id = '.$lines[$i]->id.' -->';
|
||||
print '<!-- Task id = '.$lines[$i]->id.' (projectlinesperaction) -->';
|
||||
for ($k = 0; $k < $level; $k++) {
|
||||
print " ";
|
||||
print '<div class="marginleftonly">';
|
||||
}
|
||||
print $taskstatic->getNomUrl(1, 'withproject', 'time');
|
||||
// Label task
|
||||
print '<br>';
|
||||
print '<div class="opacitymedium tdoverflowmax500" title="'.dol_escape_htmltag($taskstatic->label).'">'.dol_escape_htmltag($taskstatic->label).'</div>';
|
||||
for ($k = 0; $k < $level; $k++) {
|
||||
print " ";
|
||||
print "</div>";
|
||||
}
|
||||
print $taskstatic->label;
|
||||
//print "<br>";
|
||||
//for ($k = 0 ; $k < $level ; $k++) print " ";
|
||||
//print get_date_range($lines[$i]->date_start,$lines[$i]->date_end,'',$langs,0);
|
||||
print "</td>\n";
|
||||
|
||||
// Date
|
||||
|
|
@ -1583,14 +1580,14 @@ function projectLinesPerDay(&$inc, $parent, $fuser, $lines, &$level, &$projectsr
|
|||
|
||||
// Ref
|
||||
print '<td>';
|
||||
print '<!-- Task id = '.$lines[$i]->id.' -->';
|
||||
print '<!-- Task id = '.$lines[$i]->id.' (projectlinesperday) -->';
|
||||
for ($k = 0; $k < $level; $k++) {
|
||||
print '<div class="marginleftonly">';
|
||||
}
|
||||
print $taskstatic->getNomUrl(1, 'withproject', 'time');
|
||||
// Label task
|
||||
print '<br>';
|
||||
print '<span class="opacitymedium">'.$taskstatic->label.'</a>';
|
||||
print '<div class="opacitymedium tdoverflowmax500" title="'.dol_escape_htmltag($taskstatic->label).'">'.dol_escape_htmltag($taskstatic->label).'</div>';
|
||||
for ($k = 0; $k < $level; $k++) {
|
||||
print "</div>";
|
||||
}
|
||||
|
|
@ -1981,15 +1978,15 @@ function projectLinesPerWeek(&$inc, $firstdaytoshow, $fuser, $parent, $lines, &$
|
|||
}
|
||||
|
||||
// Ref
|
||||
print '<td class="nowrap">';
|
||||
print '<!-- Task id = '.$lines[$i]->id.' -->';
|
||||
print '<td class="tdoverflowmax300">';
|
||||
print '<!-- Task id = '.$lines[$i]->id.' (projectlinesperweek) -->';
|
||||
for ($k = 0; $k < $level; $k++) {
|
||||
print '<div class="marginleftonly">';
|
||||
}
|
||||
print $taskstatic->getNomUrl(1, 'withproject', 'time');
|
||||
// Label task
|
||||
print '<br>';
|
||||
print '<span class="opacitymedium">'.$taskstatic->label.'</span>';
|
||||
print '<div class="opacitymedium tdoverflowmax500" title="'.dol_escape_htmltag($taskstatic->label).'">'.dol_escape_htmltag($taskstatic->label).'</div>';
|
||||
for ($k = 0; $k < $level; $k++) {
|
||||
print "</div>";
|
||||
}
|
||||
|
|
@ -2023,7 +2020,7 @@ function projectLinesPerWeek(&$inc, $firstdaytoshow, $fuser, $parent, $lines, &$
|
|||
print '<td class="right">';
|
||||
// $lines[$i]->duration_effective is a denormalised field = summ of time spent by everybody for task. What we need is time consumed by user
|
||||
if ($lines[$i]->duration_effective) {
|
||||
print '<a href="'.DOL_URL_ROOT.'/projet/tasks/time.php?id='.$lines[$i]->id.'">';
|
||||
print '<a href="'.DOL_URL_ROOT.'/projet/tasks/time.php?id='.((int) $lines[$i]->id).'">';
|
||||
print convertSecondToTime($lines[$i]->duration_effective, 'allhourmin');
|
||||
print '</a>';
|
||||
} else {
|
||||
|
|
@ -2035,7 +2032,9 @@ function projectLinesPerWeek(&$inc, $firstdaytoshow, $fuser, $parent, $lines, &$
|
|||
print '<td class="right">';
|
||||
$tmptimespent = $taskstatic->getSummaryOfTimeSpent($fuser->id);
|
||||
if ($tmptimespent['total_duration']) {
|
||||
print '<a href="'.DOL_URL_ROOT.'/projet/tasks/time.php?id='.((int) $lines[$i]->id).'&search_user='.((int) $fuser->id).'">';
|
||||
print convertSecondToTime($tmptimespent['total_duration'], 'allhourmin');
|
||||
print '</a>';
|
||||
} else {
|
||||
print '--:--';
|
||||
}
|
||||
|
|
@ -2286,14 +2285,14 @@ function projectLinesPerMonth(&$inc, $firstdaytoshow, $fuser, $parent, $lines, &
|
|||
|
||||
// Ref
|
||||
print '<td class="nowrap">';
|
||||
print '<!-- Task id = '.$lines[$i]->id.' -->';
|
||||
print '<!-- Task id = '.$lines[$i]->id.' (projectlinespermonth) -->';
|
||||
for ($k = 0; $k < $level; $k++) {
|
||||
print '<div class="marginleftonly">';
|
||||
}
|
||||
print $taskstatic->getNomUrl(1, 'withproject', 'time');
|
||||
// Label task
|
||||
print '<br>';
|
||||
print '<span class="opacitymedium">'.$taskstatic->label.'</span>';
|
||||
print '<div class="opacitymedium tdoverflowmax500" title="'.dol_escape_htmltag($taskstatic->label).'">'.dol_escape_htmltag($taskstatic->label).'</div>';
|
||||
for ($k = 0; $k < $level; $k++) {
|
||||
print "</div>";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -429,7 +429,7 @@ insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, left
|
|||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', 'isModEnabled("project") && !getDolGlobalInt("PROJECT_HIDE_TASK")', __HANDLER__, 'left', 3702__+MAX_llx_menu__, 'project', '', 3700__+MAX_llx_menu__, '/projet/tasks/list.php?mainmenu=project&leftmenu=projects', 'List', 1, 'projects', '$user->hasRight("projet","lire")', '', 2, 2, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', 'isModEnabled("project") && !getDolGlobalInt("PROJECT_HIDE_TASK")', __HANDLER__, 'left', 3704__+MAX_llx_menu__, 'project', '', 3700__+MAX_llx_menu__, '/projet/tasks/stats/index.php?mainmenu=project&leftmenu=projects', 'Statistics', 1, 'projects', '$user->hasRight("projet","lire")', '', 2, 4, __ENTITY__);
|
||||
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', 'isModEnabled("project") && !getDolGlobalInt("PROJECT_HIDE_TASK")', __HANDLER__, 'left', 3400__+MAX_llx_menu__, 'project', '', 7__+MAX_llx_menu__, '/projet/activity/perweek.php?mainmenu=project&leftmenu=projects', 'NewTimeSpent', 0, 'projects', '$user->hasRight("projet","lire")', '', 2, 3, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', 'isModEnabled("project") && !getDolGlobalInt("PROJECT_HIDE_TASK")', __HANDLER__, 'left', 3400__+MAX_llx_menu__, 'project', '', 7__+MAX_llx_menu__, '/projet/activity/perweek.php?mainmenu=project&leftmenu=projects', 'TimeEntry', 0, 'projects', '$user->hasRight("projet","lire")', '', 2, 3, __ENTITY__);
|
||||
|
||||
-- Project - Categories
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', 'isModEnabled("categorie")', __HANDLER__, 'left', 3804__+MAX_llx_menu__, 'project', 'cat', 7__+MAX_llx_menu__, '/categories/index.php?mainmenu=project&leftmenu=cat&type=6', 'Categories', 0, 'categories', '$user->hasRight("categorie","lire")', '', 2, 4, __ENTITY__);
|
||||
|
|
|
|||
|
|
@ -2273,13 +2273,13 @@ function get_left_menu_projects($mainmenu, &$newmenu, $usemenuhider = 1, $leftme
|
|||
}
|
||||
|
||||
if (empty($conf->global->PROJECT_HIDE_TASKS)) {
|
||||
// Project affected to user
|
||||
// Project assigned to user
|
||||
$newmenu->add("/projet/activity/index.php?leftmenu=tasks".($search_project_user ? '&search_project_user='.$search_project_user : ''), $langs->trans("Activities"), 0, $user->hasRight('projet', 'lire'), '', 'project', 'tasks', 0, '', '', '', img_picto('', 'projecttask', 'class="paddingright pictofixedwidth"'));
|
||||
$newmenu->add("/projet/tasks.php?leftmenu=tasks&action=create", $langs->trans("NewTask"), 1, $user->hasRight('projet', 'creer'));
|
||||
$newmenu->add("/projet/tasks/list.php?leftmenu=tasks".($search_project_user ? '&search_project_user='.$search_project_user : ''), $langs->trans("List"), 1, $user->hasRight('projet', 'lire'));
|
||||
$newmenu->add("/projet/tasks/stats/index.php?leftmenu=projects", $langs->trans("Statistics"), 1, $user->hasRight('projet', 'lire'));
|
||||
|
||||
$newmenu->add("/projet/activity/perweek.php?leftmenu=tasks".($search_project_user ? '&search_project_user='.$search_project_user : ''), $langs->trans("NewTimeSpent"), 0, $user->hasRight('projet', 'lire'), '', 'project', 'timespent', 0, '', '', '', img_picto('', 'timespent', 'class="paddingright pictofixedwidth"'));
|
||||
$newmenu->add("/projet/activity/perweek.php?leftmenu=tasks".($search_project_user ? '&search_project_user='.$search_project_user : ''), $langs->trans("TimeEntry"), 0, $user->hasRight('projet', 'lire'), '', 'project', 'timespent', 0, '', '', '', img_picto('', 'timespent', 'class="paddingright pictofixedwidth"'));
|
||||
$newmenu->add("/projet/tasks/time.php?leftmenu=tasks".($search_project_user ? '&search_project_user='.$search_project_user : ''), $langs->trans("List"), 1, $user->hasRight('projet', 'lire'));
|
||||
}
|
||||
}
|
||||
|
|
@ -2387,7 +2387,7 @@ function get_left_menu_hrm($mainmenu, &$newmenu, $usemenuhider = 1, $leftmenu =
|
|||
|
||||
$search_project_user = GETPOST('search_project_user', 'int');
|
||||
|
||||
$newmenu->add("/projet/activity/perweek.php?leftmenu=tasks".($search_project_user ? '&search_project_user='.$search_project_user : ''), $langs->trans("NewTimeSpent"), 0, $user->hasRight('projet', 'lire'), '', $mainmenu, 'timespent', 0, '', '', '', img_picto('', 'timespent', 'class="paddingright pictofixedwidth"'));
|
||||
$newmenu->add("/projet/activity/perweek.php?leftmenu=tasks".($search_project_user ? '&search_project_user='.$search_project_user : ''), $langs->trans("TimeEntry"), 0, $user->hasRight('projet', 'lire'), '', $mainmenu, 'timespent', 0, '', '', '', img_picto('', 'timespent', 'class="paddingright pictofixedwidth"'));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2139,6 +2139,7 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it
|
|||
global $langs, $conf;
|
||||
|
||||
$err = 0;
|
||||
$name = '';
|
||||
|
||||
if (isset($this->dirs) && is_array($this->dirs)) {
|
||||
foreach ($this->dirs as $key => $value) {
|
||||
|
|
|
|||
|
|
@ -116,7 +116,7 @@ class ImportXlsx extends ModeleImports
|
|||
if (!class_exists('ZipArchive')) { // For Excel2007
|
||||
$langs->load("errors");
|
||||
$this->error = $langs->trans('ErrorPHPNeedModule', 'zip');
|
||||
return -1;
|
||||
return;
|
||||
}
|
||||
$this->label_lib = 'PhpSpreadSheet';
|
||||
$this->version_lib = '1.8.0';
|
||||
|
|
|
|||
|
|
@ -337,9 +337,9 @@ class modTakePos extends DolibarrModules
|
|||
$searchaccountid = $cashaccount->create($user);
|
||||
}
|
||||
if ($searchaccountid > 0) {
|
||||
dolibarr_set_const($db, "CASHDESK_ID_BANKACCOUNT_CASH1", $result, 'chaine', 0, '', $conf->entity);
|
||||
dolibarr_set_const($db, "CASHDESK_ID_BANKACCOUNT_CASH1", $searchaccountid, 'chaine', 0, '', $conf->entity);
|
||||
} else {
|
||||
setEventMessages($societe->error, $category->errors, 'errors');
|
||||
setEventMessages($cashaccount->error, $cashaccount->errors, 'errors');
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/commonnumrefgenerator.class.php';
|
|||
|
||||
|
||||
/**
|
||||
* Parent class for projects models
|
||||
* Parent class for task models
|
||||
*/
|
||||
abstract class ModelePDFTask extends CommonDocGenerator
|
||||
{
|
||||
|
|
@ -58,7 +58,7 @@ abstract class ModelePDFTask extends CommonDocGenerator
|
|||
|
||||
|
||||
/**
|
||||
* Classe mere des modeles de numerotation des references de projets
|
||||
* Parent class of task reference numbering models
|
||||
*/
|
||||
abstract class ModeleNumRefTask extends CommonNumRefGenerator
|
||||
{
|
||||
|
|
|
|||
|
|
@ -2698,7 +2698,7 @@ class ExpenseReport extends CommonObject
|
|||
//Clean
|
||||
$qty = price2num($qty);
|
||||
|
||||
$sql = " SELECT r.range_ik, t.ikoffset as ikoffset, t.coef";
|
||||
$sql = " SELECT r.range_ik, t.ikoffset, t.coef";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."expensereport_ik t";
|
||||
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_exp_tax_range r ON r.rowid = t.fk_range";
|
||||
$sql .= " WHERE t.fk_c_exp_tax_cat = ".(int) $fk_cat;
|
||||
|
|
@ -2725,6 +2725,7 @@ class ExpenseReport extends CommonObject
|
|||
$obj = $this->db->fetch_object($resql);
|
||||
$cumulYearQty = $obj->cumul;
|
||||
}
|
||||
|
||||
$qty = $cumulYearQty + $qty;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ require_once DOL_DOCUMENT_ROOT . '/fourn/class/paiementfourn.class.php';
|
|||
/**
|
||||
* API class for supplier invoices
|
||||
*
|
||||
* @property DoliDB db
|
||||
* @property DoliDB $db
|
||||
* @access protected
|
||||
* @class DolibarrApiAccess {@requires user,external}
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -1,37 +0,0 @@
|
|||
-- ========================================================================
|
||||
-- Copyright (C) 2000-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
-- Copyright (C) 2005-2013 Houssin Regis <regis.houssin@inodbox.com>
|
||||
--
|
||||
-- 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
|
||||
-- the Free Software Foundation; either version 3 of the License, or
|
||||
-- (at your option) any later version.
|
||||
--
|
||||
-- This program is distributed in the hope that it will be useful,
|
||||
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
-- GNU General Public License for more details.
|
||||
--
|
||||
-- You should have received a copy of the GNU General Public License
|
||||
-- along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
--
|
||||
-- ========================================================================
|
||||
|
||||
create table llx_societe_address
|
||||
(
|
||||
rowid integer AUTO_INCREMENT PRIMARY KEY,
|
||||
datec datetime, -- creation date
|
||||
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, -- last modification date
|
||||
label varchar(30), --
|
||||
fk_soc integer DEFAULT 0, --
|
||||
name varchar(60), -- company name
|
||||
address varchar(255), -- company adresse
|
||||
zip varchar(10), -- zipcode
|
||||
town varchar(50), -- town
|
||||
fk_pays integer DEFAULT 0, --
|
||||
phone varchar(20), -- phone number
|
||||
fax varchar(20), -- fax number
|
||||
note text, --
|
||||
fk_user_creat integer,
|
||||
fk_user_modif integer
|
||||
)ENGINE=innodb;
|
||||
|
|
@ -17,7 +17,7 @@
|
|||
-- ========================================================================
|
||||
|
||||
-- This table contains the contacts by default of a thirdparty
|
||||
-- Such contacts will be added to document automatiall if their role match the one expected by the document.
|
||||
-- Such contacts will be added to document automatically if their role match the one expected by the document.
|
||||
|
||||
create table llx_societe_contacts
|
||||
(
|
||||
|
|
|
|||
|
|
@ -161,7 +161,6 @@ CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_propaldet_extrafield
|
|||
CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_resource FOR EACH ROW EXECUTE PROCEDURE update_modified_column_tms();
|
||||
CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_salary FOR EACH ROW EXECUTE PROCEDURE update_modified_column_tms();
|
||||
CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_societe FOR EACH ROW EXECUTE PROCEDURE update_modified_column_tms();
|
||||
CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_societe_address FOR EACH ROW EXECUTE PROCEDURE update_modified_column_tms();
|
||||
CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_societe_extrafields FOR EACH ROW EXECUTE PROCEDURE update_modified_column_tms();
|
||||
CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_societe_prices FOR EACH ROW EXECUTE PROCEDURE update_modified_column_tms();
|
||||
CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_societe_remise FOR EACH ROW EXECUTE PROCEDURE update_modified_column_tms();
|
||||
|
|
|
|||
|
|
@ -366,6 +366,11 @@ if ($action == "set" || empty($action) || preg_match('/upgrade/i', $action)) {
|
|||
dol_print_error($db, 'Error in setup program');
|
||||
}
|
||||
|
||||
// May fail if parameter already defined
|
||||
dolibarr_install_syslog('step5: set the default language');
|
||||
$resql = $db->query("INSERT INTO ".MAIN_DB_PREFIX."const(name,value,type,visible,note,entity) VALUES (".$db->encrypt('MAIN_LANG_DEFAULT').", ".$db->encrypt($setuplang).", 'chaine', 0, 'Default language', 1)");
|
||||
//if (! $resql) dol_print_error($db,'Error in setup program');
|
||||
|
||||
$db->commit();
|
||||
}
|
||||
} else {
|
||||
|
|
@ -414,11 +419,6 @@ if ($action == "set" || empty($action) || preg_match('/upgrade/i', $action)) {
|
|||
dol_print_error($db, 'Error in setup program');
|
||||
}
|
||||
}
|
||||
|
||||
// May fail if parameter already defined
|
||||
dolibarr_install_syslog('step5: set the default language');
|
||||
$resql = $db->query("INSERT INTO ".MAIN_DB_PREFIX."const(name,value,type,visible,note,entity) VALUES (".$db->encrypt('MAIN_LANG_DEFAULT').", ".$db->encrypt($setuplang).", 'chaine', 0, 'Default language', 1)");
|
||||
//if (! $resql) dol_print_error($db,'Error in setup program');
|
||||
} else {
|
||||
print $langs->trans("ErrorFailedToConnect")."<br>";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2426,6 +2426,6 @@ ExtrafieldsDeleted=Extrafields %s has been deleted
|
|||
LargeModern=Large - Modern
|
||||
SpecialCharActivation=Enable the button to open a virtual keyboard to enter special characters
|
||||
DeleteExtrafield=Delete extrafield
|
||||
ConfirmDeleteExtrafield=Confirm delete %s extrafield ? All data is going to be lost
|
||||
ConfirmDeleteExtrafield=Do you confirm deletion of the field %s ? All data aved into this field will be definitely deleted
|
||||
ExtraFieldsSupplierInvoicesRec=Complementary attributes (templates invoices)
|
||||
ExtraFieldsSupplierInvoicesLinesRec=Complementary attributes (invoice lines)
|
||||
|
|
|
|||
|
|
@ -1082,6 +1082,7 @@ CommentPage=Comments space
|
|||
CommentAdded=Comment added
|
||||
CommentDeleted=Comment deleted
|
||||
Everybody=Everybody
|
||||
EverybodySmall=Everybody
|
||||
PayedBy=Paid by
|
||||
PayedTo=Paid to
|
||||
Monthly=Monthly
|
||||
|
|
|
|||
|
|
@ -128,5 +128,10 @@ Manufacturing=Manufacturing
|
|||
Disassemble=Disassemble
|
||||
ProducedBy=Produced by
|
||||
QtyTot=Qty Total
|
||||
|
||||
QtyCantBeSplit= Quantity cannot be split
|
||||
NoRemainQtyToDispatch=No quantity remaining to divide
|
||||
|
||||
THMOperatorEstimatedHelp=Estimated cost of operator per hour. Will be used to estimate cost of a BOM using this workstation.
|
||||
THMMachineEstimatedHelp=Estimated cost of machine per hour. Will be used to estimate cost of a BOM using this workstation.
|
||||
THMMachineEstimatedHelp=Estimated cost of machine per hour. Will be used to estimate cost of a BOM using this workstation.
|
||||
|
||||
|
|
|
|||
|
|
@ -81,7 +81,7 @@ PurchasedAmount=Purchased amount
|
|||
NewPrice=New price
|
||||
MinPrice=Min. selling price
|
||||
MinPriceHT=Min. selling price (excl. tax)
|
||||
MinPriceTTC=Prix de vente min (inc. tax)
|
||||
MinPriceTTC=Min. selling price (inc. tax)
|
||||
EditSellingPriceLabel=Edit selling price label
|
||||
CantBeLessThanMinPrice=The selling price can't be lower than minimum allowed for this product (%s without tax). This message can also appear if you type a significant discount.
|
||||
CantBeLessThanMinPriceInclTax=The selling price can't be lower than minimum allowed for this product (%s including taxes). This message can also appears if you type a too important discount.
|
||||
|
|
|
|||
|
|
@ -45,6 +45,7 @@ OutOfProject=Out of project
|
|||
NoProject=No project defined or owned
|
||||
NbOfProjects=Number of projects
|
||||
NbOfTasks=Number of tasks
|
||||
TimeEntry=Time tracking
|
||||
TimeSpent=Time spent
|
||||
TimeSpentByYou=Time spent by you
|
||||
TimeSpentByUser=Time spent by user
|
||||
|
|
|
|||
|
|
@ -127,4 +127,4 @@ BOMServicesList=Les services de BOM
|
|||
Manufacturing=Fabrication
|
||||
Disassemble=Déassemblage
|
||||
ProducedBy=Produit par
|
||||
QtyTot=Qté totale
|
||||
QtyTot=Qté totale
|
||||
|
|
@ -32,7 +32,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/commonobject.class.php';
|
|||
require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/geturl.lib.php';
|
||||
|
||||
/**
|
||||
* Class to manage mailman and spip
|
||||
|
|
|
|||
|
|
@ -1460,6 +1460,28 @@ if (!function_exists("llxHeader")) {
|
|||
{
|
||||
global $conf, $hookmanager;
|
||||
|
||||
$parameters = array(
|
||||
'head' =>& $head,
|
||||
'title' =>& $title,
|
||||
'help_url' =>& $help_url,
|
||||
'target' =>& $target,
|
||||
'disablej' =>& $disablej,
|
||||
'disablehea' =>& $disablehea,
|
||||
'arrayofjs' =>& $arrayofjs,
|
||||
'arrayofcss' =>& $arrayofcss,
|
||||
'morequerystring' =>& $morequerystring,
|
||||
'morecssonbody' =>& $morecssonbody,
|
||||
'replacemainareaby' =>& $replacemainareaby,
|
||||
'disablenofollow' =>& $disablenofollow,
|
||||
'disablenoindex' =>& $disablenoindex
|
||||
|
||||
);
|
||||
$reshook = $hookmanager->executeHooks('llxHeader', $parameters);
|
||||
if ($reshook > 0) {
|
||||
print $hookmanager->resPrint;
|
||||
return;
|
||||
}
|
||||
|
||||
// html header
|
||||
top_htmlhead($head, $title, $disablejs, $disablehead, $arrayofjs, $arrayofcss, 0, $disablenofollow, $disablenoindex);
|
||||
|
||||
|
|
@ -1478,12 +1500,6 @@ if (!function_exists("llxHeader")) {
|
|||
|
||||
print '<body id="mainbody" class="'.$tmpcsstouse.'">'."\n";
|
||||
|
||||
$parameters = array('help_url' => $help_url);
|
||||
$reshook = $hookmanager->executeHooks('changeHelpURL', $parameters);
|
||||
if ($reshook > 0) {
|
||||
$help_url = $hookmanager->resPrint;
|
||||
}
|
||||
|
||||
// top menu and left menu area
|
||||
if ((empty($conf->dol_hide_topmenu) || GETPOST('dol_invisible_topmenu', 'int')) && !GETPOST('dol_openinpopup', 'aZ09')) {
|
||||
top_menu($head, $title, $target, $disablejs, $disablehead, $arrayofjs, $arrayofcss, $morequerystring, $help_url);
|
||||
|
|
|
|||
|
|
@ -22,10 +22,13 @@ For more information, see the [translator's documentation](https://wiki.dolibarr
|
|||
There is a [Transifex project](https://transifex.com/projects/p/dolibarr-module-template) for this module.
|
||||
-->
|
||||
|
||||
<!--
|
||||
|
||||
## Installation
|
||||
|
||||
Prerequisites: You must have the Dolibarr ERP CRM software installed. You can down it from [Dolistore.org](https://www.dolibarr.org).
|
||||
You can also get a ready to use instance in the cloud from htts://saas.dolibarr.org
|
||||
|
||||
|
||||
### From the ZIP file and GUI interface
|
||||
|
||||
If the module is a ready to deploy zip file, so with a name module_xxx-version.zip (like when downloading it from a market place like [Dolistore](https://www.dolistore.com)),
|
||||
|
|
@ -33,6 +36,8 @@ go into menu ```Home - Setup - Modules - Deploy external module``` and upload th
|
|||
|
||||
Note: If this screen tell you that there is no "custom" directory, check that your setup is correct:
|
||||
|
||||
<!--
|
||||
|
||||
- In your Dolibarr installation directory, edit the ```htdocs/conf/conf.php``` file and check that following lines are not commented:
|
||||
|
||||
```php
|
||||
|
|
@ -55,6 +60,9 @@ Note: If this screen tell you that there is no "custom" directory, check that yo
|
|||
$dolibarr_main_url_root_alt = '/custom';
|
||||
$dolibarr_main_document_root_alt = 'C:/My Web Sites/Dolibarr/htdocs/custom';
|
||||
```
|
||||
-->
|
||||
|
||||
<!--
|
||||
|
||||
### From a GIT repository
|
||||
|
||||
|
|
@ -65,7 +73,9 @@ cd ....../custom
|
|||
git clone git@github.com:gitlogin/mymodule.git mymodule
|
||||
```
|
||||
|
||||
### <a name="final_steps"></a>Final steps
|
||||
-->
|
||||
|
||||
### Final steps
|
||||
|
||||
From your browser:
|
||||
|
||||
|
|
@ -73,7 +83,7 @@ From your browser:
|
|||
- Go to "Setup" -> "Modules"
|
||||
- You should now be able to find and enable the module
|
||||
|
||||
-->
|
||||
|
||||
|
||||
## Licenses
|
||||
|
||||
|
|
|
|||
|
|
@ -91,39 +91,40 @@ if (!class_exists('FormSetup')) {
|
|||
$formSetup = new FormSetup($db);
|
||||
|
||||
|
||||
// HTTP HOST
|
||||
$item = $formSetup->newItem('NO_PARAM_JUST_TEXT');
|
||||
// Enter here all parameters in your setup page
|
||||
|
||||
// Setup conf for selection of an URL
|
||||
$item = $formSetup->newItem('MYMODULE_MYPARAM1');
|
||||
$item->fieldOverride = (empty($_SERVER['HTTPS']) ? 'http://' : 'https://') . $_SERVER['HTTP_HOST'];
|
||||
$item->cssClass = 'minwidth500';
|
||||
|
||||
// Setup conf MYMODULE_MYPARAM1 as a simple string input
|
||||
$item = $formSetup->newItem('MYMODULE_MYPARAM1');
|
||||
// Setup conf for selection of a simple string input
|
||||
$item = $formSetup->newItem('MYMODULE_MYPARAM2');
|
||||
$item->defaultFieldValue = 'default value';
|
||||
|
||||
// Setup conf MYMODULE_MYPARAM2 as a simple textarea input but we replace the text of field title
|
||||
$item = $formSetup->newItem('MYMODULE_MYPARAM2');
|
||||
// Setup conf for selection of a simple textarea input but we replace the text of field title
|
||||
$item = $formSetup->newItem('MYMODULE_MYPARAM3');
|
||||
$item->nameText = $item->getNameText().' more html text ';
|
||||
|
||||
// Setup conf MYMODULE_MYPARAM3
|
||||
$item = $formSetup->newItem('MYMODULE_MYPARAM3');
|
||||
// Setup conf for a selection of a thirdparty
|
||||
$item = $formSetup->newItem('MYMODULE_MYPARAM4');
|
||||
$item->setAsThirdpartyType();
|
||||
|
||||
// Setup conf MYMODULE_MYPARAM4 : exemple of quick define write style
|
||||
$formSetup->newItem('MYMODULE_MYPARAM4')->setAsYesNo();
|
||||
// Setup conf for a selection of a boolean
|
||||
$formSetup->newItem('MYMODULE_MYPARAM5')->setAsYesNo();
|
||||
|
||||
// Setup conf MYMODULE_MYPARAM5
|
||||
$formSetup->newItem('MYMODULE_MYPARAM5')->setAsEmailTemplate('thirdparty');
|
||||
// Setup conf for a selection of an email template of type thirdparty
|
||||
$formSetup->newItem('MYMODULE_MYPARAM6')->setAsEmailTemplate('thirdparty');
|
||||
|
||||
// Setup conf MYMODULE_MYPARAM6
|
||||
//$formSetup->newItem('MYMODULE_MYPARAM6')->setAsSecureKey();
|
||||
// Setup conf for a selection of a secured key
|
||||
//$formSetup->newItem('MYMODULE_MYPARAM7')->setAsSecureKey();
|
||||
|
||||
// Setup conf MYMODULE_MYPARAM7
|
||||
$formSetup->newItem('MYMODULE_MYPARAM7')->setAsProduct();
|
||||
// Setup conf for a selection of a product
|
||||
$formSetup->newItem('MYMODULE_MYPARAM8')->setAsProduct();
|
||||
|
||||
$formSetup->newItem('Title')->setAsTitle();
|
||||
// Add a title for a new section
|
||||
$formSetup->newItem('NewSection')->setAsTitle();
|
||||
|
||||
// Setup conf MYMODULE_MYPARAM8
|
||||
$item = $formSetup->newItem('MYMODULE_MYPARAM8');
|
||||
$TField = array(
|
||||
'test01' => $langs->trans('test01'),
|
||||
'test02' => $langs->trans('test02'),
|
||||
|
|
@ -132,13 +133,16 @@ $TField = array(
|
|||
'test05' => $langs->trans('test05'),
|
||||
'test06' => $langs->trans('test06'),
|
||||
);
|
||||
$item->setAsMultiSelect($TField);
|
||||
$item->helpText = $langs->transnoentities('MYMODULE_MYPARAM8');
|
||||
|
||||
|
||||
// Setup conf MYMODULE_MYPARAM9
|
||||
// Setup conf for a simple combo list
|
||||
$formSetup->newItem('MYMODULE_MYPARAM9')->setAsSelect($TField);
|
||||
|
||||
// Setup conf for a multiselect combo list
|
||||
$item = $formSetup->newItem('MYMODULE_MYPARAM10');
|
||||
$item->setAsMultiSelect($TField);
|
||||
$item->helpText = $langs->transnoentities('MYMODULE_MYPARAM10');
|
||||
|
||||
|
||||
|
||||
// Setup conf MYMODULE_MYPARAM10
|
||||
$item = $formSetup->newItem('MYMODULE_MYPARAM10');
|
||||
|
|
|
|||
|
|
@ -47,6 +47,9 @@ session_cache_limiter('public');
|
|||
|
||||
require_once '../../main.inc.php';
|
||||
|
||||
// Load translation files required by the page
|
||||
$langs->loadLangs(array("mrp"));
|
||||
|
||||
// Define javascript type
|
||||
top_httphead('text/javascript; charset=UTF-8');
|
||||
// Important: Following code is to avoid page request by browser and PHP CPU at each Dolibarr page access.
|
||||
|
|
@ -153,10 +156,12 @@ function addDispatchLine(index, type, mode)
|
|||
*/
|
||||
function addDispatchTR(qtyOrdered, qtyDispatched, index, nbrTrs, warehouseId, inputId, type, qty, mode, $row) {
|
||||
if (qtyOrdered <= 1) {
|
||||
window.alert("Quantity can't be split");
|
||||
let errormsg = '<?php echo dol_escape_js($langs->trans('QtyCantBeSplit')); ?>';
|
||||
$.jnotify(errormsg, 'error', true);
|
||||
return -1;
|
||||
} else if (qtyDispatched >= qtyOrdered) {
|
||||
window.alert("No remain qty to dispatch");
|
||||
let errormsg = '<?php echo dol_escape_js($langs->trans('NoRemainQtyToDispatch')); ?>;
|
||||
$.jnotify(errormsg, 'error', true);
|
||||
return -1;
|
||||
} else if (qtyDispatched < qtyOrdered) {
|
||||
//replace tr suffix nbr
|
||||
|
|
|
|||
|
|
@ -577,6 +577,6 @@ class PropalmergepdfproductLine
|
|||
*/
|
||||
public function __construct()
|
||||
{
|
||||
return 1;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -814,6 +814,11 @@ if ($search_finished) {
|
|||
// Add $param from extra fields
|
||||
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php';
|
||||
|
||||
// Add $param from hooks
|
||||
$parameters = array();
|
||||
$reshook = $hookmanager->executeHooks('printFieldListSearchParam', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
|
||||
$param .= $hookmanager->resPrint;
|
||||
|
||||
// List of mass actions available
|
||||
$arrayofmassactions = array(
|
||||
'generate_doc'=>img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("ReGeneratePDF"),
|
||||
|
|
|
|||
|
|
@ -153,7 +153,7 @@ class StockTransferLine extends CommonObjectLine
|
|||
// Translate some data of arrayofkeyval
|
||||
if (is_object($langs)) {
|
||||
foreach ($this->fields as $key => $val) {
|
||||
if (is_array($val['arrayofkeyval'])) {
|
||||
if (isset($val['arrayofkeyval']) && is_array($val['arrayofkeyval'])) {
|
||||
foreach ($val['arrayofkeyval'] as $key2 => $val2) {
|
||||
$this->fields[$key]['arrayofkeyval'][$key2] = $langs->trans($val2);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -195,7 +195,7 @@ if (empty($reshook)) {
|
|||
$line->pmp = $prod->pmp;
|
||||
if ($line->id > 0) $line->update($user);
|
||||
else {
|
||||
$line->rang = count($object->lines) + 1;
|
||||
$line->rang = (is_array($object->lines) || $object->lines instanceof Countable) ? count($object->lines) + 1 : 1;
|
||||
$line->create($user);
|
||||
}
|
||||
$object->fetchLines();
|
||||
|
|
|
|||
|
|
@ -609,7 +609,7 @@ if (!empty($arrayfields['timeconsumed']['checked'])) {
|
|||
print '<th class="right maxwidth100">'.$langs->trans("TimeSpent").'<br>';
|
||||
print '<span class="nowraponall">';
|
||||
print '<span class="opacitymedium nopadding userimg"><img alt="Photo" class="photouserphoto userphoto" src="'.DOL_URL_ROOT.'/theme/common/everybody.png"></span>';
|
||||
print '<span class="opacitymedium paddingleft">'.$langs->trans("Everybody").'</span>';
|
||||
print '<span class="opacitymedium paddingleft">'.$langs->trans("EverybodySmall").'</span>';
|
||||
print '</span>';
|
||||
print '</th>';
|
||||
print '<th class="right maxwidth75 maxwidth100">'.$langs->trans("TimeSpent").($usertoprocess->firstname ? '<br><span class="nowraponall">'.$usertoprocess->getNomUrl(-2).'<span class="opacitymedium paddingleft">'.dol_trunc($usertoprocess->firstname, 10).'</span></span>' : '').'</th>';
|
||||
|
|
|
|||
|
|
@ -491,7 +491,7 @@ print '<td align="right" class="maxwidth75">'.$langs->trans("ProgressDeclared").
|
|||
print '<td class="right maxwidth100">'.$langs->trans("TimeSpent").'<br>';
|
||||
print '<span class="nowraponall">';
|
||||
print '<span class="opacitymedium nopadding userimg"><img alt="Photo" class="photouserphoto userphoto" src="'.DOL_URL_ROOT.'/theme/common/everybody.png"></span>';
|
||||
print '<span class="opacitymedium paddingleft">'.$langs->trans("Everybody").'</span>';
|
||||
print '<span class="opacitymedium paddingleft">'.$langs->trans("EverybodySmall").'</span>';
|
||||
print '</span>';
|
||||
print '</td>';
|
||||
print '<td align="right" class="maxwidth75">'.$langs->trans("TimeSpent").($usertoprocess->firstname ? '<br><span class="nowraponall">'.$usertoprocess->getNomUrl(-2).'<span class="opacitymedium paddingleft">'.dol_trunc($usertoprocess->firstname, 10).'</span></span>' : '').'</td>';
|
||||
|
|
|
|||
|
|
@ -663,7 +663,7 @@ if (!empty($arrayfields['timeconsumed']['checked'])) {
|
|||
print '<span class="nowraponall">';
|
||||
print '<span class="opacitymedium nopadding userimg"><img alt="Photo" class="photouserphoto userphoto" src="'.DOL_URL_ROOT.'/theme/common/everybody.png"></span>';
|
||||
//print '<span class="nopadding userimg"><div class="valignmiddle userphoto inline-block center marginrightonlyshort">'.img_object('', 'user', 'class=""', 0, 0, $notooltip ? 0 : 1).'</div></span>';
|
||||
print '<span class="opacitymedium paddingleft">'.$langs->trans("Everybody").'</span>';
|
||||
print '<span class="opacitymedium paddingleft">'.$langs->trans("EverybodySmall").'</span>';
|
||||
print '</span>';
|
||||
print '</th>';
|
||||
print '<th class="right maxwidth75 maxwidth100">'.$langs->trans("TimeSpent").($usertoprocess->firstname ? '<br><span class="nowraponall">'.$usertoprocess->getNomUrl(-2).'<span class="opacitymedium paddingleft">'.dol_trunc($usertoprocess->firstname, 10).'</span></span>' : '').'</th>';
|
||||
|
|
|
|||
|
|
@ -104,7 +104,6 @@ class Societe extends CommonObject
|
|||
*/
|
||||
protected $childtablesoncascade = array(
|
||||
'societe_prices',
|
||||
'societe_address',
|
||||
'product_fournisseur_price',
|
||||
'product_customer_price_log',
|
||||
'product_customer_price',
|
||||
|
|
@ -5208,7 +5207,6 @@ class Societe extends CommonObject
|
|||
* Do not include llx_societe because it will be replaced later
|
||||
*/
|
||||
$tables = array(
|
||||
'societe_address',
|
||||
'societe_commerciaux',
|
||||
'societe_prices',
|
||||
'societe_remise',
|
||||
|
|
|
|||
|
|
@ -55,7 +55,6 @@ $pagenext = $page + 1;
|
|||
$optioncss = GETPOST('optioncss', 'alpha');
|
||||
$param = "";
|
||||
$num = 0;
|
||||
$totalnboflines = 0;
|
||||
|
||||
$result = restrictedArea($user, 'banque');
|
||||
|
||||
|
|
@ -85,6 +84,9 @@ $stripeacc = $stripe->getStripeAccount($service);
|
|||
print $langs->trans('ErrorStripeAccountNotDefined');
|
||||
}*/
|
||||
|
||||
$moreforfilter = '';
|
||||
$totalnboflines = -1;
|
||||
|
||||
if (!$rowid) {
|
||||
print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">';
|
||||
if ($optioncss != '') {
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@ $colortexttitle = '40, 40, 60';
|
|||
$colortexttitlelink = '10, 20, 100';
|
||||
$colortext = '0,0,0';
|
||||
$colortextlink = '10, 20, 100';
|
||||
$fontsize = '0.94em';
|
||||
$fontsize = '0.92em';
|
||||
$fontsizesmaller = '0.75em';
|
||||
$topMenuFontSize = '1.1em';
|
||||
$toolTipBgColor = 'rgba(255, 255, 255, 0.96)';
|
||||
|
|
|
|||
|
|
@ -419,11 +419,11 @@ class User extends CommonObject
|
|||
* @param string $sid If defined, sid to used for search
|
||||
* @param int $loadpersonalconf 1=also load personal conf of user (in $user->conf->xxx), 0=do not load personal conf.
|
||||
* @param int $entity If a value is >= 0, we force the search on a specific entity. If -1, means search depens on default setup.
|
||||
* @param int $email If defined, email to used for search
|
||||
* @param string $email If defined, email to used for search
|
||||
* @param int $fk_socpeople If defined, id of contact for search
|
||||
* @return int <0 if KO, 0 not found, >0 if OK
|
||||
*/
|
||||
public function fetch($id = '', $login = '', $sid = '', $loadpersonalconf = 0, $entity = -1, $email = '', $fk_socpeople = 0)
|
||||
public function fetch($id = 0, $login = '', $sid = '', $loadpersonalconf = 0, $entity = -1, $email = '', $fk_socpeople = 0)
|
||||
{
|
||||
global $conf, $user;
|
||||
|
||||
|
|
|
|||
|
|
@ -163,7 +163,7 @@ class UserGroup extends CommonObject
|
|||
* @param boolean $load_members Load all members of the group
|
||||
* @return int <0 if KO, >0 if OK
|
||||
*/
|
||||
public function fetch($id = '', $groupname = '', $load_members = false)
|
||||
public function fetch($id = 0, $groupname = '', $load_members = false)
|
||||
{
|
||||
global $conf;
|
||||
|
||||
|
|
|
|||
|
|
@ -374,7 +374,7 @@ $server->register(
|
|||
* @param string $ref_ext Ref_ext
|
||||
* @return array Array result
|
||||
*/
|
||||
function getOrder($authentication, $id = '', $ref = '', $ref_ext = '')
|
||||
function getOrder($authentication, $id = 0, $ref = '', $ref_ext = '')
|
||||
{
|
||||
global $db, $conf;
|
||||
|
||||
|
|
@ -806,7 +806,7 @@ function createOrder($authentication, $order)
|
|||
* @param int $id_warehouse Id of warehouse to use for stock decrease
|
||||
* @return array Array result
|
||||
*/
|
||||
function validOrder($authentication, $id = '', $id_warehouse = 0)
|
||||
function validOrder($authentication, $id = 0, $id_warehouse = 0)
|
||||
{
|
||||
global $db, $conf, $langs;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue