Merge branch 'develop' into NEW_expense_report_project_required
This commit is contained in:
commit
de49e4e375
11
README.md
11
README.md
@ -154,18 +154,18 @@ See the [ChangeLog](https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog)
|
||||
|
||||
### Other application/modules
|
||||
|
||||
- Electronic Document Management (EDM)
|
||||
- Electronic Document Management (EDM)
|
||||
- Bookmarks management
|
||||
- Reporting
|
||||
- Data export/import
|
||||
- Barcodes
|
||||
- Barcodes
|
||||
- Margin calculations
|
||||
- LDAP connectivity
|
||||
- ClickToDial integration
|
||||
- Mass emailing
|
||||
- RSS integration
|
||||
- Skype integration
|
||||
- Social platforms linking
|
||||
- Social platforms linking
|
||||
- Payment platforms integration (PayPal, Stripe, Paybox...)
|
||||
- Email-Collector
|
||||
|
||||
@ -179,14 +179,11 @@ See the [ChangeLog](https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog)
|
||||
- Multi-Users and groups with finely grained rights
|
||||
- Multi-Currency
|
||||
- Multi-Company (by adding of an external module)
|
||||
|
||||
- Very user friendly and easy to use
|
||||
- customizable Dashboard
|
||||
- Highly customizable: enable only the modules you need, add user personalized fields, choose your skin, several menu managers (can be used by internal users as a back-office with a particular menu, or by external users as a front-office with another one)
|
||||
|
||||
- APIs (REST, SOAP)
|
||||
- Code that is easy to understand, maintain and develop (PHP with no heavy framework; trigger and hook architecture)
|
||||
|
||||
- Support a lot of country specific features:
|
||||
- Spanish Tax RE and ISPF
|
||||
- French NPR VAT rate (VAT called "Non Perçue Récupérable" for DOM-TOM)
|
||||
@ -197,7 +194,7 @@ See the [ChangeLog](https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog)
|
||||
- Compatible with European GDPR rules
|
||||
- ...
|
||||
- Flexible PDF & ODT generation for invoices, proposals, orders...
|
||||
- …
|
||||
- ...
|
||||
|
||||
|
||||
### System Environment / Requirements
|
||||
|
||||
@ -54,12 +54,12 @@ ONLY vulnerabilities discovered, when the following setup on test platform is us
|
||||
* $dolibarr_main_prod must be set to 1 into conf.php
|
||||
* $dolibarr_nocsrfcheck must be kept to the value 0 into conf.php (this is the default value)
|
||||
* $dolibarr_main_force_https must be set to something else than 0.
|
||||
* The constant MAIN_SECURITY_CSRF_WITH_TOKEN must be set to 2 into backoffice menu Home - Setup - Other (this protection should be set to 2 soon by default)
|
||||
* The constant MAIN_SECURITY_CSRF_WITH_TOKEN must be set to 3 into backoffice menu Home - Setup - Other (this protection should be set to 3 soon by default)
|
||||
* The module DebugBar and ModuleBuilder must NOT be enabled (by default, these modules are not enabled. They are developer tools)
|
||||
* ONLY security reports on modules provided by default and with the "stable" status are valid (troubles into "experimental", "developement" or external modules are not valid vulnerabilities).
|
||||
* The root of web server must link to htdocs and the documents directory must be outside of the web server root (this is the default when using the default installer but may differs with external installer).
|
||||
* The web server setup must be done so only the documents directory is in write mode. The root directory called htdocs must be readonly.
|
||||
* CSRF attacks are accepted when using a POST URL, but when using GET URL, they are validated only for creating, updating or deleting data resctricted from pages restricted to admin users.
|
||||
* CSRF attacks are accepted but double check that you have set MAIN_SECURITY_CSRF_WITH_TOKEN to value 3.
|
||||
* Ability for a high level user to edit web site pages into the CMS by including HTML or Javascript is an expected feature. Vulnerabilities into the website module are validated only if HTML or Javascript injection can be done by a non allowed user.
|
||||
|
||||
Scope is the web application (back office) and the APIs.
|
||||
|
||||
@ -2056,7 +2056,7 @@ CREATE TABLE `llx_c_holiday_types` (
|
||||
`label` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
|
||||
`affect` int(11) NOT NULL,
|
||||
`delay` int(11) NOT NULL,
|
||||
`newByMonth` double(8,5) NOT NULL DEFAULT 0.00000,
|
||||
`newbymonth` double(8,5) NOT NULL DEFAULT 0.00000,
|
||||
`fk_country` int(11) DEFAULT NULL,
|
||||
`active` int(11) DEFAULT 1,
|
||||
PRIMARY KEY (`rowid`),
|
||||
|
||||
@ -186,12 +186,28 @@ if ($action == 'update') {
|
||||
$msg .= '<div><span style="color:red">'.$langs->trans("ErrorDB").' : '.$langs->trans("Product").' '.$productid.' '.$langs->trans("NotVentilatedinAccount").' : id='.$accounting_account_id.'<br> <pre>'.$sql.'</pre></span></div>';
|
||||
$ko++;
|
||||
} else {
|
||||
$db->begin();
|
||||
|
||||
$sql = '';
|
||||
if (!empty($conf->global->MAIN_PRODUCT_PERENTITY_SHARED)) {
|
||||
$sql = "INSERT INTO ".MAIN_DB_PREFIX."product_perentity (fk_product, entity, '".$db->escape($accountancy_field_name)."')";
|
||||
$sql .= " VALUES (".((int) $productid).", ".((int) $conf->entity).", '".$db->escape($accounting->account_number)."')";
|
||||
$sql .= " ON DUPLICATE KEY UPDATE ".$accountancy_field_name." = '".$db->escape($accounting->account_number)."'";
|
||||
$sql_exists = "SELECT rowid FROM " . MAIN_DB_PREFIX . "product_perentity";
|
||||
$sql_exists .= " WHERE fk_product = " . ((int) $productid) . " AND entity = " . ((int) $conf->entity);
|
||||
$resql_exists = $db->query($sql_exists);
|
||||
if (!$resql_exists) {
|
||||
$msg .= '<div><span style="color:red">'.$langs->trans("ErrorDB").' : '.$langs->trans("Product").' '.$productid.' '.$langs->trans("NotVentilatedinAccount").' : id='.$accounting_account_id.'<br> <pre>'.$resql_exists.'</pre></span></div>';
|
||||
$ko++;
|
||||
} else {
|
||||
$nb_exists = $db->num_rows($resql_exists);
|
||||
if ($nb_exists <= 0) {
|
||||
// insert
|
||||
$sql = "INSERT INTO " . MAIN_DB_PREFIX . "product_perentity (fk_product, entity, '" . $db->escape($accountancy_field_name) . "')";
|
||||
$sql .= " VALUES (" . ((int) $productid) . ", " . ((int) $conf->entity) . ", '" . $db->escape($accounting->account_number) . "')";
|
||||
} else {
|
||||
$obj_exists = $db->fetch_object($resql_exists);
|
||||
// update
|
||||
$sql = "UPDATE " . MAIN_DB_PREFIX . "product_perentity";
|
||||
$sql .= " SET " . $accountancy_field_name . " = '" . $db->escape($accounting->account_number) . "'";
|
||||
$sql .= " WHERE rowid = " . ((int) $obj_exists->rowid);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$sql = " UPDATE ".MAIN_DB_PREFIX."product";
|
||||
$sql .= " SET ".$accountancy_field_name." = '".$db->escape($accounting->account_number)."'";
|
||||
@ -199,6 +215,9 @@ if ($action == 'update') {
|
||||
}
|
||||
|
||||
dol_syslog("/accountancy/admin/productaccount.php", LOG_DEBUG);
|
||||
|
||||
$db->begin();
|
||||
|
||||
if ($db->query($sql)) {
|
||||
$ok++;
|
||||
$db->commit();
|
||||
|
||||
@ -1012,7 +1012,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
|
||||
if (count($listetype)) {
|
||||
print $form->selectarray("typeid", $listetype, (GETPOST('typeid', 'int') ? GETPOST('typeid', 'int') : $typeid), (count($listetype) > 1 ? 1 : 0), 0, 0, '', 0, 0, 0, '', '', 1);
|
||||
} else {
|
||||
print '<font class="error">'.$langs->trans("NoTypeDefinedGoToSetup").'</font>';
|
||||
print '<span class="error">'.$langs->trans("NoTypeDefinedGoToSetup").'</span>';
|
||||
}
|
||||
print "</td>\n";
|
||||
|
||||
@ -1997,7 +1997,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
|
||||
print '</div>';
|
||||
|
||||
if ($isinspip == -1) {
|
||||
print '<br><br><font class="error">'.$langs->trans('SPIPConnectionFailed').': '.$mailmanspip->error.'</font>';
|
||||
print '<br><br><span class="error">'.$langs->trans('SPIPConnectionFailed').': '.$mailmanspip->error.'</span>';
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -190,7 +190,7 @@ if ($result > 0) {
|
||||
|
||||
if (empty($dn)) {
|
||||
$langs->load("errors");
|
||||
print '<tr class="oddeven"><td colspan="2"><font class="error">'.$langs->trans("ErrorModuleSetupNotComplete", $langs->transnoentitiesnoconv("Member")).'</font></td></tr>';
|
||||
print '<tr class="oddeven"><td colspan="2"><span class="error">'.$langs->trans("ErrorModuleSetupNotComplete", $langs->transnoentitiesnoconv("Member")).'</span></td></tr>';
|
||||
} else {
|
||||
$records = $ldap->getAttribute($dn, $search);
|
||||
|
||||
@ -199,7 +199,7 @@ if ($result > 0) {
|
||||
// Show tree
|
||||
if (((!is_numeric($records)) || $records != 0) && (!isset($records['count']) || $records['count'] > 0)) {
|
||||
if (!is_array($records)) {
|
||||
print '<tr class="oddeven"><td colspan="2"><font class="error">'.$langs->trans("ErrorFailedToReadLDAP").'</font></td></tr>';
|
||||
print '<tr class="oddeven"><td colspan="2"><span class="error">'.$langs->trans("ErrorFailedToReadLDAP").'</span></td></tr>';
|
||||
} else {
|
||||
$result = show_ldap_content($records, 0, $records['count'], true);
|
||||
}
|
||||
|
||||
@ -670,7 +670,7 @@ if ($rowid > 0) {
|
||||
print '<div class="tabsAction">';
|
||||
|
||||
if ($object->statut > 0) {
|
||||
print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER["PHP_SELF"].'?rowid='.$rowid.'&action=addsubscription">'.$langs->trans("AddSubscription")."</a></div>";
|
||||
print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER["PHP_SELF"].'?rowid='.$rowid.'&action=addsubscription&token='.newToken().'">'.$langs->trans("AddSubscription")."</a></div>";
|
||||
} else {
|
||||
print '<div class="inline-block divButAction"><a class="butActionRefused classfortooltip" href="#" title="'.dol_escape_htmltag($langs->trans("ValidateBefore")).'">'.$langs->trans("AddSubscription").'</a></div>';
|
||||
}
|
||||
|
||||
@ -318,6 +318,19 @@ if (!$rowid && $action != 'create' && $action != 'edit') {
|
||||
print "</tr>";
|
||||
$i++;
|
||||
}
|
||||
|
||||
// If no record found
|
||||
if ($num == 0) {
|
||||
/*$colspan = 1;
|
||||
foreach ($arrayfields as $key => $val) {
|
||||
if (!empty($val['checked'])) {
|
||||
$colspan++;
|
||||
}
|
||||
}*/
|
||||
$colspan = 8;
|
||||
print '<tr><td colspan="'.$colspan.'" class="opacitymedium">'.$langs->trans("NoRecordFound").'</td></tr>';
|
||||
}
|
||||
|
||||
print "</table>";
|
||||
print '</div>';
|
||||
|
||||
|
||||
@ -161,7 +161,7 @@ if ($result > 0) {
|
||||
// Show tree
|
||||
if (((!is_numeric($records)) || $records != 0) && (!isset($records['count']) || $records['count'] > 0)) {
|
||||
if (!is_array($records)) {
|
||||
print '<tr class="oddeven"><td colspan="2"><font class="error">'.$langs->trans("ErrorFailedToReadLDAP").'</font></td></tr>';
|
||||
print '<tr class="oddeven"><td colspan="2"><span class="error">'.$langs->trans("ErrorFailedToReadLDAP").'</span></td></tr>';
|
||||
} else {
|
||||
$result = show_ldap_content($records, 0, $records['count'], true);
|
||||
}
|
||||
|
||||
@ -91,7 +91,7 @@ $form = new Form($db);
|
||||
$formother = new FormOther($db);
|
||||
$formcompany = new FormCompany($db);
|
||||
|
||||
$countrynotdefined = '<font class="error">'.$langs->trans("ErrorSetACountryFirst").' ('.$langs->trans("SeeAbove").')</font>';
|
||||
$countrynotdefined = '<span class="error">'.$langs->trans("ErrorSetACountryFirst").' ('.$langs->trans("SeeAbove").')</span>';
|
||||
|
||||
print '<span class="opacitymedium">'.$langs->trans("AccountantDesc")."</span><br>\n";
|
||||
print "<br>\n";
|
||||
|
||||
@ -302,7 +302,7 @@ if (!isset($_SERVER['WINDIR'])) {
|
||||
print '<input type="text" size="40" name="GENBARCODE_LOCATION" value="'.$conf->global->GENBARCODE_LOCATION.'">';
|
||||
if (!empty($conf->global->GENBARCODE_LOCATION) && !@file_exists($conf->global->GENBARCODE_LOCATION)) {
|
||||
$langs->load("errors");
|
||||
print '<br><font class="error">'.$langs->trans("ErrorFileNotFound", $conf->global->GENBARCODE_LOCATION).'</font>';
|
||||
print '<br><span class="error">'.$langs->trans("ErrorFileNotFound", $conf->global->GENBARCODE_LOCATION).'</span>';
|
||||
}
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
@ -360,7 +360,7 @@ foreach ($boxtoadd as $box) {
|
||||
print '</tr>'."\n";
|
||||
}
|
||||
if (!count($boxtoadd) && count($boxactivated)) {
|
||||
print '<tr><td class="opacitymedium" colspan="4">'.$langs->trans("AllWidgetsWereEnabled").'</td></tr>';
|
||||
print '<tr><td colspan="4"><span class="opacitymedium">'.$langs->trans("AllWidgetsWereEnabled").'</span></td></tr>';
|
||||
}
|
||||
print '</table>'."\n";
|
||||
print '</div>';
|
||||
|
||||
@ -369,7 +369,7 @@ $form = new Form($db);
|
||||
$formother = new FormOther($db);
|
||||
$formcompany = new FormCompany($db);
|
||||
|
||||
$countrynotdefined = '<font class="error">'.$langs->trans("ErrorSetACountryFirst").' ('.$langs->trans("SeeAbove").')</font>';
|
||||
$countrynotdefined = '<span class="error">'.$langs->trans("ErrorSetACountryFirst").' ('.$langs->trans("SeeAbove").')</span>';
|
||||
|
||||
print load_fiche_titre($langs->trans("CompanyFoundation"), '', 'title_setup');
|
||||
|
||||
|
||||
@ -223,7 +223,7 @@ $tabsql[24] = "SELECT rowid as rowid, code, label, active FROM ".MAIN_DB_PREFI
|
||||
$tabsql[25] = "SELECT rowid as rowid, code, label, active, module FROM ".MAIN_DB_PREFIX."c_type_container as t WHERE t.entity IN (".getEntity('c_type_container').")";
|
||||
//$tabsql[26]= "SELECT rowid as rowid, code, label, short_label, active FROM ".MAIN_DB_PREFIX."c_units";
|
||||
$tabsql[27] = "SELECT id as rowid, code, libelle, picto, active FROM ".MAIN_DB_PREFIX."c_stcomm";
|
||||
$tabsql[28] = "SELECT h.rowid as rowid, h.code, h.label, h.affect, h.delay, h.newByMonth, h.fk_country as country_id, c.code as country_code, c.label as country, h.active FROM ".MAIN_DB_PREFIX."c_holiday_types as h LEFT JOIN ".MAIN_DB_PREFIX."c_country as c ON h.fk_country=c.rowid";
|
||||
$tabsql[28] = "SELECT h.rowid as rowid, h.code, h.label, h.affect, h.delay, h.newbymonth, h.fk_country as country_id, c.code as country_code, c.label as country, h.active FROM ".MAIN_DB_PREFIX."c_holiday_types as h LEFT JOIN ".MAIN_DB_PREFIX."c_country as c ON h.fk_country=c.rowid";
|
||||
$tabsql[29] = "SELECT rowid as rowid, code, label, percent, position, active FROM ".MAIN_DB_PREFIX."c_lead_status";
|
||||
$tabsql[30] = "SELECT rowid, code, name, paper_size, orientation, metric, leftmargin, topmargin, nx, ny, spacex, spacey, width, height, font_size, custom_x, custom_y, active FROM ".MAIN_DB_PREFIX."c_format_cards";
|
||||
//$tabsql[31]= "SELECT s.rowid as rowid, pcg_version, s.label, s.active FROM ".MAIN_DB_PREFIX."accounting_system as s";
|
||||
@ -315,7 +315,7 @@ $tabfield[24] = "code,label";
|
||||
$tabfield[25] = "code,label";
|
||||
//$tabfield[26]= "code,label,short_label";
|
||||
$tabfield[27] = "code,libelle,picto";
|
||||
$tabfield[28] = "code,label,affect,delay,newByMonth,country_id,country";
|
||||
$tabfield[28] = "code,label,affect,delay,newbymonth,country_id,country";
|
||||
$tabfield[29] = "code,label,percent,position";
|
||||
$tabfield[30] = "code,name,paper_size,orientation,metric,leftmargin,topmargin,nx,ny,spacex,spacey,width,height,font_size,custom_x,custom_y";
|
||||
//$tabfield[31]= "pcg_version,label";
|
||||
@ -361,7 +361,7 @@ $tabfieldvalue[24] = "code,label";
|
||||
$tabfieldvalue[25] = "code,label";
|
||||
//$tabfieldvalue[26]= "code,label,short_label";
|
||||
$tabfieldvalue[27] = "code,libelle,picto";
|
||||
$tabfieldvalue[28] = "code,label,affect,delay,newByMonth,country";
|
||||
$tabfieldvalue[28] = "code,label,affect,delay,newbymonth,country";
|
||||
$tabfieldvalue[29] = "code,label,percent,position";
|
||||
$tabfieldvalue[30] = "code,name,paper_size,orientation,metric,leftmargin,topmargin,nx,ny,spacex,spacey,width,height,font_size,custom_x,custom_y";
|
||||
//$tabfieldvalue[31]= "pcg_version,label";
|
||||
@ -407,7 +407,7 @@ $tabfieldinsert[24] = "code,label";
|
||||
$tabfieldinsert[25] = "code,label";
|
||||
//$tabfieldinsert[26]= "code,label,short_label";
|
||||
$tabfieldinsert[27] = "code,libelle,picto";
|
||||
$tabfieldinsert[28] = "code,label,affect,delay,newByMonth,fk_country";
|
||||
$tabfieldinsert[28] = "code,label,affect,delay,newbymonth,fk_country";
|
||||
$tabfieldinsert[29] = "code,label,percent,position";
|
||||
$tabfieldinsert[30] = "code,name,paper_size,orientation,metric,leftmargin,topmargin,nx,ny,spacex,spacey,width,height,font_size,custom_x,custom_y";
|
||||
//$tabfieldinsert[31]= "pcg_version,label";
|
||||
@ -548,7 +548,7 @@ $tabhelp[24] = array('code'=>$langs->trans("EnterAnyCode"));
|
||||
$tabhelp[25] = array('code'=>$langs->trans('EnterAnyCode'));
|
||||
//$tabhelp[26] = array('code'=>$langs->trans("EnterAnyCode"));
|
||||
$tabhelp[27] = array('code'=>$langs->trans("EnterAnyCode"), 'picto'=>$langs->trans("PictoHelp"));
|
||||
$tabhelp[28] = array('affect'=>$langs->trans("FollowedByACounter"), 'delay'=>$langs->trans("MinimumNoticePeriod"), 'newByMonth'=>$langs->trans("NbAddedAutomatically"));
|
||||
$tabhelp[28] = array('affect'=>$langs->trans("FollowedByACounter"), 'delay'=>$langs->trans("MinimumNoticePeriod"), 'newbymonth'=>$langs->trans("NbAddedAutomatically"));
|
||||
$tabhelp[29] = array('code'=>$langs->trans("EnterAnyCode"), 'percent'=>$langs->trans("OpportunityPercent"), 'position'=>$langs->trans("PositionIntoComboList"));
|
||||
$tabhelp[30] = array('code'=>$langs->trans("EnterAnyCode"), 'name'=>$langs->trans("LabelName"), 'paper_size'=>$langs->trans("LabelPaperSize"));
|
||||
//$tabhelp[31] = array('pcg_version'=>$langs->trans("EnterAnyCode"));
|
||||
@ -1175,6 +1175,8 @@ if ($id) {
|
||||
$sql .= natural_search("r.code_region", $search_code);
|
||||
} elseif ($search_code != '' && $id == 7) {
|
||||
$sql .= natural_search("a.code", $search_code);
|
||||
} elseif ($search_code != '' && $id == 10) {
|
||||
$sql .= natural_search("t.code", $search_code);
|
||||
} elseif ($search_code != '' && $id != 9) {
|
||||
$sql .= natural_search("code", $search_code);
|
||||
}
|
||||
@ -1392,7 +1394,7 @@ if ($id) {
|
||||
if ($value == 'delay') {
|
||||
$valuetoshow = $langs->trans("NoticePeriod");
|
||||
}
|
||||
if ($value == 'newByMonth') {
|
||||
if ($value == 'newbymonth') {
|
||||
$valuetoshow = $langs->trans("NewByMonth");
|
||||
}
|
||||
if ($value == 'fk_tva') {
|
||||
@ -1737,7 +1739,7 @@ if ($id) {
|
||||
if ($value == 'delay') {
|
||||
$valuetoshow = $langs->trans("NoticePeriod");
|
||||
}
|
||||
if ($value == 'newByMonth') {
|
||||
if ($value == 'newbymonth') {
|
||||
$valuetoshow = $langs->trans("NewByMonth");
|
||||
}
|
||||
if ($value == 'fk_tva') {
|
||||
|
||||
@ -232,7 +232,7 @@ class PrestaShopWebservice
|
||||
if ($response != '') {
|
||||
libxml_clear_errors();
|
||||
libxml_use_internal_errors(true);
|
||||
$xml = simplexml_load_string($response, 'SimpleXMLElement', LIBXML_NOCDATA);
|
||||
$xml = simplexml_load_string($response, 'SimpleXMLElement', LIBXML_NOCDATA|LIBXML_NONET);
|
||||
if (libxml_get_errors()) {
|
||||
$msg = var_export(libxml_get_errors(), true);
|
||||
libxml_clear_errors();
|
||||
|
||||
@ -16,7 +16,7 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file htdocs/admin/eventorganization_extrafields.php
|
||||
* \file htdocs/admin/eventorganization_confbooth_extrafields.php
|
||||
* \ingroup bom
|
||||
* \brief Page to setup extra fields of EventOrganization
|
||||
*/
|
||||
|
||||
@ -21,7 +21,7 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file admin/conferenceorboothattendee_extrafields.php
|
||||
* \file htdocs/admin/eventorganization_confboothattendee_extrafields.php
|
||||
* \ingroup eventorganization
|
||||
* \brief Page to setup extra fields of conferenceorboothattendee
|
||||
*/
|
||||
|
||||
@ -145,14 +145,18 @@ if ($action == 'updateMask') {
|
||||
$draft = GETPOST('EXPENSEREPORT_DRAFT_WATERMARK', 'alpha');
|
||||
$res2 = dolibarr_set_const($db, "EXPENSEREPORT_DRAFT_WATERMARK", trim($draft), 'chaine', 0, '', $conf->entity);
|
||||
|
||||
if ($conf->projet->enabled) {
|
||||
$projects = GETPOST('EXPENSEREPORT_PROJECT_IS_REQUIRED', 'int');
|
||||
$res3 = dolibarr_set_const($db, 'EXPENSEREPORT_PROJECT_IS_REQUIRED', intval($projects), 'chaine', 0, '', $conf->entity);
|
||||
} else {
|
||||
$res3 = dolibarr_del_const($this->db, 'EXPENSEREPORT_PROJECT_IS_REQUIRED', $conf->entity);
|
||||
$res3 = 0;
|
||||
if (!empty($conf->projet->enabled) && GETPOSTISSET('EXPENSEREPORT_PROJECT_IS_REQUIRED')) { // Option may not be provided
|
||||
$res3 = dolibarr_set_const($db, 'EXPENSEREPORT_PROJECT_IS_REQUIRED', GETPOST('EXPENSEREPORT_PROJECT_IS_REQUIRED', 'int'), 'chaine', 0, '', $conf->entity);
|
||||
}
|
||||
|
||||
if (!$res1 > 0 || !$res2 > 0 || !$res3 > 0) {
|
||||
$dates = GETPOST('EXPENSEREPORT_PREFILL_DATES_WITH_CURRENT_MONTH', 'int');
|
||||
$res4 = dolibarr_set_const($db, 'EXPENSEREPORT_PREFILL_DATES_WITH_CURRENT_MONTH', intval($dates), 'chaine', 0, '', $conf->entity);
|
||||
|
||||
$amounts = GETPOST('EXPENSEREPORT_FORCE_LINE_AMOUNTS_INCLUDING_TAXES_ONLY', 'int');
|
||||
$res5 = dolibarr_set_const($db, 'EXPENSEREPORT_FORCE_LINE_AMOUNTS_INCLUDING_TAXES_ONLY', intval($amounts), 'chaine', 0, '', $conf->entity);
|
||||
|
||||
if (!($res1 > 0) || !($res2 > 0) || !($res3 > 0) || !($res4 >0) || !($res5 >0)) {
|
||||
$error++;
|
||||
}
|
||||
|
||||
@ -465,7 +469,7 @@ print $form->textwithpicto($langs->trans("WatermarkOnDraftExpenseReports"), $htm
|
||||
print '<input class="flat minwidth200" type="text" name="EXPENSEREPORT_DRAFT_WATERMARK" value="'.$conf->global->EXPENSEREPORT_DRAFT_WATERMARK.'">';
|
||||
print '</td></tr>'."\n";
|
||||
|
||||
if ($conf->projet->enabled) {
|
||||
if (!empty($conf->projet->enabled)) {
|
||||
print '<tr class="oddeven"><td>';
|
||||
print $langs->trans('ProjectIsRequiredOnExpenseReports');
|
||||
print '</td><td class="right">';
|
||||
@ -473,6 +477,18 @@ if ($conf->projet->enabled) {
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
print '<tr class="oddeven"><td>';
|
||||
print $langs->trans('PrefillExpenseReportDatesWithCurrentMonth');
|
||||
print '</td><td class="right">';
|
||||
print $form->selectyesno('EXPENSEREPORT_PREFILL_DATES_WITH_CURRENT_MONTH', empty($conf->global->EXPENSEREPORT_PREFILL_DATES_WITH_CURRENT_MONTH) ? 0 : 1, 1);
|
||||
print '</td></tr>';
|
||||
|
||||
print '<tr class="oddeven"><td>';
|
||||
print $langs->trans('ForceExpenseReportsLineAmountsIncludingTaxesOnly');
|
||||
print '</td><td class="right">';
|
||||
print $form->selectyesno('EXPENSEREPORT_FORCE_LINE_AMOUNTS_INCLUDING_TAXES_ONLY', empty($conf->global->EXPENSEREPORT_FORCE_LINE_AMOUNTS_INCLUDING_TAXES_ONLY) ? 0 : 1, 1);
|
||||
print '</td></tr>';
|
||||
|
||||
print '</table>';
|
||||
|
||||
print $form->buttonsSaveCancel("Save", '');
|
||||
|
||||
@ -275,9 +275,9 @@ if ($resql) {
|
||||
print "<td>".$langs->trans("Status")."</td>";
|
||||
print "<td>";
|
||||
if ($result > 0 && empty($rss->error)) {
|
||||
print '<font class="ok">'.$langs->trans("Online").'</div>';
|
||||
print '<span class="ok">'.$langs->trans("Online").'</div>';
|
||||
} else {
|
||||
print '<font class="error">'.$langs->trans("Offline");
|
||||
print '<span class="error">'.$langs->trans("Offline");
|
||||
$langs->load("errors");
|
||||
if ($rssparser->error) {
|
||||
print ' - '.$langs->trans($rssparser->error);
|
||||
|
||||
@ -112,8 +112,8 @@ $reshook = $hookmanager->executeHooks('addHomeSetup', $parameters, $object, $act
|
||||
print $hookmanager->resPrint;
|
||||
if (empty($reshook)) {
|
||||
// Show into other
|
||||
print '<span class="opacitymedium">'.$langs->trans("SetupDescription5")."</span><br>";
|
||||
print "<br>";
|
||||
print '<span class="opacitymedium hideonsmartphone">'.$langs->trans("SetupDescription5")."</span><br>";
|
||||
print '<br class="hideonsmartphone">';
|
||||
|
||||
// Show logo
|
||||
print '<div class="center"><div class="logo_setup"></div></div>';
|
||||
|
||||
@ -17,7 +17,7 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file knowledgemanagement/admin/setup.php
|
||||
* \file htdocs/admin/knowledgemanagement.php
|
||||
* \ingroup knowledgemanagement
|
||||
* \brief KnowledgeManagement setup page.
|
||||
*/
|
||||
@ -65,9 +65,7 @@ if (!$user->admin) {
|
||||
* Actions
|
||||
*/
|
||||
|
||||
if ((float) DOL_VERSION >= 6) {
|
||||
include DOL_DOCUMENT_ROOT.'/core/actions_setmoduleoptions.inc.php';
|
||||
}
|
||||
include DOL_DOCUMENT_ROOT.'/core/actions_setmoduleoptions.inc.php';
|
||||
|
||||
if ($action == 'updateMask') {
|
||||
$maskconstorder = GETPOST('maskconstorder', 'alpha');
|
||||
|
||||
@ -1,10 +1,10 @@
|
||||
<?php
|
||||
/* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004 Sebastien Di Cintio <sdicintio@ressource-toi.org>
|
||||
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
||||
* Copyright (C) 2005-2017 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2006-2020 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2011-2013 Juanjo Menent <jmenent@2byte.es>
|
||||
/* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004 Sebastien Di Cintio <sdicintio@ressource-toi.org>
|
||||
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
||||
* Copyright (C) 2005-2017 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2006-2020 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2011-2013 Juanjo Menent <jmenent@2byte.es>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -153,7 +153,7 @@ $arraylist['dolibarr2ldap'] = $langs->trans("DolibarrToLDAP");
|
||||
print $form->selectarray('activesynchro', $arraylist, $conf->global->LDAP_SYNCHRO_ACTIVE);
|
||||
print '</td><td><span class="opacitymedium">'.$langs->trans("LDAPDnSynchroActiveExample").'</span>';
|
||||
if ($conf->global->LDAP_SYNCHRO_ACTIVE && !$conf->global->LDAP_USER_DN) {
|
||||
print '<br><font class="error">'.$langs->trans("LDAPSetupNotComplete").'</font>';
|
||||
print '<br><span class="error">'.$langs->trans("LDAPSetupNotComplete").'</span>';
|
||||
}
|
||||
print '</td></tr>';
|
||||
|
||||
@ -297,24 +297,24 @@ if (function_exists("ldap_connect")) {
|
||||
if ($result > 0) {
|
||||
// Test ldap connect and bind
|
||||
print img_picto('', 'info').' ';
|
||||
print '<font class="ok">'.$langs->trans("LDAPTCPConnectOK", $conf->global->LDAP_SERVER_HOST, $conf->global->LDAP_SERVER_PORT).'</font>';
|
||||
print '<span class="ok">'.$langs->trans("LDAPTCPConnectOK", $conf->global->LDAP_SERVER_HOST, $conf->global->LDAP_SERVER_PORT).'</span>';
|
||||
print '<br>';
|
||||
|
||||
if ($conf->global->LDAP_ADMIN_DN && !empty($conf->global->LDAP_ADMIN_PASS)) {
|
||||
if ($result == 2) {
|
||||
print img_picto('', 'info').' ';
|
||||
print '<font class="ok">'.$langs->trans("LDAPBindOK", $conf->global->LDAP_SERVER_HOST, $conf->global->LDAP_SERVER_PORT, $conf->global->LDAP_ADMIN_DN, preg_replace('/./i', '*', $conf->global->LDAP_ADMIN_PASS)).'</font>';
|
||||
print '<span class="ok">'.$langs->trans("LDAPBindOK", $conf->global->LDAP_SERVER_HOST, $conf->global->LDAP_SERVER_PORT, $conf->global->LDAP_ADMIN_DN, preg_replace('/./i', '*', $conf->global->LDAP_ADMIN_PASS)).'</span>';
|
||||
print '<br>';
|
||||
} else {
|
||||
print img_picto('', 'error').' ';
|
||||
print '<font class="error">'.$langs->trans("LDAPBindKO", $conf->global->LDAP_SERVER_HOST, $conf->global->LDAP_SERVER_PORT, $conf->global->LDAP_ADMIN_DN, preg_replace('/./i', '*', $conf->global->LDAP_ADMIN_PASS)).'</font>';
|
||||
print '<span class="error">'.$langs->trans("LDAPBindKO", $conf->global->LDAP_SERVER_HOST, $conf->global->LDAP_SERVER_PORT, $conf->global->LDAP_ADMIN_DN, preg_replace('/./i', '*', $conf->global->LDAP_ADMIN_PASS)).'</span>';
|
||||
print '<br>';
|
||||
print $langs->trans("Error").' '.$ldap->error;
|
||||
print '<br>';
|
||||
}
|
||||
} else {
|
||||
print img_picto('', 'warning').' ';
|
||||
print '<font class="warning">'.$langs->trans("LDAPNoUserOrPasswordProvidedAccessIsReadOnly").'</font>';
|
||||
print '<span class="warning">'.$langs->trans("LDAPNoUserOrPasswordProvidedAccessIsReadOnly").'</span>';
|
||||
print '<br>';
|
||||
}
|
||||
|
||||
@ -322,18 +322,18 @@ if (function_exists("ldap_connect")) {
|
||||
// Test ldap_getversion
|
||||
if (($ldap->getVersion() == 3)) {
|
||||
print img_picto('', 'info').' ';
|
||||
print '<font class="ok">'.$langs->trans("LDAPSetupForVersion3").'</font>';
|
||||
print '<span class="ok">'.$langs->trans("LDAPSetupForVersion3").'</span>';
|
||||
print '<br>';
|
||||
} else {
|
||||
print img_picto('', 'info').' ';
|
||||
print '<font class="ok">'.$langs->trans("LDAPSetupForVersion2").'</font>';
|
||||
print '<span class="ok">'.$langs->trans("LDAPSetupForVersion2").'</span>';
|
||||
print '<br>';
|
||||
}
|
||||
|
||||
$unbind = $ldap->unbind();
|
||||
} else {
|
||||
print img_picto('', 'error').' ';
|
||||
print '<font class="error">'.$langs->trans("LDAPTCPConnectKO", $conf->global->LDAP_SERVER_HOST, $conf->global->LDAP_SERVER_PORT).'</font>';
|
||||
print '<span class="error">'.$langs->trans("LDAPTCPConnectKO", $conf->global->LDAP_SERVER_HOST, $conf->global->LDAP_SERVER_PORT).'</span>';
|
||||
print '<br>';
|
||||
print $langs->trans("Error").' '.$ldap->error;
|
||||
print '<br>';
|
||||
|
||||
@ -321,12 +321,12 @@ if (function_exists("ldap_connect")) {
|
||||
|
||||
if ($result2 > 0) {
|
||||
print img_picto('', 'info').' ';
|
||||
print '<font class="ok">'.$langs->trans("LDAPSynchroOK").'</font><br>';
|
||||
print '<span class="ok">'.$langs->trans("LDAPSynchroOK").'</span><br>';
|
||||
} else {
|
||||
print img_picto('', 'error').' ';
|
||||
print '<font class="error">'.$langs->trans("LDAPSynchroKOMayBePermissions");
|
||||
print '<span class="error">'.$langs->trans("LDAPSynchroKOMayBePermissions");
|
||||
print ': '.$ldap->error;
|
||||
print '</font><br>';
|
||||
print '</span><br>';
|
||||
print $langs->trans("ErrorLDAPMakeManualTest", $conf->ldap->dir_temp).'<br>';
|
||||
}
|
||||
|
||||
@ -336,9 +336,9 @@ if (function_exists("ldap_connect")) {
|
||||
print "\n<br>";
|
||||
} else {
|
||||
print img_picto('', 'error').' ';
|
||||
print '<font class="error">'.$langs->trans("LDAPSynchroKO");
|
||||
print '<span class="error">'.$langs->trans("LDAPSynchroKO");
|
||||
print ': '.$ldap->error;
|
||||
print '</font><br>';
|
||||
print '</span><br>';
|
||||
print $langs->trans("ErrorLDAPMakeManualTest", $conf->ldap->dir_temp).'<br>';
|
||||
}
|
||||
}
|
||||
|
||||
@ -260,12 +260,12 @@ if (function_exists("ldap_connect")) {
|
||||
|
||||
if ($result2 > 0) {
|
||||
print img_picto('', 'info').' ';
|
||||
print '<font class="ok">'.$langs->trans("LDAPSynchroOK").'</font><br>';
|
||||
print '<span class="ok">'.$langs->trans("LDAPSynchroOK").'</span><br>';
|
||||
} else {
|
||||
print img_picto('', 'error').' ';
|
||||
print '<font class="error">'.$langs->trans("LDAPSynchroKOMayBePermissions");
|
||||
print '<span class="error">'.$langs->trans("LDAPSynchroKOMayBePermissions");
|
||||
print ': '.$ldap->error;
|
||||
print '</font><br>';
|
||||
print '</span><br>';
|
||||
print $langs->trans("ErrorLDAPMakeManualTest", $conf->ldap->dir_temp).'<br>';
|
||||
}
|
||||
|
||||
@ -275,9 +275,9 @@ if (function_exists("ldap_connect")) {
|
||||
print "\n<br>";
|
||||
} else {
|
||||
print img_picto('', 'error').' ';
|
||||
print '<font class="error">'.$langs->trans("LDAPSynchroKO");
|
||||
print '<span class="error">'.$langs->trans("LDAPSynchroKO");
|
||||
print ': '.$ldap->error;
|
||||
print '</font><br>';
|
||||
print '</span><br>';
|
||||
print $langs->trans("ErrorLDAPMakeManualTest", $conf->ldap->dir_temp).'<br>';
|
||||
}
|
||||
}
|
||||
@ -331,9 +331,9 @@ if (function_exists("ldap_connect")) {
|
||||
print "\n<br>";
|
||||
} else {
|
||||
print img_picto('', 'error').' ';
|
||||
print '<font class="error">'.$langs->trans("LDAPSynchroKO");
|
||||
print '<span class="error">'.$langs->trans("LDAPSynchroKO");
|
||||
print ': '.$ldap->error;
|
||||
print '</font><br>';
|
||||
print '</span><br>';
|
||||
print $langs->trans("ErrorLDAPMakeManualTest", $conf->ldap->dir_temp).'<br>';
|
||||
}
|
||||
}
|
||||
|
||||
@ -472,12 +472,12 @@ if (function_exists("ldap_connect")) {
|
||||
|
||||
if ($result2 > 0) {
|
||||
print img_picto('', 'info').' ';
|
||||
print '<font class="ok">'.$langs->trans("LDAPSynchroOK").'</font><br>';
|
||||
print '<span class="ok">'.$langs->trans("LDAPSynchroOK").'</span><br>';
|
||||
} else {
|
||||
print img_picto('', 'error').' ';
|
||||
print '<font class="error">'.$langs->trans("LDAPSynchroKOMayBePermissions");
|
||||
print '<span class="error">'.$langs->trans("LDAPSynchroKOMayBePermissions");
|
||||
print ': '.$ldap->error;
|
||||
print '</font><br>';
|
||||
print '</span><br>';
|
||||
print $langs->trans("ErrorLDAPMakeManualTest", $conf->ldap->dir_temp).'<br>';
|
||||
}
|
||||
|
||||
@ -487,9 +487,9 @@ if (function_exists("ldap_connect")) {
|
||||
print "\n<br>";
|
||||
} else {
|
||||
print img_picto('', 'error').' ';
|
||||
print '<font class="error">'.$langs->trans("LDAPSynchroKO");
|
||||
print '<span class="error">'.$langs->trans("LDAPSynchroKO");
|
||||
print ': '.$ldap->error;
|
||||
print '</font><br>';
|
||||
print '</span><br>';
|
||||
print $langs->trans("ErrorLDAPMakeManualTest", $conf->ldap->dir_temp).'<br>';
|
||||
}
|
||||
}
|
||||
|
||||
@ -223,12 +223,12 @@ if (function_exists("ldap_connect")) {
|
||||
|
||||
if ($result2 > 0) {
|
||||
print img_picto('', 'info').' ';
|
||||
print '<font class="ok">'.$langs->trans("LDAPSynchroOK").'</font><br>';
|
||||
print '<span class="ok">'.$langs->trans("LDAPSynchroOK").'</span><br>';
|
||||
} else {
|
||||
print img_picto('', 'error').' ';
|
||||
print '<font class="error">'.$langs->trans("LDAPSynchroKOMayBePermissions");
|
||||
print '<span class="error">'.$langs->trans("LDAPSynchroKOMayBePermissions");
|
||||
print ': '.$ldap->error;
|
||||
print '</font><br>';
|
||||
print '</span><br>';
|
||||
print $langs->trans("ErrorLDAPMakeManualTest", $conf->ldap->dir_temp).'<br>';
|
||||
}
|
||||
|
||||
@ -238,9 +238,9 @@ if (function_exists("ldap_connect")) {
|
||||
print "\n<br>";
|
||||
} else {
|
||||
print img_picto('', 'error').' ';
|
||||
print '<font class="error">'.$langs->trans("LDAPSynchroKO");
|
||||
print '<span class="error">'.$langs->trans("LDAPSynchroKO");
|
||||
print ': '.$ldap->error;
|
||||
print '</font><br>';
|
||||
print '</span><br>';
|
||||
print $langs->trans("ErrorLDAPMakeManualTest", $conf->ldap->dir_temp).'<br>';
|
||||
}
|
||||
}
|
||||
|
||||
@ -444,12 +444,12 @@ if (function_exists("ldap_connect")) {
|
||||
|
||||
if ($result2 > 0) {
|
||||
print img_picto('', 'info').' ';
|
||||
print '<font class="ok">'.$langs->trans("LDAPSynchroOK").'</font><br>';
|
||||
print '<span class="ok">'.$langs->trans("LDAPSynchroOK").'</span><br>';
|
||||
} else {
|
||||
print img_picto('', 'error').' ';
|
||||
print '<font class="error">'.$langs->trans("LDAPSynchroKOMayBePermissions");
|
||||
print '<span class="error">'.$langs->trans("LDAPSynchroKOMayBePermissions");
|
||||
print ': '.$ldap->error;
|
||||
print '</font><br>';
|
||||
print '</span><br>';
|
||||
print $langs->trans("ErrorLDAPMakeManualTest", $conf->ldap->dir_temp).'<br>';
|
||||
}
|
||||
|
||||
@ -459,9 +459,9 @@ if (function_exists("ldap_connect")) {
|
||||
print "\n<br>";
|
||||
} else {
|
||||
print img_picto('', 'error').' ';
|
||||
print '<font class="error">'.$langs->trans("LDAPSynchroKO");
|
||||
print '<span class="error">'.$langs->trans("LDAPSynchroKO");
|
||||
print ': '.$ldap->error;
|
||||
print '</font><br>';
|
||||
print '</span><br>';
|
||||
print $langs->trans("ErrorLDAPMakeManualTest", $conf->ldap->dir_temp).'<br>';
|
||||
}
|
||||
}
|
||||
@ -530,9 +530,9 @@ if (function_exists("ldap_connect")) {
|
||||
print "\n<br>";
|
||||
} else {
|
||||
print img_picto('', 'error').' ';
|
||||
print '<font class="error">'.$langs->trans("LDAPSynchroKO");
|
||||
print '<span class="error">'.$langs->trans("LDAPSynchroKO");
|
||||
print ': '.$ldap->error;
|
||||
print '</font><br>';
|
||||
print '</span><br>';
|
||||
print $langs->trans("ErrorLDAPMakeManualTest", $conf->ldap->dir_temp).'<br>';
|
||||
}
|
||||
}
|
||||
|
||||
@ -281,7 +281,7 @@ if ($action == 'create') {
|
||||
|
||||
print load_fiche_titre($langs->trans("NewMenu"), '', 'title_setup');
|
||||
|
||||
print '<form action="./edit.php?action=add&menuId='.GETPOST('menuId', 'int').'" method="post" name="formmenucreate">';
|
||||
print '<form action="'.DOL_URL_ROOT.'/admin/menus/edit.php?action=add&token='.newToken().'&menuId='.GETPOST('menuId', 'int').'" method="post" name="formmenucreate">';
|
||||
print '<input type="hidden" name="token" value="'.newToken().'">';
|
||||
|
||||
print dol_get_fiche_head();
|
||||
|
||||
@ -133,7 +133,7 @@ if ($action == 'install') {
|
||||
|
||||
// $original_file should match format module_modulename-x.y[.z].zip
|
||||
$original_file = basename($_FILES["fileinstall"]["name"]);
|
||||
$original_file = preg_replace('/\(\d+\)\.zip$/i', '.zip', $original_file);
|
||||
$original_file = preg_replace('/\s*\(\d+\)\.zip$/i', '.zip', $original_file);
|
||||
$newfile = $conf->admin->dir_temp.'/'.$original_file.'/'.$original_file;
|
||||
|
||||
if (!$original_file) {
|
||||
|
||||
@ -20,7 +20,7 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file htdocs/admin/credtitransfer.php
|
||||
* \file htdocs/admin/paymentbybanktransfer.php
|
||||
* \ingroup paymentbybanktransfer
|
||||
* \brief Page to setup payments by credit transfer
|
||||
*/
|
||||
@ -429,7 +429,7 @@ if (! empty($conf->global->MAIN_MODULE_NOTIFICATION))
|
||||
}
|
||||
|
||||
|
||||
print '<form method="post" action="'.$_SERVER["PHP_SELF"].'?action=addnotif">';
|
||||
print '<form method="post" action="'.$_SERVER["PHP_SELF"].'?action=addnotif&token='.newToken().'">';
|
||||
print '<input type="hidden" name="token" value="'.newToken().'">';
|
||||
print '<table class="noborder centpercent">';
|
||||
print '<tr class="liste_titre">';
|
||||
|
||||
@ -307,7 +307,7 @@ for ($i = 1; $i <= 6; $i++) {
|
||||
$pid = false;
|
||||
}
|
||||
} else {
|
||||
$pid = img_warning().' <font class="error">'.$langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("CompanyCountry")).'</font>';
|
||||
$pid = img_warning().' <span class="error">'.$langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("CompanyCountry")).'</span>';
|
||||
}
|
||||
if ($pid) {
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("ShowProfIdInAddress").' - '.$pid.'</td><td>';
|
||||
|
||||
@ -236,7 +236,7 @@ if ($result) {
|
||||
print '</td>';
|
||||
} else {
|
||||
print '<td class="center">';
|
||||
print '<a class="reposition" href="perms.php?pid='.$obj->id.'&action=add">';
|
||||
print '<a class="reposition" href="perms.php?pid='.$obj->id.'&action=add&token='.newToken().'">';
|
||||
//print img_edit_add();
|
||||
print img_picto('', 'switch_off');
|
||||
print '</a>';
|
||||
|
||||
@ -443,7 +443,7 @@ if (! empty($conf->global->MAIN_MODULE_NOTIFICATION))
|
||||
}
|
||||
|
||||
|
||||
print '<form method="post" action="'.$_SERVER["PHP_SELF"].'?action=addnotif">';
|
||||
print '<form method="post" action="'.$_SERVER["PHP_SELF"].'?action=addnotif&token='.newToken().'">';
|
||||
print '<input type="hidden" name="token" value="'.newToken().'">';
|
||||
print '<table class="noborder centpercent">';
|
||||
print '<tr class="liste_titre">';
|
||||
|
||||
@ -183,7 +183,7 @@ if ($action == 'edit') {
|
||||
if (count($listofmethods)) {
|
||||
print $form->selectarray('MAIN_SMS_SENDMODE', $listofmethods, $conf->global->MAIN_SMS_SENDMODE, 1);
|
||||
} else {
|
||||
print '<font class="error">'.$langs->trans("None").'</font>';
|
||||
print '<span class="error">'.$langs->trans("None").'</span>';
|
||||
}
|
||||
print '</td></tr>';
|
||||
|
||||
|
||||
@ -51,7 +51,7 @@ if ($action == 'getlastversion') {
|
||||
$result = getURLContent('https://sourceforge.net/projects/dolibarr/rss');
|
||||
//var_dump($result['content']);
|
||||
if (function_exists('simplexml_load_string')) {
|
||||
$sfurl = simplexml_load_string($result['content']);
|
||||
$sfurl = simplexml_load_string($result['content'], 'SimpleXMLElement', LIBXML_NOCDATA|LIBXML_NONET);
|
||||
} else {
|
||||
setEventMessages($langs->trans("ErrorPHPDoesNotSupport", "xml"), null, 'errors');
|
||||
}
|
||||
|
||||
@ -171,7 +171,7 @@ if (GETPOST('target') == 'remote') {
|
||||
if (!$xmlarray['curl_error_no'] && $xmlarray['http_code'] != '400' && $xmlarray['http_code'] != '404') {
|
||||
$xmlfile = $xmlarray['content'];
|
||||
//print "xmlfilestart".$xmlfile."xmlfileend";
|
||||
$xml = simplexml_load_string($xmlfile);
|
||||
$xml = simplexml_load_string($xmlfile, 'SimpleXMLElement', LIBXML_NOCDATA|LIBXML_NONET);
|
||||
} else {
|
||||
$errormsg = $langs->trans('XmlNotFound').': '.$xmlremote.' - '.$xmlarray['http_code'].(($xmlarray['http_code'] == 400 && $xmlarray['content']) ? ' '.$xmlarray['content'] : '').' '.$xmlarray['curl_error_no'].' '.$xmlarray['curl_error_msg'];
|
||||
setEventMessages($errormsg, null, 'errors');
|
||||
|
||||
@ -91,6 +91,7 @@ $modules_files = array();
|
||||
$modules_fullpath = array();
|
||||
$modulesdir = dolGetModulesDirs();
|
||||
$rights_ids = array();
|
||||
$arrayofpermissions = array();
|
||||
|
||||
foreach ($modulesdir as $dir) {
|
||||
$handle = @opendir(dol_osencode($dir));
|
||||
@ -155,7 +156,7 @@ foreach ($modules as $key => $module) {
|
||||
if (empty($rights[0])) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$arrayofpermissions[$rights[0]] = array('label'=> 'user->rights->'.$module->rights_class.'->'.$rights[4].(empty($rights[5]) ? '' : '->'.$rights[5]));
|
||||
$permission[] = $rights[0];
|
||||
|
||||
array_push($rights_ids, $rights[0]);
|
||||
@ -336,8 +337,10 @@ foreach ($moduleList as $module) {
|
||||
$idperms = '';
|
||||
|
||||
foreach ($module->permission as $permission) {
|
||||
$idperms .= ($idperms ? ", " : "").$permission;
|
||||
$translationKey = "Permission".$permission;
|
||||
$labelpermission = $langs->trans($translationKey);
|
||||
$labelpermission .= ' : '.$arrayofpermissions[$permission]['label'];
|
||||
$idperms .= ($idperms ? ", " : "").'<span title="'.$labelpermission.'">'.$permission.'</a>';
|
||||
|
||||
if (!empty($conf->global->MAIN_SHOW_PERMISSION)) {
|
||||
if (empty($langs->tab_translate[$translationKey])) {
|
||||
|
||||
@ -63,7 +63,7 @@ print '<br>';
|
||||
print '<strong>'.$langs->trans("XDebug").'</strong>: ';
|
||||
$test = !function_exists('xdebug_is_enabled');
|
||||
if ($test) {
|
||||
print img_picto('', 'tick.png').' '.$langs->trans("NotInstalled").' - '.$langs->trans("NotSlowedDownByThis");
|
||||
print img_picto('', 'tick.png').' '.$langs->trans("NotInstalled").' <span class="opacitymedium">'.$langs->trans("NotSlowedDownByThis").'</span>';
|
||||
} else {
|
||||
print img_picto('', 'warning').' '.$langs->trans("ModuleActivated", $langs->transnoentities("XDebug"));
|
||||
print ' - '.$langs->trans("MoreInformation").' <a href="'.DOL_URL_ROOT.'/admin/system/xdebug.php">XDebug admin page</a>';
|
||||
|
||||
@ -258,6 +258,8 @@ print '<br>';
|
||||
print '<strong>$dolibarr_nocsrfcheck</strong>: '.(empty($dolibarr_nocsrfcheck) ? '0' : $dolibarr_nocsrfcheck);
|
||||
if (!empty($dolibarr_nocsrfcheck)) {
|
||||
print ' '.img_picto('', 'warning').' '.$langs->trans("IfYouAreOnAProductionSetThis", 0);
|
||||
} else {
|
||||
print ' <span class="opacitymedium">('.$langs->trans("Recommended").': 0)</span>';
|
||||
}
|
||||
print '<br>';
|
||||
|
||||
@ -442,7 +444,7 @@ print '<br>';
|
||||
print '<strong>MAIN_RESTRICTHTML_REMOVE_ALSO_BAD_ATTRIBUTES</strong> = '.(empty($conf->global->MAIN_RESTRICTHTML_REMOVE_ALSO_BAD_ATTRIBUTES) ? '<span class="opacitymedium">'.$langs->trans("Undefined").' ('.$langs->trans("Recommended").': 1)</span>' : $conf->global->MAIN_RESTRICTHTML_REMOVE_ALSO_BAD_ATTRIBUTES)."<br>";
|
||||
print '<br>';
|
||||
|
||||
print '<strong>MAIN_SECURITY_CSRF_WITH_TOKEN</strong> = '.(empty($conf->global->MAIN_SECURITY_CSRF_WITH_TOKEN) ? '<span class="opacitymedium">'.$langs->trans("Undefined").' ('.$langs->trans("Recommended").': 1)</span>' : $conf->global->MAIN_SECURITY_CSRF_WITH_TOKEN)."<br>";
|
||||
print '<strong>MAIN_SECURITY_CSRF_WITH_TOKEN</strong> = '.(empty($conf->global->MAIN_SECURITY_CSRF_WITH_TOKEN) ? '<span class="opacitymedium">'.$langs->trans("Undefined").' ('.$langs->trans("Recommended").': 2)</span>' : $conf->global->MAIN_SECURITY_CSRF_WITH_TOKEN)."<br>";
|
||||
print '<br>';
|
||||
|
||||
print '<strong>MAIN_SECURITY_CSRF_TOKEN_RENEWAL_ON_EACH_CALL</strong> = '.(empty($conf->global->MAIN_SECURITY_CSRF_TOKEN_RENEWAL_ON_EACH_CALL) ? '<span class="opacitymedium">'.$langs->trans("Undefined").' ('.$langs->trans("Recommended").': '.$langs->trans("Undefined").' '.$langs->trans("or").' 0)</span>' : $conf->global->MAIN_SECURITY_CSRF_TOKEN_RENEWAL_ON_EACH_CALL)."<br>";
|
||||
|
||||
@ -513,7 +513,7 @@ if (!empty($_SESSION["commandbackuplastdone"])) {
|
||||
$_SESSION["commandbackupresult"] = '';
|
||||
}
|
||||
if (!empty($_SESSION["commandbackuptorun"])) {
|
||||
print '<br><font class="warning">'.$langs->trans("YouMustRunCommandFromCommandLineAfterLoginToUser", $dolibarr_main_db_user, $dolibarr_main_db_user).':</font><br>'."\n";
|
||||
print '<br><span class="warning">'.$langs->trans("YouMustRunCommandFromCommandLineAfterLoginToUser", $dolibarr_main_db_user, $dolibarr_main_db_user).':</span><br>'."\n";
|
||||
print '<textarea id="commandbackuptoruntext" rows="'.ROWS_2.'" class="centpercent">'.$_SESSION["commandbackuptorun"].'</textarea><br>'."\n";
|
||||
print ajax_autoselect("commandbackuptoruntext", 0);
|
||||
print '<br>';
|
||||
|
||||
@ -110,7 +110,7 @@ if (!empty($conf->syslog->enabled)) {
|
||||
|
||||
print '<input type="radio" name="choice" id="choicetempfiles" value="tempfiles"';
|
||||
print (!$choice || $choice == 'tempfiles' || $choice == 'allfiles') ? ' checked' : '';
|
||||
print '> <label for="choicetempfiles">'.$langs->trans("PurgeDeleteTemporaryFiles").'</label><br><br>';
|
||||
print '> <label for="choicetempfiles">'.$langs->trans("PurgeDeleteTemporaryFilesShort").'</label><br><br>';
|
||||
|
||||
print '<input type="radio" name="choice" id="choiceallfiles" value="confirm_allfiles"';
|
||||
print ($choice && $choice == 'confirm_allfiles') ? ' checked' : '';
|
||||
|
||||
@ -61,7 +61,7 @@ $version = '0.0';
|
||||
if ($action == 'getlastversion') {
|
||||
$result = getURLContent('https://sourceforge.net/projects/dolibarr/rss');
|
||||
//var_dump($result['content']);
|
||||
$sfurl = simplexml_load_string($result['content']);
|
||||
$sfurl = simplexml_load_string($result['content'], 'SimpleXMLElement', LIBXML_NOCDATA|LIBXML_NONET);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -1802,7 +1802,7 @@ class Setup extends DolibarrApi
|
||||
if (!$xmlarray['curl_error_no'] && $xmlarray['http_code'] != '400' && $xmlarray['http_code'] != '404') {
|
||||
$xmlfile = $xmlarray['content'];
|
||||
//print "xmlfilestart".$xmlfile."endxmlfile";
|
||||
$xml = simplexml_load_string($xmlfile);
|
||||
$xml = simplexml_load_string($xmlfile, 'SimpleXMLElement', LIBXML_NOCDATA|LIBXML_NONET);
|
||||
} else {
|
||||
$errormsg = $langs->trans('XmlNotFound').': '.$xmlremote.' - '.$xmlarray['http_code'].(($xmlarray['http_code'] == 400 && $xmlarray['content']) ? ' '.$xmlarray['content'] : '').' '.$xmlarray['curl_error_no'].' '.$xmlarray['curl_error_msg'];
|
||||
throw new RestException(500, $errormsg);
|
||||
|
||||
@ -274,7 +274,7 @@ if ($conf->product->enabled || $conf->product->service) {
|
||||
} else {
|
||||
$disabled = 1;
|
||||
$titleno = $langs->trans("NoBarcodeNumberingTemplateDefined");
|
||||
print '<font class="warning">'.$langs->trans("NoBarcodeNumberingTemplateDefined").'</font> (<a href="'.DOL_URL_ROOT.'/admin/barcode.php">'.$langs->trans("ToGenerateCodeDefineAutomaticRuleFirst").'</a>)<br>';
|
||||
print '<span class="warning">'.$langs->trans("NoBarcodeNumberingTemplateDefined").'</span> (<a href="'.DOL_URL_ROOT.'/admin/barcode.php">'.$langs->trans("ToGenerateCodeDefineAutomaticRuleFirst").'</a>)<br>';
|
||||
}
|
||||
if (empty($nbno)) {
|
||||
$disabled1 = 1;
|
||||
|
||||
@ -231,7 +231,7 @@ if ($object->id) {
|
||||
|
||||
// On propose la generation de la vignette si elle n'existe pas et si la taille est superieure aux limites
|
||||
if (!$obj['photo_vignette'] && preg_match('/(\.bmp|\.gif|\.jpg|\.jpeg|\.png)$/i', $obj['photo']) && ($object->imgWidth > $maxWidth || $object->imgHeight > $maxHeight)) {
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=addthumb&type='.$type.'&file='.urlencode($pdir.$viewfilename).'">'.img_picto($langs->trans('GenerateThumb'), 'refresh').' </a>';
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&token='.newToken().'&action=addthumb&type='.$type.'&file='.urlencode($pdir.$viewfilename).'">'.img_picto($langs->trans('GenerateThumb'), 'refresh').' </a>';
|
||||
}
|
||||
if ($user->rights->categorie->creer) {
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=delete&token='.newToken().'&type='.$type.'&file='.urlencode($pdir.$viewfilename).'">';
|
||||
|
||||
@ -865,6 +865,7 @@ class ActionComm extends CommonObject
|
||||
$this->fetchResources();
|
||||
}
|
||||
}
|
||||
|
||||
$this->db->free($resql);
|
||||
} else {
|
||||
$this->error = $this->db->lasterror();
|
||||
|
||||
@ -351,7 +351,7 @@ if ($object->id > 0) {
|
||||
print showValueWithClipboardCPButton(dol_escape_htmltag($object->code_client));
|
||||
$tmpcheck = $object->check_codeclient();
|
||||
if ($tmpcheck != 0 && $tmpcheck != -5) {
|
||||
print ' <font class="error">('.$langs->trans("WrongCustomerCode").')</font>';
|
||||
print ' <span class="error">('.$langs->trans("WrongCustomerCode").')</span>';
|
||||
}
|
||||
print '</td></tr>';
|
||||
|
||||
|
||||
@ -912,7 +912,7 @@ if ($action == 'create') {
|
||||
}
|
||||
}
|
||||
if (empty($nbemail)) {
|
||||
$nbemail .= ' '.img_warning('').' <font class="warning">'.$langs->trans("NoTargetYet").'</font>';
|
||||
$nbemail .= ' '.img_warning('').' <span class="warning">'.$langs->trans("NoTargetYet").'</span>';
|
||||
}
|
||||
if ($text) {
|
||||
print $form->textwithpicto($nbemail, $text, 1, 'warning');
|
||||
@ -1161,7 +1161,7 @@ if ($action == 'create') {
|
||||
}
|
||||
}
|
||||
if (empty($nbemail)) {
|
||||
$nbemail .= ' '.img_warning('').' <font class="warning">'.$langs->trans("NoTargetYet").'</font>';
|
||||
$nbemail .= ' '.img_warning('').' <span class="warning">'.$langs->trans("NoTargetYet").'</span>';
|
||||
}
|
||||
if ($text) {
|
||||
print $form->textwithpicto($nbemail, $text, 1, 'warning');
|
||||
|
||||
@ -284,7 +284,7 @@ if ($object->fetch($id) >= 0) {
|
||||
}
|
||||
}
|
||||
if (empty($nbemail)) {
|
||||
$nbemail .= ' '.img_warning('').' <font class="warning">'.$langs->trans("NoTargetYet").'</font>';
|
||||
$nbemail .= ' '.img_warning('').' <span class="warning">'.$langs->trans("NoTargetYet").'</span>';
|
||||
}
|
||||
if ($text) {
|
||||
print $form->textwithpicto($nbemail, $text, 1, 'warning');
|
||||
@ -378,7 +378,7 @@ if ($object->fetch($id) >= 0) {
|
||||
$var = !$var;
|
||||
|
||||
if ($allowaddtarget) {
|
||||
print '<form '.$bctag[$var].' name="'.$modulename.'" action="'.$_SERVER['PHP_SELF'].'?action=add&id='.$object->id.'&module='.$modulename.'" method="POST" enctype="multipart/form-data">';
|
||||
print '<form '.$bctag[$var].' name="'.$modulename.'" action="'.$_SERVER['PHP_SELF'].'?action=add&token='.newToken().'&id='.$object->id.'&module='.$modulename.'" method="POST" enctype="multipart/form-data">';
|
||||
print '<input type="hidden" name="token" value="'.newToken().'">';
|
||||
} else {
|
||||
print '<div '.$bctag[$var].'>';
|
||||
|
||||
@ -184,7 +184,7 @@ if ($result) {
|
||||
$i++;
|
||||
}
|
||||
} else {
|
||||
print '<tr><td class="opacitymedium">'.$langs->trans("None").'</td></tr>';
|
||||
print '<tr><td><span class="opacitymedium">'.$langs->trans("None").'</span></td></tr>';
|
||||
}
|
||||
print "</table></div><br>";
|
||||
$db->free($result);
|
||||
|
||||
@ -932,10 +932,10 @@ if ($resql) {
|
||||
$newcardbutton = dolGetButtonTitle($langs->trans('AddBankRecord'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/compta/bank/various_payment/card.php?action=create&accountid='.urlencode($search_account).'&backtopage='.urlencode($_SERVER['PHP_SELF'].'?id='.urlencode($search_account)), '', $user->rights->banque->modifier);
|
||||
} else // If direct entries is not done using miscellaneous payments
|
||||
{
|
||||
$newcardbutton = dolGetButtonTitle($langs->trans('AddBankRecord'), '', 'fa fa-plus-circle', $_SERVER["PHP_SELF"].'?action=addline&page='.$page.$param, '', $user->rights->banque->modifier);
|
||||
$newcardbutton = dolGetButtonTitle($langs->trans('AddBankRecord'), '', 'fa fa-plus-circle', $_SERVER["PHP_SELF"].'?action=addline&token='.newToken().'&page='.$page.$param, '', $user->rights->banque->modifier);
|
||||
}
|
||||
} else {
|
||||
$newcardbutton = dolGetButtonTitle($langs->trans('AddBankRecord'), '', 'fa fa-plus-circle', $_SERVER["PHP_SELF"].'?action=addline&page='.$page.$param, '', -1);
|
||||
$newcardbutton = dolGetButtonTitle($langs->trans('AddBankRecord'), '', 'fa fa-plus-circle', $_SERVER["PHP_SELF"].'?action=addline&token='.newToken().'&page='.$page.$param, '', -1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -16,7 +16,7 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file htdocs/compat/facture/index.php
|
||||
* \file htdocs/compta/facture/index.php
|
||||
* \ingroup facture
|
||||
* \brief Home page of customer invoices area
|
||||
*/
|
||||
|
||||
@ -1846,8 +1846,8 @@ if ($resql) {
|
||||
}
|
||||
// Alias
|
||||
if (!empty($arrayfields['s.name_alias']['checked'])) {
|
||||
print '<td class="tdoverflowmax150" title="'.$obj->name_alias.'">';
|
||||
print $obj->name_alias;
|
||||
print '<td class="tdoverflowmax150" title="'.dol_escape_htmltag($obj->name_alias).'">';
|
||||
print dol_escape_htmltag($obj->name_alias);
|
||||
print '</td>';
|
||||
if (!$i) {
|
||||
$totalarray['nbfield']++;
|
||||
@ -1855,8 +1855,8 @@ if ($resql) {
|
||||
}
|
||||
// Town
|
||||
if (!empty($arrayfields['s.town']['checked'])) {
|
||||
print '<td>';
|
||||
print $obj->town;
|
||||
print '<td class="tdoverflowmax100" title="'.dol_escape_htmltag($obj->town).'">';
|
||||
print dol_escape_htmltag($obj->town);
|
||||
print '</td>';
|
||||
if (!$i) {
|
||||
$totalarray['nbfield']++;
|
||||
@ -1865,7 +1865,7 @@ if ($resql) {
|
||||
// Zip
|
||||
if (!empty($arrayfields['s.zip']['checked'])) {
|
||||
print '<td class="nowraponall">';
|
||||
print $obj->zip;
|
||||
print dol_escape_htmltag($obj->zip);
|
||||
print '</td>';
|
||||
if (!$i) {
|
||||
$totalarray['nbfield']++;
|
||||
@ -1873,7 +1873,7 @@ if ($resql) {
|
||||
}
|
||||
// State
|
||||
if (!empty($arrayfields['state.nom']['checked'])) {
|
||||
print "<td>".$obj->state_name."</td>\n";
|
||||
print "<td>".dol_escape_htmltag($obj->state_name)."</td>\n";
|
||||
if (!$i) {
|
||||
$totalarray['nbfield']++;
|
||||
}
|
||||
@ -1936,7 +1936,7 @@ if ($resql) {
|
||||
// Module Source
|
||||
if (!empty($arrayfields['f.module_source']['checked'])) {
|
||||
print '<td>';
|
||||
print $obj->module_source;
|
||||
print dol_escape_htmltag($obj->module_source);
|
||||
print '</td>';
|
||||
if (!$i) {
|
||||
$totalarray['nbfield']++;
|
||||
@ -1946,7 +1946,7 @@ if ($resql) {
|
||||
// POS Terminal
|
||||
if (!empty($arrayfields['f.pos_source']['checked'])) {
|
||||
print '<td>';
|
||||
print $obj->pos_source;
|
||||
print dol_escape_htmltag($obj->pos_source);
|
||||
print '</td>';
|
||||
if (!$i) {
|
||||
$totalarray['nbfield']++;
|
||||
|
||||
@ -206,6 +206,7 @@ if (!empty($conf->facture->enabled) && !empty($user->rights->facture->lire)) {
|
||||
print '<td class="nowrap">';
|
||||
|
||||
print '<table class="nobordernopadding"><tr class="nocellnopadd">';
|
||||
|
||||
print '<td class="nobordernopadding nowraponall">';
|
||||
print $tmpinvoice->getNomUrl(1, '');
|
||||
print '</td>';
|
||||
@ -222,15 +223,19 @@ if (!empty($conf->facture->enabled) && !empty($user->rights->facture->lire)) {
|
||||
print '</td></tr></table>';
|
||||
|
||||
print '</td>';
|
||||
print '<td class="left">';
|
||||
|
||||
print '<td class="tdoverflowmax150">';
|
||||
print $thirdpartystatic->getNomUrl(1, 'customer', 44);
|
||||
print '</td>';
|
||||
if (!empty($conf->global->MAIN_SHOW_HT_ON_SUMMARY)) {
|
||||
print '<td class="nowrap right"><span class="amount">'.price($obj->total_ht).'</span></td>';
|
||||
}
|
||||
print '<td class="nowrap right"><span class="amount">'.price($obj->total_ttc).'</span></td>';
|
||||
|
||||
print '<td class="right">'.dol_print_date($db->jdate($obj->tms), 'day').'</td>';
|
||||
|
||||
print '<td>'.$tmpinvoice->getLibStatut(3, $obj->am).'</td>';
|
||||
|
||||
print '</tr>';
|
||||
|
||||
$total_ttc += $obj->total_ttc;
|
||||
@ -706,7 +711,7 @@ if (!empty($conf->facture->enabled) && !empty($conf->commande->enabled) && $user
|
||||
print "</tr>\n";
|
||||
}
|
||||
|
||||
print '<tr class="liste_total"><td colspan="2">'.$langs->trans("Total").' <font style="font-weight: normal">('.$langs->trans("RemainderToBill").': '.price($tot_tobill).')</font> </td>';
|
||||
print '<tr class="liste_total"><td colspan="2">'.$langs->trans("Total").' <span style="font-weight: normal">('.$langs->trans("RemainderToBill").': '.price($tot_tobill).')</span> </td>';
|
||||
if (!empty($conf->global->MAIN_SHOW_HT_ON_SUMMARY)) {
|
||||
print '<td class="right">'.price($tot_ht).'</td>';
|
||||
}
|
||||
|
||||
@ -48,7 +48,7 @@ $result = restrictedArea($user, 'paymentbybanktransfer', '', '');
|
||||
* Actions
|
||||
*/
|
||||
|
||||
|
||||
// None
|
||||
|
||||
|
||||
/*
|
||||
@ -166,7 +166,7 @@ if ($resql) {
|
||||
$i++;
|
||||
}
|
||||
} else {
|
||||
print '<tr class="oddeven"><td colspan="5" class="opacitymedium">'.$langs->trans("NoSupplierInvoiceToWithdraw", $langs->transnoentitiesnoconv("BankTransfer")).'</td></tr>';
|
||||
print '<tr class="oddeven"><td colspan="5"><span class="opacitymedium">'.$langs->trans("NoSupplierInvoiceToWithdraw", $langs->transnoentitiesnoconv("BankTransfer")).'</span></td></tr>';
|
||||
}
|
||||
print "</table></div><br>";
|
||||
} else {
|
||||
@ -223,7 +223,7 @@ if ($result) {
|
||||
$i++;
|
||||
}
|
||||
} else {
|
||||
print '<tr><td class="opacitymedium" colspan="4">'.$langs->trans("None").'</td></tr>';
|
||||
print '<tr><td colspan="4"><span class="opacitymedium">'.$langs->trans("None").'</span></td></tr>';
|
||||
}
|
||||
|
||||
print "</table></div><br>";
|
||||
|
||||
@ -33,11 +33,6 @@ require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
|
||||
// Load translation files required by the page
|
||||
$langs->loadLangs(array('banks', 'categories', 'bills', 'companies', 'withdrawals'));
|
||||
|
||||
// Security check
|
||||
if ($user->socid > 0) {
|
||||
accessforbidden();
|
||||
}
|
||||
|
||||
// Get supervariables
|
||||
$action = GETPOST('action', 'aZ09');
|
||||
$id = GETPOST('id', 'int');
|
||||
@ -71,11 +66,11 @@ include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be includ
|
||||
|
||||
$hookmanager->initHooks(array('directdebitprevcard', 'globalcard', 'directdebitprevlist'));
|
||||
|
||||
if (!$user->rights->prelevement->bons->lire && $object->type != 'bank-transfer') {
|
||||
accessforbidden();
|
||||
}
|
||||
if (!$user->rights->paymentbybanktransfer->read && $object->type == 'bank-transfer') {
|
||||
accessforbidden();
|
||||
$type = $object->type;
|
||||
if ($type == 'bank-transfer') {
|
||||
$result = restrictedArea($user, 'paymentbybanktransfer', '', '', '');
|
||||
} else {
|
||||
$result = restrictedArea($user, 'prelevement', '', '', 'bons');
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -39,12 +39,6 @@ require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
|
||||
// Load translation files required by the page
|
||||
$langs->loadLangs(array('banks', 'categories', 'withdrawals', 'companies', 'bills'));
|
||||
|
||||
// Security check
|
||||
if ($user->socid) {
|
||||
$socid = $user->socid;
|
||||
}
|
||||
$result = restrictedArea($user, 'prelevement', '', '', 'bons');
|
||||
|
||||
$type = GETPOST('type', 'aZ09');
|
||||
|
||||
// Get supervariables
|
||||
@ -63,6 +57,16 @@ $offset = $limit * $page;
|
||||
|
||||
$hookmanager->initHooks(array('directdebitcreatecard', 'globalcard'));
|
||||
|
||||
// Security check
|
||||
if ($user->socid) {
|
||||
$socid = $user->socid;
|
||||
}
|
||||
if ($type == 'bank-transfer') {
|
||||
$result = restrictedArea($user, 'paymentbybanktransfer', '', '', '');
|
||||
} else {
|
||||
$result = restrictedArea($user, 'prelevement', '', '', 'bons');
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Actions
|
||||
@ -141,7 +145,11 @@ if (empty($reshook)) {
|
||||
}
|
||||
}
|
||||
$objectclass = "BonPrelevement";
|
||||
$uploaddir = $conf->prelevement->dir_output;
|
||||
if ($type == 'bank-transfer') {
|
||||
$uploaddir = $conf->paymentbybanktransfer->dir_output;
|
||||
} else {
|
||||
$uploaddir = $conf->prelevement->dir_output;
|
||||
}
|
||||
include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php';
|
||||
}
|
||||
|
||||
|
||||
@ -37,10 +37,6 @@ $langs->loadLangs(array('banks', 'categories', 'withdrawals', 'companies'));
|
||||
// Security check
|
||||
$socid = GETPOST('socid', 'int');
|
||||
$status = GETPOST('status', 'int');
|
||||
if ($user->socid) {
|
||||
$socid = $user->socid;
|
||||
}
|
||||
$result = restrictedArea($user, 'prelevement', '', '', 'bons');
|
||||
|
||||
$contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'directdebitcredittransferlist'; // To manage different context of search
|
||||
$backtopage = GETPOST('backtopage', 'alpha'); // Go back to a dedicated page
|
||||
@ -73,6 +69,15 @@ $massactionbutton = '';
|
||||
|
||||
$hookmanager->initHooks(array('withdrawalstodolist'));
|
||||
|
||||
if ($user->socid) {
|
||||
$socid = $user->socid;
|
||||
}
|
||||
if ($type == 'bank-transfer') {
|
||||
$result = restrictedArea($user, 'paymentbybanktransfer', '', '', '');
|
||||
} else {
|
||||
$result = restrictedArea($user, 'prelevement', '', '', 'bons');
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Actions
|
||||
|
||||
@ -34,11 +34,6 @@ require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
|
||||
// Load translation files required by the page
|
||||
$langs->loadLangs(array('banks', 'categories', 'bills', 'companies', 'withdrawals'));
|
||||
|
||||
// Securite acces client
|
||||
if ($user->socid > 0) {
|
||||
accessforbidden();
|
||||
}
|
||||
|
||||
// Get supervariables
|
||||
$id = GETPOST('id', 'int');
|
||||
$ref = GETPOST('ref', 'alpha');
|
||||
@ -70,11 +65,16 @@ include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be includ
|
||||
|
||||
$hookmanager->initHooks(array('directdebitprevcard', 'globalcard', 'directdebitprevlist'));
|
||||
|
||||
if (!$user->rights->prelevement->bons->lire && $object->type != 'bank-transfer') {
|
||||
// Security check
|
||||
if ($user->socid > 0) {
|
||||
accessforbidden();
|
||||
}
|
||||
if (!$user->rights->paymentbybanktransfer->read && $object->type == 'bank-transfer') {
|
||||
accessforbidden();
|
||||
|
||||
$type = $object->type;
|
||||
if ($type == 'bank-transfer') {
|
||||
$result = restrictedArea($user, 'paymentbybanktransfer', '', '', '');
|
||||
} else {
|
||||
$result = restrictedArea($user, 'prelevement', '', '', 'bons');
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -62,11 +62,16 @@ $object = new BonPrelevement($db);
|
||||
// Load object
|
||||
include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once // Must be include, not include_once. Include fetch and fetch_thirdparty but not fetch_optionals
|
||||
|
||||
if (!$user->rights->prelevement->bons->lire && $object->type != 'bank-transfer') {
|
||||
// Security check
|
||||
if ($user->socid > 0) {
|
||||
accessforbidden();
|
||||
}
|
||||
if (!$user->rights->paymentbybanktransfer->read && $object->type == 'bank-transfer') {
|
||||
accessforbidden();
|
||||
|
||||
$type = $object->type;
|
||||
if ($type == 'bank-transfer') {
|
||||
$result = restrictedArea($user, 'paymentbybanktransfer', '', '', '');
|
||||
} else {
|
||||
$result = restrictedArea($user, 'prelevement', '', '', 'bons');
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -32,11 +32,6 @@ require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
|
||||
// Load translation files required by the page
|
||||
$langs->loadLangs(array("banks", "categories", 'withdrawals', 'bills'));
|
||||
|
||||
// Security check
|
||||
if ($user->socid > 0) {
|
||||
accessforbidden();
|
||||
}
|
||||
|
||||
// Get supervariables
|
||||
$prev_id = GETPOST('id', 'int');
|
||||
$ref = GETPOST('ref', 'alpha');
|
||||
@ -61,11 +56,16 @@ $object = new BonPrelevement($db);
|
||||
// Load object
|
||||
include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once // Must be include, not include_once. Include fetch and fetch_thirdparty but not fetch_optionals
|
||||
|
||||
if (!$user->rights->prelevement->bons->lire && $object->type != 'bank-transfer') {
|
||||
// Security check
|
||||
if ($user->socid > 0) {
|
||||
accessforbidden();
|
||||
}
|
||||
if (!$user->rights->paymentbybanktransfer->read && $object->type == 'bank-transfer') {
|
||||
accessforbidden();
|
||||
|
||||
$type = $object->type;
|
||||
if ($type == 'bank-transfer') {
|
||||
$result = restrictedArea($user, 'paymentbybanktransfer', '', '', '');
|
||||
} else {
|
||||
$result = restrictedArea($user, 'prelevement', '', '', 'bons');
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -41,14 +41,14 @@ $socid = GETPOST('socid', 'int');
|
||||
if ($user->socid) {
|
||||
$socid = $user->socid;
|
||||
}
|
||||
$result = restrictedArea($user, 'prelevement', '', '');
|
||||
$result = restrictedArea($user, 'prelevement', '', 'bons');
|
||||
|
||||
|
||||
/*
|
||||
* Actions
|
||||
*/
|
||||
|
||||
|
||||
// None
|
||||
|
||||
|
||||
/*
|
||||
@ -225,7 +225,7 @@ if ($result) {
|
||||
$i++;
|
||||
}
|
||||
} else {
|
||||
print '<tr><td class="opacitymedium" colspan="4">'.$langs->trans("None").'</td></tr>';
|
||||
print '<tr><td colspan="4"><span class="opacitymedium">'.$langs->trans("None").'</span></td></tr>';
|
||||
}
|
||||
|
||||
print "</table></div><br>";
|
||||
|
||||
@ -35,11 +35,6 @@ require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
|
||||
// Load translation files required by the page
|
||||
$langs->loadlangs(array('banks', 'categories', 'bills', 'withdrawals'));
|
||||
|
||||
// Security check
|
||||
if ($user->socid > 0) {
|
||||
accessforbidden();
|
||||
}
|
||||
|
||||
// Get supervariables
|
||||
$action = GETPOST('action', 'aZ09');
|
||||
$id = GETPOST('id', 'int');
|
||||
@ -66,6 +61,13 @@ if ($sortfield == "") {
|
||||
$sortfield = "pl.fk_soc";
|
||||
}
|
||||
|
||||
$type = $object->type;
|
||||
if ($type == 'bank-transfer') {
|
||||
$result = restrictedArea($user, 'paymentbybanktransfer', '', '', '');
|
||||
} else {
|
||||
$result = restrictedArea($user, 'prelevement', '', '', 'bons');
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Actions
|
||||
|
||||
@ -42,13 +42,6 @@ $contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'di
|
||||
$backtopage = GETPOST('backtopage', 'alpha'); // Go back to a dedicated page
|
||||
$optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print')
|
||||
|
||||
// Security check
|
||||
$socid = GETPOST('socid', 'int');
|
||||
if ($user->socid) {
|
||||
$socid = $user->socid;
|
||||
}
|
||||
$result = restrictedArea($user, 'prelevement', '', '', 'bons');
|
||||
|
||||
$type = GETPOST('type', 'aZ09');
|
||||
|
||||
$limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit;
|
||||
@ -80,6 +73,17 @@ $company = new Societe($db);
|
||||
|
||||
$hookmanager->initHooks(array('withdrawalsreceiptslineslist'));
|
||||
|
||||
// Security check
|
||||
$socid = GETPOST('socid', 'int');
|
||||
if ($user->socid) {
|
||||
$socid = $user->socid;
|
||||
}
|
||||
if ($type == 'bank-transfer') {
|
||||
$result = restrictedArea($user, 'paymentbybanktransfer', '', '', '');
|
||||
} else {
|
||||
$result = restrictedArea($user, 'prelevement', '', '', 'bons');
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Actions
|
||||
@ -274,7 +278,7 @@ if ($result) {
|
||||
$i++;
|
||||
}
|
||||
} else {
|
||||
print '<tr><td class="opacitymedium" colspan="8">'.$langs->trans("None").'</td></tr>';
|
||||
print '<tr><td colspan="8"><span class="opacitymedium">'.$langs->trans("None").'</span></td></tr>';
|
||||
}
|
||||
print "</table>";
|
||||
print '</div>';
|
||||
|
||||
@ -33,13 +33,6 @@ $langs->loadLangs(array('banks', 'categories', 'withdrawals'));
|
||||
|
||||
$contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'directdebitcredittransferlist'; // To manage different context of search
|
||||
|
||||
// Security check
|
||||
$socid = GETPOST('socid', 'int');
|
||||
if ($user->socid) {
|
||||
$socid = $user->socid;
|
||||
}
|
||||
$result = restrictedArea($user, 'prelevement', '', '', 'bons');
|
||||
|
||||
$type = GETPOST('type', 'aZ09');
|
||||
|
||||
$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit;
|
||||
@ -72,6 +65,17 @@ if ($type == 'bank-transfer') {
|
||||
$usercancreate = $user->rights->paymentbybanktransfer->create;
|
||||
}
|
||||
|
||||
// Security check
|
||||
$socid = GETPOST('socid', 'int');
|
||||
if ($user->socid) {
|
||||
$socid = $user->socid;
|
||||
}
|
||||
if ($type == 'bank-transfer') {
|
||||
$result = restrictedArea($user, 'paymentbybanktransfer', '', '', '');
|
||||
} else {
|
||||
$result = restrictedArea($user, 'prelevement', '', '', 'bons');
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Actions
|
||||
@ -137,15 +141,15 @@ if ($result) {
|
||||
|
||||
$newcardbutton = '';
|
||||
if ($usercancreate) {
|
||||
$newcardbutton .= dolGetButtonTitle($langs->trans('NewStandingOrder'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/compta/prelevement/create.php');
|
||||
$newcardbutton .= dolGetButtonTitle($langs->trans('NewStandingOrder'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/compta/prelevement/create.php?type='.urlencode($type));
|
||||
}
|
||||
|
||||
// Lines of title fields
|
||||
print '<form method="POST" id="searchFormList" action="'.$_SERVER["PHP_SELF"].'">';
|
||||
print '<input type="hidden" name="token" value="'.newToken().'">';
|
||||
if ($optioncss != '') {
|
||||
print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
|
||||
}
|
||||
print '<input type="hidden" name="token" value="'.newToken().'">';
|
||||
print '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">';
|
||||
print '<input type="hidden" name="action" value="list">';
|
||||
print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
|
||||
@ -217,7 +221,7 @@ if ($result) {
|
||||
$i++;
|
||||
}
|
||||
} else {
|
||||
print '<tr><td class="opacitymedium" colspan="5">'.$langs->trans("None").'</td></tr>';
|
||||
print '<tr><td colspan="5"><span class="opacitymedium">'.$langs->trans("None").'</span></td></tr>';
|
||||
}
|
||||
|
||||
print "</table>";
|
||||
|
||||
@ -33,13 +33,6 @@ require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
|
||||
// Load translation files required by the page
|
||||
$langs->loadLangs(array('banks', 'categories', 'withdrawals', 'companies'));
|
||||
|
||||
// Security check
|
||||
$socid = GETPOST('socid', 'int');
|
||||
if ($user->socid) {
|
||||
$socid = $user->socid;
|
||||
}
|
||||
$result = restrictedArea($user, 'prelevement', '', '', 'bons');
|
||||
|
||||
$type = GETPOST('type', 'aZ09');
|
||||
|
||||
// Get supervariables
|
||||
@ -54,6 +47,17 @@ $offset = $limit * $page;
|
||||
$pageprev = $page - 1;
|
||||
$pagenext = $page + 1;
|
||||
|
||||
// Security check
|
||||
$socid = GETPOST('socid', 'int');
|
||||
if ($user->socid) {
|
||||
$socid = $user->socid;
|
||||
}
|
||||
if ($type == 'bank-transfer') {
|
||||
$result = restrictedArea($user, 'paymentbybanktransfer', '', '', '');
|
||||
} else {
|
||||
$result = restrictedArea($user, 'prelevement', '', '', 'bons');
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* View
|
||||
@ -140,7 +144,7 @@ if ($result) {
|
||||
$i++;
|
||||
}
|
||||
} else {
|
||||
print '<tr><td class="opacitymedium" colspan="3">'.$langs->trans("None").'</td></tr>';
|
||||
print '<tr><td colspan="3"><span class="opacitymedium">'.$langs->trans("None").'</span></td></tr>';
|
||||
}
|
||||
|
||||
print "</table>";
|
||||
|
||||
@ -31,14 +31,18 @@ require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
|
||||
// Load translation files required by the page
|
||||
$langs->loadLangs(array('banks', 'categories', 'withdrawals', 'companies'));
|
||||
|
||||
$type = GETPOST('type', 'aZ09');
|
||||
|
||||
// Security check
|
||||
$socid = GETPOST('socid', 'int');
|
||||
if ($user->socid) {
|
||||
$socid = $user->socid;
|
||||
}
|
||||
$result = restrictedArea($user, 'prelevement', '', '', 'bons');
|
||||
|
||||
$type = GETPOST('type', 'aZ09');
|
||||
if ($type == 'bank-transfer') {
|
||||
$result = restrictedArea($user, 'paymentbybanktransfer', '', '', '');
|
||||
} else {
|
||||
$result = restrictedArea($user, 'prelevement', '', '', 'bons');
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
|
||||
@ -165,7 +165,8 @@ class Contact extends CommonObject
|
||||
/**
|
||||
* @var int Thirdparty ID
|
||||
*/
|
||||
public $socid;
|
||||
public $socid; // both socid and fk_soc are used
|
||||
public $fk_soc; // both socid and fk_soc are used
|
||||
|
||||
/**
|
||||
* @var int 0=inactive, 1=active
|
||||
@ -1027,7 +1028,8 @@ class Contact extends CommonObject
|
||||
$this->country_code = $obj->country_id ? $obj->country_code : '';
|
||||
$this->country = $obj->country_id ? ($langs->trans('Country'.$obj->country_code) != 'Country'.$obj->country_code ? $langs->transnoentities('Country'.$obj->country_code) : $obj->country) : '';
|
||||
|
||||
$this->socid = $obj->fk_soc;
|
||||
$this->fk_soc = $obj->fk_soc; // Both fk_soc and socid are used
|
||||
$this->socid = $obj->fk_soc; // Both fk_soc and socid are used
|
||||
$this->socname = $obj->socname;
|
||||
$this->poste = $obj->poste;
|
||||
$this->statut = $obj->statut;
|
||||
|
||||
@ -645,7 +645,7 @@ if ($sql_select) {
|
||||
print_liste_field_titre('Quantity', $_SERVER['PHP_SELF'], 'prod_qty', '', $param, '', $sortfield, $sortorder, 'right ');
|
||||
print "</tr>\n";
|
||||
|
||||
print '<tr class="oddeven"><td class="opacitymedium" colspan="5">'.$langs->trans("SelectElementAndClick", $langs->transnoentitiesnoconv("Search")).'</td></tr>';
|
||||
print '<tr class="oddeven"><td colspan="5"><span class="opacitymedium">'.$langs->trans("SelectElementAndClick", $langs->transnoentitiesnoconv("Search")).'</span></td></tr>';
|
||||
|
||||
print "</table>";
|
||||
} else {
|
||||
@ -653,7 +653,7 @@ if ($sql_select) {
|
||||
|
||||
print '<table class="liste centpercent">'."\n";
|
||||
|
||||
print '<tr class="oddeven"><td class="opacitymedium" colspan="5">'.$langs->trans("FeatureNotYetAvailable").'</td></tr>';
|
||||
print '<tr class="oddeven"><td colspan="5"><span class="opacitymedium">'.$langs->trans("FeatureNotYetAvailable").'</span></td></tr>';
|
||||
|
||||
print "</table>";
|
||||
}
|
||||
|
||||
@ -173,7 +173,7 @@ if ($result > 0) {
|
||||
// Show tree
|
||||
if (((!is_numeric($records)) || $records != 0) && (!isset($records['count']) || $records['count'] > 0)) {
|
||||
if (!is_array($records)) {
|
||||
print '<tr class="oddeven"><td colspan="2"><font class="error">'.$langs->trans("ErrorFailedToReadLDAP").'</font></td></tr>';
|
||||
print '<tr class="oddeven"><td colspan="2"><span class="error">'.$langs->trans("ErrorFailedToReadLDAP").'</span></td></tr>';
|
||||
} else {
|
||||
$result = show_ldap_content($records, 0, $records['count'], true);
|
||||
}
|
||||
|
||||
@ -102,12 +102,12 @@ if ($action == 'builddoc' && $permissiontoadd) {
|
||||
if (empty($donotredirect)) { // This is set when include is done by bulk action "Bill Orders"
|
||||
setEventMessages($langs->trans("FileGenerated"), null);
|
||||
|
||||
$urltoredirect = $_SERVER['REQUEST_URI'];
|
||||
/*$urltoredirect = $_SERVER['REQUEST_URI'];
|
||||
$urltoredirect = preg_replace('/#builddoc$/', '', $urltoredirect);
|
||||
$urltoredirect = preg_replace('/action=builddoc&?/', '', $urltoredirect); // To avoid infinite loop
|
||||
|
||||
header('Location: '.$urltoredirect.'#builddoc');
|
||||
exit;
|
||||
exit;*/
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -334,7 +334,7 @@ if ($type == 'directory') {
|
||||
$textifempty = $langs->trans('NoFileFound');
|
||||
} elseif ($section === '0') {
|
||||
if ($module == 'ecm') {
|
||||
$textifempty = '<br><div class="center"><font class="warning">'.$langs->trans("DirNotSynchronizedSyncFirst").'</font></div><br>';
|
||||
$textifempty = '<br><div class="center"><span class="warning">'.$langs->trans("DirNotSynchronizedSyncFirst").'</span></div><br>';
|
||||
} else {
|
||||
$textifempty = $langs->trans('NoFileFound');
|
||||
}
|
||||
|
||||
@ -283,7 +283,7 @@ if (empty($conf->use_javascript_ajax) || !empty($conf->global->MAIN_ECM_DISABLE_
|
||||
print '</td>';
|
||||
print '<td class="left">';
|
||||
if ($nbofsubdir && $nboffilesinsubdir) {
|
||||
print '<font color="#AAAAAA">+'.$nboffilesinsubdir.'</font> ';
|
||||
print '<span style="color: #AAAAAA">+'.$nboffilesinsubdir.'</span> ';
|
||||
}
|
||||
print '</td>';
|
||||
|
||||
@ -439,7 +439,7 @@ function treeOutputForAbsoluteDir($sqltree, $selecteddir, $fullpathselecteddir,
|
||||
print '</td>';
|
||||
print '<td class="left">';
|
||||
if ($nbofsubdir > 0 && $nboffilesinsubdir > 0) {
|
||||
print '<font class="opacitymedium">+'.$nboffilesinsubdir.'</font> ';
|
||||
print '<span class="opacitymedium">+'.$nboffilesinsubdir.'</span> ';
|
||||
}
|
||||
print '</td>';
|
||||
|
||||
|
||||
@ -220,6 +220,7 @@ abstract class CommonDocGenerator
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
/**
|
||||
* Define array with couple substitution key => substitution value
|
||||
* For example {company_name}, {company_name_alias}
|
||||
*
|
||||
* @param Societe $object Object
|
||||
* @param Translate $outputlangs Language object for output
|
||||
|
||||
@ -5324,7 +5324,7 @@ abstract class CommonObject
|
||||
$ecmfile->gen_or_uploaded = 'generated';
|
||||
$ecmfile->description = ''; // indexed content
|
||||
$ecmfile->keywords = ''; // keyword content
|
||||
$ecmfile->src_object_type = $this->table_element;
|
||||
$ecmfile->src_object_type = $this->table_element.(empty($this->module) ? '' : '@'.$this->module);
|
||||
$ecmfile->src_object_id = $this->id;
|
||||
|
||||
$result = $ecmfile->create($user);
|
||||
@ -7808,7 +7808,7 @@ abstract class CommonObject
|
||||
$out .= $labeltoshow;
|
||||
}
|
||||
if ($mode != 'view' && !empty($extrafields->attributes[$this->table_element]['required'][$key])) {
|
||||
$out .= ' <font color="red">*</font>';
|
||||
$out .= ' <span style="color: red">*</span>';
|
||||
}
|
||||
} else {
|
||||
if ($mode != 'view' && !empty($extrafields->attributes[$this->table_element]['required'][$key])) {
|
||||
@ -8220,7 +8220,7 @@ abstract class CommonObject
|
||||
$return .= '<br>';
|
||||
// On propose la generation de la vignette si elle n'existe pas et si la taille est superieure aux limites
|
||||
if ($photo_vignette && (image_format_supported($photo) > 0) && ($this->imgWidth > $maxWidth || $this->imgHeight > $maxHeight)) {
|
||||
$return .= '<a href="'.$_SERVER["PHP_SELF"].'?id='.$this->id.'&action=addthumb&file='.urlencode($pdir.$viewfilename).'">'.img_picto($langs->trans('GenerateThumb'), 'refresh').' </a>';
|
||||
$return .= '<a href="'.$_SERVER["PHP_SELF"].'?id='.$this->id.'&action=addthumb&token='.newToken().'&file='.urlencode($pdir.$viewfilename).'">'.img_picto($langs->trans('GenerateThumb'), 'refresh').' </a>';
|
||||
}
|
||||
// Special cas for product
|
||||
if ($modulepart == 'product' && ($user->rights->produit->creer || $user->rights->service->creer)) {
|
||||
@ -9405,6 +9405,11 @@ abstract class CommonObject
|
||||
*/
|
||||
public function setCategoriesCommon($categories, $type_categ = '', $remove_existing = true)
|
||||
{
|
||||
// Handle single category
|
||||
if (!is_array($categories)) {
|
||||
$categories = array($categories);
|
||||
}
|
||||
|
||||
dol_syslog(get_class($this)."::setCategoriesCommon Oject Id:".$this->id.' type_categ:'.$type_categ.' nb tag add:'.count($categories), LOG_DEBUG);
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
|
||||
@ -9414,11 +9419,6 @@ abstract class CommonObject
|
||||
return -1;
|
||||
}
|
||||
|
||||
// Handle single category
|
||||
if (!is_array($categories)) {
|
||||
$categories = array($categories);
|
||||
}
|
||||
|
||||
// Get current categories
|
||||
$c = new Categorie($this->db);
|
||||
$existing = $c->containing($this->id, $type_categ, 'id');
|
||||
|
||||
@ -624,14 +624,15 @@ class Conf
|
||||
if (!empty($this->global->MAILING_EMAIL_FROM)) {
|
||||
$this->mailing->email_from = $this->global->MAILING_EMAIL_FROM;
|
||||
}
|
||||
if (!isset($this->global->MAIN_EMAIL_ADD_TRACK_ID)) {
|
||||
$this->global->MAIN_EMAIL_ADD_TRACK_ID = 1;
|
||||
}
|
||||
|
||||
if (!isset($this->global->MAIN_HIDE_WARNING_TO_ENCOURAGE_SMTP_SETUP)) {
|
||||
$this->global->MAIN_HIDE_WARNING_TO_ENCOURAGE_SMTP_SETUP = 1;
|
||||
}
|
||||
|
||||
if (!isset($this->global->MAIN_FIX_FOR_BUGGED_MTA)) {
|
||||
$this->global->MAIN_FIX_FOR_BUGGED_MTA = 1;
|
||||
}
|
||||
|
||||
// Format for date (used by default when not found or not searched in lang)
|
||||
$this->format_date_short = "%d/%m/%Y"; // Format of day with PHP/C tags (strftime functions)
|
||||
$this->format_date_short_java = "dd/MM/yyyy"; // Format of day with Java tags
|
||||
@ -828,7 +829,10 @@ class Conf
|
||||
|
||||
// Enable by default the CSRF protection by token.
|
||||
if (!isset($this->global->MAIN_SECURITY_CSRF_WITH_TOKEN)) {
|
||||
$this->global->MAIN_SECURITY_CSRF_WITH_TOKEN = 1; // Value 2 uses also CSRF check for all GET requests
|
||||
// Value 1 makes CSRF check for all POST parameters only
|
||||
// Value 2 makes also CSRF check for GET requests with action = a sensitive requests like action=del, action=remove...
|
||||
// Value 3 makes also CSRF check for all GET requests with a param action or massaction
|
||||
$this->global->MAIN_SECURITY_CSRF_WITH_TOKEN = 1;
|
||||
// Note: Set MAIN_SECURITY_CSRF_TOKEN_RENEWAL_ON_EACH_CALL=1 to have a renewal of token at each page call instead of each session (not recommended)
|
||||
}
|
||||
|
||||
|
||||
@ -741,7 +741,7 @@ class DolGraph
|
||||
/**
|
||||
* Build a graph using JFlot library. Input when calling this method should be:
|
||||
* $this->data = array(array(0=>'labelxA',1=>yA), array('labelxB',yB));
|
||||
* $this->data = array(array(0=>'labelxA',1=>yA1,...,n=>yAn), array('labelxB',yB1,...yBn)); // or when there is n series to show for each x
|
||||
* $this->data = array(array(0=>'labelxA',1=>yA1,...,n=>yAn), array('labelxB',yB1,...yBn)); // when there is n series to show for each x
|
||||
* $this->data = array(array('label'=>'labelxA','data'=>yA), array('labelxB',yB)); // Syntax deprecated
|
||||
* $this->legend= array("Val1",...,"Valn"); // list of n series name
|
||||
* $this->type = array('bars',...'lines','linesnopoint'); or array('pie') or array('polar')
|
||||
@ -1028,7 +1028,7 @@ class DolGraph
|
||||
/**
|
||||
* Build a graph using Chart library. Input when calling this method should be:
|
||||
* $this->data = array(array(0=>'labelxA',1=>yA), array('labelxB',yB));
|
||||
* $this->data = array(array(0=>'labelxA',1=>yA1,...,n=>yAn), array('labelxB',yB1,...yBn)); // or when there is n series to show for each x
|
||||
* $this->data = array(array(0=>'labelxA',1=>yA1,...,n=>yAn), array('labelxB',yB1,...yBn)); // when there is n series to show for each x
|
||||
* $this->data = array(array('label'=>'labelxA','data'=>yA), array('labelxB',yB)); // Syntax deprecated
|
||||
* $this->legend= array("Val1",...,"Valn"); // list of n series name
|
||||
* $this->type = array('bars',...'lines', 'linesnopoint'); or array('pie') or array('polar') or array('piesemicircle');
|
||||
@ -1303,6 +1303,8 @@ class DolGraph
|
||||
$this->stringtoshow .= 'var options = { maintainAspectRatio: false, aspectRatio: 2.5, ';
|
||||
if (empty($showlegend)) {
|
||||
$this->stringtoshow .= 'legend: { display: false }, ';
|
||||
} else {
|
||||
$this->stringtoshow .= 'legend: { position: \'' . ($showlegend == 2 ? 'right' : 'top') . '\' },';
|
||||
}
|
||||
$this->stringtoshow .= 'scales: { xAxes: [{ ';
|
||||
if ($this->hideXValues) {
|
||||
|
||||
@ -791,7 +791,7 @@ class Form
|
||||
|
||||
// Warning: if you set submit button to disabled, post using 'Enter' will no more work if there is no another input submit. So we add a hidden button
|
||||
$ret .= '<input type="submit" name="confirmmassactioninvisible" style="display: none" tabindex="-1">'; // Hidden button BEFORE so it is the one used when we submit with ENTER.
|
||||
$ret .= '<input type="submit" disabled name="confirmmassaction"'.(empty($conf->use_javascript_ajax) ? '' : ' style="display: none"').' class="button'.(empty($conf->use_javascript_ajax) ? '' : ' hideobject').' '.$name.' '.$name.'confirmed" value="'.dol_escape_htmltag($langs->trans("Confirm")).'">';
|
||||
$ret .= '<input type="submit" disabled name="confirmmassaction"'.(empty($conf->use_javascript_ajax) ? '' : ' style="display: none"').' class="button small'.(empty($conf->use_javascript_ajax) ? '' : ' hideobject').' '.$name.' '.$name.'confirmed" value="'.dol_escape_htmltag($langs->trans("Confirm")).'">';
|
||||
$ret .= '</div>';
|
||||
|
||||
if (!empty($conf->use_javascript_ajax)) {
|
||||
@ -1680,11 +1680,6 @@ class Form
|
||||
if ($resql) {
|
||||
$num = $this->db->num_rows($resql);
|
||||
|
||||
if ($conf->use_javascript_ajax && !$forcecombo && !$options_only) {
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/lib/ajax.lib.php';
|
||||
$out .= ajax_combobox($htmlid, $events, getDolGlobalString("CONTACT_USE_SEARCH_TO_SELECT"));
|
||||
}
|
||||
|
||||
if ($htmlname != 'none' && !$options_only) {
|
||||
$out .= '<select class="flat'.($moreclass ? ' '.$moreclass : '').'" id="'.$htmlid.'" name="'.$htmlname.(($num || empty($disableifempty)) ? '' : ' disabled').($multiple ? '[]' : '').'" '.($multiple ? 'multiple' : '').' '.(!empty($moreparam) ? $moreparam : '').'>';
|
||||
}
|
||||
@ -1815,6 +1810,11 @@ class Form
|
||||
$out .= '</select>';
|
||||
}
|
||||
|
||||
if ($conf->use_javascript_ajax && !$forcecombo && !$options_only) {
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/lib/ajax.lib.php';
|
||||
$out .= ajax_combobox($htmlid, $events, getDolGlobalString("CONTACT_USE_SEARCH_TO_SELECT"));
|
||||
}
|
||||
|
||||
$this->num = $num;
|
||||
return $out;
|
||||
} else {
|
||||
@ -5783,11 +5783,11 @@ class Form
|
||||
|
||||
return $num;
|
||||
} else {
|
||||
$this->error = '<font class="error">'.$langs->trans("ErrorNoVATRateDefinedForSellerCountry", $country_code).'</font>';
|
||||
$this->error = '<span class="error">'.$langs->trans("ErrorNoVATRateDefinedForSellerCountry", $country_code).'</span>';
|
||||
return -1;
|
||||
}
|
||||
} else {
|
||||
$this->error = '<font class="error">'.$this->db->error().'</font>';
|
||||
$this->error = '<span class="error">'.$this->db->error().'</span>';
|
||||
return -2;
|
||||
}
|
||||
}
|
||||
@ -5838,9 +5838,9 @@ class Form
|
||||
// Check parameters
|
||||
if (is_object($societe_vendeuse) && !$societe_vendeuse->country_code) {
|
||||
if ($societe_vendeuse->id == $mysoc->id) {
|
||||
$return .= '<font class="error">'.$langs->trans("ErrorYourCountryIsNotDefined").'</font>';
|
||||
$return .= '<span class="error">'.$langs->trans("ErrorYourCountryIsNotDefined").'</span>';
|
||||
} else {
|
||||
$return .= '<font class="error">'.$langs->trans("ErrorSupplierCountryIsNotDefined").'</font>';
|
||||
$return .= '<span class="error">'.$langs->trans("ErrorSupplierCountryIsNotDefined").'</span>';
|
||||
}
|
||||
return $return;
|
||||
}
|
||||
@ -7923,7 +7923,7 @@ class Form
|
||||
}
|
||||
|
||||
if (!$nboftypesoutput) {
|
||||
print '<tr><td class="impair opacitymedium" colspan="7">'.$langs->trans("None").'</td></tr>';
|
||||
print '<tr><td class="impair" colspan="7"><span class="opacitymedium">'.$langs->trans("None").'</span></td></tr>';
|
||||
}
|
||||
|
||||
print '</table>';
|
||||
@ -8789,8 +8789,8 @@ class Form
|
||||
public function showFilterButtons()
|
||||
{
|
||||
$out = '<div class="nowraponall">';
|
||||
$out .= '<button type="submit" class="liste_titre button_search" name="button_search_x" value="x"><span class="fa fa-search"></span></button>';
|
||||
$out .= '<button type="submit" class="liste_titre button_removefilter" name="button_removefilter_x" value="x"><span class="fa fa-remove"></span></button>';
|
||||
$out .= '<button type="submit" class="liste_titre button_search reposition" name="button_search_x" value="x"><span class="fa fa-search"></span></button>';
|
||||
$out .= '<button type="submit" class="liste_titre button_removefilter reposition" name="button_removefilter_x" value="x"><span class="fa fa-remove"></span></button>';
|
||||
$out .= '</div>';
|
||||
|
||||
return $out;
|
||||
|
||||
@ -393,6 +393,38 @@ class FormFile
|
||||
global $langs, $conf, $user, $hookmanager;
|
||||
global $form;
|
||||
|
||||
$reshook = 0;
|
||||
if (is_object($hookmanager)) {
|
||||
$parameters = array(
|
||||
'modulepart'=>&$modulepart,
|
||||
'modulesubdir'=>&$modulesubdir,
|
||||
'filedir'=>&$filedir,
|
||||
'urlsource'=>&$urlsource,
|
||||
'genallowed'=>&$genallowed,
|
||||
'delallowed'=>&$delallowed,
|
||||
'modelselected'=>&$modelselected,
|
||||
'allowgenifempty'=>&$allowgenifempty,
|
||||
'forcenomultilang'=>&$forcenomultilang,
|
||||
'noform'=>&$noform,
|
||||
'param'=>&$param,
|
||||
'title'=>&$title,
|
||||
'buttonlabel'=>&$buttonlabel,
|
||||
'codelang'=>&$codelang,
|
||||
'morepicto'=>&$morepicto,
|
||||
'hideifempty'=>&$hideifempty,
|
||||
'removeaction'=>&$removeaction
|
||||
);
|
||||
$reshook = $hookmanager->executeHooks('showDocuments', $parameters, $object); // Note that parameters may have been updated by hook
|
||||
// May report error
|
||||
if ($reshook < 0) {
|
||||
setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
|
||||
}
|
||||
}
|
||||
// Remode default action if $reskook > 0
|
||||
if ($reshook > 0) {
|
||||
return $hookmanager->resPrint;
|
||||
}
|
||||
|
||||
if (!is_object($form)) {
|
||||
$form = new Form($this->db);
|
||||
}
|
||||
@ -702,9 +734,10 @@ class FormFile
|
||||
$urlsource .= '#'.$forname.'_form'; // So we switch to form after a generation
|
||||
}
|
||||
if (empty($noform)) {
|
||||
$out .= '<form action="'.$urlsource.(empty($conf->global->MAIN_JUMP_TAG) ? '' : '#builddoc').'" id="'.$forname.'_form" method="post">';
|
||||
$out .= '<form action="'.$urlsource.'" id="'.$forname.'_form" method="post">';
|
||||
}
|
||||
$out .= '<input type="hidden" name="action" value="builddoc">';
|
||||
$out .= '<input type="hidden" name="page_y" value="">';
|
||||
$out .= '<input type="hidden" name="token" value="'.newToken().'">';
|
||||
|
||||
$out .= load_fiche_titre($titletoshow, '', '');
|
||||
@ -754,7 +787,7 @@ class FormFile
|
||||
}
|
||||
|
||||
// Button
|
||||
$genbutton = '<input class="button buttongen" id="'.$forname.'_generatebutton" name="'.$forname.'_generatebutton"';
|
||||
$genbutton = '<input class="button buttongen reposition" id="'.$forname.'_generatebutton" name="'.$forname.'_generatebutton"';
|
||||
$genbutton .= ' type="submit" value="'.$buttonlabel.'"';
|
||||
if (!$allowgenifempty && !is_array($modellist) && empty($modellist)) {
|
||||
$genbutton .= ' disabled';
|
||||
@ -899,19 +932,19 @@ class FormFile
|
||||
}
|
||||
$out .= '</td>';
|
||||
|
||||
// Show picto delete, print...
|
||||
if ($delallowed || $printer || $morepicto) {
|
||||
$out .= '<td class="right nowraponall">';
|
||||
if ($delallowed) {
|
||||
$tmpurlsource = preg_replace('/#[a-zA-Z0-9_]*$/', '', $urlsource);
|
||||
$out .= '<a href="'.$tmpurlsource.((strpos($tmpurlsource, '?') === false) ? '?' : '&').'action='.urlencode($removeaction).'&token='.newToken().'&file='.urlencode($relativepath);
|
||||
$out .= '<a class="reposition" href="'.$tmpurlsource.((strpos($tmpurlsource, '?') === false) ? '?' : '&').'action='.urlencode($removeaction).'&token='.newToken().'&file='.urlencode($relativepath);
|
||||
$out .= ($param ? '&'.$param : '');
|
||||
//$out.= '&modulepart='.$modulepart; // TODO obsolete ?
|
||||
//$out.= '&urlsource='.urlencode($urlsource); // TODO obsolete ?
|
||||
$out .= '">'.img_picto($langs->trans("Delete"), 'delete').'</a>';
|
||||
}
|
||||
if ($printer) {
|
||||
//$out.= '<td class="right">';
|
||||
$out .= '<a class="marginleftonly" href="'.$urlsource.(strpos($urlsource, '?') ? '&' : '?').'action=print_file&token='.newToken().'printer='.urlencode($modulepart).'&file='.urlencode($relativepath);
|
||||
$out .= '<a class="marginleftonly reposition" href="'.$urlsource.(strpos($urlsource, '?') ? '&' : '?').'action=print_file&token='.newToken().'printer='.urlencode($modulepart).'&file='.urlencode($relativepath);
|
||||
$out .= ($param ? '&'.$param : '');
|
||||
$out .= '">'.img_picto($langs->trans("PrintFile", $relativepath), 'printer.png').'</a>';
|
||||
}
|
||||
@ -959,7 +992,7 @@ class FormFile
|
||||
}
|
||||
|
||||
if (count($file_list) == 0 && count($link_list) == 0 && $headershown) {
|
||||
$out .= '<tr><td colspan="'.(3 + ($addcolumforpicto ? 1 : 0)).'" class="opacitymedium">'.$langs->trans("None").'</td></tr>'."\n";
|
||||
$out .= '<tr><td colspan="'.(3 + ($addcolumforpicto ? 1 : 0)).'"><span class="opacitymedium">'.$langs->trans("None").'</span></td></tr>'."\n";
|
||||
}
|
||||
}
|
||||
|
||||
@ -1674,7 +1707,8 @@ class FormFile
|
||||
dol_include_once($hookmanager->resArray['classpath']);
|
||||
if (array_key_exists('classname', $hookmanager->resArray) && !empty($hookmanager->resArray['classname'])) {
|
||||
if (class_exists($hookmanager->resArray['classname'])) {
|
||||
$object_instance = new ${$hookmanager->resArray['classname']}($this->db);
|
||||
$tmpclassname = $hookmanager->resArray['classname'];
|
||||
$object_instance = new $tmpclassname($this->db);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1813,9 +1847,11 @@ class FormFile
|
||||
print '</td>';
|
||||
|
||||
// File
|
||||
// Check if document source has external module part, if it the case use it for module part on document.php
|
||||
preg_match('/^[^@]*@([^@]*)$/', $modulepart.'@expertisemedical', $modulesuffix);
|
||||
print '<td>';
|
||||
//print "XX".$file['name']; //$file['name'] must be utf8
|
||||
print '<a href="'.DOL_URL_ROOT.'/document.php?modulepart='.$modulepart;
|
||||
print '<a href="'.DOL_URL_ROOT.'/document.php?modulepart='.(empty($modulesuffix) ? $modulepart : $modulesuffix[1]);
|
||||
if ($forcedownload) {
|
||||
print '&attachment=1';
|
||||
}
|
||||
@ -1826,7 +1862,7 @@ class FormFile
|
||||
|
||||
//print $this->getDocumentsLink($modulepart, $modulesubdir, $filedir, '^'.preg_quote($file['name'],'/').'$');
|
||||
|
||||
print $this->showPreview($file, $modulepart, $file['relativename']);
|
||||
print $this->showPreview($file, (empty($modulesuffix) ? $modulepart : $modulesuffix[1]), $file['relativename']);
|
||||
|
||||
print "</td>\n";
|
||||
|
||||
|
||||
@ -863,9 +863,9 @@ class FormOther
|
||||
}
|
||||
},
|
||||
function(color, context) { console.log("close"); },
|
||||
function(color, context) { var hex = color.val(\'hex\'); console.log("new color selected in jpicker "+hex);';
|
||||
function(color, context) { var hex = color.val(\'hex\'); console.log("new color selected in jpicker "+hex+" setpropertyonselect='.dol_escape_js($setpropertyonselect).'");';
|
||||
if ($setpropertyonselect) {
|
||||
$out .= ' if (hex != null) document.documentElement.style.setProperty(\'--'.$setpropertyonselect.'\', \'#\'+hex);';
|
||||
$out .= ' if (hex != null) document.documentElement.style.setProperty(\'--'.dol_escape_js($setpropertyonselect).'\', \'#\'+hex);';
|
||||
}
|
||||
$out .= '},
|
||||
function(color, context) { console.log("cancel"); }
|
||||
|
||||
@ -178,7 +178,7 @@ function limitChars(textarea, limit, infodiv)
|
||||
} else {
|
||||
if ($this->fromtype) {
|
||||
$langs->load("errors");
|
||||
print '<font class="warning"> <'.$langs->trans("ErrorNoPhoneDefinedForThisUser").'> </font>';
|
||||
print '<span class="warning"> <'.$langs->trans("ErrorNoPhoneDefinedForThisUser").'> </span>';
|
||||
}
|
||||
}
|
||||
print "</td></tr>\n";
|
||||
|
||||
@ -240,7 +240,7 @@ class RssParser
|
||||
if (!empty($conf->global->EXTERNALRSS_USE_SIMPLEXML)) {
|
||||
//print 'xx'.LIBXML_NOCDATA;
|
||||
libxml_use_internal_errors(false);
|
||||
$rss = simplexml_load_string($str, "SimpleXMLElement", LIBXML_NOCDATA);
|
||||
$rss = simplexml_load_string($str, "SimpleXMLElement", LIBXML_NOCDATA|LIBXML_NOCDATA);
|
||||
} else {
|
||||
if (!function_exists('xml_parser_create')) {
|
||||
$this->error = 'Function xml_parser_create are not supported by your PHP';
|
||||
|
||||
@ -724,7 +724,7 @@ function getFormeJuridiqueLabel($code)
|
||||
function getCountriesInEEC()
|
||||
{
|
||||
// List of all country codes that are in europe for european vat rules
|
||||
// List found on http://ec.europa.eu/taxation_customs/common/faq/faq_1179_en.htm#9
|
||||
// List found on https://ec.europa.eu/taxation_customs/territorial-status-eu-countries-and-certain-territories_en
|
||||
global $conf, $db;
|
||||
$country_code_in_EEC = array();
|
||||
|
||||
|
||||
@ -16,7 +16,7 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file eventorganization/lib/eventorganization.lib.php
|
||||
* \file htdocs/core/lib/eventorganization.lib.php
|
||||
* \ingroup eventorganization
|
||||
* \brief Library files with common functions for EventOrganization
|
||||
*/
|
||||
|
||||
@ -3732,7 +3732,7 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $
|
||||
'action'=>'infobox-action', 'account'=>'infobox-bank_account', 'accountline'=>'infobox-bank_account', 'accountancy'=>'infobox-bank_account', 'asset'=>'infobox-bank_account',
|
||||
'bank_account'=>'bg-infobox-bank_account',
|
||||
'bill'=>'infobox-commande', 'billa'=>'infobox-commande', 'billr'=>'infobox-commande', 'billd'=>'infobox-commande',
|
||||
'conferenceorbooth'=>'infobox-project',
|
||||
'margin'=>'infobox-bank_account', 'conferenceorbooth'=>'infobox-project',
|
||||
'cash-register'=>'infobox-bank_account', 'contract'=>'infobox-contrat', 'check'=>'font-status4', 'collab'=>'infobox-action', 'conversation'=>'infobox-contrat',
|
||||
'donation'=>'infobox-commande', 'dolly'=>'infobox-commande', 'dollyrevert'=>'flip infobox-order_supplier',
|
||||
'ecm'=>'infobox-action', 'eventorganization'=>'infobox-project',
|
||||
@ -6156,7 +6156,7 @@ function yn($yesno, $case = 1, $color = 0)
|
||||
}
|
||||
}
|
||||
if ($color) {
|
||||
return '<font class="'.$classname.'">'.$result.'</font>';
|
||||
return '<span class="'.$classname.'">'.$result.'</span>';
|
||||
}
|
||||
return $result;
|
||||
}
|
||||
|
||||
@ -480,7 +480,8 @@ function getNumberInvoicesPieChart($mode)
|
||||
date_add($datenowadd30, $interval30days);
|
||||
date_add($datenowadd15, $interval15days);
|
||||
|
||||
$sql = "SELECT sum(".$db->ifsql("f.date_lim_reglement < '".date_format($datenowsub30, 'Y-m-d')."'", 1, 0).") as nblate30";
|
||||
$sql = "SELECT";
|
||||
$sql .= " sum(".$db->ifsql("f.date_lim_reglement < '".date_format($datenowsub30, 'Y-m-d')."'", 1, 0).") as nblate30";
|
||||
$sql .= ", sum(".$db->ifsql("f.date_lim_reglement < '".date_format($datenowsub15, 'Y-m-d')."'", 1, 0).") as nblate15";
|
||||
$sql .= ", sum(".$db->ifsql("f.date_lim_reglement < '".date_format($now, 'Y-m-d')."'", 1, 0).") as nblatenow";
|
||||
$sql .= ", sum(".$db->ifsql("f.date_lim_reglement >= '".date_format($now, 'Y-m-d')."'", 1, 0).") as nbnotlatenow";
|
||||
@ -508,24 +509,26 @@ function getNumberInvoicesPieChart($mode)
|
||||
|
||||
while ($i < $num) {
|
||||
$obj = $db->fetch_object($resql);
|
||||
$dataseries = array(array($langs->trans('InvoiceLate30Days'), $obj->nblate30)
|
||||
/*$dataseries = array(array($langs->trans('InvoiceLate30Days'), $obj->nblate30)
|
||||
,array($langs->trans('InvoiceLate15Days'), $obj->nblate15 - $obj->nblate30)
|
||||
,array($langs->trans('InvoiceLateMinus15Days'), $obj->nblatenow - $obj->nblate15)
|
||||
,array($langs->trans('InvoiceNotLate'), $obj->nbnotlatenow - $obj->nbnotlate15)
|
||||
,array($langs->trans('InvoiceNotLate15Days'), $obj->nbnotlate15 - $obj->nbnotlate30)
|
||||
,array($langs->trans('InvoiceNotLate30Days'), $obj->nbnotlate30));
|
||||
,array($langs->trans('InvoiceNotLate30Days'), $obj->nbnotlate30));*/
|
||||
$dataseries[0]=array($langs->trans('NbOfOpenInvoices'), $obj->nblate30, $obj->nblate15 - $obj->nblate30, $obj->nblatenow - $obj->nblate15, $obj->nbnotlatenow - $obj->nbnotlate15, $obj->nbnotlate15 - $obj->nbnotlate30, $obj->nbnotlate30);
|
||||
$i++;
|
||||
}
|
||||
foreach ($dataseries as $key=>$value) {
|
||||
$total += $value[1];
|
||||
}
|
||||
$legend = array($langs->trans('InvoiceLate30Days'), $langs->trans('InvoiceLate15Days'), $langs->trans('InvoiceLateMinus15Days'), $langs->trans('InvoiceNotLate'), $langs->trans('InvoiceNotLate15Days'), $langs->trans('InvoiceNotLate30Days'));
|
||||
|
||||
$colorseries = array($badgeStatus8, $badgeStatus1, $badgeStatus3, $badgeStatus4, $badgeStatus11, '-'.$badgeStatus11);
|
||||
|
||||
$result = '<div class="div-table-responsive-no-min">';
|
||||
$result .= '<table class="noborder nohover centpercent">';
|
||||
$result .= '<tr class="liste_titre">';
|
||||
$result .= '<td>'.$langs->trans("Statistics").' - ';
|
||||
$result .= '<td>'.$langs->trans("NbOfOpenInvoices").' - ';
|
||||
if ($mode == 'customers') {
|
||||
$result .= $langs->trans("CustomerInvoice");
|
||||
} elseif ($mode == 'fourn' || $mode == 'suppliers') {
|
||||
@ -537,14 +540,19 @@ function getNumberInvoicesPieChart($mode)
|
||||
$result .= '</tr>';
|
||||
|
||||
if ($conf->use_javascript_ajax) {
|
||||
//var_dump($dataseries);
|
||||
$dolgraph = new DolGraph();
|
||||
$dolgraph->SetData($dataseries);
|
||||
|
||||
$dolgraph->setLegend($legend);
|
||||
|
||||
$dolgraph->SetDataColor(array_values($colorseries));
|
||||
$dolgraph->setShowLegend(2);
|
||||
$dolgraph->setShowPercent(1);
|
||||
$dolgraph->SetType(['pie']);
|
||||
$dolgraph->setHeight('150');
|
||||
$dolgraph->setWidth('300');
|
||||
$dolgraph->SetType(array('bars', 'bars', 'bars', 'bars', 'bars', 'bars'));
|
||||
$dolgraph->setHeight('160');
|
||||
$dolgraph->setWidth('400');
|
||||
$dolgraph->setHideXValues(true);
|
||||
if ($mode == 'customers') {
|
||||
$dolgraph->draw('idgraphcustomerinvoices');
|
||||
} elseif ($mode == 'fourn' || $mode == 'suppliers') {
|
||||
@ -1218,7 +1226,7 @@ function getCustomerInvoiceUnpaidOpenTable($maxCount = 500, $socid = 0)
|
||||
print "</tr>\n";
|
||||
}
|
||||
|
||||
print '<tr class="liste_total"><td colspan="2">'.$langs->trans("Total").' <font style="font-weight: normal">('.$langs->trans("RemainderToTake").': '.price($total_ttc - $totalam).')</font> </td>';
|
||||
print '<tr class="liste_total"><td colspan="2">'.$langs->trans("Total").' <span style="font-weight: normal">('.$langs->trans("RemainderToTake").': '.price($total_ttc - $totalam).')</span> </td>';
|
||||
print '<td> </td>';
|
||||
if (!empty($conf->global->MAIN_SHOW_HT_ON_SUMMARY)) {
|
||||
print '<td class="right"><span class="amount">'.price($total).'</span></td>';
|
||||
@ -1383,7 +1391,7 @@ function getPurchaseInvoiceUnpaidOpenTable($maxCount = 500, $socid = 0)
|
||||
print "</tr>\n";
|
||||
}
|
||||
|
||||
print '<tr class="liste_total"><td colspan="2">'.$langs->trans("Total").' <font style="font-weight: normal">('.$langs->trans("RemainderToPay").': '.price($total_ttc - $totalam).')</font> </td>';
|
||||
print '<tr class="liste_total"><td colspan="2">'.$langs->trans("Total").' <span style="font-weight: normal">('.$langs->trans("RemainderToPay").': '.price($total_ttc - $totalam).')</span> </td>';
|
||||
print '<td> </td>';
|
||||
if (!empty($conf->global->MAIN_SHOW_HT_ON_SUMMARY)) {
|
||||
print '<td class="right">'.price($total).'</td>';
|
||||
|
||||
@ -224,7 +224,7 @@ function getOnlinePaymentUrl($mode, $type, $ref = '', $amount = '9.99', $freetag
|
||||
}
|
||||
|
||||
if ($type == 'free') {
|
||||
$out = $urltouse.'/public/payment/newpayment.php?amount='.($mode ? '<font color="#666666">' : '').$amount.($mode ? '</font>' : '').'&tag='.($mode ? '<font color="#666666">' : '').$freetag.($mode ? '</font>' : '');
|
||||
$out = $urltouse.'/public/payment/newpayment.php?amount='.($mode ? '<span style="color: #666666">' : '').$amount.($mode ? '</span>' : '').'&tag='.($mode ? '<span style="color: #666666">' : '').$freetag.($mode ? '</span>' : '');
|
||||
if (!empty($conf->global->PAYMENT_SECURITY_TOKEN)) {
|
||||
if (empty($conf->global->PAYMENT_SECURITY_TOKEN_UNIQUE)) {
|
||||
$out .= '&securekey='.urlencode($conf->global->PAYMENT_SECURITY_TOKEN);
|
||||
@ -234,120 +234,120 @@ function getOnlinePaymentUrl($mode, $type, $ref = '', $amount = '9.99', $freetag
|
||||
}
|
||||
//if ($mode) $out.='&noidempotency=1';
|
||||
} elseif ($type == 'order') {
|
||||
$out = $urltouse.'/public/payment/newpayment.php?source=order&ref='.($mode ? '<font color="#666666">' : '');
|
||||
$out = $urltouse.'/public/payment/newpayment.php?source=order&ref='.($mode ? '<span style="color: #666666">' : '');
|
||||
if ($mode == 1) {
|
||||
$out .= 'order_ref';
|
||||
}
|
||||
if ($mode == 0) {
|
||||
$out .= urlencode($ref);
|
||||
}
|
||||
$out .= ($mode ? '</font>' : '');
|
||||
$out .= ($mode ? '</span>' : '');
|
||||
if (!empty($conf->global->PAYMENT_SECURITY_TOKEN)) {
|
||||
if (empty($conf->global->PAYMENT_SECURITY_TOKEN_UNIQUE)) {
|
||||
$out .= '&securekey='.urlencode($conf->global->PAYMENT_SECURITY_TOKEN);
|
||||
} else {
|
||||
$out .= '&securekey='.($mode ? '<font color="#666666">' : '');
|
||||
$out .= '&securekey='.($mode ? '<span style="color: #666666">' : '');
|
||||
if ($mode == 1) {
|
||||
$out .= "hash('".$conf->global->PAYMENT_SECURITY_TOKEN."' + '".$type."' + order_ref)";
|
||||
}
|
||||
if ($mode == 0) {
|
||||
$out .= dol_hash($conf->global->PAYMENT_SECURITY_TOKEN.$type.$ref, 2);
|
||||
}
|
||||
$out .= ($mode ? '</font>' : '');
|
||||
$out .= ($mode ? '</span>' : '');
|
||||
}
|
||||
}
|
||||
} elseif ($type == 'invoice') {
|
||||
$out = $urltouse.'/public/payment/newpayment.php?source=invoice&ref='.($mode ? '<font color="#666666">' : '');
|
||||
$out = $urltouse.'/public/payment/newpayment.php?source=invoice&ref='.($mode ? '<span style="color: #666666">' : '');
|
||||
if ($mode == 1) {
|
||||
$out .= 'invoice_ref';
|
||||
}
|
||||
if ($mode == 0) {
|
||||
$out .= urlencode($ref);
|
||||
}
|
||||
$out .= ($mode ? '</font>' : '');
|
||||
$out .= ($mode ? '</span>' : '');
|
||||
if (!empty($conf->global->PAYMENT_SECURITY_TOKEN)) {
|
||||
if (empty($conf->global->PAYMENT_SECURITY_TOKEN_UNIQUE)) {
|
||||
$out .= '&securekey='.urlencode($conf->global->PAYMENT_SECURITY_TOKEN);
|
||||
} else {
|
||||
$out .= '&securekey='.($mode ? '<font color="#666666">' : '');
|
||||
$out .= '&securekey='.($mode ? '<span style="color: #666666">' : '');
|
||||
if ($mode == 1) {
|
||||
$out .= "hash('".$conf->global->PAYMENT_SECURITY_TOKEN."' + '".$type."' + invoice_ref)";
|
||||
}
|
||||
if ($mode == 0) {
|
||||
$out .= dol_hash($conf->global->PAYMENT_SECURITY_TOKEN.$type.$ref, 2);
|
||||
}
|
||||
$out .= ($mode ? '</font>' : '');
|
||||
$out .= ($mode ? '</span>' : '');
|
||||
}
|
||||
}
|
||||
} elseif ($type == 'contractline') {
|
||||
$out = $urltouse.'/public/payment/newpayment.php?source=contractline&ref='.($mode ? '<font color="#666666">' : '');
|
||||
$out = $urltouse.'/public/payment/newpayment.php?source=contractline&ref='.($mode ? '<span style="color: #666666">' : '');
|
||||
if ($mode == 1) {
|
||||
$out .= 'contractline_ref';
|
||||
}
|
||||
if ($mode == 0) {
|
||||
$out .= urlencode($ref);
|
||||
}
|
||||
$out .= ($mode ? '</font>' : '');
|
||||
$out .= ($mode ? '</span>' : '');
|
||||
if (!empty($conf->global->PAYMENT_SECURITY_TOKEN)) {
|
||||
if (empty($conf->global->PAYMENT_SECURITY_TOKEN_UNIQUE)) {
|
||||
$out .= '&securekey='.urlencode($conf->global->PAYMENT_SECURITY_TOKEN);
|
||||
} else {
|
||||
$out .= '&securekey='.($mode ? '<font color="#666666">' : '');
|
||||
$out .= '&securekey='.($mode ? '<span style="color: #666666">' : '');
|
||||
if ($mode == 1) {
|
||||
$out .= "hash('".$conf->global->PAYMENT_SECURITY_TOKEN."' + '".$type."' + contractline_ref)";
|
||||
}
|
||||
if ($mode == 0) {
|
||||
$out .= dol_hash($conf->global->PAYMENT_SECURITY_TOKEN.$type.$ref, 2);
|
||||
}
|
||||
$out .= ($mode ? '</font>' : '');
|
||||
$out .= ($mode ? '</span>' : '');
|
||||
}
|
||||
}
|
||||
} elseif ($type == 'member' || $type == 'membersubscription') {
|
||||
$newtype = 'member';
|
||||
$out = $urltouse.'/public/payment/newpayment.php?source=member&ref='.($mode ? '<font color="#666666">' : '');
|
||||
$out = $urltouse.'/public/payment/newpayment.php?source=member&ref='.($mode ? '<span style="color: #666666">' : '');
|
||||
if ($mode == 1) {
|
||||
$out .= 'member_ref';
|
||||
}
|
||||
if ($mode == 0) {
|
||||
$out .= urlencode($ref);
|
||||
}
|
||||
$out .= ($mode ? '</font>' : '');
|
||||
$out .= ($mode ? '</span>' : '');
|
||||
if (!empty($conf->global->PAYMENT_SECURITY_TOKEN)) {
|
||||
if (empty($conf->global->PAYMENT_SECURITY_TOKEN_UNIQUE)) {
|
||||
$out .= '&securekey='.urlencode($conf->global->PAYMENT_SECURITY_TOKEN);
|
||||
} else {
|
||||
$out .= '&securekey='.($mode ? '<font color="#666666">' : '');
|
||||
$out .= '&securekey='.($mode ? '<span style="color: #666666">' : '');
|
||||
if ($mode == 1) {
|
||||
$out .= "hash('".$conf->global->PAYMENT_SECURITY_TOKEN."' + '".$newtype."' + member_ref)";
|
||||
}
|
||||
if ($mode == 0) {
|
||||
$out .= dol_hash($conf->global->PAYMENT_SECURITY_TOKEN.$newtype.$ref, 2);
|
||||
}
|
||||
$out .= ($mode ? '</font>' : '');
|
||||
$out .= ($mode ? '</span>' : '');
|
||||
}
|
||||
}
|
||||
}
|
||||
if ($type == 'donation') {
|
||||
$out = $urltouse.'/public/payment/newpayment.php?source=donation&ref='.($mode ? '<font color="#666666">' : '');
|
||||
$out = $urltouse.'/public/payment/newpayment.php?source=donation&ref='.($mode ? '<span style="color: #666666">' : '');
|
||||
if ($mode == 1) {
|
||||
$out .= 'donation_ref';
|
||||
}
|
||||
if ($mode == 0) {
|
||||
$out .= urlencode($ref);
|
||||
}
|
||||
$out .= ($mode ? '</font>' : '');
|
||||
$out .= ($mode ? '</span>' : '');
|
||||
if (!empty($conf->global->PAYMENT_SECURITY_TOKEN)) {
|
||||
if (empty($conf->global->PAYMENT_SECURITY_TOKEN_UNIQUE)) {
|
||||
$out .= '&securekey='.urlencode($conf->global->PAYMENT_SECURITY_TOKEN);
|
||||
} else {
|
||||
$out .= '&securekey='.($mode ? '<font color="#666666">' : '');
|
||||
$out .= '&securekey='.($mode ? '<span style="color: #666666">' : '');
|
||||
if ($mode == 1) {
|
||||
$out .= "hash('".$conf->global->PAYMENT_SECURITY_TOKEN."' + '".$type."' + donation_ref)";
|
||||
}
|
||||
if ($mode == 0) {
|
||||
$out .= dol_hash($conf->global->PAYMENT_SECURITY_TOKEN.$type.$ref, 2);
|
||||
}
|
||||
$out .= ($mode ? '</font>' : '');
|
||||
$out .= ($mode ? '</span>' : '');
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -450,7 +450,7 @@ function htmlPrintOnlinePaymentFooter($fromcompany, $langs, $addformmessage = 0,
|
||||
}
|
||||
}
|
||||
|
||||
print '<font style="font-size: 10px;"><br><hr>'."\n";
|
||||
print '<span style="font-size: 10px;"><br><hr>'."\n";
|
||||
print $fromcompany->name.'<br>';
|
||||
print $line1;
|
||||
if (strlen($line1.$line2) > 50) {
|
||||
@ -459,5 +459,5 @@ function htmlPrintOnlinePaymentFooter($fromcompany, $langs, $addformmessage = 0,
|
||||
print ' - ';
|
||||
}
|
||||
print $line2;
|
||||
print '</font></div>'."\n";
|
||||
print '</span></div>'."\n";
|
||||
}
|
||||
|
||||
@ -49,7 +49,7 @@ function pdf_admin_prepare_head()
|
||||
$head = array();
|
||||
|
||||
$head[$h][0] = DOL_URL_ROOT.'/admin/pdf.php';
|
||||
$head[$h][1] = $langs->trans("Common");
|
||||
$head[$h][1] = $langs->trans("Parameters");
|
||||
$head[$h][2] = 'general';
|
||||
$h++;
|
||||
|
||||
@ -2240,6 +2240,7 @@ function pdf_getTotalQty($object, $type, $outputlangs)
|
||||
if (!empty($object->lines[$i]->fk_parent_line)) {
|
||||
$special_code = $object->getSpecialCode($object->lines[$i]->fk_parent_line);
|
||||
}
|
||||
$hidedetails = '';
|
||||
$parameters = array('i'=>$i, 'outputlangs'=>$outputlangs, 'hidedetails'=>$hidedetails, 'special_code'=>$special_code);
|
||||
$action = '';
|
||||
$reshook = $hookmanager->executeHooks('pdf_getTotalQty', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
|
||||
|
||||
@ -853,7 +853,7 @@ function accessforbidden($message = '', $printheader = 1, $printfooter = 1, $sho
|
||||
print $hookmanager->resPrint;
|
||||
if (empty($reshook)) {
|
||||
if ($user->login) {
|
||||
print $langs->trans("CurrentLogin").': <font class="error">'.$user->login.'</font><br>';
|
||||
print $langs->trans("CurrentLogin").': <span class="error">'.$user->login.'</span><br>';
|
||||
print $langs->trans("ErrorForbidden2", $langs->transnoentitiesnoconv("Home"), $langs->transnoentitiesnoconv("Users"));
|
||||
} else {
|
||||
print $langs->trans("ErrorForbidden3");
|
||||
|
||||
@ -63,16 +63,16 @@ function getOnlineSignatureUrl($mode, $type, $ref = '')
|
||||
$out = '';
|
||||
|
||||
if ($type == 'proposal') {
|
||||
$out = DOL_MAIN_URL_ROOT.'/public/onlinesign/newonlinesign.php?source=proposal&ref='.($mode ? '<font color="#666666">' : '');
|
||||
$out = DOL_MAIN_URL_ROOT.'/public/onlinesign/newonlinesign.php?source=proposal&ref='.($mode ? '<span style="color: #666666">' : '');
|
||||
if ($mode == 1) {
|
||||
$out .= 'proposal_ref';
|
||||
}
|
||||
if ($mode == 0) {
|
||||
$out .= urlencode($ref);
|
||||
}
|
||||
$out .= ($mode ? '</font>' : '');
|
||||
$out .= ($mode ? '</span>' : '');
|
||||
if ($mode == 1) {
|
||||
$out .= '&hashp=<font color="#666666">hash_of_file</font>';
|
||||
$out .= '&hashp=<span style="color: #666666">hash_of_file</span>';
|
||||
} else {
|
||||
include_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php';
|
||||
$propaltmp = new Propal($db);
|
||||
|
||||
@ -339,7 +339,7 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false)
|
||||
|
||||
$thumbsbyrow = 6;
|
||||
print '<div class="div-table-responsive-no-min">';
|
||||
print '<table class="noborder centpercent'.($edit ? ' editmode' : '').'">';
|
||||
print '<table class="noborder centpercent'.($edit ? ' editmodeforshowskin' : '').'">';
|
||||
|
||||
// Title
|
||||
if ($foruserprofile) {
|
||||
@ -400,7 +400,7 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false)
|
||||
if (!file_exists($file)) {
|
||||
$url = DOL_URL_ROOT.'/public/theme/common/nophoto.png';
|
||||
}
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].($edit ? '?action=edit&token='.newToken().'&theme=' : '?theme=').$subdir.(GETPOST('optioncss', 'alpha', 1) ? '&optioncss='.GETPOST('optioncss', 'alpha', 1) : '').($fuser ? '&id='.$fuser->id : '').'" style="font-weight: normal;" alt="'.$langs->trans("Preview").'">';
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].($edit ? '?action=edit&token='.newToken().'&mode=template&theme=' : '?theme=').$subdir.(GETPOST('optioncss', 'alpha', 1) ? '&optioncss='.GETPOST('optioncss', 'alpha', 1) : '').($fuser ? '&id='.$fuser->id : '').'" style="font-weight: normal;" alt="'.$langs->trans("Preview").'">';
|
||||
if ($subdir == $conf->global->MAIN_THEME) {
|
||||
$title = $langs->trans("ThemeCurrentlyActive");
|
||||
} else {
|
||||
|
||||
@ -546,7 +546,7 @@ function print_left_auguria_menu($db, $menu_array_before, $menu_array_after, &$t
|
||||
print '</div>'."\n";
|
||||
$lastlevel0 = 'enabled';
|
||||
} elseif ($showmenu) { // Not enabled but visible (so greyed)
|
||||
print '<div class="menu_titre">'.$tabstring.'<font class="vmenudisabled">'.$menu_array[$i]['titre'].'</font></div>'."\n";
|
||||
print '<div class="menu_titre">'.$tabstring.'<span class="vmenudisabled">'.$menu_array[$i]['titre'].'</span></div>'."\n";
|
||||
$lastlevel0 = 'greyed';
|
||||
} else {
|
||||
$lastlevel0 = 'hidden';
|
||||
@ -582,7 +582,7 @@ function print_left_auguria_menu($db, $menu_array_before, $menu_array_after, &$t
|
||||
}
|
||||
print '</div>'."\n";
|
||||
} elseif ($showmenu && $lastlevel0 == 'enabled') { // Not enabled but visible (so greyed), except if parent was not enabled.
|
||||
print '<div class="menu_contenu'.$cssmenu.'">'.$tabstring.'<font class="vsmenudisabled vsmenudisabledmargin">'.$menu_array[$i]['titre'].'</font><br></div>'."\n";
|
||||
print '<div class="menu_contenu'.$cssmenu.'">'.$tabstring.'<span class="vsmenudisabled vsmenudisabledmargin">'.$menu_array[$i]['titre'].'</span><br></div>'."\n";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -309,7 +309,7 @@ class MenuManager
|
||||
print '</ul>';
|
||||
}
|
||||
if ($val['enabled'] == 2) {
|
||||
print '<font class="vsmenudisabled">'.$val['titre'].'</font>';
|
||||
print '<span class="vsmenudisabled">'.$val['titre'].'</span>';
|
||||
}
|
||||
print '</li>';
|
||||
print '</ul>'."\n";
|
||||
|
||||
@ -2081,7 +2081,7 @@ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabM
|
||||
print '</div>'."\n";
|
||||
$lastlevel0 = 'enabled';
|
||||
} elseif ($showmenu) { // Not enabled but visible (so greyed)
|
||||
print '<div class="menu_titre">'.$tabstring.'<font class="vmenudisabled">'.$menu_array[$i]['titre'].'</font></div>'."\n";
|
||||
print '<div class="menu_titre">'.$tabstring.'<span class="vmenudisabled">'.$menu_array[$i]['titre'].'</span></div>'."\n";
|
||||
$lastlevel0 = 'greyed';
|
||||
} else {
|
||||
$lastlevel0 = 'hidden';
|
||||
@ -2122,7 +2122,7 @@ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabM
|
||||
// Not enabled but visible (so greyed), except if parent was not enabled.
|
||||
print '<div class="menu_contenu'.$cssmenu.'">';
|
||||
print $tabstring;
|
||||
print '<font class="vsmenudisabled vsmenudisabledmargin">'.$menu_array[$i]['titre'].'</font><br></div>'."\n";
|
||||
print '<span class="vsmenudisabled vsmenudisabledmargin">'.$menu_array[$i]['titre'].'</span><br></div>'."\n";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -317,14 +317,14 @@ class MenuManager
|
||||
print '</ul>';
|
||||
}
|
||||
if ($val['enabled'] == 2) {
|
||||
print '<font class="vsmenudisabled">';
|
||||
print '<span class="vsmenudisabled">';
|
||||
// Add font-awesome
|
||||
if ($val['level'] == 0 && !empty($val['prefix'])) {
|
||||
print $val['prefix'];
|
||||
}
|
||||
|
||||
print $val['titre'];
|
||||
print '</font>';
|
||||
print '</span>';
|
||||
}
|
||||
print '</li>';
|
||||
print '</ul>'."\n";
|
||||
|
||||
@ -320,7 +320,7 @@ class MenuManager
|
||||
print '</ul>';
|
||||
}
|
||||
if ($val['enabled'] == 2) {
|
||||
print '<font class="vsmenudisabled">'.$val['titre'].'</font>';
|
||||
print '<span class="vsmenudisabled">'.$val['titre'].'</span>';
|
||||
}
|
||||
print '</li>';
|
||||
print '</ul>'."\n";
|
||||
@ -407,7 +407,7 @@ class MenuManager
|
||||
if ($menu_array[$i]['enabled']) {
|
||||
print '<div class="menu_titre">'.$tabstring.'<a class="vmenu" href="'.dol_buildpath($menu_array[$i]['url'], 1).'"'.($menu_array[$i]['target'] ? ' target="'.$menu_array[$i]['target'].'"' : '').'>'.$menu_array[$i]['titre'].'</a></div>'."\n";
|
||||
} else {
|
||||
print '<div class="menu_titre">'.$tabstring.'<font class="vmenudisabled">'.$menu_array[$i]['titre'].'</font></div>'."\n";
|
||||
print '<div class="menu_titre">'.$tabstring.'<span class="vmenudisabled">'.$menu_array[$i]['titre'].'</span></div>'."\n";
|
||||
}
|
||||
print '<div class="menu_top"></div>'."\n";
|
||||
}
|
||||
@ -433,7 +433,7 @@ class MenuManager
|
||||
print '</span>';
|
||||
}
|
||||
} else {
|
||||
print $tabstring.'<font class="vsmenudisabled vsmenudisabledmargin">'.$menu_array[$i]['titre'].'</font>';
|
||||
print $tabstring.'<span class="vsmenudisabled vsmenudisabledmargin">'.$menu_array[$i]['titre'].'</span>';
|
||||
}
|
||||
|
||||
// If title is not pure text and contains a table, no carriage return added
|
||||
|
||||
@ -295,12 +295,14 @@ class doc_generic_bom_odt extends ModelePDFBom
|
||||
// Recipient name
|
||||
$contactobject = null;
|
||||
if (!empty($usecontact)) {
|
||||
// On peut utiliser le nom de la societe du contact
|
||||
if ($usecontact && ($object->contact->fk_soc != $object->thirdparty->id && (!isset($conf->global->MAIN_USE_COMPANY_NAME_OF_CONTACT) || !empty($conf->global->MAIN_USE_COMPANY_NAME_OF_CONTACT)))) {
|
||||
$socobject = $object->contact;
|
||||
// We can use the company of contact instead of thirdparty company
|
||||
if ($object->contact->socid != $object->thirdparty->id && (!isset($conf->global->MAIN_USE_COMPANY_NAME_OF_CONTACT) || !empty($conf->global->MAIN_USE_COMPANY_NAME_OF_CONTACT))) {
|
||||
$object->contact->fetch_thirdparty();
|
||||
$socobject = $object->contact->thirdparty;
|
||||
$contactobject = $object->contact;
|
||||
} else {
|
||||
$socobject = $object->thirdparty;
|
||||
// if we have a CUSTOMER contact and we dont use as recipient we store the contact object for later use
|
||||
// if we have a CUSTOMER contact and we dont use it as thirdparty recipient we store the contact object for later use
|
||||
$contactobject = $object->contact;
|
||||
}
|
||||
} else {
|
||||
|
||||
@ -53,7 +53,8 @@ class doc_generic_order_odt extends ModelePDFCommandes
|
||||
public $phpmin = array(5, 6);
|
||||
|
||||
/**
|
||||
* @var string Dolibarr version of the loaded document
|
||||
* Dolibarr version of the loaded document
|
||||
* @var string
|
||||
*/
|
||||
public $version = 'dolibarr';
|
||||
|
||||
@ -96,7 +97,7 @@ class doc_generic_order_odt extends ModelePDFCommandes
|
||||
$this->option_freetext = 1; // Support add of a personalised text
|
||||
$this->option_draft_watermark = 0; // Support add of a watermark on drafts
|
||||
|
||||
// Recupere emetteur
|
||||
// Get source company
|
||||
$this->emetteur = $mysoc;
|
||||
if (!$this->emetteur->country_code) {
|
||||
$this->emetteur->country_code = substr($langs->defaultlang, -2); // By default if not defined
|
||||
@ -234,6 +235,7 @@ class doc_generic_order_odt extends ModelePDFCommandes
|
||||
$sav_charset_output = $outputlangs->charset_output;
|
||||
$outputlangs->charset_output = 'UTF-8';
|
||||
|
||||
// Load translation files required by the page
|
||||
$outputlangs->loadLangs(array("main", "dict", "companies", "bills"));
|
||||
|
||||
if ($conf->commande->dir_output) {
|
||||
@ -271,7 +273,7 @@ class doc_generic_order_odt extends ModelePDFCommandes
|
||||
$newfiletmp = preg_replace('/template_/i', '', $newfiletmp);
|
||||
$newfiletmp = preg_replace('/modele_/i', '', $newfiletmp);
|
||||
$newfiletmp = $objectref.'_'.$newfiletmp;
|
||||
//$file=$dir.'/'.$newfiletmp.'.'.dol_print_date(dol_now(),'%Y%m%d%H%M%S').'.odt';
|
||||
|
||||
// Get extension (ods or odt)
|
||||
$newfileformat = substr($newfile, strrpos($newfile, '.') + 1);
|
||||
if (!empty($conf->global->MAIN_DOC_USE_TIMING)) {
|
||||
@ -307,11 +309,14 @@ class doc_generic_order_odt extends ModelePDFCommandes
|
||||
// Recipient name
|
||||
$contactobject = null;
|
||||
if (!empty($usecontact)) {
|
||||
if ($usecontact && ($object->contact->fk_soc != $object->thirdparty->id && (!isset($conf->global->MAIN_USE_COMPANY_NAME_OF_CONTACT) || !empty($conf->global->MAIN_USE_COMPANY_NAME_OF_CONTACT)))) {
|
||||
$socobject = $object->contact;
|
||||
// We can use the company of contact instead of thirdparty company
|
||||
if ($object->contact->socid != $object->thirdparty->id && (!isset($conf->global->MAIN_USE_COMPANY_NAME_OF_CONTACT) || !empty($conf->global->MAIN_USE_COMPANY_NAME_OF_CONTACT))) {
|
||||
$object->contact->fetch_thirdparty();
|
||||
$socobject = $object->contact->thirdparty;
|
||||
$contactobject = $object->contact;
|
||||
} else {
|
||||
$socobject = $object->thirdparty;
|
||||
// if we have a CUSTOMER contact and we dont use as recipient we store the contact object for later use
|
||||
// if we have a CUSTOMER contact and we dont use it as thirdparty recipient we store the contact object for later use
|
||||
$contactobject = $object->contact;
|
||||
}
|
||||
} else {
|
||||
@ -379,6 +384,7 @@ class doc_generic_order_odt extends ModelePDFCommandes
|
||||
$array_other = $this->get_substitutionarray_other($outputlangs);
|
||||
// retrieve contact information for use in object as contact_xxx tags
|
||||
$array_thirdparty_contact = array();
|
||||
|
||||
if ($usecontact && is_object($contactobject)) {
|
||||
$array_thirdparty_contact = $this->get_substitutionarray_contact($contactobject, $outputlangs, 'contact');
|
||||
}
|
||||
@ -455,7 +461,6 @@ class doc_generic_order_odt extends ModelePDFCommandes
|
||||
}
|
||||
|
||||
// Call the beforeODTSave hook
|
||||
|
||||
$parameters = array('odfHandler'=>&$odfHandler, 'file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs, 'substitutionarray'=>&$tmparray);
|
||||
$reshook = $hookmanager->executeHooks('beforeODTSave', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
|
||||
|
||||
|
||||
@ -1449,7 +1449,7 @@ class pdf_einstein extends ModelePDFCommandes
|
||||
}
|
||||
|
||||
// Recipient name
|
||||
if ($usecontact && ($object->contact->fk_soc != $object->thirdparty->id && (!isset($conf->global->MAIN_USE_COMPANY_NAME_OF_CONTACT) || !empty($conf->global->MAIN_USE_COMPANY_NAME_OF_CONTACT)))) {
|
||||
if ($usecontact && ($object->contact->socid != $object->thirdparty->id && (!isset($conf->global->MAIN_USE_COMPANY_NAME_OF_CONTACT) || !empty($conf->global->MAIN_USE_COMPANY_NAME_OF_CONTACT)))) {
|
||||
$thirdparty = $object->contact;
|
||||
} else {
|
||||
$thirdparty = $object->thirdparty;
|
||||
|
||||
@ -1634,7 +1634,7 @@ class pdf_eratosthene extends ModelePDFCommandes
|
||||
}
|
||||
|
||||
//Recipient name
|
||||
if ($usecontact && ($object->contact->fk_soc != $object->thirdparty->id && (!isset($conf->global->MAIN_USE_COMPANY_NAME_OF_CONTACT) || !empty($conf->global->MAIN_USE_COMPANY_NAME_OF_CONTACT)))) {
|
||||
if ($usecontact && ($object->contact->socid != $object->thirdparty->id && (!isset($conf->global->MAIN_USE_COMPANY_NAME_OF_CONTACT) || !empty($conf->global->MAIN_USE_COMPANY_NAME_OF_CONTACT)))) {
|
||||
$thirdparty = $object->contact;
|
||||
} else {
|
||||
$thirdparty = $object->thirdparty;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user