commit
17baab87dd
@ -13,7 +13,7 @@ You can freely use, study, modify or distribute it according to its licence.
|
|||||||
|
|
||||||
You can use it as a standalone application or as a web application to access it from the Internet or a LAN.
|
You can use it as a standalone application or as a web application to access it from the Internet or a LAN.
|
||||||
|
|
||||||
Dolibarr has a large community ready to help you, free forums and [oficially preferred partners ready to offer commercial support should you need it](https://partners.dolibarr.org)
|
Dolibarr has a large community ready to help you, free forums and [officially preferred partners ready to offer commercial support should you need it](https://partners.dolibarr.org)
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
@ -45,7 +45,7 @@ On GNU/Linux, first check if your distribution has already packaged Dolibarr.
|
|||||||
|
|
||||||
#### Generic install steps:
|
#### Generic install steps:
|
||||||
|
|
||||||
- Check that your installed PHP version is supported [see PHP support](https://wiki.dolibarr.org/index.php/Versions).
|
- Check that your installed PHP version is supported [see PHP support](https://wiki.dolibarr.org/index.php/Releases).
|
||||||
|
|
||||||
- Uncompress the downloaded .zip archive to copy the "dolibarr/htdocs" directory and all its files inside your web server root or get the files directly from GitHub (recommanded if you know git as it makes it easier if you want to upgrade later):
|
- Uncompress the downloaded .zip archive to copy the "dolibarr/htdocs" directory and all its files inside your web server root or get the files directly from GitHub (recommanded if you know git as it makes it easier if you want to upgrade later):
|
||||||
|
|
||||||
@ -90,6 +90,7 @@ Dolibarr supports upgrading usually wihtout the need for any (commercial) suppor
|
|||||||
|
|
||||||
See the [ChangeLog](https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog) file.
|
See the [ChangeLog](https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog) file.
|
||||||
|
|
||||||
|
|
||||||
## FEATURES
|
## FEATURES
|
||||||
|
|
||||||
### Main application/modules (all optional)
|
### Main application/modules (all optional)
|
||||||
@ -162,8 +163,8 @@ See the [ChangeLog](https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog)
|
|||||||
|
|
||||||
### System Environment / Requirements
|
### System Environment / Requirements
|
||||||
|
|
||||||
- Works with PHP 5.5+ and MariaDB 5.0.3+, MySQL 5.0.3+ or PostgreSQL 8.1.4+ (See requirements on the [Wiki](https://wiki.dolibarr.org/index.php/Prerequisite))
|
- Works with PHP 5.6+ and MariaDB 5.0.3+, MySQL 5.0.3+ or PostgreSQL 8.1.4+ (See requirements on the [Wiki](https://wiki.dolibarr.org/index.php/Prerequisite))
|
||||||
- Compatible with all Cloud solutions that match MySQL, PHP or PostgreSQL prerequisites.
|
- Compatible with all Cloud solutions that match PHP & MySQL or PostgreSQL prerequisites.
|
||||||
|
|
||||||
### Extending
|
### Extending
|
||||||
|
|
||||||
|
|||||||
2
dev/resources/iso-normes/company_ids.txt
Normal file
2
dev/resources/iso-normes/company_ids.txt
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
Spain https://incwell.eu/en/company-formation-spain/
|
||||||
|
France https://www.economie.gouv.fr/entreprises/numeros-identification-entreprise
|
||||||
@ -460,7 +460,7 @@ class AccountingAccount extends CommonObject
|
|||||||
|
|
||||||
$result = '';
|
$result = '';
|
||||||
|
|
||||||
$url = '';
|
$url = ''; $labelurl = '';
|
||||||
if (empty($option) || $option == 'ledger') {
|
if (empty($option) || $option == 'ledger') {
|
||||||
$url = DOL_URL_ROOT.'/accountancy/bookkeeping/listbyaccount.php?search_accountancy_code_start='.urlencode($this->account_number).'&search_accountancy_code_end='.urlencode($this->account_number);
|
$url = DOL_URL_ROOT.'/accountancy/bookkeeping/listbyaccount.php?search_accountancy_code_start='.urlencode($this->account_number).'&search_accountancy_code_end='.urlencode($this->account_number);
|
||||||
$labelurl = $langs->trans("ShowAccountingAccountInLedger");
|
$labelurl = $langs->trans("ShowAccountingAccountInLedger");
|
||||||
@ -617,16 +617,13 @@ class AccountingAccount extends CommonObject
|
|||||||
// phpcs:enable
|
// phpcs:enable
|
||||||
$this->db->begin();
|
$this->db->begin();
|
||||||
|
|
||||||
if ($mode == 0)
|
$fieldtouse = 'active';
|
||||||
{
|
if ($mode == 1) {
|
||||||
$fieldtouse = 'active';
|
|
||||||
} elseif ($mode == 1)
|
|
||||||
{
|
|
||||||
$fieldtouse = 'reconcilable';
|
$fieldtouse = 'reconcilable';
|
||||||
}
|
}
|
||||||
|
|
||||||
$sql = "UPDATE ".MAIN_DB_PREFIX."accounting_account ";
|
$sql = "UPDATE ".MAIN_DB_PREFIX."accounting_account";
|
||||||
$sql .= "SET ".$fieldtouse." = '1'";
|
$sql .= " SET ".$fieldtouse." = '1'";
|
||||||
$sql .= " WHERE rowid = ".$this->db->escape($id);
|
$sql .= " WHERE rowid = ".$this->db->escape($id);
|
||||||
|
|
||||||
dol_syslog(get_class($this)."::account_activate ".$fieldtouse." sql=".$sql, LOG_DEBUG);
|
dol_syslog(get_class($this)."::account_activate ".$fieldtouse." sql=".$sql, LOG_DEBUG);
|
||||||
|
|||||||
@ -384,7 +384,18 @@ class Subscription extends CommonObject
|
|||||||
$result = '';
|
$result = '';
|
||||||
|
|
||||||
$langs->load("members");
|
$langs->load("members");
|
||||||
$label = $langs->trans("ShowSubscription").': '.$this->ref;
|
|
||||||
|
$label = img_picto('', $this->picto).' <u class="paddingrightonly">'.$langs->trans("Subscription").'</u>';
|
||||||
|
/*if (isset($this->statut)) {
|
||||||
|
$label .= ' '.$this->getLibStatut(5);
|
||||||
|
}*/
|
||||||
|
$label .= '<br><b>'.$langs->trans('Ref').':</b> '.$this->ref;
|
||||||
|
if (!empty($this->dateh)) {
|
||||||
|
$label .= '<br><b>'.$langs->trans('DateStart').':</b> '.dol_print_date($this->dateh, 'day');
|
||||||
|
}
|
||||||
|
if (!empty($this->datef)) {
|
||||||
|
$label .= '<br><b>'.$langs->trans('DateEnd').':</b> '.dol_print_date($this->datef, 'day');
|
||||||
|
}
|
||||||
|
|
||||||
$url = DOL_URL_ROOT.'/adherents/subscription/card.php?rowid='.$this->id;
|
$url = DOL_URL_ROOT.'/adherents/subscription/card.php?rowid='.$this->id;
|
||||||
|
|
||||||
@ -398,8 +409,6 @@ class Subscription extends CommonObject
|
|||||||
$linkstart = '<a href="'.$url.'" class="classfortooltip" title="'.dol_escape_htmltag($label, 1).'">';
|
$linkstart = '<a href="'.$url.'" class="classfortooltip" title="'.dol_escape_htmltag($label, 1).'">';
|
||||||
$linkend = '</a>';
|
$linkend = '</a>';
|
||||||
|
|
||||||
$picto = 'payment';
|
|
||||||
|
|
||||||
$result .= $linkstart;
|
$result .= $linkstart;
|
||||||
if ($withpicto) $result .= img_object(($notooltip ? '' : $label), ($this->picto ? $this->picto : 'generic'), ($notooltip ? (($withpicto != 2) ? 'class="paddingright"' : '') : 'class="'.(($withpicto != 2) ? 'paddingright ' : '').'classfortooltip"'), 0, 0, $notooltip ? 0 : 1);
|
if ($withpicto) $result .= img_object(($notooltip ? '' : $label), ($this->picto ? $this->picto : 'generic'), ($notooltip ? (($withpicto != 2) ? 'class="paddingright"' : '') : 'class="'.(($withpicto != 2) ? 'paddingright ' : '').'classfortooltip"'), 0, 0, $notooltip ? 0 : 1);
|
||||||
if ($withpicto != 2) $result .= $this->ref;
|
if ($withpicto != 2) $result .= $this->ref;
|
||||||
|
|||||||
@ -181,8 +181,8 @@ if ($conf->use_javascript_ajax) {
|
|||||||
}
|
}
|
||||||
$total = $SommeA + $SommeB + $SommeC + $SommeD;
|
$total = $SommeA + $SommeB + $SommeC + $SommeD;
|
||||||
$dataseries = array();
|
$dataseries = array();
|
||||||
$dataseries[] = array($langs->transnoentitiesnoconv("MenuMembersNotUpToDate"), round($SommeB));
|
$dataseries[] = array($langs->transnoentitiesnoconv("OutOfDate"), round($SommeB));
|
||||||
$dataseries[] = array($langs->transnoentitiesnoconv("MenuMembersUpToDate"), round($SommeC));
|
$dataseries[] = array($langs->transnoentitiesnoconv("UpToDate"), round($SommeC));
|
||||||
$dataseries[] = array($langs->transnoentitiesnoconv("MembersStatusResiliated"), round($SommeD));
|
$dataseries[] = array($langs->transnoentitiesnoconv("MembersStatusResiliated"), round($SommeD));
|
||||||
$dataseries[] = array($langs->transnoentitiesnoconv("MembersStatusToValid"), round($SommeA));
|
$dataseries[] = array($langs->transnoentitiesnoconv("MembersStatusToValid"), round($SommeA));
|
||||||
|
|
||||||
@ -422,8 +422,8 @@ print '<table class="noborder centpercent">';
|
|||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print '<th>'.$langs->trans("MembersTypes").'</th>';
|
print '<th>'.$langs->trans("MembersTypes").'</th>';
|
||||||
print '<th class=right>'.$langs->trans("MembersStatusToValid").'</th>';
|
print '<th class=right>'.$langs->trans("MembersStatusToValid").'</th>';
|
||||||
print '<th class=right>'.$langs->trans("MenuMembersNotUpToDate").'</th>';
|
print '<th class=right>'.$langs->trans("OutOfDate").'</th>';
|
||||||
print '<th class=right>'.$langs->trans("MenuMembersUpToDate").'</th>';
|
print '<th class=right>'.$langs->trans("UpToDate").'</th>';
|
||||||
print '<th class=right>'.$langs->trans("MembersStatusResiliated").'</th>';
|
print '<th class=right>'.$langs->trans("MembersStatusResiliated").'</th>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
|
|||||||
@ -395,6 +395,8 @@ while ($i < min($num, $limit)) {
|
|||||||
|
|
||||||
$subscription->ref = $obj->crowid;
|
$subscription->ref = $obj->crowid;
|
||||||
$subscription->id = $obj->crowid;
|
$subscription->id = $obj->crowid;
|
||||||
|
$subscription->dateh = $db->jdate($obj->dateadh);
|
||||||
|
$subscription->datef = $db->jdate($obj->datef);
|
||||||
|
|
||||||
$adherent->lastname = $obj->lastname;
|
$adherent->lastname = $obj->lastname;
|
||||||
$adherent->firstname = $obj->firstname;
|
$adherent->firstname = $obj->firstname;
|
||||||
|
|||||||
@ -25,6 +25,7 @@ require '../main.inc.php';
|
|||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/agenda.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/agenda.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php';
|
||||||
|
require_once DOL_DOCUMENT_ROOT.'/cron/class/cronjob.class.php';
|
||||||
|
|
||||||
if (!$user->admin)
|
if (!$user->admin)
|
||||||
accessforbidden();
|
accessforbidden();
|
||||||
@ -179,53 +180,69 @@ print '<td class="center"> </td>'."\n";
|
|||||||
print '<td class="right">'.$langs->trans("Value").'</td>'."\n";
|
print '<td class="right">'.$langs->trans("Value").'</td>'."\n";
|
||||||
print '</tr>'."\n";
|
print '</tr>'."\n";
|
||||||
|
|
||||||
|
// AGENDA REMINDER BROWSER
|
||||||
|
print '<tr class="oddeven">'."\n";
|
||||||
|
print '<td>'.$langs->trans('AGENDA_REMINDER_BROWSER').'</td>'."\n";
|
||||||
|
print '<td class="center"> </td>'."\n";
|
||||||
|
print '<td class="right">'."\n";
|
||||||
|
|
||||||
|
if (empty($conf->global->AGENDA_REMINDER_BROWSER)) {
|
||||||
|
print '<a href="'.$_SERVER['PHP_SELF'].'?action=set_AGENDA_REMINDER_BROWSER&token='.newToken().'">'.img_picto($langs->trans('Disabled'), 'switch_off').'</a>';
|
||||||
|
print '</td></tr>'."\n";
|
||||||
|
} else {
|
||||||
|
print '<a href="'.$_SERVER['PHP_SELF'].'?action=del_AGENDA_REMINDER_BROWSER&token='.newToken().'">'.img_picto($langs->trans('Enabled'), 'switch_on').'</a>';
|
||||||
|
print '</td></tr>'."\n";
|
||||||
|
|
||||||
|
print '<tr class="oddeven">'."\n";
|
||||||
|
print '<td>'.$langs->trans('AGENDA_REMINDER_BROWSER_SOUND').'</td>'."\n";
|
||||||
|
print '<td class="center"> </td>'."\n";
|
||||||
|
print '<td class="right">'."\n";
|
||||||
|
|
||||||
|
if (empty($conf->global->AGENDA_REMINDER_BROWSER_SOUND)) {
|
||||||
|
print '<a href="'.$_SERVER['PHP_SELF'].'?action=set_AGENDA_REMINDER_BROWSER_SOUND&token='.newToken().'">'.img_picto($langs->trans('Disabled'), 'switch_off').'</a>';
|
||||||
|
} else {
|
||||||
|
print '<a href="'.$_SERVER['PHP_SELF'].'?action=del_AGENDA_REMINDER_BROWSER_SOUND&token='.newToken().'">'.img_picto($langs->trans('Enabled'), 'switch_on').'</a>';
|
||||||
|
}
|
||||||
|
|
||||||
|
print '</td></tr>'."\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
$job = new Cronjob($db);
|
||||||
|
$job->fetch(0, 'ActionComm', 'sendEmailsReminder');
|
||||||
|
|
||||||
// AGENDA REMINDER EMAIL
|
// AGENDA REMINDER EMAIL
|
||||||
if ($conf->global->MAIN_FEATURES_LEVEL == 2)
|
print '<tr class="oddeven">'."\n";
|
||||||
{
|
print '<td>'.$langs->trans('AGENDA_REMINDER_EMAIL', $langs->transnoentities("Module2300Name"));
|
||||||
print '<tr class="oddeven">'."\n";
|
if (!empty($conf->cron->enabled)) {
|
||||||
print '<td>'.$langs->trans('AGENDA_REMINDER_EMAIL', $langs->transnoentities("Module2300Name")).'</td>'."\n";
|
if (!empty($conf->global->AGENDA_REMINDER_EMAIL)) {
|
||||||
print '<td class="center"> </td>'."\n";
|
if ($job->id > 0) {
|
||||||
print '<td class="right">'."\n";
|
if ($job->status == $job::STATUS_ENABLED) {
|
||||||
|
print '<br><span class="opacitymedium">'.$langs->trans("AGENDA_REMINDER_EMAIL_NOTE", $langs->transnoentitiesnoconv("sendEmailsReminder")).'</span>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
print '</td>'."\n";
|
||||||
|
print '<td class="center"> </td>'."\n";
|
||||||
|
print '<td class="right">'."\n";
|
||||||
|
|
||||||
|
if (empty($conf->cron->enabled)) {
|
||||||
|
print '<span class="opacitymedium">'.$langs->trans("WarningModuleNotActive", $langs->transnoentitiesnoconv("Module2300Name")).'</span>';
|
||||||
|
} else {
|
||||||
if (empty($conf->global->AGENDA_REMINDER_EMAIL)) {
|
if (empty($conf->global->AGENDA_REMINDER_EMAIL)) {
|
||||||
print '<a href="'.$_SERVER['PHP_SELF'].'?action=set_AGENDA_REMINDER_EMAIL&token='.newToken().'">'.img_picto($langs->trans('Disabled'), 'switch_off').'</a>';
|
print '<a href="'.$_SERVER['PHP_SELF'].'?action=set_AGENDA_REMINDER_EMAIL&token='.newToken().'">'.img_picto($langs->trans('Disabled'), 'switch_off').'</a>';
|
||||||
print '</td></tr>'."\n";
|
|
||||||
} else {
|
} else {
|
||||||
print '<a href="'.$_SERVER['PHP_SELF'].'?action=del_AGENDA_REMINDER_EMAIL&token='.newToken().'">'.img_picto($langs->trans('Enabled'), 'switch_on').'</a>';
|
// Get the max frequency of reminder
|
||||||
print '</td></tr>'."\n";
|
if ($job->id > 0) {
|
||||||
}
|
if ($job->status != $job::STATUS_ENABLED) {
|
||||||
}
|
print '<span class="opacitymedium warning">'.$langs->trans("JobXMustBeEnabled", $langs->transnoentitiesnoconv("sendEmailsReminder")).'</span>';
|
||||||
|
} else {
|
||||||
// AGENDA REMINDER BROWSER
|
print '<a href="'.$_SERVER['PHP_SELF'].'?action=del_AGENDA_REMINDER_EMAIL&token='.newToken().'">'.img_picto($langs->trans('Enabled'), 'switch_on').'</a>';
|
||||||
if ($conf->global->MAIN_FEATURES_LEVEL == 2)
|
}
|
||||||
{
|
|
||||||
print '<tr class="oddeven">'."\n";
|
|
||||||
print '<td>'.$langs->trans('AGENDA_REMINDER_BROWSER').'</td>'."\n";
|
|
||||||
print '<td class="center"> </td>'."\n";
|
|
||||||
print '<td class="right">'."\n";
|
|
||||||
|
|
||||||
if (empty($conf->global->AGENDA_REMINDER_BROWSER)) {
|
|
||||||
print '<a href="'.$_SERVER['PHP_SELF'].'?action=set_AGENDA_REMINDER_BROWSER&token='.newToken().'">'.img_picto($langs->trans('Disabled'), 'switch_off').'</a>';
|
|
||||||
print '</td></tr>'."\n";
|
|
||||||
} else {
|
|
||||||
print '<a href="'.$_SERVER['PHP_SELF'].'?action=del_AGENDA_REMINDER_BROWSER&token='.newToken().'">'.img_picto($langs->trans('Enabled'), 'switch_on').'</a>';
|
|
||||||
print '</td></tr>'."\n";
|
|
||||||
|
|
||||||
print '<tr class="oddeven">'."\n";
|
|
||||||
print '<td>'.$langs->trans('AGENDA_REMINDER_BROWSER_SOUND').'</td>'."\n";
|
|
||||||
print '<td class="center"> </td>'."\n";
|
|
||||||
print '<td class="right">'."\n";
|
|
||||||
|
|
||||||
if (empty($conf->global->AGENDA_REMINDER_BROWSER_SOUND)) {
|
|
||||||
print '<a href="'.$_SERVER['PHP_SELF'].'?action=set_AGENDA_REMINDER_BROWSER_SOUND&token='.newToken().'">'.img_picto($langs->trans('Disabled'), 'switch_off').'</a>';
|
|
||||||
} else {
|
|
||||||
print '<a href="'.$_SERVER['PHP_SELF'].'?action=del_AGENDA_REMINDER_BROWSER_SOUND&token='.newToken().'">'.img_picto($langs->trans('Enabled'), 'switch_on').'</a>';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
print '</td></tr>'."\n";
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
print '</td></tr>'."\n";
|
||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
|
||||||
|
|||||||
@ -243,7 +243,6 @@ clearstatcache();
|
|||||||
print '<br>';
|
print '<br>';
|
||||||
print '<table summary="edit" class="noborder centpercent editmode">';
|
print '<table summary="edit" class="noborder centpercent editmode">';
|
||||||
print '<tr class="liste_titre"><th>'.$langs->trans("Language").'</th><th></th>';
|
print '<tr class="liste_titre"><th>'.$langs->trans("Language").'</th><th></th>';
|
||||||
print '<th width="20"> </td>';
|
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
// Default language
|
// Default language
|
||||||
@ -251,14 +250,12 @@ print '<tr class="oddeven"><td class="titlefield">'.$langs->trans("DefaultLangua
|
|||||||
print $formadmin->select_language($conf->global->MAIN_LANG_DEFAULT, 'MAIN_LANG_DEFAULT', 1, null, '', 0, 0, 'minwidth300', 2);
|
print $formadmin->select_language($conf->global->MAIN_LANG_DEFAULT, 'MAIN_LANG_DEFAULT', 1, null, '', 0, 0, 'minwidth300', 2);
|
||||||
print '<input class="button button-save" type="submit" name="submit" value="'.$langs->trans("Save").'">';
|
print '<input class="button button-save" type="submit" name="submit" value="'.$langs->trans("Save").'">';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td width="20"> </td>';
|
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
// Multilingual GUI
|
// Multilingual GUI
|
||||||
print '<tr class="oddeven"><td class="titlefield">'.$langs->trans("EnableMultilangInterface").'</td><td>';
|
print '<tr class="oddeven"><td class="titlefield">'.$langs->trans("EnableMultilangInterface").'</td><td>';
|
||||||
print ajax_constantonoff("MAIN_MULTILANGS", array(), $conf->entity, 0, 0, 1, 0);
|
print ajax_constantonoff("MAIN_MULTILANGS", array(), $conf->entity, 0, 0, 1, 0);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td width="20"> </td>';
|
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
print '</table><br>'."\n";
|
print '</table><br>'."\n";
|
||||||
|
|||||||
@ -512,7 +512,7 @@ if ($mode == 'common' || $mode == 'commonkanban')
|
|||||||
$moreforfilter .= $langs->trans('Keyword').': <input type="text" id="search_keyword" name="search_keyword" class="maxwidth100" value="'.dol_escape_htmltag($search_keyword).'">';
|
$moreforfilter .= $langs->trans('Keyword').': <input type="text" id="search_keyword" name="search_keyword" class="maxwidth100" value="'.dol_escape_htmltag($search_keyword).'">';
|
||||||
$moreforfilter .= '</div>';
|
$moreforfilter .= '</div>';
|
||||||
$moreforfilter .= '<div class="divsearchfield paddingtop">';
|
$moreforfilter .= '<div class="divsearchfield paddingtop">';
|
||||||
$moreforfilter .= $langs->trans('Origin').': '.$form->selectarray('search_nature', $arrayofnatures, dol_escape_htmltag($search_nature), 1, 0, 0, '', 0, 0, 0, '', 'maxwidth100');
|
$moreforfilter .= $langs->trans('Origin').': '.$form->selectarray('search_nature', $arrayofnatures, dol_escape_htmltag($search_nature), 1, 0, 0, '', 0, 0, 0, '', 'maxwidth200', 1);
|
||||||
$moreforfilter .= '</div>';
|
$moreforfilter .= '</div>';
|
||||||
if (!empty($conf->global->MAIN_FEATURES_LEVEL))
|
if (!empty($conf->global->MAIN_FEATURES_LEVEL))
|
||||||
{
|
{
|
||||||
@ -521,17 +521,17 @@ if ($mode == 'common' || $mode == 'commonkanban')
|
|||||||
if ($conf->global->MAIN_FEATURES_LEVEL > 0) $array_version['experimental'] = $langs->trans("Experimental");
|
if ($conf->global->MAIN_FEATURES_LEVEL > 0) $array_version['experimental'] = $langs->trans("Experimental");
|
||||||
if ($conf->global->MAIN_FEATURES_LEVEL > 1) $array_version['development'] = $langs->trans("Development");
|
if ($conf->global->MAIN_FEATURES_LEVEL > 1) $array_version['development'] = $langs->trans("Development");
|
||||||
$moreforfilter .= '<div class="divsearchfield paddingtop">';
|
$moreforfilter .= '<div class="divsearchfield paddingtop">';
|
||||||
$moreforfilter .= $langs->trans('Version').': '.$form->selectarray('search_version', $array_version, $search_version, 1, 0, 0, '', 0, 0, 0, '', 'maxwidth100');
|
$moreforfilter .= $langs->trans('Version').': '.$form->selectarray('search_version', $array_version, $search_version, 1, 0, 0, '', 0, 0, 0, '', 'maxwidth150', 1);
|
||||||
$moreforfilter .= '</div>';
|
$moreforfilter .= '</div>';
|
||||||
}
|
}
|
||||||
$moreforfilter .= '<div class="divsearchfield paddingtop">';
|
$moreforfilter .= '<div class="divsearchfield paddingtop">';
|
||||||
$moreforfilter .= $langs->trans('Status').': '.$form->selectarray('search_status', array('active'=>$langs->transnoentitiesnoconv("Enabled"), 'disabled'=>$langs->transnoentitiesnoconv("Disabled")), $search_status, 1, 0, 0, '', 0, 0, 0, '', 'maxwidth100');
|
$moreforfilter .= $langs->trans('Status').': '.$form->selectarray('search_status', array('active'=>$langs->transnoentitiesnoconv("Enabled"), 'disabled'=>$langs->transnoentitiesnoconv("Disabled")), $search_status, 1, 0, 0, '', 0, 0, 0, '', 'maxwidth150', 1);
|
||||||
$moreforfilter .= '</div>';
|
$moreforfilter .= '</div>';
|
||||||
$moreforfilter .= ' ';
|
$moreforfilter .= ' ';
|
||||||
$moreforfilter .= '<div class="divsearchfield">';
|
$moreforfilter .= '<div class="divsearchfield">';
|
||||||
$moreforfilter .= '<input type="submit" name="buttonsubmit" class="button" value="'.dol_escape_htmltag($langs->trans("Refresh")).'">';
|
$moreforfilter .= '<input type="submit" name="buttonsubmit" class="button" value="'.dol_escape_htmltag($langs->trans("Refresh")).'">';
|
||||||
$moreforfilter .= ' ';
|
$moreforfilter .= ' ';
|
||||||
$moreforfilter .= '<input type="submit" name="buttonreset" class="button" value="'.dol_escape_htmltag($langs->trans("Reset")).'">';
|
$moreforfilter .= '<input type="submit" name="buttonreset" class="butActionDelete noborderbottom" value="'.dol_escape_htmltag($langs->trans("Reset")).'">';
|
||||||
$moreforfilter .= '</div>';
|
$moreforfilter .= '</div>';
|
||||||
$moreforfilter .= '</div>';
|
$moreforfilter .= '</div>';
|
||||||
|
|
||||||
|
|||||||
@ -225,7 +225,7 @@ print '<tr class="oddeven"><td>'.$langs->trans("CurrentTimeZone").'</td><td>'; /
|
|||||||
$a = getServerTimeZoneInt('now');
|
$a = getServerTimeZoneInt('now');
|
||||||
$b = getServerTimeZoneInt('winter');
|
$b = getServerTimeZoneInt('winter');
|
||||||
$c = getServerTimeZoneInt('summer');
|
$c = getServerTimeZoneInt('summer');
|
||||||
$daylight = (is_numeric($c) && is_numeric($b)) ?round($c - $b) : 'unknown';
|
$daylight = round($c - $b);
|
||||||
//print $a." ".$b." ".$c." ".$daylight;
|
//print $a." ".$b." ".$c." ".$daylight;
|
||||||
$val = ($a >= 0 ? '+' : '').$a;
|
$val = ($a >= 0 ? '+' : '').$a;
|
||||||
$val .= ' ('.($a == 'unknown' ? 'unknown' : ($a >= 0 ? '+' : '').($a * 3600)).')';
|
$val .= ' ('.($a == 'unknown' ? 'unknown' : ($a >= 0 ? '+' : '').($a * 3600)).')';
|
||||||
|
|||||||
@ -209,12 +209,9 @@ if (empty($conf->global->MAIN_ENABLE_OVERWRITE_TRANSLATION))
|
|||||||
|
|
||||||
print load_fiche_titre($langs->trans("Translation"), $enabledisablehtml, 'title_setup');
|
print load_fiche_titre($langs->trans("Translation"), $enabledisablehtml, 'title_setup');
|
||||||
|
|
||||||
//print '<span class="opacitymedium">'.$langs->trans("TranslationDesc")."</span><br>\n";
|
|
||||||
//print "<br>\n";
|
|
||||||
|
|
||||||
$current_language_code = $langs->defaultlang;
|
$current_language_code = $langs->defaultlang;
|
||||||
$s = picto_from_langcode($current_language_code);
|
$s = picto_from_langcode($current_language_code);
|
||||||
print '<span class="opacitymedium">'.$form->textwithpicto($langs->trans("CurrentUserLanguage").': <strong>'.$s.' '.$current_language_code.'</strong>', $langs->trans("TranslationDesc")).'</span><br>';
|
print $form->textwithpicto('<span class="opacitymedium">'.$langs->trans("CurrentUserLanguage").':</span> <strong>'.$s.' '.$current_language_code.'</strong>', $langs->trans("TranslationDesc")).'</span><br>';
|
||||||
|
|
||||||
print '<br>';
|
print '<br>';
|
||||||
|
|
||||||
|
|||||||
@ -117,8 +117,8 @@ $reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action
|
|||||||
if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
|
if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
|
||||||
|
|
||||||
$TRemindTypes = array();
|
$TRemindTypes = array();
|
||||||
if (!empty($conf->global->AGENDA_REMINDER_EMAIL)) $TRemindTypes['email'] = $langs->trans('EMail');
|
if (!empty($conf->global->AGENDA_REMINDER_BROWSER)) $TRemindTypes['browser'] = array('label'=>$langs->trans('BrowserPush'), 'disabled'=>(empty($conf->global->AGENDA_REMINDER_BROWSER) ? 1 : 0));
|
||||||
if (!empty($conf->global->AGENDA_REMINDER_BROWSER)) $TRemindTypes['browser'] = $langs->trans('BrowserPush');
|
if (!empty($conf->global->AGENDA_REMINDER_EMAIL)) $TRemindTypes['email'] = array('label'=>$langs->trans('EMail'), 'disabled'=>(empty($conf->global->AGENDA_REMINDER_EMAIL) ? 1 : 0));
|
||||||
|
|
||||||
$TDurationTypes = array('y'=>$langs->trans('Years'), 'm'=>$langs->trans('Month'), 'w'=>$langs->trans('Weeks'), 'd'=>$langs->trans('Days'), 'h'=>$langs->trans('Hours'), 'i'=>$langs->trans('Minutes'));
|
$TDurationTypes = array('y'=>$langs->trans('Years'), 'm'=>$langs->trans('Month'), 'w'=>$langs->trans('Weeks'), 'd'=>$langs->trans('Days'), 'h'=>$langs->trans('Hours'), 'i'=>$langs->trans('Minutes'));
|
||||||
|
|
||||||
@ -503,7 +503,6 @@ if (empty($reshook) && $action == 'update')
|
|||||||
$object->note_private = trim(GETPOST("note", "restricthtml"));
|
$object->note_private = trim(GETPOST("note", "restricthtml"));
|
||||||
$object->fk_element = GETPOST("fk_element", "int");
|
$object->fk_element = GETPOST("fk_element", "int");
|
||||||
$object->elementtype = GETPOST("elementtype", "alphanohtml");
|
$object->elementtype = GETPOST("elementtype", "alphanohtml");
|
||||||
|
|
||||||
if (!$datef && $percentage == 100)
|
if (!$datef && $percentage == 100)
|
||||||
{
|
{
|
||||||
$error++; $donotclearsession = 1;
|
$error++; $donotclearsession = 1;
|
||||||
@ -1247,12 +1246,7 @@ if ($action == 'create')
|
|||||||
|
|
||||||
//Reminder
|
//Reminder
|
||||||
print '<tr><td class="titlefieldcreate nowrap">'.$langs->trans("ReminderTime").'</td><td colspan="3">';
|
print '<tr><td class="titlefieldcreate nowrap">'.$langs->trans("ReminderTime").'</td><td colspan="3">';
|
||||||
print '<input type="number" name="offsetvalue" value="10" size="5">';
|
print '<input class="width50" type="number" name="offsetvalue" value="'.(GETPOSTISSET('offsetvalue') ? GETPOST('offsetvalue', 'int') : '15').'"> '.$form->selectTypeDuration('offsetunit', 'i');
|
||||||
print '</td></tr>';
|
|
||||||
|
|
||||||
//Time Type
|
|
||||||
print '<tr><td class="titlefieldcreate nowrap">'.$langs->trans("TimeType").'</td><td colspan="3">';
|
|
||||||
print $form->selectTypeDuration('offsetunit', 'i');
|
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
//Reminder Type
|
//Reminder Type
|
||||||
@ -1731,20 +1725,13 @@ if ($id > 0)
|
|||||||
|
|
||||||
print '<table class="border centpercent">';
|
print '<table class="border centpercent">';
|
||||||
|
|
||||||
//Reminder
|
// Reminder
|
||||||
print '<tr><td class="titlefieldcreate nowrap">'.$langs->trans("ReminderTime").'</td><td colspan="3">';
|
print '<tr><td class="titlefieldcreate nowrap">'.$langs->trans("ReminderTime").'</td><td colspan="3">';
|
||||||
print '<input type="number" name="offsetvalue" value="'.$actionCommReminder->offsetvalue.'" size="5">';
|
print '<input type="number" name="offsetvalue" class="width50" value="'.$actionCommReminder->offsetvalue.'"> '.$form->selectTypeDuration('offsetunit', $actionCommReminder->offsetunit);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
//Time Type
|
// Reminder Type
|
||||||
print '<tr><td class="titlefieldcreate nowrap">'.$langs->trans("TimeType").'</td><td colspan="3">';
|
|
||||||
print $form->selectTypeDuration('offsetunit', $actionCommReminder->offsetunit);
|
|
||||||
print '</td></tr>';
|
|
||||||
|
|
||||||
//Reminder Type
|
|
||||||
$TRemindTypes = array();
|
$TRemindTypes = array();
|
||||||
if (!empty($conf->global->AGENDA_REMINDER_EMAIL)) $TRemindTypes['email'] = $langs->trans('EMail');
|
|
||||||
if (!empty($conf->global->AGENDA_REMINDER_BROWSER)) $TRemindTypes['browser'] = $langs->trans('BrowserPush');
|
|
||||||
print '<tr><td class="titlefieldcreate nowrap">'.$langs->trans("ReminderType").'</td><td colspan="3">';
|
print '<tr><td class="titlefieldcreate nowrap">'.$langs->trans("ReminderType").'</td><td colspan="3">';
|
||||||
print $form->selectarray('selectremindertype', $TRemindTypes, $actionCommReminder->typeremind);
|
print $form->selectarray('selectremindertype', $TRemindTypes, $actionCommReminder->typeremind);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
@ -1752,7 +1739,7 @@ if ($id > 0)
|
|||||||
$hide = '';
|
$hide = '';
|
||||||
if ($actionCommReminder->typeremind == 'browser') $hide = 'style="display:none;"';
|
if ($actionCommReminder->typeremind == 'browser') $hide = 'style="display:none;"';
|
||||||
|
|
||||||
//Mail Model
|
// Mail Model
|
||||||
print '<tr '.$hide.'><td class="titlefieldcreate nowrap">'.$langs->trans("EMailTemplates").'</td><td colspan="3">';
|
print '<tr '.$hide.'><td class="titlefieldcreate nowrap">'.$langs->trans("EMailTemplates").'</td><td colspan="3">';
|
||||||
print $form->selectModelMail('actioncommsend', 'actioncomm_send', 1);
|
print $form->selectModelMail('actioncommsend', 'actioncomm_send', 1);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|||||||
@ -1000,7 +1000,7 @@ class ActionComm extends CommonObject
|
|||||||
|
|
||||||
// Clean parameters
|
// Clean parameters
|
||||||
$this->label = trim($this->label);
|
$this->label = trim($this->label);
|
||||||
$this->note_private = dol_htmlcleanlastbr(trim(empty($this->note_private) ? $this->note : $this->note_private));
|
$this->note_private = dol_htmlcleanlastbr(trim(!isset($this->note_private) ? $this->note : $this->note_private));
|
||||||
if (empty($this->percentage)) $this->percentage = 0;
|
if (empty($this->percentage)) $this->percentage = 0;
|
||||||
if (empty($this->priority) || !is_numeric($this->priority)) $this->priority = 0;
|
if (empty($this->priority) || !is_numeric($this->priority)) $this->priority = 0;
|
||||||
if (empty($this->transparency)) $this->transparency = 0;
|
if (empty($this->transparency)) $this->transparency = 0;
|
||||||
@ -1206,16 +1206,17 @@ class ActionComm extends CommonObject
|
|||||||
* Load indicators for dashboard (this->nbtodo and this->nbtodolate)
|
* Load indicators for dashboard (this->nbtodo and this->nbtodolate)
|
||||||
*
|
*
|
||||||
* @param User $user Objet user
|
* @param User $user Objet user
|
||||||
* @param int $load_state_board Charge indicateurs this->nb de tableau de bord
|
* @param int $load_state_board Load indicator array this->nb
|
||||||
* @return WorkboardResponse|int <0 if KO, WorkboardResponse if OK
|
* @return WorkboardResponse|int <0 if KO, WorkboardResponse if OK
|
||||||
*/
|
*/
|
||||||
public function load_board($user, $load_state_board = 0)
|
public function load_board($user, $load_state_board = 0)
|
||||||
{
|
{
|
||||||
// phpcs:enable
|
// phpcs:enable
|
||||||
global $conf, $langs;
|
global $conf, $langs;
|
||||||
|
|
||||||
if (empty($load_state_board)) $sql = "SELECT a.id, a.datep as dp";
|
if (empty($load_state_board)) {
|
||||||
else {
|
$sql = "SELECT a.id, a.datep as dp";
|
||||||
|
} else {
|
||||||
$this->nb = array();
|
$this->nb = array();
|
||||||
$sql = "SELECT count(a.id) as nb";
|
$sql = "SELECT count(a.id) as nb";
|
||||||
}
|
}
|
||||||
@ -1243,13 +1244,14 @@ class ActionComm extends CommonObject
|
|||||||
$response->img = img_object('', "action", 'class="inline-block valigntextmiddle"');
|
$response->img = img_object('', "action", 'class="inline-block valigntextmiddle"');
|
||||||
}
|
}
|
||||||
// This assignment in condition is not a bug. It allows walking the results.
|
// This assignment in condition is not a bug. It allows walking the results.
|
||||||
while ($obj = $this->db->fetch_object($resql))
|
while ($obj = $this->db->fetch_object($resql)) {
|
||||||
{
|
|
||||||
if (empty($load_state_board)) {
|
if (empty($load_state_board)) {
|
||||||
$response->nbtodo++;
|
$response->nbtodo++;
|
||||||
$agenda_static->datep = $this->db->jdate($obj->dp);
|
$agenda_static->datep = $this->db->jdate($obj->dp);
|
||||||
if ($agenda_static->hasDelay()) $response->nbtodolate++;
|
if ($agenda_static->hasDelay()) $response->nbtodolate++;
|
||||||
} else $this->nb["actionscomm"] = $obj->nb;
|
} else {
|
||||||
|
$this->nb["actionscomm"] = $obj->nb;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->db->free($resql);
|
$this->db->free($resql);
|
||||||
@ -2085,6 +2087,7 @@ class ActionComm extends CommonObject
|
|||||||
if ($res > 0)
|
if ($res > 0)
|
||||||
{
|
{
|
||||||
// PREPARE EMAIL
|
// PREPARE EMAIL
|
||||||
|
$errormesg = '';
|
||||||
|
|
||||||
// Make substitution in email content
|
// Make substitution in email content
|
||||||
$substitutionarray = getCommonSubstitutionArray($langs, 0, '', $this);
|
$substitutionarray = getCommonSubstitutionArray($langs, 0, '', $this);
|
||||||
@ -2100,43 +2103,65 @@ class ActionComm extends CommonObject
|
|||||||
// Recipient
|
// Recipient
|
||||||
$recipient = new User($this->db);
|
$recipient = new User($this->db);
|
||||||
$res = $recipient->fetch($actionCommReminder->fk_user);
|
$res = $recipient->fetch($actionCommReminder->fk_user);
|
||||||
if ($res > 0 && !empty($recipient->email)) $to = $recipient->email;
|
if ($res > 0) {
|
||||||
else {
|
if (!empty($recipient->email)) {
|
||||||
$errorsMsg[] = "Failed to load recipient";
|
$to = $recipient->email;
|
||||||
|
} else {
|
||||||
|
$errormesg = "Failed to send remind to user id=".$actionCommReminder->fk_user.". No email defined for user.";
|
||||||
|
$error++;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$errormesg = "Failed to load recipient with user id=".$actionCommReminder->fk_user;
|
||||||
$error++;
|
$error++;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Sender
|
// Sender
|
||||||
$from = $conf->global->MAIN_MAIL_EMAIL_FROM;
|
$from = $conf->global->MAIN_MAIL_EMAIL_FROM;
|
||||||
if (empty($from)) {
|
if (empty($from)) {
|
||||||
$errorsMsg[] = "Failed to load recipient";
|
$errormesg = "Failed to get sender into global setup MAIN_MAIL_EMAIL_FROM";
|
||||||
$error++;
|
$error++;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Errors Recipient
|
if (!$error) {
|
||||||
$errors_to = $conf->global->MAIN_MAIL_ERRORS_TO;
|
// Errors Recipient
|
||||||
|
$errors_to = $conf->global->MAIN_MAIL_ERRORS_TO;
|
||||||
|
|
||||||
// Mail Creation
|
// Mail Creation
|
||||||
$cMailFile = new CMailFile($sendTopic, $to, $from, $sendContent, array(), array(), array(), '', "", 0, 1, $errors_to, '', '', '', '', '');
|
$cMailFile = new CMailFile($sendTopic, $to, $from, $sendContent, array(), array(), array(), '', "", 0, 1, $errors_to, '', '', '', '', '');
|
||||||
|
|
||||||
// Sending Mail
|
// Sending Mail
|
||||||
if ($cMailFile->sendfile())
|
if ($cMailFile->sendfile()) {
|
||||||
{
|
$nbMailSend++;
|
||||||
|
} else {
|
||||||
|
$errormesg = $cMailFile->error.' : '.$to;
|
||||||
|
$error++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!$error) {
|
||||||
$actionCommReminder->status = $actionCommReminder::STATUS_DONE;
|
$actionCommReminder->status = $actionCommReminder::STATUS_DONE;
|
||||||
|
|
||||||
$res = $actionCommReminder->update($user);
|
$res = $actionCommReminder->update($user);
|
||||||
if ($res < 0)
|
if ($res < 0) {
|
||||||
{
|
$errorsMsg[] = "Failed to update status to done of ActionComm Reminder";
|
||||||
$errorsMsg[] = "Failed to update status of ActionComm Reminder";
|
$error++;
|
||||||
|
break; // This is to avoid to have this error on all the selected email. If we fails here for one record, it may fails for others. We must solve first.
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$actionCommReminder->status = $actionCommReminder::STATUS_ERROR;
|
||||||
|
$actionCommReminder->lasterror = dol_trunc($errormesg, 128, 'right', 'UTF-8', 1);
|
||||||
|
|
||||||
|
$res = $actionCommReminder->update($user);
|
||||||
|
if ($res < 0) {
|
||||||
|
$errorsMsg[] = "Failed to update status to error of ActionComm Reminder";
|
||||||
$error++;
|
$error++;
|
||||||
break; // This is to avoid to have this error on all the selected email. If we fails here for one record, it may fails for others. We must solve first.
|
break; // This is to avoid to have this error on all the selected email. If we fails here for one record, it may fails for others. We must solve first.
|
||||||
} else {
|
} else {
|
||||||
$nbMailSend++;
|
$errorsMsg[] = $errormesg;
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
$errorsMsg[] = $cMailFile->error.' : '.$to;
|
|
||||||
$error++;
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
$errorsMsg[] = 'Failed to fetch record actioncomm with ID = '.$actionCommReminder->fk_actioncomm;
|
||||||
$error++;
|
$error++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2150,6 +2175,7 @@ class ActionComm extends CommonObject
|
|||||||
// Delete also very old past events (we do not keep more than 1 month record in past)
|
// Delete also very old past events (we do not keep more than 1 month record in past)
|
||||||
$sql = "DELETE FROM ".MAIN_DB_PREFIX."actioncomm_reminder";
|
$sql = "DELETE FROM ".MAIN_DB_PREFIX."actioncomm_reminder";
|
||||||
$sql .= " WHERE dateremind < '".$this->db->idate($now - (3600 * 24 * 32))."'";
|
$sql .= " WHERE dateremind < '".$this->db->idate($now - (3600 * 24 * 32))."'";
|
||||||
|
$sql .= " AND status = ".$actionCommReminder::STATUS_DONE;
|
||||||
$resql = $this->db->query($sql);
|
$resql = $this->db->query($sql);
|
||||||
|
|
||||||
if (!$resql) {
|
if (!$resql) {
|
||||||
@ -2164,7 +2190,7 @@ class ActionComm extends CommonObject
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$this->db->rollback();
|
$this->db->commit(); // We commit also on error, to have the error message recorded.
|
||||||
$this->error = 'Nb of emails sent : '.$nbMailSend.', '.(!empty($errorsMsg)) ? join(', ', $errorsMsg) : $error;
|
$this->error = 'Nb of emails sent : '.$nbMailSend.', '.(!empty($errorsMsg)) ? join(', ', $errorsMsg) : $error;
|
||||||
return $error;
|
return $error;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -52,6 +52,7 @@ class ActionCommReminder extends CommonObject
|
|||||||
|
|
||||||
const STATUS_TODO = 0;
|
const STATUS_TODO = 0;
|
||||||
const STATUS_DONE = 1;
|
const STATUS_DONE = 1;
|
||||||
|
const STATUS_ERROR = -1;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -84,8 +85,9 @@ class ActionCommReminder extends CommonObject
|
|||||||
'offsetvalue' => array('type'=>'integer', 'label'=>'OffsetValue', 'visible'=>1, 'enabled'=>1, 'position'=>56, 'notnull'=>1,),
|
'offsetvalue' => array('type'=>'integer', 'label'=>'OffsetValue', 'visible'=>1, 'enabled'=>1, 'position'=>56, 'notnull'=>1,),
|
||||||
'offsetunit' => array('type'=>'varchar(1)', 'label'=>'OffsetUnit', 'visible'=>1, 'enabled'=>1, 'position'=>57, 'notnull'=>1, 'comment'=>"y, m, d, w, h, i",),
|
'offsetunit' => array('type'=>'varchar(1)', 'label'=>'OffsetUnit', 'visible'=>1, 'enabled'=>1, 'position'=>57, 'notnull'=>1, 'comment'=>"y, m, d, w, h, i",),
|
||||||
'status' => array('type'=>'integer', 'label'=>'Status', 'visible'=>1, 'enabled'=>1, 'position'=>58, 'notnull'=>1, 'default'=>0, 'index'=>0, 'arrayofkeyval'=>array('0'=>'ToDo', '1'=>'Done')),
|
'status' => array('type'=>'integer', 'label'=>'Status', 'visible'=>1, 'enabled'=>1, 'position'=>58, 'notnull'=>1, 'default'=>0, 'index'=>0, 'arrayofkeyval'=>array('0'=>'ToDo', '1'=>'Done')),
|
||||||
'fk_actioncomm' => array('type'=>'integer', 'label'=>'Project', 'visible'=>1, 'enabled'=>1, 'position'=>59, 'notnull'=>1, 'index'=>1,),
|
'lasterror' => array('type'=>'varchar(128)', 'label'=>'LastError', 'visible'=>-1, 'enabled'=>1, 'position'=>59, 'index'=>0),
|
||||||
'fk_email_template' => array('type'=>'integer', 'label'=>'EmailTemplate', 'visible'=>1, 'enabled'=>1, 'position'=>60, 'notnull'=>0),
|
'fk_actioncomm' => array('type'=>'integer', 'label'=>'Project', 'visible'=>1, 'enabled'=>1, 'position'=>70, 'notnull'=>1, 'index'=>1,),
|
||||||
|
'fk_email_template' => array('type'=>'integer', 'label'=>'EmailTemplate', 'visible'=>1, 'enabled'=>1, 'position'=>80, 'notnull'=>0),
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -114,6 +116,11 @@ class ActionCommReminder extends CommonObject
|
|||||||
*/
|
*/
|
||||||
public $status;
|
public $status;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var string Last error message
|
||||||
|
*/
|
||||||
|
public $lasterror;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var int Project
|
* @var int Project
|
||||||
*/
|
*/
|
||||||
@ -217,31 +224,19 @@ class ActionCommReminder extends CommonObject
|
|||||||
// phpcs:enable
|
// phpcs:enable
|
||||||
global $langs;
|
global $langs;
|
||||||
|
|
||||||
if ($mode == 0 || $mode == 1)
|
$labelStatus = $langs->trans('ToDo');
|
||||||
{
|
if ($status == 1) $labelStatus = $langs->trans('Done');
|
||||||
if ($status == 1) return $langs->trans('Done');
|
elseif ($status == -1) $labelStatus = $langs->trans('Error');
|
||||||
elseif ($status == 0) return $langs->trans('ToDo');
|
|
||||||
} elseif ($mode == 2)
|
$labelStatusShort = $langs->trans('ToDo');
|
||||||
{
|
if ($status == 1) $labelStatus = $langs->trans('Done');
|
||||||
if ($status == 1) return img_picto($langs->trans('Done'), 'statut4').' '.$langs->trans('Done');
|
elseif ($status == -1) $labelStatus = $langs->trans('Error');
|
||||||
elseif ($status == 0) return img_picto($langs->trans('ToDo'), 'statut5').' '.$langs->trans('ToDo');
|
|
||||||
} elseif ($mode == 3)
|
$statusType = 'status5';
|
||||||
{
|
if ($status == 1) $statusType = 'status4';
|
||||||
if ($status == 1) return img_picto($langs->trans('Done'), 'statut4');
|
elseif ($status == -1) $statusType = 'status8';
|
||||||
elseif ($status == 0) return img_picto($langs->trans('ToDo'), 'statut5');
|
|
||||||
} elseif ($mode == 4)
|
return dolGetStatus($labelStatus, $labelStatusShort, '', $statusType, $mode);
|
||||||
{
|
|
||||||
if ($status == 1) return img_picto($langs->trans('Done'), 'statut4').' '.$langs->trans('Done');
|
|
||||||
elseif ($status == 0) return img_picto($langs->trans('ToDo'), 'statut5').' '.$langs->trans('ToDo');
|
|
||||||
} elseif ($mode == 5)
|
|
||||||
{
|
|
||||||
if ($status == 1) return $langs->trans('Done').' '.img_picto($langs->trans('Done'), 'statut4');
|
|
||||||
elseif ($status == 0) return $langs->trans('ToDo').' '.img_picto($langs->trans('ToDo'), 'statut5');
|
|
||||||
} elseif ($mode == 6)
|
|
||||||
{
|
|
||||||
if ($status == 1) return $langs->trans('Done').' '.img_picto($langs->trans('Done'), 'statut4');
|
|
||||||
elseif ($status == 0) return $langs->trans('ToDo').' '.img_picto($langs->trans('ToDo'), 'statut5');
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -3663,6 +3663,9 @@ class Commande extends CommonOrder
|
|||||||
if (!empty($this->total_ttc)) {
|
if (!empty($this->total_ttc)) {
|
||||||
$label .= '<br><b>'.$langs->trans('AmountTTC').':</b> '.price($this->total_ttc, 0, $langs, 0, -1, -1, $conf->currency);
|
$label .= '<br><b>'.$langs->trans('AmountTTC').':</b> '.price($this->total_ttc, 0, $langs, 0, -1, -1, $conf->currency);
|
||||||
}
|
}
|
||||||
|
if (!empty($this->date)) {
|
||||||
|
$label .= '<br><b>'.$langs->trans('Date').':</b> '.dol_print_date($this->date, 'dayhour');
|
||||||
|
}
|
||||||
if (!empty($this->delivery_date)) {
|
if (!empty($this->delivery_date)) {
|
||||||
$label .= '<br><b>'.$langs->trans('DeliveryDate').':</b> '.dol_print_date($this->delivery_date, 'dayhour');
|
$label .= '<br><b>'.$langs->trans('DeliveryDate').':</b> '.dol_print_date($this->delivery_date, 'dayhour');
|
||||||
}
|
}
|
||||||
|
|||||||
@ -59,10 +59,10 @@ $search_datecloture_start = GETPOST('search_datecloture_start', 'int');
|
|||||||
if (empty($search_datecloture_start)) $search_datecloture_start = dol_mktime(0, 0, 0, GETPOST('search_datecloture_startmonth', 'int'), GETPOST('search_datecloture_startday', 'int'), GETPOST('search_datecloture_startyear', 'int'));
|
if (empty($search_datecloture_start)) $search_datecloture_start = dol_mktime(0, 0, 0, GETPOST('search_datecloture_startmonth', 'int'), GETPOST('search_datecloture_startday', 'int'), GETPOST('search_datecloture_startyear', 'int'));
|
||||||
$search_datecloture_end = GETPOST('search_datecloture_end', 'int');
|
$search_datecloture_end = GETPOST('search_datecloture_end', 'int');
|
||||||
if (empty($search_datecloture_end)) $search_datecloture_end = dol_mktime(23, 59, 59, GETPOST('search_datecloture_endmonth', 'int'), GETPOST('search_datecloture_endday', 'int'), GETPOST('search_datecloture_endyear', 'int'));
|
if (empty($search_datecloture_end)) $search_datecloture_end = dol_mktime(23, 59, 59, GETPOST('search_datecloture_endmonth', 'int'), GETPOST('search_datecloture_endday', 'int'), GETPOST('search_datecloture_endyear', 'int'));
|
||||||
$search_dateorder_start = dol_mktime(0, 0, 0, GETPOST('search_dateorder_startmonth', 'int'), GETPOST('search_dateorder_startday', 'int'), GETPOST('search_dateorder_startyear', 'int'));
|
$search_dateorder_start = dol_mktime(0, 0, 0, GETPOST('search_dateorder_start_month', 'int'), GETPOST('search_dateorder_start_day', 'int'), GETPOST('search_dateorder_start_year', 'int'));
|
||||||
$search_dateorder_end = dol_mktime(23, 59, 59, GETPOST('search_dateorder_endmonth', 'int'), GETPOST('search_dateorder_endday', 'int'), GETPOST('search_dateorder_endyear', 'int'));
|
$search_dateorder_end = dol_mktime(23, 59, 59, GETPOST('search_dateorder_end_month', 'int'), GETPOST('search_dateorder_end_day', 'int'), GETPOST('search_dateorder_end_year', 'int'));
|
||||||
$search_datedelivery_start = dol_mktime(0, 0, 0, GETPOST('search_datedelivery_startmonth', 'int'), GETPOST('search_datedelivery_startday', 'int'), GETPOST('search_datedelivery_startyear', 'int'));
|
$search_datedelivery_start = dol_mktime(0, 0, 0, GETPOST('search_datedelivery_start_month', 'int'), GETPOST('search_datedelivery_start_day', 'int'), GETPOST('search_datedelivery_start_year', 'int'));
|
||||||
$search_datedelivery_end = dol_mktime(23, 59, 59, GETPOST('search_datedelivery_endmonth', 'int'), GETPOST('search_datedelivery_endday', 'int'), GETPOST('search_datedelivery_endyear', 'int'));
|
$search_datedelivery_end = dol_mktime(23, 59, 59, GETPOST('search_datedelivery_end_month', 'int'), GETPOST('search_datedelivery_end_day', 'int'), GETPOST('search_datedelivery_end_year', 'int'));
|
||||||
$search_product_category = GETPOST('search_product_category', 'int');
|
$search_product_category = GETPOST('search_product_category', 'int');
|
||||||
$search_ref = GETPOST('search_ref', 'alpha') != '' ?GETPOST('search_ref', 'alpha') : GETPOST('sref', 'alpha');
|
$search_ref = GETPOST('search_ref', 'alpha') != '' ?GETPOST('search_ref', 'alpha') : GETPOST('sref', 'alpha');
|
||||||
$search_ref_customer = GETPOST('search_ref_customer', 'alpha');
|
$search_ref_customer = GETPOST('search_ref_customer', 'alpha');
|
||||||
@ -448,10 +448,10 @@ if ($resql)
|
|||||||
if ($search_status != '') $param .= '&search_status='.urlencode($search_status);
|
if ($search_status != '') $param .= '&search_status='.urlencode($search_status);
|
||||||
if ($search_datecloture_start) $param .= '&search_datecloture_start='.urlencode($search_datecloture_start);
|
if ($search_datecloture_start) $param .= '&search_datecloture_start='.urlencode($search_datecloture_start);
|
||||||
if ($search_datecloture_end) $param .= '&search_datecloture_end='.urlencode($search_datecloture_end);
|
if ($search_datecloture_end) $param .= '&search_datecloture_end='.urlencode($search_datecloture_end);
|
||||||
if ($search_dateorder_start) $param .= '&search_dateorder_start='.urlencode($search_dateorder_start);
|
if ($search_dateorder_start) $param .= '&search_dateorder_start_day=' . dol_print_date($search_dateorder_start, '%d') . '&search_dateorder_start_month=' . dol_print_date($search_dateorder_start, '%m') . '&search_dateorder_start_year=' . dol_print_date($search_dateorder_start, '%Y');
|
||||||
if ($search_dateorder_end) $param .= '&search_dateorder_end='.urlencode($search_dateorder_end);
|
if ($search_dateorder_end) $param .= '&search_dateorder_end_day=' . dol_print_date($search_dateorder_end, '%d') . '&search_dateorder_end_month=' . dol_print_date($search_dateorder_end, '%m') . '&search_dateorder_end_year=' . dol_print_date($search_dateorder_end, '%Y');
|
||||||
if ($search_datedelivery_start) $param .= '&search_datedelivery_start='.urlencode($search_datedelivery_start);
|
if ($search_datedelivery_start) $param .= '&search_datedelivery_start_day=' . dol_print_date($search_datedelivery_start, '%d') . '&search_datedelivery_start_month=' . dol_print_date($search_datedelivery_start, '%m') . '&search_datedelivery_start_year=' . dol_print_date($search_datedelivery_start, '%Y');
|
||||||
if ($search_datedelivery_end) $param .= '&search_datedelivery_end='.urlencode($search_datedelivery_end);
|
if ($search_datedelivery_end) $param .= '&search_datedelivery_end_day=' . dol_print_date($search_datedelivery_end, '%d') . '&search_datedelivery_end_month=' . dol_print_date($search_datedelivery_end, '%m') . '&search_datedelivery_end_year=' . dol_print_date($search_datedelivery_end, '%Y');
|
||||||
if ($search_ref) $param .= '&search_ref='.urlencode($search_ref);
|
if ($search_ref) $param .= '&search_ref='.urlencode($search_ref);
|
||||||
if ($search_company) $param .= '&search_company='.urlencode($search_company);
|
if ($search_company) $param .= '&search_company='.urlencode($search_company);
|
||||||
if ($search_ref_customer) $param .= '&search_ref_customer='.urlencode($search_ref_customer);
|
if ($search_ref_customer) $param .= '&search_ref_customer='.urlencode($search_ref_customer);
|
||||||
@ -708,10 +708,10 @@ if ($resql)
|
|||||||
{
|
{
|
||||||
print '<td class="liste_titre center">';
|
print '<td class="liste_titre center">';
|
||||||
print '<div class="nowrap">';
|
print '<div class="nowrap">';
|
||||||
print $form->selectDate($search_dateorder_start ? $search_dateorder_start : -1, 'search_dateorder_start', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans('From'));
|
print $form->selectDate($search_dateorder_start ? $search_dateorder_start : -1, 'search_dateorder_start_', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans('From'));
|
||||||
print '</div>';
|
print '</div>';
|
||||||
print '<div class="nowrap">';
|
print '<div class="nowrap">';
|
||||||
print $form->selectDate($search_dateorder_end ? $search_dateorder_end : -1, 'search_dateorder_end', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans('to'));
|
print $form->selectDate($search_dateorder_end ? $search_dateorder_end : -1, 'search_dateorder_end_', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans('to'));
|
||||||
print '</div>';
|
print '</div>';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
@ -719,10 +719,10 @@ if ($resql)
|
|||||||
{
|
{
|
||||||
print '<td class="liste_titre center">';
|
print '<td class="liste_titre center">';
|
||||||
print '<div class="nowrap">';
|
print '<div class="nowrap">';
|
||||||
print $form->selectDate($search_datedelivery_start ? $search_datedelivery_start : -1, 'search_datedelivery_start', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans('From'));
|
print $form->selectDate($search_datedelivery_start ? $search_datedelivery_start : -1, 'search_datedelivery_start_', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans('From'));
|
||||||
print '</div>';
|
print '</div>';
|
||||||
print '<div class="nowrap">';
|
print '<div class="nowrap">';
|
||||||
print $form->selectDate($search_datedelivery_end ? $search_datedelivery_end : -1, 'search_datedelivery_end', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans('to'));
|
print $form->selectDate($search_datedelivery_end ? $search_datedelivery_end : -1, 'search_datedelivery_end_', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans('to'));
|
||||||
print '</div>';
|
print '</div>';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
|
|||||||
@ -613,7 +613,7 @@ if (!empty($date_start) && !empty($date_stop))
|
|||||||
print '<td class="center">'.$langs->trans("Code").'</td>';
|
print '<td class="center">'.$langs->trans("Code").'</td>';
|
||||||
print '<td class="center">'.$langs->trans("Country").'</td>';
|
print '<td class="center">'.$langs->trans("Country").'</td>';
|
||||||
print '<td class="center">'.$langs->trans("VATIntra").'</td>';
|
print '<td class="center">'.$langs->trans("VATIntra").'</td>';
|
||||||
if ($conf->multicurrency->enabled) print '<td class="center">'.$langs->trans("Currency").'</td>';
|
if (!empty($conf->multicurrency->enabled)) print '<td class="center">'.$langs->trans("Currency").'</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
if ($result)
|
if ($result)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -108,6 +108,10 @@ if (!empty($conf->accounting->enabled)) $result = restrictedArea($user, 'account
|
|||||||
* View
|
* View
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
$param = '';
|
||||||
|
if ($date_startday && $date_startmonth && $date_startyear) $param .= '&date_startday='.$date_startday.'&date_startmonth='.$date_startmonth.'&date_startyear='.$date_startyear;
|
||||||
|
if ($date_endday && $date_endmonth && $date_endyear) $param .= '&date_endday='.$date_endday.'&date_endmonth='.$date_endmonth.'&date_endyear='.$date_endyear;
|
||||||
|
|
||||||
llxHeader();
|
llxHeader();
|
||||||
|
|
||||||
$form = new Form($db);
|
$form = new Form($db);
|
||||||
@ -118,7 +122,7 @@ if ($modecompta == "CREANCES-DETTES")
|
|||||||
$name = $langs->trans("Turnover");
|
$name = $langs->trans("Turnover");
|
||||||
$calcmode = $langs->trans("CalcModeDebt");
|
$calcmode = $langs->trans("CalcModeDebt");
|
||||||
//$calcmode.='<br>('.$langs->trans("SeeReportInInputOutputMode",'<a href="'.$_SERVER["PHP_SELF"].'?year_start='.$year_start.'&modecompta=RECETTES-DEPENSES">','</a>').')';
|
//$calcmode.='<br>('.$langs->trans("SeeReportInInputOutputMode",'<a href="'.$_SERVER["PHP_SELF"].'?year_start='.$year_start.'&modecompta=RECETTES-DEPENSES">','</a>').')';
|
||||||
$calcmode .= '<br>('.$langs->trans("SeeReportInBookkeepingMode", '<a href="'.$_SERVER["PHP_SELF"].'?year_start='.$year_start.'&modecompta=BOOKKEEPING">', '</a>').')';
|
$calcmode .= '<br>('.$langs->trans("SeeReportInBookkeepingMode", '<a class="bold" href="'.$_SERVER["PHP_SELF"].'?'.($param ? $param : 'year_start='.$year_start).'&modecompta=BOOKKEEPING">', '</a>').')';
|
||||||
$period = $form->selectDate($date_start, 'date_start', 0, 0, 0, '', 1, 0).' - '.$form->selectDate($date_end, 'date_end', 0, 0, 0, '', 1, 0);
|
$period = $form->selectDate($date_start, 'date_start', 0, 0, 0, '', 1, 0).' - '.$form->selectDate($date_end, 'date_end', 0, 0, 0, '', 1, 0);
|
||||||
$periodlink = ($year_start ? "<a href='".$_SERVER["PHP_SELF"]."?year=".($year_start + $nbofyear - 2)."&modecompta=".$modecompta."'>".img_previous()."</a> <a href='".$_SERVER["PHP_SELF"]."?year=".($year_start + $nbofyear)."&modecompta=".$modecompta."'>".img_next()."</a>" : "");
|
$periodlink = ($year_start ? "<a href='".$_SERVER["PHP_SELF"]."?year=".($year_start + $nbofyear - 2)."&modecompta=".$modecompta."'>".img_previous()."</a> <a href='".$_SERVER["PHP_SELF"]."?year=".($year_start + $nbofyear)."&modecompta=".$modecompta."'>".img_next()."</a>" : "");
|
||||||
$description = $langs->trans("RulesCADue");
|
$description = $langs->trans("RulesCADue");
|
||||||
@ -142,7 +146,7 @@ if ($modecompta == "CREANCES-DETTES")
|
|||||||
{
|
{
|
||||||
$name = $langs->trans("Turnover");
|
$name = $langs->trans("Turnover");
|
||||||
$calcmode = $langs->trans("CalcModeBookkeeping");
|
$calcmode = $langs->trans("CalcModeBookkeeping");
|
||||||
$calcmode .= '<br>('.$langs->trans("SeeReportInDueDebtMode", '<a href="'.$_SERVER["PHP_SELF"].'?year_start='.$year_start.'&modecompta=CREANCES-DETTES">', '</a>').')';
|
$calcmode .= '<br>('.$langs->trans("SeeReportInDueDebtMode", '<a class="bold" href="'.$_SERVER["PHP_SELF"].'?'.($param ? $param : 'year_start='.$year_start).'&modecompta=CREANCES-DETTES">', '</a>').')';
|
||||||
//$calcmode.='<br>('.$langs->trans("SeeReportInInputOutputMode",'<a href="'.$_SERVER["PHP_SELF"].'?year_start='.$year_start.'&modecompta=RECETTES-DEPENSES">','</a>').')';
|
//$calcmode.='<br>('.$langs->trans("SeeReportInInputOutputMode",'<a href="'.$_SERVER["PHP_SELF"].'?year_start='.$year_start.'&modecompta=RECETTES-DEPENSES">','</a>').')';
|
||||||
$period = $form->selectDate($date_start, 'date_start', 0, 0, 0, '', 1, 0).' - '.$form->selectDate($date_end, 'date_end', 0, 0, 0, '', 1, 0);
|
$period = $form->selectDate($date_start, 'date_start', 0, 0, 0, '', 1, 0).' - '.$form->selectDate($date_end, 'date_end', 0, 0, 0, '', 1, 0);
|
||||||
$periodlink = ($year_start ? "<a href='".$_SERVER["PHP_SELF"]."?year=".($year_start + $nbofyear - 2)."&modecompta=".$modecompta."'>".img_previous()."</a> <a href='".$_SERVER["PHP_SELF"]."?year=".($year_start + $nbofyear)."&modecompta=".$modecompta."'>".img_next()."</a>" : "");
|
$periodlink = ($year_start ? "<a href='".$_SERVER["PHP_SELF"]."?year=".($year_start + $nbofyear - 2)."&modecompta=".$modecompta."'>".img_previous()."</a> <a href='".$_SERVER["PHP_SELF"]."?year=".($year_start + $nbofyear)."&modecompta=".$modecompta."'>".img_next()."</a>" : "");
|
||||||
@ -305,6 +309,11 @@ for ($mois = 1 + $nb_mois_decalage; $mois <= 12 + $nb_mois_decalage; $mois++)
|
|||||||
if ($mois > 12) {$mois_modulo = $mois - 12; } // ajout
|
if ($mois > 12) {$mois_modulo = $mois - 12; } // ajout
|
||||||
|
|
||||||
if ($year_start == $year_end) {
|
if ($year_start == $year_end) {
|
||||||
|
// If we show only one year or one month, we do not show month before the selected month
|
||||||
|
if ($mois < $date_startmonth && $year_start <= $date_startyear) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
// If we show only one year or one month, we do not show month after the selected month
|
||||||
if ($mois > $date_endmonth && $year_end >= $date_endyear) {
|
if ($mois > $date_endmonth && $year_end >= $date_endyear) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -887,8 +887,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action))
|
|||||||
print '</div>';
|
print '</div>';
|
||||||
|
|
||||||
print "</form>";
|
print "</form>";
|
||||||
} elseif ($action == 'edit' && !empty($id))
|
} elseif ($action == 'edit' && !empty($id)) {
|
||||||
{
|
|
||||||
/*
|
/*
|
||||||
* Fiche en mode edition
|
* Fiche en mode edition
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -6884,7 +6884,7 @@ abstract class CommonObject
|
|||||||
$helptoshow = $langs->trans($extrafields->attributes[$this->table_element]['help'][$key]);
|
$helptoshow = $langs->trans($extrafields->attributes[$this->table_element]['help'][$key]);
|
||||||
|
|
||||||
$out .= '<tr '.($html_id ? 'id="'.$html_id.'" ' : '').$csstyle.' class="'.$class.$this->element.'_extras_'.$key.' trextrafields_collapse'.$extrafields_collapse_num.'" '.$domData.' >';
|
$out .= '<tr '.($html_id ? 'id="'.$html_id.'" ' : '').$csstyle.' class="'.$class.$this->element.'_extras_'.$key.' trextrafields_collapse'.$extrafields_collapse_num.'" '.$domData.' >';
|
||||||
$out .= '<td class="';
|
$out .= '<td class="wordbreak';
|
||||||
//$out .= "titlefield";
|
//$out .= "titlefield";
|
||||||
//if (GETPOST('action', 'restricthtml') == 'create') $out.='create';
|
//if (GETPOST('action', 'restricthtml') == 'create') $out.='create';
|
||||||
// BUG #11554 : For public page, use red dot for required fields, instead of bold label
|
// BUG #11554 : For public page, use red dot for required fields, instead of bold label
|
||||||
@ -7907,7 +7907,7 @@ abstract class CommonObject
|
|||||||
}*/
|
}*/
|
||||||
}
|
}
|
||||||
|
|
||||||
$sql = 'UPDATE '.MAIN_DB_PREFIX.$this->table_element.' SET '.implode(',', $tmp).' WHERE rowid='.$this->id;
|
$sql = 'UPDATE '.MAIN_DB_PREFIX.$this->table_element.' SET '.implode(', ', $tmp).' WHERE rowid='.$this->id;
|
||||||
|
|
||||||
$this->db->begin();
|
$this->db->begin();
|
||||||
if (!$error)
|
if (!$error)
|
||||||
|
|||||||
@ -793,7 +793,7 @@ class dolReceiptPrinter extends Printer
|
|||||||
$row = $this->db->fetch_object($resql);
|
$row = $this->db->fetch_object($resql);
|
||||||
$spacestoadd = $nbcharactbyline - strlen($langs->transnoentitiesnoconv("PaymentTypeShort".$row->code)) - 12;
|
$spacestoadd = $nbcharactbyline - strlen($langs->transnoentitiesnoconv("PaymentTypeShort".$row->code)) - 12;
|
||||||
$spaces = str_repeat(' ', $spacestoadd);
|
$spaces = str_repeat(' ', $spacestoadd);
|
||||||
$amount_payment = ($conf->multicurrency->enabled && $object->multicurrency_tx != 1) ? $row->multicurrency_amount : $row->amount;
|
$amount_payment = (!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1) ? $row->multicurrency_amount : $row->amount;
|
||||||
if ($row->code == "LIQ") $amount_payment = $amount_payment + $row->pos_change; // Show amount with excess received if is cash payment
|
if ($row->code == "LIQ") $amount_payment = $amount_payment + $row->pos_change; // Show amount with excess received if is cash payment
|
||||||
$this->printer->text($spaces.$langs->transnoentitiesnoconv("PaymentTypeShort".$row->code).' '.str_pad(price($amount_payment), 10, ' ', STR_PAD_LEFT)."\n");
|
$this->printer->text($spaces.$langs->transnoentitiesnoconv("PaymentTypeShort".$row->code).' '.str_pad(price($amount_payment), 10, ' ', STR_PAD_LEFT)."\n");
|
||||||
if ($row->code == "LIQ" && $row->pos_change > 0) // Print change only in cash payments
|
if ($row->code == "LIQ" && $row->pos_change > 0) // Print change only in cash payments
|
||||||
|
|||||||
@ -6259,7 +6259,7 @@ class Form
|
|||||||
* Note: Do not apply langs->trans function on returned content, content may be entity encoded twice.
|
* Note: Do not apply langs->trans function on returned content, content may be entity encoded twice.
|
||||||
*
|
*
|
||||||
* @param string $htmlname Name of html select area. Must start with "multi" if this is a multiselect
|
* @param string $htmlname Name of html select area. Must start with "multi" if this is a multiselect
|
||||||
* @param array $array Array like array(key => value) or array(key=>array('label'=>..., 'data-...'=>...))
|
* @param array $array Array like array(key => value) or array(key=>array('label'=>..., 'data-...'=>..., 'disabled'=>..., 'css'=>...))
|
||||||
* @param string|string[] $id Preselected key or preselected keys for multiselect
|
* @param string|string[] $id Preselected key or preselected keys for multiselect
|
||||||
* @param int|string $show_empty 0 no empty value allowed, 1 or string to add an empty value into list (key is -1 and value is '' or ' ' if 1, key is -1 and value is text if string), <0 to add an empty value with key that is this value.
|
* @param int|string $show_empty 0 no empty value allowed, 1 or string to add an empty value into list (key is -1 and value is '' or ' ' if 1, key is -1 and value is text if string), <0 to add an empty value with key that is this value.
|
||||||
* @param int $key_in_label 1 to show key into label with format "[key] value"
|
* @param int $key_in_label 1 to show key into label with format "[key] value"
|
||||||
@ -6331,10 +6331,14 @@ class Form
|
|||||||
|
|
||||||
foreach ($array as $key => $tmpvalue)
|
foreach ($array as $key => $tmpvalue)
|
||||||
{
|
{
|
||||||
if (is_array($tmpvalue)) $value = $tmpvalue['label'];
|
if (is_array($tmpvalue)) {
|
||||||
else $value = $tmpvalue;
|
$value = $tmpvalue['label'];
|
||||||
|
$disabled = empty($tmpvalue['disabled']) ? '' : ' disabled';
|
||||||
$disabled = ''; $style = '';
|
$style = empty($tmpvalue['css']) ? ' class="'.$tmpvalue['css'].'"' : '';
|
||||||
|
} else {
|
||||||
|
$value = $tmpvalue;
|
||||||
|
$disabled = ''; $style = '';
|
||||||
|
}
|
||||||
if (!empty($disablebademail))
|
if (!empty($disablebademail))
|
||||||
{
|
{
|
||||||
if (($disablebademail == 1 && !preg_match('/<.+@.+>/', $value))
|
if (($disablebademail == 1 && !preg_match('/<.+@.+>/', $value))
|
||||||
@ -7489,10 +7493,11 @@ class Form
|
|||||||
* @param string $imagesize 'mini', 'small' or '' (original)
|
* @param string $imagesize 'mini', 'small' or '' (original)
|
||||||
* @param int $addlinktofullsize Add link to fullsize image
|
* @param int $addlinktofullsize Add link to fullsize image
|
||||||
* @param int $cache 1=Accept to use image in cache
|
* @param int $cache 1=Accept to use image in cache
|
||||||
* @param string $forcecapture Force parameter capture on HTML input file element to ask a smartphone to allow to open camera to take photo. Auto if empty.
|
* @param string $forcecapture '', 'user' or 'environment'. Force parameter capture on HTML input file element to ask a smartphone to allow to open camera to take photo. Auto if ''.
|
||||||
|
* @param int $noexternsourceoverwrite No overwrite image with extern source (like 'gravatar' or other module)
|
||||||
* @return string HTML code to output photo
|
* @return string HTML code to output photo
|
||||||
*/
|
*/
|
||||||
public static function showphoto($modulepart, $object, $width = 100, $height = 0, $caneditfield = 0, $cssclass = 'photowithmargin', $imagesize = '', $addlinktofullsize = 1, $cache = 0, $forcecapture = '')
|
public static function showphoto($modulepart, $object, $width = 100, $height = 0, $caneditfield = 0, $cssclass = 'photowithmargin', $imagesize = '', $addlinktofullsize = 1, $cache = 0, $forcecapture = '', $noexternsourceoverwrite = 0)
|
||||||
{
|
{
|
||||||
global $conf, $langs;
|
global $conf, $langs;
|
||||||
|
|
||||||
@ -7569,18 +7574,15 @@ class Form
|
|||||||
{
|
{
|
||||||
if ($file && file_exists($dir."/".$file))
|
if ($file && file_exists($dir."/".$file))
|
||||||
{
|
{
|
||||||
if ($addlinktofullsize)
|
if ($addlinktofullsize) {
|
||||||
{
|
|
||||||
$urladvanced = getAdvancedPreviewUrl($modulepart, $originalfile, 0, '&entity='.$entity);
|
$urladvanced = getAdvancedPreviewUrl($modulepart, $originalfile, 0, '&entity='.$entity);
|
||||||
if ($urladvanced) $ret .= '<a href="'.$urladvanced.'">';
|
if ($urladvanced) $ret .= '<a href="'.$urladvanced.'">';
|
||||||
else $ret .= '<a href="'.DOL_URL_ROOT.'/viewimage.php?modulepart='.$modulepart.'&entity='.$entity.'&file='.urlencode($originalfile).'&cache='.$cache.'">';
|
else $ret .= '<a href="'.DOL_URL_ROOT.'/viewimage.php?modulepart='.$modulepart.'&entity='.$entity.'&file='.urlencode($originalfile).'&cache='.$cache.'">';
|
||||||
}
|
}
|
||||||
$ret .= '<img alt="Photo" class="photo'.$modulepart.($cssclass ? ' '.$cssclass : '').' photologo'.(preg_replace('/[^a-z]/i', '_', $file)).'" '.($width ? ' width="'.$width.'"' : '').($height ? ' height="'.$height.'"' : '').' src="'.DOL_URL_ROOT.'/viewimage.php?modulepart='.$modulepart.'&entity='.$entity.'&file='.urlencode($file).'&cache='.$cache.'">';
|
$ret .= '<img alt="Photo" class="photo'.$modulepart.($cssclass ? ' '.$cssclass : '').' photologo'.(preg_replace('/[^a-z]/i', '_', $file)).'" '.($width ? ' width="'.$width.'"' : '').($height ? ' height="'.$height.'"' : '').' src="'.DOL_URL_ROOT.'/viewimage.php?modulepart='.$modulepart.'&entity='.$entity.'&file='.urlencode($file).'&cache='.$cache.'">';
|
||||||
if ($addlinktofullsize) $ret .= '</a>';
|
if ($addlinktofullsize) $ret .= '</a>';
|
||||||
} elseif ($altfile && file_exists($dir."/".$altfile))
|
} elseif ($altfile && file_exists($dir."/".$altfile)) {
|
||||||
{
|
if ($addlinktofullsize) {
|
||||||
if ($addlinktofullsize)
|
|
||||||
{
|
|
||||||
$urladvanced = getAdvancedPreviewUrl($modulepart, $originalfile, 0, '&entity='.$entity);
|
$urladvanced = getAdvancedPreviewUrl($modulepart, $originalfile, 0, '&entity='.$entity);
|
||||||
if ($urladvanced) $ret .= '<a href="'.$urladvanced.'">';
|
if ($urladvanced) $ret .= '<a href="'.$urladvanced.'">';
|
||||||
else $ret .= '<a href="'.DOL_URL_ROOT.'/viewimage.php?modulepart='.$modulepart.'&entity='.$entity.'&file='.urlencode($originalfile).'&cache='.$cache.'">';
|
else $ret .= '<a href="'.DOL_URL_ROOT.'/viewimage.php?modulepart='.$modulepart.'&entity='.$entity.'&file='.urlencode($originalfile).'&cache='.$cache.'">';
|
||||||
@ -7589,8 +7591,7 @@ class Form
|
|||||||
if ($addlinktofullsize) $ret .= '</a>';
|
if ($addlinktofullsize) $ret .= '</a>';
|
||||||
} else {
|
} else {
|
||||||
$nophoto = '/public/theme/common/nophoto.png';
|
$nophoto = '/public/theme/common/nophoto.png';
|
||||||
if (in_array($modulepart, array('userphoto', 'contact', 'memberphoto'))) // For module that are "physical" users
|
if (in_array($modulepart, array('userphoto', 'contact', 'memberphoto'))) { // For module that are "physical" users
|
||||||
{
|
|
||||||
if ($modulepart == 'memberphoto' && strpos($object->morphy, 'mor') !== false) {
|
if ($modulepart == 'memberphoto' && strpos($object->morphy, 'mor') !== false) {
|
||||||
$nophoto = '/public/theme/common/company.png';
|
$nophoto = '/public/theme/common/company.png';
|
||||||
} else {
|
} else {
|
||||||
@ -7600,11 +7601,8 @@ class Form
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!empty($conf->gravatar->enabled) && $email)
|
if (!empty($conf->gravatar->enabled) && $email && empty($noexternsourceoverwrite)) {
|
||||||
{
|
// see https://gravatar.com/site/implement/images/php/
|
||||||
/**
|
|
||||||
* @see https://gravatar.com/site/implement/images/php/
|
|
||||||
*/
|
|
||||||
global $dolibarr_main_url_root;
|
global $dolibarr_main_url_root;
|
||||||
$ret .= '<!-- Put link to gravatar -->';
|
$ret .= '<!-- Put link to gravatar -->';
|
||||||
//$defaultimg=urlencode(dol_buildpath($nophoto,3));
|
//$defaultimg=urlencode(dol_buildpath($nophoto,3));
|
||||||
|
|||||||
@ -233,13 +233,15 @@ class FormActions
|
|||||||
if ($max && $cursorevent >= $max) break;
|
if ($max && $cursorevent >= $max) break;
|
||||||
|
|
||||||
$ref = $actioncomm->getNomUrl(1, -1);
|
$ref = $actioncomm->getNomUrl(1, -1);
|
||||||
$label = $actioncomm->getNomUrl(0, 38);
|
$label = $actioncomm->getNomUrl(0, 36);
|
||||||
|
|
||||||
print '<tr class="oddeven">';
|
print '<tr class="oddeven">';
|
||||||
|
|
||||||
// Ref
|
// Ref
|
||||||
print '<td class="nowraponall">'.$ref.'</td>';
|
print '<td class="nowraponall">'.$ref.'</td>';
|
||||||
|
|
||||||
// Onwer
|
// Onwer
|
||||||
print '<td class="tdoverflowmax150">';
|
print '<td class="nowraponall tdoverflowmax125">';
|
||||||
if (!empty($actioncomm->userownerid))
|
if (!empty($actioncomm->userownerid))
|
||||||
{
|
{
|
||||||
if (is_object($cacheusers[$actioncomm->userownerid]))
|
if (is_object($cacheusers[$actioncomm->userownerid]))
|
||||||
@ -266,13 +268,13 @@ class FormActions
|
|||||||
if ($actioncomm->type_picto) {
|
if ($actioncomm->type_picto) {
|
||||||
$imgpicto = img_picto('', $actioncomm->type_picto);
|
$imgpicto = img_picto('', $actioncomm->type_picto);
|
||||||
} else {
|
} else {
|
||||||
if ($actioncomm->type_code == 'AC_RDV') $imgpicto = img_picto('', 'object_group', '', false, 0, 0, '', 'paddingright').' ';
|
if ($actioncomm->type_code == 'AC_RDV') $imgpicto = img_picto('', 'object_group', '', false, 0, 0, '', 'paddingright');
|
||||||
elseif ($actioncomm->type_code == 'AC_TEL') $imgpicto = img_picto('', 'object_phoning', '', false, 0, 0, '', 'paddingright').' ';
|
elseif ($actioncomm->type_code == 'AC_TEL') $imgpicto = img_picto('', 'object_phoning', '', false, 0, 0, '', 'paddingright');
|
||||||
elseif ($actioncomm->type_code == 'AC_FAX') $imgpicto = img_picto('', 'object_phoning_fax', '', false, 0, 0, '', 'paddingright').' ';
|
elseif ($actioncomm->type_code == 'AC_FAX') $imgpicto = img_picto('', 'object_phoning_fax', '', false, 0, 0, '', 'paddingright');
|
||||||
elseif ($actioncomm->type_code == 'AC_EMAIL') $imgpicto = img_picto('', 'object_email', '', false, 0, 0, '', 'paddingright').' ';
|
elseif ($actioncomm->type_code == 'AC_EMAIL') $imgpicto = img_picto('', 'object_email', '', false, 0, 0, '', 'paddingright');
|
||||||
elseif ($actioncomm->type_code == 'AC_INT') $imgpicto = img_picto('', 'object_intervention', '', false, 0, 0, '', 'paddingright').' ';
|
elseif ($actioncomm->type_code == 'AC_INT') $imgpicto = img_picto('', 'object_intervention', '', false, 0, 0, '', 'paddingright');
|
||||||
elseif ($actioncomm->type_code == 'AC_OTH' && $actioncomm->code == 'TICKET_MSG') $imgpicto = img_picto('', 'object_conversation', '', false, 0, 0, '', 'paddingright').' ';
|
elseif ($actioncomm->type_code == 'AC_OTH' && $actioncomm->code == 'TICKET_MSG') $imgpicto = img_picto('', 'object_conversation', '', false, 0, 0, '', 'paddingright');
|
||||||
elseif (!preg_match('/_AUTO/', $actioncomm->type_code)) $imgpicto = img_picto('', 'object_action', '', false, 0, 0, '', 'paddingright').' ';
|
elseif (!preg_match('/_AUTO/', $actioncomm->type_code)) $imgpicto = img_picto('', 'object_action', '', false, 0, 0, '', 'paddingright');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
print $imgpicto;
|
print $imgpicto;
|
||||||
@ -282,8 +284,10 @@ class FormActions
|
|||||||
print $actioncomm->type_short ? $actioncomm->type_short : $actioncomm->type;
|
print $actioncomm->type_short ? $actioncomm->type_short : $actioncomm->type;
|
||||||
}
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
// Label
|
// Label
|
||||||
print '<td>'.$label.'</td>';
|
print '<td>'.$label.'</td>';
|
||||||
|
|
||||||
// Date
|
// Date
|
||||||
print '<td class="center">'.dol_print_date($actioncomm->datep, 'dayhour', 'tzuserrel');
|
print '<td class="center">'.dol_print_date($actioncomm->datep, 'dayhour', 'tzuserrel');
|
||||||
if ($actioncomm->datef)
|
if ($actioncomm->datef)
|
||||||
|
|||||||
@ -738,7 +738,7 @@ class Translate
|
|||||||
*/
|
*/
|
||||||
public function transcountrynoentities($str, $countrycode)
|
public function transcountrynoentities($str, $countrycode)
|
||||||
{
|
{
|
||||||
if ($this->tab_translate["$str$countrycode"]) return $this->transnoentities("$str$countrycode");
|
if (! empty($this->tab_translate["$str$countrycode"])) return $this->transnoentities("$str$countrycode");
|
||||||
else return $this->transnoentities($str);
|
else return $this->transnoentities($str);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -85,10 +85,19 @@ function dol_quoted_printable_encode($input, $line_max = 76)
|
|||||||
*/
|
*/
|
||||||
class vCard
|
class vCard
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* @var array array of properties
|
||||||
|
*/
|
||||||
public $properties;
|
public $properties;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var string filename
|
||||||
|
*/
|
||||||
public $filename;
|
public $filename;
|
||||||
|
|
||||||
//var $encoding="UTF-8";
|
/**
|
||||||
|
* @var string encoding
|
||||||
|
*/
|
||||||
public $encoding = "ISO-8859-1;ENCODING=QUOTED-PRINTABLE";
|
public $encoding = "ISO-8859-1;ENCODING=QUOTED-PRINTABLE";
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -356,13 +356,10 @@ function agenda_prepare_head()
|
|||||||
$head[$h][2] = 'autoactions';
|
$head[$h][2] = 'autoactions';
|
||||||
$h++;
|
$h++;
|
||||||
|
|
||||||
if ($conf->global->MAIN_FEATURES_LEVEL > 0)
|
$head[$h][0] = DOL_URL_ROOT."/admin/agenda_reminder.php";
|
||||||
{
|
$head[$h][1] = $langs->trans("Reminders");
|
||||||
$head[$h][0] = DOL_URL_ROOT."/admin/agenda_reminder.php";
|
$head[$h][2] = 'reminders';
|
||||||
$head[$h][1] = $langs->trans("Reminders");
|
$h++;
|
||||||
$head[$h][2] = 'reminders';
|
|
||||||
$h++;
|
|
||||||
}
|
|
||||||
|
|
||||||
$head[$h][0] = DOL_URL_ROOT."/admin/agenda_xcal.php";
|
$head[$h][0] = DOL_URL_ROOT."/admin/agenda_xcal.php";
|
||||||
$head[$h][1] = $langs->trans("ExportCal");
|
$head[$h][1] = $langs->trans("ExportCal");
|
||||||
|
|||||||
@ -39,6 +39,11 @@ function cronadmin_prepare_head()
|
|||||||
$head[$h][2] = 'setup';
|
$head[$h][2] = 'setup';
|
||||||
$h++;
|
$h++;
|
||||||
|
|
||||||
|
$head[$h][0] = dol_buildpath('/cron/list.php?mode=modulesetup', 1);
|
||||||
|
$head[$h][1] = $langs->trans("Module2300Name");
|
||||||
|
$head[$h][2] = 'jobs';
|
||||||
|
$h++;
|
||||||
|
|
||||||
complete_head_from_modules($conf, $langs, null, $head, $h, 'cronadmin');
|
complete_head_from_modules($conf, $langs, null, $head, $h, 'cronadmin');
|
||||||
|
|
||||||
complete_head_from_modules($conf, $langs, null, $head, $h, 'cronadmin', 'remove');
|
complete_head_from_modules($conf, $langs, null, $head, $h, 'cronadmin', 'remove');
|
||||||
|
|||||||
@ -78,7 +78,7 @@ function getServerTimeZoneString()
|
|||||||
* Return server timezone int.
|
* Return server timezone int.
|
||||||
*
|
*
|
||||||
* @param string $refgmtdate Reference period for timezone (timezone differs on winter and summer. May be 'now', 'winter' or 'summer')
|
* @param string $refgmtdate Reference period for timezone (timezone differs on winter and summer. May be 'now', 'winter' or 'summer')
|
||||||
* @return int An offset in hour (+1 for Europe/Paris on winter and +2 for Europe/Paris on summer)
|
* @return float An offset in hour (+1 for Europe/Paris on winter and +2 for Europe/Paris on summer). Note some countries use half and even quarter hours.
|
||||||
*/
|
*/
|
||||||
function getServerTimeZoneInt($refgmtdate = 'now')
|
function getServerTimeZoneInt($refgmtdate = 'now')
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1668,13 +1668,11 @@ function dol_banner_tab($object, $paramid, $morehtml = '', $shownav = 1, $fieldi
|
|||||||
$phototoshow .= '</div>';
|
$phototoshow .= '</div>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} elseif (!$phototoshow)
|
} elseif (!$phototoshow) {
|
||||||
{
|
|
||||||
$phototoshow .= $form->showphoto($modulepart, $object, 0, 0, 0, 'photoref', 'small', 1, 0, $maxvisiblephotos);
|
$phototoshow .= $form->showphoto($modulepart, $object, 0, 0, 0, 'photoref', 'small', 1, 0, $maxvisiblephotos);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($phototoshow)
|
if ($phototoshow) {
|
||||||
{
|
|
||||||
$morehtmlleft .= '<div class="floatleft inline-block valignmiddle divphotoref">';
|
$morehtmlleft .= '<div class="floatleft inline-block valignmiddle divphotoref">';
|
||||||
$morehtmlleft .= $phototoshow;
|
$morehtmlleft .= $phototoshow;
|
||||||
$morehtmlleft .= '</div>';
|
$morehtmlleft .= '</div>';
|
||||||
@ -3096,7 +3094,7 @@ function dol_substr($string, $start, $length, $stringencoding = '', $trunconbyte
|
|||||||
*
|
*
|
||||||
* @param string $string String to truncate
|
* @param string $string String to truncate
|
||||||
* @param int $size Max string size visible (excluding ...). 0 for no limit. WARNING: Final string size can have 3 more chars (if we added ..., or if size was max+1 or max+2 or max+3 so it does not worse to replace with ...)
|
* @param int $size Max string size visible (excluding ...). 0 for no limit. WARNING: Final string size can have 3 more chars (if we added ..., or if size was max+1 or max+2 or max+3 so it does not worse to replace with ...)
|
||||||
* @param string $trunc Where to trunc: right, left, middle (size must be a 2 power), wrap
|
* @param string $trunc Where to trunc: 'right', 'left', 'middle' (size must be a 2 power), 'wrap'
|
||||||
* @param string $stringencoding Tell what is source string encoding
|
* @param string $stringencoding Tell what is source string encoding
|
||||||
* @param int $nodot Truncation do not add ... after truncation. So it's an exact truncation.
|
* @param int $nodot Truncation do not add ... after truncation. So it's an exact truncation.
|
||||||
* @param int $display Trunc is used to display data and can be changed for small screen. TODO Remove this param (must be dealt with CSS)
|
* @param int $display Trunc is used to display data and can be changed for small screen. TODO Remove this param (must be dealt with CSS)
|
||||||
|
|||||||
@ -817,8 +817,7 @@ function pdf_bank(&$pdf, $outputlangs, $curx, $cury, $account, $onlynumber = 0,
|
|||||||
|
|
||||||
$pdf->SetFont('', '', $default_font_size - $diffsizecontent);
|
$pdf->SetFont('', '', $default_font_size - $diffsizecontent);
|
||||||
|
|
||||||
if (empty($onlynumber) && !empty($account->domiciliation))
|
if (empty($onlynumber) && !empty($account->domiciliation)) {
|
||||||
{
|
|
||||||
$pdf->SetXY($curx, $cury);
|
$pdf->SetXY($curx, $cury);
|
||||||
$val = $outputlangs->transnoentities("Residence").': '.$outputlangs->convToOutputCharset($account->domiciliation);
|
$val = $outputlangs->transnoentities("Residence").': '.$outputlangs->convToOutputCharset($account->domiciliation);
|
||||||
$pdf->MultiCell(100, 3, $val, 0, 'L', 0);
|
$pdf->MultiCell(100, 3, $val, 0, 'L', 0);
|
||||||
@ -828,15 +827,15 @@ function pdf_bank(&$pdf, $outputlangs, $curx, $cury, $account, $onlynumber = 0,
|
|||||||
$cury += $tmpy;
|
$cury += $tmpy;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!empty($account->proprio))
|
if (!empty($account->proprio)) {
|
||||||
{
|
|
||||||
$pdf->SetXY($curx, $cury);
|
$pdf->SetXY($curx, $cury);
|
||||||
$val = $outputlangs->transnoentities("BankAccountOwner").': '.$outputlangs->convToOutputCharset($account->proprio);
|
$val = $outputlangs->transnoentities("BankAccountOwner").': '.$outputlangs->convToOutputCharset($account->proprio);
|
||||||
$pdf->MultiCell(100, 3, $val, 0, 'L', 0);
|
$pdf->MultiCell(100, 3, $val, 0, 'L', 0);
|
||||||
$tmpy = $pdf->getStringHeight(100, $val);
|
$tmpy = $pdf->getStringHeight(100, $val);
|
||||||
$cury += $tmpy;
|
$cury += $tmpy;
|
||||||
$cur += 1;
|
} elseif (!$usedetailedbban) {
|
||||||
} elseif (!$usedetailedbban) $cury += 1;
|
$cury += 1;
|
||||||
|
}
|
||||||
|
|
||||||
// Use correct name of bank id according to country
|
// Use correct name of bank id according to country
|
||||||
$ibankey = FormBank::getIBANLabel($account);
|
$ibankey = FormBank::getIBANLabel($account);
|
||||||
@ -1625,7 +1624,7 @@ function pdf_getlineupexcltax($object, $i, $outputlangs, $hidedetails = 0)
|
|||||||
{
|
{
|
||||||
if (empty($hidedetails) || $hidedetails > 1)
|
if (empty($hidedetails) || $hidedetails > 1)
|
||||||
{
|
{
|
||||||
$subprice = ($conf->multicurrency->enabled && $object->multicurrency_tx != 1 ? $object->lines[$i]->multicurrency_subprice : $object->lines[$i]->subprice);
|
$subprice = (!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1 ? $object->lines[$i]->multicurrency_subprice : $object->lines[$i]->subprice);
|
||||||
$result .= price($sign * $subprice, 0, $outputlangs);
|
$result .= price($sign * $subprice, 0, $outputlangs);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1966,7 +1965,7 @@ function pdf_getlinetotalexcltax($object, $i, $outputlangs, $hidedetails = 0)
|
|||||||
}
|
}
|
||||||
elseif (empty($hidedetails) || $hidedetails > 1)
|
elseif (empty($hidedetails) || $hidedetails > 1)
|
||||||
{
|
{
|
||||||
$total_ht = ($conf->multicurrency->enabled && $object->multicurrency_tx != 1 ? $object->lines[$i]->multicurrency_total_ht : $object->lines[$i]->total_ht);
|
$total_ht = (!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1 ? $object->lines[$i]->multicurrency_total_ht : $object->lines[$i]->total_ht);
|
||||||
if ($object->lines[$i]->situation_percent > 0)
|
if ($object->lines[$i]->situation_percent > 0)
|
||||||
{
|
{
|
||||||
// TODO Remove this. The total should be saved correctly in database instead of being modified here.
|
// TODO Remove this. The total should be saved correctly in database instead of being modified here.
|
||||||
@ -2023,7 +2022,7 @@ function pdf_getlinetotalwithtax($object, $i, $outputlangs, $hidedetails = 0)
|
|||||||
}
|
}
|
||||||
elseif (empty($hidedetails) || $hidedetails > 1)
|
elseif (empty($hidedetails) || $hidedetails > 1)
|
||||||
{
|
{
|
||||||
$total_ttc = ($conf->multicurrency->enabled && $object->multicurrency_tx != 1 ? $object->lines[$i]->multicurrency_total_ttc : $object->lines[$i]->total_ttc);
|
$total_ttc = (!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1 ? $object->lines[$i]->multicurrency_total_ttc : $object->lines[$i]->total_ttc);
|
||||||
if ($object->lines[$i]->situation_percent > 0)
|
if ($object->lines[$i]->situation_percent > 0)
|
||||||
{
|
{
|
||||||
// TODO Remove this. The total should be saved correctly in database instead of being modified here.
|
// TODO Remove this. The total should be saved correctly in database instead of being modified here.
|
||||||
|
|||||||
@ -678,10 +678,7 @@ function projectLinesa(&$inc, $parent, &$lines, &$level, $var, $showproject, &$t
|
|||||||
print $hookmanager->resPrint;
|
print $hookmanager->resPrint;
|
||||||
|
|
||||||
// Tick to drag and drop
|
// Tick to drag and drop
|
||||||
if ($addordertick)
|
print '<td class="tdlineupdown center"></td>';
|
||||||
{
|
|
||||||
print '<td class="tdlineupdown hideonsmartphone center"> </td>';
|
|
||||||
}
|
|
||||||
|
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
@ -796,7 +793,7 @@ function projectLinesa(&$inc, $parent, &$lines, &$level, $var, $showproject, &$t
|
|||||||
{
|
{
|
||||||
print '<td></td>';
|
print '<td></td>';
|
||||||
}
|
}
|
||||||
if ($addordertick) print '<td class="hideonsmartphone"></td>';
|
print '<td class=""></td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -512,7 +512,7 @@ class pdf_einstein extends ModelePDFCommandes
|
|||||||
$pdf->MultiCell($this->page_largeur - $this->marge_droite - $this->postotalht, 3, $total_excl_tax, 0, 'R', 0);
|
$pdf->MultiCell($this->page_largeur - $this->marge_droite - $this->postotalht, 3, $total_excl_tax, 0, 'R', 0);
|
||||||
|
|
||||||
// Collection of totals by value of vat in $this->vat["rate"] = total_tva
|
// Collection of totals by value of vat in $this->vat["rate"] = total_tva
|
||||||
if ($conf->multicurrency->enabled && $object->multicurrency_tx != 1) $tvaligne = $object->lines[$i]->multicurrency_total_tva;
|
if (!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1) $tvaligne = $object->lines[$i]->multicurrency_total_tva;
|
||||||
else $tvaligne = $object->lines[$i]->total_tva;
|
else $tvaligne = $object->lines[$i]->total_tva;
|
||||||
|
|
||||||
$localtax1ligne = $object->lines[$i]->total_localtax1;
|
$localtax1ligne = $object->lines[$i]->total_localtax1;
|
||||||
@ -900,14 +900,14 @@ class pdf_einstein extends ModelePDFCommandes
|
|||||||
$pdf->SetXY($col1x, $tab2_top + 0);
|
$pdf->SetXY($col1x, $tab2_top + 0);
|
||||||
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $outputlangs->transnoentities("TotalHT").(is_object($outputlangsbis) ? ' / '.$outputlangsbis->transnoentities("TotalHT") : ''), 0, 'L', 1);
|
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $outputlangs->transnoentities("TotalHT").(is_object($outputlangsbis) ? ' / '.$outputlangsbis->transnoentities("TotalHT") : ''), 0, 'L', 1);
|
||||||
|
|
||||||
$total_ht = (($conf->multicurrency->enabled && isset($object->multicurrency_tx) && $object->multicurrency_tx != 1) ? $object->multicurrency_total_ht : $object->total_ht);
|
$total_ht = ((!empty($conf->multicurrency->enabled) && isset($object->multicurrency_tx) && $object->multicurrency_tx != 1) ? $object->multicurrency_total_ht : $object->total_ht);
|
||||||
$pdf->SetXY($col2x, $tab2_top + 0);
|
$pdf->SetXY($col2x, $tab2_top + 0);
|
||||||
$pdf->MultiCell($largcol2, $tab2_hl, price($total_ht + (!empty($object->remise) ? $object->remise : 0), 0, $outputlangs), 0, 'R', 1);
|
$pdf->MultiCell($largcol2, $tab2_hl, price($total_ht + (!empty($object->remise) ? $object->remise : 0), 0, $outputlangs), 0, 'R', 1);
|
||||||
|
|
||||||
// Show VAT by rates and total
|
// Show VAT by rates and total
|
||||||
$pdf->SetFillColor(248, 248, 248);
|
$pdf->SetFillColor(248, 248, 248);
|
||||||
|
|
||||||
$total_ttc = ($conf->multicurrency->enabled && $object->multicurrency_tx != 1) ? $object->multicurrency_total_ttc : $object->total_ttc;
|
$total_ttc = (!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1) ? $object->multicurrency_total_ttc : $object->total_ttc;
|
||||||
|
|
||||||
$this->atleastoneratenotnull = 0;
|
$this->atleastoneratenotnull = 0;
|
||||||
if (empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT))
|
if (empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT))
|
||||||
|
|||||||
@ -735,7 +735,7 @@ class pdf_eratosthene extends ModelePDFCommandes
|
|||||||
|
|
||||||
|
|
||||||
// Collection of totals by value of vat in $this->tva["rate"] = total_tva
|
// Collection of totals by value of vat in $this->tva["rate"] = total_tva
|
||||||
if ($conf->multicurrency->enabled && $object->multicurrency_tx != 1) $tvaligne = $object->lines[$i]->multicurrency_total_tva;
|
if (!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1) $tvaligne = $object->lines[$i]->multicurrency_total_tva;
|
||||||
else $tvaligne = $object->lines[$i]->total_tva;
|
else $tvaligne = $object->lines[$i]->total_tva;
|
||||||
|
|
||||||
$localtax1ligne = $object->lines[$i]->total_localtax1;
|
$localtax1ligne = $object->lines[$i]->total_localtax1;
|
||||||
@ -1114,14 +1114,14 @@ class pdf_eratosthene extends ModelePDFCommandes
|
|||||||
$pdf->SetFillColor(255, 255, 255);
|
$pdf->SetFillColor(255, 255, 255);
|
||||||
$pdf->SetXY($col1x, $tab2_top + 0);
|
$pdf->SetXY($col1x, $tab2_top + 0);
|
||||||
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $outputlangs->transnoentities("TotalHT").(is_object($outputlangsbis) ? ' / '.$outputlangsbis->transnoentities("TotalHT") : ''), 0, 'L', 1);
|
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $outputlangs->transnoentities("TotalHT").(is_object($outputlangsbis) ? ' / '.$outputlangsbis->transnoentities("TotalHT") : ''), 0, 'L', 1);
|
||||||
$total_ht = (($conf->multicurrency->enabled && isset($object->multicurrency_tx) && $object->multicurrency_tx != 1) ? $object->multicurrency_total_ht : $object->total_ht);
|
$total_ht = ((!empty($conf->multicurrency->enabled) && isset($object->multicurrency_tx) && $object->multicurrency_tx != 1) ? $object->multicurrency_total_ht : $object->total_ht);
|
||||||
$pdf->SetXY($col2x, $tab2_top + 0);
|
$pdf->SetXY($col2x, $tab2_top + 0);
|
||||||
$pdf->MultiCell($largcol2, $tab2_hl, price($total_ht + (!empty($object->remise) ? $object->remise : 0), 0, $outputlangs), 0, 'R', 1);
|
$pdf->MultiCell($largcol2, $tab2_hl, price($total_ht + (!empty($object->remise) ? $object->remise : 0), 0, $outputlangs), 0, 'R', 1);
|
||||||
|
|
||||||
// Show VAT by rates and total
|
// Show VAT by rates and total
|
||||||
$pdf->SetFillColor(248, 248, 248);
|
$pdf->SetFillColor(248, 248, 248);
|
||||||
|
|
||||||
$total_ttc = ($conf->multicurrency->enabled && $object->multicurrency_tx != 1) ? $object->multicurrency_total_ttc : $object->total_ttc;
|
$total_ttc = (!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1) ? $object->multicurrency_total_ttc : $object->total_ttc;
|
||||||
|
|
||||||
$this->atleastoneratenotnull = 0;
|
$this->atleastoneratenotnull = 0;
|
||||||
if (empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT))
|
if (empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT))
|
||||||
|
|||||||
@ -632,10 +632,10 @@ class pdf_crabe extends ModelePDFFactures
|
|||||||
$prev_progress = $object->lines[$i]->get_prev_progress($object->id);
|
$prev_progress = $object->lines[$i]->get_prev_progress($object->id);
|
||||||
if ($prev_progress > 0 && !empty($object->lines[$i]->situation_percent)) // Compute progress from previous situation
|
if ($prev_progress > 0 && !empty($object->lines[$i]->situation_percent)) // Compute progress from previous situation
|
||||||
{
|
{
|
||||||
if ($conf->multicurrency->enabled && $object->multicurrency_tx != 1) $tvaligne = $sign * $object->lines[$i]->multicurrency_total_tva * ($object->lines[$i]->situation_percent - $prev_progress) / $object->lines[$i]->situation_percent;
|
if (!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1) $tvaligne = $sign * $object->lines[$i]->multicurrency_total_tva * ($object->lines[$i]->situation_percent - $prev_progress) / $object->lines[$i]->situation_percent;
|
||||||
else $tvaligne = $sign * $object->lines[$i]->total_tva * ($object->lines[$i]->situation_percent - $prev_progress) / $object->lines[$i]->situation_percent;
|
else $tvaligne = $sign * $object->lines[$i]->total_tva * ($object->lines[$i]->situation_percent - $prev_progress) / $object->lines[$i]->situation_percent;
|
||||||
} else {
|
} else {
|
||||||
if ($conf->multicurrency->enabled && $object->multicurrency_tx != 1) $tvaligne = $sign * $object->lines[$i]->multicurrency_total_tva;
|
if (!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1) $tvaligne = $sign * $object->lines[$i]->multicurrency_total_tva;
|
||||||
else $tvaligne = $sign * $object->lines[$i]->total_tva;
|
else $tvaligne = $sign * $object->lines[$i]->total_tva;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -853,7 +853,7 @@ class pdf_crabe extends ModelePDFFactures
|
|||||||
$pdf->SetXY($tab3_posx, $tab3_top + $y);
|
$pdf->SetXY($tab3_posx, $tab3_top + $y);
|
||||||
$pdf->MultiCell(20, 3, dol_print_date($this->db->jdate($obj->datef), 'day', false, $outputlangs, true), 0, 'L', 0);
|
$pdf->MultiCell(20, 3, dol_print_date($this->db->jdate($obj->datef), 'day', false, $outputlangs, true), 0, 'L', 0);
|
||||||
$pdf->SetXY($tab3_posx + 21, $tab3_top + $y);
|
$pdf->SetXY($tab3_posx + 21, $tab3_top + $y);
|
||||||
$pdf->MultiCell(20, 3, price(($conf->multicurrency->enabled && $object->multicurrency_tx != 1) ? $obj->multicurrency_amount_ttc : $obj->amount_ttc, 0, $outputlangs), 0, 'L', 0);
|
$pdf->MultiCell(20, 3, price((!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1) ? $obj->multicurrency_amount_ttc : $obj->amount_ttc, 0, $outputlangs), 0, 'L', 0);
|
||||||
$pdf->SetXY($tab3_posx + 40, $tab3_top + $y);
|
$pdf->SetXY($tab3_posx + 40, $tab3_top + $y);
|
||||||
$pdf->MultiCell(20, 3, $text, 0, 'L', 0);
|
$pdf->MultiCell(20, 3, $text, 0, 'L', 0);
|
||||||
$pdf->SetXY($tab3_posx + 58, $tab3_top + $y);
|
$pdf->SetXY($tab3_posx + 58, $tab3_top + $y);
|
||||||
@ -901,7 +901,7 @@ class pdf_crabe extends ModelePDFFactures
|
|||||||
$pdf->SetXY($tab3_posx, $tab3_top + $y);
|
$pdf->SetXY($tab3_posx, $tab3_top + $y);
|
||||||
$pdf->MultiCell(20, 3, dol_print_date($this->db->jdate($row->date), 'day', false, $outputlangs, true), 0, 'L', 0);
|
$pdf->MultiCell(20, 3, dol_print_date($this->db->jdate($row->date), 'day', false, $outputlangs, true), 0, 'L', 0);
|
||||||
$pdf->SetXY($tab3_posx + 21, $tab3_top + $y);
|
$pdf->SetXY($tab3_posx + 21, $tab3_top + $y);
|
||||||
$pdf->MultiCell(20, 3, price($sign * (($conf->multicurrency->enabled && $object->multicurrency_tx != 1) ? $row->multicurrency_amount : $row->amount), 0, $outputlangs), 0, 'L', 0);
|
$pdf->MultiCell(20, 3, price($sign * ((!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1) ? $row->multicurrency_amount : $row->amount), 0, $outputlangs), 0, 'L', 0);
|
||||||
$pdf->SetXY($tab3_posx + 40, $tab3_top + $y);
|
$pdf->SetXY($tab3_posx + 40, $tab3_top + $y);
|
||||||
$oper = $outputlangs->transnoentitiesnoconv("PaymentTypeShort".$row->code);
|
$oper = $outputlangs->transnoentitiesnoconv("PaymentTypeShort".$row->code);
|
||||||
|
|
||||||
@ -1177,14 +1177,14 @@ class pdf_crabe extends ModelePDFFactures
|
|||||||
$pdf->SetXY($col1x, $tab2_top + 0);
|
$pdf->SetXY($col1x, $tab2_top + 0);
|
||||||
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $outputlangs->transnoentities("TotalHT"), 0, 'L', 1);
|
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $outputlangs->transnoentities("TotalHT"), 0, 'L', 1);
|
||||||
|
|
||||||
$total_ht = (($conf->multicurrency->enabled && isset($object->multicurrency_tx) && $object->multicurrency_tx != 1) ? $object->multicurrency_total_ht : $object->total_ht);
|
$total_ht = ((!empty($conf->multicurrency->enabled) && isset($object->multicurrency_tx) && $object->multicurrency_tx != 1) ? $object->multicurrency_total_ht : $object->total_ht);
|
||||||
$pdf->SetXY($col2x, $tab2_top + 0);
|
$pdf->SetXY($col2x, $tab2_top + 0);
|
||||||
$pdf->MultiCell($largcol2, $tab2_hl, price($sign * ($total_ht + (!empty($object->remise) ? $object->remise : 0)), 0, $outputlangs), 0, 'R', 1);
|
$pdf->MultiCell($largcol2, $tab2_hl, price($sign * ($total_ht + (!empty($object->remise) ? $object->remise : 0)), 0, $outputlangs), 0, 'R', 1);
|
||||||
|
|
||||||
// Show VAT by rates and total
|
// Show VAT by rates and total
|
||||||
$pdf->SetFillColor(248, 248, 248);
|
$pdf->SetFillColor(248, 248, 248);
|
||||||
|
|
||||||
$total_ttc = ($conf->multicurrency->enabled && $object->multicurrency_tx != 1) ? $object->multicurrency_total_ttc : $object->total_ttc;
|
$total_ttc = (!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1) ? $object->multicurrency_total_ttc : $object->total_ttc;
|
||||||
|
|
||||||
$this->atleastoneratenotnull = 0;
|
$this->atleastoneratenotnull = 0;
|
||||||
if (empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT))
|
if (empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT))
|
||||||
@ -1405,8 +1405,8 @@ class pdf_crabe extends ModelePDFFactures
|
|||||||
}
|
}
|
||||||
|
|
||||||
$pdf->SetTextColor(0, 0, 0);
|
$pdf->SetTextColor(0, 0, 0);
|
||||||
$creditnoteamount = $object->getSumCreditNotesUsed(($conf->multicurrency->enabled && $object->multicurrency_tx != 1) ? 1 : 0); // Warning, this also include excess received
|
$creditnoteamount = $object->getSumCreditNotesUsed((!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1) ? 1 : 0); // Warning, this also include excess received
|
||||||
$depositsamount = $object->getSumDepositsUsed(($conf->multicurrency->enabled && $object->multicurrency_tx != 1) ? 1 : 0);
|
$depositsamount = $object->getSumDepositsUsed((!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1) ? 1 : 0);
|
||||||
//print "x".$creditnoteamount."-".$depositsamount;exit;
|
//print "x".$creditnoteamount."-".$depositsamount;exit;
|
||||||
$resteapayer = price2num($total_ttc - $deja_regle - $creditnoteamount - $depositsamount, 'MT');
|
$resteapayer = price2num($total_ttc - $deja_regle - $creditnoteamount - $depositsamount, 'MT');
|
||||||
if (!empty($object->paye)) $resteapayer = 0;
|
if (!empty($object->paye)) $resteapayer = 0;
|
||||||
|
|||||||
@ -293,9 +293,9 @@ class pdf_sponge extends ModelePDFFactures
|
|||||||
{
|
{
|
||||||
$object->fetch_thirdparty();
|
$object->fetch_thirdparty();
|
||||||
|
|
||||||
$deja_regle = $object->getSommePaiement(($conf->multicurrency->enabled && $object->multicurrency_tx != 1) ? 1 : 0);
|
$deja_regle = $object->getSommePaiement((!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1) ? 1 : 0);
|
||||||
$amount_credit_notes_included = $object->getSumCreditNotesUsed(($conf->multicurrency->enabled && $object->multicurrency_tx != 1) ? 1 : 0);
|
$amount_credit_notes_included = $object->getSumCreditNotesUsed((!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1) ? 1 : 0);
|
||||||
$amount_deposits_included = $object->getSumDepositsUsed(($conf->multicurrency->enabled && $object->multicurrency_tx != 1) ? 1 : 0);
|
$amount_deposits_included = $object->getSumDepositsUsed((!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1) ? 1 : 0);
|
||||||
|
|
||||||
// Definition of $dir and $file
|
// Definition of $dir and $file
|
||||||
if ($object->specimen)
|
if ($object->specimen)
|
||||||
@ -782,10 +782,10 @@ class pdf_sponge extends ModelePDFFactures
|
|||||||
$prev_progress = $object->lines[$i]->get_prev_progress($object->id);
|
$prev_progress = $object->lines[$i]->get_prev_progress($object->id);
|
||||||
if ($prev_progress > 0 && !empty($object->lines[$i]->situation_percent)) // Compute progress from previous situation
|
if ($prev_progress > 0 && !empty($object->lines[$i]->situation_percent)) // Compute progress from previous situation
|
||||||
{
|
{
|
||||||
if ($conf->multicurrency->enabled && $object->multicurrency_tx != 1) $tvaligne = $sign * $object->lines[$i]->multicurrency_total_tva * ($object->lines[$i]->situation_percent - $prev_progress) / $object->lines[$i]->situation_percent;
|
if (!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1) $tvaligne = $sign * $object->lines[$i]->multicurrency_total_tva * ($object->lines[$i]->situation_percent - $prev_progress) / $object->lines[$i]->situation_percent;
|
||||||
else $tvaligne = $sign * $object->lines[$i]->total_tva * ($object->lines[$i]->situation_percent - $prev_progress) / $object->lines[$i]->situation_percent;
|
else $tvaligne = $sign * $object->lines[$i]->total_tva * ($object->lines[$i]->situation_percent - $prev_progress) / $object->lines[$i]->situation_percent;
|
||||||
} else {
|
} else {
|
||||||
if ($conf->multicurrency->enabled && $object->multicurrency_tx != 1) $tvaligne = $sign * $object->lines[$i]->multicurrency_total_tva;
|
if (!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1) $tvaligne = $sign * $object->lines[$i]->multicurrency_total_tva;
|
||||||
else $tvaligne = $sign * $object->lines[$i]->total_tva;
|
else $tvaligne = $sign * $object->lines[$i]->total_tva;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1002,7 +1002,7 @@ class pdf_sponge extends ModelePDFFactures
|
|||||||
$pdf->SetXY($tab3_posx, $tab3_top + $y);
|
$pdf->SetXY($tab3_posx, $tab3_top + $y);
|
||||||
$pdf->MultiCell(20, 3, dol_print_date($this->db->jdate($obj->datef), 'day', false, $outputlangs, true), 0, 'L', 0);
|
$pdf->MultiCell(20, 3, dol_print_date($this->db->jdate($obj->datef), 'day', false, $outputlangs, true), 0, 'L', 0);
|
||||||
$pdf->SetXY($tab3_posx + 21, $tab3_top + $y);
|
$pdf->SetXY($tab3_posx + 21, $tab3_top + $y);
|
||||||
$pdf->MultiCell(20, 3, price(($conf->multicurrency->enabled && $object->multicurrency_tx != 1) ? $obj->multicurrency_amount_ttc : $obj->amount_ttc, 0, $outputlangs), 0, 'L', 0);
|
$pdf->MultiCell(20, 3, price((!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1) ? $obj->multicurrency_amount_ttc : $obj->amount_ttc, 0, $outputlangs), 0, 'L', 0);
|
||||||
$pdf->SetXY($tab3_posx + 40, $tab3_top + $y);
|
$pdf->SetXY($tab3_posx + 40, $tab3_top + $y);
|
||||||
$pdf->MultiCell(20, 3, $text, 0, 'L', 0);
|
$pdf->MultiCell(20, 3, $text, 0, 'L', 0);
|
||||||
$pdf->SetXY($tab3_posx + 58, $tab3_top + $y);
|
$pdf->SetXY($tab3_posx + 58, $tab3_top + $y);
|
||||||
@ -1039,7 +1039,7 @@ class pdf_sponge extends ModelePDFFactures
|
|||||||
$pdf->SetXY($tab3_posx, $tab3_top + $y);
|
$pdf->SetXY($tab3_posx, $tab3_top + $y);
|
||||||
$pdf->MultiCell(20, 3, dol_print_date($this->db->jdate($row->date), 'day', false, $outputlangs, true), 0, 'L', 0);
|
$pdf->MultiCell(20, 3, dol_print_date($this->db->jdate($row->date), 'day', false, $outputlangs, true), 0, 'L', 0);
|
||||||
$pdf->SetXY($tab3_posx + 21, $tab3_top + $y);
|
$pdf->SetXY($tab3_posx + 21, $tab3_top + $y);
|
||||||
$pdf->MultiCell(20, 3, price($sign * (($conf->multicurrency->enabled && $object->multicurrency_tx != 1) ? $row->multicurrency_amount : $row->amount), 0, $outputlangs), 0, 'L', 0);
|
$pdf->MultiCell(20, 3, price($sign * ((!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1) ? $row->multicurrency_amount : $row->amount), 0, $outputlangs), 0, 'L', 0);
|
||||||
$pdf->SetXY($tab3_posx + 40, $tab3_top + $y);
|
$pdf->SetXY($tab3_posx + 40, $tab3_top + $y);
|
||||||
$oper = $outputlangs->transnoentitiesnoconv("PaymentTypeShort".$row->code);
|
$oper = $outputlangs->transnoentitiesnoconv("PaymentTypeShort".$row->code);
|
||||||
|
|
||||||
@ -1396,7 +1396,7 @@ class pdf_sponge extends ModelePDFFactures
|
|||||||
$tab2_top += 3;
|
$tab2_top += 3;
|
||||||
|
|
||||||
// Get Total HT
|
// Get Total HT
|
||||||
$total_ht = ($conf->multicurrency->enabled && $object->mylticurrency_tx != 1 ? $object->multicurrency_total_ht : $object->total_ht);
|
$total_ht = (!empty($conf->multicurrency->enabled) && $object->mylticurrency_tx != 1 ? $object->multicurrency_total_ht : $object->total_ht);
|
||||||
|
|
||||||
// Total remise
|
// Total remise
|
||||||
$total_line_remise = 0;
|
$total_line_remise = 0;
|
||||||
@ -1432,14 +1432,14 @@ class pdf_sponge extends ModelePDFFactures
|
|||||||
$pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index);
|
$pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index);
|
||||||
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $outputlangs->transnoentities("TotalHT").(is_object($outputlangsbis) ? ' / '.$outputlangsbis->transnoentities("TotalHT") : ''), 0, 'L', 1);
|
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $outputlangs->transnoentities("TotalHT").(is_object($outputlangsbis) ? ' / '.$outputlangsbis->transnoentities("TotalHT") : ''), 0, 'L', 1);
|
||||||
|
|
||||||
$total_ht = (($conf->multicurrency->enabled && isset($object->multicurrency_tx) && $object->multicurrency_tx != 1) ? $object->multicurrency_total_ht : $object->total_ht);
|
$total_ht = ((!empty($conf->multicurrency->enabled) && isset($object->multicurrency_tx) && $object->multicurrency_tx != 1) ? $object->multicurrency_total_ht : $object->total_ht);
|
||||||
$pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
|
$pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
|
||||||
$pdf->MultiCell($largcol2, $tab2_hl, price($sign * ($total_ht + (!empty($object->remise) ? $object->remise : 0)), 0, $outputlangs), 0, 'R', 1);
|
$pdf->MultiCell($largcol2, $tab2_hl, price($sign * ($total_ht + (!empty($object->remise) ? $object->remise : 0)), 0, $outputlangs), 0, 'R', 1);
|
||||||
|
|
||||||
// Show VAT by rates and total
|
// Show VAT by rates and total
|
||||||
$pdf->SetFillColor(248, 248, 248);
|
$pdf->SetFillColor(248, 248, 248);
|
||||||
|
|
||||||
$total_ttc = ($conf->multicurrency->enabled && $object->multicurrency_tx != 1) ? $object->multicurrency_total_ttc : $object->total_ttc;
|
$total_ttc = (!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1) ? $object->multicurrency_total_ttc : $object->total_ttc;
|
||||||
|
|
||||||
$this->atleastoneratenotnull = 0;
|
$this->atleastoneratenotnull = 0;
|
||||||
if (empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT))
|
if (empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT))
|
||||||
@ -1693,8 +1693,8 @@ class pdf_sponge extends ModelePDFFactures
|
|||||||
|
|
||||||
$pdf->SetTextColor(0, 0, 0);
|
$pdf->SetTextColor(0, 0, 0);
|
||||||
|
|
||||||
$creditnoteamount = $object->getSumCreditNotesUsed(($conf->multicurrency->enabled && $object->multicurrency_tx != 1) ? 1 : 0); // Warning, this also include excess received
|
$creditnoteamount = $object->getSumCreditNotesUsed((!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1) ? 1 : 0); // Warning, this also include excess received
|
||||||
$depositsamount = $object->getSumDepositsUsed(($conf->multicurrency->enabled && $object->multicurrency_tx != 1) ? 1 : 0);
|
$depositsamount = $object->getSumDepositsUsed((!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1) ? 1 : 0);
|
||||||
|
|
||||||
$resteapayer = price2num($total_ttc - $deja_regle - $creditnoteamount - $depositsamount, 'MT');
|
$resteapayer = price2num($total_ttc - $deja_regle - $creditnoteamount - $depositsamount, 'MT');
|
||||||
if (!empty($object->paye)) $resteapayer = 0;
|
if (!empty($object->paye)) $resteapayer = 0;
|
||||||
|
|||||||
@ -113,7 +113,7 @@ class modAgenda extends DolibarrModules
|
|||||||
//------------
|
//------------
|
||||||
$datestart = dol_now();
|
$datestart = dol_now();
|
||||||
$this->cronjobs = array(
|
$this->cronjobs = array(
|
||||||
0=>array('label'=>'SendEmailsReminders', 'jobtype'=>'method', 'class'=>'comm/action/class/actioncomm.class.php', 'objectname'=>'ActionComm', 'method'=>'sendEmailsReminder', 'parameters'=>'', 'comment'=>'SendEMailsReminder', 'frequency'=>10, 'unitfrequency'=>60, 'priority'=>10, 'status'=>1, 'test'=>'$conf->agenda->enabled', 'datestart'=>$datestart),
|
0=>array('label'=>'SendEmailsReminders', 'jobtype'=>'method', 'class'=>'comm/action/class/actioncomm.class.php', 'objectname'=>'ActionComm', 'method'=>'sendEmailsReminder', 'parameters'=>'', 'comment'=>'SendEMailsReminder', 'frequency'=>5, 'unitfrequency'=>60, 'priority'=>10, 'status'=>1, 'test'=>'$conf->agenda->enabled', 'datestart'=>$datestart),
|
||||||
);
|
);
|
||||||
|
|
||||||
// Permissions
|
// Permissions
|
||||||
|
|||||||
@ -649,7 +649,7 @@ class modProduct extends DolibarrModules
|
|||||||
'sp.remise_percent'=>'DiscountQtyMin'
|
'sp.remise_percent'=>'DiscountQtyMin'
|
||||||
));
|
));
|
||||||
|
|
||||||
if ($conf->multicurrency->enabled)
|
if (!empty($conf->multicurrency->enabled))
|
||||||
{
|
{
|
||||||
$this->import_fields_array[$r] = array_merge($this->import_fields_array[$r], array(
|
$this->import_fields_array[$r] = array_merge($this->import_fields_array[$r], array(
|
||||||
'sp.fk_multicurrency'=>'CurrencyCodeId', //ideally this should be automatically obtained from the CurrencyCode on the next line
|
'sp.fk_multicurrency'=>'CurrencyCodeId', //ideally this should be automatically obtained from the CurrencyCode on the next line
|
||||||
@ -708,7 +708,7 @@ class modProduct extends DolibarrModules
|
|||||||
// TODO Make this field not required and calculate it from price and qty
|
// TODO Make this field not required and calculate it from price and qty
|
||||||
'sp.remise_percent' => '20'
|
'sp.remise_percent' => '20'
|
||||||
));
|
));
|
||||||
if ($conf->multicurrency->enabled)
|
if (!empty($conf->multicurrency->enabled))
|
||||||
{
|
{
|
||||||
$this->import_examplevalues_array[$r] = array_merge($this->import_examplevalues_array[$r], array(
|
$this->import_examplevalues_array[$r] = array_merge($this->import_examplevalues_array[$r], array(
|
||||||
'sp.fk_multicurrency'=>'eg: 2, rowid for code of multicurrency currency',
|
'sp.fk_multicurrency'=>'eg: 2, rowid for code of multicurrency currency',
|
||||||
|
|||||||
@ -444,7 +444,7 @@ class pdf_standard extends ModelePDFProduct
|
|||||||
$pdf->MultiCell($this->page_largeur-$this->marge_droite-$this->postotalht, 3, $total_excl_tax, 0, 'R', 0);
|
$pdf->MultiCell($this->page_largeur-$this->marge_droite-$this->postotalht, 3, $total_excl_tax, 0, 'R', 0);
|
||||||
|
|
||||||
// Collecte des totaux par valeur de tva dans $this->tva["taux"]=total_tva
|
// Collecte des totaux par valeur de tva dans $this->tva["taux"]=total_tva
|
||||||
if ($conf->multicurrency->enabled && $object->multicurrency_tx != 1) $tvaligne=$object->lines[$i]->multicurrency_total_tva;
|
if (!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1) $tvaligne=$object->lines[$i]->multicurrency_total_tva;
|
||||||
else $tvaligne=$object->lines[$i]->total_tva;
|
else $tvaligne=$object->lines[$i]->total_tva;
|
||||||
|
|
||||||
$localtax1ligne=$object->lines[$i]->total_localtax1;
|
$localtax1ligne=$object->lines[$i]->total_localtax1;
|
||||||
|
|||||||
@ -605,7 +605,7 @@ class pdf_azur extends ModelePDFPropales
|
|||||||
$pdf->MultiCell($this->page_largeur - $this->marge_droite - $this->postotalht, 3, $total_excl_tax, 0, 'R', 0);
|
$pdf->MultiCell($this->page_largeur - $this->marge_droite - $this->postotalht, 3, $total_excl_tax, 0, 'R', 0);
|
||||||
|
|
||||||
// Collecte des totaux par valeur de tva dans $this->tva["taux"]=total_tva
|
// Collecte des totaux par valeur de tva dans $this->tva["taux"]=total_tva
|
||||||
if ($conf->multicurrency->enabled && $object->multicurrency_tx != 1) $tvaligne = $object->lines[$i]->multicurrency_total_tva;
|
if (!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1) $tvaligne = $object->lines[$i]->multicurrency_total_tva;
|
||||||
else $tvaligne = $object->lines[$i]->total_tva;
|
else $tvaligne = $object->lines[$i]->total_tva;
|
||||||
|
|
||||||
$localtax1ligne = $object->lines[$i]->total_localtax1;
|
$localtax1ligne = $object->lines[$i]->total_localtax1;
|
||||||
@ -1056,14 +1056,14 @@ class pdf_azur extends ModelePDFPropales
|
|||||||
$pdf->SetXY($col1x, $tab2_top + 0);
|
$pdf->SetXY($col1x, $tab2_top + 0);
|
||||||
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $outputlangs->transnoentities("TotalHT"), 0, 'L', 1);
|
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $outputlangs->transnoentities("TotalHT"), 0, 'L', 1);
|
||||||
|
|
||||||
$total_ht = (($conf->multicurrency->enabled && isset($object->multicurrency_tx) && $object->multicurrency_tx != 1) ? $object->multicurrency_total_ht : $object->total_ht);
|
$total_ht = ((!empty($conf->multicurrency->enabled) && isset($object->multicurrency_tx) && $object->multicurrency_tx != 1) ? $object->multicurrency_total_ht : $object->total_ht);
|
||||||
$pdf->SetXY($col2x, $tab2_top + 0);
|
$pdf->SetXY($col2x, $tab2_top + 0);
|
||||||
$pdf->MultiCell($largcol2, $tab2_hl, price($total_ht + (!empty($object->remise) ? $object->remise : 0), 0, $outputlangs), 0, 'R', 1);
|
$pdf->MultiCell($largcol2, $tab2_hl, price($total_ht + (!empty($object->remise) ? $object->remise : 0), 0, $outputlangs), 0, 'R', 1);
|
||||||
|
|
||||||
// Show VAT by rates and total
|
// Show VAT by rates and total
|
||||||
$pdf->SetFillColor(248, 248, 248);
|
$pdf->SetFillColor(248, 248, 248);
|
||||||
|
|
||||||
$total_ttc = ($conf->multicurrency->enabled && $object->multicurrency_tx != 1) ? $object->multicurrency_total_ttc : $object->total_ttc;
|
$total_ttc = (!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1) ? $object->multicurrency_total_ttc : $object->total_ttc;
|
||||||
|
|
||||||
$this->atleastoneratenotnull = 0;
|
$this->atleastoneratenotnull = 0;
|
||||||
if (empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT))
|
if (empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT))
|
||||||
|
|||||||
@ -747,7 +747,7 @@ class pdf_cyan extends ModelePDFPropales
|
|||||||
|
|
||||||
|
|
||||||
// Collection of totals by value of vat in $this->tva["rate"] = total_tva
|
// Collection of totals by value of vat in $this->tva["rate"] = total_tva
|
||||||
if ($conf->multicurrency->enabled && $object->multicurrency_tx != 1) $tvaligne = $object->lines[$i]->multicurrency_total_tva;
|
if (!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1) $tvaligne = $object->lines[$i]->multicurrency_total_tva;
|
||||||
else $tvaligne = $object->lines[$i]->total_tva;
|
else $tvaligne = $object->lines[$i]->total_tva;
|
||||||
|
|
||||||
$localtax1ligne = $object->lines[$i]->total_localtax1;
|
$localtax1ligne = $object->lines[$i]->total_localtax1;
|
||||||
@ -1199,14 +1199,14 @@ class pdf_cyan extends ModelePDFPropales
|
|||||||
$pdf->SetXY($col1x, $tab2_top + 0);
|
$pdf->SetXY($col1x, $tab2_top + 0);
|
||||||
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $outputlangs->transnoentities("TotalHT").(is_object($outputlangsbis) ? ' / '.$outputlangsbis->transnoentities("TotalHT") : ''), 0, 'L', 1);
|
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $outputlangs->transnoentities("TotalHT").(is_object($outputlangsbis) ? ' / '.$outputlangsbis->transnoentities("TotalHT") : ''), 0, 'L', 1);
|
||||||
|
|
||||||
$total_ht = (($conf->multicurrency->enabled && isset($object->multicurrency_tx) && $object->multicurrency_tx != 1) ? $object->multicurrency_total_ht : $object->total_ht);
|
$total_ht = ((!empty($conf->multicurrency->enabled) && isset($object->multicurrency_tx) && $object->multicurrency_tx != 1) ? $object->multicurrency_total_ht : $object->total_ht);
|
||||||
$pdf->SetXY($col2x, $tab2_top + 0);
|
$pdf->SetXY($col2x, $tab2_top + 0);
|
||||||
$pdf->MultiCell($largcol2, $tab2_hl, price($total_ht + (!empty($object->remise) ? $object->remise : 0), 0, $outputlangs), 0, 'R', 1);
|
$pdf->MultiCell($largcol2, $tab2_hl, price($total_ht + (!empty($object->remise) ? $object->remise : 0), 0, $outputlangs), 0, 'R', 1);
|
||||||
|
|
||||||
// Show VAT by rates and total
|
// Show VAT by rates and total
|
||||||
$pdf->SetFillColor(248, 248, 248);
|
$pdf->SetFillColor(248, 248, 248);
|
||||||
|
|
||||||
$total_ttc = ($conf->multicurrency->enabled && $object->multicurrency_tx != 1) ? $object->multicurrency_total_ttc : $object->total_ttc;
|
$total_ttc = (!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1) ? $object->multicurrency_total_ttc : $object->total_ttc;
|
||||||
|
|
||||||
$this->atleastoneratenotnull = 0;
|
$this->atleastoneratenotnull = 0;
|
||||||
if (empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT))
|
if (empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT))
|
||||||
|
|||||||
@ -224,9 +224,9 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
|
|||||||
{
|
{
|
||||||
$object->fetch_thirdparty();
|
$object->fetch_thirdparty();
|
||||||
|
|
||||||
$deja_regle = $object->getSommePaiement(($conf->multicurrency->enabled && $object->multicurrency_tx != 1) ? 1 : 0);
|
$deja_regle = $object->getSommePaiement((!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1) ? 1 : 0);
|
||||||
$amount_credit_notes_included = $object->getSumCreditNotesUsed(($conf->multicurrency->enabled && $object->multicurrency_tx != 1) ? 1 : 0);
|
$amount_credit_notes_included = $object->getSumCreditNotesUsed((!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1) ? 1 : 0);
|
||||||
$amount_deposits_included = $object->getSumDepositsUsed(($conf->multicurrency->enabled && $object->multicurrency_tx != 1) ? 1 : 0);
|
$amount_deposits_included = $object->getSumDepositsUsed((!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1) ? 1 : 0);
|
||||||
|
|
||||||
// Definition of $dir and $file
|
// Definition of $dir and $file
|
||||||
if ($object->specimen)
|
if ($object->specimen)
|
||||||
@ -490,7 +490,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
|
|||||||
$pdf->MultiCell($this->page_largeur - $this->marge_droite - $this->postotalht, 3, $total_excl_tax, 0, 'R', 0);
|
$pdf->MultiCell($this->page_largeur - $this->marge_droite - $this->postotalht, 3, $total_excl_tax, 0, 'R', 0);
|
||||||
|
|
||||||
// Collection of totals by VAT value in $this->tva["taux"]=total_tva
|
// Collection of totals by VAT value in $this->tva["taux"]=total_tva
|
||||||
if ($conf->multicurrency->enabled && $object->multicurrency_tx != 1) $tvaligne = $object->lines[$i]->multicurrency_total_tva;
|
if (!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1) $tvaligne = $object->lines[$i]->multicurrency_total_tva;
|
||||||
else $tvaligne = $object->lines[$i]->total_tva;
|
else $tvaligne = $object->lines[$i]->total_tva;
|
||||||
|
|
||||||
$localtax1ligne = $object->lines[$i]->total_localtax1;
|
$localtax1ligne = $object->lines[$i]->total_localtax1;
|
||||||
@ -656,14 +656,14 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
|
|||||||
$pdf->SetXY($col1x, $tab2_top + 0);
|
$pdf->SetXY($col1x, $tab2_top + 0);
|
||||||
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $outputlangs->transnoentities("TotalHT"), 0, 'L', 1);
|
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $outputlangs->transnoentities("TotalHT"), 0, 'L', 1);
|
||||||
|
|
||||||
$total_ht = (($conf->multicurrency->enabled && isset($object->multicurrency_tx) && $object->multicurrency_tx != 1) ? $object->multicurrency_total_ht : $object->total_ht);
|
$total_ht = ((!empty($conf->multicurrency->enabled) && isset($object->multicurrency_tx) && $object->multicurrency_tx != 1) ? $object->multicurrency_total_ht : $object->total_ht);
|
||||||
$pdf->SetXY($col2x, $tab2_top + 0);
|
$pdf->SetXY($col2x, $tab2_top + 0);
|
||||||
$pdf->MultiCell($largcol2, $tab2_hl, price($sign * ($total_ht + (!empty($object->remise) ? $object->remise : 0)), 0, $outputlangs), 0, 'R', 1);
|
$pdf->MultiCell($largcol2, $tab2_hl, price($sign * ($total_ht + (!empty($object->remise) ? $object->remise : 0)), 0, $outputlangs), 0, 'R', 1);
|
||||||
|
|
||||||
// Show VAT by rates and total
|
// Show VAT by rates and total
|
||||||
$pdf->SetFillColor(248, 248, 248);
|
$pdf->SetFillColor(248, 248, 248);
|
||||||
|
|
||||||
$total_ttc = ($conf->multicurrency->enabled && $object->multicurrency_tx != 1) ? $object->multicurrency_total_ttc : $object->total_ttc;
|
$total_ttc = (!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1) ? $object->multicurrency_total_ttc : $object->total_ttc;
|
||||||
|
|
||||||
$this->atleastoneratenotnull = 0;
|
$this->atleastoneratenotnull = 0;
|
||||||
foreach ($this->tva as $tvakey => $tvaval)
|
foreach ($this->tva as $tvakey => $tvaval)
|
||||||
@ -785,8 +785,8 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
|
|||||||
$pdf->MultiCell($largcol2, $tab2_hl, price($sign * $total_ttc, 0, $outputlangs), $useborder, 'R', 1);
|
$pdf->MultiCell($largcol2, $tab2_hl, price($sign * $total_ttc, 0, $outputlangs), $useborder, 'R', 1);
|
||||||
|
|
||||||
$pdf->SetTextColor(0, 0, 0);
|
$pdf->SetTextColor(0, 0, 0);
|
||||||
$creditnoteamount = $object->getSumCreditNotesUsed(($conf->multicurrency->enabled && $object->multicurrency_tx != 1) ? 1 : 0); // Warning, this also include excess received
|
$creditnoteamount = $object->getSumCreditNotesUsed((!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1) ? 1 : 0); // Warning, this also include excess received
|
||||||
$depositsamount = $object->getSumDepositsUsed(($conf->multicurrency->enabled && $object->multicurrency_tx != 1) ? 1 : 0);
|
$depositsamount = $object->getSumDepositsUsed((!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1) ? 1 : 0);
|
||||||
//print "x".$creditnoteamount."-".$depositsamount;exit;
|
//print "x".$creditnoteamount."-".$depositsamount;exit;
|
||||||
$resteapayer = price2num($total_ttc - $deja_regle - $creditnoteamount - $depositsamount, 'MT');
|
$resteapayer = price2num($total_ttc - $deja_regle - $creditnoteamount - $depositsamount, 'MT');
|
||||||
if (!empty($object->paye)) $resteapayer = 0;
|
if (!empty($object->paye)) $resteapayer = 0;
|
||||||
@ -1020,7 +1020,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
|
|||||||
$pdf->SetXY($tab3_posx, $tab3_top + $y);
|
$pdf->SetXY($tab3_posx, $tab3_top + $y);
|
||||||
$pdf->MultiCell(20, 3, dol_print_date($this->db->jdate($row->date), 'day', false, $outputlangs, true), 0, 'L', 0);
|
$pdf->MultiCell(20, 3, dol_print_date($this->db->jdate($row->date), 'day', false, $outputlangs, true), 0, 'L', 0);
|
||||||
$pdf->SetXY($tab3_posx + 21, $tab3_top + $y);
|
$pdf->SetXY($tab3_posx + 21, $tab3_top + $y);
|
||||||
$pdf->MultiCell(20, 3, price($sign * (($conf->multicurrency->enabled && $object->multicurrency_tx != 1) ? $row->multicurrency_amount : $row->amount)), 0, 'L', 0);
|
$pdf->MultiCell(20, 3, price($sign * ((!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1) ? $row->multicurrency_amount : $row->amount)), 0, 'L', 0);
|
||||||
$pdf->SetXY($tab3_posx + 40, $tab3_top + $y);
|
$pdf->SetXY($tab3_posx + 40, $tab3_top + $y);
|
||||||
$oper = $outputlangs->transnoentitiesnoconv("PaymentTypeShort".$row->code);
|
$oper = $outputlangs->transnoentitiesnoconv("PaymentTypeShort".$row->code);
|
||||||
|
|
||||||
|
|||||||
@ -666,7 +666,7 @@ class pdf_cornas extends ModelePDFSuppliersOrders
|
|||||||
|
|
||||||
|
|
||||||
// Collecte des totaux par valeur de tva dans $this->tva["taux"]=total_tva
|
// Collecte des totaux par valeur de tva dans $this->tva["taux"]=total_tva
|
||||||
if ($conf->multicurrency->enabled && $object->multicurrency_tx != 1) $tvaligne = $object->lines[$i]->multicurrency_total_tva;
|
if (!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1) $tvaligne = $object->lines[$i]->multicurrency_total_tva;
|
||||||
else $tvaligne = $object->lines[$i]->total_tva;
|
else $tvaligne = $object->lines[$i]->total_tva;
|
||||||
|
|
||||||
$localtax1ligne = $object->lines[$i]->total_localtax1;
|
$localtax1ligne = $object->lines[$i]->total_localtax1;
|
||||||
@ -924,7 +924,7 @@ class pdf_cornas extends ModelePDFSuppliersOrders
|
|||||||
$pdf->SetXY($col1x, $tab2_top + 0);
|
$pdf->SetXY($col1x, $tab2_top + 0);
|
||||||
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $outputlangs->transnoentities("TotalHT"), 0, 'L', 1);
|
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $outputlangs->transnoentities("TotalHT"), 0, 'L', 1);
|
||||||
|
|
||||||
$total_ht = (($conf->multicurrency->enabled && isset($object->multicurrency_tx) && $object->multicurrency_tx != 1) ? $object->multicurrency_total_ht : $object->total_ht);
|
$total_ht = ((!empty($conf->multicurrency->enabled) && isset($object->multicurrency_tx) && $object->multicurrency_tx != 1) ? $object->multicurrency_total_ht : $object->total_ht);
|
||||||
$pdf->SetXY($col2x, $tab2_top + 0);
|
$pdf->SetXY($col2x, $tab2_top + 0);
|
||||||
$pdf->MultiCell($largcol2, $tab2_hl, price($total_ht + (!empty($object->remise) ? $object->remise : 0)), 0, 'R', 1);
|
$pdf->MultiCell($largcol2, $tab2_hl, price($total_ht + (!empty($object->remise) ? $object->remise : 0)), 0, 'R', 1);
|
||||||
|
|
||||||
@ -1058,7 +1058,7 @@ class pdf_cornas extends ModelePDFSuppliersOrders
|
|||||||
$pdf->SetFillColor(224, 224, 224);
|
$pdf->SetFillColor(224, 224, 224);
|
||||||
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $outputlangs->transnoentities("TotalTTC"), $useborder, 'L', 1);
|
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $outputlangs->transnoentities("TotalTTC"), $useborder, 'L', 1);
|
||||||
|
|
||||||
$total_ttc = ($conf->multicurrency->enabled && $object->multicurrency_tx != 1) ? $object->multicurrency_total_ttc : $object->total_ttc;
|
$total_ttc = (!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1) ? $object->multicurrency_total_ttc : $object->total_ttc;
|
||||||
$pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
|
$pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
|
||||||
$pdf->MultiCell($largcol2, $tab2_hl, price($total_ttc), $useborder, 'R', 1);
|
$pdf->MultiCell($largcol2, $tab2_hl, price($total_ttc), $useborder, 'R', 1);
|
||||||
$pdf->SetFont('', '', $default_font_size - 1);
|
$pdf->SetFont('', '', $default_font_size - 1);
|
||||||
|
|||||||
@ -549,7 +549,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
|
|||||||
$pdf->MultiCell($this->page_largeur - $this->marge_droite - $this->postotalht, 3, $total_excl_tax, 0, 'R', 0);
|
$pdf->MultiCell($this->page_largeur - $this->marge_droite - $this->postotalht, 3, $total_excl_tax, 0, 'R', 0);
|
||||||
|
|
||||||
// Collecte des totaux par valeur de tva dans $this->tva["taux"]=total_tva
|
// Collecte des totaux par valeur de tva dans $this->tva["taux"]=total_tva
|
||||||
if ($conf->multicurrency->enabled && $object->multicurrency_tx != 1) $tvaligne = $object->lines[$i]->multicurrency_total_tva;
|
if (!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1) $tvaligne = $object->lines[$i]->multicurrency_total_tva;
|
||||||
else $tvaligne = $object->lines[$i]->total_tva;
|
else $tvaligne = $object->lines[$i]->total_tva;
|
||||||
|
|
||||||
$localtax1ligne = $object->lines[$i]->total_localtax1;
|
$localtax1ligne = $object->lines[$i]->total_localtax1;
|
||||||
@ -805,7 +805,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
|
|||||||
$pdf->SetXY($col1x, $tab2_top + 0);
|
$pdf->SetXY($col1x, $tab2_top + 0);
|
||||||
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $outputlangs->transnoentities("TotalHT"), 0, 'L', 1);
|
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $outputlangs->transnoentities("TotalHT"), 0, 'L', 1);
|
||||||
|
|
||||||
$total_ht = (($conf->multicurrency->enabled && isset($object->multicurrency_tx) && $object->multicurrency_tx != 1) ? $object->multicurrency_total_ht : $object->total_ht);
|
$total_ht = ((!empty($conf->multicurrency->enabled) && isset($object->multicurrency_tx) && $object->multicurrency_tx != 1) ? $object->multicurrency_total_ht : $object->total_ht);
|
||||||
$pdf->SetXY($col2x, $tab2_top + 0);
|
$pdf->SetXY($col2x, $tab2_top + 0);
|
||||||
$pdf->MultiCell($largcol2, $tab2_hl, price($total_ht + (!empty($object->remise) ? $object->remise : 0)), 0, 'R', 1);
|
$pdf->MultiCell($largcol2, $tab2_hl, price($total_ht + (!empty($object->remise) ? $object->remise : 0)), 0, 'R', 1);
|
||||||
|
|
||||||
@ -939,7 +939,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
|
|||||||
$pdf->SetFillColor(224, 224, 224);
|
$pdf->SetFillColor(224, 224, 224);
|
||||||
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $outputlangs->transnoentities("TotalTTC"), $useborder, 'L', 1);
|
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $outputlangs->transnoentities("TotalTTC"), $useborder, 'L', 1);
|
||||||
|
|
||||||
$total_ttc = ($conf->multicurrency->enabled && $object->multicurrency_tx != 1) ? $object->multicurrency_total_ttc : $object->total_ttc;
|
$total_ttc = (!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1) ? $object->multicurrency_total_ttc : $object->total_ttc;
|
||||||
$pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
|
$pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
|
||||||
$pdf->MultiCell($largcol2, $tab2_hl, price($total_ttc), $useborder, 'R', 1);
|
$pdf->MultiCell($largcol2, $tab2_hl, price($total_ttc), $useborder, 'R', 1);
|
||||||
$pdf->SetFont('', '', $default_font_size - 1);
|
$pdf->SetFont('', '', $default_font_size - 1);
|
||||||
|
|||||||
@ -545,7 +545,7 @@ class pdf_aurore extends ModelePDFSupplierProposal
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
// Collecte des totaux par valeur de tva dans $this->tva["taux"]=total_tva
|
// Collecte des totaux par valeur de tva dans $this->tva["taux"]=total_tva
|
||||||
if ($conf->multicurrency->enabled && $object->multicurrency_tx != 1) $tvaligne = $object->lines[$i]->multicurrency_total_tva;
|
if (!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1) $tvaligne = $object->lines[$i]->multicurrency_total_tva;
|
||||||
else $tvaligne = $object->lines[$i]->total_tva;
|
else $tvaligne = $object->lines[$i]->total_tva;
|
||||||
|
|
||||||
$localtax1ligne = $object->lines[$i]->total_localtax1;
|
$localtax1ligne = $object->lines[$i]->total_localtax1;
|
||||||
|
|||||||
@ -44,7 +44,8 @@ $forcereloadpage = empty($conf->global->MAIN_FORCE_RELOAD_PAGE) ? 0 : 1;
|
|||||||
$tagidfortablednd = (empty($tagidfortablednd) ? 'tablelines' : $tagidfortablednd);
|
$tagidfortablednd = (empty($tagidfortablednd) ? 'tablelines' : $tagidfortablednd);
|
||||||
$filepath = (empty($filepath) ? '' : $filepath);
|
$filepath = (empty($filepath) ? '' : $filepath);
|
||||||
|
|
||||||
if (GETPOST('action', 'aZ09') != 'editline' && $nboflines > 1) { ?>
|
|
||||||
|
if (GETPOST('action', 'aZ09') != 'editline' && $nboflines > 1 && $conf->browser->layout != 'phone') { ?>
|
||||||
<script>
|
<script>
|
||||||
$(document).ready(function(){
|
$(document).ready(function(){
|
||||||
$(".imgupforline").hide();
|
$(".imgupforline").hide();
|
||||||
|
|||||||
@ -35,7 +35,7 @@ $langs->loadLangs(array('admin', 'cron'));
|
|||||||
if (!$user->admin)
|
if (!$user->admin)
|
||||||
accessforbidden();
|
accessforbidden();
|
||||||
|
|
||||||
$actionsave = GETPOST("save");
|
$actionsave = GETPOST("save", 'alphanohtml');
|
||||||
|
|
||||||
// Save parameters
|
// Save parameters
|
||||||
if (!empty($actionsave))
|
if (!empty($actionsave))
|
||||||
@ -75,6 +75,8 @@ print '<input type="hidden" name="token" value="'.newToken().'">';
|
|||||||
|
|
||||||
print dol_get_fiche_head($head, 'setup', $langs->trans("Module2300Name"), -1, 'cron');
|
print dol_get_fiche_head($head, 'setup', $langs->trans("Module2300Name"), -1, 'cron');
|
||||||
|
|
||||||
|
print '<span class="opacitymedium">'.$langs->trans('CronInfo').'</span><br>';
|
||||||
|
|
||||||
print "<br>\n";
|
print "<br>\n";
|
||||||
|
|
||||||
print '<table class="noborder centpercent">';
|
print '<table class="noborder centpercent">';
|
||||||
@ -116,7 +118,7 @@ print '</form>';
|
|||||||
|
|
||||||
print '<br><br><br>';
|
print '<br><br><br>';
|
||||||
|
|
||||||
print $langs->trans("UseMenuModuleToolsToAddCronJobs", dol_buildpath('/cron/list.php?leftmenu=admintools', 1)).'<br>';
|
//print $langs->trans("UseMenuModuleToolsToAddCronJobs", dol_buildpath('/cron/list.php?leftmenu=admintools', 1)).'<br>';
|
||||||
if (!empty($conf->global->CRON_WARNING_DELAY_HOURS)) print info_admin($langs->trans("WarningCronDelayed", $conf->global->CRON_WARNING_DELAY_HOURS)).'<br>';
|
if (!empty($conf->global->CRON_WARNING_DELAY_HOURS)) print info_admin($langs->trans("WarningCronDelayed", $conf->global->CRON_WARNING_DELAY_HOURS)).'<br>';
|
||||||
|
|
||||||
print '<br>';
|
print '<br>';
|
||||||
|
|||||||
@ -42,7 +42,9 @@ $id = GETPOST('id', 'int');
|
|||||||
$action = GETPOST('action', 'aZ09');
|
$action = GETPOST('action', 'aZ09');
|
||||||
$confirm = GETPOST('confirm', 'alpha');
|
$confirm = GETPOST('confirm', 'alpha');
|
||||||
$cancel = GETPOST('cancel', 'alpha');
|
$cancel = GETPOST('cancel', 'alpha');
|
||||||
$backtourl = GETPOST('backtourl', 'alpha');
|
$backtopage = GETPOST('backtopage', 'alpha');
|
||||||
|
$backtopageforcancel = GETPOST('backtopageforcancel', 'alpha');
|
||||||
|
|
||||||
$securitykey = GETPOST('securitykey', 'alpha');
|
$securitykey = GETPOST('securitykey', 'alpha');
|
||||||
|
|
||||||
|
|
||||||
@ -62,13 +64,13 @@ if (!empty($id))
|
|||||||
|
|
||||||
if (!empty($cancel))
|
if (!empty($cancel))
|
||||||
{
|
{
|
||||||
if (!empty($id) && empty($backtourl))
|
if (!empty($id) && empty($backtopage))
|
||||||
{
|
{
|
||||||
$action = '';
|
$action = '';
|
||||||
} else {
|
} else {
|
||||||
if ($backtourl)
|
if ($backtopage)
|
||||||
{
|
{
|
||||||
header("Location: ".$backtourl);
|
header("Location: ".$backtopage);
|
||||||
exit;
|
exit;
|
||||||
} else {
|
} else {
|
||||||
header("Location: ".DOL_URL_ROOT.'/cron/list.php');
|
header("Location: ".DOL_URL_ROOT.'/cron/list.php');
|
||||||
@ -297,7 +299,7 @@ if (($action == "create") || ($action == "edit"))
|
|||||||
{
|
{
|
||||||
print '<form name="cronform" action="'.$_SERVER["PHP_SELF"].'" method="post">';
|
print '<form name="cronform" action="'.$_SERVER["PHP_SELF"].'" method="post">';
|
||||||
print '<input type="hidden" name="token" value="'.newToken().'">'."\n";
|
print '<input type="hidden" name="token" value="'.newToken().'">'."\n";
|
||||||
print '<input type="hidden" name="backtourl" value="'.GETPOST('backtourl').'">'."\n";
|
print '<input type="hidden" name="backtopage" value="'.GETPOST('backtopage').'">'."\n";
|
||||||
if (!empty($object->id)) {
|
if (!empty($object->id)) {
|
||||||
print '<input type="hidden" name="action" value="update">'."\n";
|
print '<input type="hidden" name="action" value="update">'."\n";
|
||||||
print '<input type="hidden" name="id" value="'.$object->id.'">'."\n";
|
print '<input type="hidden" name="id" value="'.$object->id.'">'."\n";
|
||||||
|
|||||||
@ -289,10 +289,12 @@ class Cronjob extends CommonObject
|
|||||||
/**
|
/**
|
||||||
* Load object in memory from the database
|
* Load object in memory from the database
|
||||||
*
|
*
|
||||||
* @param int $id Id object
|
* @param int $id Id object
|
||||||
* @return int <0 if KO, >0 if OK
|
* @param string $objectname Object name
|
||||||
|
* @param string $methodname Method name
|
||||||
|
* @return int <0 if KO, >0 if OK
|
||||||
*/
|
*/
|
||||||
public function fetch($id)
|
public function fetch($id, $objectname = '', $methodname = '')
|
||||||
{
|
{
|
||||||
$sql = "SELECT";
|
$sql = "SELECT";
|
||||||
$sql .= " t.rowid,";
|
$sql .= " t.rowid,";
|
||||||
@ -328,7 +330,13 @@ class Cronjob extends CommonObject
|
|||||||
$sql .= " t.libname,";
|
$sql .= " t.libname,";
|
||||||
$sql .= " t.test";
|
$sql .= " t.test";
|
||||||
$sql .= " FROM ".MAIN_DB_PREFIX."cronjob as t";
|
$sql .= " FROM ".MAIN_DB_PREFIX."cronjob as t";
|
||||||
$sql .= " WHERE t.rowid = ".$id;
|
if ($id > 0) {
|
||||||
|
$sql .= " WHERE t.rowid = ".$id;
|
||||||
|
} else {
|
||||||
|
$sql .= " WHERE t.entity IN(0, ".getEntity('cron').")";
|
||||||
|
$sql .= " AND t.objectname = '".$this->db->escape($objectname)."'";
|
||||||
|
$sql .= " AND t.methodename = '".$this->db->escape($methodname)."'";
|
||||||
|
}
|
||||||
|
|
||||||
dol_syslog(get_class($this)."::fetch", LOG_DEBUG);
|
dol_syslog(get_class($this)."::fetch", LOG_DEBUG);
|
||||||
$resql = $this->db->query($sql);
|
$resql = $this->db->query($sql);
|
||||||
@ -1044,7 +1052,10 @@ class Cronjob extends CommonObject
|
|||||||
$object = new $this->objectname($this->db);
|
$object = new $this->objectname($this->db);
|
||||||
if ($this->entity > 0) $object->entity = $this->entity; // We work on a dedicated entity
|
if ($this->entity > 0) $object->entity = $this->entity; // We work on a dedicated entity
|
||||||
|
|
||||||
$params_arr = array_map('trim', explode(",", $this->params));
|
$params_arr = array();
|
||||||
|
if (!empty($this->params) || $this->params === '0') {
|
||||||
|
$params_arr = array_map('trim', explode(",", $this->params));
|
||||||
|
}
|
||||||
|
|
||||||
if (!is_array($params_arr))
|
if (!is_array($params_arr))
|
||||||
{
|
{
|
||||||
@ -1233,7 +1244,7 @@ class Cronjob extends CommonObject
|
|||||||
if (($this->maxrun > 0 && ($this->nbrun >= $this->maxrun))
|
if (($this->maxrun > 0 && ($this->nbrun >= $this->maxrun))
|
||||||
|| ($this->dateend && ($this->datenextrun > $this->dateend)))
|
|| ($this->dateend && ($this->datenextrun > $this->dateend)))
|
||||||
{
|
{
|
||||||
$this->status = 2;
|
$this->status = self::STATUS_ARCHIVED;
|
||||||
dol_syslog(get_class($this)."::reprogram_jobs Job will be set to archived", LOG_ERR);
|
dol_syslog(get_class($this)."::reprogram_jobs Job will be set to archived", LOG_ERR);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -55,10 +55,12 @@ $pagenext = $page + 1;
|
|||||||
if (!$sortfield) $sortfield = 't.status,t.priority';
|
if (!$sortfield) $sortfield = 't.status,t.priority';
|
||||||
if (!$sortorder) $sortorder = 'DESC,ASC';
|
if (!$sortorder) $sortorder = 'DESC,ASC';
|
||||||
|
|
||||||
$search_status = (GETPOSTISSET('search_status') ?GETPOST('search_status', 'int') : GETPOST('status', 'int'));
|
$mode = GETPOST('mode', 'aZ09');
|
||||||
|
|
||||||
//Search criteria
|
//Search criteria
|
||||||
|
$search_status = (GETPOSTISSET('search_status') ?GETPOST('search_status', 'int') : GETPOST('status', 'int'));
|
||||||
$search_label = GETPOST("search_label", 'alpha');
|
$search_label = GETPOST("search_label", 'alpha');
|
||||||
|
$search_module_name = GETPOST("search_module_name", 'alpha');
|
||||||
|
|
||||||
$securitykey = GETPOST('securitykey', 'alpha');
|
$securitykey = GETPOST('securitykey', 'alpha');
|
||||||
|
|
||||||
$diroutputmassaction = $conf->cronjob->dir_output.'/temp/massgeneration/'.$user->id;
|
$diroutputmassaction = $conf->cronjob->dir_output.'/temp/massgeneration/'.$user->id;
|
||||||
@ -211,7 +213,6 @@ $pagetitle = $langs->trans("CronList");
|
|||||||
|
|
||||||
llxHeader('', $pagetitle);
|
llxHeader('', $pagetitle);
|
||||||
|
|
||||||
|
|
||||||
$sql = "SELECT";
|
$sql = "SELECT";
|
||||||
$sql .= " t.rowid,";
|
$sql .= " t.rowid,";
|
||||||
$sql .= " t.tms,";
|
$sql .= " t.tms,";
|
||||||
@ -254,8 +255,8 @@ if (is_array($filter) && count($filter) > 0) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
$sqlwhere = array();
|
$sqlwhere = array();
|
||||||
if (!empty($module_name)) {
|
if (!empty($search_module_name)) {
|
||||||
$sqlwhere[] = '(t.module_name='.$db->escape($module_name).')';
|
$sqlwhere[] = '(t.module_name='.$db->escape($search_module_name).')';
|
||||||
}
|
}
|
||||||
if (count($sqlwhere) > 0) {
|
if (count($sqlwhere) > 0) {
|
||||||
$sql .= " WHERE ".implode(' AND ', $sqlwhere);
|
$sql .= " WHERE ".implode(' AND ', $sqlwhere);
|
||||||
@ -296,6 +297,8 @@ if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param .= '&co
|
|||||||
if ($limit > 0 && $limit != $conf->liste_limit) $param .= '&limit='.urlencode($limit);
|
if ($limit > 0 && $limit != $conf->liste_limit) $param .= '&limit='.urlencode($limit);
|
||||||
if ($search_status) $param .= '&search_status='.urlencode($search_status);
|
if ($search_status) $param .= '&search_status='.urlencode($search_status);
|
||||||
if ($search_label) $param .= '&search_label='.urlencode($search_label);
|
if ($search_label) $param .= '&search_label='.urlencode($search_label);
|
||||||
|
if ($search_module_name) $param .= '&search_module_name='.urlencode($search_module_name);
|
||||||
|
if ($mode) $param .= '&mode='.urlencode($mode);
|
||||||
if ($optioncss != '') $param .= '&optioncss='.urlencode($optioncss);
|
if ($optioncss != '') $param .= '&optioncss='.urlencode($optioncss);
|
||||||
// Add $param from extra fields
|
// Add $param from extra fields
|
||||||
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php';
|
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php';
|
||||||
@ -322,6 +325,13 @@ if ($user->rights->mymodule->delete) $arrayofmassactions['predelete'] = '<span c
|
|||||||
if (in_array($massaction, array('presend', 'predelete'))) $arrayofmassactions = array();
|
if (in_array($massaction, array('presend', 'predelete'))) $arrayofmassactions = array();
|
||||||
$massactionbutton = $form->selectMassAction('', $arrayofmassactions);
|
$massactionbutton = $form->selectMassAction('', $arrayofmassactions);
|
||||||
|
|
||||||
|
if ($mode == 'modulesetup') {
|
||||||
|
$linkback = '<a href="'.DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans("BackToModuleList").'</a>';
|
||||||
|
print load_fiche_titre($langs->trans("CronSetup"), $linkback, 'title_setup');
|
||||||
|
|
||||||
|
// Configuration header
|
||||||
|
$head = cronadmin_prepare_head();
|
||||||
|
}
|
||||||
|
|
||||||
print '<form method="POST" id="searchFormList" action="'.$_SERVER["PHP_SELF"].'" name="search_form">'."\n";
|
print '<form method="POST" id="searchFormList" action="'.$_SERVER["PHP_SELF"].'" name="search_form">'."\n";
|
||||||
if ($optioncss != '') print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
|
if ($optioncss != '') print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
|
||||||
@ -332,15 +342,21 @@ print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
|
|||||||
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
|
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
|
||||||
print '<input type="hidden" name="page" value="'.$page.'">';
|
print '<input type="hidden" name="page" value="'.$page.'">';
|
||||||
print '<input type="hidden" name="contextpage" value="'.$contextpage.'">';
|
print '<input type="hidden" name="contextpage" value="'.$contextpage.'">';
|
||||||
|
print '<input type="hidden" name="mode" value="'.$mode.'">';
|
||||||
|
|
||||||
// Line with explanation and button new
|
// Line with explanation and button new
|
||||||
$newcardbutton = dolGetButtonTitle($langs->trans('New'), $langs->trans('CronCreateJob'), 'fa fa-plus-circle', DOL_URL_ROOT.'/cron/card.php?action=create&backtopage='.urlencode($_SERVER['PHP_SELF']), '', $user->rights->cron->create);
|
$newcardbutton = dolGetButtonTitle($langs->trans('New'), $langs->trans('CronCreateJob'), 'fa fa-plus-circle', DOL_URL_ROOT.'/cron/card.php?action=create&backtopage='.urlencode($_SERVER['PHP_SELF'].'?mode=modulesetup'), '', $user->rights->cron->create);
|
||||||
|
|
||||||
|
|
||||||
print_barre_liste($pagetitle, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'title_setup', 0, $newcardbutton, '', $limit);
|
if ($mode == 'modulesetup') {
|
||||||
|
print dol_get_fiche_head($head, 'jobs', $langs->trans("Module2300Name"), -1, 'cron');
|
||||||
|
|
||||||
|
//print '<span class="opacitymedium">'.$langs->trans('CronInfo').'</span><br>';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
print '<span class="opacitymedium">'.$langs->trans('CronInfo').'</span><br>';
|
print_barre_liste($pagetitle, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, ($mode == 'modulesetup' ? '' : 'title_setup'), 0, $newcardbutton, '', $limit);
|
||||||
|
|
||||||
|
|
||||||
$text = $langs->trans("HoursOnThisPageAreOnServerTZ").' '.$stringcurrentdate.'<br>';
|
$text = $langs->trans("HoursOnThisPageAreOnServerTZ").' '.$stringcurrentdate.'<br>';
|
||||||
if (!empty($conf->global->CRON_WARNING_DELAY_HOURS)) $text .= $langs->trans("WarningCronDelayed", $conf->global->CRON_WARNING_DELAY_HOURS);
|
if (!empty($conf->global->CRON_WARNING_DELAY_HOURS)) $text .= $langs->trans("WarningCronDelayed", $conf->global->CRON_WARNING_DELAY_HOURS);
|
||||||
@ -533,11 +549,11 @@ if ($num > 0)
|
|||||||
|
|
||||||
print '<td class="nowraponall right">';
|
print '<td class="nowraponall right">';
|
||||||
|
|
||||||
$backtourl = urlencode($_SERVER["PHP_SELF"].'?'.$param.($sortfield ? '&sortfield='.$sortfield : '').($sortorder ? '&sortorder='.$sortorder : ''));
|
$backtopage = urlencode($_SERVER["PHP_SELF"].'?'.$param.($sortfield ? '&sortfield='.$sortfield : '').($sortorder ? '&sortorder='.$sortorder : ''));
|
||||||
if ($user->rights->cron->create)
|
if ($user->rights->cron->create)
|
||||||
{
|
{
|
||||||
print '<a class="editfielda" href="'.DOL_URL_ROOT."/cron/card.php?id=".$obj->rowid.'&action=edit&token='.newToken().($sortfield ? '&sortfield='.$sortfield : '').($sortorder ? '&sortorder='.$sortorder : '').$param;
|
print '<a class="editfielda" href="'.DOL_URL_ROOT."/cron/card.php?id=".$obj->rowid.'&action=edit&token='.newToken().($sortfield ? '&sortfield='.$sortfield : '').($sortorder ? '&sortorder='.$sortorder : '').$param;
|
||||||
print "&backtourl=".$backtourl."\" title=\"".dol_escape_htmltag($langs->trans('Edit'))."\">".img_picto($langs->trans('Edit'), 'edit')."</a> ";
|
print "&backtopage=".$backtopage."\" title=\"".dol_escape_htmltag($langs->trans('Edit'))."\">".img_picto($langs->trans('Edit'), 'edit')."</a> ";
|
||||||
}
|
}
|
||||||
if ($user->rights->cron->delete)
|
if ($user->rights->cron->delete)
|
||||||
{
|
{
|
||||||
@ -581,11 +597,10 @@ print '</div>';
|
|||||||
|
|
||||||
print '</from>';
|
print '</from>';
|
||||||
|
|
||||||
|
if ($mode == 'modulesetup') {
|
||||||
|
print dol_get_fiche_end();
|
||||||
|
}
|
||||||
|
|
||||||
print '<br><br>';
|
|
||||||
|
|
||||||
|
|
||||||
dol_print_cron_urls();
|
|
||||||
|
|
||||||
llxFooter();
|
llxFooter();
|
||||||
|
|
||||||
|
|||||||
@ -141,28 +141,27 @@ if ($action == 'update')
|
|||||||
{
|
{
|
||||||
$object->fetch($id);
|
$object->fetch($id);
|
||||||
|
|
||||||
$object->firstname = GETPOST("firstname", 'alpha');
|
$object->firstname = (string) GETPOST("firstname", 'alpha');
|
||||||
$object->lastname = GETPOST("lastname", 'alpha');
|
$object->lastname = (string) GETPOST("lastname", 'alpha');
|
||||||
$object->societe = GETPOST("societe", 'alpha');
|
$object->societe = (string) GETPOST("societe", 'alpha');
|
||||||
$object->address = GETPOST("address", 'alpha');
|
$object->address = (string) GETPOST("address", 'alpha');
|
||||||
$object->amount = price2num(GETPOST("amount", 'alpha'));
|
$object->amount = price2num(GETPOST("amount", 'alpha'));
|
||||||
$object->town = GETPOST("town", 'alpha');
|
$object->town = (string) GETPOST("town", 'alpha');
|
||||||
$object->zip = GETPOST("zipcode", 'alpha');
|
$object->zip = (string) GETPOST("zipcode", 'alpha');
|
||||||
$object->country_id = GETPOST('country_id', 'int');
|
$object->country_id = (int) GETPOST('country_id', 'int');
|
||||||
$object->email = GETPOST("email", 'alpha');
|
$object->email = (string) GETPOST("email", 'alpha');
|
||||||
$object->date = $donation_date;
|
$object->date = $donation_date;
|
||||||
$object->public = GETPOST("public", 'alpha');
|
$object->public = (string) GETPOST("public", 'alpha');
|
||||||
$object->fk_project = GETPOST("fk_project", 'alpha');
|
$object->fk_project = GETPOST("fk_project", 'alpha');
|
||||||
$object->note_private = GETPOST("note_private", 'restricthtml');
|
$object->note_private = (string) GETPOST("note_private", 'restricthtml');
|
||||||
$object->note_public = GETPOST("note_public", 'restricthtml');
|
$object->note_public = (string) GETPOST("note_public", 'restricthtml');
|
||||||
$object->modepaymentid = GETPOST('modepayment', 'int');
|
$object->modepaymentid = (int) GETPOST('modepayment', 'int');
|
||||||
|
|
||||||
// Fill array 'array_options' with data from add form
|
// Fill array 'array_options' with data from add form
|
||||||
$ret = $extrafields->setOptionalsFromPost(null, $object);
|
$ret = $extrafields->setOptionalsFromPost(null, $object);
|
||||||
if ($ret < 0) $error++;
|
if ($ret < 0) $error++;
|
||||||
|
|
||||||
if ($object->update($user) > 0)
|
if ($object->update($user) > 0) {
|
||||||
{
|
|
||||||
header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id);
|
header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id);
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
@ -195,30 +194,29 @@ if ($action == 'add')
|
|||||||
|
|
||||||
if (!$error)
|
if (!$error)
|
||||||
{
|
{
|
||||||
$object->socid = GETPOST("socid", 'int');
|
$object->socid = (int) GETPOST("socid", 'int');
|
||||||
$object->firstname = GETPOST("firstname", 'alpha');
|
$object->firstname = (string) GETPOST("firstname", 'alpha');
|
||||||
$object->lastname = GETPOST("lastname", 'alpha');
|
$object->lastname = (string) GETPOST("lastname", 'alpha');
|
||||||
$object->societe = GETPOST("societe", 'alpha');
|
$object->societe = (string) GETPOST("societe", 'alpha');
|
||||||
$object->address = GETPOST("address", 'alpha');
|
$object->address = (string) GETPOST("address", 'alpha');
|
||||||
$object->amount = price2num(GETPOST("amount", 'alpha'));
|
$object->amount = price2num(GETPOST("amount", 'alpha'));
|
||||||
$object->zip = GETPOST("zipcode", 'alpha');
|
$object->zip = (string) GETPOST("zipcode", 'alpha');
|
||||||
$object->town = GETPOST("town", 'alpha');
|
$object->town = (string) GETPOST("town", 'alpha');
|
||||||
$object->country_id = GETPOST('country_id', 'int');
|
$object->country_id = (int) GETPOST('country_id', 'int');
|
||||||
$object->email = GETPOST('email', 'alpha');
|
$object->email = (string) GETPOST('email', 'alpha');
|
||||||
$object->date = $donation_date;
|
$object->date = $donation_date;
|
||||||
$object->note_private = GETPOST("note_private", 'restricthtml');
|
$object->note_private = (string) GETPOST("note_private", 'restricthtml');
|
||||||
$object->note_public = GETPOST("note_public", 'restricthtml');
|
$object->note_public = (string) GETPOST("note_public", 'restricthtml');
|
||||||
$object->public = GETPOST("public", 'alpha');
|
$object->public = (string) GETPOST("public", 'alpha');
|
||||||
$object->fk_project = GETPOST("fk_project", 'alpha');
|
$object->fk_project = (string) GETPOST("fk_project", 'alpha');
|
||||||
$object->modepaymentid = GETPOST('modepayment', 'int');
|
$object->modepaymentid = (int) GETPOST('modepayment', 'int');
|
||||||
|
|
||||||
// Fill array 'array_options' with data from add form
|
// Fill array 'array_options' with data from add form
|
||||||
$ret = $extrafields->setOptionalsFromPost(null, $object);
|
$ret = $extrafields->setOptionalsFromPost(null, $object);
|
||||||
if ($ret < 0) $error++;
|
if ($ret < 0) $error++;
|
||||||
|
|
||||||
$res = $object->create($user);
|
$res = $object->create($user);
|
||||||
if ($res > 0)
|
if ($res > 0) {
|
||||||
{
|
|
||||||
header("Location: ".$_SERVER['PHP_SELF'].'?id='.$res);
|
header("Location: ".$_SERVER['PHP_SELF'].'?id='.$res);
|
||||||
exit;
|
exit;
|
||||||
} else {
|
} else {
|
||||||
@ -230,8 +228,7 @@ if ($action == 'confirm_delete' && GETPOST("confirm") == "yes" && $user->rights-
|
|||||||
{
|
{
|
||||||
$object->fetch($id);
|
$object->fetch($id);
|
||||||
$result = $object->delete($user);
|
$result = $object->delete($user);
|
||||||
if ($result > 0)
|
if ($result > 0) {
|
||||||
{
|
|
||||||
header("Location: index.php");
|
header("Location: index.php");
|
||||||
exit;
|
exit;
|
||||||
} else {
|
} else {
|
||||||
@ -546,8 +543,7 @@ if (!empty($id) && $action == 'edit')
|
|||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
// Amount
|
// Amount
|
||||||
if ($object->statut == 0)
|
if ($object->statut == 0) {
|
||||||
{
|
|
||||||
print "<tr>".'<td class="fieldrequired">'.$langs->trans("Amount").'</td><td><input type="text" name="amount" size="10" value="'.price($object->amount).'"> '.$langs->trans("Currency".$conf->currency).'</td></tr>';
|
print "<tr>".'<td class="fieldrequired">'.$langs->trans("Amount").'</td><td><input type="text" name="amount" size="10" value="'.price($object->amount).'"> '.$langs->trans("Currency".$conf->currency).'</td></tr>';
|
||||||
} else {
|
} else {
|
||||||
print '<tr><td>'.$langs->trans("Amount").'</td><td>';
|
print '<tr><td>'.$langs->trans("Amount").'</td><td>';
|
||||||
|
|||||||
@ -957,6 +957,7 @@ class Expedition extends CommonObject
|
|||||||
$langs->load("errors");
|
$langs->load("errors");
|
||||||
$this->error = $langs->trans('ErrorStockIsNotEnoughToAddProductOnShipment', $product->ref);
|
$this->error = $langs->trans('ErrorStockIsNotEnoughToAddProductOnShipment', $product->ref);
|
||||||
$this->errorhidden = 'ErrorStockIsNotEnoughToAddProductOnShipment';
|
$this->errorhidden = 'ErrorStockIsNotEnoughToAddProductOnShipment';
|
||||||
|
|
||||||
$this->db->rollback();
|
$this->db->rollback();
|
||||||
return -3;
|
return -3;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1686,7 +1686,7 @@ class CommandeFournisseur extends CommonOrder
|
|||||||
$product_type = $type;
|
$product_type = $type;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($conf->multicurrency->enabled && $pu_ht_devise > 0) {
|
if (!empty($conf->multicurrency->enabled) && $pu_ht_devise > 0) {
|
||||||
$pu = 0;
|
$pu = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1707,7 +1707,7 @@ class FactureFournisseur extends CommonInvoice
|
|||||||
$product_type = $type;
|
$product_type = $type;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($conf->multicurrency->enabled && $pu_ht_devise > 0) {
|
if (!empty($conf->multicurrency->enabled) && $pu_ht_devise > 0) {
|
||||||
$pu = 0;
|
$pu = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -272,7 +272,7 @@ class ProductFournisseur extends Product
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Multicurrency
|
// Multicurrency
|
||||||
if ($conf->multicurrency->enabled) {
|
if (!empty($conf->multicurrency->enabled)) {
|
||||||
if (empty($multicurrency_tx)) $multicurrency_tx = 1;
|
if (empty($multicurrency_tx)) $multicurrency_tx = 1;
|
||||||
if (empty($multicurrency_buyprice)) $multicurrency_buyprice = 0;
|
if (empty($multicurrency_buyprice)) $multicurrency_buyprice = 0;
|
||||||
|
|
||||||
@ -559,7 +559,7 @@ class ProductFournisseur extends Product
|
|||||||
$this->fourn_multicurrency_code = $obj->multicurrency_code;
|
$this->fourn_multicurrency_code = $obj->multicurrency_code;
|
||||||
if ($conf->barcode->enabled) {
|
if ($conf->barcode->enabled) {
|
||||||
$this->fourn_barcode = $obj->barcode; // deprecated
|
$this->fourn_barcode = $obj->barcode; // deprecated
|
||||||
$this->fourn_fk_barcode_type = $obj->barcode; // deprecated
|
$this->fourn_fk_barcode_type = $obj->fk_barcode_type; // deprecated
|
||||||
$this->supplier_barcode = $obj->barcode;
|
$this->supplier_barcode = $obj->barcode;
|
||||||
$this->supplier_fk_barcode_type = $obj->fk_barcode_type;
|
$this->supplier_fk_barcode_type = $obj->fk_barcode_type;
|
||||||
}
|
}
|
||||||
@ -674,8 +674,8 @@ class ProductFournisseur extends Product
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($conf->barcode->enabled) {
|
if ($conf->barcode->enabled) {
|
||||||
$prodfourn->barcode = $record["barcode"];
|
$prodfourn->supplier_barcode = $record["barcode"];
|
||||||
$prodfourn->fk_barcode_type = $record["fk_barcode_type"];
|
$prodfourn->supplier_fk_barcode_type = $record["fk_barcode_type"];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!empty($conf->dynamicprices->enabled) && !empty($prodfourn->fk_supplier_price_expression)) {
|
if (!empty($conf->dynamicprices->enabled) && !empty($prodfourn->fk_supplier_price_expression)) {
|
||||||
|
|||||||
@ -356,6 +356,7 @@ insert into llx_c_action_trigger (code,label,description,elementtype,rang) value
|
|||||||
ALTER TABLE llx_actioncomm_reminder ADD COLUMN entity integer NOT NULL DEFAULT 1;
|
ALTER TABLE llx_actioncomm_reminder ADD COLUMN entity integer NOT NULL DEFAULT 1;
|
||||||
ALTER TABLE llx_actioncomm_reminder ADD COLUMN fk_actioncomm integer NOT NULL;
|
ALTER TABLE llx_actioncomm_reminder ADD COLUMN fk_actioncomm integer NOT NULL;
|
||||||
ALTER TABLE llx_actioncomm_reminder ADD COLUMN fk_email_template integer;
|
ALTER TABLE llx_actioncomm_reminder ADD COLUMN fk_email_template integer;
|
||||||
|
ALTER TABLE llx_actioncomm_reminder ADD COLUMN lasterror varchar(128) NULL;
|
||||||
|
|
||||||
ALTER TABLE llx_actioncomm_reminder DROP INDEX uk_actioncomm_reminder_unique;
|
ALTER TABLE llx_actioncomm_reminder DROP INDEX uk_actioncomm_reminder_unique;
|
||||||
ALTER TABLE llx_actioncomm_reminder ADD UNIQUE uk_actioncomm_reminder_unique (fk_user, typeremind, offsetvalue, offsetunit, fk_actioncomm);
|
ALTER TABLE llx_actioncomm_reminder ADD UNIQUE uk_actioncomm_reminder_unique (fk_user, typeremind, offsetvalue, offsetunit, fk_actioncomm);
|
||||||
|
|||||||
@ -23,6 +23,7 @@ CREATE TABLE llx_actioncomm_reminder(
|
|||||||
offsetvalue integer NOT NULL,
|
offsetvalue integer NOT NULL,
|
||||||
offsetunit varchar(1) NOT NULL,
|
offsetunit varchar(1) NOT NULL,
|
||||||
status integer NOT NULL DEFAULT 0,
|
status integer NOT NULL DEFAULT 0,
|
||||||
|
lasterror varchar(128) NULL,
|
||||||
entity integer NOT NULL DEFAULT 1,
|
entity integer NOT NULL DEFAULT 1,
|
||||||
fk_actioncomm integer NOT NULL,
|
fk_actioncomm integer NOT NULL,
|
||||||
fk_email_template integer
|
fk_email_template integer
|
||||||
|
|||||||
@ -1738,9 +1738,10 @@ AGENDA_USE_EVENT_TYPE_DEFAULT=Automatically set this default value for type of e
|
|||||||
AGENDA_DEFAULT_FILTER_TYPE=Automatically set this type of event in search filter of agenda view
|
AGENDA_DEFAULT_FILTER_TYPE=Automatically set this type of event in search filter of agenda view
|
||||||
AGENDA_DEFAULT_FILTER_STATUS=Automatically set this status for events in search filter of agenda view
|
AGENDA_DEFAULT_FILTER_STATUS=Automatically set this status for events in search filter of agenda view
|
||||||
AGENDA_DEFAULT_VIEW=Which view do you want to open by default when selecting menu Agenda
|
AGENDA_DEFAULT_VIEW=Which view do you want to open by default when selecting menu Agenda
|
||||||
AGENDA_REMINDER_EMAIL=Enable event reminder <b>by emails</b> (remind option/delay can be defined on each event). Note: Module <strong>%s</strong> must be enabled and correctly setup to have reminder sent at the correct frequency.
|
AGENDA_REMINDER_BROWSER=Enable event reminder <b>on user's browser</b> (When remind date is reached, a popup is shown by the browser. Each user can disable such notifications from its browser notification setup).
|
||||||
AGENDA_REMINDER_BROWSER=Enable event reminder <b>on user's browser</b> (when event date is reached, each user is able to refuse this from the browser confirmation question)
|
|
||||||
AGENDA_REMINDER_BROWSER_SOUND=Enable sound notification
|
AGENDA_REMINDER_BROWSER_SOUND=Enable sound notification
|
||||||
|
AGENDA_REMINDER_EMAIL=Enable event reminder <b>by emails</b> (remind option/delay can be defined on each event).
|
||||||
|
AGENDA_REMINDER_EMAIL_NOTE=Note: The frequency of the task %s must be enough to be sure that the remind are sent at the correct moment.
|
||||||
AGENDA_SHOW_LINKED_OBJECT=Show linked object into agenda view
|
AGENDA_SHOW_LINKED_OBJECT=Show linked object into agenda view
|
||||||
##### Clicktodial #####
|
##### Clicktodial #####
|
||||||
ClickToDialSetup=Click To Dial module setup
|
ClickToDialSetup=Click To Dial module setup
|
||||||
|
|||||||
@ -166,4 +166,4 @@ TimeType=Duration type
|
|||||||
ReminderType=Callback type
|
ReminderType=Callback type
|
||||||
AddReminder=Create an automatic reminder notification for this event
|
AddReminder=Create an automatic reminder notification for this event
|
||||||
ErrorReminderActionCommCreation=Error creating the reminder notification for this event
|
ErrorReminderActionCommCreation=Error creating the reminder notification for this event
|
||||||
BrowserPush=Browser Notification
|
BrowserPush=Browser Popup Notification
|
||||||
@ -172,7 +172,7 @@ ProfId1ES=Prof Id 1 (CIF/NIF)
|
|||||||
ProfId2ES=Prof Id 2 (Social security number)
|
ProfId2ES=Prof Id 2 (Social security number)
|
||||||
ProfId3ES=Prof Id 3 (CNAE)
|
ProfId3ES=Prof Id 3 (CNAE)
|
||||||
ProfId4ES=Prof Id 4 (Collegiate number)
|
ProfId4ES=Prof Id 4 (Collegiate number)
|
||||||
ProfId5ES=Prof Id 5 (EUID)
|
ProfId5ES=EORI number
|
||||||
ProfId6ES=-
|
ProfId6ES=-
|
||||||
ProfId1FR=Prof Id 1 (SIREN)
|
ProfId1FR=Prof Id 1 (SIREN)
|
||||||
ProfId2FR=Prof Id 2 (SIRET)
|
ProfId2FR=Prof Id 2 (SIRET)
|
||||||
|
|||||||
@ -7,8 +7,8 @@ Permission23103 = Delete Scheduled job
|
|||||||
Permission23104 = Execute Scheduled job
|
Permission23104 = Execute Scheduled job
|
||||||
# Admin
|
# Admin
|
||||||
CronSetup=Scheduled job management setup
|
CronSetup=Scheduled job management setup
|
||||||
URLToLaunchCronJobs=URL to check and launch qualified cron jobs
|
URLToLaunchCronJobs=URL to check and launch qualified cron jobs from a browser
|
||||||
OrToLaunchASpecificJob=Or to check and launch a specific job
|
OrToLaunchASpecificJob=Or to check and launch a specific job from a browser
|
||||||
KeyForCronAccess=Security key for URL to launch cron jobs
|
KeyForCronAccess=Security key for URL to launch cron jobs
|
||||||
FileToLaunchCronJobs=Command line to check and launch qualified cron jobs
|
FileToLaunchCronJobs=Command line to check and launch qualified cron jobs
|
||||||
CronExplainHowToRunUnix=On Unix environment you should use the following crontab entry to run the command line each 5 minutes
|
CronExplainHowToRunUnix=On Unix environment you should use the following crontab entry to run the command line each 5 minutes
|
||||||
@ -84,3 +84,4 @@ MakeLocalDatabaseDumpShort=Local database backup
|
|||||||
MakeLocalDatabaseDump=Create a local database dump. Parameters are: compression ('gz' or 'bz' or 'none'), backup type ('mysql', 'pgsql', 'auto'), 1, 'auto' or filename to build, number of backup files to keep
|
MakeLocalDatabaseDump=Create a local database dump. Parameters are: compression ('gz' or 'bz' or 'none'), backup type ('mysql', 'pgsql', 'auto'), 1, 'auto' or filename to build, number of backup files to keep
|
||||||
WarningCronDelayed=Attention, for performance purpose, whatever is next date of execution of enabled jobs, your jobs may be delayed to a maximum of %s hours, before being run.
|
WarningCronDelayed=Attention, for performance purpose, whatever is next date of execution of enabled jobs, your jobs may be delayed to a maximum of %s hours, before being run.
|
||||||
DATAPOLICYJob=Data cleaner and anonymizer
|
DATAPOLICYJob=Data cleaner and anonymizer
|
||||||
|
JobXMustBeEnabled=Job %s must be enabled
|
||||||
@ -266,8 +266,10 @@ DateStart=Start date
|
|||||||
DateEnd=End date
|
DateEnd=End date
|
||||||
DateCreation=Creation date
|
DateCreation=Creation date
|
||||||
DateCreationShort=Creat. date
|
DateCreationShort=Creat. date
|
||||||
|
IPCreation=Creation IP
|
||||||
DateModification=Modification date
|
DateModification=Modification date
|
||||||
DateModificationShort=Modif. date
|
DateModificationShort=Modif. date
|
||||||
|
IPModification=Modification IP
|
||||||
DateLastModification=Latest modification date
|
DateLastModification=Latest modification date
|
||||||
DateValidation=Validation date
|
DateValidation=Validation date
|
||||||
DateClosing=Closing date
|
DateClosing=Closing date
|
||||||
|
|||||||
@ -1694,6 +1694,7 @@ function top_menu($head, $title = '', $target = '', $disablejs = 0, $disablehead
|
|||||||
else $text .= sprintf($helpbaseurl, $helppage);
|
else $text .= sprintf($helpbaseurl, $helppage);
|
||||||
$text .= '">';
|
$text .= '">';
|
||||||
$text .= '<span class="fa fa-question-circle atoplogin valignmiddle'.($helppresent ? ' '.$helppresent : '').'"></span>';
|
$text .= '<span class="fa fa-question-circle atoplogin valignmiddle'.($helppresent ? ' '.$helppresent : '').'"></span>';
|
||||||
|
if ($helppresent) $text .= '<span class="fa fa-circle helppresentcircle"></span>';
|
||||||
$text .= '</a>';
|
$text .= '</a>';
|
||||||
$toprightmenu .= $form->textwithtooltip('', $title, 2, 1, $text, 'login_block_elem', 2);
|
$toprightmenu .= $form->textwithtooltip('', $title, 2, 1, $text, 'login_block_elem', 2);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -661,10 +661,10 @@ class pdf_standard_myobject extends ModelePDFMyObject
|
|||||||
$prev_progress = $object->lines[$i]->get_prev_progress($object->id);
|
$prev_progress = $object->lines[$i]->get_prev_progress($object->id);
|
||||||
if ($prev_progress > 0 && !empty($object->lines[$i]->situation_percent)) // Compute progress from previous situation
|
if ($prev_progress > 0 && !empty($object->lines[$i]->situation_percent)) // Compute progress from previous situation
|
||||||
{
|
{
|
||||||
if ($conf->multicurrency->enabled && $object->multicurrency_tx != 1) $tvaligne = $sign * $object->lines[$i]->multicurrency_total_tva * ($object->lines[$i]->situation_percent - $prev_progress) / $object->lines[$i]->situation_percent;
|
if (!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1) $tvaligne = $sign * $object->lines[$i]->multicurrency_total_tva * ($object->lines[$i]->situation_percent - $prev_progress) / $object->lines[$i]->situation_percent;
|
||||||
else $tvaligne = $sign * $object->lines[$i]->total_tva * ($object->lines[$i]->situation_percent - $prev_progress) / $object->lines[$i]->situation_percent;
|
else $tvaligne = $sign * $object->lines[$i]->total_tva * ($object->lines[$i]->situation_percent - $prev_progress) / $object->lines[$i]->situation_percent;
|
||||||
} else {
|
} else {
|
||||||
if ($conf->multicurrency->enabled && $object->multicurrency_tx != 1) $tvaligne = $sign * $object->lines[$i]->multicurrency_total_tva;
|
if (!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1) $tvaligne = $sign * $object->lines[$i]->multicurrency_total_tva;
|
||||||
else $tvaligne = $sign * $object->lines[$i]->total_tva;
|
else $tvaligne = $sign * $object->lines[$i]->total_tva;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -349,7 +349,7 @@ while ($i < min($num, $limit))
|
|||||||
$obj = $db->fetch_object($resql);
|
$obj = $db->fetch_object($resql);
|
||||||
if (empty($obj)) break; // Should not happen
|
if (empty($obj)) break; // Should not happen
|
||||||
|
|
||||||
$sql2 = 'select COUNT(*) as nb from '.MAIN_DB_PREFIX."opensurvey_user_studs where id_sondage='".$db->escape($obj->id_sondage)."'";
|
$sql2 = 'select COUNT(*) as nb from '.MAIN_DB_PREFIX."opensurvey_user_studs where id_sondage='".$db->escape($obj->rowid)."'";
|
||||||
$resql2 = $db->query($sql2);
|
$resql2 = $db->query($sql2);
|
||||||
if ($resql2)
|
if ($resql2)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -4245,8 +4245,7 @@ class Product extends CommonObject
|
|||||||
$resql = $this->db->query($sql);
|
$resql = $this->db->query($sql);
|
||||||
if ($resql) {
|
if ($resql) {
|
||||||
$obj = $this->db->fetch_object($resql);
|
$obj = $this->db->fetch_object($resql);
|
||||||
if ($obj) { $nb = $obj->nb;
|
if ($obj) { $nb = $obj->nb; }
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -212,7 +212,7 @@ if (empty($reshook))
|
|||||||
$_POST["price"] = 0;
|
$_POST["price"] = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ($conf->multicurrency->enabled) {
|
if (!empty($conf->multicurrency->enabled)) {
|
||||||
if (empty($_POST["multicurrency_code"])) {
|
if (empty($_POST["multicurrency_code"])) {
|
||||||
$error++;
|
$error++;
|
||||||
$langs->load("errors");
|
$langs->load("errors");
|
||||||
@ -294,7 +294,7 @@ if (empty($reshook))
|
|||||||
if ($packaging < $quantity) $packaging = $quantity;
|
if ($packaging < $quantity) $packaging = $quantity;
|
||||||
$object->packaging = $packaging;
|
$object->packaging = $packaging;
|
||||||
|
|
||||||
if ($conf->multicurrency->enabled)
|
if (!empty($conf->multicurrency->enabled))
|
||||||
{
|
{
|
||||||
$multicurrency_tx = price2num(GETPOST("multicurrency_tx", 'alpha'));
|
$multicurrency_tx = price2num(GETPOST("multicurrency_tx", 'alpha'));
|
||||||
$multicurrency_price = price2num(GETPOST("multicurrency_price", 'alpha'));
|
$multicurrency_price = price2num(GETPOST("multicurrency_price", 'alpha'));
|
||||||
@ -610,7 +610,7 @@ if ($id > 0 || $ref)
|
|||||||
</script>';
|
</script>';
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($conf->multicurrency->enabled) {
|
if (!empty($conf->multicurrency->enabled)) {
|
||||||
// Currency
|
// Currency
|
||||||
print '<tr><td class="fieldrequired">'.$langs->trans("Currency").'</td>';
|
print '<tr><td class="fieldrequired">'.$langs->trans("Currency").'</td>';
|
||||||
print '<td>';
|
print '<td>';
|
||||||
@ -725,7 +725,7 @@ END;
|
|||||||
// Option to define a transport cost on supplier price
|
// Option to define a transport cost on supplier price
|
||||||
print '<tr>';
|
print '<tr>';
|
||||||
print '<td>'.$langs->trans('BarcodeValue').'</td>';
|
print '<td>'.$langs->trans('BarcodeValue').'</td>';
|
||||||
print '<td><input class="flat" name="barcode" value="'.($rowid ? $object->fourn_barcode : '').'"></td>';
|
print '<td><input class="flat" name="barcode" value="'.($rowid ? $object->supplier_barcode : '').'"></td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
$formbarcode = new FormBarCode($db);
|
$formbarcode = new FormBarCode($db);
|
||||||
|
|
||||||
@ -733,7 +733,7 @@ END;
|
|||||||
print '<tr>';
|
print '<tr>';
|
||||||
print '<td>'.$langs->trans('BarcodeType').'</td>';
|
print '<td>'.$langs->trans('BarcodeType').'</td>';
|
||||||
print '<td>';
|
print '<td>';
|
||||||
print $formbarcode->selectBarcodeType(($rowid ? $object->fourn_fk_barcode_type : $conf->global->PRODUIT_DEFAULT_BARCODE_TYPE), 'fk_barcode_type', 1);
|
print $formbarcode->selectBarcodeType(($rowid ? $object->supplier_fk_barcode_type : $conf->global->PRODUIT_DEFAULT_BARCODE_TYPE), 'fk_barcode_type', 1);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
}
|
}
|
||||||
@ -927,10 +927,10 @@ END;
|
|||||||
if (!empty($arrayfields['pfp.quantity']['checked'])) print_liste_field_titre("QtyMin", $_SERVER["PHP_SELF"], "pfp.quantity", "", $param, '', $sortfield, $sortorder, 'right ');
|
if (!empty($arrayfields['pfp.quantity']['checked'])) print_liste_field_titre("QtyMin", $_SERVER["PHP_SELF"], "pfp.quantity", "", $param, '', $sortfield, $sortorder, 'right ');
|
||||||
print_liste_field_titre("VATRate", $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder, 'right ');
|
print_liste_field_titre("VATRate", $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder, 'right ');
|
||||||
print_liste_field_titre("PriceQtyMinHT", $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder, 'right ');
|
print_liste_field_titre("PriceQtyMinHT", $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder, 'right ');
|
||||||
if ($conf->multicurrency->enabled) print_liste_field_titre("PriceQtyMinHTCurrency", $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder, 'right ');
|
if (!empty($conf->multicurrency->enabled)) print_liste_field_titre("PriceQtyMinHTCurrency", $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder, 'right ');
|
||||||
if (!empty($arrayfields['pfp.unitprice']['checked'])) print_liste_field_titre("UnitPriceHT", $_SERVER["PHP_SELF"], "pfp.unitprice", "", $param, '', $sortfield, $sortorder, 'right ');
|
if (!empty($arrayfields['pfp.unitprice']['checked'])) print_liste_field_titre("UnitPriceHT", $_SERVER["PHP_SELF"], "pfp.unitprice", "", $param, '', $sortfield, $sortorder, 'right ');
|
||||||
if (!empty($arrayfields['pfp.multicurrency_unitprice']['checked'])) print_liste_field_titre("UnitPriceHTCurrency", $_SERVER["PHP_SELF"], "pfp.multicurrency_unitprice", "", $param, '', $sortfield, $sortorder, 'right ');
|
if (!empty($arrayfields['pfp.multicurrency_unitprice']['checked'])) print_liste_field_titre("UnitPriceHTCurrency", $_SERVER["PHP_SELF"], "pfp.multicurrency_unitprice", "", $param, '', $sortfield, $sortorder, 'right ');
|
||||||
if ($conf->multicurrency->enabled) print_liste_field_titre("Currency", $_SERVER["PHP_SELF"], "", "", $param, '', $sortfield, $sortorder, 'right ');
|
if (!empty($conf->multicurrency->enabled)) print_liste_field_titre("Currency", $_SERVER["PHP_SELF"], "", "", $param, '', $sortfield, $sortorder, 'right ');
|
||||||
print_liste_field_titre("DiscountQtyMin", $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder, 'right ');
|
print_liste_field_titre("DiscountQtyMin", $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder, 'right ');
|
||||||
if (!empty($arrayfields['pfp.delivery_time_days']['checked'])) print_liste_field_titre("NbDaysToDelivery", $_SERVER["PHP_SELF"], "pfp.delivery_time_days", "", $param, '', $sortfield, $sortorder, 'right ');
|
if (!empty($arrayfields['pfp.delivery_time_days']['checked'])) print_liste_field_titre("NbDaysToDelivery", $_SERVER["PHP_SELF"], "pfp.delivery_time_days", "", $param, '', $sortfield, $sortorder, 'right ');
|
||||||
if (!empty($arrayfields['pfp.supplier_reputation']['checked'])) print_liste_field_titre("ReputationForThisProduct", $_SERVER["PHP_SELF"], "pfp.supplier_reputation", "", $param, '', $sortfield, $sortorder, 'center ');
|
if (!empty($arrayfields['pfp.supplier_reputation']['checked'])) print_liste_field_titre("ReputationForThisProduct", $_SERVER["PHP_SELF"], "pfp.supplier_reputation", "", $param, '', $sortfield, $sortorder, 'center ');
|
||||||
@ -1019,7 +1019,7 @@ END;
|
|||||||
print $productfourn->fourn_price ?price($productfourn->fourn_price) : "";
|
print $productfourn->fourn_price ?price($productfourn->fourn_price) : "";
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
if ($conf->multicurrency->enabled) {
|
if (!empty($conf->multicurrency->enabled)) {
|
||||||
// Price for the quantity in currency
|
// Price for the quantity in currency
|
||||||
print '<td class="right">';
|
print '<td class="right">';
|
||||||
print $productfourn->fourn_multicurrency_price ? price($productfourn->fourn_multicurrency_price) : "";
|
print $productfourn->fourn_multicurrency_price ? price($productfourn->fourn_multicurrency_price) : "";
|
||||||
@ -1041,7 +1041,7 @@ END;
|
|||||||
print '</td>'; }
|
print '</td>'; }
|
||||||
|
|
||||||
// Currency
|
// Currency
|
||||||
if ($conf->multicurrency->enabled) {
|
if (!empty($conf->multicurrency->enabled)) {
|
||||||
print '<td class="right">';
|
print '<td class="right">';
|
||||||
print $productfourn->fourn_multicurrency_code ? currency_name($productfourn->fourn_multicurrency_code) : '';
|
print $productfourn->fourn_multicurrency_code ? currency_name($productfourn->fourn_multicurrency_code) : '';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
@ -1071,16 +1071,16 @@ END;
|
|||||||
// Barcode
|
// Barcode
|
||||||
if (!empty($arrayfields['pfp.barcode']['checked'])) {
|
if (!empty($arrayfields['pfp.barcode']['checked'])) {
|
||||||
print '<td align="right">';
|
print '<td align="right">';
|
||||||
print $productfourn->barcode;
|
print $productfourn->supplier_barcode;
|
||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Barcode type
|
// Barcode type
|
||||||
if (!empty($arrayfields['pfp.fk_barcode_type']['checked'])) {
|
if (!empty($arrayfields['pfp.fk_barcode_type']['checked'])) {
|
||||||
print '<td class="center">';
|
print '<td class="center">';
|
||||||
$productfourn->barcode_type = !empty($productfourn->fk_barcode_type) ? $productfourn->fk_barcode_type : 0;
|
$productfourn->barcode_type = !empty($productfourn->supplier_fk_barcode_type) ? $productfourn->supplier_fk_barcode_type : 0;
|
||||||
$productfourn->fetch_barcode();
|
$productfourn->fetch_barcode();
|
||||||
print $productfourn->barcode_type_label ? $productfourn->barcode_type_label : ($productfourn->barcode ? '<div class="warning">'.$langs->trans("SetDefaultBarcodeType").'<div>' : '');
|
print $productfourn->barcode_type_label ? $productfourn->barcode_type_label : ($productfourn->supplier_barcode ? '<div class="warning">'.$langs->trans("SetDefaultBarcodeType").'<div>' : '');
|
||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -600,7 +600,7 @@ if ($resql)
|
|||||||
$categoriesProductArr = $form->select_all_categories(Categorie::TYPE_PRODUCT, '', '', 64, 0, 1);
|
$categoriesProductArr = $form->select_all_categories(Categorie::TYPE_PRODUCT, '', '', 64, 0, 1);
|
||||||
$categoriesProductArr[-2] = '- '.$langs->trans('NotCategorized').' -';
|
$categoriesProductArr[-2] = '- '.$langs->trans('NotCategorized').' -';
|
||||||
$moreforfilter .= Form::multiselectarray('search_category_product_list', $categoriesProductArr, $searchCategoryProductList, 0, 0, 'minwidth300');
|
$moreforfilter .= Form::multiselectarray('search_category_product_list', $categoriesProductArr, $searchCategoryProductList, 0, 0, 'minwidth300');
|
||||||
$moreforfilter .= ' <input type="checkbox" class="valignmiddle" name="search_category_product_operator" value="1"'.($searchCategoryProductOperator == 1 ? ' checked="checked"' : '').'/> <span class="opacitymedium">'.$langs->trans('UseOrOperatorForCategories').'</span>';
|
$moreforfilter .= ' <input type="checkbox" class="valignmiddle" name="search_category_product_operator" value="1"'.($searchCategoryProductOperator == 1 ? ' checked="checked"' : '').'/> <span class="none">'.$langs->trans('UseOrOperatorForCategories').'</span>';
|
||||||
$moreforfilter .= '</div>';
|
$moreforfilter .= '</div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -673,7 +673,9 @@ class Task extends CommonObject
|
|||||||
$linkclose .= ' alt="'.dol_escape_htmltag($label, 1).'"';
|
$linkclose .= ' alt="'.dol_escape_htmltag($label, 1).'"';
|
||||||
}
|
}
|
||||||
$linkclose .= ' title="'.dol_escape_htmltag($label, 1).'"';
|
$linkclose .= ' title="'.dol_escape_htmltag($label, 1).'"';
|
||||||
$linkclose .= ' class="classfortooltip"';
|
$linkclose .= ' class="classfortooltip nowraponall"';
|
||||||
|
} else {
|
||||||
|
$linkclose .= ' class="nowraponall"';
|
||||||
}
|
}
|
||||||
|
|
||||||
$linkstart = '<a href="'.$url.'"';
|
$linkstart = '<a href="'.$url.'"';
|
||||||
|
|||||||
@ -639,8 +639,8 @@ if ($action == 'create' && $user->rights->projet->creer && (empty($object->third
|
|||||||
print '<input type="hidden" name="contextpage" value="'.$contextpage.'">';
|
print '<input type="hidden" name="contextpage" value="'.$contextpage.'">';
|
||||||
|
|
||||||
$title = $langs->trans("ListOfTasks");
|
$title = $langs->trans("ListOfTasks");
|
||||||
$linktotasks = dolGetButtonTitle($langs->trans('ViewList'), '', 'fa fa-list-alt paddingleft imgforviewmode', DOL_URL_ROOT.'/projet/tasks.php?id='.$object->id, '', 1, array('morecss'=>'reposition btnTitleSelected'));
|
$linktotasks = dolGetButtonTitle($langs->trans('ViewList'), '', 'fa fa-list-alt imgforviewmode', DOL_URL_ROOT.'/projet/tasks.php?id='.$object->id, '', 1, array('morecss'=>'reposition btnTitleSelected'));
|
||||||
$linktotasks .= dolGetButtonTitle($langs->trans('ViewGantt'), '', 'fa fa-stream paddingleft imgforviewmode', DOL_URL_ROOT.'/projet/ganttview.php?id='.$object->id.'&withproject=1', '', 1, array('morecss'=>'reposition marginleftonly'));
|
$linktotasks .= dolGetButtonTitle($langs->trans('ViewGantt'), '', 'fa fa-stream imgforviewmode', DOL_URL_ROOT.'/projet/ganttview.php?id='.$object->id.'&withproject=1', '', 1, array('morecss'=>'reposition marginleftonly'));
|
||||||
|
|
||||||
//print_barre_liste($title, 0, $_SERVER["PHP_SELF"], '', $sortfield, $sortorder, $linktotasks, $num, $totalnboflines, 'generic', 0, '', '', 0, 1);
|
//print_barre_liste($title, 0, $_SERVER["PHP_SELF"], '', $sortfield, $sortorder, $linktotasks, $num, $totalnboflines, 'generic', 0, '', '', 0, 1);
|
||||||
print load_fiche_titre($title, $linktotasks.' '.$linktocreatetask, 'projecttask');
|
print load_fiche_titre($title, $linktotasks.' '.$linktocreatetask, 'projecttask');
|
||||||
|
|||||||
@ -897,6 +897,7 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0)
|
|||||||
if ($id) $param .= '&id='.urlencode($id);
|
if ($id) $param .= '&id='.urlencode($id);
|
||||||
if ($projectid) $param .= '&projectid='.urlencode($projectid);
|
if ($projectid) $param .= '&projectid='.urlencode($projectid);
|
||||||
if ($withproject) $param .= '&withproject='.urlencode($withproject);
|
if ($withproject) $param .= '&withproject='.urlencode($withproject);
|
||||||
|
if ($page) $param .= '&page='.urlencode($page);
|
||||||
|
|
||||||
print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">';
|
print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">';
|
||||||
if ($optioncss != '') print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
|
if ($optioncss != '') print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
|
||||||
@ -1431,8 +1432,6 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0)
|
|||||||
}
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
if (!$i) $totalarray['nbfield']++;
|
if (!$i) $totalarray['nbfield']++;
|
||||||
if (!$i) $totalarray['totalvaluebilledfield'] = $totalarray['nbfield'];
|
|
||||||
$totalarray['totalvaluebilled'] += $valuebilled;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@ -973,7 +973,6 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action))
|
|||||||
setEventMessages($langs->trans('NewCustomerSupplierCodeProposed'), '', 'warnings');
|
setEventMessages($langs->trans('NewCustomerSupplierCodeProposed'), '', 'warnings');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$object->address = GETPOST('address', 'alphanohtml');
|
$object->address = GETPOST('address', 'alphanohtml');
|
||||||
$object->zip = GETPOST('zipcode', 'alphanohtml');
|
$object->zip = GETPOST('zipcode', 'alphanohtml');
|
||||||
$object->town = GETPOST('town', 'alphanohtml');
|
$object->town = GETPOST('town', 'alphanohtml');
|
||||||
@ -1306,7 +1305,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action))
|
|||||||
// Country
|
// Country
|
||||||
print '<tr><td>'.$form->editfieldkey('Country', 'selectcountry_id', '', $object, 0).'</td><td colspan="3" class="maxwidthonsmartphone">';
|
print '<tr><td>'.$form->editfieldkey('Country', 'selectcountry_id', '', $object, 0).'</td><td colspan="3" class="maxwidthonsmartphone">';
|
||||||
print img_picto('', 'globe-americas', 'class="paddingrightonly"');
|
print img_picto('', 'globe-americas', 'class="paddingrightonly"');
|
||||||
print $form->select_country((GETPOSTISSET('country_id') ? GETPOST('country_id') : $object->country_id), 'country_id', '', 0, 'minwidth300 widthcentpercentminusx');
|
print $form->select_country((GETPOSTISSET('country_id') ? GETPOST('country_id') : $object->country_id), 'country_id', '', 0, 'minwidth300 maxwidth500 widthcentpercentminusx');
|
||||||
if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1);
|
if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
@ -1334,9 +1333,9 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action))
|
|||||||
|
|
||||||
// Email / Web
|
// Email / Web
|
||||||
print '<tr><td>'.$form->editfieldkey('EMail', 'email', '', $object, 0, 'string', '', $conf->global->SOCIETE_EMAIL_MANDATORY).'</td>';
|
print '<tr><td>'.$form->editfieldkey('EMail', 'email', '', $object, 0, 'string', '', $conf->global->SOCIETE_EMAIL_MANDATORY).'</td>';
|
||||||
print '<td colspan="3">'.img_picto('', 'object_email').' <input type="text" class="widthcentpercentminusx" name="email" id="email" value="'.$object->email.'"></td></tr>';
|
print '<td colspan="3">'.img_picto('', 'object_email').' <input type="text" class="maxwidth500 widthcentpercentminusx" name="email" id="email" value="'.$object->email.'"></td></tr>';
|
||||||
print '<tr><td>'.$form->editfieldkey('Web', 'url', '', $object, 0).'</td>';
|
print '<tr><td>'.$form->editfieldkey('Web', 'url', '', $object, 0).'</td>';
|
||||||
print '<td colspan="3">'.img_picto('', 'globe').' <input type="text" class="widthcentpercentminusx" name="url" id="url" value="'.$object->url.'"></td></tr>';
|
print '<td colspan="3">'.img_picto('', 'globe').' <input type="text" class="maxwidth500 widthcentpercentminusx" name="url" id="url" value="'.$object->url.'"></td></tr>';
|
||||||
|
|
||||||
if (!empty($conf->socialnetworks->enabled)) {
|
if (!empty($conf->socialnetworks->enabled)) {
|
||||||
foreach ($socialnetworks as $key => $value) {
|
foreach ($socialnetworks as $key => $value) {
|
||||||
|
|||||||
@ -507,7 +507,7 @@ class SupplierProposal extends CommonObject
|
|||||||
$localtaxes_type = getLocalTaxesFromRate($txtva, 0, $this->thirdparty, $mysoc);
|
$localtaxes_type = getLocalTaxesFromRate($txtva, 0, $this->thirdparty, $mysoc);
|
||||||
$txtva = preg_replace('/\s*\(.*\)/', '', $txtva); // Remove code into vatrate.
|
$txtva = preg_replace('/\s*\(.*\)/', '', $txtva); // Remove code into vatrate.
|
||||||
|
|
||||||
if ($conf->multicurrency->enabled && $pu_ht_devise > 0) {
|
if (!empty($conf->multicurrency->enabled) && $pu_ht_devise > 0) {
|
||||||
$pu = 0;
|
$pu = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -696,7 +696,7 @@ class SupplierProposal extends CommonObject
|
|||||||
$txtva = preg_replace('/\s*\(.*\)/', '', $txtva); // Remove code into vatrate.
|
$txtva = preg_replace('/\s*\(.*\)/', '', $txtva); // Remove code into vatrate.
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($conf->multicurrency->enabled && $pu_ht_devise > 0) {
|
if (!empty($conf->multicurrency->enabled) && $pu_ht_devise > 0) {
|
||||||
$pu = 0;
|
$pu = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -65,6 +65,10 @@ if (GETPOST('action', 'alpha') == 'set')
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($conf->global->TAKEPOS_ORDER_NOTES == 1) {
|
||||||
|
$extrafields = new ExtraFields($db);
|
||||||
|
$extrafields->addExtraField('order_notes', 'Order notes', 'varchar', 0, 255, 'facturedet', 0, 0, '', '', 0, '', 0, 1);
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* View
|
* View
|
||||||
|
|||||||
@ -83,10 +83,6 @@ if (GETPOST('action', 'alpha') == 'set') {
|
|||||||
$res = dolibarr_set_const($db, "TAKEPOS_SUMUP_AFFILIATE", GETPOST('TAKEPOS_SUMUP_AFFILIATE', 'alpha'), 'chaine', 0, '', $conf->entity);
|
$res = dolibarr_set_const($db, "TAKEPOS_SUMUP_AFFILIATE", GETPOST('TAKEPOS_SUMUP_AFFILIATE', 'alpha'), 'chaine', 0, '', $conf->entity);
|
||||||
$res = dolibarr_set_const($db, "TAKEPOS_SUMUP_APPID", GETPOST('TAKEPOS_SUMUP_APPID', 'alpha'), 'chaine', 0, '', $conf->entity);
|
$res = dolibarr_set_const($db, "TAKEPOS_SUMUP_APPID", GETPOST('TAKEPOS_SUMUP_APPID', 'alpha'), 'chaine', 0, '', $conf->entity);
|
||||||
}
|
}
|
||||||
if ($conf->global->TAKEPOS_ORDER_NOTES == 1) {
|
|
||||||
$extrafields = new ExtraFields($db);
|
|
||||||
$extrafields->addExtraField('order_notes', 'Order notes', 'varchar', 0, 255, 'facturedet', 0, 0, '', '', 0, '', 0, 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
dol_syslog("admin/cashdesk: level ".GETPOST('level', 'alpha'));
|
dol_syslog("admin/cashdesk: level ".GETPOST('level', 'alpha'));
|
||||||
|
|
||||||
|
|||||||
@ -82,11 +82,6 @@ if ($action == 'set')
|
|||||||
$res = dolibarr_set_const($db, "TAKEPOS_SUMUP_AFFILIATE", GETPOST('TAKEPOS_SUMUP_AFFILIATE', 'alpha'), 'chaine', 0, '', $conf->entity);
|
$res = dolibarr_set_const($db, "TAKEPOS_SUMUP_AFFILIATE", GETPOST('TAKEPOS_SUMUP_AFFILIATE', 'alpha'), 'chaine', 0, '', $conf->entity);
|
||||||
$res = dolibarr_set_const($db, "TAKEPOS_SUMUP_APPID", GETPOST('TAKEPOS_SUMUP_APPID', 'alpha'), 'chaine', 0, '', $conf->entity);
|
$res = dolibarr_set_const($db, "TAKEPOS_SUMUP_APPID", GETPOST('TAKEPOS_SUMUP_APPID', 'alpha'), 'chaine', 0, '', $conf->entity);
|
||||||
}
|
}
|
||||||
if ($conf->global->TAKEPOS_ORDER_NOTES == 1)
|
|
||||||
{
|
|
||||||
$extrafields = new ExtraFields($db);
|
|
||||||
$extrafields->addExtraField('order_notes', 'Order notes', 'varchar', 0, 255, 'facturedet', 0, 0, '', '', 0, '', 0, 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
dol_syslog("admin/cashdesk: level ".GETPOST('level', 'alpha'));
|
dol_syslog("admin/cashdesk: level ".GETPOST('level', 'alpha'));
|
||||||
|
|
||||||
|
|||||||
@ -222,7 +222,7 @@ if ($conf->global->TAKEPOS_PRINT_PAYMENT_METHOD) {
|
|||||||
echo $langs->transnoentitiesnoconv("PaymentTypeShort".$row->code);
|
echo $langs->transnoentitiesnoconv("PaymentTypeShort".$row->code);
|
||||||
echo '</td>';
|
echo '</td>';
|
||||||
echo '<td class="right">';
|
echo '<td class="right">';
|
||||||
$amount_payment = ($conf->multicurrency->enabled && $object->multicurrency_tx != 1) ? $row->multicurrency_amount : $row->amount;
|
$amount_payment = (!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1) ? $row->multicurrency_amount : $row->amount;
|
||||||
if ($row->code == "LIQ") $amount_payment = $amount_payment + $row->pos_change; // Show amount with excess received if is cash payment
|
if ($row->code == "LIQ") $amount_payment = $amount_payment + $row->pos_change; // Show amount with excess received if is cash payment
|
||||||
echo price($amount_payment, 1, '', 1, - 1, - 1, $conf->currency);
|
echo price($amount_payment, 1, '', 1, - 1, - 1, $conf->currency);
|
||||||
echo '</td>';
|
echo '</td>';
|
||||||
|
|||||||
@ -7,11 +7,13 @@ if (!defined('ISLOADEDBYSTEELSHEET')) die('Must be call by steelsheet'); ?>
|
|||||||
--btncolorbg: #fbfbfb;
|
--btncolorbg: #fbfbfb;
|
||||||
--btncolorborderhover: none;
|
--btncolorborderhover: none;
|
||||||
--btncolorborder: #FFF;
|
--btncolorborder: #FFF;
|
||||||
|
/* --butactionbg:rgba(150, 110, 162, 0.95); */
|
||||||
|
--butactionbg:rgb(118, 145, 225);
|
||||||
|
--butactionbg:rgba(150, 110, 162, 0.95);
|
||||||
--butactiondeletebg: rgb(234,228,225);
|
--butactiondeletebg: rgb(234,228,225);
|
||||||
/* tertiary color */
|
/* tertiary color */
|
||||||
/* --butactionbg:rgb(218, 235, 225); */
|
/* --butactionbg:rgb(218, 235, 225); */
|
||||||
/* --butactionbg:rgb(228, 218, 235); */
|
/* --butactionbg:rgb(228, 218, 235); */
|
||||||
--butactionbg:rgb(118, 145, 225);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
@ -27,7 +29,7 @@ if (!empty($conf->global->THEME_DARKMODEENABLED)) {
|
|||||||
--btncolorbg: rgb(26,27,27);
|
--btncolorbg: rgb(26,27,27);
|
||||||
--btncolorborderhover: #ffffff;
|
--btncolorborderhover: #ffffff;
|
||||||
--btncolorborder: #2b2c2e;
|
--btncolorborder: #2b2c2e;
|
||||||
--butactionbg:rgb(173,140,79);
|
--butactionbg: rgb(173,140,79);
|
||||||
--butactiondeletebg: rgb(252,84,91);
|
--butactiondeletebg: rgb(252,84,91);
|
||||||
|
|
||||||
}\n";
|
}\n";
|
||||||
|
|||||||
@ -21,8 +21,8 @@
|
|||||||
--colorbackbody: rgb(<?php print $colorbackbody; ?>);
|
--colorbackbody: rgb(<?php print $colorbackbody; ?>);
|
||||||
--colortexttitlenotab: rgb(<?php print $colortexttitlenotab; ?>);
|
--colortexttitlenotab: rgb(<?php print $colortexttitlenotab; ?>);
|
||||||
--colortexttitlenotab2: rgb(<?php print $colortexttitlenotab2; ?>);
|
--colortexttitlenotab2: rgb(<?php print $colortexttitlenotab2; ?>);
|
||||||
--colortexttitle: rgb(<?php print $colortexttitle; ?>);
|
--colortexttitle: rgba(<?php print $colortexttitle; ?>, 0.9);
|
||||||
--colortexttitlelink: rgb(<?php print $colortexttitlelink; ?>);
|
--colortexttitlelink: rgba(<?php print $colortexttitlelink; ?>, 0.9);
|
||||||
--colortext: rgb(<?php print $colortext; ?>);
|
--colortext: rgb(<?php print $colortext; ?>);
|
||||||
--colortextlink: rgb(<?php print $colortextlink; ?>);
|
--colortextlink: rgb(<?php print $colortextlink; ?>);
|
||||||
--colortextbackhmenu: #<?php echo $colortextbackhmenu; ?>;
|
--colortextbackhmenu: #<?php echo $colortextbackhmenu; ?>;
|
||||||
@ -986,6 +986,12 @@ select.flat.selectlimit {
|
|||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
.tdoverflowmax125 { /* For tdoverflow, the max-midth become a minimum ! */
|
||||||
|
max-width: 125px;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
.tdoverflowmax150 { /* For tdoverflow, the max-midth become a minimum ! */
|
.tdoverflowmax150 { /* For tdoverflow, the max-midth become a minimum ! */
|
||||||
max-width: 150px;
|
max-width: 150px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
@ -2604,7 +2610,18 @@ font.vsmenudisabledmargin { margin: 1px 1px 1px 6px; }
|
|||||||
li a.vsmenudisabled, li.vsmenudisabled { color: #aaa !important; }
|
li a.vsmenudisabled, li.vsmenudisabled { color: #aaa !important; }
|
||||||
|
|
||||||
a.help:link, a.help:visited, a.help:hover, a.help:active, span.help { text-align: <?php print $left; ?>; color: #aaa; text-decoration: none; }
|
a.help:link, a.help:visited, a.help:hover, a.help:active, span.help { text-align: <?php print $left; ?>; color: #aaa; text-decoration: none; }
|
||||||
.helppresent, .helppresent:hover { color: #f3e4ac !important; }
|
.helppresent, .helppresent:hover {
|
||||||
|
/* color: #f3e4ac !important; */
|
||||||
|
}
|
||||||
|
.helppresentcircle {
|
||||||
|
color: var(--butactionbg);
|
||||||
|
margin-left: -7px;
|
||||||
|
display: inline-block;
|
||||||
|
margin-top: -10px;
|
||||||
|
font-size: x-small;
|
||||||
|
vertical-align: super;
|
||||||
|
opacity: 0.95;
|
||||||
|
}
|
||||||
|
|
||||||
.vmenu div.blockvmenufirst, .vmenu div.blockvmenulogo, .vmenu div.blockvmenusearchphone, .vmenu div.blockvmenubookmarks
|
.vmenu div.blockvmenufirst, .vmenu div.blockvmenulogo, .vmenu div.blockvmenusearchphone, .vmenu div.blockvmenubookmarks
|
||||||
{
|
{
|
||||||
@ -3983,7 +4000,7 @@ img.boxhandle, img.boxclose {
|
|||||||
.ok { color: #114466; }
|
.ok { color: #114466; }
|
||||||
.warning { color: #887711 !important; }
|
.warning { color: #887711 !important; }
|
||||||
.error { color: #660000 !important; font-weight: bold; }
|
.error { color: #660000 !important; font-weight: bold; }
|
||||||
.green { color: #118822; }
|
.green { color: #118822 !important; }
|
||||||
|
|
||||||
div.ok {
|
div.ok {
|
||||||
color: #114466;
|
color: #114466;
|
||||||
|
|||||||
@ -65,9 +65,9 @@ $colorbacklinepairhover = '230,237,244'; // line hover
|
|||||||
$colorbacklinepairchecked = '230,237,244'; // line checked
|
$colorbacklinepairchecked = '230,237,244'; // line checked
|
||||||
$colorbacklinebreak = '248,247,244'; // line break
|
$colorbacklinebreak = '248,247,244'; // line break
|
||||||
$colorbackbody = '255,255,255';
|
$colorbackbody = '255,255,255';
|
||||||
$colortexttitlenotab = '10,120,140'; // 150,90,121 140,80,10 or 10,140,80 #875a7b green=0,123,140, violet: 0,50,120
|
$colortexttitlenotab = '35,135,140'; // 150,90,121 140,80,10 or 10,140,80 #875a7b green=0,123,140, violet: 0,50,120
|
||||||
$colortexttitlenotab2 = '100,0,100'; // 150,90,121 140,80,10 or 10,140,80 #875a7b green=0,123,140, violet: 0,50,120
|
$colortexttitlenotab2 = '100,0,100'; // 150,90,121 140,80,10 or 10,140,80 #875a7b green=0,123,140, violet: 0,50,120
|
||||||
$colortexttitle = '0,0,0';
|
$colortexttitle = '40, 40, 60';
|
||||||
$colortexttitlelink = '10, 20, 100';
|
$colortexttitlelink = '10, 20, 100';
|
||||||
$colortext = '0,0,0';
|
$colortext = '0,0,0';
|
||||||
$colortextlink = '10, 20, 100';
|
$colortextlink = '10, 20, 100';
|
||||||
@ -81,7 +81,7 @@ $toolTipFontColor = '#333';
|
|||||||
$textSuccess = '#28a745';
|
$textSuccess = '#28a745';
|
||||||
$colorblind_deuteranopes_textSuccess = '#37de5d';
|
$colorblind_deuteranopes_textSuccess = '#37de5d';
|
||||||
$textWarning = '#bc9526'; // See $badgeWarning
|
$textWarning = '#bc9526'; // See $badgeWarning
|
||||||
$textDanger = '#9f4705'; // See $badgeDanger
|
$textDanger = '#af4705'; // See $badgeDanger
|
||||||
$colorblind_deuteranopes_textWarning = $textWarning; // currently not tested with a color blind people so use default color
|
$colorblind_deuteranopes_textWarning = $textWarning; // currently not tested with a color blind people so use default color
|
||||||
|
|
||||||
|
|
||||||
@ -91,7 +91,7 @@ $badgeSecondary = '#aaaabb';
|
|||||||
$badgeInfo = '#aaaabb';
|
$badgeInfo = '#aaaabb';
|
||||||
$badgeSuccess = '#55a580';
|
$badgeSuccess = '#55a580';
|
||||||
$badgeWarning = '#bc9526'; // See $textWarning bc9526
|
$badgeWarning = '#bc9526'; // See $textWarning bc9526
|
||||||
$badgeDanger = '#9f4705'; // See $textDanger
|
$badgeDanger = '#af4705'; // See $textDanger
|
||||||
$badgeDark = '#343a40';
|
$badgeDark = '#343a40';
|
||||||
$badgeLight = '#f8f9fa';
|
$badgeLight = '#f8f9fa';
|
||||||
|
|
||||||
@ -110,8 +110,8 @@ $badgeStatus1 = '#bc9526'; // validated
|
|||||||
$badgeStatus1b = '#bc9526'; // validated
|
$badgeStatus1b = '#bc9526'; // validated
|
||||||
$badgeStatus2 = '#9c9c26'; // approved
|
$badgeStatus2 = '#9c9c26'; // approved
|
||||||
$badgeStatus3 = '#bca52b';
|
$badgeStatus3 = '#bca52b';
|
||||||
$badgeStatus4 = '#55a580'; // Color ok
|
$badgeStatus4 = '#25a580'; // Color ok
|
||||||
$badgeStatus4b = '#55a580'; // Color ok
|
$badgeStatus4b = '#25a580'; // Color ok
|
||||||
$badgeStatus5 = '#cad2d2';
|
$badgeStatus5 = '#cad2d2';
|
||||||
$badgeStatus6 = '#cad2d2';
|
$badgeStatus6 = '#cad2d2';
|
||||||
$badgeStatus7 = '#baa32b';
|
$badgeStatus7 = '#baa32b';
|
||||||
|
|||||||
@ -1011,6 +1011,12 @@ select.flat.selectlimit {
|
|||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
.tdoverflowmax125 { /* For tdoverflow, the max-midth become a minimum ! */
|
||||||
|
max-width: 125px;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
.tdoverflowmax150 { /* For tdoverflow, the max-midth become a minimum ! */
|
.tdoverflowmax150 { /* For tdoverflow, the max-midth become a minimum ! */
|
||||||
max-width: 150px;
|
max-width: 150px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
@ -3881,7 +3887,7 @@ img.boxhandle, img.boxclose {
|
|||||||
.ok { color: #114466; }
|
.ok { color: #114466; }
|
||||||
.warning { color: #887711 !important; }
|
.warning { color: #887711 !important; }
|
||||||
.error { color: #550000 !important; font-weight: bold; }
|
.error { color: #550000 !important; font-weight: bold; }
|
||||||
.green { color: #118822; }
|
.green { color: #118822 !important; }
|
||||||
|
|
||||||
div.ok {
|
div.ok {
|
||||||
color: #114466;
|
color: #114466;
|
||||||
|
|||||||
@ -40,6 +40,7 @@ if (!empty($conf->salaries->enabled)) require_once DOL_DOCUMENT_ROOT.'/salaries/
|
|||||||
$langs->loadLangs(array('companies', 'commercial', 'banks', 'bills', 'trips', 'holiday', 'salaries'));
|
$langs->loadLangs(array('companies', 'commercial', 'banks', 'bills', 'trips', 'holiday', 'salaries'));
|
||||||
|
|
||||||
$id = GETPOST('id', 'int');
|
$id = GETPOST('id', 'int');
|
||||||
|
$ref = GETPOST('ref', 'alphanohtml');
|
||||||
$bankid = GETPOST('bankid', 'int');
|
$bankid = GETPOST('bankid', 'int');
|
||||||
$action = GETPOST("action", 'alpha');
|
$action = GETPOST("action", 'alpha');
|
||||||
$cancel = GETPOST('cancel', 'alpha');
|
$cancel = GETPOST('cancel', 'alpha');
|
||||||
@ -217,6 +218,8 @@ if ($action == 'setdefault_range') {
|
|||||||
* View
|
* View
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
$form = new Form($db);
|
||||||
|
|
||||||
$childids = $user->getAllChildIds(1);
|
$childids = $user->getAllChildIds(1);
|
||||||
|
|
||||||
llxHeader(null, $langs->trans("BankAccounts"));
|
llxHeader(null, $langs->trans("BankAccounts"));
|
||||||
@ -332,9 +335,7 @@ if ($action != 'edit' && $action != 'create') // If not bank account yet, $acco
|
|||||||
// Nbre max d'elements des petites listes
|
// Nbre max d'elements des petites listes
|
||||||
$MAXLIST = $conf->global->MAIN_SIZE_SHORTLIST_LIMIT;
|
$MAXLIST = $conf->global->MAIN_SIZE_SHORTLIST_LIMIT;
|
||||||
|
|
||||||
/*
|
// Latest payments of salaries
|
||||||
* Latest salary payments
|
|
||||||
*/
|
|
||||||
if (!empty($conf->salaries->enabled) &&
|
if (!empty($conf->salaries->enabled) &&
|
||||||
$user->rights->salaries->read && (in_array($object->id, $childids) || $object->id == $user->id)
|
$user->rights->salaries->read && (in_array($object->id, $childids) || $object->id == $user->id)
|
||||||
)
|
)
|
||||||
@ -365,14 +366,17 @@ if ($action != 'edit' && $action != 'create') // If not bank account yet, $acco
|
|||||||
$objp = $db->fetch_object($resql);
|
$objp = $db->fetch_object($resql);
|
||||||
|
|
||||||
print '<tr class="oddeven">';
|
print '<tr class="oddeven">';
|
||||||
print '<td class="nowrap">';
|
print '<td class="nowraponall">';
|
||||||
$salary->id = $objp->rowid;
|
$salary->id = $objp->rowid;
|
||||||
$salary->ref = $objp->rowid;
|
$salary->ref = $objp->rowid;
|
||||||
|
|
||||||
print $salary->getNomUrl(1);
|
print $salary->getNomUrl(1);
|
||||||
print '</td><td class="right" width="80px">'.dol_print_date($db->jdate($objp->datesp), 'day')."</td>\n";
|
print '</td>';
|
||||||
|
|
||||||
|
print '<td class="right" width="80px">'.dol_print_date($db->jdate($objp->datesp), 'day')."</td>\n";
|
||||||
print '<td class="right" width="80px">'.dol_print_date($db->jdate($objp->dateep), 'day')."</td>\n";
|
print '<td class="right" width="80px">'.dol_print_date($db->jdate($objp->dateep), 'day')."</td>\n";
|
||||||
print '<td class="right" style="min-width: 60px">'.price($objp->amount).'</td></tr>';
|
print '<td class="right" style="min-width: 60px">'.price($objp->amount).'</td>';
|
||||||
|
|
||||||
|
print '</tr>';
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
$db->free($resql);
|
$db->free($resql);
|
||||||
|
|||||||
@ -1753,7 +1753,7 @@ if ($action == 'create' || $action == 'adduserldap')
|
|||||||
$s .= $societe->getNomUrl(1, '');
|
$s .= $societe->getNomUrl(1, '');
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$s .= $langs->trans("ThisUserIsNot");
|
$s .= '<span class="opacitymedium hideonsmartphone">'.$langs->trans("ThisUserIsNot").'</span>';
|
||||||
}
|
}
|
||||||
if (!empty($object->contact_id))
|
if (!empty($object->contact_id))
|
||||||
{
|
{
|
||||||
@ -1783,7 +1783,7 @@ if ($action == 'create' || $action == 'adduserldap')
|
|||||||
$adh->ref = $adh->getFullname($langs); // Force to show login instead of id
|
$adh->ref = $adh->getFullname($langs); // Force to show login instead of id
|
||||||
print $adh->getNomUrl(-1);
|
print $adh->getNomUrl(-1);
|
||||||
} else {
|
} else {
|
||||||
print $langs->trans("UserNotLinkedToMember");
|
print '<span class="opacitymedium hideonsmartphone">'.$langs->trans("UserNotLinkedToMember").'</span>';
|
||||||
}
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '</tr>'."\n";
|
print '</tr>'."\n";
|
||||||
@ -2475,7 +2475,7 @@ if ($action == 'create' || $action == 'adduserldap')
|
|||||||
print '<tr>';
|
print '<tr>';
|
||||||
print '<td>'.$langs->trans("Photo").'</td>';
|
print '<td>'.$langs->trans("Photo").'</td>';
|
||||||
print '<td>';
|
print '<td>';
|
||||||
print $form->showphoto('userphoto', $object, 60, 0, $caneditfield, 'photowithmargin', 'small');
|
print $form->showphoto('userphoto', $object, 60, 0, $caneditfield, 'photowithmargin', 'small', 1, 0, 'user', 1);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
@ -2531,9 +2531,9 @@ if ($action == 'create' || $action == 'adduserldap')
|
|||||||
print ' / <a href="'.DOL_URL_ROOT.'/contact/card.php?id='.$object->contact_id.'">'.img_object($langs->trans("ShowContact"), 'contact').' '.dol_trunc($contact->getFullName($langs), 32).'</a>';
|
print ' / <a href="'.DOL_URL_ROOT.'/contact/card.php?id='.$object->contact_id.'">'.img_object($langs->trans("ShowContact"), 'contact').' '.dol_trunc($contact->getFullName($langs), 32).'</a>';
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
print $langs->trans("ThisUserIsNot");
|
print '<span class="opacitymedium hideonsmartphone">'.$langs->trans("ThisUserIsNot").'</span>';
|
||||||
}
|
}
|
||||||
print ' ('.$langs->trans("UseTypeFieldToChange").')';
|
print ' <span class="opacitymedium hideonsmartphone">('.$langs->trans("UseTypeFieldToChange").')</span>';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
}
|
}
|
||||||
@ -2551,7 +2551,7 @@ if ($action == 'create' || $action == 'adduserldap')
|
|||||||
$adh->ref = $adh->login; // Force to show login instead of id
|
$adh->ref = $adh->login; // Force to show login instead of id
|
||||||
print $adh->getNomUrl(1);
|
print $adh->getNomUrl(1);
|
||||||
} else {
|
} else {
|
||||||
print $langs->trans("UserNotLinkedToMember");
|
print '<span class="opacitymedium hideonsmartphone">'.$langs->trans("UserNotLinkedToMember").'</span>';
|
||||||
}
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user