Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into develop
Conflicts: htdocs/core/class/html.form.class.php htdocs/langs/en_US/loan.lang htdocs/theme/eldy/style.css.php htdocs/theme/md/style.css.php
This commit is contained in:
commit
4bf0e31299
@ -516,6 +516,7 @@ if ($mode == 'common')
|
|||||||
|
|
||||||
// Check filters
|
// Check filters
|
||||||
$modulename=$objMod->getName();
|
$modulename=$objMod->getName();
|
||||||
|
$moduletechnicalname=$objMod->name;
|
||||||
$moduledesc=$objMod->getDesc();
|
$moduledesc=$objMod->getDesc();
|
||||||
$moduledesclong=$objMod->getDescLong();
|
$moduledesclong=$objMod->getDescLong();
|
||||||
$moduleauthor=$objMod->getPublisher();
|
$moduleauthor=$objMod->getPublisher();
|
||||||
@ -525,6 +526,7 @@ if ($mode == 'common')
|
|||||||
{
|
{
|
||||||
$qualified=0;
|
$qualified=0;
|
||||||
if (preg_match('/'.preg_quote($search_keyword).'/i', $modulename)
|
if (preg_match('/'.preg_quote($search_keyword).'/i', $modulename)
|
||||||
|
|| preg_match('/'.preg_quote($search_keyword).'/i', $moduletechnicalname)
|
||||||
|| preg_match('/'.preg_quote($search_keyword).'/i', $moduledesc)
|
|| preg_match('/'.preg_quote($search_keyword).'/i', $moduledesc)
|
||||||
|| preg_match('/'.preg_quote($search_keyword).'/i', $moduledesclong)
|
|| preg_match('/'.preg_quote($search_keyword).'/i', $moduledesclong)
|
||||||
|| preg_match('/'.preg_quote($search_keyword).'/i', $moduleauthor)
|
|| preg_match('/'.preg_quote($search_keyword).'/i', $moduleauthor)
|
||||||
|
|||||||
@ -125,6 +125,8 @@ if ($socid > 0)
|
|||||||
|
|
||||||
print load_fiche_titre($langs->trans("NewRelativeDiscount"),'','');
|
print load_fiche_titre($langs->trans("NewRelativeDiscount"),'','');
|
||||||
|
|
||||||
|
print '<div class="underbanner clearboth"></div>';
|
||||||
|
|
||||||
print '<table class="border centpercent">';
|
print '<table class="border centpercent">';
|
||||||
|
|
||||||
// New value
|
// New value
|
||||||
|
|||||||
@ -1231,11 +1231,11 @@ abstract class CommonObject
|
|||||||
* @param int $id To force other object id (should not be used)
|
* @param int $id To force other object id (should not be used)
|
||||||
* @param string $format Data format ('text', 'date'). 'text' is used if not defined
|
* @param string $format Data format ('text', 'date'). 'text' is used if not defined
|
||||||
* @param string $id_field To force rowid field name. 'rowid' is used if not defined
|
* @param string $id_field To force rowid field name. 'rowid' is used if not defined
|
||||||
* @param User|string $user Update last update fields also if user object provided. If not provided, current user is used.
|
* @param User|string $fuser Update the user of last update field with this user. If not provided, current user is used except if value is 'none'
|
||||||
* @param string $trigkey Trigger key to run (in most cases something like 'XXX_MODIFY')
|
* @param string $trigkey Trigger key to run (in most cases something like 'XXX_MODIFY')
|
||||||
* @return int <0 if KO, >0 if OK
|
* @return int <0 if KO, >0 if OK
|
||||||
*/
|
*/
|
||||||
function setValueFrom($field, $value, $table='', $id=null, $format='', $id_field='', $user='', $trigkey='')
|
function setValueFrom($field, $value, $table='', $id=null, $format='', $id_field='', $fuser=null, $trigkey='')
|
||||||
{
|
{
|
||||||
global $user,$langs,$conf;
|
global $user,$langs,$conf;
|
||||||
|
|
||||||
@ -1255,7 +1255,8 @@ abstract class CommonObject
|
|||||||
if ($format == 'text') $sql.= $field." = '".$this->db->escape($value)."'";
|
if ($format == 'text') $sql.= $field." = '".$this->db->escape($value)."'";
|
||||||
else if ($format == 'int') $sql.= $field." = ".$this->db->escape($value);
|
else if ($format == 'int') $sql.= $field." = ".$this->db->escape($value);
|
||||||
else if ($format == 'date') $sql.= $field." = ".($value ? "'".$this->db->idate($value)."'" : "null");
|
else if ($format == 'date') $sql.= $field." = ".($value ? "'".$this->db->idate($value)."'" : "null");
|
||||||
if (empty($user) && is_object($user)) $sql.=", fk_user_modif = ".$user->id;
|
if (! empty($fuser) && is_object($fuser)) $sql.=", fk_user_modif = ".$fuser->id;
|
||||||
|
elseif (empty($fuser) || $fuser != 'none') $sql.=", fk_user_modif = ".$user->id;
|
||||||
$sql.= " WHERE ".$id_field." = ".$id;
|
$sql.= " WHERE ".$id_field." = ".$id;
|
||||||
|
|
||||||
dol_syslog(get_class($this)."::".__FUNCTION__."", LOG_DEBUG);
|
dol_syslog(get_class($this)."::".__FUNCTION__."", LOG_DEBUG);
|
||||||
@ -1264,7 +1265,7 @@ abstract class CommonObject
|
|||||||
{
|
{
|
||||||
if ($trigkey)
|
if ($trigkey)
|
||||||
{
|
{
|
||||||
$result=$this->call_trigger($trigkey, $user); // This may set this->errors
|
$result=$this->call_trigger($trigkey, (! empty($fuser) && is_object($fuser)) ? $fuser : $user); // This may set this->errors
|
||||||
if ($result < 0) $error++;
|
if ($result < 0) $error++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -5853,7 +5853,7 @@ class Form
|
|||||||
}
|
}
|
||||||
else if (in_array($object->element, array('action', 'agenda')))
|
else if (in_array($object->element, array('action', 'agenda')))
|
||||||
{
|
{
|
||||||
$ret.=$object->label;
|
$ret.=$object->ref.'<br>'.$object->label;
|
||||||
}
|
}
|
||||||
else if ($fieldref != 'none') $ret.=dol_htmlentities($object->$fieldref);
|
else if ($fieldref != 'none') $ret.=dol_htmlentities($object->$fieldref);
|
||||||
|
|
||||||
|
|||||||
@ -195,7 +195,7 @@ interface Database
|
|||||||
* Execute a SQL request and return the resultset
|
* Execute a SQL request and return the resultset
|
||||||
*
|
*
|
||||||
* @param string $query SQL query string
|
* @param string $query SQL query string
|
||||||
* @param int $usesavepoint 0=Default mode, 1=Run a savepoint before and a rollbock to savepoint if error (this allow to have some request with errors inside global transactions).
|
* @param int $usesavepoint 0=Default mode, 1=Run a savepoint before and a rollback to savepoint if error (this allow to have some request with errors inside global transactions).
|
||||||
* Note that with Mysql, this parameter is not used as Myssql can already commit a transaction even if one request is in error, without using savepoints.
|
* Note that with Mysql, this parameter is not used as Myssql can already commit a transaction even if one request is in error, without using savepoints.
|
||||||
* @param string $type Type of SQL order ('ddl' for insert, update, select, delete or 'dml' for create, alter...)
|
* @param string $type Type of SQL order ('ddl' for insert, update, select, delete or 'dml' for create, alter...)
|
||||||
* @return resource Resultset of answer
|
* @return resource Resultset of answer
|
||||||
|
|||||||
@ -531,6 +531,7 @@ function show_projects($conf, $langs, $db, $object, $backtopage='', $nocreatelin
|
|||||||
|
|
||||||
print "\n";
|
print "\n";
|
||||||
print load_fiche_titre($langs->trans("ProjectsDedicatedToThisThirdParty"),$buttoncreate,'');
|
print load_fiche_titre($langs->trans("ProjectsDedicatedToThisThirdParty"),$buttoncreate,'');
|
||||||
|
print '<div class="div-table-responsive">';
|
||||||
print "\n".'<table class="noborder" width=100%>';
|
print "\n".'<table class="noborder" width=100%>';
|
||||||
|
|
||||||
$sql = "SELECT p.rowid as id, p.title, p.ref, p.public, p.dateo as do, p.datee as de, p.fk_statut as status, p.fk_opp_status, p.opp_amount, p.opp_percent, p.tms as date_update, p.budget_amount";
|
$sql = "SELECT p.rowid as id, p.title, p.ref, p.public, p.dateo as do, p.datee as de, p.fk_statut as status, p.fk_opp_status, p.opp_amount, p.opp_percent, p.tms as date_update, p.budget_amount";
|
||||||
@ -620,7 +621,8 @@ function show_projects($conf, $langs, $db, $object, $backtopage='', $nocreatelin
|
|||||||
dol_print_error($db);
|
dol_print_error($db);
|
||||||
}
|
}
|
||||||
print "</table>";
|
print "</table>";
|
||||||
|
print '</div>';
|
||||||
|
|
||||||
print "<br>\n";
|
print "<br>\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -588,9 +588,9 @@ class ImportCsv extends ModeleImports
|
|||||||
{
|
{
|
||||||
$updatedone = false;
|
$updatedone = false;
|
||||||
$insertdone = false;
|
$insertdone = false;
|
||||||
if(!empty($updatekeys)) {
|
if (!empty($updatekeys)) {
|
||||||
// We do SELECT to get the rowid, if we already have the rowid, it's to be used below for related tables (extrafields)
|
// We do SELECT to get the rowid, if we already have the rowid, it's to be used below for related tables (extrafields)
|
||||||
if(empty($lastinsertid)) {
|
if (empty($lastinsertid)) {
|
||||||
$sqlSelect = 'SELECT rowid FROM '.$tablename;
|
$sqlSelect = 'SELECT rowid FROM '.$tablename;
|
||||||
|
|
||||||
$data = array_combine($listfields, $listvalues);
|
$data = array_combine($listfields, $listvalues);
|
||||||
@ -627,7 +627,7 @@ class ImportCsv extends ModeleImports
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!empty($lastinsertid)) {
|
if (!empty($lastinsertid)) {
|
||||||
// Build SQL UPDATE request
|
// Build SQL UPDATE request
|
||||||
$sqlstart = 'UPDATE '.$tablename;
|
$sqlstart = 'UPDATE '.$tablename;
|
||||||
|
|
||||||
@ -660,7 +660,7 @@ class ImportCsv extends ModeleImports
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Update not done, we do insert
|
// Update not done, we do insert
|
||||||
if(!$error && !$updatedone) {
|
if (!$error && !$updatedone) {
|
||||||
// Build SQL INSERT request
|
// Build SQL INSERT request
|
||||||
$sqlstart = 'INSERT INTO '.$tablename.'('.implode(', ', $listfields).', import_key';
|
$sqlstart = 'INSERT INTO '.$tablename.'('.implode(', ', $listfields).', import_key';
|
||||||
$sqlend = ') VALUES('.implode(', ', $listvalues).", '".$importid."'";
|
$sqlend = ') VALUES('.implode(', ', $listvalues).", '".$importid."'";
|
||||||
@ -679,10 +679,10 @@ class ImportCsv extends ModeleImports
|
|||||||
if ($sql)
|
if ($sql)
|
||||||
{
|
{
|
||||||
$resql=$this->db->query($sql);
|
$resql=$this->db->query($sql);
|
||||||
$last_insert_id_array[$tablename] = $this->db->last_insert_id($tablename); // store the last inserted auto_increment id for each table, so that dependent tables can be inserted with the appropriate id. This must be done just after the INSERT request, else we risk losing the id (because another sql query will be issued somewhere in Dolibarr).
|
|
||||||
if ($resql)
|
if ($resql)
|
||||||
{
|
{
|
||||||
$insertdone = true;
|
$last_insert_id_array[$tablename] = $this->db->last_insert_id($tablename); // store the last inserted auto_increment id for each table, so that child tables can be inserted with the appropriate id. This must be done just after the INSERT request, else we risk losing the id (because another sql query will be issued somewhere in Dolibarr).
|
||||||
|
$insertdone = true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@ -6,9 +6,9 @@ require_once(DOL_DOCUMENT_ROOT.'/resource/class/html.formresource.class.php');
|
|||||||
$form = new Form($db);
|
$form = new Form($db);
|
||||||
$formresources = new FormResource($db);
|
$formresources = new FormResource($db);
|
||||||
|
|
||||||
$out = '<div class="tagtable centpercent border allwidth nohover">';
|
$out = '<div class="tagtable centpercent noborder allwidth nohover">';
|
||||||
|
|
||||||
$out .= '<form class="tagtr '.($var==true?'pair':'impair').'" action="'.$_SERVER["PHP_SELF"].'" method="POST">';
|
$out .= '<form class="tagtr nohover '.($var==true?'pair':'impair').'" action="'.$_SERVER["PHP_SELF"].'" method="POST">';
|
||||||
$out .= '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
$out .= '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||||
$out .= '<input type="hidden" name="action" value="add_element_resource">';
|
$out .= '<input type="hidden" name="action" value="add_element_resource">';
|
||||||
$out .= '<input type="hidden" name="element" value="'.$element.'">';
|
$out .= '<input type="hidden" name="element" value="'.$element.'">';
|
||||||
|
|||||||
@ -44,6 +44,7 @@ GoToInterest=%s will go towards INTEREST
|
|||||||
GoToPrincipal=%s will go towards PRINCIPAL
|
GoToPrincipal=%s will go towards PRINCIPAL
|
||||||
YouWillSpend=You will spend %s in year %s
|
YouWillSpend=You will spend %s in year %s
|
||||||
ListLoanAssociatedProject=List of loan associated with the project
|
ListLoanAssociatedProject=List of loan associated with the project
|
||||||
|
AddLoan=Create loan
|
||||||
# Admin
|
# Admin
|
||||||
ConfigLoan=Configuration of the module loan
|
ConfigLoan=Configuration of the module loan
|
||||||
LOAN_ACCOUNTING_ACCOUNT_CAPITAL=Accounting account capital by default
|
LOAN_ACCOUNTING_ACCOUNT_CAPITAL=Accounting account capital by default
|
||||||
|
|||||||
@ -2556,11 +2556,12 @@ div.pagination li.paginationafterarrows {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* Set the color for hover lines */
|
/* Set the color for hover lines */
|
||||||
.oddeven:hover, .odd:hover, .impair:hover, .even:hover, .pair:hover, .even:hover, .pair:hover, table.dataTable tr.even:hover, table.dataTable tr.odd:hover
|
.oddeven:hover, .odd:hover, .impair:hover, .even:hover, .pair:hover, .even:hover, .pair:hover, table.dataTable tr.even:hover, table.dataTable tr.odd:hover
|
||||||
{
|
{
|
||||||
<?php if ($colorbacklinepairhover) { ?>
|
<?php if ($colorbacklinepairhover) { ?>
|
||||||
background: rgb(<?php echo $colorbacklinepairhover; ?>) !important;
|
background-color: rgb(<?php echo $colorbacklinepairhover; ?>) !important;
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2575,7 +2576,7 @@ div.pagination li.paginationafterarrows {
|
|||||||
background: #<?php echo colorArrayToHex(colorStringToArray($colorbacklineimpair1)); ?>;
|
background: #<?php echo colorArrayToHex(colorStringToArray($colorbacklineimpair1)); ?>;
|
||||||
}
|
}
|
||||||
#GanttChartDIV {
|
#GanttChartDIV {
|
||||||
background: #<?php echo colorArrayToHex(colorStringToArray($colorbacklineimpair1)); ?>;
|
background-color: #<?php echo colorArrayToHex(colorStringToArray($colorbacklineimpair1)); ?>;
|
||||||
}
|
}
|
||||||
|
|
||||||
.oddeven, .even, .pair, .nohover .even:hover, .nohover .pair:hover, tr.even td.nohover, tr.pair td.nohover {
|
.oddeven, .even, .pair, .nohover .even:hover, .nohover .pair:hover, tr.even td.nohover, tr.pair td.nohover {
|
||||||
@ -2592,7 +2593,7 @@ table.dataTable tr.odd, table.dataTable tr.oddeven {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* For no hover style */
|
/* For no hover style */
|
||||||
td.oddeven, table.nohover tr.impair, table.nohover tr.pair, table.nohover tr.impair td, table.nohover tr.pair td, tr.nohover td {
|
td.oddeven, table.nohover tr.impair, table.nohover tr.pair, table.nohover tr.impair td, table.nohover tr.pair td, tr.nohover td, form.nohover, form.nohover:hover {
|
||||||
background-color: #<?php echo colorArrayToHex(colorStringToArray($colorbacklineimpair1)); ?> !important;
|
background-color: #<?php echo colorArrayToHex(colorStringToArray($colorbacklineimpair1)); ?> !important;
|
||||||
background: #<?php echo colorArrayToHex(colorStringToArray($colorbacklineimpair1)); ?> !important;
|
background: #<?php echo colorArrayToHex(colorStringToArray($colorbacklineimpair1)); ?> !important;
|
||||||
}
|
}
|
||||||
@ -2601,6 +2602,7 @@ tr.nohoverpair td {
|
|||||||
background: #<?php echo colorArrayToHex(colorStringToArray($colorbacklinepair1)); ?> !important;
|
background: #<?php echo colorArrayToHex(colorStringToArray($colorbacklinepair1)); ?> !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
table.dataTable td {
|
table.dataTable td {
|
||||||
padding: 5px 2px 5px 3px !important;
|
padding: 5px 2px 5px 3px !important;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2514,7 +2514,7 @@ table.dataTable tr.odd, table.dataTable tr.oddeven {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* For no hover style */
|
/* For no hover style */
|
||||||
td.oddeven, table.nohover tr.impair, table.nohover tr.pair, table.nohover tr.impair td, table.nohover tr.pair td, tr.nohover td {
|
td.oddeven, table.nohover tr.impair, table.nohover tr.pair, table.nohover tr.impair td, table.nohover tr.pair td, tr.nohover td, form.nohover, form.nohover:hover {
|
||||||
background-color: #<?php echo colorArrayToHex(colorStringToArray($colorbacklineimpair1)); ?> !important;
|
background-color: #<?php echo colorArrayToHex(colorStringToArray($colorbacklineimpair1)); ?> !important;
|
||||||
background: #<?php echo colorArrayToHex(colorStringToArray($colorbacklineimpair1)); ?> !important;
|
background: #<?php echo colorArrayToHex(colorStringToArray($colorbacklineimpair1)); ?> !important;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user